pontus-x_cli 0.0.7 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (105) hide show
  1. package/README.md +553 -157
  2. package/bin/dev.js +7 -0
  3. package/bin/run.js +7 -0
  4. package/dist/commands/access.d.ts +9 -0
  5. package/dist/commands/access.js +23 -0
  6. package/dist/commands/access.js.map +1 -0
  7. package/dist/commands/change-price.d.ts +13 -0
  8. package/dist/commands/change-price.js +49 -0
  9. package/dist/commands/change-price.js.map +1 -0
  10. package/dist/commands/check-participant-compliance.d.ts +10 -0
  11. package/dist/commands/check-participant-compliance.js +54 -0
  12. package/dist/commands/check-participant-compliance.js.map +1 -0
  13. package/dist/commands/compute-results.d.ts +12 -0
  14. package/dist/commands/compute-results.js +40 -0
  15. package/dist/commands/compute-results.js.map +1 -0
  16. package/dist/commands/compute-status.d.ts +12 -0
  17. package/dist/commands/compute-status.js +40 -0
  18. package/dist/commands/compute-status.js.map +1 -0
  19. package/dist/commands/compute.d.ts +14 -0
  20. package/dist/commands/compute.js +66 -0
  21. package/dist/commands/compute.js.map +1 -0
  22. package/dist/commands/edit-algo.d.ts +16 -0
  23. package/dist/commands/edit-algo.js +51 -0
  24. package/dist/commands/edit-algo.js.map +1 -0
  25. package/dist/commands/edit-asset-url.d.ts +13 -0
  26. package/dist/commands/edit-asset-url.js +55 -0
  27. package/dist/commands/edit-asset-url.js.map +1 -0
  28. package/dist/commands/edit-trusted-algos.d.ts +13 -0
  29. package/dist/commands/edit-trusted-algos.js +54 -0
  30. package/dist/commands/edit-trusted-algos.js.map +1 -0
  31. package/dist/commands/export-private-key.d.ts +11 -0
  32. package/dist/commands/export-private-key.js +67 -0
  33. package/dist/commands/export-private-key.js.map +1 -0
  34. package/dist/commands/generate-asset-credentials.d.ts +15 -0
  35. package/dist/commands/generate-asset-credentials.js +59 -0
  36. package/dist/commands/generate-asset-credentials.js.map +1 -0
  37. package/dist/commands/generate-did-web.d.ts +10 -0
  38. package/dist/commands/generate-did-web.js +39 -0
  39. package/dist/commands/generate-did-web.js.map +1 -0
  40. package/dist/commands/generate-participant-credentials.d.ts +12 -0
  41. package/dist/commands/generate-participant-credentials.js +51 -0
  42. package/dist/commands/generate-participant-credentials.js.map +1 -0
  43. package/dist/commands/get.d.ts +9 -0
  44. package/dist/commands/get.js +23 -0
  45. package/dist/commands/get.js.map +1 -0
  46. package/dist/commands/login.d.ts +14 -0
  47. package/dist/commands/login.js +51 -0
  48. package/dist/commands/login.js.map +1 -0
  49. package/dist/commands/logout.d.ts +6 -0
  50. package/dist/commands/logout.js +24 -0
  51. package/dist/commands/logout.js.map +1 -0
  52. package/dist/commands/publish.d.ts +15 -0
  53. package/dist/commands/publish.js +107 -0
  54. package/dist/commands/publish.js.map +1 -0
  55. package/dist/commands/revoke.d.ts +12 -0
  56. package/dist/commands/revoke.js +50 -0
  57. package/dist/commands/revoke.js.map +1 -0
  58. package/dist/commands/self-description.d.ts +13 -0
  59. package/dist/commands/self-description.js +53 -0
  60. package/dist/commands/self-description.js.map +1 -0
  61. package/dist/config.d.ts +48 -0
  62. package/dist/config.js +106 -117
  63. package/dist/config.js.map +1 -1
  64. package/dist/index.d.ts +2 -0
  65. package/dist/index.js +3 -444
  66. package/dist/index.js.map +1 -1
  67. package/dist/lib/gaia-x_compliance/generate-credentials/index.d.ts +1 -0
  68. package/dist/{gaia-x_compliance → lib/gaia-x_compliance}/generate-credentials/index.js +55 -105
  69. package/dist/lib/gaia-x_compliance/generate-credentials/index.js.map +1 -0
  70. package/dist/{gaia-x_compliance → lib/gaia-x_compliance}/generate-credentials/templates/participant.hbs +5 -1
  71. package/dist/lib/publishFromFile.d.ts +2 -0
  72. package/dist/lib/publishFromFile.js +143 -0
  73. package/dist/lib/publishFromFile.js.map +1 -0
  74. package/dist/types/schema.d.ts +2 -0
  75. package/dist/types/schema.js +8 -0
  76. package/dist/types/schema.js.map +1 -0
  77. package/dist/types/schema.json +474 -0
  78. package/dist/utils/connection.d.ts +13 -0
  79. package/dist/utils/connection.js +11 -19
  80. package/dist/utils/connection.js.map +1 -1
  81. package/oclif.manifest.json +830 -0
  82. package/package.json +69 -41
  83. package/dist/aquarius-query/index.js +0 -30
  84. package/dist/aquarius-query/index.js.map +0 -1
  85. package/dist/export-key-as-json/index.js +0 -27
  86. package/dist/export-key-as-json/index.js.map +0 -1
  87. package/dist/gaia-x_compliance/generate-credentials/index.js.map +0 -1
  88. package/dist/gaia-x_compliance/generate-did-web/index.js +0 -14
  89. package/dist/gaia-x_compliance/generate-did-web/index.js.map +0 -1
  90. package/dist/publish/samples/algo/index.js +0 -62
  91. package/dist/publish/samples/algo/index.js.map +0 -1
  92. package/dist/publish/samples/basic-predictor/index.js +0 -83
  93. package/dist/publish/samples/basic-predictor/index.js.map +0 -1
  94. package/dist/publish/samples/data/index.js +0 -55
  95. package/dist/publish/samples/data/index.js.map +0 -1
  96. package/dist/utils/index.js +0 -20
  97. package/dist/utils/index.js.map +0 -1
  98. package/dist/utils/package-version.js +0 -22
  99. package/dist/utils/package-version.js.map +0 -1
  100. package/dist/utils/publish-script-runner.js +0 -60
  101. package/dist/utils/publish-script-runner.js.map +0 -1
  102. /package/dist/{gaia-x_compliance → lib/gaia-x_compliance}/generate-credentials/templates/dataset.hbs +0 -0
  103. /package/dist/{gaia-x_compliance → lib/gaia-x_compliance}/generate-credentials/templates/lrn-request.hbs +0 -0
  104. /package/dist/{gaia-x_compliance → lib/gaia-x_compliance}/generate-credentials/templates/service.hbs +0 -0
  105. /package/dist/{gaia-x_compliance → lib/gaia-x_compliance}/generate-credentials/templates/tandc.hbs +0 -0
