@settlemint/sdk-cli 2.3.0-pr537f3bf0 → 2.3.0-prada3e11f
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 +20 -18
- package/dist/cli.js.map +3 -3
- package/package.json +3 -3
package/dist/cli.js
CHANGED
@@ -255168,7 +255168,7 @@ function pruneCurrentEnv(currentEnv, env2) {
|
|
255168
255168
|
var package_default = {
|
255169
255169
|
name: "@settlemint/sdk-cli",
|
255170
255170
|
description: "Command-line interface for SettleMint SDK, providing development tools and project management capabilities",
|
255171
|
-
version: "2.3.0-
|
255171
|
+
version: "2.3.0-prada3e11f",
|
255172
255172
|
type: "module",
|
255173
255173
|
private: false,
|
255174
255174
|
license: "FSL-1.1-MIT",
|
@@ -255217,8 +255217,8 @@ var package_default = {
|
|
255217
255217
|
"@inquirer/input": "4.1.10",
|
255218
255218
|
"@inquirer/password": "4.0.13",
|
255219
255219
|
"@inquirer/select": "4.2.1",
|
255220
|
-
"@settlemint/sdk-js": "2.3.0-
|
255221
|
-
"@settlemint/sdk-utils": "2.3.0-
|
255220
|
+
"@settlemint/sdk-js": "2.3.0-prada3e11f",
|
255221
|
+
"@settlemint/sdk-utils": "2.3.0-prada3e11f",
|
255222
255222
|
"@types/node": "22.15.18",
|
255223
255223
|
"@types/semver": "7.7.0",
|
255224
255224
|
"@types/which": "3.0.4",
|
@@ -260144,24 +260144,26 @@ async function validateSdkVersion(instance) {
|
|
260144
260144
|
accessToken: "",
|
260145
260145
|
anonymous: true
|
260146
260146
|
});
|
260147
|
-
|
260148
|
-
|
260149
|
-
|
260150
|
-
|
260151
|
-
|
260152
|
-
|
260153
|
-
|
260154
|
-
|
260155
|
-
|
260156
|
-
|
260147
|
+
try {
|
260148
|
+
const platformConfig = await settlemint.platform.config();
|
260149
|
+
const currentVersion = package_default.version;
|
260150
|
+
if (semver.gt(currentVersion, platformConfig.sdkVersion)) {
|
260151
|
+
const url = new URL(instance);
|
260152
|
+
const isManagedInstance = url.host === "settlemint.com" || url.host.endsWith(".settlemint.com");
|
260153
|
+
if (isManagedInstance) {
|
260154
|
+
return;
|
260155
|
+
}
|
260156
|
+
const instructions = await getUpgradeInstructions();
|
260157
|
+
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.
|
260157
260158
|
|
260158
260159
|
${instructions}`, "warn");
|
260159
|
-
|
260160
|
-
|
260161
|
-
|
260160
|
+
} else if (semver.lt(currentVersion, platformConfig.sdkVersion)) {
|
260161
|
+
const instructions = await getUpgradeInstructions();
|
260162
|
+
note(`A newer version of the SDK CLI is available (${platformConfig.sdkVersion}). Please update your SDK CLI to ensure compatibility with the platform.
|
260162
260163
|
|
260163
260164
|
${instructions}`, "warn");
|
260164
|
-
|
260165
|
+
}
|
260166
|
+
} catch {}
|
260165
260167
|
}
|
260166
260168
|
async function getInstanceFromCommand(command) {
|
260167
260169
|
const options = command.opts();
|
@@ -270615,4 +270617,4 @@ async function sdkCliCommand(argv = process.argv) {
|
|
270615
270617
|
// src/cli.ts
|
270616
270618
|
sdkCliCommand();
|
270617
270619
|
|
270618
|
-
//# debugId=
|
270620
|
+
//# debugId=2D352EAA36AA575B64756E2164756E21
|