@settlemint/sdk-cli 1.0.2 → 1.0.3-main360fc7f2
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 +1 -1
- package/dist/cli.js +217 -134
- package/dist/cli.js.map +38 -39
- package/package.json +3 -3
package/dist/cli.js
CHANGED
|
@@ -19613,7 +19613,7 @@ var require_lib4 = __commonJS((exports, module) => {
|
|
|
19613
19613
|
var rRel = new RegExp(`^\\.${rSlash.source}`);
|
|
19614
19614
|
var getNotFoundError = (cmd) => Object.assign(new Error(`not found: ${cmd}`), { code: "ENOENT" });
|
|
19615
19615
|
var getPathInfo = (cmd, {
|
|
19616
|
-
path: optPath = "/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/tmp/bunx-1001-turbo@latest/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/22.12.0/x64/bin:/home/runner/.bun/bin:/tmp/tmp.
|
|
19616
|
+
path: optPath = "/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/tmp/bunx-1001-turbo@latest/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/22.12.0/x64/bin:/home/runner/.bun/bin:/tmp/tmp.3HdXwSfFIw:/nsc/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/snap/bin/:/usr/games:/usr/local/games:/home/linuxbrew/.linuxbrew/bin:/home/runner/.config/composer/vendor/bin:/home/runner/.dotnet/tools:/home/runner/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin",
|
|
19617
19617
|
pathExt: optPathExt = process.env.PATHEXT,
|
|
19618
19618
|
delimiter: optDelimiter = delimiter
|
|
19619
19619
|
}) => {
|
|
@@ -19817,7 +19817,7 @@ var require_lib5 = __commonJS((exports, module) => {
|
|
|
19817
19817
|
let pathToInitial;
|
|
19818
19818
|
try {
|
|
19819
19819
|
pathToInitial = which.sync(initialCmd, {
|
|
19820
|
-
path: options.env && findInObject(options.env, "PATH") || "/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/tmp/bunx-1001-turbo@latest/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/22.12.0/x64/bin:/home/runner/.bun/bin:/tmp/tmp.
|
|
19820
|
+
path: options.env && findInObject(options.env, "PATH") || "/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/tmp/bunx-1001-turbo@latest/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/22.12.0/x64/bin:/home/runner/.bun/bin:/tmp/tmp.3HdXwSfFIw:/nsc/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/snap/bin/:/usr/games:/usr/local/games:/home/linuxbrew/.linuxbrew/bin:/home/runner/.config/composer/vendor/bin:/home/runner/.dotnet/tools:/home/runner/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin",
|
|
19821
19821
|
pathext: options.env && findInObject(options.env, "PATHEXT") || process.env.PATHEXT
|
|
19822
19822
|
}).toLowerCase();
|
|
19823
19823
|
} catch (err) {
|
|
@@ -20534,7 +20534,7 @@ var require_lib6 = __commonJS((exports, module) => {
|
|
|
20534
20534
|
var rRel = new RegExp(`^\\.${rSlash.source}`);
|
|
20535
20535
|
var getNotFoundError = (cmd) => Object.assign(new Error(`not found: ${cmd}`), { code: "ENOENT" });
|
|
20536
20536
|
var getPathInfo = (cmd, {
|
|
20537
|
-
path: optPath = "/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/tmp/bunx-1001-turbo@latest/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/22.12.0/x64/bin:/home/runner/.bun/bin:/tmp/tmp.
|
|
20537
|
+
path: optPath = "/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/tmp/bunx-1001-turbo@latest/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/22.12.0/x64/bin:/home/runner/.bun/bin:/tmp/tmp.3HdXwSfFIw:/nsc/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/snap/bin/:/usr/games:/usr/local/games:/home/linuxbrew/.linuxbrew/bin:/home/runner/.config/composer/vendor/bin:/home/runner/.dotnet/tools:/home/runner/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin",
|
|
20538
20538
|
pathExt: optPathExt = process.env.PATHEXT,
|
|
20539
20539
|
delimiter: optDelimiter = delimiter
|
|
20540
20540
|
}) => {
|
|
@@ -223327,7 +223327,7 @@ ${Bt.cyan(Yt)}
|
|
|
223327
223327
|
code: "ENOENT"
|
|
223328
223328
|
}), getPathInfo = (e9, t7) => {
|
|
223329
223329
|
var r6 = t7.colon || or;
|
|
223330
|
-
var i6 = e9.match(/\//) || nr && e9.match(/\\/) ? [""] : [...nr ? [process.cwd()] : [], ...(t7.path || "/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/tmp/bunx-1001-turbo@latest/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/22.12.0/x64/bin:/home/runner/.bun/bin:/tmp/tmp.
|
|
223330
|
+
var i6 = e9.match(/\//) || nr && e9.match(/\\/) ? [""] : [...nr ? [process.cwd()] : [], ...(t7.path || "/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/tmp/bunx-1001-turbo@latest/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/22.12.0/x64/bin:/home/runner/.bun/bin:/tmp/tmp.3HdXwSfFIw:/nsc/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/snap/bin/:/usr/games:/usr/local/games:/home/linuxbrew/.linuxbrew/bin:/home/runner/.config/composer/vendor/bin:/home/runner/.dotnet/tools:/home/runner/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin").split(r6)];
|
|
223331
223331
|
var n6 = nr ? t7.pathExt || process.env.PATHEXT || ".EXE;.CMD;.BAT;.COM" : "";
|
|
223332
223332
|
var a5 = nr ? n6.split(r6) : [""];
|
|
223333
223333
|
if (nr) {
|
|
@@ -226464,7 +226464,7 @@ ${whileRunning(e9)}`;
|
|
|
226464
226464
|
};
|
|
226465
226465
|
ni = Object.assign(async function _main() {
|
|
226466
226466
|
var e9 = new Cli({
|
|
226467
|
-
binaryVersion: "1.0.
|
|
226467
|
+
binaryVersion: "1.0.3-main360fc7f2",
|
|
226468
226468
|
binaryLabel: "gql.tada CLI",
|
|
226469
226469
|
binaryName: "gql.tada"
|
|
226470
226470
|
});
|
|
@@ -234964,7 +234964,7 @@ var require_which2 = __commonJS((exports, module) => {
|
|
|
234964
234964
|
const colon = opt2.colon || COLON;
|
|
234965
234965
|
const pathEnv = cmd2.match(/\//) || isWindows2 && cmd2.match(/\\/) ? [""] : [
|
|
234966
234966
|
...isWindows2 ? [process.cwd()] : [],
|
|
234967
|
-
...(opt2.path || "/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/tmp/bunx-1001-turbo@latest/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/22.12.0/x64/bin:/home/runner/.bun/bin:/tmp/tmp.
|
|
234967
|
+
...(opt2.path || "/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/tmp/bunx-1001-turbo@latest/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/22.12.0/x64/bin:/home/runner/.bun/bin:/tmp/tmp.3HdXwSfFIw:/nsc/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/snap/bin/:/usr/games:/usr/local/games:/home/linuxbrew/.linuxbrew/bin:/home/runner/.config/composer/vendor/bin:/home/runner/.dotnet/tools:/home/runner/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin").split(colon)
|
|
234968
234968
|
];
|
|
234969
234969
|
const pathExtExe = isWindows2 ? opt2.pathExt || process.env.PATHEXT || ".EXE;.CMD;.BAT;.COM" : "";
|
|
234970
234970
|
const pathExt = isWindows2 ? pathExtExe.split(colon) : [""];
|
|
@@ -267198,6 +267198,7 @@ var DotEnvSchema = z.object({
|
|
|
267198
267198
|
SETTLEMINT_PORTAL_GRAPHQL_ENDPOINT: UrlSchema.optional(),
|
|
267199
267199
|
SETTLEMINT_PORTAL_REST_ENDPOINT: UrlSchema.optional(),
|
|
267200
267200
|
SETTLEMINT_HD_PRIVATE_KEY: UniqueNameSchema.optional(),
|
|
267201
|
+
SETTLEMINT_ACCESSIBLE_PRIVATE_KEY: UniqueNameSchema.optional(),
|
|
267201
267202
|
SETTLEMINT_MINIO: UniqueNameSchema.optional(),
|
|
267202
267203
|
SETTLEMINT_MINIO_ENDPOINT: UrlSchema.optional(),
|
|
267203
267204
|
SETTLEMINT_MINIO_ACCESS_KEY: z.string().optional(),
|
|
@@ -267448,13 +267449,13 @@ var intro = (msg) => {
|
|
|
267448
267449
|
console.log("");
|
|
267449
267450
|
};
|
|
267450
267451
|
var note = (message, level = "info") => {
|
|
267451
|
-
console.log("");
|
|
267452
267452
|
const maskedMessage = maskTokens2(message);
|
|
267453
|
+
console.log("");
|
|
267453
267454
|
if (level === "warn") {
|
|
267454
267455
|
console.warn(yellowBright(maskedMessage));
|
|
267455
|
-
|
|
267456
|
-
console.log(maskedMessage);
|
|
267456
|
+
return;
|
|
267457
267457
|
}
|
|
267458
|
+
console.log(maskedMessage);
|
|
267458
267459
|
};
|
|
267459
267460
|
var outro = (msg) => {
|
|
267460
267461
|
console.log("");
|
|
@@ -267467,12 +267468,13 @@ var spinner = async (options) => {
|
|
|
267467
267468
|
}
|
|
267468
267469
|
const spinner2 = yoctoSpinner().start(options.startMessage);
|
|
267469
267470
|
try {
|
|
267470
|
-
const result = await options.task();
|
|
267471
|
+
const result = await options.task(spinner2);
|
|
267471
267472
|
spinner2.success(options.stopMessage);
|
|
267472
267473
|
return result;
|
|
267473
267474
|
} catch (error) {
|
|
267474
267475
|
spinner2.error(redBright(`${options.startMessage} --> Error!`));
|
|
267475
267476
|
note(redBright(`${error.message}
|
|
267477
|
+
|
|
267476
267478
|
${error.stack}`));
|
|
267477
267479
|
process.exit(1);
|
|
267478
267480
|
}
|
|
@@ -267481,7 +267483,7 @@ ${error.stack}`));
|
|
|
267481
267483
|
var package_default = {
|
|
267482
267484
|
name: "@settlemint/sdk-cli",
|
|
267483
267485
|
description: "Command-line interface for SettleMint SDK, providing development tools and project management capabilities",
|
|
267484
|
-
version: "1.0.
|
|
267486
|
+
version: "1.0.3-main360fc7f2",
|
|
267485
267487
|
type: "module",
|
|
267486
267488
|
private: false,
|
|
267487
267489
|
license: "FSL-1.1-MIT",
|
|
@@ -267534,8 +267536,8 @@ var package_default = {
|
|
|
267534
267536
|
"@inquirer/input": "4.1.3",
|
|
267535
267537
|
"@inquirer/password": "4.0.6",
|
|
267536
267538
|
"@inquirer/select": "4.0.6",
|
|
267537
|
-
"@settlemint/sdk-js": "1.0.
|
|
267538
|
-
"@settlemint/sdk-utils": "1.0.
|
|
267539
|
+
"@settlemint/sdk-js": "1.0.3-main360fc7f2",
|
|
267540
|
+
"@settlemint/sdk-utils": "1.0.3-main360fc7f2",
|
|
267539
267541
|
"get-tsconfig": "4.8.1",
|
|
267540
267542
|
giget: "1.2.3"
|
|
267541
267543
|
},
|
|
@@ -267835,7 +267837,7 @@ var et = l((Re, tt) => {
|
|
|
267835
267837
|
var g = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys", Y = h("path"), Bt = g ? ";" : ":", V = U(), J = (t) => Object.assign(new Error(`not found: ${t}`), { code: "ENOENT" }), Q = (t, e) => {
|
|
267836
267838
|
let n = e.colon || Bt, r = t.match(/\//) || g && t.match(/\\/) ? [""] : [
|
|
267837
267839
|
...g ? [process.cwd()] : [],
|
|
267838
|
-
...(e.path || "/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/tmp/bunx-1001-turbo@latest/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/22.12.0/x64/bin:/home/runner/.bun/bin:/tmp/tmp.
|
|
267840
|
+
...(e.path || "/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/tmp/bunx-1001-turbo@latest/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/22.12.0/x64/bin:/home/runner/.bun/bin:/tmp/tmp.3HdXwSfFIw:/nsc/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/snap/bin/:/usr/games:/usr/local/games:/home/linuxbrew/.linuxbrew/bin:/home/runner/.config/composer/vendor/bin:/home/runner/.dotnet/tools:/home/runner/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin").split(n)
|
|
267839
267841
|
], s = g ? e.pathExt || process.env.PATHEXT || ".EXE;.CMD;.BAT;.COM" : "", o = g ? s.split(n) : [""];
|
|
267840
267842
|
return g && t.indexOf(".") !== -1 && o[0] !== "" && o.unshift(""), {
|
|
267841
267843
|
pathEnv: r,
|
|
@@ -268346,13 +268348,13 @@ var intro2 = (msg) => {
|
|
|
268346
268348
|
console.log("");
|
|
268347
268349
|
};
|
|
268348
268350
|
var note2 = (message, level = "info") => {
|
|
268349
|
-
console.log("");
|
|
268350
268351
|
const maskedMessage = maskTokens3(message);
|
|
268352
|
+
console.log("");
|
|
268351
268353
|
if (level === "warn") {
|
|
268352
268354
|
console.warn(yellowBright(maskedMessage));
|
|
268353
|
-
|
|
268354
|
-
console.log(maskedMessage);
|
|
268355
|
+
return;
|
|
268355
268356
|
}
|
|
268357
|
+
console.log(maskedMessage);
|
|
268356
268358
|
};
|
|
268357
268359
|
var ApplicationAccessTokenSchema2 = z.string().regex(/^sm_aat_.*$/);
|
|
268358
268360
|
var PersonalAccessTokenSchema2 = z.string().regex(/^sm_pat_.*$/);
|
|
@@ -268394,6 +268396,7 @@ var DotEnvSchema2 = z.object({
|
|
|
268394
268396
|
SETTLEMINT_PORTAL_GRAPHQL_ENDPOINT: UrlSchema2.optional(),
|
|
268395
268397
|
SETTLEMINT_PORTAL_REST_ENDPOINT: UrlSchema2.optional(),
|
|
268396
268398
|
SETTLEMINT_HD_PRIVATE_KEY: UniqueNameSchema2.optional(),
|
|
268399
|
+
SETTLEMINT_ACCESSIBLE_PRIVATE_KEY: UniqueNameSchema2.optional(),
|
|
268397
268400
|
SETTLEMINT_MINIO: UniqueNameSchema2.optional(),
|
|
268398
268401
|
SETTLEMINT_MINIO_ENDPOINT: UrlSchema2.optional(),
|
|
268399
268402
|
SETTLEMINT_MINIO_ACCESS_KEY: z.string().optional(),
|
|
@@ -268590,11 +268593,17 @@ async function storeCredentials(token, instance) {
|
|
|
268590
268593
|
}
|
|
268591
268594
|
await writeConfig(config4);
|
|
268592
268595
|
}
|
|
268593
|
-
async function getInstanceCredentials(instance) {
|
|
268596
|
+
async function getInstanceCredentials(instance, throwOnMissingInstance = true) {
|
|
268594
268597
|
const config4 = await readConfig();
|
|
268595
268598
|
const instanceConfig = config4.instances[instance];
|
|
268596
268599
|
if (!instanceConfig) {
|
|
268597
|
-
|
|
268600
|
+
if (!throwOnMissingInstance) {
|
|
268601
|
+
return;
|
|
268602
|
+
}
|
|
268603
|
+
cancel2(`No configuration found for instance '${instance}'${Object.keys(config4.instances).length > 0 ? `
|
|
268604
|
+
Configured instances:
|
|
268605
|
+
${Object.keys(config4.instances).map((i) => `- '${i}'`).join(`
|
|
268606
|
+
`)}` : ""}`);
|
|
268598
268607
|
}
|
|
268599
268608
|
return { personalAccessToken: instanceConfig.personalAccessToken };
|
|
268600
268609
|
}
|
|
@@ -270847,8 +270856,8 @@ ${page}${helpTipBottom}${choiceDescription}${import_ansi_escapes2.default.cursor
|
|
|
270847
270856
|
|
|
270848
270857
|
// src/commands/codegen/subgraph-name.prompt.ts
|
|
270849
270858
|
var ALL = "All";
|
|
270850
|
-
async function subgraphNamePrompt(env2) {
|
|
270851
|
-
const autoAccept = is_in_ci_default;
|
|
270859
|
+
async function subgraphNamePrompt(env2, accept) {
|
|
270860
|
+
const autoAccept = is_in_ci_default || !!accept;
|
|
270852
270861
|
const subgraphNames = env2.SETTLEMINT_THEGRAPH_SUBGRAPHS_ENDPOINTS?.map((endpoint) => endpoint.split("/").pop()).filter(Boolean) ?? [];
|
|
270853
270862
|
if (autoAccept) {
|
|
270854
270863
|
return subgraphNames;
|
|
@@ -270860,7 +270869,7 @@ async function subgraphNamePrompt(env2) {
|
|
|
270860
270869
|
return subgraphNames;
|
|
270861
270870
|
}
|
|
270862
270871
|
const subgraphName = await esm_default2({
|
|
270863
|
-
message: "Which
|
|
270872
|
+
message: "Which The Graph subgraph do you want to generate types for?",
|
|
270864
270873
|
choices: [ALL, ...subgraphNames].map((name2) => ({
|
|
270865
270874
|
name: name2,
|
|
270866
270875
|
value: name2
|
|
@@ -271115,7 +271124,7 @@ function codegenCommand() {
|
|
|
271115
271124
|
intro("Generating GraphQL types and queries for your dApp");
|
|
271116
271125
|
const env2 = await loadEnv(true, !!prod);
|
|
271117
271126
|
if (!Array.isArray(thegraphSubgraphNames)) {
|
|
271118
|
-
thegraphSubgraphNames = await subgraphNamePrompt(env2);
|
|
271127
|
+
thegraphSubgraphNames = await subgraphNamePrompt(env2, true);
|
|
271119
271128
|
}
|
|
271120
271129
|
const { hasura, portal, thegraph, blockscout } = await spinner({
|
|
271121
271130
|
startMessage: "Testing configured GraphQL schema",
|
|
@@ -271346,6 +271355,7 @@ var DotEnvSchema3 = z.object({
|
|
|
271346
271355
|
SETTLEMINT_PORTAL_GRAPHQL_ENDPOINT: UrlSchema3.optional(),
|
|
271347
271356
|
SETTLEMINT_PORTAL_REST_ENDPOINT: UrlSchema3.optional(),
|
|
271348
271357
|
SETTLEMINT_HD_PRIVATE_KEY: UniqueNameSchema3.optional(),
|
|
271358
|
+
SETTLEMINT_ACCESSIBLE_PRIVATE_KEY: UniqueNameSchema3.optional(),
|
|
271349
271359
|
SETTLEMINT_MINIO: UniqueNameSchema3.optional(),
|
|
271350
271360
|
SETTLEMINT_MINIO_ENDPOINT: UrlSchema3.optional(),
|
|
271351
271361
|
SETTLEMINT_MINIO_ACCESS_KEY: z.string().optional(),
|
|
@@ -273215,10 +273225,17 @@ var privateKeyCreate = (gqlClient) => {
|
|
|
273215
273225
|
const { applicationUniqueName, blockchainNodeUniqueNames, ...otherArgs } = args;
|
|
273216
273226
|
const application = await applicationRead(gqlClient)(applicationUniqueName);
|
|
273217
273227
|
const blockchainNodes = blockchainNodeUniqueNames ? await Promise.all(blockchainNodeUniqueNames.map((uniqueName) => blockchainNodeRead(gqlClient)(uniqueName))) : [];
|
|
273228
|
+
const platformConfig = await getPlatformConfig(gqlClient)();
|
|
273229
|
+
const defaultProvider = platformConfig.deploymentEngineTargets.find((target) => !target.disabled && target.clusters.some((cluster) => !cluster.disabled));
|
|
273230
|
+
const defaultRegion = defaultProvider?.clusters.find((cluster) => !cluster.disabled);
|
|
273218
273231
|
const { createPrivateKey: privateKey } = await gqlClient.request(createPrivateKey, {
|
|
273219
273232
|
...otherArgs,
|
|
273220
273233
|
applicationId: application.id,
|
|
273221
|
-
blockchainNodes: blockchainNodes.map((node) => node?.id)
|
|
273234
|
+
blockchainNodes: blockchainNodes.map((node) => node?.id),
|
|
273235
|
+
provider: defaultProvider?.id ?? "gke",
|
|
273236
|
+
region: defaultRegion?.id?.split("-")[1] ?? "europe",
|
|
273237
|
+
size: "SMALL",
|
|
273238
|
+
type: "SHARED"
|
|
273222
273239
|
});
|
|
273223
273240
|
return privateKey;
|
|
273224
273241
|
};
|
|
@@ -273241,7 +273258,18 @@ function createSettleMintClient(options) {
|
|
|
273241
273258
|
headers: {
|
|
273242
273259
|
"x-auth-token": validatedOptions.accessToken
|
|
273243
273260
|
},
|
|
273244
|
-
fetch:
|
|
273261
|
+
fetch: async (input, init2) => {
|
|
273262
|
+
const response = await fetchWithRetry(input, init2);
|
|
273263
|
+
const contentType = response.headers.get("content-type");
|
|
273264
|
+
if (contentType?.includes("application/json") || contentType?.includes("application/graphql-response+json")) {
|
|
273265
|
+
const data = await response.clone().json();
|
|
273266
|
+
if (data.errors?.length > 0) {
|
|
273267
|
+
const errorMessages = data.errors.map((e10) => e10.message).join(", ");
|
|
273268
|
+
throw new Error(errorMessages);
|
|
273269
|
+
}
|
|
273270
|
+
}
|
|
273271
|
+
return response;
|
|
273272
|
+
}
|
|
273245
273273
|
});
|
|
273246
273274
|
return {
|
|
273247
273275
|
workspace: {
|
|
@@ -273567,13 +273595,13 @@ async function applicationAccessTokenPrompt(env2, application, settlemint, accep
|
|
|
273567
273595
|
}
|
|
273568
273596
|
}
|
|
273569
273597
|
return esm_default5({
|
|
273570
|
-
message: "What is the application access token for your application in SettleMint?",
|
|
273598
|
+
message: "What is the application access token for your application in SettleMint? (format: sm_aat_...)",
|
|
273571
273599
|
validate(value4) {
|
|
273572
273600
|
try {
|
|
273573
273601
|
validate3(ApplicationAccessTokenSchema3, value4);
|
|
273574
273602
|
return true;
|
|
273575
273603
|
} catch (error5) {
|
|
273576
|
-
return "Invalid application access token";
|
|
273604
|
+
return "Invalid application access token, it should start with sm_aat_...";
|
|
273577
273605
|
}
|
|
273578
273606
|
}
|
|
273579
273607
|
});
|
|
@@ -273601,7 +273629,7 @@ async function applicationPrompt(env2, applications, accept) {
|
|
|
273601
273629
|
const application = await esm_default2({
|
|
273602
273630
|
message: "Which application do you want to connect to?",
|
|
273603
273631
|
choices: applications.map((applications2) => ({
|
|
273604
|
-
name: applications2.name
|
|
273632
|
+
name: `${applications2.name} (${applications2.uniqueName})`,
|
|
273605
273633
|
value: applications2
|
|
273606
273634
|
})),
|
|
273607
273635
|
default: defaultApplication
|
|
@@ -273637,7 +273665,7 @@ async function servicePrompt({
|
|
|
273637
273665
|
return services[0];
|
|
273638
273666
|
}
|
|
273639
273667
|
const choices = services.map((service) => ({
|
|
273640
|
-
name: service.name
|
|
273668
|
+
name: `${service.name} (${service.uniqueName})`,
|
|
273641
273669
|
value: service
|
|
273642
273670
|
}));
|
|
273643
273671
|
if (!isRequired) {
|
|
@@ -273776,12 +273804,12 @@ async function instancePrompt(env2, accept, freeTextInput = false, isCi = is_in_
|
|
|
273776
273804
|
const defaultInstance = env2.SETTLEMINT_INSTANCE;
|
|
273777
273805
|
const defaultPossible = autoAccept && defaultInstance;
|
|
273778
273806
|
if (defaultPossible) {
|
|
273779
|
-
return defaultInstance;
|
|
273807
|
+
return sanitizeInstanceUrl(defaultInstance);
|
|
273780
273808
|
}
|
|
273781
273809
|
const defaultLoginInstance = await getDefaultInstance();
|
|
273782
273810
|
const defaultPromptInstance = defaultInstance ?? defaultLoginInstance ?? "https://console.settlemint.com";
|
|
273783
273811
|
if (isCi) {
|
|
273784
|
-
return defaultPromptInstance;
|
|
273812
|
+
return sanitizeInstanceUrl(defaultPromptInstance);
|
|
273785
273813
|
}
|
|
273786
273814
|
if (freeTextInput) {
|
|
273787
273815
|
const instance = await esm_default4({
|
|
@@ -273804,17 +273832,17 @@ async function instancePrompt(env2, accept, freeTextInput = false, isCi = is_in_
|
|
|
273804
273832
|
cancel3("No instances found. Please run `settlemint login` to configure an instance.");
|
|
273805
273833
|
}
|
|
273806
273834
|
if (knownInstances.length === 1) {
|
|
273807
|
-
return knownInstances[0];
|
|
273835
|
+
return sanitizeInstanceUrl(knownInstances[0]);
|
|
273808
273836
|
}
|
|
273809
273837
|
return esm_default2({
|
|
273810
273838
|
message: "What SettleMint instance do you want to connect to?",
|
|
273811
273839
|
choices: [
|
|
273812
273840
|
...knownInstances.map((instance) => ({
|
|
273813
273841
|
name: instance,
|
|
273814
|
-
value: instance
|
|
273842
|
+
value: sanitizeInstanceUrl(instance)
|
|
273815
273843
|
}))
|
|
273816
273844
|
],
|
|
273817
|
-
default: defaultPromptInstance
|
|
273845
|
+
default: sanitizeInstanceUrl(defaultPromptInstance)
|
|
273818
273846
|
});
|
|
273819
273847
|
}
|
|
273820
273848
|
|
|
@@ -273972,7 +274000,7 @@ async function workspacePrompt(env2, workspaces, accept) {
|
|
|
273972
274000
|
const workspace = await esm_default2({
|
|
273973
274001
|
message: "Which workspace do you want to connect to?",
|
|
273974
274002
|
choices: workspaces.map((workspace2) => ({
|
|
273975
|
-
name: workspace2.name
|
|
274003
|
+
name: `${workspace2.name} (${workspace2.uniqueName})`,
|
|
273976
274004
|
value: workspace2
|
|
273977
274005
|
})),
|
|
273978
274006
|
default: defaultWorkspace
|
|
@@ -274945,7 +274973,7 @@ async function loginSpinner(settlemint) {
|
|
|
274945
274973
|
|
|
274946
274974
|
// src/commands/connect/pat.prompt.ts
|
|
274947
274975
|
async function personalAccessTokenPrompt(env2, instance, accept) {
|
|
274948
|
-
const existingConfig = await getInstanceCredentials(instance);
|
|
274976
|
+
const existingConfig = await getInstanceCredentials(instance, false);
|
|
274949
274977
|
const defaultPersonalAccessToken = env2.SETTLEMINT_PERSONAL_ACCESS_TOKEN || existingConfig?.personalAccessToken;
|
|
274950
274978
|
const defaultPossible = accept && defaultPersonalAccessToken;
|
|
274951
274979
|
if (defaultPossible) {
|
|
@@ -274961,13 +274989,13 @@ async function personalAccessTokenPrompt(env2, instance, accept) {
|
|
|
274961
274989
|
}
|
|
274962
274990
|
}
|
|
274963
274991
|
return esm_default5({
|
|
274964
|
-
message: "What is your personal access token in SettleMint?",
|
|
274992
|
+
message: "What is your personal access token in SettleMint? (format: sm_pat_...)",
|
|
274965
274993
|
validate(value4) {
|
|
274966
274994
|
try {
|
|
274967
274995
|
validate3(PersonalAccessTokenSchema3, value4);
|
|
274968
274996
|
return true;
|
|
274969
274997
|
} catch (error5) {
|
|
274970
|
-
return "Invalid personal access token";
|
|
274998
|
+
return "Invalid personal access token, it should start with sm_pat_...";
|
|
274971
274999
|
}
|
|
274972
275000
|
}
|
|
274973
275001
|
});
|
|
@@ -275066,7 +275094,7 @@ function logoutCommand() {
|
|
|
275066
275094
|
|
|
275067
275095
|
// src/commands/platform/common/cluster-service.args.ts
|
|
275068
275096
|
function addClusterServiceArgs(cmd2) {
|
|
275069
|
-
return cmd2.
|
|
275097
|
+
return cmd2.option("--provider <provider>", "Network provider (run `settlemint platform config` to see available providers)").option("--region <region>", "Deployment region (run `settlemint platform config` to see available regions)").addOption(new Option("--size <size>", "Network size").choices(["CUSTOM", "LARGE", "MEDIUM", "SMALL"]).argParser((value4) => value4).default("SMALL")).addOption(new Option("--type <type>", "Network type").choices(["DEDICATED", "SHARED"]).argParser((value4) => value4).default("SHARED"));
|
|
275070
275098
|
}
|
|
275071
275099
|
|
|
275072
275100
|
// src/utils/parse-number.ts
|
|
@@ -275110,22 +275138,38 @@ async function waitForCompletion({
|
|
|
275110
275138
|
return spinner({
|
|
275111
275139
|
startMessage: `Waiting for ${type4} to be ${getActionLabel(action)}`,
|
|
275112
275140
|
stopMessage: `Waiting for ${type4} to be ${getActionLabel(action)}`,
|
|
275113
|
-
task: async () => {
|
|
275141
|
+
task: async (spinner2) => {
|
|
275114
275142
|
const startTime = Date.now();
|
|
275115
275143
|
while (true) {
|
|
275116
275144
|
try {
|
|
275117
275145
|
const resource = await service.read(uniqueName);
|
|
275118
275146
|
if (resource.status === "COMPLETED") {
|
|
275119
|
-
|
|
275147
|
+
if (spinner2) {
|
|
275148
|
+
spinner2.text = `${capitalizeFirstLetter(type4)} is ${getActionLabel(action)}`;
|
|
275149
|
+
} else {
|
|
275150
|
+
note(`${capitalizeFirstLetter(type4)} is ${getActionLabel(action)}`);
|
|
275151
|
+
}
|
|
275120
275152
|
return true;
|
|
275121
275153
|
}
|
|
275122
275154
|
if (resource.status === "FAILED") {
|
|
275123
|
-
|
|
275155
|
+
if (spinner2) {
|
|
275156
|
+
spinner2.text = `${capitalizeFirstLetter(type4)} failed to ${getActionLabel(action)}`;
|
|
275157
|
+
} else {
|
|
275158
|
+
note(`${capitalizeFirstLetter(type4)} failed to ${getActionLabel(action)}`);
|
|
275159
|
+
}
|
|
275124
275160
|
return true;
|
|
275125
275161
|
}
|
|
275126
|
-
|
|
275162
|
+
if (spinner2) {
|
|
275163
|
+
spinner2.text = `${capitalizeFirstLetter(type4)} is not ready yet (status: ${resource.status})`;
|
|
275164
|
+
} else {
|
|
275165
|
+
note(`${capitalizeFirstLetter(type4)} is not ready yet (status: ${resource.status})`);
|
|
275166
|
+
}
|
|
275127
275167
|
} catch (error5) {
|
|
275128
|
-
|
|
275168
|
+
if (spinner2) {
|
|
275169
|
+
spinner2.text = `${capitalizeFirstLetter(type4)} is not ready yet (status: UNKNOWN)`;
|
|
275170
|
+
} else {
|
|
275171
|
+
note(`${capitalizeFirstLetter(type4)} is not ready yet (status: UNKNOWN)`);
|
|
275172
|
+
}
|
|
275129
275173
|
}
|
|
275130
275174
|
if (Date.now() - startTime > maxTimeout) {
|
|
275131
275175
|
throw new TimeoutError(`Operation timed out after ${maxTimeout / 60000} minutes for ${type4} with unique name ${uniqueName}`);
|
|
@@ -275222,13 +275266,14 @@ async function regionPrompt(provider, argument) {
|
|
|
275222
275266
|
function getCreateCommand({
|
|
275223
275267
|
name: name2,
|
|
275224
275268
|
type: type4,
|
|
275269
|
+
subType,
|
|
275225
275270
|
alias,
|
|
275226
275271
|
examples,
|
|
275227
275272
|
execute: execute2,
|
|
275228
275273
|
usePersonalAccessToken = true,
|
|
275229
275274
|
requiresDeployment = true
|
|
275230
275275
|
}) {
|
|
275231
|
-
const cmd2 = new Command(sanitizeCommandName(name2)).alias(alias).description(`Create a new ${type4} in the SettleMint platform.`).usage(createExamples(examples)).argument("<name>", `The ${type4} name`).option("-a, --accept-defaults", "Accept the default values").option("-d, --default", `Save as default ${type4}`).option("--prod", "Connect to production environment");
|
|
275276
|
+
const cmd2 = new Command(sanitizeCommandName(name2)).alias(alias).description(`Create a new ${subType ? `${subType} ${type4}` : type4} in the SettleMint platform.`).usage(createExamples(examples)).argument("<name>", `The ${subType ? `${subType} ${type4}` : type4} name`).option("-a, --accept-defaults", "Accept the default values").option("-d, --default", `Save as default ${type4}`).option("--prod", "Connect to production environment");
|
|
275232
275277
|
if (requiresDeployment) {
|
|
275233
275278
|
cmd2.option("-w, --wait", "Wait until deployed").option("-r, --restart-if-timeout", "Restart if wait time is exceeded");
|
|
275234
275279
|
}
|
|
@@ -275246,7 +275291,7 @@ function getCreateCommand({
|
|
|
275246
275291
|
instance
|
|
275247
275292
|
});
|
|
275248
275293
|
const platformConfig = await settlemint.platform.config();
|
|
275249
|
-
if (
|
|
275294
|
+
if (cmd2.options.some((option) => option.long === "--provider")) {
|
|
275250
275295
|
const selectedProvider = await providerPrompt(platformConfig, provider);
|
|
275251
275296
|
if (!selectedProvider) {
|
|
275252
275297
|
return nothingSelectedError("provider");
|
|
@@ -275256,13 +275301,12 @@ function getCreateCommand({
|
|
|
275256
275301
|
return nothingSelectedError("region");
|
|
275257
275302
|
}
|
|
275258
275303
|
}
|
|
275259
|
-
const
|
|
275304
|
+
const showSpinner = (task) => spinner({
|
|
275260
275305
|
startMessage: `Creating ${type4}`,
|
|
275261
|
-
task
|
|
275262
|
-
return createFunction(settlemint, env2);
|
|
275263
|
-
},
|
|
275306
|
+
task,
|
|
275264
275307
|
stopMessage: `${capitalizeFirstLetter(type4)} created`
|
|
275265
275308
|
});
|
|
275309
|
+
const { result, waitFor, mapDefaultEnv } = await createFunction(settlemint, env2, showSpinner);
|
|
275266
275310
|
if (wait) {
|
|
275267
275311
|
await waitForCompletion({
|
|
275268
275312
|
settlemint,
|
|
@@ -275306,9 +275350,10 @@ function blockchainNetworkBesuCreateCommand() {
|
|
|
275306
275350
|
return getCreateCommand({
|
|
275307
275351
|
name: "besu",
|
|
275308
275352
|
type: "blockchain network",
|
|
275353
|
+
subType: "Besu",
|
|
275309
275354
|
alias: "b",
|
|
275310
275355
|
execute: (cmd2, baseAction) => {
|
|
275311
|
-
addClusterServiceArgs(cmd2).option("-
|
|
275356
|
+
addClusterServiceArgs(cmd2).option("-app, --application <application>", "The unique name of the application to create the network in (defaults to application from env)").requiredOption("--node-name <name>", "Name of the node").option("--chain-id <chainId>", "The chain ID for the network", parseNumber).option("--contract-size-limit <limit>", "Maximum contract size limit", parseNumber).option("--evm-stack-size <size>", "EVM stack size", parseNumber).option("--gas-limit <limit>", "Block gas limit").option("--gas-price <price>", "Gas price in wei", parseNumber).option("--seconds-per-block <seconds>", "Block time in seconds", parseNumber).action(async (name2, {
|
|
275312
275357
|
application,
|
|
275313
275358
|
chainId,
|
|
275314
275359
|
contractSizeLimit,
|
|
@@ -275327,12 +275372,12 @@ function blockchainNetworkBesuCreateCommand() {
|
|
|
275327
275372
|
...defaultArgs,
|
|
275328
275373
|
provider,
|
|
275329
275374
|
region
|
|
275330
|
-
}, async (settlemint, env2) => {
|
|
275375
|
+
}, async (settlemint, env2, showSpinner) => {
|
|
275331
275376
|
const applicationUniqueName = application ?? env2.SETTLEMINT_APPLICATION;
|
|
275332
275377
|
if (!applicationUniqueName) {
|
|
275333
275378
|
return missingApplication();
|
|
275334
275379
|
}
|
|
275335
|
-
const result = await settlemint.blockchainNetwork.create({
|
|
275380
|
+
const result = await showSpinner(() => settlemint.blockchainNetwork.create({
|
|
275336
275381
|
name: name2,
|
|
275337
275382
|
applicationUniqueName,
|
|
275338
275383
|
nodeName,
|
|
@@ -275347,7 +275392,7 @@ function blockchainNetworkBesuCreateCommand() {
|
|
|
275347
275392
|
secondsPerBlock,
|
|
275348
275393
|
size,
|
|
275349
275394
|
type: type4
|
|
275350
|
-
});
|
|
275395
|
+
}));
|
|
275351
275396
|
const blockchainNode = result.blockchainNodes.find((item) => item.name === nodeName) ?? result.blockchainNodes[0];
|
|
275352
275397
|
return {
|
|
275353
275398
|
result,
|
|
@@ -275486,8 +275531,8 @@ function workspaceCreateCommand() {
|
|
|
275486
275531
|
addressLine1,
|
|
275487
275532
|
...defaultArgs
|
|
275488
275533
|
}) => {
|
|
275489
|
-
return baseAction(defaultArgs, async (settlemint) => {
|
|
275490
|
-
const result = await settlemint.workspace.create({
|
|
275534
|
+
return baseAction(defaultArgs, async (settlemint, _env, showSpinner) => {
|
|
275535
|
+
const result = await showSpinner(() => settlemint.workspace.create({
|
|
275491
275536
|
name: name2,
|
|
275492
275537
|
taxIdValue,
|
|
275493
275538
|
taxIdType,
|
|
@@ -275499,7 +275544,7 @@ function workspaceCreateCommand() {
|
|
|
275499
275544
|
city,
|
|
275500
275545
|
addressLine2,
|
|
275501
275546
|
addressLine1
|
|
275502
|
-
});
|
|
275547
|
+
}));
|
|
275503
275548
|
return {
|
|
275504
275549
|
result,
|
|
275505
275550
|
mapDefaultEnv: () => {
|
|
@@ -275536,13 +275581,13 @@ function applicationAccessTokenCreateCommand() {
|
|
|
275536
275581
|
type: "application access token",
|
|
275537
275582
|
alias: "aat",
|
|
275538
275583
|
execute: (cmd2, baseAction) => {
|
|
275539
|
-
cmd2.option("-
|
|
275540
|
-
return baseAction(defaultArgs, async (settlemint, env2) => {
|
|
275584
|
+
cmd2.option("-app, --application <application>", "The application unique name to create the application access token for (defaults to application from env)").addOption(new Option("-v, --validity-period <period>", "The validity period for the token").choices(["DAYS_7", "DAYS_30", "DAYS_60", "DAYS_90", "NONE"]).default("DAYS_7")).action(async (name2, { application, validityPeriod, ...defaultArgs }) => {
|
|
275585
|
+
return baseAction(defaultArgs, async (settlemint, env2, showSpinner) => {
|
|
275541
275586
|
const applicationUniqueName = application ?? env2.SETTLEMINT_APPLICATION;
|
|
275542
275587
|
if (!applicationUniqueName) {
|
|
275543
275588
|
return missingApplication();
|
|
275544
275589
|
}
|
|
275545
|
-
const aatToken = await settlemint.applicationAccessToken.create({
|
|
275590
|
+
const aatToken = await showSpinner(() => settlemint.applicationAccessToken.create({
|
|
275546
275591
|
applicationUniqueName,
|
|
275547
275592
|
name: name2,
|
|
275548
275593
|
blockchainNetworkScope: {
|
|
@@ -275586,7 +275631,7 @@ function applicationAccessTokenCreateCommand() {
|
|
|
275586
275631
|
values: []
|
|
275587
275632
|
},
|
|
275588
275633
|
validityPeriod
|
|
275589
|
-
});
|
|
275634
|
+
}));
|
|
275590
275635
|
return {
|
|
275591
275636
|
result: {
|
|
275592
275637
|
id: "",
|
|
@@ -275630,7 +275675,7 @@ function applicationCreateCommand() {
|
|
|
275630
275675
|
return baseAction({
|
|
275631
275676
|
...defaultArgs,
|
|
275632
275677
|
acceptDefaults
|
|
275633
|
-
}, async (settlemint, env2) => {
|
|
275678
|
+
}, async (settlemint, env2, showSpinner) => {
|
|
275634
275679
|
let workspaceUniqueName = workspace;
|
|
275635
275680
|
if (!workspaceUniqueName) {
|
|
275636
275681
|
const workspaces = await settlemint.workspace.list();
|
|
@@ -275640,10 +275685,10 @@ function applicationCreateCommand() {
|
|
|
275640
275685
|
}
|
|
275641
275686
|
workspaceUniqueName = workspace2.uniqueName;
|
|
275642
275687
|
}
|
|
275643
|
-
const result = await settlemint.application.create({
|
|
275688
|
+
const result = await showSpinner(() => settlemint.application.create({
|
|
275644
275689
|
name: name2,
|
|
275645
275690
|
workspaceUniqueName
|
|
275646
|
-
});
|
|
275691
|
+
}));
|
|
275647
275692
|
return {
|
|
275648
275693
|
result,
|
|
275649
275694
|
mapDefaultEnv: () => {
|
|
@@ -275701,9 +275746,10 @@ function blockchainNodeBesuCreateCommand() {
|
|
|
275701
275746
|
return getCreateCommand({
|
|
275702
275747
|
name: "besu",
|
|
275703
275748
|
type: "blockchain node",
|
|
275749
|
+
subType: "Besu",
|
|
275704
275750
|
alias: "b",
|
|
275705
275751
|
execute: (cmd2, baseAction) => {
|
|
275706
|
-
addClusterServiceArgs(cmd2).option("-
|
|
275752
|
+
addClusterServiceArgs(cmd2).option("-app, --application <application>", "The application unique name to create the node in (defaults to application from env)").option("--blockchain-network <blockchainNetwork>", "Blockchain network unique name to add this node to").option("--node-identity <nodeIdentity>", "EC DSA P256 private key to use as the node identity").addOption(new Option("--node-type <nodeType>", "Type of the node").choices(["VALIDATOR", "NON_VALIDATOR"]).makeOptionMandatory()).action(async (name2, {
|
|
275707
275753
|
application,
|
|
275708
275754
|
provider,
|
|
275709
275755
|
region,
|
|
@@ -275720,7 +275766,7 @@ function blockchainNodeBesuCreateCommand() {
|
|
|
275720
275766
|
acceptDefaults,
|
|
275721
275767
|
provider,
|
|
275722
275768
|
region
|
|
275723
|
-
}, async (settlemint, env2) => {
|
|
275769
|
+
}, async (settlemint, env2, showSpinner) => {
|
|
275724
275770
|
const applicationUniqueName = application ?? env2.SETTLEMINT_APPLICATION;
|
|
275725
275771
|
if (!applicationUniqueName) {
|
|
275726
275772
|
return missingApplication();
|
|
@@ -275739,7 +275785,7 @@ function blockchainNodeBesuCreateCommand() {
|
|
|
275739
275785
|
}
|
|
275740
275786
|
networkUniqueName = network?.uniqueName;
|
|
275741
275787
|
}
|
|
275742
|
-
const result = await settlemint.blockchainNode.create({
|
|
275788
|
+
const result = await showSpinner(() => settlemint.blockchainNode.create({
|
|
275743
275789
|
applicationUniqueName,
|
|
275744
275790
|
name: name2,
|
|
275745
275791
|
blockchainNetworkUniqueName: networkUniqueName,
|
|
@@ -275749,7 +275795,7 @@ function blockchainNodeBesuCreateCommand() {
|
|
|
275749
275795
|
region,
|
|
275750
275796
|
size,
|
|
275751
275797
|
type: type4
|
|
275752
|
-
});
|
|
275798
|
+
}));
|
|
275753
275799
|
return {
|
|
275754
275800
|
result,
|
|
275755
275801
|
mapDefaultEnv: () => {
|
|
@@ -275789,6 +275835,7 @@ function blockscoutInsightsCreateCommand() {
|
|
|
275789
275835
|
return getCreateCommand({
|
|
275790
275836
|
name: "blockscout",
|
|
275791
275837
|
type: "insights",
|
|
275838
|
+
subType: "Blockscout",
|
|
275792
275839
|
alias: "bs",
|
|
275793
275840
|
execute: (cmd2, baseAction) => {
|
|
275794
275841
|
addClusterServiceArgs(cmd2).option("--application <application>", "Application unique name").option("--load-balancer <loadBalancer>", "Load Balancer unique name (mutually exclusive with blockchain-node)").option("--blockchain-node <blockchainNode>", "Blockchain Node unique name (mutually exclusive with load-balancer)").action(async (name2, { application, provider, region, size, type: type4, blockchainNode, loadBalancer, acceptDefaults, ...defaultArgs }) => {
|
|
@@ -275797,7 +275844,7 @@ function blockscoutInsightsCreateCommand() {
|
|
|
275797
275844
|
acceptDefaults,
|
|
275798
275845
|
provider,
|
|
275799
275846
|
region
|
|
275800
|
-
}, async (settlemint, env2) => {
|
|
275847
|
+
}, async (settlemint, env2, showSpinner) => {
|
|
275801
275848
|
const applicationUniqueName = application ?? env2.SETTLEMINT_APPLICATION;
|
|
275802
275849
|
if (!applicationUniqueName) {
|
|
275803
275850
|
return missingApplication();
|
|
@@ -275817,7 +275864,7 @@ function blockscoutInsightsCreateCommand() {
|
|
|
275817
275864
|
}
|
|
275818
275865
|
blockchainNodeUniqueName = node.uniqueName;
|
|
275819
275866
|
}
|
|
275820
|
-
const result = await settlemint.insights.create({
|
|
275867
|
+
const result = await showSpinner(() => settlemint.insights.create({
|
|
275821
275868
|
name: name2,
|
|
275822
275869
|
applicationUniqueName,
|
|
275823
275870
|
insightsCategory: "BLOCKCHAIN_EXPLORER",
|
|
@@ -275827,7 +275874,7 @@ function blockscoutInsightsCreateCommand() {
|
|
|
275827
275874
|
type: type4,
|
|
275828
275875
|
blockchainNodeUniqueName,
|
|
275829
275876
|
loadBalancerUniqueName
|
|
275830
|
-
});
|
|
275877
|
+
}));
|
|
275831
275878
|
return {
|
|
275832
275879
|
result,
|
|
275833
275880
|
mapDefaultEnv: async () => {
|
|
@@ -275866,6 +275913,7 @@ function hasuraIntegrationCreateCommand() {
|
|
|
275866
275913
|
return getCreateCommand({
|
|
275867
275914
|
name: "hasura",
|
|
275868
275915
|
type: "integration tool",
|
|
275916
|
+
subType: "Hasura",
|
|
275869
275917
|
alias: "ha",
|
|
275870
275918
|
execute: (cmd2, baseAction) => {
|
|
275871
275919
|
addClusterServiceArgs(cmd2).option("--application <application>", "Application unique name").action(async (name2, { application, provider, region, size, type: type4, ...defaultArgs }) => {
|
|
@@ -275873,12 +275921,12 @@ function hasuraIntegrationCreateCommand() {
|
|
|
275873
275921
|
...defaultArgs,
|
|
275874
275922
|
provider,
|
|
275875
275923
|
region
|
|
275876
|
-
}, async (settlemint, env2) => {
|
|
275924
|
+
}, async (settlemint, env2, showSpinner) => {
|
|
275877
275925
|
const applicationUniqueName = application ?? env2.SETTLEMINT_APPLICATION;
|
|
275878
275926
|
if (!applicationUniqueName) {
|
|
275879
275927
|
return missingApplication();
|
|
275880
275928
|
}
|
|
275881
|
-
const result = await settlemint.integrationTool.create({
|
|
275929
|
+
const result = await showSpinner(() => settlemint.integrationTool.create({
|
|
275882
275930
|
name: name2,
|
|
275883
275931
|
applicationUniqueName,
|
|
275884
275932
|
integrationType: "HASURA",
|
|
@@ -275886,7 +275934,7 @@ function hasuraIntegrationCreateCommand() {
|
|
|
275886
275934
|
region,
|
|
275887
275935
|
size,
|
|
275888
275936
|
type: type4
|
|
275889
|
-
});
|
|
275937
|
+
}));
|
|
275890
275938
|
return {
|
|
275891
275939
|
result,
|
|
275892
275940
|
mapDefaultEnv: async () => {
|
|
@@ -275925,6 +275973,7 @@ function graphMiddlewareCreateCommand() {
|
|
|
275925
275973
|
return getCreateCommand({
|
|
275926
275974
|
name: "graph",
|
|
275927
275975
|
type: "middleware",
|
|
275976
|
+
subType: "The Graph",
|
|
275928
275977
|
alias: "gr",
|
|
275929
275978
|
execute: (cmd2, baseAction) => {
|
|
275930
275979
|
addClusterServiceArgs(cmd2).option("--application <application>", "Application unique name").option("--blockchain-node <blockchainNode>", "Blockchain Node unique name").action(async (name2, { application, blockchainNode, provider, region, size, type: type4, acceptDefaults, ...defaultArgs }) => {
|
|
@@ -275933,7 +275982,7 @@ function graphMiddlewareCreateCommand() {
|
|
|
275933
275982
|
acceptDefaults,
|
|
275934
275983
|
provider,
|
|
275935
275984
|
region
|
|
275936
|
-
}, async (settlemint, env2) => {
|
|
275985
|
+
}, async (settlemint, env2, showSpinner) => {
|
|
275937
275986
|
const applicationUniqueName = application ?? env2.SETTLEMINT_APPLICATION;
|
|
275938
275987
|
if (!applicationUniqueName) {
|
|
275939
275988
|
return missingApplication();
|
|
@@ -275952,7 +276001,7 @@ function graphMiddlewareCreateCommand() {
|
|
|
275952
276001
|
}
|
|
275953
276002
|
blockchainNodeUniqueName = node.uniqueName;
|
|
275954
276003
|
}
|
|
275955
|
-
const result = await settlemint.middleware.create({
|
|
276004
|
+
const result = await showSpinner(() => settlemint.middleware.create({
|
|
275956
276005
|
name: name2,
|
|
275957
276006
|
applicationUniqueName,
|
|
275958
276007
|
interface: "HA_GRAPH",
|
|
@@ -275961,7 +276010,7 @@ function graphMiddlewareCreateCommand() {
|
|
|
275961
276010
|
region,
|
|
275962
276011
|
size,
|
|
275963
276012
|
type: type4
|
|
275964
|
-
});
|
|
276013
|
+
}));
|
|
275965
276014
|
return {
|
|
275966
276015
|
result,
|
|
275967
276016
|
mapDefaultEnv: async () => {
|
|
@@ -275995,6 +276044,7 @@ function smartContractPortalMiddlewareCreateCommand() {
|
|
|
275995
276044
|
return getCreateCommand({
|
|
275996
276045
|
name: "smart-contract-portal",
|
|
275997
276046
|
type: "middleware",
|
|
276047
|
+
subType: "Smart Contract Portal",
|
|
275998
276048
|
alias: "scp",
|
|
275999
276049
|
execute: (cmd2, baseAction) => {
|
|
276000
276050
|
addClusterServiceArgs(cmd2).option("--application <application>", "Application unique name").option("--load-balancer <loadBalancer>", "Load Balancer unique name (mutually exclusive with blockchain-node)").option("--blockchain-node <blockchainNode>", "Blockchain Node unique name (mutually exclusive with load-balancer)").option("--abis <abis...>", "Path to abi file(s)").option("--include-predeployed-abis <includePredeployedAbis...>", "Include pre-deployed abis (run `settlemint platform config` to see available pre-deployed abis)").action(async (name2, {
|
|
@@ -276015,7 +276065,7 @@ function smartContractPortalMiddlewareCreateCommand() {
|
|
|
276015
276065
|
acceptDefaults,
|
|
276016
276066
|
provider,
|
|
276017
276067
|
region
|
|
276018
|
-
}, async (settlemint, env2) => {
|
|
276068
|
+
}, async (settlemint, env2, showSpinner) => {
|
|
276019
276069
|
const applicationUniqueName = application ?? env2.SETTLEMINT_APPLICATION;
|
|
276020
276070
|
if (!applicationUniqueName) {
|
|
276021
276071
|
return missingApplication();
|
|
@@ -276056,7 +276106,7 @@ function smartContractPortalMiddlewareCreateCommand() {
|
|
|
276056
276106
|
cancel3(`Invalid pre-deployed abis: '${invalidPredeployedAbis.join(", ")}'. Possible values: '${platformConfig.preDeployedContracts.sort().join(", ")}'`);
|
|
276057
276107
|
}
|
|
276058
276108
|
}
|
|
276059
|
-
const result = await settlemint.middleware.create({
|
|
276109
|
+
const result = await showSpinner(() => settlemint.middleware.create({
|
|
276060
276110
|
name: name2,
|
|
276061
276111
|
applicationUniqueName,
|
|
276062
276112
|
interface: "SMART_CONTRACT_PORTAL",
|
|
@@ -276068,7 +276118,7 @@ function smartContractPortalMiddlewareCreateCommand() {
|
|
|
276068
276118
|
region,
|
|
276069
276119
|
size,
|
|
276070
276120
|
type: type4
|
|
276071
|
-
});
|
|
276121
|
+
}));
|
|
276072
276122
|
return {
|
|
276073
276123
|
result,
|
|
276074
276124
|
mapDefaultEnv: async () => {
|
|
@@ -276100,20 +276150,79 @@ function middlewareCreateCommand() {
|
|
|
276100
276150
|
return new Command("middleware").alias("mw").description("Create a middleware service in the SettleMint platform").addCommand(graphMiddlewareCreateCommand()).addCommand(smartContractPortalMiddlewareCreateCommand());
|
|
276101
276151
|
}
|
|
276102
276152
|
|
|
276153
|
+
// src/commands/platform/private-key/accessible-ecdsa-p256/create.ts
|
|
276154
|
+
function privateKeyAccessibleCreateCommand() {
|
|
276155
|
+
return getCreateCommand({
|
|
276156
|
+
name: "ACCESSIBLE-ECDSA-P256",
|
|
276157
|
+
type: "private key",
|
|
276158
|
+
subType: "ACCESSIBLE-ECDSA-P256",
|
|
276159
|
+
alias: "acc",
|
|
276160
|
+
execute: (cmd2, baseAction) => {
|
|
276161
|
+
cmd2.option("--application <application>", "Application unique name").option("--blockchain-node <blockchainNode>", "Blockchain Node unique name").action(async (name2, { application, blockchainNode, acceptDefaults, ...defaultArgs }) => {
|
|
276162
|
+
return baseAction({
|
|
276163
|
+
...defaultArgs,
|
|
276164
|
+
acceptDefaults
|
|
276165
|
+
}, async (settlemint, env2, showSpinner) => {
|
|
276166
|
+
const applicationUniqueName = application ?? env2.SETTLEMINT_APPLICATION;
|
|
276167
|
+
if (!applicationUniqueName) {
|
|
276168
|
+
return missingApplication();
|
|
276169
|
+
}
|
|
276170
|
+
let blockchainNodeUniqueName = blockchainNode;
|
|
276171
|
+
if (!blockchainNodeUniqueName) {
|
|
276172
|
+
const blockchainNodes = await settlemint.blockchainNode.list(applicationUniqueName);
|
|
276173
|
+
const node = await blockchainNodePrompt({
|
|
276174
|
+
env: env2,
|
|
276175
|
+
nodes: blockchainNodes,
|
|
276176
|
+
accept: acceptDefaults,
|
|
276177
|
+
isRequired: true
|
|
276178
|
+
});
|
|
276179
|
+
if (!node) {
|
|
276180
|
+
return nothingSelectedError("blockchain node");
|
|
276181
|
+
}
|
|
276182
|
+
blockchainNodeUniqueName = node.uniqueName;
|
|
276183
|
+
}
|
|
276184
|
+
const result = await showSpinner(() => settlemint.privateKey.create({
|
|
276185
|
+
name: name2,
|
|
276186
|
+
applicationUniqueName,
|
|
276187
|
+
privateKeyType: "ACCESSIBLE_ECDSA_P256",
|
|
276188
|
+
blockchainNodeUniqueNames: blockchainNodeUniqueName ? [blockchainNodeUniqueName] : []
|
|
276189
|
+
}));
|
|
276190
|
+
return {
|
|
276191
|
+
result
|
|
276192
|
+
};
|
|
276193
|
+
});
|
|
276194
|
+
});
|
|
276195
|
+
},
|
|
276196
|
+
examples: [
|
|
276197
|
+
{
|
|
276198
|
+
description: "Create a private key and save as default",
|
|
276199
|
+
command: "platform create private-key accessible-ecdsa-p256 my-key --accept-defaults -d"
|
|
276200
|
+
},
|
|
276201
|
+
{
|
|
276202
|
+
description: "Create a private key in a different application",
|
|
276203
|
+
command: "platform create private-key accessible-ecdsa-p256 my-key --application my-app"
|
|
276204
|
+
},
|
|
276205
|
+
{
|
|
276206
|
+
description: "Create a private key linked to a blockchain node",
|
|
276207
|
+
command: "platform create private-key accessible-ecdsa-p256 my-key --blockchain-node node-123"
|
|
276208
|
+
}
|
|
276209
|
+
]
|
|
276210
|
+
});
|
|
276211
|
+
}
|
|
276212
|
+
|
|
276103
276213
|
// src/commands/platform/private-key/hd-ecdsa-p256/create.ts
|
|
276104
276214
|
function privateKeyHdCreateCommand() {
|
|
276105
276215
|
return getCreateCommand({
|
|
276106
276216
|
name: "HD-ECDSA-P256",
|
|
276107
276217
|
type: "private key",
|
|
276218
|
+
subType: "HD-ECDSA-P256",
|
|
276108
276219
|
alias: "hd",
|
|
276109
276220
|
execute: (cmd2, baseAction) => {
|
|
276110
|
-
|
|
276221
|
+
cmd2.option("--application <application>", "Application unique name").option("--blockchain-node <blockchainNode>", "Blockchain Node unique name").action(async (name2, { application, blockchainNode, acceptDefaults, ...defaultArgs }) => {
|
|
276111
276222
|
return baseAction({
|
|
276112
276223
|
...defaultArgs,
|
|
276113
|
-
acceptDefaults
|
|
276114
|
-
|
|
276115
|
-
region
|
|
276116
|
-
}, async (settlemint, env2) => {
|
|
276224
|
+
acceptDefaults
|
|
276225
|
+
}, async (settlemint, env2, showSpinner) => {
|
|
276117
276226
|
const applicationUniqueName = application ?? env2.SETTLEMINT_APPLICATION;
|
|
276118
276227
|
if (!applicationUniqueName) {
|
|
276119
276228
|
return missingApplication();
|
|
@@ -276132,16 +276241,12 @@ function privateKeyHdCreateCommand() {
|
|
|
276132
276241
|
}
|
|
276133
276242
|
blockchainNodeUniqueName = node.uniqueName;
|
|
276134
276243
|
}
|
|
276135
|
-
const result = await settlemint.privateKey.create({
|
|
276244
|
+
const result = await showSpinner(() => settlemint.privateKey.create({
|
|
276136
276245
|
name: name2,
|
|
276137
276246
|
applicationUniqueName,
|
|
276138
276247
|
privateKeyType: "HD_ECDSA_P256",
|
|
276139
|
-
blockchainNodeUniqueNames: blockchainNodeUniqueName ? [blockchainNodeUniqueName] : []
|
|
276140
|
-
|
|
276141
|
-
region,
|
|
276142
|
-
size,
|
|
276143
|
-
type: type4
|
|
276144
|
-
});
|
|
276248
|
+
blockchainNodeUniqueNames: blockchainNodeUniqueName ? [blockchainNodeUniqueName] : []
|
|
276249
|
+
}));
|
|
276145
276250
|
return {
|
|
276146
276251
|
result,
|
|
276147
276252
|
mapDefaultEnv: () => {
|
|
@@ -276176,15 +276281,14 @@ function privateKeyHsmCreateCommand() {
|
|
|
276176
276281
|
return getCreateCommand({
|
|
276177
276282
|
name: "HSM-ECDSA-P256",
|
|
276178
276283
|
type: "private key",
|
|
276179
|
-
|
|
276284
|
+
subType: "HSM-ECDSA-P256",
|
|
276285
|
+
alias: "hsm",
|
|
276180
276286
|
execute: (cmd2, baseAction) => {
|
|
276181
|
-
|
|
276287
|
+
cmd2.option("--application <application>", "Application unique name").option("--blockchain-node <blockchainNode>", "Blockchain Node unique name").action(async (name2, { application, blockchainNode, acceptDefaults, ...defaultArgs }) => {
|
|
276182
276288
|
return baseAction({
|
|
276183
276289
|
...defaultArgs,
|
|
276184
|
-
acceptDefaults
|
|
276185
|
-
|
|
276186
|
-
region
|
|
276187
|
-
}, async (settlemint, env2) => {
|
|
276290
|
+
acceptDefaults
|
|
276291
|
+
}, async (settlemint, env2, showSpinner) => {
|
|
276188
276292
|
const applicationUniqueName = application ?? env2.SETTLEMINT_APPLICATION;
|
|
276189
276293
|
if (!applicationUniqueName) {
|
|
276190
276294
|
return missingApplication();
|
|
@@ -276203,16 +276307,12 @@ function privateKeyHsmCreateCommand() {
|
|
|
276203
276307
|
}
|
|
276204
276308
|
blockchainNodeUniqueName = node.uniqueName;
|
|
276205
276309
|
}
|
|
276206
|
-
const result = await settlemint.privateKey.create({
|
|
276310
|
+
const result = await showSpinner(() => settlemint.privateKey.create({
|
|
276207
276311
|
name: name2,
|
|
276208
276312
|
applicationUniqueName,
|
|
276209
276313
|
privateKeyType: "HSM_ECDSA_P256",
|
|
276210
|
-
blockchainNodeUniqueNames: blockchainNodeUniqueName ? [blockchainNodeUniqueName] : []
|
|
276211
|
-
|
|
276212
|
-
region,
|
|
276213
|
-
size,
|
|
276214
|
-
type: type4
|
|
276215
|
-
});
|
|
276314
|
+
blockchainNodeUniqueNames: blockchainNodeUniqueName ? [blockchainNodeUniqueName] : []
|
|
276315
|
+
}));
|
|
276216
276316
|
return {
|
|
276217
276317
|
result
|
|
276218
276318
|
};
|
|
@@ -276238,7 +276338,7 @@ function privateKeyHsmCreateCommand() {
|
|
|
276238
276338
|
|
|
276239
276339
|
// src/commands/platform/private-key/create.ts
|
|
276240
276340
|
function privateKeyCreateCommand() {
|
|
276241
|
-
return new Command("private-key").alias("pk").description("Create a private key in the SettleMint platform").addCommand(privateKeyHdCreateCommand()).addCommand(privateKeyHsmCreateCommand());
|
|
276341
|
+
return new Command("private-key").alias("pk").description("Create a private key in the SettleMint platform").addCommand(privateKeyHdCreateCommand()).addCommand(privateKeyHsmCreateCommand()).addCommand(privateKeyAccessibleCreateCommand());
|
|
276242
276342
|
}
|
|
276243
276343
|
|
|
276244
276344
|
// src/commands/platform/storage/ipfs/create.ts
|
|
@@ -276246,6 +276346,7 @@ function ipfsStorageCreateCommand() {
|
|
|
276246
276346
|
return getCreateCommand({
|
|
276247
276347
|
name: "ipfs",
|
|
276248
276348
|
type: "storage",
|
|
276349
|
+
subType: "IPFS",
|
|
276249
276350
|
alias: "ip",
|
|
276250
276351
|
execute: (cmd2, baseAction) => {
|
|
276251
276352
|
addClusterServiceArgs(cmd2).option("--application <application>", "Application unique name").action(async (name2, { application, provider, region, size, type: type4, ...defaultArgs }) => {
|
|
@@ -276253,12 +276354,12 @@ function ipfsStorageCreateCommand() {
|
|
|
276253
276354
|
...defaultArgs,
|
|
276254
276355
|
provider,
|
|
276255
276356
|
region
|
|
276256
|
-
}, async (settlemint, env2) => {
|
|
276357
|
+
}, async (settlemint, env2, showSpinner) => {
|
|
276257
276358
|
const applicationUniqueName = application ?? env2.SETTLEMINT_APPLICATION;
|
|
276258
276359
|
if (!applicationUniqueName) {
|
|
276259
276360
|
return missingApplication();
|
|
276260
276361
|
}
|
|
276261
|
-
const result = await settlemint.storage.create({
|
|
276362
|
+
const result = await showSpinner(() => settlemint.storage.create({
|
|
276262
276363
|
name: name2,
|
|
276263
276364
|
applicationUniqueName,
|
|
276264
276365
|
storageProtocol: "IPFS",
|
|
@@ -276266,7 +276367,7 @@ function ipfsStorageCreateCommand() {
|
|
|
276266
276367
|
region,
|
|
276267
276368
|
size,
|
|
276268
276369
|
type: type4
|
|
276269
|
-
});
|
|
276370
|
+
}));
|
|
276270
276371
|
return {
|
|
276271
276372
|
result,
|
|
276272
276373
|
mapDefaultEnv: () => {
|
|
@@ -276298,6 +276399,7 @@ function minioStorageCreateCommand() {
|
|
|
276298
276399
|
return getCreateCommand({
|
|
276299
276400
|
name: "minio",
|
|
276300
276401
|
type: "storage",
|
|
276402
|
+
subType: "MinIO",
|
|
276301
276403
|
alias: "m",
|
|
276302
276404
|
execute: (cmd2, baseAction) => {
|
|
276303
276405
|
addClusterServiceArgs(cmd2).option("--application <application>", "Application unique name").action(async (name2, { application, provider, region, size, type: type4, ...defaultArgs }) => {
|
|
@@ -276305,12 +276407,12 @@ function minioStorageCreateCommand() {
|
|
|
276305
276407
|
...defaultArgs,
|
|
276306
276408
|
provider,
|
|
276307
276409
|
region
|
|
276308
|
-
}, async (settlemint, env2) => {
|
|
276410
|
+
}, async (settlemint, env2, showSpinner) => {
|
|
276309
276411
|
const applicationUniqueName = application ?? env2.SETTLEMINT_APPLICATION;
|
|
276310
276412
|
if (!applicationUniqueName) {
|
|
276311
276413
|
return missingApplication();
|
|
276312
276414
|
}
|
|
276313
|
-
const result = await settlemint.storage.create({
|
|
276415
|
+
const result = await showSpinner(() => settlemint.storage.create({
|
|
276314
276416
|
name: name2,
|
|
276315
276417
|
applicationUniqueName,
|
|
276316
276418
|
storageProtocol: "MINIO",
|
|
@@ -276318,7 +276420,7 @@ function minioStorageCreateCommand() {
|
|
|
276318
276420
|
region,
|
|
276319
276421
|
size,
|
|
276320
276422
|
type: type4
|
|
276321
|
-
});
|
|
276423
|
+
}));
|
|
276322
276424
|
return {
|
|
276323
276425
|
result,
|
|
276324
276426
|
mapDefaultEnv: () => {
|
|
@@ -276625,25 +276727,6 @@ function middlewareRestartCommand() {
|
|
|
276625
276727
|
return new Command("middleware").alias("mw").description("Restart a middleware service in the SettleMint platform").addCommand(graphRestartCommand()).addCommand(smartContractPortalRestartCommand());
|
|
276626
276728
|
}
|
|
276627
276729
|
|
|
276628
|
-
// src/commands/platform/private-key/hd-ecdsa-p256/restart.ts
|
|
276629
|
-
function hdEcdsaP256RestartCommand() {
|
|
276630
|
-
return getRestartCommand({
|
|
276631
|
-
name: "hd-ecdsa-p256",
|
|
276632
|
-
type: "private key",
|
|
276633
|
-
subType: "hd-ecdsa-p256",
|
|
276634
|
-
alias: "hd",
|
|
276635
|
-
envKey: "SETTLEMINT_HD_PRIVATE_KEY",
|
|
276636
|
-
restartFunction: async (settlemint, uniqueName) => {
|
|
276637
|
-
return settlemint.privateKey.restart(uniqueName);
|
|
276638
|
-
}
|
|
276639
|
-
});
|
|
276640
|
-
}
|
|
276641
|
-
|
|
276642
|
-
// src/commands/platform/private-key/restart.ts
|
|
276643
|
-
function privateKeyRestartCommand() {
|
|
276644
|
-
return new Command("private-key").alias("pk").description("Restart a private key in the SettleMint platform").addCommand(hdEcdsaP256RestartCommand());
|
|
276645
|
-
}
|
|
276646
|
-
|
|
276647
276730
|
// src/commands/platform/storage/ipfs/restart.ts
|
|
276648
276731
|
function ipfsRestartCommand() {
|
|
276649
276732
|
return getRestartCommand({
|
|
@@ -276677,7 +276760,7 @@ function storageRestartCommand() {
|
|
|
276677
276760
|
|
|
276678
276761
|
// src/commands/platform/restart.ts
|
|
276679
276762
|
function restartCommand() {
|
|
276680
|
-
const cmd2 = new Command("restart").description("Restart a resource in the SettleMint platform").addCommand(blockchainNetworkRestartCommand()).addCommand(customDeploymentRestartCommand()).addCommand(insightsRestartCommand()).addCommand(integrationToolRestartCommand()).addCommand(middlewareRestartCommand()).addCommand(
|
|
276763
|
+
const cmd2 = new Command("restart").description("Restart a resource in the SettleMint platform").addCommand(blockchainNetworkRestartCommand()).addCommand(customDeploymentRestartCommand()).addCommand(insightsRestartCommand()).addCommand(integrationToolRestartCommand()).addCommand(middlewareRestartCommand()).addCommand(storageRestartCommand());
|
|
276681
276764
|
return cmd2;
|
|
276682
276765
|
}
|
|
276683
276766
|
|
|
@@ -277072,7 +277155,7 @@ async function addressPrompt({
|
|
|
277072
277155
|
return defaultAddress;
|
|
277073
277156
|
}
|
|
277074
277157
|
if (possiblePrivateKeys.length === 0) {
|
|
277075
|
-
cancel3("No private key is activated on the node to sign the transaction.");
|
|
277158
|
+
cancel3("No ECDSA P256 or HSM ECDSA P256 private key is activated on the node to sign the transaction.");
|
|
277076
277159
|
}
|
|
277077
277160
|
const address = await esm_default2({
|
|
277078
277161
|
message: "Which private key do you want to deploy from?",
|
|
@@ -277746,4 +277829,4 @@ function sdkCliCommand(exitOverride = undefined) {
|
|
|
277746
277829
|
ascii();
|
|
277747
277830
|
sdkCliCommand();
|
|
277748
277831
|
|
|
277749
|
-
//# debugId=
|
|
277832
|
+
//# debugId=4A5042908CDAB2CF64756E2164756E21
|