@settlemint/sdk-cli 2.3.1-pr1584cccc → 2.3.1-pr49e0267d
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 +19 -12
- package/dist/cli.js.map +3 -3
- package/package.json +4 -4
package/dist/cli.js
CHANGED
@@ -247890,7 +247890,7 @@ function pruneCurrentEnv(currentEnv, env2) {
|
|
247890
247890
|
var package_default = {
|
247891
247891
|
name: "@settlemint/sdk-cli",
|
247892
247892
|
description: "Command-line interface for SettleMint SDK, providing development tools and project management capabilities",
|
247893
|
-
version: "2.3.1-
|
247893
|
+
version: "2.3.1-pr49e0267d",
|
247894
247894
|
type: "module",
|
247895
247895
|
private: false,
|
247896
247896
|
license: "FSL-1.1-MIT",
|
@@ -247939,9 +247939,9 @@ var package_default = {
|
|
247939
247939
|
"@inquirer/input": "4.1.10",
|
247940
247940
|
"@inquirer/password": "4.0.13",
|
247941
247941
|
"@inquirer/select": "4.2.1",
|
247942
|
-
"@settlemint/sdk-js": "2.3.1-
|
247943
|
-
"@settlemint/sdk-utils": "2.3.1-
|
247944
|
-
"@types/node": "22.15.
|
247942
|
+
"@settlemint/sdk-js": "2.3.1-pr49e0267d",
|
247943
|
+
"@settlemint/sdk-utils": "2.3.1-pr49e0267d",
|
247944
|
+
"@types/node": "22.15.21",
|
247945
247945
|
"@types/semver": "7.7.0",
|
247946
247946
|
"@types/which": "3.0.4",
|
247947
247947
|
"get-tsconfig": "4.10.0",
|
@@ -262307,7 +262307,7 @@ function servicesCommand() {
|
|
262307
262307
|
description: "List the application services for multiple types",
|
262308
262308
|
command: "platform list services --type blockchain-network blockchain-node middleware"
|
262309
262309
|
}
|
262310
|
-
])).option("--app, --application <application>", "The application unique name to list the services in (defaults to application from env)").addOption(new Option("-t, --type <type...>", "The type(s) of service to list").choices(SERVICE_TYPES)).addOption(new Option("-o, --output <output>", "The output format").choices(["wide", "json", "yaml"])).action(async (
|
262310
|
+
])).option("--app, --application <application>", "The application unique name to list the services in (defaults to application from env)").addOption(new Option("-t, --type <type...>", "The type(s) of service to list").choices(SERVICE_TYPES)).addOption(new Option("-o, --output <output>", "The output format").choices(["wide", "json", "yaml"])).arguments("[typeOperands...]").action(async (typeOperands, options) => {
|
262311
262311
|
intro("Listing application services");
|
262312
262312
|
const env2 = await loadEnv(false, false);
|
262313
262313
|
const selectedInstance = await instancePrompt(env2, true);
|
@@ -262320,17 +262320,24 @@ function servicesCommand() {
|
|
262320
262320
|
accessToken,
|
262321
262321
|
instance: selectedInstance
|
262322
262322
|
});
|
262323
|
-
const printToTerminal = !output || output === "wide";
|
262324
|
-
const applicationUniqueName = application ?? env2.SETTLEMINT_APPLICATION ?? (printToTerminal ? await selectApplication(settlemint, env2) : null);
|
262323
|
+
const printToTerminal = !options.output || options.output === "wide";
|
262324
|
+
const applicationUniqueName = options.application ?? env2.SETTLEMINT_APPLICATION ?? (printToTerminal ? await selectApplication(settlemint, env2) : null);
|
262325
262325
|
if (!applicationUniqueName) {
|
262326
262326
|
return nothingSelectedError("application");
|
262327
262327
|
}
|
262328
|
-
|
262328
|
+
let effectiveTypes = undefined;
|
262329
|
+
if (options.type && options.type.length > 0) {
|
262330
|
+
effectiveTypes = options.type;
|
262331
|
+
} else if (typeOperands && typeOperands.length > 0) {
|
262332
|
+
effectiveTypes = typeOperands.filter((op) => SERVICE_TYPES.includes(op));
|
262333
|
+
if (effectiveTypes.length === 0 && typeOperands.length > 0) {}
|
262334
|
+
}
|
262335
|
+
const wide = options.output === "wide";
|
262329
262336
|
const servicesToShow = await getServicesAndMapResults({
|
262330
262337
|
instance: selectedInstance,
|
262331
262338
|
settlemint,
|
262332
262339
|
applicationUniqueName,
|
262333
|
-
types:
|
262340
|
+
types: effectiveTypes,
|
262334
262341
|
printToTerminal,
|
262335
262342
|
wide
|
262336
262343
|
});
|
@@ -262348,9 +262355,9 @@ function servicesCommand() {
|
|
262348
262355
|
},
|
262349
262356
|
services: servicesToShow
|
262350
262357
|
};
|
262351
|
-
if (output === "json") {
|
262358
|
+
if (options.output === "json") {
|
262352
262359
|
jsonOutput(data);
|
262353
|
-
} else if (output === "yaml") {
|
262360
|
+
} else if (options.output === "yaml") {
|
262354
262361
|
yamlOutput(data);
|
262355
262362
|
} else {
|
262356
262363
|
table(`Services for ${selectedApplication.name} (${applicationUniqueName}) - ${getApplicationUrl(selectedInstance, selectedApplication)}`, servicesToShow);
|
@@ -263654,4 +263661,4 @@ async function sdkCliCommand(argv = process.argv) {
|
|
263654
263661
|
// src/cli.ts
|
263655
263662
|
sdkCliCommand();
|
263656
263663
|
|
263657
|
-
//# debugId=
|
263664
|
+
//# debugId=28ABA976C385F30A64756E2164756E21
|