@settlemint/sdk-cli 1.0.5-prfaf55c05 → 1.0.6-main1055c654
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 +21 -1
- package/dist/cli.js +83 -53
- package/dist/cli.js.map +27 -27
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -30,6 +30,7 @@
|
|
|
30
30
|
- [Usage](#usage)
|
|
31
31
|
- [As a dependency in your package.json](#as-a-dependency-in-your-package.json)
|
|
32
32
|
- [Globally install the CLI](#globally-install-the-cli)
|
|
33
|
+
- [GitHub Action](#github-action)
|
|
33
34
|
- [Examples](#examples)
|
|
34
35
|
- [Get the version of the CLI](#get-the-version-of-the-cli)
|
|
35
36
|
- [Get help for a command](#get-help-for-a-command)
|
|
@@ -89,6 +90,25 @@ pnpm install -g @settlemint/sdk-cli
|
|
|
89
90
|
yarn install -g @settlemint/sdk-cli
|
|
90
91
|
```
|
|
91
92
|
|
|
93
|
+
You can access the CLI globally by running `settlemint` in your terminal.
|
|
94
|
+
|
|
95
|
+
## GitHub Action
|
|
96
|
+
|
|
97
|
+
Execute SettleMint CLI commands directly in your GitHub Actions workflows using our official GitHub Action.
|
|
98
|
+
|
|
99
|
+
For detailed setup and usage instructions, check out our [documentation](https://github.com/settlemint/settlemint-action/blob/main/README.md).
|
|
100
|
+
|
|
101
|
+
Basic example:
|
|
102
|
+
|
|
103
|
+
```yaml
|
|
104
|
+
steps:
|
|
105
|
+
- name: Get SettleMint CLI version
|
|
106
|
+
uses: settlemint/settlemint-action@main
|
|
107
|
+
with:
|
|
108
|
+
access-token: ${{ secrets.SETTLEMINT_ACCESS_TOKEN }}
|
|
109
|
+
command: "--version"
|
|
110
|
+
```
|
|
111
|
+
|
|
92
112
|
## Examples
|
|
93
113
|
|
|
94
114
|
### Get the version of the CLI
|
|
@@ -229,7 +249,7 @@ settlemint scs subgraph deploy --accept-defaults <subgraph-name>
|
|
|
229
249
|
|
|
230
250
|
## API Reference
|
|
231
251
|
|
|
232
|
-
See the [documentation](https://github.com/settlemint/sdk/tree/v1.0.
|
|
252
|
+
See the [documentation](https://github.com/settlemint/sdk/tree/v1.0.6/sdk/cli/docs/settlemint.md) for available commands.
|
|
233
253
|
|
|
234
254
|
## Contributing
|
|
235
255
|
|
package/dist/cli.js
CHANGED
|
@@ -209465,7 +209465,7 @@ ${Bt.cyan(Yt)}
|
|
|
209465
209465
|
code: "ENOENT"
|
|
209466
209466
|
}), getPathInfo = (e9, t7) => {
|
|
209467
209467
|
var r6 = t7.colon || or;
|
|
209468
|
-
var i6 = e9.match(/\//) || nr && e9.match(/\\/) ? [""] : [...nr ? [process.cwd()] : [], ...(t7.path || "/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/tmp/bunx-1001-turbo@latest/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/22.13.0/x64/bin:/home/runner/.bun/bin:/tmp/tmp.
|
|
209468
|
+
var i6 = e9.match(/\//) || nr && e9.match(/\\/) ? [""] : [...nr ? [process.cwd()] : [], ...(t7.path || "/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/tmp/bunx-1001-turbo@latest/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/22.13.0/x64/bin:/home/runner/.bun/bin:/tmp/tmp.UJZvhmpiH2:/nsc/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/snap/bin/:/usr/games:/usr/local/games:/home/linuxbrew/.linuxbrew/bin:/home/runner/.config/composer/vendor/bin:/home/runner/.dotnet/tools:/home/runner/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin").split(r6)];
|
|
209469
209469
|
var n6 = nr ? t7.pathExt || process.env.PATHEXT || ".EXE;.CMD;.BAT;.COM" : "";
|
|
209470
209470
|
var a5 = nr ? n6.split(r6) : [""];
|
|
209471
209471
|
if (nr) {
|
|
@@ -212602,7 +212602,7 @@ ${whileRunning(e9)}`;
|
|
|
212602
212602
|
};
|
|
212603
212603
|
ni = Object.assign(async function _main() {
|
|
212604
212604
|
var e9 = new Cli({
|
|
212605
|
-
binaryVersion: "1.0.
|
|
212605
|
+
binaryVersion: "1.0.6-main1055c654",
|
|
212606
212606
|
binaryLabel: "gql.tada CLI",
|
|
212607
212607
|
binaryName: "gql.tada"
|
|
212608
212608
|
});
|
|
@@ -220192,7 +220192,7 @@ var require_lib4 = __commonJS((exports, module) => {
|
|
|
220192
220192
|
var rRel = new RegExp(`^\\.${rSlash.source}`);
|
|
220193
220193
|
var getNotFoundError2 = (cmd2) => Object.assign(new Error(`not found: ${cmd2}`), { code: "ENOENT" });
|
|
220194
220194
|
var getPathInfo2 = (cmd2, {
|
|
220195
|
-
path: optPath = "/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/tmp/bunx-1001-turbo@latest/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/22.13.0/x64/bin:/home/runner/.bun/bin:/tmp/tmp.
|
|
220195
|
+
path: optPath = "/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/tmp/bunx-1001-turbo@latest/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/22.13.0/x64/bin:/home/runner/.bun/bin:/tmp/tmp.UJZvhmpiH2:/nsc/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/snap/bin/:/usr/games:/usr/local/games:/home/linuxbrew/.linuxbrew/bin:/home/runner/.config/composer/vendor/bin:/home/runner/.dotnet/tools:/home/runner/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin",
|
|
220196
220196
|
pathExt: optPathExt = process.env.PATHEXT,
|
|
220197
220197
|
delimiter: optDelimiter = delimiter
|
|
220198
220198
|
}) => {
|
|
@@ -220396,7 +220396,7 @@ var require_lib5 = __commonJS((exports, module) => {
|
|
|
220396
220396
|
let pathToInitial;
|
|
220397
220397
|
try {
|
|
220398
220398
|
pathToInitial = which.sync(initialCmd, {
|
|
220399
|
-
path: options.env && findInObject(options.env, "PATH") || "/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/tmp/bunx-1001-turbo@latest/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/22.13.0/x64/bin:/home/runner/.bun/bin:/tmp/tmp.
|
|
220399
|
+
path: options.env && findInObject(options.env, "PATH") || "/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/tmp/bunx-1001-turbo@latest/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/22.13.0/x64/bin:/home/runner/.bun/bin:/tmp/tmp.UJZvhmpiH2:/nsc/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/snap/bin/:/usr/games:/usr/local/games:/home/linuxbrew/.linuxbrew/bin:/home/runner/.config/composer/vendor/bin:/home/runner/.dotnet/tools:/home/runner/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin",
|
|
220400
220400
|
pathext: options.env && findInObject(options.env, "PATHEXT") || process.env.PATHEXT
|
|
220401
220401
|
}).toLowerCase();
|
|
220402
220402
|
} catch (err) {
|
|
@@ -221113,7 +221113,7 @@ var require_lib6 = __commonJS((exports, module) => {
|
|
|
221113
221113
|
var rRel = new RegExp(`^\\.${rSlash.source}`);
|
|
221114
221114
|
var getNotFoundError2 = (cmd2) => Object.assign(new Error(`not found: ${cmd2}`), { code: "ENOENT" });
|
|
221115
221115
|
var getPathInfo2 = (cmd2, {
|
|
221116
|
-
path: optPath = "/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/tmp/bunx-1001-turbo@latest/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/22.13.0/x64/bin:/home/runner/.bun/bin:/tmp/tmp.
|
|
221116
|
+
path: optPath = "/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/tmp/bunx-1001-turbo@latest/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/22.13.0/x64/bin:/home/runner/.bun/bin:/tmp/tmp.UJZvhmpiH2:/nsc/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/snap/bin/:/usr/games:/usr/local/games:/home/linuxbrew/.linuxbrew/bin:/home/runner/.config/composer/vendor/bin:/home/runner/.dotnet/tools:/home/runner/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin",
|
|
221117
221117
|
pathExt: optPathExt = process.env.PATHEXT,
|
|
221118
221118
|
delimiter: optDelimiter = delimiter
|
|
221119
221119
|
}) => {
|
|
@@ -234988,7 +234988,7 @@ var require_which2 = __commonJS((exports, module) => {
|
|
|
234988
234988
|
const colon = opt2.colon || COLON;
|
|
234989
234989
|
const pathEnv = cmd2.match(/\//) || isWindows2 && cmd2.match(/\\/) ? [""] : [
|
|
234990
234990
|
...isWindows2 ? [process.cwd()] : [],
|
|
234991
|
-
...(opt2.path || "/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/tmp/bunx-1001-turbo@latest/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/22.13.0/x64/bin:/home/runner/.bun/bin:/tmp/tmp.
|
|
234991
|
+
...(opt2.path || "/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/tmp/bunx-1001-turbo@latest/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/22.13.0/x64/bin:/home/runner/.bun/bin:/tmp/tmp.UJZvhmpiH2:/nsc/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/snap/bin/:/usr/games:/usr/local/games:/home/linuxbrew/.linuxbrew/bin:/home/runner/.config/composer/vendor/bin:/home/runner/.dotnet/tools:/home/runner/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin").split(colon)
|
|
234992
234992
|
];
|
|
234993
234993
|
const pathExtExe = isWindows2 ? opt2.pathExt || process.env.PATHEXT || ".EXE;.CMD;.BAT;.COM" : "";
|
|
234994
234994
|
const pathExt = isWindows2 ? pathExtExe.split(colon) : [""];
|
|
@@ -267286,8 +267286,8 @@ async function loadEnvironmentEnv(validateEnv, prod, path4 = process.cwd()) {
|
|
|
267286
267286
|
return {};
|
|
267287
267287
|
}
|
|
267288
267288
|
}
|
|
267289
|
-
async function projectRoot(fallbackToCwd = false) {
|
|
267290
|
-
const packageJsonPath = await findUp("package.json");
|
|
267289
|
+
async function projectRoot(fallbackToCwd = false, cwd) {
|
|
267290
|
+
const packageJsonPath = await findUp("package.json", { cwd });
|
|
267291
267291
|
if (!packageJsonPath) {
|
|
267292
267292
|
if (fallbackToCwd) {
|
|
267293
267293
|
return process.cwd();
|
|
@@ -267355,8 +267355,13 @@ async function packageJsonHasWorkspaces(packageJsonPath) {
|
|
|
267355
267355
|
}
|
|
267356
267356
|
return false;
|
|
267357
267357
|
}
|
|
267358
|
-
async function writeEnv(
|
|
267359
|
-
|
|
267358
|
+
async function writeEnv({
|
|
267359
|
+
prod,
|
|
267360
|
+
env: env2,
|
|
267361
|
+
secrets,
|
|
267362
|
+
cwd
|
|
267363
|
+
}) {
|
|
267364
|
+
const projectDir = await projectRoot(true, cwd);
|
|
267360
267365
|
if (prod) {
|
|
267361
267366
|
process.env.NODE_ENV = "production";
|
|
267362
267367
|
}
|
|
@@ -267371,7 +267376,7 @@ async function writeEnv(prod, env2, secrets) {
|
|
|
267371
267376
|
if (!currentEnv) {
|
|
267372
267377
|
currentEnv = {};
|
|
267373
267378
|
}
|
|
267374
|
-
const mergedEnv = deepmerge(currentEnv, env2);
|
|
267379
|
+
const mergedEnv = deepmerge(pruneCurrentEnv(currentEnv, env2), env2);
|
|
267375
267380
|
await writeFile(envFile, stringify(mergedEnv));
|
|
267376
267381
|
}));
|
|
267377
267382
|
}
|
|
@@ -267399,6 +267404,15 @@ function stringify(obj) {
|
|
|
267399
267404
|
return Object.entries(obj).sort(([a], [b]) => a.localeCompare(b)).map(stringifyPair).filter((value) => value !== undefined).join(`
|
|
267400
267405
|
`);
|
|
267401
267406
|
}
|
|
267407
|
+
function pruneCurrentEnv(currentEnv, env2) {
|
|
267408
|
+
const dotEnvKeys = Object.keys(DotEnvSchema.shape);
|
|
267409
|
+
return Object.fromEntries(Object.entries(currentEnv).filter(([key]) => {
|
|
267410
|
+
if (dotEnvKeys.includes(key) && !env2[key]) {
|
|
267411
|
+
return false;
|
|
267412
|
+
}
|
|
267413
|
+
return true;
|
|
267414
|
+
}));
|
|
267415
|
+
}
|
|
267402
267416
|
|
|
267403
267417
|
// src/utils/telemetry.ts
|
|
267404
267418
|
async function telemetry(data) {
|
|
@@ -267552,7 +267566,7 @@ ${error.stack}`));
|
|
|
267552
267566
|
var package_default = {
|
|
267553
267567
|
name: "@settlemint/sdk-cli",
|
|
267554
267568
|
description: "Command-line interface for SettleMint SDK, providing development tools and project management capabilities",
|
|
267555
|
-
version: "1.0.
|
|
267569
|
+
version: "1.0.6-main1055c654",
|
|
267556
267570
|
type: "module",
|
|
267557
267571
|
private: false,
|
|
267558
267572
|
license: "FSL-1.1-MIT",
|
|
@@ -267597,7 +267611,7 @@ var package_default = {
|
|
|
267597
267611
|
},
|
|
267598
267612
|
devDependencies: {
|
|
267599
267613
|
"@types/semver": "7.5.8",
|
|
267600
|
-
"@types/node": "22.10.
|
|
267614
|
+
"@types/node": "22.10.7",
|
|
267601
267615
|
"is-in-ci": "1.0.0",
|
|
267602
267616
|
semver: "7.6.3",
|
|
267603
267617
|
slugify: "1.6.6",
|
|
@@ -267607,8 +267621,8 @@ var package_default = {
|
|
|
267607
267621
|
"@inquirer/input": "4.1.3",
|
|
267608
267622
|
"@inquirer/password": "4.0.6",
|
|
267609
267623
|
"@inquirer/select": "4.0.6",
|
|
267610
|
-
"@settlemint/sdk-js": "1.0.
|
|
267611
|
-
"@settlemint/sdk-utils": "1.0.
|
|
267624
|
+
"@settlemint/sdk-js": "1.0.6-main1055c654",
|
|
267625
|
+
"@settlemint/sdk-utils": "1.0.6-main1055c654",
|
|
267612
267626
|
"get-tsconfig": "4.8.1",
|
|
267613
267627
|
giget: "1.2.3"
|
|
267614
267628
|
},
|
|
@@ -267638,8 +267652,8 @@ import { join as join4 } from "node:path";
|
|
|
267638
267652
|
// ../utils/dist/filesystem.mjs
|
|
267639
267653
|
import { dirname as dirname3 } from "node:path";
|
|
267640
267654
|
import { stat as stat2 } from "node:fs/promises";
|
|
267641
|
-
async function projectRoot2(fallbackToCwd = false) {
|
|
267642
|
-
const packageJsonPath = await findUp("package.json");
|
|
267655
|
+
async function projectRoot2(fallbackToCwd = false, cwd) {
|
|
267656
|
+
const packageJsonPath = await findUp("package.json", { cwd });
|
|
267643
267657
|
if (!packageJsonPath) {
|
|
267644
267658
|
if (fallbackToCwd) {
|
|
267645
267659
|
return process.cwd();
|
|
@@ -267699,7 +267713,7 @@ function tryParseJson2(value, defaultValue = null) {
|
|
|
267699
267713
|
return defaultValue;
|
|
267700
267714
|
}
|
|
267701
267715
|
}
|
|
267702
|
-
async function retryWhenFailed(fn, maxRetries = 5, initialSleepTime =
|
|
267716
|
+
async function retryWhenFailed(fn, maxRetries = 5, initialSleepTime = 1000, stopOnError) {
|
|
267703
267717
|
let attempt = 0;
|
|
267704
267718
|
while (attempt < maxRetries) {
|
|
267705
267719
|
try {
|
|
@@ -267970,8 +267984,8 @@ async function installPackage(names, options = {}) {
|
|
|
267970
267984
|
// ../utils/dist/package-manager.mjs
|
|
267971
267985
|
var import_package_json = __toESM(require_lib12(), 1);
|
|
267972
267986
|
var import_package_json2 = __toESM(require_lib12(), 1);
|
|
267973
|
-
async function projectRoot3(fallbackToCwd = false) {
|
|
267974
|
-
const packageJsonPath = await findUp("package.json");
|
|
267987
|
+
async function projectRoot3(fallbackToCwd = false, cwd) {
|
|
267988
|
+
const packageJsonPath = await findUp("package.json", { cwd });
|
|
267975
267989
|
if (!packageJsonPath) {
|
|
267976
267990
|
if (fallbackToCwd) {
|
|
267977
267991
|
return process.cwd();
|
|
@@ -268247,7 +268261,7 @@ export const { client: ${graphqlClientVariable}, graphql: ${graphqlVariable} } =
|
|
|
268247
268261
|
import { writeFile as writeFile5 } from "node:fs/promises";
|
|
268248
268262
|
|
|
268249
268263
|
// ../utils/dist/http.mjs
|
|
268250
|
-
async function retryWhenFailed2(fn, maxRetries = 5, initialSleepTime =
|
|
268264
|
+
async function retryWhenFailed2(fn, maxRetries = 5, initialSleepTime = 1000, stopOnError) {
|
|
268251
268265
|
let attempt = 0;
|
|
268252
268266
|
while (attempt < maxRetries) {
|
|
268253
268267
|
try {
|
|
@@ -270653,7 +270667,18 @@ async function writeEnvSpinner(prod, env2) {
|
|
|
270653
270667
|
startMessage: "Saving .env and .env.local files",
|
|
270654
270668
|
stopMessage: "Written .env and .env.local file",
|
|
270655
270669
|
task: async () => {
|
|
270656
|
-
|
|
270670
|
+
const updatedSecrets = {
|
|
270671
|
+
SETTLEMINT_ACCESS_TOKEN: env2.SETTLEMINT_ACCESS_TOKEN,
|
|
270672
|
+
SETTLEMINT_HASURA_ADMIN_SECRET: env2.SETTLEMINT_HASURA_ADMIN_SECRET,
|
|
270673
|
+
SETTLEMINT_MINIO_SECRET_KEY: env2.SETTLEMINT_MINIO_SECRET_KEY,
|
|
270674
|
+
SETTLEMINT_HASURA_DATABASE_URL: env2.SETTLEMINT_HASURA_DATABASE_URL
|
|
270675
|
+
};
|
|
270676
|
+
await writeEnv({
|
|
270677
|
+
prod,
|
|
270678
|
+
env: updatedSecrets,
|
|
270679
|
+
secrets: true
|
|
270680
|
+
});
|
|
270681
|
+
const updatedEnv = {
|
|
270657
270682
|
SETTLEMINT_INSTANCE: env2.SETTLEMINT_INSTANCE,
|
|
270658
270683
|
SETTLEMINT_WORKSPACE: env2.SETTLEMINT_WORKSPACE,
|
|
270659
270684
|
SETTLEMINT_APPLICATION: env2.SETTLEMINT_APPLICATION,
|
|
@@ -270669,6 +270694,7 @@ async function writeEnvSpinner(prod, env2) {
|
|
|
270669
270694
|
SETTLEMINT_PORTAL_GRAPHQL_ENDPOINT: env2.SETTLEMINT_PORTAL_GRAPHQL_ENDPOINT,
|
|
270670
270695
|
SETTLEMINT_PORTAL_REST_ENDPOINT: env2.SETTLEMINT_PORTAL_REST_ENDPOINT,
|
|
270671
270696
|
SETTLEMINT_HD_PRIVATE_KEY: env2.SETTLEMINT_HD_PRIVATE_KEY,
|
|
270697
|
+
SETTLEMINT_ACCESSIBLE_PRIVATE_KEY: env2.SETTLEMINT_ACCESSIBLE_PRIVATE_KEY,
|
|
270672
270698
|
SETTLEMINT_MINIO: env2.SETTLEMINT_MINIO,
|
|
270673
270699
|
SETTLEMINT_MINIO_ENDPOINT: env2.SETTLEMINT_MINIO_ENDPOINT,
|
|
270674
270700
|
SETTLEMINT_MINIO_ACCESS_KEY: env2.SETTLEMINT_MINIO_ACCESS_KEY,
|
|
@@ -270681,15 +270707,15 @@ async function writeEnvSpinner(prod, env2) {
|
|
|
270681
270707
|
SETTLEMINT_BLOCKSCOUT: env2.SETTLEMINT_BLOCKSCOUT,
|
|
270682
270708
|
SETTLEMINT_BLOCKSCOUT_GRAPHQL_ENDPOINT: env2.SETTLEMINT_BLOCKSCOUT_GRAPHQL_ENDPOINT,
|
|
270683
270709
|
SETTLEMINT_BLOCKSCOUT_UI_ENDPOINT: env2.SETTLEMINT_BLOCKSCOUT_UI_ENDPOINT,
|
|
270710
|
+
SETTLEMINT_NEW_PROJECT_NAME: env2.SETTLEMINT_NEW_PROJECT_NAME,
|
|
270684
270711
|
SETTLEMINT_SMART_CONTRACT_ADDRESS: env2.SETTLEMINT_SMART_CONTRACT_ADDRESS,
|
|
270685
270712
|
SETTLEMINT_SMART_CONTRACT_DEPLOYMENT_ID: env2.SETTLEMINT_SMART_CONTRACT_DEPLOYMENT_ID
|
|
270686
|
-
}
|
|
270687
|
-
await writeEnv(
|
|
270688
|
-
|
|
270689
|
-
|
|
270690
|
-
|
|
270691
|
-
|
|
270692
|
-
}, true);
|
|
270713
|
+
};
|
|
270714
|
+
await writeEnv({
|
|
270715
|
+
prod,
|
|
270716
|
+
env: updatedEnv,
|
|
270717
|
+
secrets: false
|
|
270718
|
+
});
|
|
270693
270719
|
}
|
|
270694
270720
|
});
|
|
270695
270721
|
}
|
|
@@ -270699,15 +270725,19 @@ async function getGraphEndpoint(settlemint, service, graphName) {
|
|
|
270699
270725
|
if (!service || service.__typename !== "HAGraphMiddleware") {
|
|
270700
270726
|
return {};
|
|
270701
270727
|
}
|
|
270702
|
-
const theGraphMiddleware = await
|
|
270703
|
-
|
|
270704
|
-
|
|
270705
|
-
|
|
270706
|
-
|
|
270707
|
-
|
|
270708
|
-
|
|
270709
|
-
|
|
270710
|
-
|
|
270728
|
+
const theGraphMiddleware = await spinner({
|
|
270729
|
+
startMessage: "Fetching TheGraph subgraph endpoints",
|
|
270730
|
+
stopMessage: "Fetched TheGraph subgraph endpoints",
|
|
270731
|
+
task: () => retryWhenFailed(async () => {
|
|
270732
|
+
const middleware = await settlemint.middleware.graphSubgraphs(service.uniqueName, !!graphName);
|
|
270733
|
+
if (!middleware || middleware.__typename !== "HAGraphMiddleware") {
|
|
270734
|
+
throw new Error(`Middleware '${service.uniqueName}' is not a graph middleware`);
|
|
270735
|
+
}
|
|
270736
|
+
if (graphName && !middleware.subgraphs.find(({ graphqlQueryEndpoint }) => graphqlQueryEndpoint?.id.endsWith(graphName))) {
|
|
270737
|
+
throw new Error(`Subgraph '${graphName}' not found in middleware '${service.uniqueName}'`);
|
|
270738
|
+
}
|
|
270739
|
+
return middleware;
|
|
270740
|
+
})
|
|
270711
270741
|
});
|
|
270712
270742
|
const endpoints = theGraphMiddleware.subgraphs.map(({ graphqlQueryEndpoint }) => graphqlQueryEndpoint?.displayValue);
|
|
270713
270743
|
return {
|
|
@@ -273567,18 +273597,18 @@ function connectCommand() {
|
|
|
273567
273597
|
});
|
|
273568
273598
|
if (acceptDefaults) {
|
|
273569
273599
|
const selectedServices = [
|
|
273570
|
-
`Workspace: ${workspace.name}`,
|
|
273571
|
-
`Application: ${application.name}`,
|
|
273572
|
-
blockchainNode && `Blockchain Network: ${blockchainNode?.blockchainNetwork?.name}`,
|
|
273573
|
-
blockchainNode && `Blockchain Node: ${blockchainNode?.name}`,
|
|
273574
|
-
hasura && `Hasura: ${hasura?.name}`,
|
|
273575
|
-
thegraph && `TheGraph: ${thegraph?.name}`,
|
|
273576
|
-
portal && `Portal: ${portal?.name}`,
|
|
273577
|
-
ipfs && `IPFS: ${ipfs?.name}`,
|
|
273578
|
-
minio && `MinIO: ${minio?.name}`,
|
|
273579
|
-
hdPrivateKey && `HD Private Key: ${hdPrivateKey?.name}`,
|
|
273580
|
-
cDeployment && `Custom Deployment: ${cDeployment?.name}`,
|
|
273581
|
-
blockscout && `Blockscout: ${blockscout?.name}`
|
|
273600
|
+
`Workspace: ${workspace.name} (${workspace.uniqueName})`,
|
|
273601
|
+
`Application: ${application.name} (${application.uniqueName})`,
|
|
273602
|
+
blockchainNode && `Blockchain Network: ${blockchainNode?.blockchainNetwork?.name} (${blockchainNode?.blockchainNetwork?.uniqueName})`,
|
|
273603
|
+
blockchainNode && `Blockchain Node: ${blockchainNode?.name} (${blockchainNode?.uniqueName})`,
|
|
273604
|
+
hasura && `Hasura: ${hasura?.name} (${hasura?.uniqueName})`,
|
|
273605
|
+
thegraph && `TheGraph: ${thegraph?.name} (${thegraph?.uniqueName})`,
|
|
273606
|
+
portal && `Portal: ${portal?.name} (${portal?.uniqueName})`,
|
|
273607
|
+
ipfs && `IPFS: ${ipfs?.name} (${ipfs?.uniqueName})`,
|
|
273608
|
+
minio && `MinIO: ${minio?.name} (${minio?.uniqueName})`,
|
|
273609
|
+
hdPrivateKey && `HD Private Key: ${hdPrivateKey?.name} (${hdPrivateKey?.uniqueName})`,
|
|
273610
|
+
cDeployment && `Custom Deployment: ${cDeployment?.name} (${cDeployment?.uniqueName})`,
|
|
273611
|
+
blockscout && `Blockscout: ${blockscout?.name} (${blockscout?.uniqueName})`
|
|
273582
273612
|
].filter(Boolean);
|
|
273583
273613
|
list("Selected services", selectedServices);
|
|
273584
273614
|
}
|
|
@@ -275969,7 +275999,7 @@ function getDeleteCommand({
|
|
|
275969
275999
|
const isDefaultUniqueName = uniqueName === "default";
|
|
275970
276000
|
const serviceUniqueName = isDefaultUniqueName ? typeof env2[envKey] === "string" ? env2[envKey] : null : uniqueName;
|
|
275971
276001
|
if (!serviceUniqueName) {
|
|
275972
|
-
throw new Error(`No default ${type4} found in your .env file. Please provide a valid ${type4}
|
|
276002
|
+
throw new Error(`No default ${type4} found in your .env file. Please provide a valid ${type4} unique name or set a default ${type4} first.`);
|
|
275973
276003
|
}
|
|
275974
276004
|
const result = await spinner({
|
|
275975
276005
|
startMessage: `Deleting ${type4}`,
|
|
@@ -276038,7 +276068,7 @@ function getRestartCommand({
|
|
|
276038
276068
|
usePersonalAccessToken = true
|
|
276039
276069
|
}) {
|
|
276040
276070
|
const commandName = sanitizeCommandName(name2);
|
|
276041
|
-
return new Command(commandName).alias(alias).description(`Restart a ${type4} in the SettleMint platform. Provide the ${type4}
|
|
276071
|
+
return new Command(commandName).alias(alias).description(`Restart a ${type4} in the SettleMint platform. Provide the ${type4} unique name or use 'default' to restart the default ${type4} from your .env file.`).usage(createExamples([
|
|
276042
276072
|
{
|
|
276043
276073
|
description: `Restarts the specified ${type4} by id`,
|
|
276044
276074
|
command: `platform restart ${commandName}${subType ? ` ${subType}` : ""} <${type4}-id>`
|
|
@@ -277279,4 +277309,4 @@ function sdkCliCommand(exitOverride = undefined) {
|
|
|
277279
277309
|
ascii();
|
|
277280
277310
|
sdkCliCommand();
|
|
277281
277311
|
|
|
277282
|
-
//# debugId=
|
|
277312
|
+
//# debugId=BC939F1C0A5797F364756E2164756E21
|