@settlemint/sdk-cli 1.0.9-prac55277e → 1.0.9-prc21fe3e2
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 +3 -3
- package/dist/cli.js +25 -23
- package/dist/cli.js.map +7 -7
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -84,10 +84,10 @@ npm install -g @settlemint/sdk-cli
|
|
|
84
84
|
bun install -g @settlemint/sdk-cli
|
|
85
85
|
|
|
86
86
|
# pnpm
|
|
87
|
-
pnpm
|
|
87
|
+
pnpm install -g @settlemint/sdk-cli
|
|
88
88
|
|
|
89
89
|
# yarn
|
|
90
|
-
yarn
|
|
90
|
+
yarn install -g @settlemint/sdk-cli
|
|
91
91
|
```
|
|
92
92
|
|
|
93
93
|
You can access the CLI globally by running `settlemint` in your terminal.
|
|
@@ -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/v1.0.
|
|
252
|
+
See the [documentation](https://github.com/settlemint/sdk/tree/v1.0.8/sdk/cli/docs/settlemint.md) for available commands.
|
|
253
253
|
|
|
254
254
|
## Contributing
|
|
255
255
|
|
package/dist/cli.js
CHANGED
|
@@ -269202,7 +269202,7 @@ function pruneCurrentEnv(currentEnv, env2) {
|
|
|
269202
269202
|
var package_default = {
|
|
269203
269203
|
name: "@settlemint/sdk-cli",
|
|
269204
269204
|
description: "Command-line interface for SettleMint SDK, providing development tools and project management capabilities",
|
|
269205
|
-
version: "1.0.9-
|
|
269205
|
+
version: "1.0.9-prc21fe3e2",
|
|
269206
269206
|
type: "module",
|
|
269207
269207
|
private: false,
|
|
269208
269208
|
license: "FSL-1.1-MIT",
|
|
@@ -269256,8 +269256,8 @@ var package_default = {
|
|
|
269256
269256
|
"@inquirer/input": "4.1.3",
|
|
269257
269257
|
"@inquirer/password": "4.0.6",
|
|
269258
269258
|
"@inquirer/select": "4.0.6",
|
|
269259
|
-
"@settlemint/sdk-js": "1.0.9-
|
|
269260
|
-
"@settlemint/sdk-utils": "1.0.9-
|
|
269259
|
+
"@settlemint/sdk-js": "1.0.9-prc21fe3e2",
|
|
269260
|
+
"@settlemint/sdk-utils": "1.0.9-prc21fe3e2",
|
|
269261
269261
|
"get-tsconfig": "4.10.0",
|
|
269262
269262
|
giget: "1.2.3",
|
|
269263
269263
|
yaml: "2.7.0"
|
|
@@ -269313,7 +269313,7 @@ async function telemetry(data) {
|
|
|
269313
269313
|
message,
|
|
269314
269314
|
workspace: env2.SETTLEMINT_WORKSPACE,
|
|
269315
269315
|
application: env2.SETTLEMINT_APPLICATION,
|
|
269316
|
-
|
|
269316
|
+
sdkVersion: package_default.version
|
|
269317
269317
|
}),
|
|
269318
269318
|
signal: controller.signal
|
|
269319
269319
|
});
|
|
@@ -269360,6 +269360,9 @@ var cancel2 = (msg) => {
|
|
|
269360
269360
|
throw new CancelError2(msg);
|
|
269361
269361
|
};
|
|
269362
269362
|
async function executeCommand(command, args, options) {
|
|
269363
|
+
console.log("command", command);
|
|
269364
|
+
console.log("args", args);
|
|
269365
|
+
console.log("options", options);
|
|
269363
269366
|
const child = spawn(command, args, { env: { ...process.env, ...options?.env } });
|
|
269364
269367
|
process.stdin.pipe(child.stdin);
|
|
269365
269368
|
const output = [];
|
|
@@ -271831,6 +271834,14 @@ async function isPackageInstalled(name, path5) {
|
|
|
271831
271834
|
const inPeerDependencies = !!pkgJson.content.peerDependencies?.[name];
|
|
271832
271835
|
return inDependencies || inDevDependencies || inPeerDependencies;
|
|
271833
271836
|
}
|
|
271837
|
+
async function isPackageInstalledGlobally(packageName) {
|
|
271838
|
+
try {
|
|
271839
|
+
const installedLocally = await isPackageInstalled(packageName);
|
|
271840
|
+
return !installedLocally;
|
|
271841
|
+
} catch {
|
|
271842
|
+
return true;
|
|
271843
|
+
}
|
|
271844
|
+
}
|
|
271834
271845
|
async function setName(name, path5) {
|
|
271835
271846
|
const pkgJson = await import_package_json2.default.load(path5 ?? await projectRoot2());
|
|
271836
271847
|
pkgJson.update({
|
|
@@ -271979,7 +271990,6 @@ async function setLastSdkVersionCheck(date) {
|
|
|
271979
271990
|
}
|
|
271980
271991
|
|
|
271981
271992
|
// src/utils/sdk-version.ts
|
|
271982
|
-
var SDK_PACKAGE_NAME = "@settlemint/sdk-cli";
|
|
271983
271993
|
async function validateSdkVersionFromCommand(command, interval = 5 * 60 * 1000) {
|
|
271984
271994
|
const now = Date.now();
|
|
271985
271995
|
const config3 = await readConfig();
|
|
@@ -272020,27 +272030,20 @@ async function getInstanceFromCommand(command) {
|
|
|
272020
272030
|
return env2.SETTLEMINT_INSTANCE ?? "https://console.settlemint.com";
|
|
272021
272031
|
}
|
|
272022
272032
|
async function getUpgradeInstructions() {
|
|
272023
|
-
const
|
|
272033
|
+
const packageName = "@settlemint/sdk-cli";
|
|
272034
|
+
const globallyInstalled = await isPackageInstalledGlobally(packageName);
|
|
272024
272035
|
if (globallyInstalled) {
|
|
272025
272036
|
const executablePath = process.execPath;
|
|
272026
272037
|
if (executablePath.endsWith("bun")) {
|
|
272027
272038
|
return `To update, run:
|
|
272028
|
-
bun install -g ${
|
|
272039
|
+
bun install -g ${packageName}`;
|
|
272029
272040
|
}
|
|
272030
272041
|
return `To update:
|
|
272031
|
-
- For npm, run: npm update -g ${
|
|
272032
|
-
- For yarn, run: yarn global add ${
|
|
272033
|
-
- For pnpm, run: pnpm update -g ${
|
|
272034
|
-
}
|
|
272035
|
-
return `Update your ${SDK_PACKAGE_NAME} version in the package.json file.`;
|
|
272036
|
-
}
|
|
272037
|
-
async function isSdkInstalledGlobally() {
|
|
272038
|
-
try {
|
|
272039
|
-
const installedLocally = await isPackageInstalled(SDK_PACKAGE_NAME);
|
|
272040
|
-
return !installedLocally;
|
|
272041
|
-
} catch {
|
|
272042
|
-
return true;
|
|
272042
|
+
- For npm, run: npm update -g ${packageName}
|
|
272043
|
+
- For yarn, run: yarn global add ${packageName}
|
|
272044
|
+
- For pnpm, run: pnpm update -g ${packageName}`;
|
|
272043
272045
|
}
|
|
272046
|
+
return `Update your ${packageName} version in the package.json file.`;
|
|
272044
272047
|
}
|
|
272045
272048
|
|
|
272046
272049
|
// src/commands/codegen/utils/write-template.ts
|
|
@@ -274812,9 +274815,8 @@ var esm_default5 = createPrompt((config3, done) => {
|
|
|
274812
274815
|
// src/prompts/aat.prompt.ts
|
|
274813
274816
|
async function applicationAccessTokenPrompt(env2, application, settlemint, accept) {
|
|
274814
274817
|
const autoAccept = !!accept || is_in_ci_default;
|
|
274815
|
-
const
|
|
274816
|
-
const
|
|
274817
|
-
const defaultPossible = autoAccept && !!defaultAccessToken;
|
|
274818
|
+
const defaultAccessToken = env2.SETTLEMINT_ACCESS_TOKEN;
|
|
274819
|
+
const defaultPossible = autoAccept && defaultAccessToken;
|
|
274818
274820
|
if (defaultPossible || is_in_ci_default) {
|
|
274819
274821
|
return defaultAccessToken;
|
|
274820
274822
|
}
|
|
@@ -279789,4 +279791,4 @@ async function sdkCliCommand(argv = process.argv) {
|
|
|
279789
279791
|
// src/cli.ts
|
|
279790
279792
|
sdkCliCommand();
|
|
279791
279793
|
|
|
279792
|
-
//# debugId=
|
|
279794
|
+
//# debugId=7A0D6D9DE77BEF5064756E2164756E21
|