A new CLI generated with oclif
$ npm install -g pontus-x_cli
$ pontus-x_cli COMMAND
running command...
$ pontus-x_cli (--version)
pontus-x_cli/1.0.2 linux-x64 node-v20.19.5
$ pontus-x_cli --help [COMMAND]
USAGE
$ pontus-x_cli COMMAND
...Display autocomplete installation instructions.
USAGE
$ pontus-x_cli autocomplete [SHELL] [-r]
ARGUMENTS
[SHELL] (zsh|bash|powershell) Shell type
FLAGS
-r, --refresh-cache Refresh cache (ignores displaying instructions)
DESCRIPTION
Display autocomplete installation instructions.
EXAMPLES
$ pontus-x_cli autocomplete
$ pontus-x_cli autocomplete bash
$ pontus-x_cli autocomplete zsh
$ pontus-x_cli autocomplete powershell
$ pontus-x_cli autocomplete --refresh-cache
See code: @oclif/plugin-autocomplete
Display help for pontus-x_cli.
USAGE
$ pontus-x_cli help [COMMAND...] [-n]
ARGUMENTS
[COMMAND...] Command to show help for.
FLAGS
-n, --nested-commands Include all nested commands in the output.
DESCRIPTION
Display help for pontus-x_cli.
See code: @oclif/plugin-help
You can use the following command to obtain the certificate chain for the compliance service:
curl -o certificate-chain.crt "https://whatsmychaincert.com/generate?include_leaf=1&include_root=1&host=compliance.agrospai.udl.cat"If you are using Kubernetes with cert-manager, you can extract the key with the following command:
kubectl get secret compliance-tls -n tenant-1 -o jsonpath='{.data.tls\.key}' | base64 --decode > certificate.keynpm installnpm run build./bin/dev.js COMMAND./bin/run.js COMMANDnpm install -g .npm run formatnpm run lintnpm run tscYou can customize the tests in test/config.ts file. The two most important parameters are PRIVATE_KEY_PATH and PRIVATE_KEY_PASSWORD.
By default, you need to have the privateKey.json file in the base root. Which you can generate with the command: npm run dev export-private-key -f privateKey.json.
The tests are organized in folders by functionality:
test/
├── auth/
├── read/
└── write/
- auth: commands related to authentication.
- read: commands that do not make modifications in the blockchain.
- write: commands that make modifications in the blockchain. All write commands are run sequentially to avoid conflicts.
Because the tests interact with the blockchain, we need to first deploy some assets manually and keep track of their DIDs in the STATE_FILE (by default ./.vitest-state.json).
npm run test:initWhenever you want to clean up the deployed assets in the blockchain, you can run:
npm run test:cleannpm run testnpm run test TEST_NAME # example: access, login, get, etc.npm run test TEST_FOLDER # example: auth, read, writenpm run test:watch TEST_NAME # example: access, login, get, etc.npm run test:uinpx vitest --reporter=htmlnpm run prepack
npm run postpacknpm run schema