@twin.org/crypto-cli 0.0.3-next.9 → 0.0.3
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 +4 -4
- package/bin/index.js +0 -0
- package/dist/es/cli.js +2 -2
- package/dist/es/cli.js.map +1 -1
- package/dist/locales/en.json +11 -1
- package/docs/changelog.md +1012 -141
- package/docs/reference/classes/CLI.md +63 -1
- package/docs/{examples.md → usage.md} +7 -7
- package/package.json +9 -9
package/README.md
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
# TWIN Crypto CLI
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
This application is part of the framework workspace and provides command line interface for interacting with the crypto tools to support consistent development workflows across the ecosystem.
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
7
7
|
```shell
|
|
8
|
-
npm install @twin.org/crypto-cli
|
|
8
|
+
npm install -D @twin.org/crypto-cli
|
|
9
9
|
```
|
|
10
10
|
|
|
11
|
-
##
|
|
11
|
+
## Usage
|
|
12
12
|
|
|
13
|
-
Usage of the tool is shown in the examples [docs/
|
|
13
|
+
Usage of the tool is shown in the examples [docs/usage.md](docs/usage.md)
|
|
14
14
|
|
|
15
15
|
## Reference
|
|
16
16
|
|
package/bin/index.js
CHANGED
|
File without changes
|
package/dist/es/cli.js
CHANGED
|
@@ -21,8 +21,8 @@ export class CLI extends CLIBase {
|
|
|
21
21
|
return this.execute({
|
|
22
22
|
title: "TWIN Crypto",
|
|
23
23
|
appName: "twin-crypto",
|
|
24
|
-
version: "0.0.3
|
|
25
|
-
icon: "
|
|
24
|
+
version: "0.0.3", // x-release-please-version
|
|
25
|
+
icon: "🔒",
|
|
26
26
|
supportsEnvFiles: true,
|
|
27
27
|
overrideOutputWidth: options?.overrideOutputWidth,
|
|
28
28
|
showDevToolWarning: true
|
package/dist/es/cli.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../../src/cli.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAE7C,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAE9D;;GAEG;AACH,MAAM,OAAO,GAAI,SAAQ,OAAO;IAC/B;;;;;;;OAOG;IACI,KAAK,CAAC,GAAG,CACf,IAAc,EACd,gBAAyB,EACzB,OAA0C;QAE1C,OAAO,IAAI,CAAC,OAAO,CAClB;YACC,KAAK,EAAE,aAAa;YACpB,OAAO,EAAE,aAAa;YACtB,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../../src/cli.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAE7C,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAE9D;;GAEG;AACH,MAAM,OAAO,GAAI,SAAQ,OAAO;IAC/B;;;;;;;OAOG;IACI,KAAK,CAAC,GAAG,CACf,IAAc,EACd,gBAAyB,EACzB,OAA0C;QAE1C,OAAO,IAAI,CAAC,OAAO,CAClB;YACC,KAAK,EAAE,aAAa;YACpB,OAAO,EAAE,aAAa;YACtB,OAAO,EAAE,OAAO,EAAE,2BAA2B;YAC7C,IAAI,EAAE,IAAI;YACV,gBAAgB,EAAE,IAAI;YACtB,mBAAmB,EAAE,OAAO,EAAE,mBAAmB;YACjD,kBAAkB,EAAE,IAAI;SACxB,EACD,gBAAgB,IAAI,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,YAAY,CAAC,EACzF,IAAI,CACJ,CAAC;IACH,CAAC;IAED;;;;OAIG;IACO,WAAW,CAAC,OAAgB;QACrC,OAAO,CAAC,oBAAoB,EAAE,EAAE,mBAAmB,EAAE,CAAC,CAAC;IACxD,CAAC;CACD","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport path from \"node:path\";\nimport { fileURLToPath } from \"node:url\";\nimport { CLIBase } from \"@twin.org/cli-core\";\nimport type { Command } from \"commander\";\nimport { buildCommandAddress } from \"./commands/address.js\";\nimport { buildCommandMnemonic } from \"./commands/mnemonic.js\";\n\n/**\n * The main entry point for the CLI.\n */\nexport class CLI extends CLIBase {\n\t/**\n\t * Run the app.\n\t * @param argv The process arguments.\n\t * @param localesDirectory The directory for the locales, default to relative to the script.\n\t * @param options Additional options.\n\t * @param options.overrideOutputWidth Override the output width.\n\t * @returns The exit code.\n\t */\n\tpublic async run(\n\t\targv: string[],\n\t\tlocalesDirectory?: string,\n\t\toptions?: { overrideOutputWidth?: number }\n\t): Promise<number> {\n\t\treturn this.execute(\n\t\t\t{\n\t\t\t\ttitle: \"TWIN Crypto\",\n\t\t\t\tappName: \"twin-crypto\",\n\t\t\t\tversion: \"0.0.3\", // x-release-please-version\n\t\t\t\ticon: \"🔒\",\n\t\t\t\tsupportsEnvFiles: true,\n\t\t\t\toverrideOutputWidth: options?.overrideOutputWidth,\n\t\t\t\tshowDevToolWarning: true\n\t\t\t},\n\t\t\tlocalesDirectory ?? path.join(path.dirname(fileURLToPath(import.meta.url)), \"../locales\"),\n\t\t\targv\n\t\t);\n\t}\n\n\t/**\n\t * Get the commands for the CLI.\n\t * @param program The main program to add the commands to.\n\t * @internal\n\t */\n\tprotected getCommands(program: Command): Command[] {\n\t\treturn [buildCommandMnemonic(), buildCommandAddress()];\n\t}\n}\n"]}
|
package/dist/locales/en.json
CHANGED
|
@@ -103,7 +103,8 @@
|
|
|
103
103
|
},
|
|
104
104
|
"factory": {
|
|
105
105
|
"noUnregister": "There is no {typeName} registered with the name \"{name}\"",
|
|
106
|
-
"noGet": "The requested {typeName} \"{name}\" does not exist in the factory"
|
|
106
|
+
"noGet": "The requested {typeName} \"{name}\" does not exist in the factory",
|
|
107
|
+
"noCreate": "The requested {typeName} \"{name}\" cannot be created by the factory, with params \"{params}\""
|
|
107
108
|
},
|
|
108
109
|
"bitString": {
|
|
109
110
|
"outOfRange": "The index should be >= 0 and less than the length of the bit string, the index is \"{index}\" and the number of bit is \"{numberBits}\""
|
|
@@ -120,6 +121,12 @@
|
|
|
120
121
|
"jsonHelper": {
|
|
121
122
|
"failedPatch": "Failed to patch the JSON object, patch index \"{index}\" failed"
|
|
122
123
|
},
|
|
124
|
+
"mutex": {
|
|
125
|
+
"lockNotFound": "The key \"{key}\" has no active lock",
|
|
126
|
+
"lockAlreadyReleased": "The key \"{key}\" is not currently locked",
|
|
127
|
+
"lockTimeout": "Failed to acquire lock for key \"{key}\" within the timeout of {timeout} milliseconds",
|
|
128
|
+
"bufferFetchFailed": "Failed to retrieve shared buffer for key \"{key}\" from the main thread"
|
|
129
|
+
},
|
|
123
130
|
"ed25519": {
|
|
124
131
|
"privateKeyLength": "The private key length is incorrect, it should be \"{requiredSize}\" but is \"{actualSize}\"",
|
|
125
132
|
"publicKeyLength": "The public key length is incorrect, it should be \"{requiredSize}\" but is \"{actualSize}\""
|
|
@@ -155,6 +162,9 @@
|
|
|
155
162
|
},
|
|
156
163
|
"slip0010": {
|
|
157
164
|
"invalidSeed": "The seed is invalid \"{seed}\""
|
|
165
|
+
},
|
|
166
|
+
"pbkdf2": {
|
|
167
|
+
"keyLengthTooSmall": "The key length must be at least 1, it is \"{keyLength}\""
|
|
158
168
|
}
|
|
159
169
|
},
|
|
160
170
|
"warn": {
|