@settlemint/sdk-cli 0.9.9-prced21c0f → 0.9.9-preb0b62f1
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 +80 -198
- package/dist/cli.js.map +19 -19
- package/package.json +3 -3
package/dist/cli.js
CHANGED
|
@@ -19613,7 +19613,7 @@ var require_lib4 = __commonJS((exports, module) => {
|
|
|
19613
19613
|
var rRel = new RegExp(`^\\.${rSlash.source}`);
|
|
19614
19614
|
var getNotFoundError = (cmd) => Object.assign(new Error(`not found: ${cmd}`), { code: "ENOENT" });
|
|
19615
19615
|
var getPathInfo = (cmd, {
|
|
19616
|
-
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.12.0/x64/bin:/home/runner/.bun/bin:/tmp/tmp.
|
|
19616
|
+
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.12.0/x64/bin:/home/runner/.bun/bin:/tmp/tmp.NzQ3X8wFfK:/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",
|
|
19617
19617
|
pathExt: optPathExt = process.env.PATHEXT,
|
|
19618
19618
|
delimiter: optDelimiter = delimiter
|
|
19619
19619
|
}) => {
|
|
@@ -19817,7 +19817,7 @@ var require_lib5 = __commonJS((exports, module) => {
|
|
|
19817
19817
|
let pathToInitial;
|
|
19818
19818
|
try {
|
|
19819
19819
|
pathToInitial = which.sync(initialCmd, {
|
|
19820
|
-
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.12.0/x64/bin:/home/runner/.bun/bin:/tmp/tmp.
|
|
19820
|
+
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.12.0/x64/bin:/home/runner/.bun/bin:/tmp/tmp.NzQ3X8wFfK:/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",
|
|
19821
19821
|
pathext: options.env && findInObject(options.env, "PATHEXT") || process.env.PATHEXT
|
|
19822
19822
|
}).toLowerCase();
|
|
19823
19823
|
} catch (err) {
|
|
@@ -20534,7 +20534,7 @@ var require_lib6 = __commonJS((exports, module) => {
|
|
|
20534
20534
|
var rRel = new RegExp(`^\\.${rSlash.source}`);
|
|
20535
20535
|
var getNotFoundError = (cmd) => Object.assign(new Error(`not found: ${cmd}`), { code: "ENOENT" });
|
|
20536
20536
|
var getPathInfo = (cmd, {
|
|
20537
|
-
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.12.0/x64/bin:/home/runner/.bun/bin:/tmp/tmp.
|
|
20537
|
+
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.12.0/x64/bin:/home/runner/.bun/bin:/tmp/tmp.NzQ3X8wFfK:/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",
|
|
20538
20538
|
pathExt: optPathExt = process.env.PATHEXT,
|
|
20539
20539
|
delimiter: optDelimiter = delimiter
|
|
20540
20540
|
}) => {
|
|
@@ -223327,7 +223327,7 @@ ${Bt.cyan(Yt)}
|
|
|
223327
223327
|
code: "ENOENT"
|
|
223328
223328
|
}), getPathInfo = (e9, t7) => {
|
|
223329
223329
|
var r6 = t7.colon || or;
|
|
223330
|
-
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.12.0/x64/bin:/home/runner/.bun/bin:/tmp/tmp.
|
|
223330
|
+
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.12.0/x64/bin:/home/runner/.bun/bin:/tmp/tmp.NzQ3X8wFfK:/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)];
|
|
223331
223331
|
var n6 = nr ? t7.pathExt || process.env.PATHEXT || ".EXE;.CMD;.BAT;.COM" : "";
|
|
223332
223332
|
var a5 = nr ? n6.split(r6) : [""];
|
|
223333
223333
|
if (nr) {
|
|
@@ -226464,7 +226464,7 @@ ${whileRunning(e9)}`;
|
|
|
226464
226464
|
};
|
|
226465
226465
|
ni = Object.assign(async function _main() {
|
|
226466
226466
|
var e9 = new Cli({
|
|
226467
|
-
binaryVersion: "0.9.9-
|
|
226467
|
+
binaryVersion: "0.9.9-preb0b62f1",
|
|
226468
226468
|
binaryLabel: "gql.tada CLI",
|
|
226469
226469
|
binaryName: "gql.tada"
|
|
226470
226470
|
});
|
|
@@ -234964,7 +234964,7 @@ var require_which2 = __commonJS((exports, module) => {
|
|
|
234964
234964
|
const colon = opt2.colon || COLON;
|
|
234965
234965
|
const pathEnv = cmd2.match(/\//) || isWindows2 && cmd2.match(/\\/) ? [""] : [
|
|
234966
234966
|
...isWindows2 ? [process.cwd()] : [],
|
|
234967
|
-
...(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.12.0/x64/bin:/home/runner/.bun/bin:/tmp/tmp.
|
|
234967
|
+
...(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.12.0/x64/bin:/home/runner/.bun/bin:/tmp/tmp.NzQ3X8wFfK:/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)
|
|
234968
234968
|
];
|
|
234969
234969
|
const pathExtExe = isWindows2 ? opt2.pathExt || process.env.PATHEXT || ".EXE;.CMD;.BAT;.COM" : "";
|
|
234970
234970
|
const pathExt = isWindows2 ? pathExtExe.split(colon) : [""];
|
|
@@ -256788,7 +256788,7 @@ ${error.stack}`));
|
|
|
256788
256788
|
var package_default = {
|
|
256789
256789
|
name: "@settlemint/sdk-cli",
|
|
256790
256790
|
description: "SettleMint SDK, integrate SettleMint into your application with ease.",
|
|
256791
|
-
version: "0.9.9-
|
|
256791
|
+
version: "0.9.9-preb0b62f1",
|
|
256792
256792
|
type: "module",
|
|
256793
256793
|
private: false,
|
|
256794
256794
|
license: "FSL-1.1-MIT",
|
|
@@ -256841,8 +256841,8 @@ var package_default = {
|
|
|
256841
256841
|
"@inquirer/input": "4.1.2",
|
|
256842
256842
|
"@inquirer/password": "4.0.5",
|
|
256843
256843
|
"@inquirer/select": "4.0.5",
|
|
256844
|
-
"@settlemint/sdk-js": "0.9.9-
|
|
256845
|
-
"@settlemint/sdk-utils": "0.9.9-
|
|
256844
|
+
"@settlemint/sdk-js": "0.9.9-preb0b62f1",
|
|
256845
|
+
"@settlemint/sdk-utils": "0.9.9-preb0b62f1",
|
|
256846
256846
|
"get-tsconfig": "4.8.1",
|
|
256847
256847
|
giget: "1.2.3"
|
|
256848
256848
|
},
|
|
@@ -267563,7 +267563,7 @@ var et = l((Re, tt) => {
|
|
|
267563
267563
|
var g = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys", Y = h("path"), Bt = g ? ";" : ":", V = U(), J = (t) => Object.assign(new Error(`not found: ${t}`), { code: "ENOENT" }), Q = (t, e) => {
|
|
267564
267564
|
let n = e.colon || Bt, r = t.match(/\//) || g && t.match(/\\/) ? [""] : [
|
|
267565
267565
|
...g ? [process.cwd()] : [],
|
|
267566
|
-
...(e.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.12.0/x64/bin:/home/runner/.bun/bin:/tmp/tmp.
|
|
267566
|
+
...(e.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.12.0/x64/bin:/home/runner/.bun/bin:/tmp/tmp.NzQ3X8wFfK:/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(n)
|
|
267567
267567
|
], s = g ? e.pathExt || process.env.PATHEXT || ".EXE;.CMD;.BAT;.COM" : "", o = g ? s.split(n) : [""];
|
|
267568
267568
|
return g && t.indexOf(".") !== -1 && o[0] !== "" && o.unshift(""), {
|
|
267569
267569
|
pathEnv: r,
|
|
@@ -268250,11 +268250,24 @@ async function retryWhenFailed(fn, maxRetries = 5, initialSleepTime = 3000, stop
|
|
|
268250
268250
|
if (attempt >= maxRetries) {
|
|
268251
268251
|
throw e;
|
|
268252
268252
|
}
|
|
268253
|
-
const jitter =
|
|
268253
|
+
const jitter = Math.random();
|
|
268254
268254
|
const delay = 2 ** attempt * initialSleepTime * jitter;
|
|
268255
268255
|
await new Promise((resolve2) => setTimeout(resolve2, delay));
|
|
268256
268256
|
}
|
|
268257
268257
|
}
|
|
268258
|
+
throw new Error("Retry failed");
|
|
268259
|
+
}
|
|
268260
|
+
async function fetchWithRetry(input, init, maxRetries = 5, initialSleepTime = 3000) {
|
|
268261
|
+
return retryWhenFailed(async () => {
|
|
268262
|
+
const response = await fetch(input, init);
|
|
268263
|
+
if (response.ok) {
|
|
268264
|
+
return response;
|
|
268265
|
+
}
|
|
268266
|
+
if (response.status < 500 && response.status !== 429 && response.status !== 408 && response.status !== 0) {
|
|
268267
|
+
return response;
|
|
268268
|
+
}
|
|
268269
|
+
throw new Error(`HTTP error! status: ${response.status} ${response.statusText}`);
|
|
268270
|
+
}, maxRetries, initialSleepTime);
|
|
268258
268271
|
}
|
|
268259
268272
|
function capitalizeFirstLetter(val) {
|
|
268260
268273
|
return String(val).charAt(0).toUpperCase() + String(val).slice(1);
|
|
@@ -268543,16 +268556,15 @@ async function testGqlEndpoint({
|
|
|
268543
268556
|
if (!gqlEndpoint) {
|
|
268544
268557
|
return false;
|
|
268545
268558
|
}
|
|
268546
|
-
const
|
|
268547
|
-
|
|
268548
|
-
|
|
268549
|
-
|
|
268550
|
-
|
|
268551
|
-
|
|
268552
|
-
|
|
268553
|
-
|
|
268554
|
-
|
|
268555
|
-
query: `
|
|
268559
|
+
const response = await fetchWithRetry(gqlEndpoint, {
|
|
268560
|
+
method: "POST",
|
|
268561
|
+
headers: {
|
|
268562
|
+
"x-auth-token": accessToken,
|
|
268563
|
+
...isHasura ? { "x-hasura-admin-secret": hasuraAdminSecret ?? "" } : {},
|
|
268564
|
+
"Content-Type": "application/json"
|
|
268565
|
+
},
|
|
268566
|
+
body: JSON.stringify({
|
|
268567
|
+
query: `
|
|
268556
268568
|
query {
|
|
268557
268569
|
__schema {
|
|
268558
268570
|
types {
|
|
@@ -268561,18 +268573,13 @@ async function testGqlEndpoint({
|
|
|
268561
268573
|
}
|
|
268562
268574
|
}
|
|
268563
268575
|
`
|
|
268564
|
-
|
|
268565
|
-
});
|
|
268566
|
-
if (!response.ok) {
|
|
268567
|
-
throw new Error(`HTTP error! status: ${response.status}`);
|
|
268568
|
-
}
|
|
268569
|
-
const data = await response.json();
|
|
268570
|
-
if (data.errors) {
|
|
268571
|
-
throw new Error("GraphQL errors in response");
|
|
268572
|
-
}
|
|
268573
|
-
return true;
|
|
268576
|
+
})
|
|
268574
268577
|
});
|
|
268575
|
-
|
|
268578
|
+
const data = await response.json();
|
|
268579
|
+
if (data.errors) {
|
|
268580
|
+
throw new Error("GraphQL errors in response");
|
|
268581
|
+
}
|
|
268582
|
+
return true;
|
|
268576
268583
|
}
|
|
268577
268584
|
|
|
268578
268585
|
// ../../node_modules/get-tsconfig/dist/index.mjs
|
|
@@ -270729,11 +270736,13 @@ async function exists3(path5) {
|
|
|
270729
270736
|
}
|
|
270730
270737
|
}
|
|
270731
270738
|
async function findMonoRepoRoot(startDir) {
|
|
270732
|
-
const lockFilePath = await findUp(["package-lock.json", "yarn.lock", "pnpm-lock.yaml", "bun.lockb", "bun.lock"]
|
|
270739
|
+
const lockFilePath = await findUp(["package-lock.json", "yarn.lock", "pnpm-lock.yaml", "bun.lockb", "bun.lock"], {
|
|
270740
|
+
cwd: startDir
|
|
270741
|
+
});
|
|
270733
270742
|
if (lockFilePath) {
|
|
270734
|
-
const packageJsonPath = join22(lockFilePath, "package.json");
|
|
270743
|
+
const packageJsonPath = join22(dirname22(lockFilePath), "package.json");
|
|
270735
270744
|
const hasWorkSpaces = await packageJsonHasWorkspaces(packageJsonPath);
|
|
270736
|
-
return hasWorkSpaces ? lockFilePath : null;
|
|
270745
|
+
return hasWorkSpaces ? dirname22(lockFilePath) : null;
|
|
270737
270746
|
}
|
|
270738
270747
|
let currentDir = startDir;
|
|
270739
270748
|
while (currentDir !== "/") {
|
|
@@ -273181,22 +273190,7 @@ function createSettleMintClient(options) {
|
|
|
273181
273190
|
headers: {
|
|
273182
273191
|
"x-auth-token": validatedOptions.accessToken
|
|
273183
273192
|
},
|
|
273184
|
-
fetch:
|
|
273185
|
-
const response = await retryWhenFailed(async () => {
|
|
273186
|
-
const response2 = await fetch(input, init2);
|
|
273187
|
-
if (response2.ok) {
|
|
273188
|
-
return response2;
|
|
273189
|
-
}
|
|
273190
|
-
if (response2.status < 500 && response2.status !== 429 && response2.status !== 408 && response2.status !== 0) {
|
|
273191
|
-
return response2;
|
|
273192
|
-
}
|
|
273193
|
-
throw new Error(response2.statusText);
|
|
273194
|
-
});
|
|
273195
|
-
if (!response) {
|
|
273196
|
-
throw new Error("Failed to fetch");
|
|
273197
|
-
}
|
|
273198
|
-
return response;
|
|
273199
|
-
}
|
|
273193
|
+
fetch: fetchWithRetry
|
|
273200
273194
|
});
|
|
273201
273195
|
return {
|
|
273202
273196
|
workspace: {
|
|
@@ -273590,7 +273584,17 @@ async function servicePrompt({
|
|
|
273590
273584
|
if (isRequired && services.length === 1) {
|
|
273591
273585
|
return services[0];
|
|
273592
273586
|
}
|
|
273593
|
-
|
|
273587
|
+
const choices = services.map((service) => ({
|
|
273588
|
+
name: service.name,
|
|
273589
|
+
value: service
|
|
273590
|
+
}));
|
|
273591
|
+
if (!isRequired) {
|
|
273592
|
+
choices.push({
|
|
273593
|
+
name: "None",
|
|
273594
|
+
value: undefined
|
|
273595
|
+
});
|
|
273596
|
+
}
|
|
273597
|
+
return defaultHandler({ defaultService: selectedService, choices });
|
|
273594
273598
|
}
|
|
273595
273599
|
|
|
273596
273600
|
// src/commands/connect/blockchain-node.prompt.ts
|
|
@@ -273601,28 +273605,17 @@ async function blockchainNodePrompt({
|
|
|
273601
273605
|
filterRunningOnly = false,
|
|
273602
273606
|
isRequired = false
|
|
273603
273607
|
}) {
|
|
273604
|
-
const choices = filterRunningOnly ? nodes.filter((node) => node.status === "COMPLETED") : nodes;
|
|
273605
273608
|
return servicePrompt({
|
|
273606
273609
|
env: env2,
|
|
273607
273610
|
services: nodes,
|
|
273608
273611
|
accept,
|
|
273609
273612
|
envKey: "SETTLEMINT_BLOCKCHAIN_NODE",
|
|
273610
273613
|
isRequired,
|
|
273611
|
-
defaultHandler: async ({ defaultService: defaultNode }) => {
|
|
273614
|
+
defaultHandler: async ({ defaultService: defaultNode, choices }) => {
|
|
273615
|
+
const filteredChoices = filterRunningOnly ? choices.filter(({ value: node }) => node === undefined || node?.status === "COMPLETED") : choices;
|
|
273612
273616
|
return esm_default2({
|
|
273613
273617
|
message: "Which blockchain node do you want to connect to?",
|
|
273614
|
-
choices:
|
|
273615
|
-
...choices.map((node) => ({
|
|
273616
|
-
name: node.name,
|
|
273617
|
-
value: node
|
|
273618
|
-
})),
|
|
273619
|
-
...isRequired ? [] : [
|
|
273620
|
-
{
|
|
273621
|
-
name: "None",
|
|
273622
|
-
value: undefined
|
|
273623
|
-
}
|
|
273624
|
-
]
|
|
273625
|
-
],
|
|
273618
|
+
choices: filteredChoices,
|
|
273626
273619
|
default: defaultNode
|
|
273627
273620
|
});
|
|
273628
273621
|
}
|
|
@@ -273643,21 +273636,10 @@ async function blockscoutPrompt({
|
|
|
273643
273636
|
accept,
|
|
273644
273637
|
envKey: "SETTLEMINT_BLOCKSCOUT",
|
|
273645
273638
|
isRequired,
|
|
273646
|
-
defaultHandler: async ({ defaultService: defaultBlockscout }) => {
|
|
273639
|
+
defaultHandler: async ({ defaultService: defaultBlockscout, choices }) => {
|
|
273647
273640
|
return esm_default2({
|
|
273648
273641
|
message: "Which blockscout instance do you want to connect to?",
|
|
273649
|
-
choices
|
|
273650
|
-
...possible.map((insight) => ({
|
|
273651
|
-
name: insight.name,
|
|
273652
|
-
value: insight
|
|
273653
|
-
})),
|
|
273654
|
-
...isRequired ? [] : [
|
|
273655
|
-
{
|
|
273656
|
-
name: "None",
|
|
273657
|
-
value: undefined
|
|
273658
|
-
}
|
|
273659
|
-
]
|
|
273660
|
-
],
|
|
273642
|
+
choices,
|
|
273661
273643
|
default: defaultBlockscout
|
|
273662
273644
|
});
|
|
273663
273645
|
}
|
|
@@ -273677,23 +273659,10 @@ async function customDeploymentPrompt({
|
|
|
273677
273659
|
accept,
|
|
273678
273660
|
envKey: "SETTLEMINT_CUSTOM_DEPLOYMENT",
|
|
273679
273661
|
isRequired,
|
|
273680
|
-
defaultHandler: async ({
|
|
273681
|
-
defaultService: defaultCustomDeployment
|
|
273682
|
-
}) => {
|
|
273662
|
+
defaultHandler: async ({ defaultService: defaultCustomDeployment, choices }) => {
|
|
273683
273663
|
return esm_default2({
|
|
273684
273664
|
message: "Which Custom Deployment do you want to connect to?",
|
|
273685
|
-
choices
|
|
273686
|
-
...customDeployments.map((customDeployment) => ({
|
|
273687
|
-
name: customDeployment.name,
|
|
273688
|
-
value: customDeployment
|
|
273689
|
-
})),
|
|
273690
|
-
...isRequired ? [] : [
|
|
273691
|
-
{
|
|
273692
|
-
name: "None",
|
|
273693
|
-
value: undefined
|
|
273694
|
-
}
|
|
273695
|
-
]
|
|
273696
|
-
],
|
|
273665
|
+
choices,
|
|
273697
273666
|
default: defaultCustomDeployment
|
|
273698
273667
|
});
|
|
273699
273668
|
}
|
|
@@ -273714,21 +273683,10 @@ async function hasuraPrompt({
|
|
|
273714
273683
|
accept,
|
|
273715
273684
|
envKey: "SETTLEMINT_HASURA",
|
|
273716
273685
|
isRequired,
|
|
273717
|
-
defaultHandler: async ({ defaultService: defaultHasura }) => {
|
|
273686
|
+
defaultHandler: async ({ defaultService: defaultHasura, choices }) => {
|
|
273718
273687
|
return esm_default2({
|
|
273719
273688
|
message: "Which Hasura instance do you want to connect to?",
|
|
273720
|
-
choices
|
|
273721
|
-
...possible.map((integration) => ({
|
|
273722
|
-
name: integration.name,
|
|
273723
|
-
value: integration
|
|
273724
|
-
})),
|
|
273725
|
-
...isRequired ? [] : [
|
|
273726
|
-
{
|
|
273727
|
-
name: "None",
|
|
273728
|
-
value: undefined
|
|
273729
|
-
}
|
|
273730
|
-
]
|
|
273731
|
-
],
|
|
273689
|
+
choices,
|
|
273732
273690
|
default: defaultHasura
|
|
273733
273691
|
});
|
|
273734
273692
|
}
|
|
@@ -273749,21 +273707,10 @@ async function hdPrivateKeyPrompt({
|
|
|
273749
273707
|
accept,
|
|
273750
273708
|
envKey: "SETTLEMINT_HD_PRIVATE_KEY",
|
|
273751
273709
|
isRequired,
|
|
273752
|
-
defaultHandler: async ({ defaultService: defaultPrivateKey }) => {
|
|
273710
|
+
defaultHandler: async ({ defaultService: defaultPrivateKey, choices }) => {
|
|
273753
273711
|
return esm_default2({
|
|
273754
273712
|
message: "Which HD Private Key do you want to use?",
|
|
273755
|
-
choices
|
|
273756
|
-
...possible.map((privateKey) => ({
|
|
273757
|
-
name: privateKey.name,
|
|
273758
|
-
value: privateKey
|
|
273759
|
-
})),
|
|
273760
|
-
...isRequired ? [] : [
|
|
273761
|
-
{
|
|
273762
|
-
name: "None",
|
|
273763
|
-
value: undefined
|
|
273764
|
-
}
|
|
273765
|
-
]
|
|
273766
|
-
],
|
|
273713
|
+
choices,
|
|
273767
273714
|
default: defaultPrivateKey
|
|
273768
273715
|
});
|
|
273769
273716
|
}
|
|
@@ -273828,21 +273775,10 @@ async function ipfsPrompt({
|
|
|
273828
273775
|
accept,
|
|
273829
273776
|
envKey: "SETTLEMINT_IPFS",
|
|
273830
273777
|
isRequired,
|
|
273831
|
-
defaultHandler: async ({ defaultService: defaultStorage }) => {
|
|
273778
|
+
defaultHandler: async ({ defaultService: defaultStorage, choices }) => {
|
|
273832
273779
|
return esm_default2({
|
|
273833
273780
|
message: "Which IPFS instance do you want to connect to?",
|
|
273834
|
-
choices
|
|
273835
|
-
...possible.map((storage) => ({
|
|
273836
|
-
name: storage.name,
|
|
273837
|
-
value: storage
|
|
273838
|
-
})),
|
|
273839
|
-
...isRequired ? [] : [
|
|
273840
|
-
{
|
|
273841
|
-
name: "None",
|
|
273842
|
-
value: undefined
|
|
273843
|
-
}
|
|
273844
|
-
]
|
|
273845
|
-
],
|
|
273781
|
+
choices,
|
|
273846
273782
|
default: defaultStorage
|
|
273847
273783
|
});
|
|
273848
273784
|
}
|
|
@@ -273863,21 +273799,10 @@ async function minioPrompt({
|
|
|
273863
273799
|
accept,
|
|
273864
273800
|
envKey: "SETTLEMINT_MINIO",
|
|
273865
273801
|
isRequired,
|
|
273866
|
-
defaultHandler: async ({ defaultService: defaultStorage }) => {
|
|
273802
|
+
defaultHandler: async ({ defaultService: defaultStorage, choices }) => {
|
|
273867
273803
|
return esm_default2({
|
|
273868
273804
|
message: "Which MinIO instance do you want to connect to?",
|
|
273869
|
-
choices
|
|
273870
|
-
...possible.map((storage) => ({
|
|
273871
|
-
name: storage.name,
|
|
273872
|
-
value: storage
|
|
273873
|
-
})),
|
|
273874
|
-
...isRequired ? [] : [
|
|
273875
|
-
{
|
|
273876
|
-
name: "None",
|
|
273877
|
-
value: undefined
|
|
273878
|
-
}
|
|
273879
|
-
]
|
|
273880
|
-
],
|
|
273805
|
+
choices,
|
|
273881
273806
|
default: defaultStorage
|
|
273882
273807
|
});
|
|
273883
273808
|
}
|
|
@@ -273898,21 +273823,10 @@ async function portalPrompt({
|
|
|
273898
273823
|
accept,
|
|
273899
273824
|
envKey: "SETTLEMINT_PORTAL",
|
|
273900
273825
|
isRequired,
|
|
273901
|
-
defaultHandler: async ({ defaultService: defaultMiddleware }) => {
|
|
273826
|
+
defaultHandler: async ({ defaultService: defaultMiddleware, choices }) => {
|
|
273902
273827
|
return esm_default2({
|
|
273903
273828
|
message: "Which Smart Contract Portal instance do you want to connect to?",
|
|
273904
|
-
choices
|
|
273905
|
-
...possible.map((middleware) => ({
|
|
273906
|
-
name: middleware.name,
|
|
273907
|
-
value: middleware
|
|
273908
|
-
})),
|
|
273909
|
-
...isRequired ? [] : [
|
|
273910
|
-
{
|
|
273911
|
-
name: "None",
|
|
273912
|
-
value: undefined
|
|
273913
|
-
}
|
|
273914
|
-
]
|
|
273915
|
-
],
|
|
273829
|
+
choices,
|
|
273916
273830
|
default: defaultMiddleware
|
|
273917
273831
|
});
|
|
273918
273832
|
}
|
|
@@ -273967,28 +273881,17 @@ async function theGraphPrompt({
|
|
|
273967
273881
|
isRequired = false
|
|
273968
273882
|
}) {
|
|
273969
273883
|
const graphMiddlewares = middlewares.filter((middleware) => middleware.__typename === "HAGraphMiddleware");
|
|
273970
|
-
const choices = filterRunningOnly ? graphMiddlewares.filter((middleware) => middleware.status === "COMPLETED") : graphMiddlewares;
|
|
273971
273884
|
return servicePrompt({
|
|
273972
273885
|
env: env2,
|
|
273973
273886
|
services: graphMiddlewares,
|
|
273974
273887
|
accept,
|
|
273975
273888
|
envKey: "SETTLEMINT_THEGRAPH",
|
|
273976
273889
|
isRequired,
|
|
273977
|
-
defaultHandler: async ({ defaultService: defaultMiddleware }) => {
|
|
273890
|
+
defaultHandler: async ({ defaultService: defaultMiddleware, choices }) => {
|
|
273891
|
+
const filteredChoices = filterRunningOnly ? choices.filter(({ value: middleware }) => middleware === undefined || middleware?.status === "COMPLETED") : choices;
|
|
273978
273892
|
return esm_default2({
|
|
273979
273893
|
message: "Which The Graph instance do you want to connect to?",
|
|
273980
|
-
choices:
|
|
273981
|
-
...choices.map((middleware) => ({
|
|
273982
|
-
name: middleware.name,
|
|
273983
|
-
value: middleware
|
|
273984
|
-
})),
|
|
273985
|
-
...isRequired ? [] : [
|
|
273986
|
-
{
|
|
273987
|
-
name: "None",
|
|
273988
|
-
value: undefined
|
|
273989
|
-
}
|
|
273990
|
-
]
|
|
273991
|
-
],
|
|
273894
|
+
choices: filteredChoices,
|
|
273992
273895
|
default: defaultMiddleware
|
|
273993
273896
|
});
|
|
273994
273897
|
}
|
|
@@ -275729,21 +275632,10 @@ async function blockchainNetworkPrompt({
|
|
|
275729
275632
|
accept,
|
|
275730
275633
|
envKey: "SETTLEMINT_BLOCKCHAIN_NETWORK",
|
|
275731
275634
|
isRequired,
|
|
275732
|
-
defaultHandler: async ({ defaultService: defaultNetwork }) => {
|
|
275635
|
+
defaultHandler: async ({ defaultService: defaultNetwork, choices }) => {
|
|
275733
275636
|
return esm_default2({
|
|
275734
275637
|
message: "Which blockchain network do you want to connect to?",
|
|
275735
|
-
choices
|
|
275736
|
-
...networks.map((network) => ({
|
|
275737
|
-
name: network.name,
|
|
275738
|
-
value: network
|
|
275739
|
-
})),
|
|
275740
|
-
...isRequired ? [] : [
|
|
275741
|
-
{
|
|
275742
|
-
name: "None",
|
|
275743
|
-
value: undefined
|
|
275744
|
-
}
|
|
275745
|
-
]
|
|
275746
|
-
],
|
|
275638
|
+
choices,
|
|
275747
275639
|
default: defaultNetwork
|
|
275748
275640
|
});
|
|
275749
275641
|
}
|
|
@@ -277696,7 +277588,7 @@ function subgraphDeployCommand() {
|
|
|
277696
277588
|
accessToken,
|
|
277697
277589
|
instance
|
|
277698
277590
|
});
|
|
277699
|
-
const middleware = await
|
|
277591
|
+
const middleware = await settlemintClient.middleware.read(theGraphMiddleware.uniqueName);
|
|
277700
277592
|
const graphEndpoints = await getGraphEndpoint(middleware, env2, graphName);
|
|
277701
277593
|
await writeEnvSpinner(!!prod, {
|
|
277702
277594
|
...env2,
|
|
@@ -277710,16 +277602,6 @@ async function updateSpecVersion(specVersion) {
|
|
|
277710
277602
|
yamlConfig.specVersion = specVersion;
|
|
277711
277603
|
await updateSubgraphYamlConfig(yamlConfig);
|
|
277712
277604
|
}
|
|
277713
|
-
async function getMiddlewareAndValidateSubgraphIsAvailable(uniqueName, settlemintClient, graphName) {
|
|
277714
|
-
const middleware = await settlemintClient.middleware.read(uniqueName);
|
|
277715
|
-
if (middleware.__typename === "HAGraphMiddleware") {
|
|
277716
|
-
if (middleware.subgraphs.some((s8) => s8.name === graphName)) {
|
|
277717
|
-
return middleware;
|
|
277718
|
-
}
|
|
277719
|
-
throw new Error("Subgraph not available");
|
|
277720
|
-
}
|
|
277721
|
-
return middleware;
|
|
277722
|
-
}
|
|
277723
277605
|
|
|
277724
277606
|
// src/commands/smart-contract.set.ts
|
|
277725
277607
|
function smartContractSetCommand() {
|
|
@@ -277767,4 +277649,4 @@ function sdkCliCommand(exitOverride = undefined) {
|
|
|
277767
277649
|
ascii();
|
|
277768
277650
|
sdkCliCommand();
|
|
277769
277651
|
|
|
277770
|
-
//# debugId=
|
|
277652
|
+
//# debugId=80293EC1B6A0511164756E2164756E21
|