package/README.md CHANGED
@@ -1,299 +1,695 @@
1
- # Pontus-X CLI
1
+ # pontus-x_cli
2
2
 
3
- Command Line Interface for the Pontus-X Data Space Ecosystem.
3
+ A new CLI generated with oclif
4
4
 
5
- ## Installation
5
+ [![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)
6
+ [![Version](https://img.shields.io/npm/v/pontus-x_cli.svg)](https://npmjs.org/package/pontus-x_cli)
7
+ [![Downloads/week](https://img.shields.io/npm/dw/pontus-x_cli.svg)](https://npmjs.org/package/pontus-x_cli)
6
8
 
7
- If you don't have npm installed, install Node.js and NPM following the instructions at <https://docs.npmjs.com/downloading-and-installing-node-js-and-npm>
9
+ <!-- toc -->
10
+ * [pontus-x_cli](#pontus-x_cli)
11
+ * [Usage](#usage)
12
+ * [Commands](#commands)
13
+ * [Useful information](#useful-information)
14
+ * [Development](#development)
15
+ <!-- tocstop -->
8
16
 
9
- Then, install the Pontus-X CLI globally using npm:
17
+ # Usage
10
18
 
11
- ```shell
12
- npm install -g pontus-x_cli
19
+ <!-- usage -->
20
+ ```sh-session
21
+ $ npm install -g pontus-x_cli
22
+ $ pontus-x_cli COMMAND
23
+ running command...
24
+ $ pontus-x_cli (--version)
25
+ pontus-x_cli/1.0.0 linux-x64 node-v24.10.0
26
+ $ pontus-x_cli --help [COMMAND]
27
+ USAGE
28
+ $ pontus-x_cli COMMAND
29
+ ...
13
30
  ```
31
+ <!-- usagestop -->
14
32
 
15
- Then, create a `.env` file in your working directory with the network to be used, for instance, PONTUSXDEV or PONTUSXTEST:
33
+ # Commands
34
+
35
+ <!-- commands -->
36
+ * [`pontus-x_cli access DID`](#pontus-x_cli-access-did)
37
+ * [`pontus-x_cli autocomplete [SHELL]`](#pontus-x_cli-autocomplete-shell)
38
+ * [`pontus-x_cli change-price DID NEWPRICE`](#pontus-x_cli-change-price-did-newprice)
39
+ * [`pontus-x_cli check-participant-compliance`](#pontus-x_cli-check-participant-compliance)
40
+ * [`pontus-x_cli compute ALGO`](#pontus-x_cli-compute-algo)
41
+ * [`pontus-x_cli compute-results JOBID`](#pontus-x_cli-compute-results-jobid)
42
+ * [`pontus-x_cli compute-status JOBID`](#pontus-x_cli-compute-status-jobid)
43
+ * [`pontus-x_cli edit-algo DID IMAGE TAG CHECKSUM ENTRYPOINT`](#pontus-x_cli-edit-algo-did-image-tag-checksum-entrypoint)
44
+ * [`pontus-x_cli edit-asset-url DID URL`](#pontus-x_cli-edit-asset-url-did-url)
45
+ * [`pontus-x_cli edit-trusted-algos DID`](#pontus-x_cli-edit-trusted-algos-did)
46
+ * [`pontus-x_cli export-private-key`](#pontus-x_cli-export-private-key)
47
+ * [`pontus-x_cli generate-asset-credentials DID`](#pontus-x_cli-generate-asset-credentials-did)
48
+ * [`pontus-x_cli generate-did-web`](#pontus-x_cli-generate-did-web)
49
+ * [`pontus-x_cli generate-participant-credentials`](#pontus-x_cli-generate-participant-credentials)
50
+ * [`pontus-x_cli get DID`](#pontus-x_cli-get-did)
51
+ * [`pontus-x_cli help [COMMAND]`](#pontus-x_cli-help-command)
52
+ * [`pontus-x_cli login KEYFILE`](#pontus-x_cli-login-keyfile)
53
+ * [`pontus-x_cli logout`](#pontus-x_cli-logout)
54
+ * [`pontus-x_cli publish PATH`](#pontus-x_cli-publish-path)
55
+ * [`pontus-x_cli revoke DIDS`](#pontus-x_cli-revoke-dids)
56
+ * [`pontus-x_cli self-description DID SDURL`](#pontus-x_cli-self-description-did-sdurl)
57
+
58
+ ## `pontus-x_cli access DID`
59
+
60
+ Access an asset that can be downloaded given its DID
16
61
 
17
62
  ```
18
- NETWORK=PONTUSXDEV
63
+ USAGE
64
+ $ pontus-x_cli access DID
65
+
66
+ ARGUMENTS
67
+ DID DID of the asset
68
+
69
+ DESCRIPTION
70
+ Access an asset that can be downloaded given its DID
71
+
72
+ EXAMPLES
73
+ $ pontus-x_cli access did:op:af3e93c4f18903f91b108e7204b8a752e7605f4547ed507212bd6aca63af5686
19
74
  ```
20
75
 
21
- ### Autocompletion
76
+ _See code: [src/commands/access.ts](https://github.com/AgrospAI/pontus-x_cli/blob/v1.0.0/src/commands/access.ts)_
77
+
78
+ ## `pontus-x_cli autocomplete [SHELL]`
22
79
 
23
- To enable autocompletion for the Pontus-X CLI, run the following command:
80
+ Display autocomplete installation instructions.
24
81
 
25
- ```shell
26
- pontus-x_cli install-completion
27
82
  ```
83
+ USAGE
84
+ $ pontus-x_cli autocomplete [SHELL] [-r]
85
+
86
+ ARGUMENTS
87
+ SHELL (zsh|bash|powershell) Shell type
28
88
 
29
- ## Currently available commands
89
+ FLAGS
90
+ -r, --refresh-cache Refresh cache (ignores displaying instructions)
30
91
 
31
- The following subsections detail the available command to interact with the Pontus-X Data Space Ecosystem. Additionally, there is a final section [Prepare yourself for Gaia-X compliance](#prepare-yourself-for-gaia-x-compliance) that will guide you through the process of setting up a DID-Web server and generating the necessary participant credentials following the Gaia-X Trust Framework using two additional `pontus-x_cli` commands.
92
+ DESCRIPTION
93
+ Display autocomplete installation instructions.
32
94
 
33
- ### export-private-key
95
+ EXAMPLES
96
+ $ pontus-x_cli autocomplete
34
97
 
35
- Export your private key as a JSON file, to use later with the login command or for Pontus-X portals automation. More details at [export-key-as-json](./src/export-key-as-json/README.md)
98
+ $ pontus-x_cli autocomplete bash
36
99
 
37
- ### login \<keyFile.json>
100
+ $ pontus-x_cli autocomplete zsh
38
101
 
39
- Login to retrieve your private key from a JSON key store and store it in .env:
102
+ $ pontus-x_cli autocomplete powershell
40
103
 
41
- ```shell
42
- pontus-x_cli login 62078f05eb4450272d7e492f3660835826906822.json
104
+ $ pontus-x_cli autocomplete --refresh-cache
43
105
  ```
44
106
 
45
- ### logout
107
+ _See code: [@oclif/plugin-autocomplete](https://github.com/oclif/plugin-autocomplete/blob/v3.2.34/src/commands/autocomplete/index.ts)_
46
108
 
47
- Logout to remove your private key from .env file:
109
+ ## `pontus-x_cli change-price DID NEWPRICE`
110
+
111
+ Change the price keeping the existing currency for an asset with the given DID
48
112
 
49
- ```shell
50
- pontus-x_cli logout
51
113
  ```
114
+ USAGE
115
+ $ pontus-x_cli change-price DID NEWPRICE [-y]
52
116
 
53
- ### get \<did>
117
+ ARGUMENTS
118
+ DID DID of the asset
119
+ NEWPRICE New price for the asset
54
120
 
55
- Get the available metadata to the asset with the given DID:
121
+ FLAGS
122
+ -y, --yes Automatic yes to prompts
56
123
 
57
- ```shell
58
- pontus-x_cli get did:op:34d5f73d77550843201ee1a43ad9d404d3e557ed6a70772e9afde7a27d863b8f
124
+ DESCRIPTION
125
+ Change the price keeping the existing currency for an asset with the given DID
126
+
127
+ EXAMPLES
128
+ $ pontus-x_cli change-price did:op:ffeee8c8f19328985ef6743b08e61ef89d5141027fd47612e32e7900cacd2b7a 10
59
129
  ```
60
130
 
61
- ### access \<did>
131
+ _See code: [src/commands/change-price.ts](https://github.com/AgrospAI/pontus-x_cli/blob/v1.0.0/src/commands/change-price.ts)_
132
+
133
+ ## `pontus-x_cli check-participant-compliance`
62
134
 
63
- Access a downloadable asset (either a dataset or algorithm) given its DID:
135
+ Use Gaia-X Compliance to check a participant Verifiable Presentation
64
136
 
65
- ```shell
66
- pontus-x_cli access did:op:34d5f73d77550843201ee1a43ad9d404d3e557ed6a70772e9afde7a27d863b8f
67
137
  ```
138
+ USAGE
139
+ $ pontus-x_cli check-participant-compliance -p <value> --vp <value>
68
140
 
69
- ### revoke \<dids...>
141
+ FLAGS
142
+ -p, --participant=<value> (required) Path to the JSON file including the required participant data
143
+ --vp=<value> (required) Path to the participant Verifiable Presentation file
70
144
 
71
- Publisher revocation of one or more owned DIDs
145
+ DESCRIPTION
146
+ Use Gaia-X Compliance to check a participant Verifiable Presentation
72
147
 
73
- ```shell
74
- pontus-x_cli revoke did:op:052eb04066d696a27430116676c859c6303d82257c7a0ebda51f4e80363f6bca did:op:052eb04066d696a27430116676c859c6303d82257c7a0ebda51f4e80363f6bca
148
+ EXAMPLES
149
+ $ pontus-x_cli check-participant-compliance -p ./CEP.data.json --vp ./CEP.vp.json
75
150
  ```
76
151
 
77
- ### self-description \<did> \<sdurl>
152
+ _See code: [src/commands/check-participant-compliance.ts](https://github.com/AgrospAI/pontus-x_cli/blob/v1.0.0/src/commands/check-participant-compliance.ts)_
78
153
 
79
- Associate Gaia-X Self-Description to the asset with the given DID
154
+ ## `pontus-x_cli compute ALGO`
80
155
 
81
- Edit a DID metadata to link it to a Gaia-X Self Description available from the provided URL (it should be compliant with the configured Gaia-X Digital Clearing House, for instance <https://compliance.lab.gaia-x.eu/v1-staging/docs>):
156
+ Compute the algorithm on one or more datasets.
82
157
 
83
- ```shell
84
- pontus-x_cli self-description did:op:34d5f73d77550843201ee1a43ad9d404d3e557ed6a70772e9afde7a27d863b8f https://compliance.agrospai.udl.cat/.well-known/service_EDA_UdL_devnet.vp.json
85
158
  ```
159
+ USAGE
160
+ $ pontus-x_cli compute ALGO -d <value>... [-y]
86
161
 
87
- ### change-price \<did> \<newPrice>
162
+ ARGUMENTS
163
+ ALGO Algorithm DID
88
164
 
89
- Change the price keeping the existing currency for an asset with the given DID
165
+ FLAGS
166
+ -d, --datasets=<value>... (required) Dataset DIDs
167
+ -y, --yes Automatic yes to prompts
168
+
169
+ DESCRIPTION
170
+ Compute the algorithm on one or more datasets.
171
+
172
+ EXAMPLES
173
+ $ pontus-x_cli compute did:op:34e2ff9baf030318b13ff3940ab0885bb11fee49a8597123392983f5a0db8a35 -d did:op:d8a36ff74d36e54ce245d27689330fc39debb2fdfeac09d4a08b24b68cf5053d
174
+ ```
175
+
176
+ _See code: [src/commands/compute.ts](https://github.com/AgrospAI/pontus-x_cli/blob/v1.0.0/src/commands/compute.ts)_
90
177
 
91
- Edit the price of an existing DID, keeping the current currency:
178
+ ## `pontus-x_cli compute-results JOBID`
179
+
180
+ Get the compute job results.
92
181
 
93
- ```shell
94
- pontus-x_cli change-price did:op:34d5f73d77550843201ee1a43ad9d404d3e557ed6a70772e9afde7a27d863b8f 0.1
95
182
  ```
183
+ USAGE
184
+ $ pontus-x_cli compute-results JOBID -p <value>
185
+
186
+ ARGUMENTS
187
+ JOBID Compute job ID
96
188
 
97
- ### edit-algo \<did> \<image> \<tag> \<checksum>
189
+ FLAGS
190
+ -p, --provider=<value> (required) [default: https://provider.agrospai.udl.cat] The Provider URL
98
191
 
99
- Change the container metadata for a given algorithm DID:
192
+ DESCRIPTION
193
+ Get the compute job results.
100
194
 
101
- ```shell
102
- pontus-x_cli edit-algo did:op:34d5f73d77550843201ee1a43ad9d404d3e557ed6a70772e9afde7a27d863b8f rogargon/pandas-profiling 4.9.0 sha256:105d404c9b00438c08c2199d5356fcd17d7349cff514c923d066ced56d9baa93
195
+ EXAMPLES
196
+ $ pontus-x_cli compute-results 215bae450c8f40f59bfc5d1ccada3931 -p https://provider.agrospai.udl.cat
103
197
  ```
104
198
 
105
- ### edit-trusted-algos \<did> \<algos...>
199
+ _See code: [src/commands/compute-results.ts](https://github.com/AgrospAI/pontus-x_cli/blob/v1.0.0/src/commands/compute-results.ts)_
200
+
201
+ ## `pontus-x_cli compute-status JOBID`
106
202
 
107
- Overwrite the trusted algorithms for a data asset to the provided algorithm DIDs:
203
+ Check compute job status.
108
204
 
109
- ```shell
110
- pontus-x_cli edit-trusted-algos did:op:f7946c46eb87318b2cd34efdd5f33b19ea9223a90b67f447da6a92aa68ca007c did:op:34d5f73d77550843201ee1a43ad9d404d3e557ed6a70772e9afde7a27d863b8f did:op:d20f956e79709fb2469fffe2bd85cf2fec95a21d2497998bb530043c6bbec901
111
205
  ```
206
+ USAGE
207
+ $ pontus-x_cli compute-status JOBID -p <value>
112
208
 
113
- ### edit-dataset-url \<did> \<url>
209
+ ARGUMENTS
210
+ JOBID Compute job ID
114
211
 
115
- Change the URL of a dataset DID:
212
+ FLAGS
213
+ -p, --provider=<value> (required) [default: https://provider.agrospai.udl.cat] The Provider URL
116
214
 
117
- ```shell
118
- pontus-x_cli edit-dataset-url did:op:f7946c46eb87318b2cd34efdd5f33b19ea9223a90b67f447da6a92aa68ca007c https://new.url/dataset.csv
215
+ DESCRIPTION
216
+ Check compute job status.
217
+
218
+ EXAMPLES
219
+ $ pontus-x_cli compute-status 215bae450c8f40f59bfc5d1ccada3931 -p https://provider.agrospai.udl.cat
119
220
  ```
120
221
 
121
- ### publish \[options] \<script-folder>
222
+ _See code: [src/commands/compute-status.ts](https://github.com/AgrospAI/pontus-x_cli/blob/v1.0.0/src/commands/compute-status.ts)_
223
+
224
+ ## `pontus-x_cli edit-algo DID IMAGE TAG CHECKSUM ENTRYPOINT`
122
225
 
123
- Publish the asset as instructed in the provided script:
226
+ Change the container metadata for a given algorithm DID
124
227
 
125
- ```shell
126
- pontus-x_cli publish --provider https://provider.agrospai.udl.cat src/publish/samples/data --dry-run
127
228
  ```
229
+ USAGE
230
+ $ pontus-x_cli edit-algo DID IMAGE TAG CHECKSUM ENTRYPOINT [-y]
128
231
 
129
- Remove the flag `--dry-run` to actually publish the asset.
232
+ ARGUMENTS
233
+ DID Algorithm DID
234
+ IMAGE Container image
235
+ TAG Container tag
236
+ CHECKSUM Image checksum
237
+ ENTRYPOINT Algorithm entrypoint
130
238
 
131
- The script should be a TypeScript file `index.ts` in the input script-folder, which should have a function `publish` with the following signature:
239
+ FLAGS
240
+ -y, --yes Skip confirmation prompt
132
241
 
133
- ```typescript
134
- const publish = async (folder: string, connection: any, provider: string, dryRun: boolean) => {
135
- // Your publishing logic here
136
- }
242
+ DESCRIPTION
243
+ Change the container metadata for a given algorithm DID
244
+
245
+ EXAMPLES
246
+ $ pontus-x_cli edit-algo did:op:dcdb747f8feff3122c6d6c0f45a339a6e09415e721f98f61cc2c1d62ab35a21f rogargon/pandas-profiling 4.16 sha256:81dca5439f07dff4d56097546a9fce7335be3de8e2622dc105c64e54376f86b5 "python /algorithm/src/main.py"
137
247
  ```
138
248
 
139
- In the same folder, you should have a `description.md` file with the description of the asset to be published using Markdown syntax.
249
+ _See code: [src/commands/edit-algo.ts](https://github.com/AgrospAI/pontus-x_cli/blob/v1.0.0/src/commands/edit-algo.ts)_
140
250
 
141
- There are samples of publish scripts and description Markdown files for algorithms and datasets in the [src/publish/samples](src/publish/samples) folder.
251
+ ## `pontus-x_cli edit-asset-url DID URL`
142
252
 
143
- ## Prepare yourself for Gaia-X compliance
253
+ Change the URL of an asset DID
144
254
 
145
- This section will help you to prepare your institution for Gaia-X compliance. It will guide you through the process of setting up a DID-Web server and generating the necessary participant credentials following the Gaia-X Trust Framework.
255
+ ```
256
+ USAGE
257
+ $ pontus-x_cli edit-asset-url DID URL [-y]
146
258
 
147
- ### Obtaining a domain and SSL certificate
259
+ ARGUMENTS
260
+ DID DID of the asset
261
+ URL New URL for the asset
148
262
 
149
- Get a root domain for DID-Web and the associated SSL certificate. We will use for this Let's Encrypt certificates, the free alternative among Gaia-X's [list of defined Trust Anchors](https://gaia-x.gitlab.io/policy-rules-committee/trust-framework/trust_anchors/#list-of-defined-trust-anchors).
263
+ FLAGS
264
+ -y, --yes Automatic yes to prompts
150
265
 
151
- There are different ways of getting a Let's Encrypt certificate: <https://letsencrypt.org/getting-started/>
266
+ DESCRIPTION
267
+ Change the URL of an asset DID
152
268
 
153
- For this example, and as later we will need to publish online some of the generated documents, we will use a Kubernetes cluster with Cert Manager to automate the certificate issuance, plus NGINX to serve the generated documents.
269
+ EXAMPLES
270
+ $ pontus-x_cli edit-asset-url did:op:af3e93c4f18903f91b108e7204b8a752e7605f4547ed507212bd6aca63af5686 https://raw.githubusercontent.com/plotly/datasets/refs/heads/master/titanic.csv
271
+ ```
154
272
 
155
- First of all, you will need a Kubernetes cluster that is publicly accessible. You can use a cloud provider like Google Cloud Platform (GCP) or Amazon Web Services (AWS), or a local Kubernetes cluster like [Minikube](https://minikube.sigs.k8s.io/docs/start/).
273
+ _See code: [src/commands/edit-asset-url.ts](https://github.com/AgrospAI/pontus-x_cli/blob/v1.0.0/src/commands/edit-asset-url.ts)_
156
274
 
157
- Once Minikube is running, don't forget to enable the ingress addon using the command: `minikube addons enable ingress`. Then, install Cert Manager following the instructions at <https://cert-manager.io/docs/installation/>
275
+ ## `pontus-x_cli edit-trusted-algos DID`
158
276
 
159
- After Cert Manager is installed, you can create a ClusterIssuer resource to issue Let's Encrypt certificates. The file [letsencrypt-production.yaml](src/gaia-x_compliance/letsencrypt-production.yaml) provides an example of a ClusterIssuer resource, which can be applied to your cluster using the command:
277
+ Overwrite the trusted algorithms for a data asset to the provided algorithm DIDs
160
278
 
161
- ```shell
162
- kubectl apply -f letsencrypt-production.yaml
163
279
  ```
280
+ USAGE
281
+ $ pontus-x_cli edit-trusted-algos DID --algos <value>... [-y]
282
+
283
+ ARGUMENTS
284
+ DID DID of the asset
285
+
286
+ FLAGS
287
+ -y, --yes Skip confirmation prompt
288
+ --algos=<value>... (required) Algorithm DIDs
289
+
290
+ DESCRIPTION
291
+ Overwrite the trusted algorithms for a data asset to the provided algorithm DIDs
292
+
293
+ EXAMPLES
294
+ $ pontus-x_cli edit-trusted-algos did:op:ffeee8c8f19328985ef6743b08e61ef89d5141027fd47612e32e7900cacd2b7a --algos did:op:8f9994d01975cadd0196a2f7f811ed850e5d02a7223e7c5a31faaebe7371c81a did:op:0b970c95211cb8ef4574383386376646081bb7eb949b2a75e1e2171ea25949a7
295
+ ```
296
+
297
+ _See code: [src/commands/edit-trusted-algos.ts](https://github.com/AgrospAI/pontus-x_cli/blob/v1.0.0/src/commands/edit-trusted-algos.ts)_
298
+
299
+ ## `pontus-x_cli export-private-key`
300
+
301
+ Export your private key as a JSON file, to use later with the login command or for Pontus-X portals automation
302
+
303
+ ```
304
+ USAGE
305
+ $ pontus-x_cli export-private-key [-p <value>] [-k <value>] [-f <value>]
306
+
307
+ FLAGS
308
+ -f, --filepath=<value> File path to save the encrypted private key (default is <address>.json)
309
+ -k, --privateKey=<value> Your private key
310
+ -p, --password=<value> Password to encrypt the private key file
164
311
 
165
- Now, you can create a NGINX deployment, with associated service and ingress, which will request the certificate from Let's Encrypt, for instance that defined at [test-nginx.yaml](src/gaia-x_compliance/test-nginx.yaml). It can be deployed using the commands:
312
+ DESCRIPTION
313
+ Export your private key as a JSON file, to use later with the login command or for Pontus-X portals automation
166
314
 
167
- ```shell
168
- kubectl create namespace test
169
- kubectl apply -f test-nginx.yaml
315
+ EXAMPLES
316
+ $ pontus-x_cli export-private-key
170
317
  ```
171
318
 
172
- Just wait for all the resources to be ready and the certificate to be issued. You can check the status of all the resource in the test namespace using the command:
319
+ _See code: [src/commands/export-private-key.ts](https://github.com/AgrospAI/pontus-x_cli/blob/v1.0.0/src/commands/export-private-key.ts)_
320
+
321
+ ## `pontus-x_cli generate-asset-credentials DID`
322
+
323
+ Generate the Gaia-X credentials for the input DID asset, including its verifiable presentation
173
324
 
174
- ```shell
175
- kubectl get all -n test
176
325
  ```
326
+ USAGE
327
+ $ pontus-x_cli generate-asset-credentials DID -c <value> -d <value> -p <value> [-w <value>]
328
+
329
+ ARGUMENTS
330
+ DID DID of the asset
177
331
 
178
- And check the certificate to be issued using the command:
332
+ FLAGS
333
+ -c, --certificate=<value> (required) Path to the certificate.key file
334
+ -d, --didjson=<value> (required) Path to the did.json file
335
+ -p, --participant=<value> (required) Path to the JSON file including the required participant data
336
+ -w, --password=<value> Password for the private key file (if not provided, it will be asked interactively)
179
337
 
180
- ```shell
181
- kubectl get certificate -n test
338
+ DESCRIPTION
339
+ Generate the Gaia-X credentials for the input DID asset, including its verifiable presentation
340
+
341
+ EXAMPLES
342
+ $ pontus-x_cli generate-asset-credentials -p ./CEP.data.json -d ./did.json -c certificate.key did:op:01f8bc1e797a854dc718bd7a802acb07c5fc39f706b03dd454bceb66be6828c6
182
343
  ```
183
344
 
184
- Wait till the certificate is marked as ready:
345
+ _See code: [src/commands/generate-asset-credentials.ts](https://github.com/AgrospAI/pontus-x_cli/blob/v1.0.0/src/commands/generate-asset-credentials.ts)_
346
+
347
+ ## `pontus-x_cli generate-did-web`
348
+
349
+ Generate a did.json to set up a DID-Web source to publish Gaia-X complaint credentials
185
350
 
186
351
  ```
187
- NAME READY SECRET AGE
188
- your.domain.org-cert True your.domain.org-cert 2m
352
+ USAGE
353
+ $ pontus-x_cli generate-did-web -c <value> -d <value>
354
+
355
+ FLAGS
356
+ -c, --certificate=<value> (required) Path to the file with the certificate chain for the DID domain URL
357
+ -d, --domain=<value> (required) URL where the DID-Web document will be hosted
358
+
359
+ DESCRIPTION
360
+ Generate a did.json to set up a DID-Web source to publish Gaia-X complaint credentials
361
+
362
+ EXAMPLES
363
+ $ pontus-x_cli generate-did-web -d <https://compliance.agrospai.udl.cat> -c certificate-chain.crt
189
364
  ```
190
365
 
191
- Now, you can retrieve the certificate chain including the root certificate as required by Gaia-X. We can use an online service like <https://whatsmychaincert.com>. Use the following command configuring you domain name, e.g. `your.domain.org`, to retrieve the whole chain and store it in `certificate-chain.crt`:
366
+ _See code: [src/commands/generate-did-web.ts](https://github.com/AgrospAI/pontus-x_cli/blob/v1.0.0/src/commands/generate-did-web.ts)_
367
+
368
+ ## `pontus-x_cli generate-participant-credentials`
369
+
370
+ Generate the Gaia-X credentials for the participant including their verifiable presentation
192
371
 
193
- ```shell
194
- curl -o certificate-chain.crt "https://whatsmychaincert.com/generate?include_leaf=1&include_root=1&host=your.domain.org"
195
372
  ```
373
+ USAGE
374
+ $ pontus-x_cli generate-participant-credentials -c <value> -d <value> -p <value> [-w <value>]
375
+
376
+ FLAGS
377
+ -c, --certificate=<value> (required) Path to the certificate.key file
378
+ -d, --didjson=<value> (required) Path to the did.json file
379
+ -p, --participant=<value> (required) Path to the JSON file including the required participant data
380
+ -w, --password=<value> Password for the private key file (if not provided, it will be asked interactively)
196
381
 
197
- Also retrieve the secret key for the certificate using the command:
382
+ DESCRIPTION
383
+ Generate the Gaia-X credentials for the participant including their verifiable presentation
198
384
 
199
- ```shell
200
- kubectl get secret your.domain.org-cert -n test -o jsonpath='{.data.tls\.key}' | base64 --decode > certificate.key
385
+ EXAMPLES
386
+ $ pontus-x_cli generate-participant-credentials -p ./CEP.data.json -d ./did.json -c certificate.key
201
387
  ```
202
388
 
203
- ### Setting up a DID-Web server
389
+ _See code: [src/commands/generate-participant-credentials.ts](https://github.com/AgrospAI/pontus-x_cli/blob/v1.0.0/src/commands/generate-participant-credentials.ts)_
390
+
391
+ ## `pontus-x_cli get DID`
204
392
 
205
- Once we have set a public domain and its associated SSL certificate, we can set up a DID-Web source where we can publish Gaia-X complaint credentials for participants and assets.
393
+ Get the available metadata to the asset with the given DID
394
+
395
+ ```
396
+ USAGE
397
+ $ pontus-x_cli get DID
206
398
 
207
- To generate the did.json file required for DID-Web, we will use the Gaia-X [did-web-generator](https://gitlab.com/gaia-x/lab/did-web-generator) and provide as input the base URL for DID-Web, e.g. <https://your.domain.org>, and the name of the file with the SSL certificate, e.g. `certificate-chain.crt`.
399
+ ARGUMENTS
400
+ DID DID of the asset
208
401
 
209
- The did.json file is generated using the `generate-did-web` command provided by `pontus-x_cli`:
402
+ DESCRIPTION
403
+ Get the available metadata to the asset with the given DID
210
404
 
211
- ```shell
212
- pontus-x_cli generate-did-web -d https://your.domain.org -c certificate-chain.crt
405
+ EXAMPLES
406
+ $ pontus-x_cli get did:op:ffeee8c8f19328985ef6743b08e61ef89d5141027fd47612e32e7900cacd2b7a
213
407
  ```
214
408
 
215
- The output is stored in a file named `did.json` and is to be made available from the DID-Web domain at the well-known path `/.well-known/did.json` together with the certificate file.
409
+ _See code: [src/commands/get.ts](https://github.com/AgrospAI/pontus-x_cli/blob/v1.0.0/src/commands/get.ts)_
410
+
411
+ ## `pontus-x_cli help [COMMAND]`
412
+
413
+ Display help for pontus-x_cli.
414
+
415
+ ```
416
+ USAGE
417
+ $ pontus-x_cli help [COMMAND...] [-n]
216
418
 
217
- To do so, we will use the NGINX server we have set up before. We will create a ConfigMap with the did.json file and the certificate file, and mount it in the NGINX deployment.
419
+ ARGUMENTS
420
+ COMMAND... Command to show help for.
218
421
 
219
- First, we create the config map in the test namespace from the `did.json` and `certificate-chain.crt` files using the following command:
422
+ FLAGS
423
+ -n, --nested-commands Include all nested commands in the output.
220
424
 
221
- ```shell
222
- kubectl --namespace test create configmap did-web-config --from-file=did.json --from-file=certificate-chain.crt --dry-run=client -o yaml | kubectl apply -f -
425
+ DESCRIPTION
426
+ Display help for pontus-x_cli.
223
427
  ```
224
428
 
225
- Then, we update the NGINX deployment to mount the config map in the `/usr/share/nginx/html/.well-known` path. The updated deployment is defined in the file [test-nginx-did-web.yaml](src/gaia-x_compliance/test-nginx-did-web.yaml) and can be applied using the command:
429
+ _See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v6.2.32/src/commands/help.ts)_
430
+
431
+ ## `pontus-x_cli login KEYFILE`
432
+
433
+ Login to retrieve your private key from a JSON key store and store it in .env
226
434
 
227
- ```shell
228
- kubectl apply -f test-nginx-did-web.yaml
229
435
  ```
436
+ USAGE
437
+ $ pontus-x_cli login KEYFILE [-p <value>]
438
+
439
+ ARGUMENTS
440
+ KEYFILE Path to the keyFile.json
441
+
442
+ FLAGS
443
+ -p, --password=<value> Password to decrypt the key file
444
+
445
+ DESCRIPTION
446
+ Login to retrieve your private key from a JSON key store and store it in .env
230
447
 
231
- Now, the `did.json` should be available at <https://your.domain.org/.well-known/did.json> and the certificate chain at <https://your.domain.org/.well-known/certificate-chain.crt>.
448
+ EXAMPLES
449
+ $ pontus-x_cli login d999baae98ac5246568fd726be8832c49626867d.json
450
+ ```
232
451
 
233
- The chain can be checked to see if it constitutes a valid trust anchor chain using the Gaia-X [Trust Anchor Registry](https://registry.lab.gaia-x.eu/v1-staging/docs#/TrustAnchor/TrustAnchorController_verifyTrustAnchorChain) API. The `v1-staging` version accepts Extended Validation (EV) Secure Sockets Layer (SSL) certificate issuers like Let's Encrypt, while the `v1` version only accepts the official [Gaia-X Trust Anchors]((<https://gaia-x.gitlab.io/policy-rules-committee/trust-framework/trust_anchors/#list-of-defined-trust-anchors>). EV SSL certificates are just recommended for testing.
452
+ _See code: [src/commands/login.ts](https://github.com/AgrospAI/pontus-x_cli/blob/v1.0.0/src/commands/login.ts)_
234
453
 
235
- ### Generating Gaia-X Compliant Participant Credentials
454
+ ## `pontus-x_cli logout`
236
455
 
237
- To generate the credentials required by the Gaia-X Trust Framework to identify a Participant, we will use the `generate-participant-credentials` command provided by `pontus-x_cli`. This command requires as input a JSON file with the participant's data and the DID-Web URL where the credentials will be published. For instance, for the Universitat de Lleida, a sample [UdL.data.json](src/gaia-x_compliance/UdL.data.json) file is provided with the following content:
456
+ Logout to remove your private key from .env file
238
457
 
239
- ```json
240
- {
241
- "participant_name": "UdL",
242
- "participant_uri": "https://www.udl.cat",
243
- "participant_legal_name": "Universitat de Lleida",
244
- "participant_vat_id": "ESQ7550001G",
245
- "participant_country_subdivision_code": "ES-L",
246
- "participant_street_address": "Victor Siurana, 1",
247
- "participant_postal_code": "25003",
248
- "participant_locality": "Lleida"
249
- }
250
458
  ```
459
+ USAGE
460
+ $ pontus-x_cli logout
251
461
 
252
- To generate the Verifiable Presentation of the Gaia-X credentials for Universitat de Lleida using the previous DID-Web server, we can use the following command. The Verifiable Presentation (VP) file will be generated in the same folder as the JSON file with the input data about the participant:
462
+ DESCRIPTION
463
+ Logout to remove your private key from .env file
253
464
 
254
- ```shell
255
- pontus-x_cli generate-participant-credentials -p UdL.data.json -d did.json -c certificate.key
465
+ EXAMPLES
466
+ $ pontus-x_cli logout
256
467
  ```
257
468
 
258
- To generate the VPs for other participants, just create a new JSON file with the participant's data and run the script with the new file. For instance, there is another sample JSON file for CEP in [CEP.data.json](src/gaia-x_compliance/CEP.data.json), which can be used to generate the credentials for the "Consorci Centre d'Estudis Porcins" using the command:
469
+ _See code: [src/commands/logout.ts](https://github.com/AgrospAI/pontus-x_cli/blob/v1.0.0/src/commands/logout.ts)_
470
+
471
+ ## `pontus-x_cli publish PATH`
472
+
473
+ Publish the asset as instructed in the provided script folder.
259
474
 
260
- ```shell
261
- pontus-x_cli generate-participant-credentials -p CEP.data.json -d did.json -c certificate.key
262
475
  ```
476
+ USAGE
477
+ $ pontus-x_cli publish PATH -p <value> [--dry-run]
478
+
479
+ ARGUMENTS
480
+ PATH Path to the JSON/YAML or TS file describing the asset to publish
481
+
482
+ FLAGS
483
+ -p, --provider=<value> (required) [default: https://provider.agrospai.udl.cat] The Provider URL
484
+ --dry-run Dry run the publishing process
263
485
 
264
- ## Publishing the Gaia-X Compliant Participant Credentials
486
+ DESCRIPTION
487
+ Publish the asset as instructed in the provided script folder.
265
488
 
266
- To publish the generated credentials, we will use the NGINX server we have set up before and expand the ConfigMap to also include the files for the credentials (there is no need to also publish the Gaia-X Compliance responses). The following command will generate a new version of the config map including all the credentials for UdL and CEP participants, in addition to the original `did.json` and `certificate-chain.crt` files:
489
+ EXAMPLES
490
+ $ pontus-x_cli publish samples/publish/algo/spec.json
267
491
 
268
- ```shell
269
- kubectl --namespace test create configmap did-web-config --from-file=did.json --from-file=certificate-chain.crt \
270
- --from-file=UdL.vp.json --from-file=CEP.vp.json \
271
- --dry-run=client -o yaml | kubectl apply -f -
492
+ $ pontus-x_cli publish samples/publish/algo/spec.yaml
493
+
494
+ $ pontus-x_cli publish samples/publish/algo/index.ts
272
495
  ```
273
496
 
274
- ### Dealing with Certificate Expiration
497
+ _See code: [src/commands/publish.ts](https://github.com/AgrospAI/pontus-x_cli/blob/v1.0.0/src/commands/publish.ts)_
498
+
499
+ ## `pontus-x_cli revoke DIDS`
275
500
 
276
- In case of SSL certificate expiration, just regenerate and publish at well-know the certificate chain `certificate-chain.crt`
501
+ Publisher revocation of one or more owned DIDs
502
+
503
+ ```
504
+ USAGE
505
+ $ pontus-x_cli revoke DIDS [-y]
277
506
 
278
- **Important**: public and private keys do not change and nothing more needs to be done, not even updating the `did.json` file.
507
+ ARGUMENTS
508
+ DIDS DIDs to revoke
279
509
 
280
- So basically, download again the certificate chain after renewal using the previous command:
510
+ FLAGS
511
+ -y, --yes Skip confirmation prompt
281
512
 
282
- ```shell
283
- curl -o certificate-chain.crt "https://whatsmychaincert.com/generate?include_leaf=1&include_root=1&host=your.domain.org"
513
+ DESCRIPTION
514
+ Publisher revocation of one or more owned DIDs
515
+
516
+ EXAMPLES
517
+ $ pontus-x_cli revoke did:op:ffeee8c8f19328985ef6743b08e61ef89d5141027fd47612e32e7900cacd2b7a did:op:abcee8c8f19328985ef6743b08e61ef89d5141027fd47612e32e7900cacd2b7b
284
518
  ```
285
519
 
286
- And update the ConfigMap with the new certificate chain, without forgetting the rest of files being already published:
520
+ _See code: [src/commands/revoke.ts](https://github.com/AgrospAI/pontus-x_cli/blob/v1.0.0/src/commands/revoke.ts)_
521
+
522
+ ## `pontus-x_cli self-description DID SDURL`
523
+
524
+ Associate Gaia-X Self-Description to the asset with the given DID
287
525
 
288
- ```shell
289
- kubectl --namespace test create configmap did-web-config --from-file=did.json --from-file=certificate-chain.crt \
290
- --from-file=UdL.vp.json --from-file=CEP.vp.json \
291
- --dry-run=client -o yaml | kubectl apply -f -
292
526
  ```
527
+ USAGE
528
+ $ pontus-x_cli self-description DID SDURL [-y]
293
529
 
294
- ### Additional References
530
+ ARGUMENTS
531
+ DID DID of the asset
532
+ SDURL URL of the Self-Description
295
533
 
296
- Gaia-X: onboarding, first credentials' issuance.
534
+ FLAGS
535
+ -y, --yes Skip confirmation prompt
297
536
 
298
- * Video tutorial: <https://www.youtube.com/watch?v=xHaBM-T2--k>
299
- * Jupyter notebook: <https://gitlab.com/gaia-x/lab/workshops/gaia-x-101>
537
+ DESCRIPTION
538
+ Associate Gaia-X Self-Description to the asset with the given DID
539
+
540
+ EXAMPLES
541
+ $ pontus-x_cli self-description did:op:d22954f2cbf6a85c897ce605c275cc786e099592cc59e3b7dd66b93e784bed8c https://example.com/self-description.json
542
+ ```
543
+
544
+ _See code: [src/commands/self-description.ts](https://github.com/AgrospAI/pontus-x_cli/blob/v1.0.0/src/commands/self-description.ts)_
545
+ <!-- commandsstop -->
546
+
547
+ # Useful information
548
+
549
+ ## How to obtain the certificate chain
550
+
551
+ You can use the following command to obtain the certificate chain for the compliance service:
552
+
553
+ ```bash
554
+ curl -o certificate-chain.crt "https://whatsmychaincert.com/generate?include_leaf=1&include_root=1&host=compliance.agrospai.udl.cat"
555
+ ```
556
+
557
+ ## How to obtain the certificate key
558
+
559
+ If you are using Kubernetes with cert-manager, you can extract the key with the following command:
560
+
561
+ ```bash
562
+ kubectl get secret compliance-tls -n tenant-1 -o jsonpath='{.data.tls\.key}' | base64 --decode > certificate.key
563
+ ```
564
+
565
+ # Development
566
+
567
+ ## Install dependencies
568
+
569
+ ```sh
570
+ npm install
571
+ ```
572
+
573
+ ## Build the CLI
574
+
575
+ ```sh
576
+ npm run build
577
+ ```
578
+
579
+ ## Run the built CLI
580
+
581
+ ### Development
582
+
583
+ ```sh
584
+ ./bin/dev.js COMMAND
585
+ ```
586
+
587
+ ### Production
588
+
589
+ ```sh
590
+ ./bin/run.js COMMAND
591
+ ```
592
+
593
+ ### Global installation
594
+
595
+ ```sh
596
+ npm install -g .
597
+ ```
598
+
599
+ ## Formatting
600
+
601
+ ```sh
602
+ npm run format
603
+ ```
604
+
605
+ ## Linting
606
+
607
+ ```sh
608
+ npm run lint
609
+ ```
610
+
611
+ ## Typing
612
+
613
+ ```sh
614
+ npm run tsc
615
+ ```
616
+
617
+ ## Testing
618
+
619
+ You can customize the tests in `test/config.ts` file. The two most important parameters are `PRIVATE_KEY_PATH` and `PRIVATE_KEY_PASSWORD`.
620
+
621
+ 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`.
622
+
623
+ ### Structure
624
+
625
+ The tests are organized in folders by functionality:
626
+
627
+ ```text
628
+ test/
629
+ ├── auth/
630
+ ├── read/
631
+ └── write/
632
+ ```
633
+
634
+ * **auth**: commands related to authentication.
635
+ * **read**: commands that do not make modifications in the blockchain.
636
+ * **write**: commands that make modifications in the blockchain. There is one exception: the `access` command, which causes problems when run in parallel with other write commands. All write commands are run sequentially to avoid conflicts.
637
+
638
+ ### Initialization
639
+
640
+ 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`).
641
+
642
+ ```sh
643
+ npm run test:init
644
+ ```
645
+
646
+ ### Clean up
647
+
648
+ Whenever you want to clean up the deployed assets in the blockchain, you can run:
649
+
650
+ ```sh
651
+ npm run test:clean
652
+ ```
653
+
654
+ ### Run all tests once
655
+
656
+ ```sh
657
+ npm run test
658
+ ```
659
+
660
+ ### Run a specific test file once
661
+
662
+ ```sh
663
+ npm run test TEST_NAME # example: access, login, get, etc.
664
+ ```
665
+
666
+ ### Run a specific test folder
667
+
668
+ ```sh
669
+ npm run test TEST_FOLDER # example: auth, read, write
670
+ ```
671
+
672
+ ### Run a specific test file in watch mode
673
+
674
+ ```sh
675
+ npm run test:watch TEST_NAME # example: access, login, get, etc.
676
+ ```
677
+
678
+ ### Open the Vitest UI
679
+
680
+ ```sh
681
+ npm run test:ui
682
+ ```
683
+
684
+ ## Generate documentation
685
+
686
+ ```sh
687
+ npm run prepack
688
+ npm run postpack
689
+ ```
690
+
691
+ ## Generate JSON schema
692
+
693
+ ```sh
694
+ ./node_modules/.bin/ts-json-schema-generator --path 'src/types/publish.d.ts' --type 'PublishConfig' --expose 'export' --out 'src/types/schema.json'
695
+ ```