@settlemint/sdk-cli 2.3.0 → 2.3.1
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/README.md +1 -1
- package/dist/cli.js +35 -33
- package/dist/cli.js.map +8 -8
- package/package.json +3 -3
package/README.md
CHANGED
@@ -249,7 +249,7 @@ settlemint scs subgraph deploy --accept-defaults <subgraph-name>
|
|
249
249
|
|
250
250
|
## API Reference
|
251
251
|
|
252
|
-
See the [documentation](https://github.com/settlemint/sdk/tree/v2.3.
|
252
|
+
See the [documentation](https://github.com/settlemint/sdk/tree/v2.3.1/sdk/cli/docs/settlemint.md) for available commands.
|
253
253
|
|
254
254
|
## Contributing
|
255
255
|
|
package/dist/cli.js
CHANGED
@@ -244830,7 +244830,7 @@ var require_public_api = __commonJS((exports) => {
|
|
244830
244830
|
});
|
244831
244831
|
|
244832
244832
|
// ../utils/dist/environment.mjs
|
244833
|
-
import { join } from "
|
244833
|
+
import { join } from "path";
|
244834
244834
|
|
244835
244835
|
// ../../node_modules/yoctocolors/base.js
|
244836
244836
|
var exports_base = {};
|
@@ -249149,9 +249149,9 @@ var z = /* @__PURE__ */ Object.freeze({
|
|
249149
249149
|
|
249150
249150
|
// ../utils/dist/environment.mjs
|
249151
249151
|
var import_dotenvx = __toESM(require_main2(), 1);
|
249152
|
-
import { writeFile } from "
|
249153
|
-
import { join as join3 } from "
|
249154
|
-
import { dirname } from "
|
249152
|
+
import { writeFile } from "fs/promises";
|
249153
|
+
import { join as join3 } from "path";
|
249154
|
+
import { dirname } from "path";
|
249155
249155
|
|
249156
249156
|
// ../../node_modules/find-up/index.js
|
249157
249157
|
import path2 from "node:path";
|
@@ -249387,9 +249387,9 @@ async function findUp(name, options = {}) {
|
|
249387
249387
|
}
|
249388
249388
|
|
249389
249389
|
// ../utils/dist/environment.mjs
|
249390
|
-
import { stat } from "
|
249391
|
-
import { readFile } from "
|
249392
|
-
import { dirname as dirname2, join as join2 } from "
|
249390
|
+
import { stat } from "fs/promises";
|
249391
|
+
import { readFile } from "fs/promises";
|
249392
|
+
import { dirname as dirname2, join as join2 } from "path";
|
249393
249393
|
|
249394
249394
|
// ../../node_modules/minimatch/dist/esm/index.js
|
249395
249395
|
var import_brace_expansion = __toESM(require_brace_expansion(), 1);
|
@@ -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.
|
255171
|
+
version: "2.3.1",
|
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.
|
255221
|
-
"@settlemint/sdk-utils": "2.3.
|
255220
|
+
"@settlemint/sdk-js": "2.3.1",
|
255221
|
+
"@settlemint/sdk-utils": "2.3.1",
|
255222
255222
|
"@types/node": "22.15.18",
|
255223
255223
|
"@types/semver": "7.7.0",
|
255224
255224
|
"@types/which": "3.0.4",
|
@@ -256377,7 +256377,7 @@ class Separator {
|
|
256377
256377
|
}
|
256378
256378
|
}
|
256379
256379
|
// ../utils/dist/terminal.mjs
|
256380
|
-
import { spawn } from "
|
256380
|
+
import { spawn } from "child_process";
|
256381
256381
|
var import_console_table_printer2 = __toESM(require_dist2(), 1);
|
256382
256382
|
function shouldPrint() {
|
256383
256383
|
return process.env.SETTLEMINT_DISABLE_TERMINAL !== "true";
|
@@ -257292,7 +257292,7 @@ function initGraphQLTada() {
|
|
257292
257292
|
var t2 = initGraphQLTada();
|
257293
257293
|
|
257294
257294
|
// ../js/dist/settlemint.mjs
|
257295
|
-
import { createHash } from "
|
257295
|
+
import { createHash } from "crypto";
|
257296
257296
|
var graphql = initGraphQLTada();
|
257297
257297
|
var WorkspaceFragment = graphql(`
|
257298
257298
|
fragment Workspace on Workspace {
|
@@ -258961,10 +258961,10 @@ function createSettleMintClient(options) {
|
|
258961
258961
|
}
|
258962
258962
|
|
258963
258963
|
// ../utils/dist/package-manager.mjs
|
258964
|
-
import { readdir as readdir2, rm } from "
|
258965
|
-
import { resolve as resolve2 } from "
|
258966
|
-
import { dirname as dirname3 } from "
|
258967
|
-
import { stat as stat2 } from "
|
258964
|
+
import { readdir as readdir2, rm } from "fs/promises";
|
258965
|
+
import { resolve as resolve2 } from "path";
|
258966
|
+
import { dirname as dirname3 } from "path";
|
258967
|
+
import { stat as stat2 } from "fs/promises";
|
258968
258968
|
|
258969
258969
|
// ../../node_modules/package-manager-detector/dist/detect.mjs
|
258970
258970
|
import fs2 from "node:fs/promises";
|
@@ -260043,8 +260043,8 @@ function replaceUnderscoresAndHyphensWithSpaces(s) {
|
|
260043
260043
|
}
|
260044
260044
|
|
260045
260045
|
// ../utils/dist/filesystem.mjs
|
260046
|
-
import { dirname as dirname5 } from "
|
260047
|
-
import { stat as stat3 } from "
|
260046
|
+
import { dirname as dirname5 } from "path";
|
260047
|
+
import { stat as stat3 } from "fs/promises";
|
260048
260048
|
async function projectRoot3(fallbackToCwd = false, cwd) {
|
260049
260049
|
const packageJsonPath = await findUp("package.json", { cwd });
|
260050
260050
|
if (!packageJsonPath) {
|
@@ -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=AD89C7D3EEDD4E7164756E2164756E21
|