@settlemint/sdk-cli 1.0.8-pra0091abe → 1.0.8-pra567894f
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 +23 -165
- package/dist/cli.js.map +17 -19
- 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.bKiZcipJFz:/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-pra567894f",
|
|
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.bKiZcipJFz:/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.bKiZcipJFz:/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.bKiZcipJFz:/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.bKiZcipJFz:/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-pra567894f",
|
|
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-pra567894f",
|
|
268467
|
+
"@settlemint/sdk-utils": "1.0.8-pra567894f",
|
|
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,7 +271919,6 @@ async function blockchainNodePrompt({
|
|
|
271923
271919
|
env: env2,
|
|
271924
271920
|
nodes,
|
|
271925
271921
|
accept,
|
|
271926
|
-
singleOptionMessage,
|
|
271927
271922
|
filterRunningOnly = false,
|
|
271928
271923
|
isRequired = false
|
|
271929
271924
|
}) {
|
|
@@ -271940,8 +271935,7 @@ async function blockchainNodePrompt({
|
|
|
271940
271935
|
choices: filteredChoices,
|
|
271941
271936
|
default: defaultNode
|
|
271942
271937
|
});
|
|
271943
|
-
}
|
|
271944
|
-
singleOptionMessage
|
|
271938
|
+
}
|
|
271945
271939
|
});
|
|
271946
271940
|
}
|
|
271947
271941
|
|
|
@@ -272113,9 +272107,6 @@ async function portalPrompt({
|
|
|
272113
272107
|
}
|
|
272114
272108
|
|
|
272115
272109
|
// src/prompts/cluster-service/thegraph.prompt.ts
|
|
272116
|
-
function isHAGraphMiddleware(middleware) {
|
|
272117
|
-
return middleware.__typename === "HAGraphMiddleware";
|
|
272118
|
-
}
|
|
272119
272110
|
async function theGraphPrompt({
|
|
272120
272111
|
env: env2,
|
|
272121
272112
|
middlewares,
|
|
@@ -272123,7 +272114,7 @@ async function theGraphPrompt({
|
|
|
272123
272114
|
filterRunningOnly = false,
|
|
272124
272115
|
isRequired = false
|
|
272125
272116
|
}) {
|
|
272126
|
-
const graphMiddlewares = middlewares.filter(
|
|
272117
|
+
const graphMiddlewares = middlewares.filter((middleware) => middleware.__typename === "HAGraphMiddleware");
|
|
272127
272118
|
return servicePrompt({
|
|
272128
272119
|
env: env2,
|
|
272129
272120
|
services: graphMiddlewares,
|
|
@@ -277293,6 +277284,14 @@ function configCommand() {
|
|
|
277293
277284
|
});
|
|
277294
277285
|
}
|
|
277295
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
|
+
|
|
277296
277295
|
// src/spinners/applications.spinner.ts
|
|
277297
277296
|
async function applicationsSpinner(settlemint, workspaceUniqueName) {
|
|
277298
277297
|
return spinner({
|
|
@@ -277392,83 +277391,6 @@ var $stringify = publicApi.stringify;
|
|
|
277392
277391
|
var $visit = visit2.visit;
|
|
277393
277392
|
var $visitAsync = visit2.visitAsync;
|
|
277394
277393
|
|
|
277395
|
-
// src/commands/platform/application/list.ts
|
|
277396
|
-
function applicationsListCommand() {
|
|
277397
|
-
return new Command("applications").alias("a").description("List applications").usage(createExamples([
|
|
277398
|
-
{
|
|
277399
|
-
description: "List applications",
|
|
277400
|
-
command: "platform list applications"
|
|
277401
|
-
},
|
|
277402
|
-
{
|
|
277403
|
-
description: "List applications in wide format with more information",
|
|
277404
|
-
command: "platform list applications -o wide"
|
|
277405
|
-
},
|
|
277406
|
-
{
|
|
277407
|
-
description: "List applications in JSON format",
|
|
277408
|
-
command: "platform list applications -o json > applications.json"
|
|
277409
|
-
},
|
|
277410
|
-
{
|
|
277411
|
-
description: "List applications in YAML format",
|
|
277412
|
-
command: "platform list applications -o yaml > applications.yaml"
|
|
277413
|
-
}
|
|
277414
|
-
])).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 }) => {
|
|
277415
|
-
const printToTerminal = !output || output === "wide";
|
|
277416
|
-
if (printToTerminal) {
|
|
277417
|
-
intro("Listing applications");
|
|
277418
|
-
}
|
|
277419
|
-
const env2 = await loadEnv(false, false);
|
|
277420
|
-
const selectedInstance = await instancePrompt(env2, true);
|
|
277421
|
-
const personalAccessToken = await getInstanceCredentials(selectedInstance);
|
|
277422
|
-
if (!personalAccessToken) {
|
|
277423
|
-
return missingPersonalAccessTokenError();
|
|
277424
|
-
}
|
|
277425
|
-
const settlemint = createSettleMintClient({
|
|
277426
|
-
accessToken: personalAccessToken.personalAccessToken,
|
|
277427
|
-
instance: selectedInstance
|
|
277428
|
-
});
|
|
277429
|
-
const workspaceUniqueName = workspace ?? env2.SETTLEMINT_WORKSPACE ?? await selectWorkspace(settlemint, env2);
|
|
277430
|
-
const applications = await applicationsSpinner(settlemint, workspaceUniqueName);
|
|
277431
|
-
const wide = output === "wide";
|
|
277432
|
-
const applicationsData = applications.map((application) => {
|
|
277433
|
-
const basicFields = {
|
|
277434
|
-
name: application.name,
|
|
277435
|
-
uniqueName: application.uniqueName
|
|
277436
|
-
};
|
|
277437
|
-
if (wide || !printToTerminal) {
|
|
277438
|
-
return {
|
|
277439
|
-
...basicFields,
|
|
277440
|
-
url: getApplicationUrl(selectedInstance, application)
|
|
277441
|
-
};
|
|
277442
|
-
}
|
|
277443
|
-
return basicFields;
|
|
277444
|
-
});
|
|
277445
|
-
if (printToTerminal) {
|
|
277446
|
-
const selectedWorkspace = await settlemint.workspace.read(workspaceUniqueName);
|
|
277447
|
-
table(`Applications for workspace ${selectedWorkspace.name} (${selectedWorkspace}) - ${getWorkspaceUrl(selectedInstance, selectedWorkspace)}`, applicationsData);
|
|
277448
|
-
} else if (output === "json") {
|
|
277449
|
-
console.log(JSON.stringify(applicationsData, null, 2));
|
|
277450
|
-
} else if (output === "yaml") {
|
|
277451
|
-
console.log($stringify(applicationsData));
|
|
277452
|
-
}
|
|
277453
|
-
if (printToTerminal) {
|
|
277454
|
-
outro("Applications listed");
|
|
277455
|
-
}
|
|
277456
|
-
});
|
|
277457
|
-
}
|
|
277458
|
-
async function selectWorkspace(settlemint, env2) {
|
|
277459
|
-
const workspaces = await workspaceSpinner(settlemint);
|
|
277460
|
-
const workspace = await workspacePrompt(env2, workspaces, true);
|
|
277461
|
-
return workspace.uniqueName;
|
|
277462
|
-
}
|
|
277463
|
-
|
|
277464
|
-
// src/commands/platform/utils/formatting/format-service-sub-type.ts
|
|
277465
|
-
function formatServiceSubType(service, printToTerminal = true) {
|
|
277466
|
-
if ("__typename" in service && typeof service.__typename === "string") {
|
|
277467
|
-
return printToTerminal ? camelCaseToWords2(service.__typename) : service.__typename;
|
|
277468
|
-
}
|
|
277469
|
-
return printToTerminal ? "Unknown" : "Unknown";
|
|
277470
|
-
}
|
|
277471
|
-
|
|
277472
277394
|
// src/commands/platform/utils/formatting/format-health-status.ts
|
|
277473
277395
|
function formatHealthStatus(healthStatus, printToTerminal = true) {
|
|
277474
277396
|
if (healthStatus === "HEALTHY") {
|
|
@@ -277660,71 +277582,9 @@ function getItemsForServiceType(services, serviceType) {
|
|
|
277660
277582
|
}
|
|
277661
277583
|
}
|
|
277662
277584
|
|
|
277663
|
-
// src/commands/platform/workspace/list.ts
|
|
277664
|
-
function workspacesListCommand() {
|
|
277665
|
-
return new Command("workspaces").alias("w").description("List workspaces").usage(createExamples([
|
|
277666
|
-
{
|
|
277667
|
-
description: "List workspaces",
|
|
277668
|
-
command: "platform list workspaces"
|
|
277669
|
-
},
|
|
277670
|
-
{
|
|
277671
|
-
description: "List workspaces in wide format with more information",
|
|
277672
|
-
command: "platform list workspaces -o wide"
|
|
277673
|
-
},
|
|
277674
|
-
{
|
|
277675
|
-
description: "List workspaces in JSON format",
|
|
277676
|
-
command: "platform list workspaces -o json > workspaces.json"
|
|
277677
|
-
},
|
|
277678
|
-
{
|
|
277679
|
-
description: "List workspaces in YAML format",
|
|
277680
|
-
command: "platform list workspaces -o yaml > workspaces.yaml"
|
|
277681
|
-
}
|
|
277682
|
-
])).addOption(new Option("-o, --output <output>", "The output format").choices(["wide", "json", "yaml"])).action(async ({ output }) => {
|
|
277683
|
-
const printToTerminal = !output || output === "wide";
|
|
277684
|
-
if (printToTerminal) {
|
|
277685
|
-
intro("Listing workspaces");
|
|
277686
|
-
}
|
|
277687
|
-
const env2 = await loadEnv(false, false);
|
|
277688
|
-
const selectedInstance = await instancePrompt(env2, true);
|
|
277689
|
-
const personalAccessToken = await getInstanceCredentials(selectedInstance);
|
|
277690
|
-
if (!personalAccessToken) {
|
|
277691
|
-
return missingPersonalAccessTokenError();
|
|
277692
|
-
}
|
|
277693
|
-
const settlemint = createSettleMintClient({
|
|
277694
|
-
accessToken: personalAccessToken.personalAccessToken,
|
|
277695
|
-
instance: selectedInstance
|
|
277696
|
-
});
|
|
277697
|
-
const workspaces = await workspaceSpinner(settlemint);
|
|
277698
|
-
const wide = output === "wide";
|
|
277699
|
-
const workspacesData = workspaces.map((workspace) => {
|
|
277700
|
-
const basicFields = {
|
|
277701
|
-
name: workspace.name,
|
|
277702
|
-
uniqueName: workspace.uniqueName
|
|
277703
|
-
};
|
|
277704
|
-
if (wide || !printToTerminal) {
|
|
277705
|
-
return {
|
|
277706
|
-
...basicFields,
|
|
277707
|
-
url: getWorkspaceUrl(selectedInstance, workspace)
|
|
277708
|
-
};
|
|
277709
|
-
}
|
|
277710
|
-
return basicFields;
|
|
277711
|
-
});
|
|
277712
|
-
if (printToTerminal) {
|
|
277713
|
-
table("Workspaces", workspacesData);
|
|
277714
|
-
} else if (output === "json") {
|
|
277715
|
-
console.log(JSON.stringify(workspacesData, null, 2));
|
|
277716
|
-
} else if (output === "yaml") {
|
|
277717
|
-
console.log($stringify(workspacesData));
|
|
277718
|
-
}
|
|
277719
|
-
if (printToTerminal) {
|
|
277720
|
-
outro("Workspaces listed");
|
|
277721
|
-
}
|
|
277722
|
-
});
|
|
277723
|
-
}
|
|
277724
|
-
|
|
277725
277585
|
// src/commands/platform/list.ts
|
|
277726
277586
|
function listCommand() {
|
|
277727
|
-
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());
|
|
277728
277588
|
}
|
|
277729
277589
|
|
|
277730
277590
|
// src/commands/platform.ts
|
|
@@ -278016,8 +277876,7 @@ async function selectTargetNode({
|
|
|
278016
277876
|
env: env2,
|
|
278017
277877
|
nodes: nodesWithActivePrivateKey,
|
|
278018
277878
|
accept: autoAccept,
|
|
278019
|
-
isRequired: true
|
|
278020
|
-
singleOptionMessage: (node2) => `Using '${node2}' - the only node with active private keys. To use a different node, ensure it has activated private keys.`
|
|
277879
|
+
isRequired: true
|
|
278021
277880
|
});
|
|
278022
277881
|
if (!blockchainNode) {
|
|
278023
277882
|
return nothingSelectedError("EVM blockchain node");
|
|
@@ -278032,7 +277891,6 @@ async function selectTargetNode({
|
|
|
278032
277891
|
if (node.status !== "COMPLETED") {
|
|
278033
277892
|
serviceNotRunningError("blockchain node", node.status);
|
|
278034
277893
|
}
|
|
278035
|
-
note(`\uD83D\uDD17 Connected to blockchain node '${node.uniqueName}'`);
|
|
278036
277894
|
return node;
|
|
278037
277895
|
}
|
|
278038
277896
|
|
|
@@ -278713,4 +278571,4 @@ async function sdkCliCommand(argv = process.argv) {
|
|
|
278713
278571
|
// src/cli.ts
|
|
278714
278572
|
sdkCliCommand();
|
|
278715
278573
|
|
|
278716
|
-
//# debugId=
|
|
278574
|
+
//# debugId=7E57005B7033C7CD64756E2164756E21
|