@settlemint/sdk-cli 1.0.8-pr5ae564a8 → 1.0.8-pr6149a1b5
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/cli.js +260 -89
- package/dist/cli.js.map +24 -20
- package/package.json +3 -3
package/dist/cli.js
CHANGED
|
@@ -210270,7 +210270,7 @@ ${Bt.cyan(Yt)}
|
|
|
210270
210270
|
code: "ENOENT"
|
|
210271
210271
|
}), getPathInfo = (e9, t7) => {
|
|
210272
210272
|
var r6 = t7.colon || or;
|
|
210273
|
-
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.13.0/x64/bin:/home/runner/.bun/bin:/tmp/tmp.
|
|
210273
|
+
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.13.0/x64/bin:/home/runner/.bun/bin:/tmp/tmp.WamFpiFTcV:/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)];
|
|
210274
210274
|
var n6 = nr ? t7.pathExt || process.env.PATHEXT || ".EXE;.CMD;.BAT;.COM" : "";
|
|
210275
210275
|
var a5 = nr ? n6.split(r6) : [""];
|
|
210276
210276
|
if (nr) {
|
|
@@ -213407,7 +213407,7 @@ ${whileRunning(e9)}`;
|
|
|
213407
213407
|
};
|
|
213408
213408
|
ni = Object.assign(async function _main() {
|
|
213409
213409
|
var e9 = new Cli({
|
|
213410
|
-
binaryVersion: "1.0.8-
|
|
213410
|
+
binaryVersion: "1.0.8-pr6149a1b5",
|
|
213411
213411
|
binaryLabel: "gql.tada CLI",
|
|
213412
213412
|
binaryName: "gql.tada"
|
|
213413
213413
|
});
|
|
@@ -220997,7 +220997,7 @@ var require_lib4 = __commonJS((exports, module) => {
|
|
|
220997
220997
|
var rRel = new RegExp(`^\\.${rSlash.source}`);
|
|
220998
220998
|
var getNotFoundError2 = (cmd2) => Object.assign(new Error(`not found: ${cmd2}`), { code: "ENOENT" });
|
|
220999
220999
|
var getPathInfo2 = (cmd2, {
|
|
221000
|
-
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.13.0/x64/bin:/home/runner/.bun/bin:/tmp/tmp.
|
|
221000
|
+
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.13.0/x64/bin:/home/runner/.bun/bin:/tmp/tmp.WamFpiFTcV:/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",
|
|
221001
221001
|
pathExt: optPathExt = process.env.PATHEXT,
|
|
221002
221002
|
delimiter: optDelimiter = delimiter
|
|
221003
221003
|
}) => {
|
|
@@ -221201,7 +221201,7 @@ var require_lib5 = __commonJS((exports, module) => {
|
|
|
221201
221201
|
let pathToInitial;
|
|
221202
221202
|
try {
|
|
221203
221203
|
pathToInitial = which.sync(initialCmd, {
|
|
221204
|
-
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.13.0/x64/bin:/home/runner/.bun/bin:/tmp/tmp.
|
|
221204
|
+
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.13.0/x64/bin:/home/runner/.bun/bin:/tmp/tmp.WamFpiFTcV:/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",
|
|
221205
221205
|
pathext: options.env && findInObject(options.env, "PATHEXT") || process.env.PATHEXT
|
|
221206
221206
|
}).toLowerCase();
|
|
221207
221207
|
} catch (err) {
|
|
@@ -221918,7 +221918,7 @@ var require_lib6 = __commonJS((exports, module) => {
|
|
|
221918
221918
|
var rRel = new RegExp(`^\\.${rSlash.source}`);
|
|
221919
221919
|
var getNotFoundError2 = (cmd2) => Object.assign(new Error(`not found: ${cmd2}`), { code: "ENOENT" });
|
|
221920
221920
|
var getPathInfo2 = (cmd2, {
|
|
221921
|
-
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.13.0/x64/bin:/home/runner/.bun/bin:/tmp/tmp.
|
|
221921
|
+
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.13.0/x64/bin:/home/runner/.bun/bin:/tmp/tmp.WamFpiFTcV:/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",
|
|
221922
221922
|
pathExt: optPathExt = process.env.PATHEXT,
|
|
221923
221923
|
delimiter: optDelimiter = delimiter
|
|
221924
221924
|
}) => {
|
|
@@ -235793,7 +235793,7 @@ var require_which2 = __commonJS((exports, module) => {
|
|
|
235793
235793
|
const colon = opt2.colon || COLON;
|
|
235794
235794
|
const pathEnv = cmd2.match(/\//) || isWindows2 && cmd2.match(/\\/) ? [""] : [
|
|
235795
235795
|
...isWindows2 ? [process.cwd()] : [],
|
|
235796
|
-
...(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.13.0/x64/bin:/home/runner/.bun/bin:/tmp/tmp.
|
|
235796
|
+
...(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.13.0/x64/bin:/home/runner/.bun/bin:/tmp/tmp.WamFpiFTcV:/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)
|
|
235797
235797
|
];
|
|
235798
235798
|
const pathExtExe = isWindows2 ? opt2.pathExt || process.env.PATHEXT || ".EXE;.CMD;.BAT;.COM" : "";
|
|
235799
235799
|
const pathExt = isWindows2 ? pathExtExe.split(colon) : [""];
|
|
@@ -268408,7 +268408,7 @@ function table(title, data) {
|
|
|
268408
268408
|
var package_default = {
|
|
268409
268409
|
name: "@settlemint/sdk-cli",
|
|
268410
268410
|
description: "Command-line interface for SettleMint SDK, providing development tools and project management capabilities",
|
|
268411
|
-
version: "1.0.8-
|
|
268411
|
+
version: "1.0.8-pr6149a1b5",
|
|
268412
268412
|
type: "module",
|
|
268413
268413
|
private: false,
|
|
268414
268414
|
license: "FSL-1.1-MIT",
|
|
@@ -268463,8 +268463,8 @@ var package_default = {
|
|
|
268463
268463
|
"@inquirer/input": "4.1.3",
|
|
268464
268464
|
"@inquirer/password": "4.0.6",
|
|
268465
268465
|
"@inquirer/select": "4.0.6",
|
|
268466
|
-
"@settlemint/sdk-js": "1.0.8-
|
|
268467
|
-
"@settlemint/sdk-utils": "1.0.8-
|
|
268466
|
+
"@settlemint/sdk-js": "1.0.8-pr6149a1b5",
|
|
268467
|
+
"@settlemint/sdk-utils": "1.0.8-pr6149a1b5",
|
|
268468
268468
|
"get-tsconfig": "4.10.0",
|
|
268469
268469
|
giget: "1.2.3",
|
|
268470
268470
|
yaml: "2.7.0"
|
|
@@ -271885,7 +271885,8 @@ async function servicePrompt({
|
|
|
271885
271885
|
envKey,
|
|
271886
271886
|
defaultHandler,
|
|
271887
271887
|
isRequired = false,
|
|
271888
|
-
isCi = is_in_ci_default
|
|
271888
|
+
isCi = is_in_ci_default,
|
|
271889
|
+
singleOptionMessage
|
|
271889
271890
|
}) {
|
|
271890
271891
|
if (services.length === 0) {
|
|
271891
271892
|
return;
|
|
@@ -271899,6 +271900,9 @@ async function servicePrompt({
|
|
|
271899
271900
|
return;
|
|
271900
271901
|
}
|
|
271901
271902
|
if (isRequired && services.length === 1) {
|
|
271903
|
+
if (singleOptionMessage) {
|
|
271904
|
+
note(singleOptionMessage(services[0].uniqueName));
|
|
271905
|
+
}
|
|
271902
271906
|
return services[0];
|
|
271903
271907
|
}
|
|
271904
271908
|
const choices = services.map((service) => ({
|
|
@@ -271919,6 +271923,8 @@ async function blockchainNodePrompt({
|
|
|
271919
271923
|
env: env2,
|
|
271920
271924
|
nodes,
|
|
271921
271925
|
accept,
|
|
271926
|
+
singleOptionMessage,
|
|
271927
|
+
promptMessage,
|
|
271922
271928
|
filterRunningOnly = false,
|
|
271923
271929
|
isRequired = false
|
|
271924
271930
|
}) {
|
|
@@ -271931,11 +271937,12 @@ async function blockchainNodePrompt({
|
|
|
271931
271937
|
defaultHandler: async ({ defaultService: defaultNode, choices }) => {
|
|
271932
271938
|
const filteredChoices = filterRunningOnly ? choices.filter(({ value: node }) => node === undefined || node?.status === "COMPLETED") : choices;
|
|
271933
271939
|
return esm_default2({
|
|
271934
|
-
message: "Which blockchain node do you want to connect to?",
|
|
271940
|
+
message: promptMessage ?? "Which blockchain node do you want to connect to?",
|
|
271935
271941
|
choices: filteredChoices,
|
|
271936
271942
|
default: defaultNode
|
|
271937
271943
|
});
|
|
271938
|
-
}
|
|
271944
|
+
},
|
|
271945
|
+
singleOptionMessage
|
|
271939
271946
|
});
|
|
271940
271947
|
}
|
|
271941
271948
|
|
|
@@ -272107,6 +272114,9 @@ async function portalPrompt({
|
|
|
272107
272114
|
}
|
|
272108
272115
|
|
|
272109
272116
|
// src/prompts/cluster-service/thegraph.prompt.ts
|
|
272117
|
+
function isHAGraphMiddleware(middleware) {
|
|
272118
|
+
return middleware.__typename === "HAGraphMiddleware";
|
|
272119
|
+
}
|
|
272110
272120
|
async function theGraphPrompt({
|
|
272111
272121
|
env: env2,
|
|
272112
272122
|
middlewares,
|
|
@@ -272114,7 +272124,7 @@ async function theGraphPrompt({
|
|
|
272114
272124
|
filterRunningOnly = false,
|
|
272115
272125
|
isRequired = false
|
|
272116
272126
|
}) {
|
|
272117
|
-
const graphMiddlewares = middlewares.filter(
|
|
272127
|
+
const graphMiddlewares = middlewares.filter(isHAGraphMiddleware);
|
|
272118
272128
|
return servicePrompt({
|
|
272119
272129
|
env: env2,
|
|
272120
272130
|
services: graphMiddlewares,
|
|
@@ -277251,10 +277261,69 @@ function updateCommand() {
|
|
|
277251
277261
|
return new Command("update").alias("u").description("Update a resource in the SettleMint platform").addCommand(customDeploymentsUpdateCommand());
|
|
277252
277262
|
}
|
|
277253
277263
|
|
|
277264
|
+
// src/utils/output/json-output.ts
|
|
277265
|
+
function jsonOutput(data) {
|
|
277266
|
+
console.log(JSON.stringify(data, null, 2));
|
|
277267
|
+
}
|
|
277268
|
+
|
|
277269
|
+
// ../../node_modules/yaml/dist/index.js
|
|
277270
|
+
var composer = require_composer();
|
|
277271
|
+
var Document = require_Document();
|
|
277272
|
+
var Schema = require_Schema();
|
|
277273
|
+
var errors2 = require_errors3();
|
|
277274
|
+
var Alias = require_Alias();
|
|
277275
|
+
var identity3 = require_identity();
|
|
277276
|
+
var Pair = require_Pair();
|
|
277277
|
+
var Scalar = require_Scalar();
|
|
277278
|
+
var YAMLMap = require_YAMLMap();
|
|
277279
|
+
var YAMLSeq = require_YAMLSeq();
|
|
277280
|
+
var cst = require_cst();
|
|
277281
|
+
var lexer = require_lexer2();
|
|
277282
|
+
var lineCounter = require_line_counter();
|
|
277283
|
+
var parser = require_parser2();
|
|
277284
|
+
var publicApi = require_public_api();
|
|
277285
|
+
var visit2 = require_visit();
|
|
277286
|
+
var $Composer = composer.Composer;
|
|
277287
|
+
var $Document = Document.Document;
|
|
277288
|
+
var $Schema = Schema.Schema;
|
|
277289
|
+
var $YAMLError = errors2.YAMLError;
|
|
277290
|
+
var $YAMLParseError = errors2.YAMLParseError;
|
|
277291
|
+
var $YAMLWarning = errors2.YAMLWarning;
|
|
277292
|
+
var $Alias = Alias.Alias;
|
|
277293
|
+
var $isAlias = identity3.isAlias;
|
|
277294
|
+
var $isCollection = identity3.isCollection;
|
|
277295
|
+
var $isDocument = identity3.isDocument;
|
|
277296
|
+
var $isMap = identity3.isMap;
|
|
277297
|
+
var $isNode = identity3.isNode;
|
|
277298
|
+
var $isPair = identity3.isPair;
|
|
277299
|
+
var $isScalar = identity3.isScalar;
|
|
277300
|
+
var $isSeq = identity3.isSeq;
|
|
277301
|
+
var $Pair = Pair.Pair;
|
|
277302
|
+
var $Scalar = Scalar.Scalar;
|
|
277303
|
+
var $YAMLMap = YAMLMap.YAMLMap;
|
|
277304
|
+
var $YAMLSeq = YAMLSeq.YAMLSeq;
|
|
277305
|
+
var $Lexer = lexer.Lexer;
|
|
277306
|
+
var $LineCounter = lineCounter.LineCounter;
|
|
277307
|
+
var $Parser = parser.Parser;
|
|
277308
|
+
var $parse = publicApi.parse;
|
|
277309
|
+
var $parseAllDocuments = publicApi.parseAllDocuments;
|
|
277310
|
+
var $parseDocument = publicApi.parseDocument;
|
|
277311
|
+
var $stringify = publicApi.stringify;
|
|
277312
|
+
var $visit = visit2.visit;
|
|
277313
|
+
var $visitAsync = visit2.visitAsync;
|
|
277314
|
+
|
|
277315
|
+
// src/utils/output/yaml-output.ts
|
|
277316
|
+
function yamlOutput(data) {
|
|
277317
|
+
console.log($stringify(data));
|
|
277318
|
+
}
|
|
277319
|
+
|
|
277254
277320
|
// src/commands/platform/config.ts
|
|
277255
277321
|
function configCommand() {
|
|
277256
|
-
return new Command("config").alias("c").description("Get platform configuration").option("--prod", "Connect to your production environment").option("-i, --instance <instance>", "The instance to connect to (defaults to the instance in the .env file)").action(async ({ prod, instance }) => {
|
|
277257
|
-
|
|
277322
|
+
return new Command("config").alias("c").description("Get platform configuration").option("--prod", "Connect to your production environment").option("-i, --instance <instance>", "The instance to connect to (defaults to the instance in the .env file)").addOption(new Option("-o, --output <output>", "The output format").choices(["json", "yaml"])).action(async ({ prod, instance, output }) => {
|
|
277323
|
+
const printToTerminal = !output;
|
|
277324
|
+
if (printToTerminal) {
|
|
277325
|
+
intro("Getting platform configuration");
|
|
277326
|
+
}
|
|
277258
277327
|
const env2 = await loadEnv(false, !!prod);
|
|
277259
277328
|
const selectedInstance = instance ? sanitizeAndValidateInstanceUrl(instance) : await instancePrompt(env2, true);
|
|
277260
277329
|
const settlemint = createSettleMintClient({
|
|
@@ -277265,33 +277334,39 @@ function configCommand() {
|
|
|
277265
277334
|
const platformConfig = await settlemint.platform.config();
|
|
277266
277335
|
const useCases = getUseCases(platformConfig);
|
|
277267
277336
|
const starterkits = getStarterkits(platformConfig);
|
|
277268
|
-
|
|
277269
|
-
|
|
277270
|
-
|
|
277271
|
-
|
|
277272
|
-
|
|
277273
|
-
|
|
277274
|
-
|
|
277275
|
-
|
|
277276
|
-
|
|
277277
|
-
|
|
277278
|
-
|
|
277279
|
-
|
|
277280
|
-
|
|
277281
|
-
|
|
277282
|
-
|
|
277283
|
-
|
|
277337
|
+
const platformConfigData = {
|
|
277338
|
+
useCases: useCases.map((useCase) => ({
|
|
277339
|
+
id: useCase.id,
|
|
277340
|
+
name: useCase.name
|
|
277341
|
+
})).sort((a7, b4) => a7.name.localeCompare(b4.name)),
|
|
277342
|
+
starterkits: starterkits.map((starterkit) => ({
|
|
277343
|
+
id: starterkit.id,
|
|
277344
|
+
name: starterkit.name
|
|
277345
|
+
})).sort((a7, b4) => a7.name.localeCompare(b4.name)),
|
|
277346
|
+
deploymentEngineTargets: platformConfig.deploymentEngineTargets.filter((provider) => !provider.disabled).flatMap((provider) => provider.clusters.filter((cluster) => !cluster.disabled).map((region) => ({
|
|
277347
|
+
providerId: provider.id,
|
|
277348
|
+
regionId: getRegionId(region.id),
|
|
277349
|
+
providerName: provider.name,
|
|
277350
|
+
regionName: region.name
|
|
277351
|
+
}))).sort((a7, b4) => a7.providerId.localeCompare(b4.providerId) || a7.regionId.localeCompare(b4.regionId)),
|
|
277352
|
+
preDeployedContracts: platformConfig.preDeployedContracts.sort()
|
|
277353
|
+
};
|
|
277354
|
+
if (printToTerminal) {
|
|
277355
|
+
table("Templates (Starterkits)", platformConfigData.starterkits);
|
|
277356
|
+
table("Use cases (Smart Contract Sets)", platformConfigData.useCases);
|
|
277357
|
+
table("Providers and regions", platformConfigData.deploymentEngineTargets);
|
|
277358
|
+
list("Pre-deployed abis (Smart Contract Portal)", platformConfigData.preDeployedContracts);
|
|
277359
|
+
} else if (output === "json") {
|
|
277360
|
+
jsonOutput(platformConfigData);
|
|
277361
|
+
} else if (output === "yaml") {
|
|
277362
|
+
yamlOutput(platformConfigData);
|
|
277363
|
+
}
|
|
277364
|
+
if (printToTerminal) {
|
|
277365
|
+
outro("Platform configuration retrieved");
|
|
277366
|
+
}
|
|
277284
277367
|
});
|
|
277285
277368
|
}
|
|
277286
277369
|
|
|
277287
|
-
// src/commands/platform/utils/formatting/format-service-sub-type.ts
|
|
277288
|
-
function formatServiceSubType(service, printToTerminal = true) {
|
|
277289
|
-
if ("__typename" in service && typeof service.__typename === "string") {
|
|
277290
|
-
return printToTerminal ? camelCaseToWords2(service.__typename) : service.__typename;
|
|
277291
|
-
}
|
|
277292
|
-
return printToTerminal ? "Unknown" : "Unknown";
|
|
277293
|
-
}
|
|
277294
|
-
|
|
277295
277370
|
// src/spinners/applications.spinner.ts
|
|
277296
277371
|
async function applicationsSpinner(settlemint, workspaceUniqueName) {
|
|
277297
277372
|
return spinner({
|
|
@@ -277345,51 +277420,82 @@ function getApplicationUrlPath(application) {
|
|
|
277345
277420
|
return `/applications/${encodeURIComponent(application.id)}`;
|
|
277346
277421
|
}
|
|
277347
277422
|
|
|
277348
|
-
//
|
|
277349
|
-
|
|
277350
|
-
|
|
277351
|
-
|
|
277352
|
-
|
|
277353
|
-
|
|
277354
|
-
|
|
277355
|
-
|
|
277356
|
-
|
|
277357
|
-
|
|
277358
|
-
|
|
277359
|
-
|
|
277360
|
-
|
|
277361
|
-
|
|
277362
|
-
|
|
277363
|
-
|
|
277364
|
-
|
|
277365
|
-
|
|
277366
|
-
|
|
277367
|
-
|
|
277368
|
-
|
|
277369
|
-
|
|
277370
|
-
|
|
277371
|
-
|
|
277372
|
-
|
|
277373
|
-
|
|
277374
|
-
|
|
277375
|
-
|
|
277376
|
-
|
|
277377
|
-
|
|
277378
|
-
|
|
277379
|
-
|
|
277380
|
-
|
|
277381
|
-
|
|
277382
|
-
|
|
277383
|
-
|
|
277384
|
-
|
|
277385
|
-
|
|
277386
|
-
|
|
277387
|
-
|
|
277388
|
-
|
|
277389
|
-
|
|
277390
|
-
|
|
277391
|
-
|
|
277392
|
-
|
|
277423
|
+
// src/commands/platform/application/list.ts
|
|
277424
|
+
function applicationsListCommand() {
|
|
277425
|
+
return new Command("applications").alias("a").description("List applications").usage(createExamples([
|
|
277426
|
+
{
|
|
277427
|
+
description: "List applications",
|
|
277428
|
+
command: "platform list applications"
|
|
277429
|
+
},
|
|
277430
|
+
{
|
|
277431
|
+
description: "List applications in wide format with more information",
|
|
277432
|
+
command: "platform list applications -o wide"
|
|
277433
|
+
},
|
|
277434
|
+
{
|
|
277435
|
+
description: "List applications in JSON format",
|
|
277436
|
+
command: "platform list applications -o json > applications.json"
|
|
277437
|
+
},
|
|
277438
|
+
{
|
|
277439
|
+
description: "List applications in YAML format",
|
|
277440
|
+
command: "platform list applications -o yaml > applications.yaml"
|
|
277441
|
+
}
|
|
277442
|
+
])).option("-w, --workspace <workspace>", "The workspace unique name to list applications for (defaults to workspace from env)").addOption(new Option("-o, --output <output>", "The output format").choices(["wide", "json", "yaml"])).action(async ({ workspace, output }) => {
|
|
277443
|
+
const printToTerminal = !output || output === "wide";
|
|
277444
|
+
if (printToTerminal) {
|
|
277445
|
+
intro("Listing applications");
|
|
277446
|
+
}
|
|
277447
|
+
const env2 = await loadEnv(false, false);
|
|
277448
|
+
const selectedInstance = await instancePrompt(env2, true);
|
|
277449
|
+
const personalAccessToken = await getInstanceCredentials(selectedInstance);
|
|
277450
|
+
if (!personalAccessToken) {
|
|
277451
|
+
return missingPersonalAccessTokenError();
|
|
277452
|
+
}
|
|
277453
|
+
const settlemint = createSettleMintClient({
|
|
277454
|
+
accessToken: personalAccessToken.personalAccessToken,
|
|
277455
|
+
instance: selectedInstance
|
|
277456
|
+
});
|
|
277457
|
+
const workspaceUniqueName = workspace ?? env2.SETTLEMINT_WORKSPACE ?? await selectWorkspace(settlemint, env2);
|
|
277458
|
+
const applications = await applicationsSpinner(settlemint, workspaceUniqueName);
|
|
277459
|
+
const wide = output === "wide";
|
|
277460
|
+
const applicationsData = applications.map((application) => {
|
|
277461
|
+
const basicFields = {
|
|
277462
|
+
name: application.name,
|
|
277463
|
+
uniqueName: application.uniqueName
|
|
277464
|
+
};
|
|
277465
|
+
if (wide || !printToTerminal) {
|
|
277466
|
+
return {
|
|
277467
|
+
...basicFields,
|
|
277468
|
+
url: getApplicationUrl(selectedInstance, application)
|
|
277469
|
+
};
|
|
277470
|
+
}
|
|
277471
|
+
return basicFields;
|
|
277472
|
+
});
|
|
277473
|
+
if (printToTerminal) {
|
|
277474
|
+
const selectedWorkspace = await settlemint.workspace.read(workspaceUniqueName);
|
|
277475
|
+
table(`Applications for workspace ${selectedWorkspace.name} (${selectedWorkspace}) - ${getWorkspaceUrl(selectedInstance, selectedWorkspace)}`, applicationsData);
|
|
277476
|
+
} else if (output === "json") {
|
|
277477
|
+
jsonOutput(applicationsData);
|
|
277478
|
+
} else if (output === "yaml") {
|
|
277479
|
+
yamlOutput(applicationsData);
|
|
277480
|
+
}
|
|
277481
|
+
if (printToTerminal) {
|
|
277482
|
+
outro("Applications listed");
|
|
277483
|
+
}
|
|
277484
|
+
});
|
|
277485
|
+
}
|
|
277486
|
+
async function selectWorkspace(settlemint, env2) {
|
|
277487
|
+
const workspaces = await workspaceSpinner(settlemint);
|
|
277488
|
+
const workspace = await workspacePrompt(env2, workspaces, true);
|
|
277489
|
+
return workspace.uniqueName;
|
|
277490
|
+
}
|
|
277491
|
+
|
|
277492
|
+
// src/commands/platform/utils/formatting/format-service-sub-type.ts
|
|
277493
|
+
function formatServiceSubType(service, printToTerminal = true) {
|
|
277494
|
+
if ("__typename" in service && typeof service.__typename === "string") {
|
|
277495
|
+
return printToTerminal ? camelCaseToWords2(service.__typename) : service.__typename;
|
|
277496
|
+
}
|
|
277497
|
+
return printToTerminal ? "Unknown" : "Unknown";
|
|
277498
|
+
}
|
|
277393
277499
|
|
|
277394
277500
|
// src/commands/platform/utils/formatting/format-health-status.ts
|
|
277395
277501
|
function formatHealthStatus(healthStatus, printToTerminal = true) {
|
|
@@ -277502,9 +277608,9 @@ function servicesCommand() {
|
|
|
277502
277608
|
if (printToTerminal) {
|
|
277503
277609
|
table(`Services for ${selectedApplication.name} (${applicationUniqueName}) - ${getApplicationUrl(selectedInstance, selectedApplication)}`, servicesToShow);
|
|
277504
277610
|
} else if (output === "json") {
|
|
277505
|
-
|
|
277611
|
+
jsonOutput(data);
|
|
277506
277612
|
} else if (output === "yaml") {
|
|
277507
|
-
|
|
277613
|
+
yamlOutput(data);
|
|
277508
277614
|
}
|
|
277509
277615
|
if (printToTerminal) {
|
|
277510
277616
|
outro("Application services listed");
|
|
@@ -277582,9 +277688,71 @@ function getItemsForServiceType(services, serviceType) {
|
|
|
277582
277688
|
}
|
|
277583
277689
|
}
|
|
277584
277690
|
|
|
277691
|
+
// src/commands/platform/workspace/list.ts
|
|
277692
|
+
function workspacesListCommand() {
|
|
277693
|
+
return new Command("workspaces").alias("w").description("List workspaces").usage(createExamples([
|
|
277694
|
+
{
|
|
277695
|
+
description: "List workspaces",
|
|
277696
|
+
command: "platform list workspaces"
|
|
277697
|
+
},
|
|
277698
|
+
{
|
|
277699
|
+
description: "List workspaces in wide format with more information",
|
|
277700
|
+
command: "platform list workspaces -o wide"
|
|
277701
|
+
},
|
|
277702
|
+
{
|
|
277703
|
+
description: "List workspaces in JSON format",
|
|
277704
|
+
command: "platform list workspaces -o json > workspaces.json"
|
|
277705
|
+
},
|
|
277706
|
+
{
|
|
277707
|
+
description: "List workspaces in YAML format",
|
|
277708
|
+
command: "platform list workspaces -o yaml > workspaces.yaml"
|
|
277709
|
+
}
|
|
277710
|
+
])).addOption(new Option("-o, --output <output>", "The output format").choices(["wide", "json", "yaml"])).action(async ({ output }) => {
|
|
277711
|
+
const printToTerminal = !output || output === "wide";
|
|
277712
|
+
if (printToTerminal) {
|
|
277713
|
+
intro("Listing workspaces");
|
|
277714
|
+
}
|
|
277715
|
+
const env2 = await loadEnv(false, false);
|
|
277716
|
+
const selectedInstance = await instancePrompt(env2, true);
|
|
277717
|
+
const personalAccessToken = await getInstanceCredentials(selectedInstance);
|
|
277718
|
+
if (!personalAccessToken) {
|
|
277719
|
+
return missingPersonalAccessTokenError();
|
|
277720
|
+
}
|
|
277721
|
+
const settlemint = createSettleMintClient({
|
|
277722
|
+
accessToken: personalAccessToken.personalAccessToken,
|
|
277723
|
+
instance: selectedInstance
|
|
277724
|
+
});
|
|
277725
|
+
const workspaces = await workspaceSpinner(settlemint);
|
|
277726
|
+
const wide = output === "wide";
|
|
277727
|
+
const workspacesData = workspaces.map((workspace) => {
|
|
277728
|
+
const basicFields = {
|
|
277729
|
+
name: workspace.name,
|
|
277730
|
+
uniqueName: workspace.uniqueName
|
|
277731
|
+
};
|
|
277732
|
+
if (wide || !printToTerminal) {
|
|
277733
|
+
return {
|
|
277734
|
+
...basicFields,
|
|
277735
|
+
url: getWorkspaceUrl(selectedInstance, workspace)
|
|
277736
|
+
};
|
|
277737
|
+
}
|
|
277738
|
+
return basicFields;
|
|
277739
|
+
});
|
|
277740
|
+
if (printToTerminal) {
|
|
277741
|
+
table("Workspaces", workspacesData);
|
|
277742
|
+
} else if (output === "json") {
|
|
277743
|
+
jsonOutput(workspacesData);
|
|
277744
|
+
} else if (output === "yaml") {
|
|
277745
|
+
yamlOutput(workspacesData);
|
|
277746
|
+
}
|
|
277747
|
+
if (printToTerminal) {
|
|
277748
|
+
outro("Workspaces listed");
|
|
277749
|
+
}
|
|
277750
|
+
});
|
|
277751
|
+
}
|
|
277752
|
+
|
|
277585
277753
|
// src/commands/platform/list.ts
|
|
277586
277754
|
function listCommand() {
|
|
277587
|
-
return new Command("list").alias("ls").description("List resources in the SettleMint platform").addCommand(servicesCommand());
|
|
277755
|
+
return new Command("list").alias("ls").description("List resources in the SettleMint platform").addCommand(servicesCommand()).addCommand(workspacesListCommand()).addCommand(applicationsListCommand());
|
|
277588
277756
|
}
|
|
277589
277757
|
|
|
277590
277758
|
// src/commands/platform.ts
|
|
@@ -277876,7 +278044,9 @@ async function selectTargetNode({
|
|
|
277876
278044
|
env: env2,
|
|
277877
278045
|
nodes: nodesWithActivePrivateKey,
|
|
277878
278046
|
accept: autoAccept,
|
|
277879
|
-
isRequired: true
|
|
278047
|
+
isRequired: true,
|
|
278048
|
+
promptMessage: "Which blockchain node do you want to connect to? (Only nodes with private keys activated are shown)",
|
|
278049
|
+
singleOptionMessage: (node2) => `Using '${node2}' - the only node with active private keys. To use a different node, ensure it has a private key activated.`
|
|
277880
278050
|
});
|
|
277881
278051
|
if (!blockchainNode) {
|
|
277882
278052
|
return nothingSelectedError("EVM blockchain node");
|
|
@@ -277891,6 +278061,7 @@ async function selectTargetNode({
|
|
|
277891
278061
|
if (node.status !== "COMPLETED") {
|
|
277892
278062
|
serviceNotRunningError("blockchain node", node.status);
|
|
277893
278063
|
}
|
|
278064
|
+
note(`\uD83D\uDD17 Connected to blockchain node '${node.uniqueName}'`);
|
|
277894
278065
|
return node;
|
|
277895
278066
|
}
|
|
277896
278067
|
|
|
@@ -278571,4 +278742,4 @@ async function sdkCliCommand(argv = process.argv) {
|
|
|
278571
278742
|
// src/cli.ts
|
|
278572
278743
|
sdkCliCommand();
|
|
278573
278744
|
|
|
278574
|
-
//# debugId=
|
|
278745
|
+
//# debugId=9BD3F3D90604653C64756E2164756E21
|