@settlemint/sdk-cli 1.1.0-prfd530c68 → 1.1.0
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 +12 -31
- package/dist/cli.js.map +5 -5
- package/package.json +3 -3
package/dist/cli.js
CHANGED
|
@@ -267029,7 +267029,7 @@ function pruneCurrentEnv(currentEnv, env2) {
|
|
|
267029
267029
|
var package_default = {
|
|
267030
267030
|
name: "@settlemint/sdk-cli",
|
|
267031
267031
|
description: "Command-line interface for SettleMint SDK, providing development tools and project management capabilities",
|
|
267032
|
-
version: "1.1.0
|
|
267032
|
+
version: "1.1.0",
|
|
267033
267033
|
type: "module",
|
|
267034
267034
|
private: false,
|
|
267035
267035
|
license: "FSL-1.1-MIT",
|
|
@@ -267077,8 +267077,8 @@ var package_default = {
|
|
|
267077
267077
|
"@inquirer/input": "4.1.3",
|
|
267078
267078
|
"@inquirer/password": "4.0.6",
|
|
267079
267079
|
"@inquirer/select": "4.0.6",
|
|
267080
|
-
"@settlemint/sdk-js": "1.1.0
|
|
267081
|
-
"@settlemint/sdk-utils": "1.1.0
|
|
267080
|
+
"@settlemint/sdk-js": "1.1.0",
|
|
267081
|
+
"@settlemint/sdk-utils": "1.1.0",
|
|
267082
267082
|
"@types/node": "22.12.0",
|
|
267083
267083
|
"@types/semver": "7.5.8",
|
|
267084
267084
|
"@types/which": "3.0.4",
|
|
@@ -267252,31 +267252,22 @@ var outro = (msg) => {
|
|
|
267252
267252
|
console.log(inverse(greenBright(maskTokens2(msg))));
|
|
267253
267253
|
console.log("");
|
|
267254
267254
|
};
|
|
267255
|
-
var SpinnerError = class extends Error {
|
|
267256
|
-
};
|
|
267257
267255
|
var spinner = async (options) => {
|
|
267258
|
-
const handleError = (error) => {
|
|
267259
|
-
const errorMessage = maskTokens2(error.message);
|
|
267260
|
-
note(redBright(`${errorMessage}
|
|
267261
|
-
|
|
267262
|
-
${error.stack}`));
|
|
267263
|
-
throw new SpinnerError(errorMessage);
|
|
267264
|
-
};
|
|
267265
267256
|
if (is_in_ci_default) {
|
|
267266
|
-
|
|
267267
|
-
return await options.task();
|
|
267268
|
-
} catch (err) {
|
|
267269
|
-
return handleError(err);
|
|
267270
|
-
}
|
|
267257
|
+
return options.task();
|
|
267271
267258
|
}
|
|
267272
267259
|
const spinner2 = yoctoSpinner().start(options.startMessage);
|
|
267273
267260
|
try {
|
|
267274
267261
|
const result = await options.task(spinner2);
|
|
267275
267262
|
spinner2.success(options.stopMessage);
|
|
267276
267263
|
return result;
|
|
267277
|
-
} catch (
|
|
267264
|
+
} catch (error) {
|
|
267278
267265
|
spinner2.error(redBright(`${options.startMessage} --> Error!`));
|
|
267279
|
-
|
|
267266
|
+
const errorMessage = maskTokens2(error.message);
|
|
267267
|
+
note(redBright(`${errorMessage}
|
|
267268
|
+
|
|
267269
|
+
${error.stack}`));
|
|
267270
|
+
throw new Error(errorMessage);
|
|
267280
267271
|
}
|
|
267281
267272
|
};
|
|
267282
267273
|
function capitalizeFirstLetter(val) {
|
|
@@ -269838,10 +269829,6 @@ async function validateSdkVersion(instance) {
|
|
|
269838
269829
|
const platformConfig = await settlemint.platform.config();
|
|
269839
269830
|
const currentVersion = package_default.version;
|
|
269840
269831
|
if (semver.gt(currentVersion, platformConfig.sdkVersion)) {
|
|
269841
|
-
const isManagedInstance = instance.toLowerCase().includes(".settlemint.com");
|
|
269842
|
-
if (isManagedInstance) {
|
|
269843
|
-
return;
|
|
269844
|
-
}
|
|
269845
269832
|
const instructions = await getUpgradeInstructions();
|
|
269846
269833
|
note(`SDK CLI version mismatch. The platform requires version '${platformConfig.sdkVersion}' but you are using a newer version '${currentVersion}'. This might lead to compatibility issues with the platform.
|
|
269847
269834
|
|
|
@@ -277899,7 +277886,7 @@ async function onError(sdkcli, argv, error5) {
|
|
|
277899
277886
|
await telemetry({
|
|
277900
277887
|
command: commandPath,
|
|
277901
277888
|
status: "error",
|
|
277902
|
-
message:
|
|
277889
|
+
message: error5.message
|
|
277903
277890
|
});
|
|
277904
277891
|
}
|
|
277905
277892
|
process.exit(1);
|
|
@@ -277927,16 +277914,10 @@ async function sdkCliCommand(argv = process.argv) {
|
|
|
277927
277914
|
} catch (err) {
|
|
277928
277915
|
const error5 = err;
|
|
277929
277916
|
onError(sdkcli, argv, error5);
|
|
277930
|
-
if (!(error5 instanceof CancelError2 || error5 instanceof SpinnerError)) {
|
|
277931
|
-
const errorMessage2 = maskTokens2(error5.message);
|
|
277932
|
-
note(redBright(`Unknown error: ${errorMessage2}
|
|
277933
|
-
|
|
277934
|
-
${error5.stack}`));
|
|
277935
|
-
}
|
|
277936
277917
|
}
|
|
277937
277918
|
}
|
|
277938
277919
|
|
|
277939
277920
|
// src/cli.ts
|
|
277940
277921
|
sdkCliCommand();
|
|
277941
277922
|
|
|
277942
|
-
//# debugId=
|
|
277923
|
+
//# debugId=425A20482FC40D8E64756E2164756E21
|