@settlemint/sdk-cli 1.0.5-prb2ecbc20 → 1.0.5-prb74cd0f2
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 +40 -70
- package/dist/cli.js.map +26 -26
- package/package.json +3 -3
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.42bM7eKAoy:/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.5-
|
|
212605
|
+
binaryVersion: "1.0.5-prb74cd0f2",
|
|
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.42bM7eKAoy:/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.42bM7eKAoy:/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.42bM7eKAoy:/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.42bM7eKAoy:/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) {
|
|
267290
|
+
const packageJsonPath = await findUp("package.json");
|
|
267291
267291
|
if (!packageJsonPath) {
|
|
267292
267292
|
if (fallbackToCwd) {
|
|
267293
267293
|
return process.cwd();
|
|
@@ -267355,13 +267355,8 @@ async function packageJsonHasWorkspaces(packageJsonPath) {
|
|
|
267355
267355
|
}
|
|
267356
267356
|
return false;
|
|
267357
267357
|
}
|
|
267358
|
-
async function writeEnv({
|
|
267359
|
-
|
|
267360
|
-
env: env2,
|
|
267361
|
-
secrets,
|
|
267362
|
-
cwd
|
|
267363
|
-
}) {
|
|
267364
|
-
const projectDir = await projectRoot(true, cwd);
|
|
267358
|
+
async function writeEnv(prod, env2, secrets) {
|
|
267359
|
+
const projectDir = await projectRoot(true);
|
|
267365
267360
|
if (prod) {
|
|
267366
267361
|
process.env.NODE_ENV = "production";
|
|
267367
267362
|
}
|
|
@@ -267376,7 +267371,7 @@ async function writeEnv({
|
|
|
267376
267371
|
if (!currentEnv) {
|
|
267377
267372
|
currentEnv = {};
|
|
267378
267373
|
}
|
|
267379
|
-
const mergedEnv = deepmerge(
|
|
267374
|
+
const mergedEnv = deepmerge(currentEnv, env2);
|
|
267380
267375
|
await writeFile(envFile, stringify(mergedEnv));
|
|
267381
267376
|
}));
|
|
267382
267377
|
}
|
|
@@ -267404,15 +267399,6 @@ function stringify(obj) {
|
|
|
267404
267399
|
return Object.entries(obj).sort(([a], [b]) => a.localeCompare(b)).map(stringifyPair).filter((value) => value !== undefined).join(`
|
|
267405
267400
|
`);
|
|
267406
267401
|
}
|
|
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
|
-
}
|
|
267416
267402
|
|
|
267417
267403
|
// src/utils/telemetry.ts
|
|
267418
267404
|
async function telemetry(data) {
|
|
@@ -267566,7 +267552,7 @@ ${error.stack}`));
|
|
|
267566
267552
|
var package_default = {
|
|
267567
267553
|
name: "@settlemint/sdk-cli",
|
|
267568
267554
|
description: "Command-line interface for SettleMint SDK, providing development tools and project management capabilities",
|
|
267569
|
-
version: "1.0.5-
|
|
267555
|
+
version: "1.0.5-prb74cd0f2",
|
|
267570
267556
|
type: "module",
|
|
267571
267557
|
private: false,
|
|
267572
267558
|
license: "FSL-1.1-MIT",
|
|
@@ -267621,8 +267607,8 @@ var package_default = {
|
|
|
267621
267607
|
"@inquirer/input": "4.1.3",
|
|
267622
267608
|
"@inquirer/password": "4.0.6",
|
|
267623
267609
|
"@inquirer/select": "4.0.6",
|
|
267624
|
-
"@settlemint/sdk-js": "1.0.5-
|
|
267625
|
-
"@settlemint/sdk-utils": "1.0.5-
|
|
267610
|
+
"@settlemint/sdk-js": "1.0.5-prb74cd0f2",
|
|
267611
|
+
"@settlemint/sdk-utils": "1.0.5-prb74cd0f2",
|
|
267626
267612
|
"get-tsconfig": "4.8.1",
|
|
267627
267613
|
giget: "1.2.3"
|
|
267628
267614
|
},
|
|
@@ -267652,8 +267638,8 @@ import { join as join4 } from "node:path";
|
|
|
267652
267638
|
// ../utils/dist/filesystem.mjs
|
|
267653
267639
|
import { dirname as dirname3 } from "node:path";
|
|
267654
267640
|
import { stat as stat2 } from "node:fs/promises";
|
|
267655
|
-
async function projectRoot2(fallbackToCwd = false
|
|
267656
|
-
const packageJsonPath = await findUp("package.json"
|
|
267641
|
+
async function projectRoot2(fallbackToCwd = false) {
|
|
267642
|
+
const packageJsonPath = await findUp("package.json");
|
|
267657
267643
|
if (!packageJsonPath) {
|
|
267658
267644
|
if (fallbackToCwd) {
|
|
267659
267645
|
return process.cwd();
|
|
@@ -267713,7 +267699,7 @@ function tryParseJson2(value, defaultValue = null) {
|
|
|
267713
267699
|
return defaultValue;
|
|
267714
267700
|
}
|
|
267715
267701
|
}
|
|
267716
|
-
async function retryWhenFailed(fn, maxRetries = 5, initialSleepTime =
|
|
267702
|
+
async function retryWhenFailed(fn, maxRetries = 5, initialSleepTime = 3000, stopOnError) {
|
|
267717
267703
|
let attempt = 0;
|
|
267718
267704
|
while (attempt < maxRetries) {
|
|
267719
267705
|
try {
|
|
@@ -267984,8 +267970,8 @@ async function installPackage(names, options = {}) {
|
|
|
267984
267970
|
// ../utils/dist/package-manager.mjs
|
|
267985
267971
|
var import_package_json = __toESM(require_lib12(), 1);
|
|
267986
267972
|
var import_package_json2 = __toESM(require_lib12(), 1);
|
|
267987
|
-
async function projectRoot3(fallbackToCwd = false
|
|
267988
|
-
const packageJsonPath = await findUp("package.json"
|
|
267973
|
+
async function projectRoot3(fallbackToCwd = false) {
|
|
267974
|
+
const packageJsonPath = await findUp("package.json");
|
|
267989
267975
|
if (!packageJsonPath) {
|
|
267990
267976
|
if (fallbackToCwd) {
|
|
267991
267977
|
return process.cwd();
|
|
@@ -268261,7 +268247,7 @@ export const { client: ${graphqlClientVariable}, graphql: ${graphqlVariable} } =
|
|
|
268261
268247
|
import { writeFile as writeFile5 } from "node:fs/promises";
|
|
268262
268248
|
|
|
268263
268249
|
// ../utils/dist/http.mjs
|
|
268264
|
-
async function retryWhenFailed2(fn, maxRetries = 5, initialSleepTime =
|
|
268250
|
+
async function retryWhenFailed2(fn, maxRetries = 5, initialSleepTime = 3000, stopOnError) {
|
|
268265
268251
|
let attempt = 0;
|
|
268266
268252
|
while (attempt < maxRetries) {
|
|
268267
268253
|
try {
|
|
@@ -270667,18 +270653,7 @@ async function writeEnvSpinner(prod, env2) {
|
|
|
270667
270653
|
startMessage: "Saving .env and .env.local files",
|
|
270668
270654
|
stopMessage: "Written .env and .env.local file",
|
|
270669
270655
|
task: async () => {
|
|
270670
|
-
|
|
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 = {
|
|
270656
|
+
await writeEnv(prod, {
|
|
270682
270657
|
SETTLEMINT_INSTANCE: env2.SETTLEMINT_INSTANCE,
|
|
270683
270658
|
SETTLEMINT_WORKSPACE: env2.SETTLEMINT_WORKSPACE,
|
|
270684
270659
|
SETTLEMINT_APPLICATION: env2.SETTLEMINT_APPLICATION,
|
|
@@ -270694,7 +270669,6 @@ async function writeEnvSpinner(prod, env2) {
|
|
|
270694
270669
|
SETTLEMINT_PORTAL_GRAPHQL_ENDPOINT: env2.SETTLEMINT_PORTAL_GRAPHQL_ENDPOINT,
|
|
270695
270670
|
SETTLEMINT_PORTAL_REST_ENDPOINT: env2.SETTLEMINT_PORTAL_REST_ENDPOINT,
|
|
270696
270671
|
SETTLEMINT_HD_PRIVATE_KEY: env2.SETTLEMINT_HD_PRIVATE_KEY,
|
|
270697
|
-
SETTLEMINT_ACCESSIBLE_PRIVATE_KEY: env2.SETTLEMINT_ACCESSIBLE_PRIVATE_KEY,
|
|
270698
270672
|
SETTLEMINT_MINIO: env2.SETTLEMINT_MINIO,
|
|
270699
270673
|
SETTLEMINT_MINIO_ENDPOINT: env2.SETTLEMINT_MINIO_ENDPOINT,
|
|
270700
270674
|
SETTLEMINT_MINIO_ACCESS_KEY: env2.SETTLEMINT_MINIO_ACCESS_KEY,
|
|
@@ -270707,15 +270681,15 @@ async function writeEnvSpinner(prod, env2) {
|
|
|
270707
270681
|
SETTLEMINT_BLOCKSCOUT: env2.SETTLEMINT_BLOCKSCOUT,
|
|
270708
270682
|
SETTLEMINT_BLOCKSCOUT_GRAPHQL_ENDPOINT: env2.SETTLEMINT_BLOCKSCOUT_GRAPHQL_ENDPOINT,
|
|
270709
270683
|
SETTLEMINT_BLOCKSCOUT_UI_ENDPOINT: env2.SETTLEMINT_BLOCKSCOUT_UI_ENDPOINT,
|
|
270710
|
-
SETTLEMINT_NEW_PROJECT_NAME: env2.SETTLEMINT_NEW_PROJECT_NAME,
|
|
270711
270684
|
SETTLEMINT_SMART_CONTRACT_ADDRESS: env2.SETTLEMINT_SMART_CONTRACT_ADDRESS,
|
|
270712
270685
|
SETTLEMINT_SMART_CONTRACT_DEPLOYMENT_ID: env2.SETTLEMINT_SMART_CONTRACT_DEPLOYMENT_ID
|
|
270713
|
-
};
|
|
270714
|
-
await writeEnv({
|
|
270715
|
-
|
|
270716
|
-
|
|
270717
|
-
|
|
270718
|
-
|
|
270686
|
+
}, false);
|
|
270687
|
+
await writeEnv(prod, {
|
|
270688
|
+
SETTLEMINT_ACCESS_TOKEN: env2.SETTLEMINT_ACCESS_TOKEN,
|
|
270689
|
+
SETTLEMINT_HASURA_ADMIN_SECRET: env2.SETTLEMINT_HASURA_ADMIN_SECRET,
|
|
270690
|
+
SETTLEMINT_MINIO_SECRET_KEY: env2.SETTLEMINT_MINIO_SECRET_KEY,
|
|
270691
|
+
SETTLEMINT_HASURA_DATABASE_URL: env2.SETTLEMINT_HASURA_DATABASE_URL
|
|
270692
|
+
}, true);
|
|
270719
270693
|
}
|
|
270720
270694
|
});
|
|
270721
270695
|
}
|
|
@@ -270725,19 +270699,15 @@ async function getGraphEndpoint(settlemint, service, graphName) {
|
|
|
270725
270699
|
if (!service || service.__typename !== "HAGraphMiddleware") {
|
|
270726
270700
|
return {};
|
|
270727
270701
|
}
|
|
270728
|
-
const theGraphMiddleware = await
|
|
270729
|
-
|
|
270730
|
-
|
|
270731
|
-
|
|
270732
|
-
|
|
270733
|
-
|
|
270734
|
-
|
|
270735
|
-
|
|
270736
|
-
|
|
270737
|
-
throw new Error(`Subgraph '${graphName}' not found in middleware '${service.uniqueName}'`);
|
|
270738
|
-
}
|
|
270739
|
-
return middleware;
|
|
270740
|
-
})
|
|
270702
|
+
const theGraphMiddleware = await retryWhenFailed(async () => {
|
|
270703
|
+
const middleware = await settlemint.middleware.graphSubgraphs(service.uniqueName, !!graphName);
|
|
270704
|
+
if (!middleware || middleware.__typename !== "HAGraphMiddleware") {
|
|
270705
|
+
throw new Error(`Middleware '${service.uniqueName}' is not a graph middleware`);
|
|
270706
|
+
}
|
|
270707
|
+
if (graphName && !middleware.subgraphs.find(({ graphqlQueryEndpoint }) => graphqlQueryEndpoint?.id.endsWith(graphName))) {
|
|
270708
|
+
throw new Error(`Subgraph '${graphName}' not found in middleware '${service.uniqueName}'`);
|
|
270709
|
+
}
|
|
270710
|
+
return middleware;
|
|
270741
270711
|
});
|
|
270742
270712
|
const endpoints = theGraphMiddleware.subgraphs.map(({ graphqlQueryEndpoint }) => graphqlQueryEndpoint?.displayValue);
|
|
270743
270713
|
return {
|
|
@@ -275999,7 +275969,7 @@ function getDeleteCommand({
|
|
|
275999
275969
|
const isDefaultUniqueName = uniqueName === "default";
|
|
276000
275970
|
const serviceUniqueName = isDefaultUniqueName ? typeof env2[envKey] === "string" ? env2[envKey] : null : uniqueName;
|
|
276001
275971
|
if (!serviceUniqueName) {
|
|
276002
|
-
throw new Error(`No default ${type4} found in your .env file. Please provide a valid ${type4}
|
|
275972
|
+
throw new Error(`No default ${type4} found in your .env file. Please provide a valid ${type4} ID or set a default ${type4} first.`);
|
|
276003
275973
|
}
|
|
276004
275974
|
const result = await spinner({
|
|
276005
275975
|
startMessage: `Deleting ${type4}`,
|
|
@@ -276068,7 +276038,7 @@ function getRestartCommand({
|
|
|
276068
276038
|
usePersonalAccessToken = true
|
|
276069
276039
|
}) {
|
|
276070
276040
|
const commandName = sanitizeCommandName(name2);
|
|
276071
|
-
return new Command(commandName).alias(alias).description(`Restart a ${type4} in the SettleMint platform. Provide the ${type4}
|
|
276041
|
+
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([
|
|
276072
276042
|
{
|
|
276073
276043
|
description: `Restarts the specified ${type4} by id`,
|
|
276074
276044
|
command: `platform restart ${commandName}${subType ? ` ${subType}` : ""} <${type4}-id>`
|
|
@@ -277309,4 +277279,4 @@ function sdkCliCommand(exitOverride = undefined) {
|
|
|
277309
277279
|
ascii();
|
|
277310
277280
|
sdkCliCommand();
|
|
277311
277281
|
|
|
277312
|
-
//# debugId=
|
|
277282
|
+
//# debugId=1B199F336DEEF4C864756E2164756E21
|