@settlemint/sdk-cli 1.0.8-main8a757dd6 → 1.0.8-main8adcdc2a
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 +89 -260
- package/dist/cli.js.map +20 -24
- 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.c128jP8DXL:/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-main8adcdc2a",
|
|
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.c128jP8DXL:/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.c128jP8DXL:/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.c128jP8DXL:/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.c128jP8DXL:/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-main8adcdc2a",
|
|
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-main8adcdc2a",
|
|
268467
|
+
"@settlemint/sdk-utils": "1.0.8-main8adcdc2a",
|
|
268468
268468
|
"get-tsconfig": "4.10.0",
|
|
268469
268469
|
giget: "1.2.3",
|
|
268470
268470
|
yaml: "2.7.0"
|
|
@@ -271885,8 +271885,7 @@ async function servicePrompt({
|
|
|
271885
271885
|
envKey,
|
|
271886
271886
|
defaultHandler,
|
|
271887
271887
|
isRequired = false,
|
|
271888
|
-
isCi = is_in_ci_default
|
|
271889
|
-
singleOptionMessage
|
|
271888
|
+
isCi = is_in_ci_default
|
|
271890
271889
|
}) {
|
|
271891
271890
|
if (services.length === 0) {
|
|
271892
271891
|
return;
|
|
@@ -271900,9 +271899,6 @@ async function servicePrompt({
|
|
|
271900
271899
|
return;
|
|
271901
271900
|
}
|
|
271902
271901
|
if (isRequired && services.length === 1) {
|
|
271903
|
-
if (singleOptionMessage) {
|
|
271904
|
-
note(singleOptionMessage(services[0].uniqueName));
|
|
271905
|
-
}
|
|
271906
271902
|
return services[0];
|
|
271907
271903
|
}
|
|
271908
271904
|
const choices = services.map((service) => ({
|
|
@@ -271923,8 +271919,6 @@ async function blockchainNodePrompt({
|
|
|
271923
271919
|
env: env2,
|
|
271924
271920
|
nodes,
|
|
271925
271921
|
accept,
|
|
271926
|
-
singleOptionMessage,
|
|
271927
|
-
promptMessage,
|
|
271928
271922
|
filterRunningOnly = false,
|
|
271929
271923
|
isRequired = false
|
|
271930
271924
|
}) {
|
|
@@ -271937,12 +271931,11 @@ async function blockchainNodePrompt({
|
|
|
271937
271931
|
defaultHandler: async ({ defaultService: defaultNode, choices }) => {
|
|
271938
271932
|
const filteredChoices = filterRunningOnly ? choices.filter(({ value: node }) => node === undefined || node?.status === "COMPLETED") : choices;
|
|
271939
271933
|
return esm_default2({
|
|
271940
|
-
message:
|
|
271934
|
+
message: "Which blockchain node do you want to connect to?",
|
|
271941
271935
|
choices: filteredChoices,
|
|
271942
271936
|
default: defaultNode
|
|
271943
271937
|
});
|
|
271944
|
-
}
|
|
271945
|
-
singleOptionMessage
|
|
271938
|
+
}
|
|
271946
271939
|
});
|
|
271947
271940
|
}
|
|
271948
271941
|
|
|
@@ -272114,9 +272107,6 @@ async function portalPrompt({
|
|
|
272114
272107
|
}
|
|
272115
272108
|
|
|
272116
272109
|
// src/prompts/cluster-service/thegraph.prompt.ts
|
|
272117
|
-
function isHAGraphMiddleware(middleware) {
|
|
272118
|
-
return middleware.__typename === "HAGraphMiddleware";
|
|
272119
|
-
}
|
|
272120
272110
|
async function theGraphPrompt({
|
|
272121
272111
|
env: env2,
|
|
272122
272112
|
middlewares,
|
|
@@ -272124,7 +272114,7 @@ async function theGraphPrompt({
|
|
|
272124
272114
|
filterRunningOnly = false,
|
|
272125
272115
|
isRequired = false
|
|
272126
272116
|
}) {
|
|
272127
|
-
const graphMiddlewares = middlewares.filter(
|
|
272117
|
+
const graphMiddlewares = middlewares.filter((middleware) => middleware.__typename === "HAGraphMiddleware");
|
|
272128
272118
|
return servicePrompt({
|
|
272129
272119
|
env: env2,
|
|
272130
272120
|
services: graphMiddlewares,
|
|
@@ -277261,69 +277251,10 @@ function updateCommand() {
|
|
|
277261
277251
|
return new Command("update").alias("u").description("Update a resource in the SettleMint platform").addCommand(customDeploymentsUpdateCommand());
|
|
277262
277252
|
}
|
|
277263
277253
|
|
|
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
|
-
|
|
277320
277254
|
// src/commands/platform/config.ts
|
|
277321
277255
|
function configCommand() {
|
|
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)").
|
|
277323
|
-
|
|
277324
|
-
if (printToTerminal) {
|
|
277325
|
-
intro("Getting platform configuration");
|
|
277326
|
-
}
|
|
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
|
+
intro("Getting platform configuration");
|
|
277327
277258
|
const env2 = await loadEnv(false, !!prod);
|
|
277328
277259
|
const selectedInstance = instance ? sanitizeAndValidateInstanceUrl(instance) : await instancePrompt(env2, true);
|
|
277329
277260
|
const settlemint = createSettleMintClient({
|
|
@@ -277334,39 +277265,33 @@ function configCommand() {
|
|
|
277334
277265
|
const platformConfig = await settlemint.platform.config();
|
|
277335
277266
|
const useCases = getUseCases(platformConfig);
|
|
277336
277267
|
const starterkits = getStarterkits(platformConfig);
|
|
277337
|
-
|
|
277338
|
-
|
|
277339
|
-
|
|
277340
|
-
|
|
277341
|
-
|
|
277342
|
-
|
|
277343
|
-
|
|
277344
|
-
|
|
277345
|
-
|
|
277346
|
-
|
|
277347
|
-
|
|
277348
|
-
|
|
277349
|
-
|
|
277350
|
-
|
|
277351
|
-
|
|
277352
|
-
|
|
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
|
-
}
|
|
277268
|
+
table("Templates (Starterkits)", starterkits.map((starterkit) => ({
|
|
277269
|
+
id: starterkit.id,
|
|
277270
|
+
name: starterkit.name
|
|
277271
|
+
})).sort((a7, b4) => a7.name.localeCompare(b4.name)));
|
|
277272
|
+
table("Use cases (Smart Contract Sets)", useCases.map((useCase) => ({
|
|
277273
|
+
id: useCase.id,
|
|
277274
|
+
name: useCase.name
|
|
277275
|
+
})).sort((a7, b4) => a7.name.localeCompare(b4.name)));
|
|
277276
|
+
table("Providers and regions", platformConfig.deploymentEngineTargets.filter((provider) => !provider.disabled).flatMap((provider) => provider.clusters.filter((cluster) => !cluster.disabled).map((region) => ({
|
|
277277
|
+
providerId: provider.id,
|
|
277278
|
+
regionId: getRegionId(region.id),
|
|
277279
|
+
providerName: provider.name,
|
|
277280
|
+
regionName: region.name
|
|
277281
|
+
}))).sort((a7, b4) => a7.providerId.localeCompare(b4.providerId) || a7.regionId.localeCompare(b4.regionId)));
|
|
277282
|
+
list("Pre-deployed abis (Smart Contract Portal)", platformConfig.preDeployedContracts.sort());
|
|
277283
|
+
outro("Platform configuration retrieved");
|
|
277367
277284
|
});
|
|
277368
277285
|
}
|
|
277369
277286
|
|
|
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
|
+
|
|
277370
277295
|
// src/spinners/applications.spinner.ts
|
|
277371
277296
|
async function applicationsSpinner(settlemint, workspaceUniqueName) {
|
|
277372
277297
|
return spinner({
|
|
@@ -277420,82 +277345,51 @@ function getApplicationUrlPath(application) {
|
|
|
277420
277345
|
return `/applications/${encodeURIComponent(application.id)}`;
|
|
277421
277346
|
}
|
|
277422
277347
|
|
|
277423
|
-
//
|
|
277424
|
-
|
|
277425
|
-
|
|
277426
|
-
|
|
277427
|
-
|
|
277428
|
-
|
|
277429
|
-
|
|
277430
|
-
|
|
277431
|
-
|
|
277432
|
-
|
|
277433
|
-
|
|
277434
|
-
|
|
277435
|
-
|
|
277436
|
-
|
|
277437
|
-
|
|
277438
|
-
|
|
277439
|
-
|
|
277440
|
-
|
|
277441
|
-
|
|
277442
|
-
|
|
277443
|
-
|
|
277444
|
-
|
|
277445
|
-
|
|
277446
|
-
|
|
277447
|
-
|
|
277448
|
-
|
|
277449
|
-
|
|
277450
|
-
|
|
277451
|
-
|
|
277452
|
-
|
|
277453
|
-
|
|
277454
|
-
|
|
277455
|
-
|
|
277456
|
-
|
|
277457
|
-
|
|
277458
|
-
|
|
277459
|
-
|
|
277460
|
-
|
|
277461
|
-
|
|
277462
|
-
|
|
277463
|
-
|
|
277464
|
-
|
|
277465
|
-
|
|
277466
|
-
|
|
277467
|
-
|
|
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
|
-
}
|
|
277348
|
+
// ../../node_modules/yaml/dist/index.js
|
|
277349
|
+
var composer = require_composer();
|
|
277350
|
+
var Document = require_Document();
|
|
277351
|
+
var Schema = require_Schema();
|
|
277352
|
+
var errors2 = require_errors3();
|
|
277353
|
+
var Alias = require_Alias();
|
|
277354
|
+
var identity3 = require_identity();
|
|
277355
|
+
var Pair = require_Pair();
|
|
277356
|
+
var Scalar = require_Scalar();
|
|
277357
|
+
var YAMLMap = require_YAMLMap();
|
|
277358
|
+
var YAMLSeq = require_YAMLSeq();
|
|
277359
|
+
var cst = require_cst();
|
|
277360
|
+
var lexer = require_lexer2();
|
|
277361
|
+
var lineCounter = require_line_counter();
|
|
277362
|
+
var parser = require_parser2();
|
|
277363
|
+
var publicApi = require_public_api();
|
|
277364
|
+
var visit2 = require_visit();
|
|
277365
|
+
var $Composer = composer.Composer;
|
|
277366
|
+
var $Document = Document.Document;
|
|
277367
|
+
var $Schema = Schema.Schema;
|
|
277368
|
+
var $YAMLError = errors2.YAMLError;
|
|
277369
|
+
var $YAMLParseError = errors2.YAMLParseError;
|
|
277370
|
+
var $YAMLWarning = errors2.YAMLWarning;
|
|
277371
|
+
var $Alias = Alias.Alias;
|
|
277372
|
+
var $isAlias = identity3.isAlias;
|
|
277373
|
+
var $isCollection = identity3.isCollection;
|
|
277374
|
+
var $isDocument = identity3.isDocument;
|
|
277375
|
+
var $isMap = identity3.isMap;
|
|
277376
|
+
var $isNode = identity3.isNode;
|
|
277377
|
+
var $isPair = identity3.isPair;
|
|
277378
|
+
var $isScalar = identity3.isScalar;
|
|
277379
|
+
var $isSeq = identity3.isSeq;
|
|
277380
|
+
var $Pair = Pair.Pair;
|
|
277381
|
+
var $Scalar = Scalar.Scalar;
|
|
277382
|
+
var $YAMLMap = YAMLMap.YAMLMap;
|
|
277383
|
+
var $YAMLSeq = YAMLSeq.YAMLSeq;
|
|
277384
|
+
var $Lexer = lexer.Lexer;
|
|
277385
|
+
var $LineCounter = lineCounter.LineCounter;
|
|
277386
|
+
var $Parser = parser.Parser;
|
|
277387
|
+
var $parse = publicApi.parse;
|
|
277388
|
+
var $parseAllDocuments = publicApi.parseAllDocuments;
|
|
277389
|
+
var $parseDocument = publicApi.parseDocument;
|
|
277390
|
+
var $stringify = publicApi.stringify;
|
|
277391
|
+
var $visit = visit2.visit;
|
|
277392
|
+
var $visitAsync = visit2.visitAsync;
|
|
277499
277393
|
|
|
277500
277394
|
// src/commands/platform/utils/formatting/format-health-status.ts
|
|
277501
277395
|
function formatHealthStatus(healthStatus, printToTerminal = true) {
|
|
@@ -277608,9 +277502,9 @@ function servicesCommand() {
|
|
|
277608
277502
|
if (printToTerminal) {
|
|
277609
277503
|
table(`Services for ${selectedApplication.name} (${applicationUniqueName}) - ${getApplicationUrl(selectedInstance, selectedApplication)}`, servicesToShow);
|
|
277610
277504
|
} else if (output === "json") {
|
|
277611
|
-
|
|
277505
|
+
console.log(JSON.stringify(data, null, 2));
|
|
277612
277506
|
} else if (output === "yaml") {
|
|
277613
|
-
|
|
277507
|
+
console.log($stringify(data));
|
|
277614
277508
|
}
|
|
277615
277509
|
if (printToTerminal) {
|
|
277616
277510
|
outro("Application services listed");
|
|
@@ -277688,71 +277582,9 @@ function getItemsForServiceType(services, serviceType) {
|
|
|
277688
277582
|
}
|
|
277689
277583
|
}
|
|
277690
277584
|
|
|
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
|
-
|
|
277753
277585
|
// src/commands/platform/list.ts
|
|
277754
277586
|
function listCommand() {
|
|
277755
|
-
return new Command("list").alias("ls").description("List resources in the SettleMint platform").addCommand(servicesCommand())
|
|
277587
|
+
return new Command("list").alias("ls").description("List resources in the SettleMint platform").addCommand(servicesCommand());
|
|
277756
277588
|
}
|
|
277757
277589
|
|
|
277758
277590
|
// src/commands/platform.ts
|
|
@@ -278044,9 +277876,7 @@ async function selectTargetNode({
|
|
|
278044
277876
|
env: env2,
|
|
278045
277877
|
nodes: nodesWithActivePrivateKey,
|
|
278046
277878
|
accept: autoAccept,
|
|
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.`
|
|
277879
|
+
isRequired: true
|
|
278050
277880
|
});
|
|
278051
277881
|
if (!blockchainNode) {
|
|
278052
277882
|
return nothingSelectedError("EVM blockchain node");
|
|
@@ -278061,7 +277891,6 @@ async function selectTargetNode({
|
|
|
278061
277891
|
if (node.status !== "COMPLETED") {
|
|
278062
277892
|
serviceNotRunningError("blockchain node", node.status);
|
|
278063
277893
|
}
|
|
278064
|
-
note(`\uD83D\uDD17 Connected to blockchain node '${node.uniqueName}'`);
|
|
278065
277894
|
return node;
|
|
278066
277895
|
}
|
|
278067
277896
|
|
|
@@ -278742,4 +278571,4 @@ async function sdkCliCommand(argv = process.argv) {
|
|
|
278742
278571
|
// src/cli.ts
|
|
278743
278572
|
sdkCliCommand();
|
|
278744
278573
|
|
|
278745
|
-
//# debugId=
|
|
278574
|
+
//# debugId=0AF9DA314ABD3EEA64756E2164756E21
|