Swisspost 460d0e0780 sVote source code publication | 5 vuotta sitten | |
---|---|---|
.. | ||
.vscode | 5 vuotta sitten | |
assembly | 5 vuotta sitten | |
crypto | 5 vuotta sitten | |
doc | 5 vuotta sitten | |
src | 5 vuotta sitten | |
tasks | 5 vuotta sitten | |
test | 5 vuotta sitten | |
.babelrc | 5 vuotta sitten | |
.eslintignore | 5 vuotta sitten | |
.eslintrc | 5 vuotta sitten | |
.eslintrc-base.json | 5 vuotta sitten | |
.eslintrc-drastic.json | 5 vuotta sitten | |
.gitignore | 5 vuotta sitten | |
.npmignore | 5 vuotta sitten | |
.npmrc | 5 vuotta sitten | |
THIRD-PARTY.txt | 5 vuotta sitten | |
gulpfile.js | 5 vuotta sitten | |
jsdoc.conf.json | 5 vuotta sitten | |
karma-precompute.conf.js | 5 vuotta sitten | |
karma-proofs.conf.js | 5 vuotta sitten | |
karma.conf.js | 5 vuotta sitten | |
makefile | 5 vuotta sitten | |
package-lock.json | 5 vuotta sitten | |
package.json | 5 vuotta sitten | |
paths.json | 5 vuotta sitten | |
readme.md | 5 vuotta sitten | |
version.txt | 5 vuotta sitten |
This is the JavaScript client API for the online voting platform. It produces a JavaScript bundle file containing all necessary dependencies for a voting client.
For API guide:
For API JSdocs see:
Build the project and find it in dist/doc/api-reference
Note that this sample app is a bit outdated and not currently maintained
A sample voting client implementation using the OvMsgApi is included in the /sample/ folder. For instructions see: https://scm.scytl.net/stash/projects/COMP/repos/online-voting-client-library/browse/ov-client-js/sample/readme.md
A suite of scripts to set up several lightweight clients for stress/performance tests. Docs for these tools can be found here:
$ npm install
$ npm run build
build, test and generate docs$ make
(same thing)/dist
ov-api.min.js
/doc
/api-reference (api docs in html)
/src
ov-api.js (unminified & unobfuscated source)
Basic benchmark support is provided by a custom embedded timing component (crono.js). Collection of performance data occurs always with negligible overhead, and a summary is logged to the browser console. This logged output is suitable to be posted to a performance data repository but this is still TBD.
See 'src/lib/client/send-vote.js' for more details.
As of 17/2/17 ov-client uses release 0.6.49 of forge
The current build uses crypto-lib - v1.22.0 - 2015-12-21. Note that this is a slightly patched version found in './crypto/'. Upgrading crypto-lib is possible if you apply the changes listed in the './crypto/cryptolib.diff' file. There are two tasks for updating cryptolib or policies:
Get the new crypto-lib.js, patch it (see above) and place it in /crypto/
Update the policies in the existing crypto/policies.js file
The purpose of this guide is to introduce the future changes of Javascript projects.
Branches inside Jenkins and his jobs:
NPM Nexus is private repository to store dependencies that we'll use inside different projects. There are two repositories and a group:
npmjs This is the official repository of npm (https://registry.npmjs.org) that we make proxy.
npm-scytl This is the private repository where we can upload/publish our NPM artifacts.
group This group is a repository that groups the hole previously.
To try a dependency locally and avoid to publish incorrect versions into nexus, then we’ll use the npm link command. This command is useful if you need to try some changes of your library locally and want to make sure that the changes works fine and this doesn’t break anything.
First go to your library main directory and type “npm link” this command copies all your project folder in a npm shared folder of your machine making your library “on-line” like npm do it by in this case is locally. Next step you’ll need is going your project main folder and write “npm link name-of-the-dependency” , so at this moment the npm takes all of your share folder and place it inside your node_modules actual project.
Then voilà! You can try your library easy with two commands.
There are two possibilities:
NPM NEXUS VERSION: To use the library inside a project, you need to specify the name and version inside the package.json of the project. Example: “name”: “x.x.x” inside package.json and then do the "npm install". In this case you don’t need to run any commands to build something, cause the package is yet distributed and the scripts of the project will be use it correctly.
GIT+SSH: Or if you want, can work with git+ssh URL (needs ssh configuration) with main branch or by commit and then do npm install. In this second case you need to make npm run release in other to create the distribution folders, and then the scripts do the rest.
ov-client is uploaded into npm nexus, so it's available to download wherever you want for consuming. All you need is specify the version inside you package.json of the project.
This ov-client is inside npm-scytl then you can found it here: npm-scytl