@twin.org/identity-cli 0.0.1-next.3 → 0.0.1-next.4

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.
@@ -1072,15 +1072,18 @@ class CLI extends cliCore.CLIBase {
1072
1072
  * Run the app.
1073
1073
  * @param argv The process arguments.
1074
1074
  * @param localesDirectory The directory for the locales, default to relative to the script.
1075
+ * @param options Additional options for the CLI.
1076
+ * @param options.overrideOutputWidth The override output width.
1075
1077
  * @returns The exit code.
1076
1078
  */
1077
- async run(argv, localesDirectory) {
1079
+ async run(argv, localesDirectory, options) {
1078
1080
  return this.execute({
1079
1081
  title: "TWIN Identity",
1080
1082
  appName: "twin-identity",
1081
1083
  version: "0.0.3-next.18",
1082
1084
  icon: "🌍",
1083
- supportsEnvFiles: true
1085
+ supportsEnvFiles: true,
1086
+ overrideOutputWidth: options?.overrideOutputWidth
1084
1087
  }, localesDirectory ?? path.join(path.dirname(node_url.fileURLToPath((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.src || new URL('index.cjs', document.baseURI).href)))), "../locales"), argv);
1085
1088
  }
1086
1089
  /**
@@ -1069,15 +1069,18 @@ class CLI extends CLIBase {
1069
1069
  * Run the app.
1070
1070
  * @param argv The process arguments.
1071
1071
  * @param localesDirectory The directory for the locales, default to relative to the script.
1072
+ * @param options Additional options for the CLI.
1073
+ * @param options.overrideOutputWidth The override output width.
1072
1074
  * @returns The exit code.
1073
1075
  */
1074
- async run(argv, localesDirectory) {
1076
+ async run(argv, localesDirectory, options) {
1075
1077
  return this.execute({
1076
1078
  title: "TWIN Identity",
1077
1079
  appName: "twin-identity",
1078
1080
  version: "0.0.3-next.18",
1079
1081
  icon: "🌍",
1080
- supportsEnvFiles: true
1082
+ supportsEnvFiles: true,
1083
+ overrideOutputWidth: options?.overrideOutputWidth
1081
1084
  }, localesDirectory ?? path.join(path.dirname(fileURLToPath(import.meta.url)), "../locales"), argv);
1082
1085
  }
1083
1086
  /**
@@ -586,6 +586,10 @@
586
586
  "env": {
587
587
  "param": "--env '<'filename'>'",
588
588
  "description": "Creates an env file containing the mnemonic and seed."
589
+ },
590
+ "env-prefix": {
591
+ "param": "--env-prefix '<'prefix'>'",
592
+ "description": "Prefixes the env variables with the value."
589
593
  }
590
594
  },
591
595
  "progress": {
@@ -594,7 +598,8 @@
594
598
  },
595
599
  "labels": {
596
600
  "mnemonic": "Mnemonic",
597
- "seed": "Seed"
601
+ "seed": "Seed",
602
+ "envPrefix": "Env Prefix"
598
603
  }
599
604
  },
600
605
  "address": {
@@ -777,8 +782,9 @@
777
782
  "errorMessages": {
778
783
  "fetch": "Fetch"
779
784
  },
780
- "jsonLdHelper": {
785
+ "jsonLdProcessor": {
781
786
  "compact": "The JSON-LD compaction failed",
782
- "expand": "The JSON-LD expansion failed"
787
+ "expand": "The JSON-LD expansion failed",
788
+ "invalidUrl": "The JSON-LD processing failed to retrieve from the following url \"{url}\""
783
789
  }
784
790
  }
@@ -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 The override output width.
10
12
  * @returns The exit code.
11
13
  */
12
- run(argv: string[], localesDirectory?: string): Promise<number>;
14
+ run(argv: string[], localesDirectory?: string, options?: {
15
+ overrideOutputWidth?: number;
16
+ }): Promise<number>;
13
17
  }
package/docs/changelog.md CHANGED
@@ -1,5 +1,5 @@
1
1
  # @twin.org/identity-cli - Changelog
2
2
 
3
- ## v0.0.1-next.3
3
+ ## v0.0.1-next.4
4
4
 
5
5
  - Initial Release
package/docs/examples.md CHANGED
@@ -1,17 +1,18 @@
1
1
  # @twin.org/identity-cli - Examples
2
2
 
3
- ## Command Line Tool
3
+ ## Running
4
4
 
5
- First install the tool with the following script.
5
+ To install and run the CLI locally use the following commands:
6
6
 
7
7
  ```shell
8
- npm install @twin.org/identity-cli
8
+ npm install @twin.org/identity-cli -g
9
+ twin-identity
9
10
  ```
10
11
 
11
- Running the tool with no commands will provide help for all the commands. By issuing the following command you should see the result.
12
+ or run directly using NPX:
12
13
 
13
14
  ```shell
14
- twin-identity
15
+ npx "@twin.org/identity-cli"
15
16
  ```
16
17
 
17
18
  Output
@@ -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
+ The override 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/identity-cli",
3
- "version": "0.0.1-next.3",
3
+ "version": "0.0.1-next.4",
4
4
  "description": "A command line interface for interacting with the identity connectors",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+https://github.com/twinfoundation/identity.git",
8
- "directory": "packages/identity-cli"
8
+ "directory": "apps/identity-cli"
9
9
  },
10
10
  "author": "martyn.janes@iota.org",
11
11
  "license": "Apache-2.0",
@@ -13,29 +13,16 @@
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
+ "@iota/sdk-wasm": "1.1.3",
18
+ "@twin.org/cli-core": "next",
31
19
  "@twin.org/core": "next",
32
20
  "@twin.org/crypto": "next",
33
- "@twin.org/cli-core": "next",
34
21
  "@twin.org/crypto-cli": "next",
35
22
  "@twin.org/entity": "next",
36
23
  "@twin.org/entity-storage-connector-memory": "next",
37
- "@twin.org/identity-models": "0.0.1-next.3",
38
- "@twin.org/identity-connector-iota": "0.0.1-next.3",
24
+ "@twin.org/identity-connector-iota": "0.0.1-next.4",
25
+ "@twin.org/identity-models": "0.0.1-next.4",
39
26
  "@twin.org/nameof": "next",
40
27
  "@twin.org/standards-w3c-did": "next",
41
28
  "@twin.org/vault-connector-entity-storage": "next",
@@ -43,24 +30,8 @@
43
30
  "@twin.org/wallet-cli": "next",
44
31
  "@twin.org/wallet-connector-iota": "next",
45
32
  "@twin.org/wallet-models": "next",
46
- "@iota/sdk-wasm": "1.1.3",
47
33
  "commander": "12.1.0"
48
34
  },
49
- "devDependencies": {
50
- "@twin.org/merge-locales": "next",
51
- "@twin.org/nameof-transformer": "next",
52
- "@types/node": "22.5.5",
53
- "@vitest/coverage-v8": "2.1.1",
54
- "copyfiles": "2.4.1",
55
- "rimraf": "6.0.1",
56
- "rollup": "4.22.0",
57
- "rollup-plugin-typescript2": "0.36.0",
58
- "ts-patch": "3.2.1",
59
- "typedoc": "0.26.7",
60
- "typedoc-plugin-markdown": "4.2.7",
61
- "typescript": "5.6.2",
62
- "vitest": "2.1.1"
63
- },
64
35
  "main": "./dist/cjs/index.cjs",
65
36
  "module": "./dist/esm/index.mjs",
66
37
  "types": "./dist/types/index.d.ts",