pontus-x_cli 1.2.5 → 1.2.6
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.
- package/README.md +23 -23
- package/dist/lib/spec.d.ts +3 -3
- package/dist/lib/spec.js +30 -39
- package/dist/lib/spec.js.map +1 -1
- package/dist/types/manifest-schema.json +11 -27
- package/dist/types/schema.json +22 -85
- package/oclif.manifest.json +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -22,7 +22,7 @@ $ npm install -g pontus-x_cli
|
|
|
22
22
|
$ pontus-x_cli COMMAND
|
|
23
23
|
running command...
|
|
24
24
|
$ pontus-x_cli (--version)
|
|
25
|
-
pontus-x_cli/1.2.
|
|
25
|
+
pontus-x_cli/1.2.6 linux-x64 node-v26.0.0
|
|
26
26
|
$ pontus-x_cli --help [COMMAND]
|
|
27
27
|
USAGE
|
|
28
28
|
$ pontus-x_cli COMMAND
|
|
@@ -103,7 +103,7 @@ EXAMPLES
|
|
|
103
103
|
$ pontus-x_cli access did:op:af3e93c4f18903f91b108e7204b8a752e7605f4547ed507212bd6aca63af5686
|
|
104
104
|
```
|
|
105
105
|
|
|
106
|
-
_See code: [src/commands/access.ts](https://github.com/AgrospAI/pontus-x_cli/blob/v1.2.
|
|
106
|
+
_See code: [src/commands/access.ts](https://github.com/AgrospAI/pontus-x_cli/blob/v1.2.6/src/commands/access.ts)_
|
|
107
107
|
|
|
108
108
|
## `pontus-x_cli autocomplete [SHELL]`
|
|
109
109
|
|
|
@@ -158,7 +158,7 @@ EXAMPLES
|
|
|
158
158
|
$ pontus-x_cli change-price did:op:ffeee8c8f19328985ef6743b08e61ef89d5141027fd47612e32e7900cacd2b7a 10
|
|
159
159
|
```
|
|
160
160
|
|
|
161
|
-
_See code: [src/commands/change-price.ts](https://github.com/AgrospAI/pontus-x_cli/blob/v1.2.
|
|
161
|
+
_See code: [src/commands/change-price.ts](https://github.com/AgrospAI/pontus-x_cli/blob/v1.2.6/src/commands/change-price.ts)_
|
|
162
162
|
|
|
163
163
|
## `pontus-x_cli check-participant-compliance`
|
|
164
164
|
|
|
@@ -179,7 +179,7 @@ EXAMPLES
|
|
|
179
179
|
$ pontus-x_cli check-participant-compliance -p ./CEP.data.json --vp ./CEP.vp.json
|
|
180
180
|
```
|
|
181
181
|
|
|
182
|
-
_See code: [src/commands/check-participant-compliance.ts](https://github.com/AgrospAI/pontus-x_cli/blob/v1.2.
|
|
182
|
+
_See code: [src/commands/check-participant-compliance.ts](https://github.com/AgrospAI/pontus-x_cli/blob/v1.2.6/src/commands/check-participant-compliance.ts)_
|
|
183
183
|
|
|
184
184
|
## `pontus-x_cli compute [ALGORITHM]`
|
|
185
185
|
|
|
@@ -208,7 +208,7 @@ EXAMPLES
|
|
|
208
208
|
$ pontus-x_cli compute <algorithmDid> -t <tag1> -t <tag2> ...
|
|
209
209
|
```
|
|
210
210
|
|
|
211
|
-
_See code: [src/commands/compute.ts](https://github.com/AgrospAI/pontus-x_cli/blob/v1.2.
|
|
211
|
+
_See code: [src/commands/compute.ts](https://github.com/AgrospAI/pontus-x_cli/blob/v1.2.6/src/commands/compute.ts)_
|
|
212
212
|
|
|
213
213
|
## `pontus-x_cli compute-results JOBID`
|
|
214
214
|
|
|
@@ -231,7 +231,7 @@ EXAMPLES
|
|
|
231
231
|
$ pontus-x_cli compute-results 215bae450c8f40f59bfc5d1ccada3931 -p https://provider.agrospai.udl.cat
|
|
232
232
|
```
|
|
233
233
|
|
|
234
|
-
_See code: [src/commands/compute-results.ts](https://github.com/AgrospAI/pontus-x_cli/blob/v1.2.
|
|
234
|
+
_See code: [src/commands/compute-results.ts](https://github.com/AgrospAI/pontus-x_cli/blob/v1.2.6/src/commands/compute-results.ts)_
|
|
235
235
|
|
|
236
236
|
## `pontus-x_cli compute-status JOBID`
|
|
237
237
|
|
|
@@ -254,7 +254,7 @@ EXAMPLES
|
|
|
254
254
|
$ pontus-x_cli compute-status 215bae450c8f40f59bfc5d1ccada3931 -p https://provider.agrospai.udl.cat
|
|
255
255
|
```
|
|
256
256
|
|
|
257
|
-
_See code: [src/commands/compute-status.ts](https://github.com/AgrospAI/pontus-x_cli/blob/v1.2.
|
|
257
|
+
_See code: [src/commands/compute-status.ts](https://github.com/AgrospAI/pontus-x_cli/blob/v1.2.6/src/commands/compute-status.ts)_
|
|
258
258
|
|
|
259
259
|
## `pontus-x_cli edit-additional-metadata DID METADATAFILE`
|
|
260
260
|
|
|
@@ -278,7 +278,7 @@ EXAMPLES
|
|
|
278
278
|
$ pontus-x_cli edit-additional-metadata did:op:dcdb747f8feff3122c6d6c0f45a339a6e09415e721f98f61cc2c1d62ab35a21f ./metadata.json
|
|
279
279
|
```
|
|
280
280
|
|
|
281
|
-
_See code: [src/commands/edit-additional-metadata.ts](https://github.com/AgrospAI/pontus-x_cli/blob/v1.2.
|
|
281
|
+
_See code: [src/commands/edit-additional-metadata.ts](https://github.com/AgrospAI/pontus-x_cli/blob/v1.2.6/src/commands/edit-additional-metadata.ts)_
|
|
282
282
|
|
|
283
283
|
## `pontus-x_cli edit-algo DID IMAGE TAG CHECKSUM ENTRYPOINT`
|
|
284
284
|
|
|
@@ -305,7 +305,7 @@ EXAMPLES
|
|
|
305
305
|
$ pontus-x_cli edit-algo did:op:dcdb747f8feff3122c6d6c0f45a339a6e09415e721f98f61cc2c1d62ab35a21f rogargon/pandas-profiling 4.16 sha256:81dca5439f07dff4d56097546a9fce7335be3de8e2622dc105c64e54376f86b5 "python /algorithm/src/main.py"
|
|
306
306
|
```
|
|
307
307
|
|
|
308
|
-
_See code: [src/commands/edit-algo.ts](https://github.com/AgrospAI/pontus-x_cli/blob/v1.2.
|
|
308
|
+
_See code: [src/commands/edit-algo.ts](https://github.com/AgrospAI/pontus-x_cli/blob/v1.2.6/src/commands/edit-algo.ts)_
|
|
309
309
|
|
|
310
310
|
## `pontus-x_cli edit-asset-url DID URL`
|
|
311
311
|
|
|
@@ -329,7 +329,7 @@ EXAMPLES
|
|
|
329
329
|
$ pontus-x_cli edit-asset-url did:op:af3e93c4f18903f91b108e7204b8a752e7605f4547ed507212bd6aca63af5686 https://raw.githubusercontent.com/plotly/datasets/refs/heads/master/titanic.csv
|
|
330
330
|
```
|
|
331
331
|
|
|
332
|
-
_See code: [src/commands/edit-asset-url.ts](https://github.com/AgrospAI/pontus-x_cli/blob/v1.2.
|
|
332
|
+
_See code: [src/commands/edit-asset-url.ts](https://github.com/AgrospAI/pontus-x_cli/blob/v1.2.6/src/commands/edit-asset-url.ts)_
|
|
333
333
|
|
|
334
334
|
## `pontus-x_cli edit-trusted-algos`
|
|
335
335
|
|
|
@@ -355,7 +355,7 @@ EXAMPLES
|
|
|
355
355
|
$ pontus-x_cli edit-trusted-algos -d <datasetDid1> <datasetDid2> ... -a <algorithmDid1> <algorithmDid2> ...
|
|
356
356
|
```
|
|
357
357
|
|
|
358
|
-
_See code: [src/commands/edit-trusted-algos.ts](https://github.com/AgrospAI/pontus-x_cli/blob/v1.2.
|
|
358
|
+
_See code: [src/commands/edit-trusted-algos.ts](https://github.com/AgrospAI/pontus-x_cli/blob/v1.2.6/src/commands/edit-trusted-algos.ts)_
|
|
359
359
|
|
|
360
360
|
## `pontus-x_cli edit-trusted-publishers`
|
|
361
361
|
|
|
@@ -380,7 +380,7 @@ EXAMPLES
|
|
|
380
380
|
$ pontus-x_cli edit-trusted-publishers -d <datasetDid1> <datasetDid2> ... -p <publisherDid1> <publisherDid2> ...
|
|
381
381
|
```
|
|
382
382
|
|
|
383
|
-
_See code: [src/commands/edit-trusted-publishers.ts](https://github.com/AgrospAI/pontus-x_cli/blob/v1.2.
|
|
383
|
+
_See code: [src/commands/edit-trusted-publishers.ts](https://github.com/AgrospAI/pontus-x_cli/blob/v1.2.6/src/commands/edit-trusted-publishers.ts)_
|
|
384
384
|
|
|
385
385
|
## `pontus-x_cli export-private-key`
|
|
386
386
|
|
|
@@ -402,7 +402,7 @@ EXAMPLES
|
|
|
402
402
|
$ pontus-x_cli export-private-key
|
|
403
403
|
```
|
|
404
404
|
|
|
405
|
-
_See code: [src/commands/export-private-key.ts](https://github.com/AgrospAI/pontus-x_cli/blob/v1.2.
|
|
405
|
+
_See code: [src/commands/export-private-key.ts](https://github.com/AgrospAI/pontus-x_cli/blob/v1.2.6/src/commands/export-private-key.ts)_
|
|
406
406
|
|
|
407
407
|
## `pontus-x_cli generate-asset-credentials DID`
|
|
408
408
|
|
|
@@ -428,7 +428,7 @@ EXAMPLES
|
|
|
428
428
|
$ pontus-x_cli generate-asset-credentials -p ./CEP.data.json -d ./did.json -c certificate.key did:op:01f8bc1e797a854dc718bd7a802acb07c5fc39f706b03dd454bceb66be6828c6
|
|
429
429
|
```
|
|
430
430
|
|
|
431
|
-
_See code: [src/commands/generate-asset-credentials.ts](https://github.com/AgrospAI/pontus-x_cli/blob/v1.2.
|
|
431
|
+
_See code: [src/commands/generate-asset-credentials.ts](https://github.com/AgrospAI/pontus-x_cli/blob/v1.2.6/src/commands/generate-asset-credentials.ts)_
|
|
432
432
|
|
|
433
433
|
## `pontus-x_cli generate-did-web`
|
|
434
434
|
|
|
@@ -449,7 +449,7 @@ EXAMPLES
|
|
|
449
449
|
$ pontus-x_cli generate-did-web -d <https://compliance.agrospai.udl.cat> -c certificate-chain.crt
|
|
450
450
|
```
|
|
451
451
|
|
|
452
|
-
_See code: [src/commands/generate-did-web.ts](https://github.com/AgrospAI/pontus-x_cli/blob/v1.2.
|
|
452
|
+
_See code: [src/commands/generate-did-web.ts](https://github.com/AgrospAI/pontus-x_cli/blob/v1.2.6/src/commands/generate-did-web.ts)_
|
|
453
453
|
|
|
454
454
|
## `pontus-x_cli generate-participant-credentials`
|
|
455
455
|
|
|
@@ -472,7 +472,7 @@ EXAMPLES
|
|
|
472
472
|
$ pontus-x_cli generate-participant-credentials -p ./CEP.data.json -d ./did.json -c certificate.key
|
|
473
473
|
```
|
|
474
474
|
|
|
475
|
-
_See code: [src/commands/generate-participant-credentials.ts](https://github.com/AgrospAI/pontus-x_cli/blob/v1.2.
|
|
475
|
+
_See code: [src/commands/generate-participant-credentials.ts](https://github.com/AgrospAI/pontus-x_cli/blob/v1.2.6/src/commands/generate-participant-credentials.ts)_
|
|
476
476
|
|
|
477
477
|
## `pontus-x_cli get DID`
|
|
478
478
|
|
|
@@ -492,7 +492,7 @@ EXAMPLES
|
|
|
492
492
|
$ pontus-x_cli get did:op:ffeee8c8f19328985ef6743b08e61ef89d5141027fd47612e32e7900cacd2b7a
|
|
493
493
|
```
|
|
494
494
|
|
|
495
|
-
_See code: [src/commands/get.ts](https://github.com/AgrospAI/pontus-x_cli/blob/v1.2.
|
|
495
|
+
_See code: [src/commands/get.ts](https://github.com/AgrospAI/pontus-x_cli/blob/v1.2.6/src/commands/get.ts)_
|
|
496
496
|
|
|
497
497
|
## `pontus-x_cli help [COMMAND]`
|
|
498
498
|
|
|
@@ -535,7 +535,7 @@ EXAMPLES
|
|
|
535
535
|
$ pontus-x_cli login d999baae98ac5246568fd726be8832c49626867d.json
|
|
536
536
|
```
|
|
537
537
|
|
|
538
|
-
_See code: [src/commands/login.ts](https://github.com/AgrospAI/pontus-x_cli/blob/v1.2.
|
|
538
|
+
_See code: [src/commands/login.ts](https://github.com/AgrospAI/pontus-x_cli/blob/v1.2.6/src/commands/login.ts)_
|
|
539
539
|
|
|
540
540
|
## `pontus-x_cli logout`
|
|
541
541
|
|
|
@@ -552,7 +552,7 @@ EXAMPLES
|
|
|
552
552
|
$ pontus-x_cli logout
|
|
553
553
|
```
|
|
554
554
|
|
|
555
|
-
_See code: [src/commands/logout.ts](https://github.com/AgrospAI/pontus-x_cli/blob/v1.2.
|
|
555
|
+
_See code: [src/commands/logout.ts](https://github.com/AgrospAI/pontus-x_cli/blob/v1.2.6/src/commands/logout.ts)_
|
|
556
556
|
|
|
557
557
|
## `pontus-x_cli publish PATH`
|
|
558
558
|
|
|
@@ -584,7 +584,7 @@ EXAMPLES
|
|
|
584
584
|
$ pontus-x_cli publish samples/publish/algo/index.ts
|
|
585
585
|
```
|
|
586
586
|
|
|
587
|
-
_See code: [src/commands/publish.ts](https://github.com/AgrospAI/pontus-x_cli/blob/v1.2.
|
|
587
|
+
_See code: [src/commands/publish.ts](https://github.com/AgrospAI/pontus-x_cli/blob/v1.2.6/src/commands/publish.ts)_
|
|
588
588
|
|
|
589
589
|
## `pontus-x_cli render [DID]`
|
|
590
590
|
|
|
@@ -601,7 +601,7 @@ FLAGS
|
|
|
601
601
|
-t, --tags=<value>... Tags to filter datasets (they must have all the provided tags)
|
|
602
602
|
```
|
|
603
603
|
|
|
604
|
-
_See code: [src/commands/render.ts](https://github.com/AgrospAI/pontus-x_cli/blob/v1.2.
|
|
604
|
+
_See code: [src/commands/render.ts](https://github.com/AgrospAI/pontus-x_cli/blob/v1.2.6/src/commands/render.ts)_
|
|
605
605
|
|
|
606
606
|
## `pontus-x_cli revoke`
|
|
607
607
|
|
|
@@ -625,7 +625,7 @@ EXAMPLES
|
|
|
625
625
|
$ pontus-x_cli revoke -d did:op:ffeee8c8f19328985ef6743b08e61ef89d5141027fd47612e32e7900cacd2b7a did:op:abcee8c8f19328985ef6743b08e61ef89d5141027fd47612e32e7900cacd2b7b
|
|
626
626
|
```
|
|
627
627
|
|
|
628
|
-
_See code: [src/commands/revoke.ts](https://github.com/AgrospAI/pontus-x_cli/blob/v1.2.
|
|
628
|
+
_See code: [src/commands/revoke.ts](https://github.com/AgrospAI/pontus-x_cli/blob/v1.2.6/src/commands/revoke.ts)_
|
|
629
629
|
|
|
630
630
|
## `pontus-x_cli self-description DID SDURL`
|
|
631
631
|
|
|
@@ -649,7 +649,7 @@ EXAMPLES
|
|
|
649
649
|
$ pontus-x_cli self-description did:op:d22954f2cbf6a85c897ce605c275cc786e099592cc59e3b7dd66b93e784bed8c https://example.com/self-description.json
|
|
650
650
|
```
|
|
651
651
|
|
|
652
|
-
_See code: [src/commands/self-description.ts](https://github.com/AgrospAI/pontus-x_cli/blob/v1.2.
|
|
652
|
+
_See code: [src/commands/self-description.ts](https://github.com/AgrospAI/pontus-x_cli/blob/v1.2.6/src/commands/self-description.ts)_
|
|
653
653
|
<!-- commandsstop -->
|
|
654
654
|
|
|
655
655
|
# Useful information
|
package/dist/lib/spec.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { Manifest } from
|
|
2
|
-
import type PublishConfig from
|
|
3
|
-
import type { Connection } from
|
|
1
|
+
import type { Manifest } from '../types/manifest';
|
|
2
|
+
import type PublishConfig from '@/types/publish';
|
|
3
|
+
import type { Connection } from '../utils/connection';
|
|
4
4
|
export declare function getFilesFromPaths(paths: string[], preference?: string[]): string[];
|
|
5
5
|
export declare function getEnvironmentConfig(file: string, config: PublishConfig, manifest: Manifest): Promise<{
|
|
6
6
|
network: string;
|
package/dist/lib/spec.js
CHANGED
|
@@ -41,21 +41,21 @@ exports.getEnvironmentConfig = getEnvironmentConfig;
|
|
|
41
41
|
exports.parseConfig = parseConfig;
|
|
42
42
|
exports.writeConfig = writeConfig;
|
|
43
43
|
exports.publishFromFile = publishFromFile;
|
|
44
|
-
const node_fs_1 = require("node:fs");
|
|
45
|
-
const node_path_1 = __importStar(require("node:path"));
|
|
46
44
|
const nautilus_1 = require("@deltadao/nautilus");
|
|
47
45
|
const ajv_1 = __importDefault(require("ajv"));
|
|
48
46
|
const ethers_1 = require("ethers");
|
|
47
|
+
const node_fs_1 = require("node:fs");
|
|
48
|
+
const node_path_1 = __importStar(require("node:path"));
|
|
49
49
|
const yaml_1 = require("yaml");
|
|
50
50
|
const manifest_1 = require("../lib/manifest");
|
|
51
51
|
const wallet_1 = require("../lib/wallet");
|
|
52
52
|
const schema_1 = __importDefault(require("../types/schema"));
|
|
53
|
-
function getFiles(rootPath, preference = [
|
|
53
|
+
function getFiles(rootPath, preference = ['spec.yaml', 'spec.json', 'index.ts']) {
|
|
54
54
|
const specifications = [];
|
|
55
55
|
const walkDir = (dir) => {
|
|
56
56
|
const entries = (0, node_fs_1.readdirSync)(dir, { withFileTypes: true });
|
|
57
57
|
// Find the first preferred file that exists in this directory
|
|
58
|
-
const preferredFile = preference.find(
|
|
58
|
+
const preferredFile = preference.find(pref => entries.some(entry => entry.isFile() && entry.name === pref));
|
|
59
59
|
if (preferredFile) {
|
|
60
60
|
specifications.push((0, node_path_1.join)(dir, preferredFile));
|
|
61
61
|
}
|
|
@@ -70,7 +70,7 @@ function getFiles(rootPath, preference = ["spec.yaml", "spec.json", "index.ts"])
|
|
|
70
70
|
return specifications;
|
|
71
71
|
}
|
|
72
72
|
function getFilesFromPaths(paths, preference) {
|
|
73
|
-
return paths.flatMap(
|
|
73
|
+
return paths.flatMap(path => getFiles(path, preference));
|
|
74
74
|
}
|
|
75
75
|
async function getEnvironmentConfig(file, config, manifest) {
|
|
76
76
|
const network = config.metadata.network || process.env.NETWORK;
|
|
@@ -89,13 +89,13 @@ async function getEnvironmentConfig(file, config, manifest) {
|
|
|
89
89
|
}
|
|
90
90
|
if (owner && !privateKey) {
|
|
91
91
|
const account = (0, manifest_1.getAccountByAddress)(manifest, owner);
|
|
92
|
-
const password = process.env[(account === null || account === void 0 ? void 0 : account.passwordEnvKey) ||
|
|
92
|
+
const password = process.env[(account === null || account === void 0 ? void 0 : account.passwordEnvKey) || ''] || '';
|
|
93
93
|
try {
|
|
94
|
-
privateKey = await (0, wallet_1.readPrivateKey)((account === null || account === void 0 ? void 0 : account.privateKeyPath) ||
|
|
94
|
+
privateKey = await (0, wallet_1.readPrivateKey)((account === null || account === void 0 ? void 0 : account.privateKeyPath) || '', password);
|
|
95
95
|
}
|
|
96
96
|
catch (error) {
|
|
97
97
|
console.error(`Failed to retrieve private key for owner ${owner}:`, error);
|
|
98
|
-
console.error(
|
|
98
|
+
console.error('Password used:', password);
|
|
99
99
|
return null;
|
|
100
100
|
}
|
|
101
101
|
}
|
|
@@ -106,12 +106,12 @@ async function getEnvironmentConfig(file, config, manifest) {
|
|
|
106
106
|
return { network, owner, privateKey };
|
|
107
107
|
}
|
|
108
108
|
function parseConfig(filePath) {
|
|
109
|
-
const raw = (0, node_fs_1.readFileSync)(filePath,
|
|
109
|
+
const raw = (0, node_fs_1.readFileSync)(filePath, 'utf8');
|
|
110
110
|
const ext = node_path_1.default.extname(filePath).toLowerCase();
|
|
111
|
-
if (ext ===
|
|
111
|
+
if (ext === '.json') {
|
|
112
112
|
return JSON.parse(raw);
|
|
113
113
|
}
|
|
114
|
-
if (ext ===
|
|
114
|
+
if (ext === '.yaml') {
|
|
115
115
|
return (0, yaml_1.parse)(raw);
|
|
116
116
|
}
|
|
117
117
|
throw new Error(`Unsupported file extension: ${ext}`);
|
|
@@ -119,21 +119,21 @@ function parseConfig(filePath) {
|
|
|
119
119
|
function writeConfig(config, filePath) {
|
|
120
120
|
const ext = node_path_1.default.extname(filePath).toLowerCase();
|
|
121
121
|
let content;
|
|
122
|
-
if (ext ===
|
|
122
|
+
if (ext === '.json') {
|
|
123
123
|
content = JSON.stringify(config, null, 2);
|
|
124
124
|
}
|
|
125
|
-
else if (ext ===
|
|
125
|
+
else if (ext === '.yaml') {
|
|
126
126
|
content = (0, yaml_1.stringify)(config);
|
|
127
127
|
}
|
|
128
128
|
else {
|
|
129
129
|
throw new Error(`Unsupported file extension: ${ext}`);
|
|
130
130
|
}
|
|
131
|
-
(0, node_fs_1.writeFileSync)(filePath, content,
|
|
131
|
+
(0, node_fs_1.writeFileSync)(filePath, content, 'utf8');
|
|
132
132
|
}
|
|
133
133
|
function getPricing(connection, type, currency, amount) {
|
|
134
134
|
var _a;
|
|
135
|
-
if (type ===
|
|
136
|
-
return { type:
|
|
135
|
+
if (type === 'free' || !amount) {
|
|
136
|
+
return { type: 'free' };
|
|
137
137
|
}
|
|
138
138
|
const pricingMap = {
|
|
139
139
|
EURAU: connection.pricingConfig.fixedRateEURAU,
|
|
@@ -149,7 +149,7 @@ async function publishFromFile(filePath, providerUrl, connection, dryRun) {
|
|
|
149
149
|
const validate = ajv.compile(schema_1.default);
|
|
150
150
|
const valid = validate(config);
|
|
151
151
|
if (!valid) {
|
|
152
|
-
console.error(
|
|
152
|
+
console.error('❌ Invalid publish config file:');
|
|
153
153
|
console.error(validate.errors);
|
|
154
154
|
throw new Error(`Publish config validation failed for file ${filePath}`);
|
|
155
155
|
}
|
|
@@ -158,7 +158,7 @@ async function publishFromFile(filePath, providerUrl, connection, dryRun) {
|
|
|
158
158
|
.setType(config.metadata.type)
|
|
159
159
|
.setName(config.metadata.name)
|
|
160
160
|
.setOwner(connection.wallet.address)
|
|
161
|
-
.setDescription((0, node_fs_1.readFileSync)(node_path_1.default.resolve(folder, config.metadata.description),
|
|
161
|
+
.setDescription((0, node_fs_1.readFileSync)(node_path_1.default.resolve(folder, config.metadata.description), 'utf8'))
|
|
162
162
|
.setLicense(config.metadata.license)
|
|
163
163
|
.setNftData(config.nftData);
|
|
164
164
|
if (config.metadata.author) {
|
|
@@ -181,7 +181,7 @@ async function publishFromFile(filePath, providerUrl, connection, dryRun) {
|
|
|
181
181
|
if (config.metadata.additionalInformation) {
|
|
182
182
|
assetBuilder.addAdditionalInformation(config.metadata.additionalInformation);
|
|
183
183
|
}
|
|
184
|
-
if (config.metadata.type ===
|
|
184
|
+
if (config.metadata.type === 'algorithm' && config.metadata.algorithm) {
|
|
185
185
|
const consumerParameters = [];
|
|
186
186
|
for (const param of config.metadata.algorithm.consumerParameters || []) {
|
|
187
187
|
const consumerParameter = new nautilus_1.ConsumerParameterBuilder()
|
|
@@ -190,21 +190,15 @@ async function publishFromFile(filePath, providerUrl, connection, dryRun) {
|
|
|
190
190
|
.setLabel(param.label)
|
|
191
191
|
.setDescription(param.description)
|
|
192
192
|
.setRequired(param.required)
|
|
193
|
-
.setDefault(typeof param.default ===
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
193
|
+
.setDefault(typeof param.default === 'object' ? JSON.stringify(param.default) : param.default);
|
|
194
|
+
if (Array.isArray(param.options)) {
|
|
195
|
+
for (const { key, value } of param.options) {
|
|
196
|
+
consumerParameter.addOption({ [key]: value });
|
|
197
|
+
}
|
|
198
198
|
}
|
|
199
199
|
consumerParameters.push(consumerParameter.build());
|
|
200
200
|
}
|
|
201
|
-
|
|
202
|
-
container: config.metadata.algorithm.container,
|
|
203
|
-
language: config.metadata.algorithm.language,
|
|
204
|
-
version: config.metadata.algorithm.version,
|
|
205
|
-
};
|
|
206
|
-
assetBuilder.setAlgorithm(consumerParameters.length > 0
|
|
207
|
-
? Object.assign(Object.assign({}, algorithm), { consumerParameters }) : algorithm);
|
|
201
|
+
assetBuilder.setAlgorithm(Object.assign({ container: Object.assign(Object.assign({}, config.metadata.algorithm.container), { consumerParameters: undefined }), language: config.metadata.algorithm.language, version: config.metadata.algorithm.version }, (consumerParameters.length > 0 && { consumerParameters })));
|
|
208
202
|
}
|
|
209
203
|
const serviceBuilder = new nautilus_1.ServiceBuilder({
|
|
210
204
|
fileType: config.service.fileType,
|
|
@@ -215,9 +209,7 @@ async function publishFromFile(filePath, providerUrl, connection, dryRun) {
|
|
|
215
209
|
}
|
|
216
210
|
for (const param of config.service.consumerParameters || []) {
|
|
217
211
|
// Stringify param.default if it's an object
|
|
218
|
-
const defaultValue = typeof param.default ===
|
|
219
|
-
? JSON.stringify(param.default)
|
|
220
|
-
: param.default;
|
|
212
|
+
const defaultValue = typeof param.default === 'object' ? JSON.stringify(param.default) : param.default;
|
|
221
213
|
const consumerParam = new nautilus_1.ConsumerParameterBuilder()
|
|
222
214
|
.setType(param.type)
|
|
223
215
|
.setName(param.name)
|
|
@@ -231,8 +223,7 @@ async function publishFromFile(filePath, providerUrl, connection, dryRun) {
|
|
|
231
223
|
if (config.trustedAlgorithms) {
|
|
232
224
|
serviceBuilder.addTrustedAlgorithms(config.trustedAlgorithms);
|
|
233
225
|
}
|
|
234
|
-
for (const trustedAlgorithmPublisher of config.trustedAlgorithmPublishers ||
|
|
235
|
-
[]) {
|
|
226
|
+
for (const trustedAlgorithmPublisher of config.trustedAlgorithmPublishers || []) {
|
|
236
227
|
serviceBuilder.addTrustedAlgorithmPublisher(trustedAlgorithmPublisher);
|
|
237
228
|
}
|
|
238
229
|
if (config.trustOwnerAlgorithms) {
|
|
@@ -251,16 +242,16 @@ async function publishFromFile(filePath, providerUrl, connection, dryRun) {
|
|
|
251
242
|
const asset = assetBuilder.build();
|
|
252
243
|
console.log(`\n✅ Asset metadata:\n${JSON.stringify(asset, null, 2)}\n`);
|
|
253
244
|
if (dryRun) {
|
|
254
|
-
console.log(
|
|
245
|
+
console.log('⚠️ Dry run enabled. Asset not published.\n');
|
|
255
246
|
return;
|
|
256
247
|
}
|
|
257
248
|
console.log(`🚀 Publishing asset...`);
|
|
258
249
|
const result = await connection.nautilus.publish(asset);
|
|
259
250
|
console.log([
|
|
260
|
-
|
|
251
|
+
'✅ Asset published.',
|
|
261
252
|
`🔗 Transaction: ${connection.networkConfig.explorerUri}/tx/${result.setMetadataTxReceipt.transactionHash}`,
|
|
262
253
|
`🌐 Asset: https://portal.agrospai.udl.cat/asset/${result.ddo.id}`,
|
|
263
|
-
].join(
|
|
254
|
+
].join('\n'));
|
|
264
255
|
return asset.ddo.id;
|
|
265
256
|
}
|
|
266
257
|
//# sourceMappingURL=spec.js.map
|
package/dist/lib/spec.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spec.js","sourceRoot":"","sources":["../../src/lib/spec.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"spec.js","sourceRoot":"","sources":["../../src/lib/spec.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6CA,8CAEC;AAED,oDA2CC;AAED,kCAaC;AAED,kCAaC;AAuBD,0CA+JC;AAhTD,iDAM2B;AAC3B,8CAAqB;AACrB,mCAA+B;AAC/B,qCAAkE;AAClE,uDAAsC;AACtC,+BAAuC;AAEvC,6CAAoD;AACpD,yCAA6C;AAG7C,4DAAmC;AAGnC,SAAS,QAAQ,CAAC,QAAgB,EAAE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C,CAAA;IAErC,MAAM,MAAM,GAAG,MAAM,UAAU,CAAC,QAAQ,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;IACvD,OAAO,CAAC,GAAG,CACT;QACE,oBAAoB;QACpB,mBAAmB,UAAU,CAAC,aAAa,CAAC,WAAW,OAAO,MAAM,CAAC,oBAAoB,CAAC,eAAe,EAAE;QAC3G,mDAAmD,MAAM,CAAC,GAAG,CAAC,EAAE,EAAE;KACnE,CAAC,IAAI,CAAC,IAAI,CAAC,CACb,CAAA;IAED,OAAO,KAAK,CAAC,GAAG,CAAC,EAAE,CAAA;AACrB,CAAC"}
|
|
@@ -7,46 +7,30 @@
|
|
|
7
7
|
"items": {
|
|
8
8
|
"type": "object",
|
|
9
9
|
"properties": {
|
|
10
|
-
"name": {
|
|
11
|
-
"type": "string"
|
|
12
|
-
},
|
|
13
10
|
"address": {
|
|
14
11
|
"type": "string"
|
|
15
12
|
},
|
|
16
|
-
"
|
|
13
|
+
"name": {
|
|
17
14
|
"type": "string"
|
|
18
15
|
},
|
|
19
16
|
"passwordEnvKey": {
|
|
20
17
|
"type": "string"
|
|
21
18
|
},
|
|
22
|
-
"
|
|
23
|
-
"type": "
|
|
24
|
-
"items": {
|
|
25
|
-
"type": "object",
|
|
26
|
-
"properties": {
|
|
27
|
-
"name": {
|
|
28
|
-
"type": "string"
|
|
29
|
-
},
|
|
30
|
-
"key": {
|
|
31
|
-
"type": "string"
|
|
32
|
-
},
|
|
33
|
-
"spec": {
|
|
34
|
-
"type": "string"
|
|
35
|
-
},
|
|
36
|
-
"did": {
|
|
37
|
-
"type": "string"
|
|
38
|
-
}
|
|
39
|
-
},
|
|
40
|
-
"required": ["spec"],
|
|
41
|
-
"additionalProperties": false
|
|
42
|
-
}
|
|
19
|
+
"privateKeyPath": {
|
|
20
|
+
"type": "string"
|
|
43
21
|
}
|
|
44
22
|
},
|
|
45
|
-
"required": [
|
|
23
|
+
"required": [
|
|
24
|
+
"address",
|
|
25
|
+
"passwordEnvKey",
|
|
26
|
+
"privateKeyPath"
|
|
27
|
+
],
|
|
46
28
|
"additionalProperties": false
|
|
47
29
|
}
|
|
48
30
|
}
|
|
49
31
|
},
|
|
50
|
-
"required": [
|
|
32
|
+
"required": [
|
|
33
|
+
"accounts"
|
|
34
|
+
],
|
|
51
35
|
"additionalProperties": false
|
|
52
36
|
}
|
package/dist/types/schema.json
CHANGED
|
@@ -2,95 +2,36 @@
|
|
|
2
2
|
"$ref": "#/definitions/PublishConfig",
|
|
3
3
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
4
4
|
"definitions": {
|
|
5
|
-
"ConsumerParameter": {
|
|
6
|
-
"additionalProperties": false,
|
|
7
|
-
"properties": {
|
|
8
|
-
"default": {
|
|
9
|
-
"description": "Field default value. For select types, string key of default option.",
|
|
10
|
-
"type": "string"
|
|
11
|
-
},
|
|
12
|
-
"description": {
|
|
13
|
-
"description": "Field description.",
|
|
14
|
-
"type": "string"
|
|
15
|
-
},
|
|
16
|
-
"label": {
|
|
17
|
-
"description": "Displayed field label.",
|
|
18
|
-
"type": "string"
|
|
19
|
-
},
|
|
20
|
-
"name": {
|
|
21
|
-
"description": "Parameter name.",
|
|
22
|
-
"type": "string"
|
|
23
|
-
},
|
|
24
|
-
"options": {
|
|
25
|
-
"description": "For select types, a list of options.",
|
|
26
|
-
"type": "string"
|
|
27
|
-
},
|
|
28
|
-
"required": {
|
|
29
|
-
"description": "Defines if customer input for this field is mandatory.",
|
|
30
|
-
"type": "boolean"
|
|
31
|
-
},
|
|
32
|
-
"type": {
|
|
33
|
-
"description": "Field type.",
|
|
34
|
-
"enum": ["text", "number", "boolean", "select"],
|
|
35
|
-
"type": "string"
|
|
36
|
-
}
|
|
37
|
-
},
|
|
38
|
-
"required": [
|
|
39
|
-
"name",
|
|
40
|
-
"type",
|
|
41
|
-
"label",
|
|
42
|
-
"required",
|
|
43
|
-
"description",
|
|
44
|
-
"default"
|
|
45
|
-
],
|
|
46
|
-
"type": "object"
|
|
47
|
-
},
|
|
48
5
|
"ExtendedConsumerParameter": {
|
|
49
6
|
"additionalProperties": false,
|
|
50
7
|
"properties": {
|
|
51
8
|
"default": {
|
|
52
|
-
"description": "Field default value. For select types, string key of default option.",
|
|
53
9
|
"type": "string"
|
|
54
10
|
},
|
|
55
11
|
"description": {
|
|
56
|
-
"description": "Field description.",
|
|
57
12
|
"type": "string"
|
|
58
13
|
},
|
|
59
14
|
"label": {
|
|
60
|
-
"description": "Displayed field label.",
|
|
61
15
|
"type": "string"
|
|
62
16
|
},
|
|
63
17
|
"name": {
|
|
64
|
-
"description": "Parameter name.",
|
|
65
18
|
"type": "string"
|
|
66
19
|
},
|
|
67
20
|
"options": {
|
|
68
21
|
"items": {
|
|
69
|
-
"
|
|
70
|
-
"type": "string"
|
|
71
|
-
},
|
|
72
|
-
"type": "object"
|
|
22
|
+
"$ref": "#/definitions/Options"
|
|
73
23
|
},
|
|
74
24
|
"type": "array"
|
|
75
25
|
},
|
|
76
26
|
"required": {
|
|
77
|
-
"description": "Defines if customer input for this field is mandatory.",
|
|
78
27
|
"type": "boolean"
|
|
79
28
|
},
|
|
80
29
|
"type": {
|
|
81
|
-
"description": "Field type.",
|
|
82
30
|
"enum": ["text", "number", "boolean", "select"],
|
|
83
31
|
"type": "string"
|
|
84
32
|
}
|
|
85
33
|
},
|
|
86
|
-
"required": [
|
|
87
|
-
"default",
|
|
88
|
-
"description",
|
|
89
|
-
"label",
|
|
90
|
-
"name",
|
|
91
|
-
"required",
|
|
92
|
-
"type"
|
|
93
|
-
],
|
|
34
|
+
"required": ["name", "type", "label", "required", "description", "default"],
|
|
94
35
|
"type": "object"
|
|
95
36
|
},
|
|
96
37
|
"FileTypes": {
|
|
@@ -107,24 +48,21 @@
|
|
|
107
48
|
"additionalProperties": false,
|
|
108
49
|
"properties": {
|
|
109
50
|
"consumerParameters": {
|
|
110
|
-
"description": "Array of objects describing the consumer parameters",
|
|
111
51
|
"items": {
|
|
112
|
-
"$ref": "#/definitions/
|
|
52
|
+
"$ref": "#/definitions/ExtendedConsumerParameter"
|
|
113
53
|
},
|
|
114
54
|
"type": "array"
|
|
115
55
|
},
|
|
116
56
|
"container": {
|
|
117
57
|
"additionalProperties": false,
|
|
118
|
-
"description": "Object describing the Docker container image.",
|
|
119
58
|
"properties": {
|
|
120
59
|
"checksum": {
|
|
121
60
|
"description": "Checksum of the Docker image.",
|
|
122
61
|
"type": "string"
|
|
123
62
|
},
|
|
124
63
|
"consumerParameters": {
|
|
125
|
-
"description": "Array of objects describing the consumer parameters",
|
|
126
64
|
"items": {
|
|
127
|
-
"$ref": "#/definitions/
|
|
65
|
+
"$ref": "#/definitions/ExtendedConsumerParameter"
|
|
128
66
|
},
|
|
129
67
|
"type": "array"
|
|
130
68
|
},
|
|
@@ -141,7 +79,7 @@
|
|
|
141
79
|
"type": "string"
|
|
142
80
|
}
|
|
143
81
|
},
|
|
144
|
-
"required": ["
|
|
82
|
+
"required": ["checksum", "entrypoint", "image", "tag"],
|
|
145
83
|
"type": "object"
|
|
146
84
|
},
|
|
147
85
|
"language": {
|
|
@@ -241,13 +179,20 @@
|
|
|
241
179
|
"type": "boolean"
|
|
242
180
|
}
|
|
243
181
|
},
|
|
244
|
-
"required": [
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
182
|
+
"required": ["name", "symbol", "templateIndex", "tokenURI", "transferable"],
|
|
183
|
+
"type": "object"
|
|
184
|
+
},
|
|
185
|
+
"Options": {
|
|
186
|
+
"additionalProperties": false,
|
|
187
|
+
"properties": {
|
|
188
|
+
"key": {
|
|
189
|
+
"type": "string"
|
|
190
|
+
},
|
|
191
|
+
"value": {
|
|
192
|
+
"type": "string"
|
|
193
|
+
}
|
|
194
|
+
},
|
|
195
|
+
"required": ["key", "value"],
|
|
251
196
|
"type": "object"
|
|
252
197
|
},
|
|
253
198
|
"PublishConfig": {
|
|
@@ -318,11 +263,11 @@
|
|
|
318
263
|
"type": "number"
|
|
319
264
|
},
|
|
320
265
|
"currency": {
|
|
321
|
-
"enum": ["
|
|
266
|
+
"enum": ["EURAU", "EUROe", "OCEAN"],
|
|
322
267
|
"type": "string"
|
|
323
268
|
},
|
|
324
269
|
"type": {
|
|
325
|
-
"enum": ["
|
|
270
|
+
"enum": ["fixed", "free"],
|
|
326
271
|
"type": "string"
|
|
327
272
|
}
|
|
328
273
|
},
|
|
@@ -339,15 +284,7 @@
|
|
|
339
284
|
"type": "number"
|
|
340
285
|
}
|
|
341
286
|
},
|
|
342
|
-
"required": [
|
|
343
|
-
"serviceType",
|
|
344
|
-
"fileType",
|
|
345
|
-
"serviceEndpoint",
|
|
346
|
-
"timeout",
|
|
347
|
-
"files",
|
|
348
|
-
"pricing",
|
|
349
|
-
"datatoken"
|
|
350
|
-
],
|
|
287
|
+
"required": ["datatoken", "files", "fileType", "pricing", "serviceEndpoint", "serviceType", "timeout"],
|
|
351
288
|
"type": "object"
|
|
352
289
|
},
|
|
353
290
|
"trustOwnerAlgorithms": {
|
package/oclif.manifest.json
CHANGED