@twin.org/nft-cli 0.0.1-next.3 → 0.0.1-next.5
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/dist/cjs/index.cjs +7 -4
- package/dist/esm/index.mjs +6 -3
- package/dist/locales/en.json +6 -1
- package/dist/types/cli.d.ts +5 -1
- package/docs/changelog.md +1 -1
- package/docs/examples.md +7 -6
- package/docs/reference/classes/CLI.md +9 -1
- package/package.json +4 -33
package/dist/cjs/index.cjs
CHANGED
|
@@ -349,16 +349,19 @@ class CLI extends cliCore.CLIBase {
|
|
|
349
349
|
* Run the app.
|
|
350
350
|
* @param argv The process arguments.
|
|
351
351
|
* @param localesDirectory The directory for the locales, default to relative to the script.
|
|
352
|
+
* @param options Additional options for the CLI.
|
|
353
|
+
* @param options.overrideOutputWidth Override the output width.
|
|
352
354
|
* @returns The exit code.
|
|
353
355
|
*/
|
|
354
|
-
async run(argv, localesDirectory) {
|
|
356
|
+
async run(argv, localesDirectory, options) {
|
|
355
357
|
return this.execute({
|
|
356
358
|
title: "TWIN NFT",
|
|
357
359
|
appName: "twin-nft",
|
|
358
|
-
version: "0.0.1-next.
|
|
360
|
+
version: "0.0.1-next.5",
|
|
359
361
|
icon: "🌍",
|
|
360
|
-
supportsEnvFiles: true
|
|
361
|
-
|
|
362
|
+
supportsEnvFiles: true,
|
|
363
|
+
overrideOutputWidth: options?.overrideOutputWidth
|
|
364
|
+
}, localesDirectory ?? path.join(path.dirname(node_url.fileURLToPath((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index.cjs', document.baseURI).href)))), "../locales"), argv);
|
|
362
365
|
}
|
|
363
366
|
/**
|
|
364
367
|
* Get the commands for the CLI.
|
package/dist/esm/index.mjs
CHANGED
|
@@ -346,15 +346,18 @@ class CLI extends CLIBase {
|
|
|
346
346
|
* Run the app.
|
|
347
347
|
* @param argv The process arguments.
|
|
348
348
|
* @param localesDirectory The directory for the locales, default to relative to the script.
|
|
349
|
+
* @param options Additional options for the CLI.
|
|
350
|
+
* @param options.overrideOutputWidth Override the output width.
|
|
349
351
|
* @returns The exit code.
|
|
350
352
|
*/
|
|
351
|
-
async run(argv, localesDirectory) {
|
|
353
|
+
async run(argv, localesDirectory, options) {
|
|
352
354
|
return this.execute({
|
|
353
355
|
title: "TWIN NFT",
|
|
354
356
|
appName: "twin-nft",
|
|
355
|
-
version: "0.0.1-next.
|
|
357
|
+
version: "0.0.1-next.5",
|
|
356
358
|
icon: "🌍",
|
|
357
|
-
supportsEnvFiles: true
|
|
359
|
+
supportsEnvFiles: true,
|
|
360
|
+
overrideOutputWidth: options?.overrideOutputWidth
|
|
358
361
|
}, localesDirectory ?? path.join(path.dirname(fileURLToPath(import.meta.url)), "../locales"), argv);
|
|
359
362
|
}
|
|
360
363
|
/**
|
package/dist/locales/en.json
CHANGED
|
@@ -148,6 +148,10 @@
|
|
|
148
148
|
"env": {
|
|
149
149
|
"param": "--env '<'filename'>'",
|
|
150
150
|
"description": "Creates an env file containing the mnemonic and seed."
|
|
151
|
+
},
|
|
152
|
+
"env-prefix": {
|
|
153
|
+
"param": "--env-prefix '<'prefix'>'",
|
|
154
|
+
"description": "Prefixes the env variables with the value."
|
|
151
155
|
}
|
|
152
156
|
},
|
|
153
157
|
"progress": {
|
|
@@ -156,7 +160,8 @@
|
|
|
156
160
|
},
|
|
157
161
|
"labels": {
|
|
158
162
|
"mnemonic": "Mnemonic",
|
|
159
|
-
"seed": "Seed"
|
|
163
|
+
"seed": "Seed",
|
|
164
|
+
"envPrefix": "Env Prefix"
|
|
160
165
|
}
|
|
161
166
|
},
|
|
162
167
|
"address": {
|
package/dist/types/cli.d.ts
CHANGED
|
@@ -7,7 +7,11 @@ export declare class CLI extends CLIBase {
|
|
|
7
7
|
* Run the app.
|
|
8
8
|
* @param argv The process arguments.
|
|
9
9
|
* @param localesDirectory The directory for the locales, default to relative to the script.
|
|
10
|
+
* @param options Additional options for the CLI.
|
|
11
|
+
* @param options.overrideOutputWidth Override the output width.
|
|
10
12
|
* @returns The exit code.
|
|
11
13
|
*/
|
|
12
|
-
run(argv: string[], localesDirectory?: string
|
|
14
|
+
run(argv: string[], localesDirectory?: string, options?: {
|
|
15
|
+
overrideOutputWidth?: number;
|
|
16
|
+
}): Promise<number>;
|
|
13
17
|
}
|
package/docs/changelog.md
CHANGED
package/docs/examples.md
CHANGED
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
# @twin.org/nft-cli - Examples
|
|
2
2
|
|
|
3
|
-
##
|
|
3
|
+
## Running
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
To install and run the CLI locally use the following commands:
|
|
6
6
|
|
|
7
7
|
```shell
|
|
8
|
-
npm install @twin.org/nft-cli
|
|
8
|
+
npm install @twin.org/nft-cli -g
|
|
9
|
+
twin-nft
|
|
9
10
|
```
|
|
10
11
|
|
|
11
|
-
|
|
12
|
+
or run directly using NPX:
|
|
12
13
|
|
|
13
14
|
```shell
|
|
14
|
-
twin-
|
|
15
|
+
npx "@twin.org/nft-cli"
|
|
15
16
|
```
|
|
16
17
|
|
|
17
|
-
|
|
18
|
+
You should see output similar to the following:
|
|
18
19
|
|
|
19
20
|
```shell
|
|
20
21
|
🌍 TWIN NFT v1.0.0
|
|
@@ -24,7 +24,7 @@ The main entry point for the CLI.
|
|
|
24
24
|
|
|
25
25
|
### run()
|
|
26
26
|
|
|
27
|
-
> **run**(`argv`, `localesDirectory`?): `Promise`\<`number`\>
|
|
27
|
+
> **run**(`argv`, `localesDirectory`?, `options`?): `Promise`\<`number`\>
|
|
28
28
|
|
|
29
29
|
Run the app.
|
|
30
30
|
|
|
@@ -38,6 +38,14 @@ The process arguments.
|
|
|
38
38
|
|
|
39
39
|
The directory for the locales, default to relative to the script.
|
|
40
40
|
|
|
41
|
+
• **options?**
|
|
42
|
+
|
|
43
|
+
Additional options for the CLI.
|
|
44
|
+
|
|
45
|
+
• **options.overrideOutputWidth?**: `number`
|
|
46
|
+
|
|
47
|
+
Override the output width.
|
|
48
|
+
|
|
41
49
|
#### Returns
|
|
42
50
|
|
|
43
51
|
`Promise`\<`number`\>
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@twin.org/nft-cli",
|
|
3
|
-
"version": "0.0.1-next.
|
|
3
|
+
"version": "0.0.1-next.5",
|
|
4
4
|
"description": "A command line interface for interacting with the nft connectors",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "git+https://github.com/twinfoundation/nft.git",
|
|
8
|
-
"directory": "
|
|
8
|
+
"directory": "apps/nft-cli"
|
|
9
9
|
},
|
|
10
10
|
"author": "martyn.janes@iota.org",
|
|
11
11
|
"license": "Apache-2.0",
|
|
@@ -13,49 +13,20 @@
|
|
|
13
13
|
"engines": {
|
|
14
14
|
"node": ">=20.0.0"
|
|
15
15
|
},
|
|
16
|
-
"scripts": {
|
|
17
|
-
"clean": "rimraf dist coverage",
|
|
18
|
-
"build": "tspc",
|
|
19
|
-
"merge-locales": "merge-locales",
|
|
20
|
-
"test": "vitest --run --config ./vitest.config.ts --no-cache",
|
|
21
|
-
"coverage": "vitest --run --coverage --config ./vitest.config.ts --no-cache",
|
|
22
|
-
"bundle:esm": "rollup --config rollup.config.mjs --environment MODULE:esm",
|
|
23
|
-
"bundle:cjs": "rollup --config rollup.config.mjs --environment MODULE:cjs",
|
|
24
|
-
"bundle": "npm run bundle:esm && npm run bundle:cjs",
|
|
25
|
-
"docs:clean": "rimraf docs/reference",
|
|
26
|
-
"docs:generate": "typedoc",
|
|
27
|
-
"docs": "npm run docs:clean && npm run docs:generate",
|
|
28
|
-
"dist": "npm run clean && npm run build && npm run merge-locales && npm run test && npm run bundle && npm run docs"
|
|
29
|
-
},
|
|
30
16
|
"dependencies": {
|
|
17
|
+
"@twin.org/cli-core": "next",
|
|
31
18
|
"@twin.org/core": "next",
|
|
32
19
|
"@twin.org/crypto": "next",
|
|
33
|
-
"@twin.org/cli-core": "next",
|
|
34
20
|
"@twin.org/crypto-cli": "next",
|
|
35
21
|
"@twin.org/entity": "next",
|
|
36
22
|
"@twin.org/entity-storage-connector-memory": "next",
|
|
37
23
|
"@twin.org/nameof": "next",
|
|
38
|
-
"@twin.org/nft-connector-iota": "0.0.1-next.
|
|
24
|
+
"@twin.org/nft-connector-iota": "0.0.1-next.5",
|
|
39
25
|
"@twin.org/vault-connector-entity-storage": "next",
|
|
40
26
|
"@twin.org/vault-models": "next",
|
|
41
27
|
"@twin.org/wallet-cli": "next",
|
|
42
28
|
"commander": "12.1.0"
|
|
43
29
|
},
|
|
44
|
-
"devDependencies": {
|
|
45
|
-
"@twin.org/merge-locales": "next",
|
|
46
|
-
"@twin.org/nameof-transformer": "next",
|
|
47
|
-
"@types/node": "22.5.5",
|
|
48
|
-
"@vitest/coverage-v8": "2.1.1",
|
|
49
|
-
"copyfiles": "2.4.1",
|
|
50
|
-
"rimraf": "6.0.1",
|
|
51
|
-
"rollup": "4.22.0",
|
|
52
|
-
"rollup-plugin-typescript2": "0.36.0",
|
|
53
|
-
"ts-patch": "3.2.1",
|
|
54
|
-
"typedoc": "0.26.7",
|
|
55
|
-
"typedoc-plugin-markdown": "4.2.7",
|
|
56
|
-
"typescript": "5.6.2",
|
|
57
|
-
"vitest": "2.1.1"
|
|
58
|
-
},
|
|
59
30
|
"main": "./dist/cjs/index.cjs",
|
|
60
31
|
"module": "./dist/esm/index.mjs",
|
|
61
32
|
"types": "./dist/types/index.d.ts",
|