@settlemint/sdk-cli 2.3.1-pr04499351 → 2.3.1-pr0f4b4be1
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 +24 -17
- package/dist/cli.js.map +6 -6
- package/package.json +3 -3
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-pr0f4b4be1",
|
247894
247894
|
type: "module",
|
247895
247895
|
private: false,
|
247896
247896
|
license: "FSL-1.1-MIT",
|
@@ -247939,8 +247939,8 @@ 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-
|
247942
|
+
"@settlemint/sdk-js": "2.3.1-pr0f4b4be1",
|
247943
|
+
"@settlemint/sdk-utils": "2.3.1-pr0f4b4be1",
|
247944
247944
|
"@types/node": "22.15.19",
|
247945
247945
|
"@types/semver": "7.7.0",
|
247946
247946
|
"@types/which": "3.0.4",
|
@@ -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);
|
@@ -262741,10 +262748,10 @@ function hardhatBuildCommand() {
|
|
262741
262748
|
description: "Build the smart contracts using additional options to the Hardhat compile command",
|
262742
262749
|
command: "scs hardhat build --concurrency 2"
|
262743
262750
|
}
|
262744
|
-
])).helpOption(false).option("-h, --help", "Get list of possible hardhat compile options").passThroughOptions().allowUnknownOption(true).action(async (
|
262751
|
+
])).helpOption(false).option("-h, --help", "Get list of possible hardhat compile options").passThroughOptions().allowUnknownOption(true).arguments("[operands...]").action(async (operands, options, cmd2) => {
|
262745
262752
|
intro("Building smart contracts using Hardhat");
|
262746
262753
|
await validateIfRequiredPackagesAreInstalled(["hardhat"]);
|
262747
|
-
const hardhatOptions = mapPassthroughOptions(
|
262754
|
+
const hardhatOptions = mapPassthroughOptions(options, { args: operands });
|
262748
262755
|
const { command, args } = await getPackageManagerExecutable();
|
262749
262756
|
await executeCommand(command, [...args, "hardhat", "compile", ...hardhatOptions]);
|
262750
262757
|
outro("Smart contracts built successfully");
|
@@ -263046,10 +263053,10 @@ function hardhatNetworkCommand() {
|
|
263046
263053
|
description: "Start a development network using Hardhat with a specific port",
|
263047
263054
|
command: "scs hardhat network --port 3000"
|
263048
263055
|
}
|
263049
|
-
])).helpOption(false).option("-h, --help", "Get list of possible hardhat node options").passThroughOptions().allowUnknownOption(true).action(async (
|
263056
|
+
])).helpOption(false).option("-h, --help", "Get list of possible hardhat node options").passThroughOptions().allowUnknownOption(true).arguments("[operands...]").action(async (operands, options, cmd2) => {
|
263050
263057
|
intro("Starting development network using Hardhat");
|
263051
263058
|
await validateIfRequiredPackagesAreInstalled(["hardhat"]);
|
263052
|
-
const hardhatOptions = mapPassthroughOptions(
|
263059
|
+
const hardhatOptions = mapPassthroughOptions(options, { args: operands });
|
263053
263060
|
const { command, args } = await getPackageManagerExecutable();
|
263054
263061
|
await executeCommand(command, [...args, "hardhat", "node", ...hardhatOptions]);
|
263055
263062
|
outro("Development network started successfully");
|
@@ -263147,10 +263154,10 @@ function hardhatTestCommand() {
|
|
263147
263154
|
description: "Run a specific test file",
|
263148
263155
|
command: "scs hardhat test test/token.test.ts"
|
263149
263156
|
}
|
263150
|
-
])).helpOption(false).option("-h, --help", "Get list of possible hardhat test options").passThroughOptions().allowUnknownOption().action(async (options, cmd2) => {
|
263157
|
+
])).helpOption(false).option("-h, --help", "Get list of possible hardhat test options").passThroughOptions().allowUnknownOption(true).arguments("[operands...]").action(async (operands, options, cmd2) => {
|
263151
263158
|
intro("Running smart contract tests using Hardhat");
|
263152
263159
|
await validateIfRequiredPackagesAreInstalled(["hardhat"]);
|
263153
|
-
const hardhatOptions = mapPassthroughOptions(options,
|
263160
|
+
const hardhatOptions = mapPassthroughOptions(options, { args: operands });
|
263154
263161
|
const { command, args } = await getPackageManagerExecutable();
|
263155
263162
|
await executeCommand(command, [...args, "hardhat", "test", ...hardhatOptions]);
|
263156
263163
|
outro("Smart contract tests completed");
|
@@ -263654,4 +263661,4 @@ async function sdkCliCommand(argv = process.argv) {
|
|
263654
263661
|
// src/cli.ts
|
263655
263662
|
sdkCliCommand();
|
263656
263663
|
|
263657
|
-
//# debugId=
|
263664
|
+
//# debugId=A6EE5263E8C9240064756E2164756E21
|