@settlemint/sdk-cli 0.9.3-pr80718977 → 0.9.3-pr88ffe1c0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/cli.js +310 -166
- package/dist/cli.js.map +28 -28
- 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.0xGFfKu7TH:/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.0xGFfKu7TH:/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.0xGFfKu7TH:/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.0xGFfKu7TH:/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.3-
|
|
226467
|
+
binaryVersion: "0.9.3-pr88ffe1c0",
|
|
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.0xGFfKu7TH:/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.3-
|
|
256791
|
+
version: "0.9.3-pr88ffe1c0",
|
|
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.1",
|
|
256842
256842
|
"@inquirer/password": "4.0.4",
|
|
256843
256843
|
"@inquirer/select": "4.0.4",
|
|
256844
|
-
"@settlemint/sdk-js": "0.9.3-
|
|
256845
|
-
"@settlemint/sdk-utils": "0.9.3-
|
|
256844
|
+
"@settlemint/sdk-js": "0.9.3-pr88ffe1c0",
|
|
256845
|
+
"@settlemint/sdk-utils": "0.9.3-pr88ffe1c0",
|
|
256846
256846
|
"get-tsconfig": "4.8.1",
|
|
256847
256847
|
giget: "1.2.3"
|
|
256848
256848
|
},
|
|
@@ -267561,7 +267561,7 @@ var et = l((Re, tt) => {
|
|
|
267561
267561
|
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) => {
|
|
267562
267562
|
let n = e.colon || Bt, r = t.match(/\//) || g && t.match(/\\/) ? [""] : [
|
|
267563
267563
|
...g ? [process.cwd()] : [],
|
|
267564
|
-
...(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.
|
|
267564
|
+
...(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.0xGFfKu7TH:/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)
|
|
267565
267565
|
], s = g ? e.pathExt || process.env.PATHEXT || ".EXE;.CMD;.BAT;.COM" : "", o = g ? s.split(n) : [""];
|
|
267566
267566
|
return g && t.indexOf(".") !== -1 && o[0] !== "" && o.unshift(""), {
|
|
267567
267567
|
pathEnv: r,
|
|
@@ -268232,28 +268232,6 @@ async function isPackageInstalled(name, path5) {
|
|
|
268232
268232
|
const inPeerDependencies = !!pkgJson.content.peerDependencies?.[name];
|
|
268233
268233
|
return inDependencies || inDevDependencies || inPeerDependencies;
|
|
268234
268234
|
}
|
|
268235
|
-
var retryWhenFailed = async (fn, maxRetries = 5, initialSleepTime = 3000, stopOnError) => {
|
|
268236
|
-
let attempt = 0;
|
|
268237
|
-
while (attempt < maxRetries) {
|
|
268238
|
-
try {
|
|
268239
|
-
return await fn();
|
|
268240
|
-
} catch (e) {
|
|
268241
|
-
if (typeof stopOnError === "function") {
|
|
268242
|
-
const error = e;
|
|
268243
|
-
if (stopOnError(error)) {
|
|
268244
|
-
throw error;
|
|
268245
|
-
}
|
|
268246
|
-
}
|
|
268247
|
-
attempt += 1;
|
|
268248
|
-
if (attempt >= maxRetries) {
|
|
268249
|
-
throw e;
|
|
268250
|
-
}
|
|
268251
|
-
const jitter = 0.5 + Math.random();
|
|
268252
|
-
const delay = 2 ** attempt * initialSleepTime * jitter;
|
|
268253
|
-
await new Promise((resolve2) => setTimeout(resolve2, delay));
|
|
268254
|
-
}
|
|
268255
|
-
}
|
|
268256
|
-
};
|
|
268257
268235
|
function capitalizeFirstLetter(val) {
|
|
268258
268236
|
return String(val).charAt(0).toUpperCase() + String(val).slice(1);
|
|
268259
268237
|
}
|
|
@@ -268536,41 +268514,50 @@ async function testGqlEndpoint({
|
|
|
268536
268514
|
accessToken,
|
|
268537
268515
|
hasuraAdminSecret,
|
|
268538
268516
|
gqlEndpoint,
|
|
268539
|
-
isHasura = false
|
|
268517
|
+
isHasura = false,
|
|
268518
|
+
maxRetries = 3
|
|
268540
268519
|
}) {
|
|
268541
268520
|
if (!gqlEndpoint) {
|
|
268542
268521
|
return false;
|
|
268543
268522
|
}
|
|
268544
|
-
|
|
268545
|
-
|
|
268546
|
-
|
|
268547
|
-
|
|
268548
|
-
|
|
268549
|
-
|
|
268550
|
-
|
|
268551
|
-
|
|
268552
|
-
|
|
268553
|
-
|
|
268554
|
-
query
|
|
268555
|
-
|
|
268556
|
-
|
|
268557
|
-
|
|
268523
|
+
for (let attempt = 0;attempt < maxRetries; attempt++) {
|
|
268524
|
+
try {
|
|
268525
|
+
const response = await fetch(gqlEndpoint, {
|
|
268526
|
+
method: "POST",
|
|
268527
|
+
headers: {
|
|
268528
|
+
"x-auth-token": accessToken,
|
|
268529
|
+
...isHasura ? { "x-hasura-admin-secret": hasuraAdminSecret ?? "" } : {},
|
|
268530
|
+
"Content-Type": "application/json"
|
|
268531
|
+
},
|
|
268532
|
+
body: JSON.stringify({
|
|
268533
|
+
query: `
|
|
268534
|
+
query {
|
|
268535
|
+
__schema {
|
|
268536
|
+
types {
|
|
268537
|
+
name
|
|
268538
|
+
}
|
|
268558
268539
|
}
|
|
268559
268540
|
}
|
|
268560
|
-
|
|
268561
|
-
|
|
268562
|
-
})
|
|
268563
|
-
|
|
268564
|
-
|
|
268565
|
-
|
|
268566
|
-
|
|
268567
|
-
|
|
268568
|
-
|
|
268569
|
-
|
|
268541
|
+
`
|
|
268542
|
+
})
|
|
268543
|
+
});
|
|
268544
|
+
if (!response.ok) {
|
|
268545
|
+
throw new Error(`HTTP error! status: ${response.status}`);
|
|
268546
|
+
}
|
|
268547
|
+
const data = await response.json();
|
|
268548
|
+
if (data.errors) {
|
|
268549
|
+
throw new Error("GraphQL errors in response");
|
|
268550
|
+
}
|
|
268551
|
+
return true;
|
|
268552
|
+
} catch (error5) {
|
|
268553
|
+
if (attempt === maxRetries - 1) {
|
|
268554
|
+
return false;
|
|
268555
|
+
}
|
|
268556
|
+
const delay2 = 2 ** attempt * 1000;
|
|
268557
|
+
await new Promise((resolve4) => setTimeout(resolve4, delay2));
|
|
268570
268558
|
}
|
|
268571
|
-
|
|
268572
|
-
|
|
268573
|
-
return result ?? false;
|
|
268559
|
+
}
|
|
268560
|
+
return false;
|
|
268574
268561
|
}
|
|
268575
268562
|
|
|
268576
268563
|
// ../../node_modules/get-tsconfig/dist/index.mjs
|
|
@@ -271162,12 +271149,12 @@ async function writeEnvSpinner(prod, env2) {
|
|
|
271162
271149
|
}
|
|
271163
271150
|
|
|
271164
271151
|
// src/utils/get-cluster-service-endpoint.ts
|
|
271165
|
-
async function getGraphEndpoint(service, env2
|
|
271152
|
+
async function getGraphEndpoint(service, env2) {
|
|
271166
271153
|
if (!service || service.__typename !== "HAGraphMiddleware") {
|
|
271167
271154
|
return {};
|
|
271168
271155
|
}
|
|
271169
271156
|
const isStarterKit = (id) => id.endsWith("-starterkits");
|
|
271170
|
-
const testEndpoint = service.subgraphs.find(({ graphqlQueryEndpoint }) =>
|
|
271157
|
+
const testEndpoint = service.subgraphs.find(({ graphqlQueryEndpoint }) => !isStarterKit(graphqlQueryEndpoint?.id))?.graphqlQueryEndpoint?.displayValue;
|
|
271171
271158
|
const starterKitEndpoint = service.subgraphs.find(({ graphqlQueryEndpoint }) => isStarterKit(graphqlQueryEndpoint?.id))?.graphqlQueryEndpoint?.displayValue;
|
|
271172
271159
|
const hasEndpoint = testEndpoint && env2.SETTLEMINT_ACCESS_TOKEN ? await testGqlEndpoint({ accessToken: env2.SETTLEMINT_ACCESS_TOKEN, gqlEndpoint: testEndpoint }) : false;
|
|
271173
271160
|
const endpoints = hasEndpoint ? service.subgraphs.map(({ graphqlQueryEndpoint }) => graphqlQueryEndpoint?.displayValue) : starterKitEndpoint ? [starterKitEndpoint] : [];
|
|
@@ -273166,20 +273153,28 @@ function createSettleMintClient(options) {
|
|
|
273166
273153
|
"x-auth-token": validatedOptions.accessToken
|
|
273167
273154
|
},
|
|
273168
273155
|
fetch: async (input, init2) => {
|
|
273169
|
-
const
|
|
273170
|
-
|
|
273171
|
-
|
|
273172
|
-
|
|
273173
|
-
|
|
273174
|
-
|
|
273175
|
-
|
|
273156
|
+
const maxRetries = 3;
|
|
273157
|
+
const retryDelay = 1000;
|
|
273158
|
+
for (let attempt = 1;attempt <= maxRetries; attempt++) {
|
|
273159
|
+
try {
|
|
273160
|
+
const response = await fetch(input, init2);
|
|
273161
|
+
if (response.ok) {
|
|
273162
|
+
return response;
|
|
273163
|
+
}
|
|
273164
|
+
if (response.status < 500 && response.status !== 429 && response.status !== 408 && response.status !== 0) {
|
|
273165
|
+
return response;
|
|
273166
|
+
}
|
|
273167
|
+
if (attempt === maxRetries) {
|
|
273168
|
+
return response;
|
|
273169
|
+
}
|
|
273170
|
+
} catch (error5) {
|
|
273171
|
+
if (attempt === maxRetries) {
|
|
273172
|
+
throw error5;
|
|
273173
|
+
}
|
|
273176
273174
|
}
|
|
273177
|
-
|
|
273178
|
-
});
|
|
273179
|
-
if (!response) {
|
|
273180
|
-
throw new Error("Failed to fetch");
|
|
273175
|
+
await new Promise((resolve5) => setTimeout(resolve5, retryDelay * 2 ** (attempt - 1) * (0.5 + Math.random())));
|
|
273181
273176
|
}
|
|
273182
|
-
|
|
273177
|
+
throw new Error("Max retries exceeded");
|
|
273183
273178
|
}
|
|
273184
273179
|
});
|
|
273185
273180
|
return {
|
|
@@ -273557,6 +273552,7 @@ async function servicePrompt({
|
|
|
273557
273552
|
accept,
|
|
273558
273553
|
envKey,
|
|
273559
273554
|
defaultHandler,
|
|
273555
|
+
isRequired = false,
|
|
273560
273556
|
isCi = is_in_ci_default
|
|
273561
273557
|
}) {
|
|
273562
273558
|
if (services.length === 0) {
|
|
@@ -273570,20 +273566,27 @@ async function servicePrompt({
|
|
|
273570
273566
|
if (isCi) {
|
|
273571
273567
|
return;
|
|
273572
273568
|
}
|
|
273573
|
-
if (services.length === 1) {
|
|
273569
|
+
if (isRequired && services.length === 1) {
|
|
273574
273570
|
return services[0];
|
|
273575
273571
|
}
|
|
273576
273572
|
return defaultHandler({ defaultService: selectedService });
|
|
273577
273573
|
}
|
|
273578
273574
|
|
|
273579
273575
|
// src/commands/connect/blockchain-node.prompt.ts
|
|
273580
|
-
async function blockchainNodePrompt(
|
|
273576
|
+
async function blockchainNodePrompt({
|
|
273577
|
+
env: env2,
|
|
273578
|
+
nodes,
|
|
273579
|
+
accept,
|
|
273580
|
+
filterRunningOnly = false,
|
|
273581
|
+
isRequired = false
|
|
273582
|
+
}) {
|
|
273581
273583
|
const choices = filterRunningOnly ? nodes.filter((node) => node.status === "COMPLETED") : nodes;
|
|
273582
273584
|
return servicePrompt({
|
|
273583
273585
|
env: env2,
|
|
273584
273586
|
services: nodes,
|
|
273585
273587
|
accept,
|
|
273586
273588
|
envKey: "SETTLEMINT_BLOCKCHAIN_NODE",
|
|
273589
|
+
isRequired,
|
|
273587
273590
|
defaultHandler: async ({ defaultService: defaultNode }) => {
|
|
273588
273591
|
return esm_default2({
|
|
273589
273592
|
message: "Which blockchain node do you want to connect to?",
|
|
@@ -273592,10 +273595,12 @@ async function blockchainNodePrompt(env2, nodes, accept, filterRunningOnly = fal
|
|
|
273592
273595
|
name: node.name,
|
|
273593
273596
|
value: node
|
|
273594
273597
|
})),
|
|
273595
|
-
|
|
273596
|
-
|
|
273597
|
-
|
|
273598
|
-
|
|
273598
|
+
...isRequired ? [] : [
|
|
273599
|
+
{
|
|
273600
|
+
name: "None",
|
|
273601
|
+
value: undefined
|
|
273602
|
+
}
|
|
273603
|
+
]
|
|
273599
273604
|
],
|
|
273600
273605
|
default: defaultNode
|
|
273601
273606
|
});
|
|
@@ -273604,13 +273609,19 @@ async function blockchainNodePrompt(env2, nodes, accept, filterRunningOnly = fal
|
|
|
273604
273609
|
}
|
|
273605
273610
|
|
|
273606
273611
|
// src/commands/connect/blockscout.prompt.ts
|
|
273607
|
-
async function blockscoutPrompt(
|
|
273612
|
+
async function blockscoutPrompt({
|
|
273613
|
+
env: env2,
|
|
273614
|
+
insights,
|
|
273615
|
+
accept,
|
|
273616
|
+
isRequired = false
|
|
273617
|
+
}) {
|
|
273608
273618
|
const possible = insights.filter((insight) => insight.insightsCategory === "BLOCKCHAIN_EXPLORER");
|
|
273609
273619
|
return servicePrompt({
|
|
273610
273620
|
env: env2,
|
|
273611
273621
|
services: possible,
|
|
273612
273622
|
accept,
|
|
273613
273623
|
envKey: "SETTLEMINT_BLOCKSCOUT",
|
|
273624
|
+
isRequired,
|
|
273614
273625
|
defaultHandler: async ({ defaultService: defaultBlockscout }) => {
|
|
273615
273626
|
return esm_default2({
|
|
273616
273627
|
message: "Which blockscout instance do you want to connect to?",
|
|
@@ -273619,10 +273630,12 @@ async function blockscoutPrompt(env2, insights, accept) {
|
|
|
273619
273630
|
name: insight.name,
|
|
273620
273631
|
value: insight
|
|
273621
273632
|
})),
|
|
273622
|
-
|
|
273623
|
-
|
|
273624
|
-
|
|
273625
|
-
|
|
273633
|
+
...isRequired ? [] : [
|
|
273634
|
+
{
|
|
273635
|
+
name: "None",
|
|
273636
|
+
value: undefined
|
|
273637
|
+
}
|
|
273638
|
+
]
|
|
273626
273639
|
],
|
|
273627
273640
|
default: defaultBlockscout
|
|
273628
273641
|
});
|
|
@@ -273631,12 +273644,18 @@ async function blockscoutPrompt(env2, insights, accept) {
|
|
|
273631
273644
|
}
|
|
273632
273645
|
|
|
273633
273646
|
// src/commands/connect/custom-deployment.prompt.ts
|
|
273634
|
-
async function customDeploymentPrompt(
|
|
273647
|
+
async function customDeploymentPrompt({
|
|
273648
|
+
env: env2,
|
|
273649
|
+
customDeployments,
|
|
273650
|
+
accept,
|
|
273651
|
+
isRequired = false
|
|
273652
|
+
}) {
|
|
273635
273653
|
return servicePrompt({
|
|
273636
273654
|
env: env2,
|
|
273637
273655
|
services: customDeployments,
|
|
273638
273656
|
accept,
|
|
273639
273657
|
envKey: "SETTLEMINT_CUSTOM_DEPLOYMENT",
|
|
273658
|
+
isRequired,
|
|
273640
273659
|
defaultHandler: async ({
|
|
273641
273660
|
defaultService: defaultCustomDeployment
|
|
273642
273661
|
}) => {
|
|
@@ -273647,10 +273666,12 @@ async function customDeploymentPrompt(env2, customDeployments, accept) {
|
|
|
273647
273666
|
name: customDeployment.name,
|
|
273648
273667
|
value: customDeployment
|
|
273649
273668
|
})),
|
|
273650
|
-
|
|
273651
|
-
|
|
273652
|
-
|
|
273653
|
-
|
|
273669
|
+
...isRequired ? [] : [
|
|
273670
|
+
{
|
|
273671
|
+
name: "None",
|
|
273672
|
+
value: undefined
|
|
273673
|
+
}
|
|
273674
|
+
]
|
|
273654
273675
|
],
|
|
273655
273676
|
default: defaultCustomDeployment
|
|
273656
273677
|
});
|
|
@@ -273659,13 +273680,19 @@ async function customDeploymentPrompt(env2, customDeployments, accept) {
|
|
|
273659
273680
|
}
|
|
273660
273681
|
|
|
273661
273682
|
// src/commands/connect/hasura.prompt.ts
|
|
273662
|
-
async function hasuraPrompt(
|
|
273683
|
+
async function hasuraPrompt({
|
|
273684
|
+
env: env2,
|
|
273685
|
+
integrations,
|
|
273686
|
+
accept,
|
|
273687
|
+
isRequired = false
|
|
273688
|
+
}) {
|
|
273663
273689
|
const possible = integrations.filter((integration) => integration.integrationType === "HASURA");
|
|
273664
273690
|
return servicePrompt({
|
|
273665
273691
|
env: env2,
|
|
273666
273692
|
services: possible,
|
|
273667
273693
|
accept,
|
|
273668
273694
|
envKey: "SETTLEMINT_HASURA",
|
|
273695
|
+
isRequired,
|
|
273669
273696
|
defaultHandler: async ({ defaultService: defaultHasura }) => {
|
|
273670
273697
|
return esm_default2({
|
|
273671
273698
|
message: "Which Hasura instance do you want to connect to?",
|
|
@@ -273674,10 +273701,12 @@ async function hasuraPrompt(env2, integrations, accept) {
|
|
|
273674
273701
|
name: integration.name,
|
|
273675
273702
|
value: integration
|
|
273676
273703
|
})),
|
|
273677
|
-
|
|
273678
|
-
|
|
273679
|
-
|
|
273680
|
-
|
|
273704
|
+
...isRequired ? [] : [
|
|
273705
|
+
{
|
|
273706
|
+
name: "None",
|
|
273707
|
+
value: undefined
|
|
273708
|
+
}
|
|
273709
|
+
]
|
|
273681
273710
|
],
|
|
273682
273711
|
default: defaultHasura
|
|
273683
273712
|
});
|
|
@@ -273686,13 +273715,19 @@ async function hasuraPrompt(env2, integrations, accept) {
|
|
|
273686
273715
|
}
|
|
273687
273716
|
|
|
273688
273717
|
// src/commands/connect/hd-private-keys.prompt.ts
|
|
273689
|
-
async function hdPrivateKeyPrompt(
|
|
273718
|
+
async function hdPrivateKeyPrompt({
|
|
273719
|
+
env: env2,
|
|
273720
|
+
privateKeys,
|
|
273721
|
+
accept,
|
|
273722
|
+
isRequired = false
|
|
273723
|
+
}) {
|
|
273690
273724
|
const possible = privateKeys.filter((privateKey) => privateKey.privateKeyType === "HD_ECDSA_P256");
|
|
273691
273725
|
return servicePrompt({
|
|
273692
273726
|
env: env2,
|
|
273693
273727
|
services: possible,
|
|
273694
273728
|
accept,
|
|
273695
273729
|
envKey: "SETTLEMINT_HD_PRIVATE_KEY",
|
|
273730
|
+
isRequired,
|
|
273696
273731
|
defaultHandler: async ({ defaultService: defaultPrivateKey }) => {
|
|
273697
273732
|
return esm_default2({
|
|
273698
273733
|
message: "Which HD Private Key do you want to use?",
|
|
@@ -273701,10 +273736,12 @@ async function hdPrivateKeyPrompt(env2, privateKeys, accept) {
|
|
|
273701
273736
|
name: privateKey.name,
|
|
273702
273737
|
value: privateKey
|
|
273703
273738
|
})),
|
|
273704
|
-
|
|
273705
|
-
|
|
273706
|
-
|
|
273707
|
-
|
|
273739
|
+
...isRequired ? [] : [
|
|
273740
|
+
{
|
|
273741
|
+
name: "None",
|
|
273742
|
+
value: undefined
|
|
273743
|
+
}
|
|
273744
|
+
]
|
|
273708
273745
|
],
|
|
273709
273746
|
default: defaultPrivateKey
|
|
273710
273747
|
});
|
|
@@ -273757,13 +273794,19 @@ async function instancePrompt(env2, accept, freeTextInput = false) {
|
|
|
273757
273794
|
}
|
|
273758
273795
|
|
|
273759
273796
|
// src/commands/connect/ipfs.prompt.ts
|
|
273760
|
-
async function ipfsPrompt(
|
|
273797
|
+
async function ipfsPrompt({
|
|
273798
|
+
env: env2,
|
|
273799
|
+
storages,
|
|
273800
|
+
accept,
|
|
273801
|
+
isRequired = false
|
|
273802
|
+
}) {
|
|
273761
273803
|
const possible = storages.filter((storage) => storage.storageProtocol === "IPFS");
|
|
273762
273804
|
return servicePrompt({
|
|
273763
273805
|
env: env2,
|
|
273764
273806
|
services: possible,
|
|
273765
273807
|
accept,
|
|
273766
273808
|
envKey: "SETTLEMINT_IPFS",
|
|
273809
|
+
isRequired,
|
|
273767
273810
|
defaultHandler: async ({ defaultService: defaultStorage }) => {
|
|
273768
273811
|
return esm_default2({
|
|
273769
273812
|
message: "Which IPFS instance do you want to connect to?",
|
|
@@ -273772,10 +273815,12 @@ async function ipfsPrompt(env2, storages, accept) {
|
|
|
273772
273815
|
name: storage.name,
|
|
273773
273816
|
value: storage
|
|
273774
273817
|
})),
|
|
273775
|
-
|
|
273776
|
-
|
|
273777
|
-
|
|
273778
|
-
|
|
273818
|
+
...isRequired ? [] : [
|
|
273819
|
+
{
|
|
273820
|
+
name: "None",
|
|
273821
|
+
value: undefined
|
|
273822
|
+
}
|
|
273823
|
+
]
|
|
273779
273824
|
],
|
|
273780
273825
|
default: defaultStorage
|
|
273781
273826
|
});
|
|
@@ -273784,13 +273829,19 @@ async function ipfsPrompt(env2, storages, accept) {
|
|
|
273784
273829
|
}
|
|
273785
273830
|
|
|
273786
273831
|
// src/commands/connect/minio.prompt.ts
|
|
273787
|
-
async function minioPrompt(
|
|
273832
|
+
async function minioPrompt({
|
|
273833
|
+
env: env2,
|
|
273834
|
+
storages,
|
|
273835
|
+
accept,
|
|
273836
|
+
isRequired = false
|
|
273837
|
+
}) {
|
|
273788
273838
|
const possible = storages.filter((storage) => storage.storageProtocol === "MINIO");
|
|
273789
273839
|
return servicePrompt({
|
|
273790
273840
|
env: env2,
|
|
273791
273841
|
services: possible,
|
|
273792
273842
|
accept,
|
|
273793
273843
|
envKey: "SETTLEMINT_MINIO",
|
|
273844
|
+
isRequired,
|
|
273794
273845
|
defaultHandler: async ({ defaultService: defaultStorage }) => {
|
|
273795
273846
|
return esm_default2({
|
|
273796
273847
|
message: "Which MinIO instance do you want to connect to?",
|
|
@@ -273799,10 +273850,12 @@ async function minioPrompt(env2, storages, accept) {
|
|
|
273799
273850
|
name: storage.name,
|
|
273800
273851
|
value: storage
|
|
273801
273852
|
})),
|
|
273802
|
-
|
|
273803
|
-
|
|
273804
|
-
|
|
273805
|
-
|
|
273853
|
+
...isRequired ? [] : [
|
|
273854
|
+
{
|
|
273855
|
+
name: "None",
|
|
273856
|
+
value: undefined
|
|
273857
|
+
}
|
|
273858
|
+
]
|
|
273806
273859
|
],
|
|
273807
273860
|
default: defaultStorage
|
|
273808
273861
|
});
|
|
@@ -273811,13 +273864,19 @@ async function minioPrompt(env2, storages, accept) {
|
|
|
273811
273864
|
}
|
|
273812
273865
|
|
|
273813
273866
|
// src/commands/connect/portal.prompt.ts
|
|
273814
|
-
async function portalPrompt(
|
|
273867
|
+
async function portalPrompt({
|
|
273868
|
+
env: env2,
|
|
273869
|
+
middlewares,
|
|
273870
|
+
accept,
|
|
273871
|
+
isRequired = false
|
|
273872
|
+
}) {
|
|
273815
273873
|
const possible = middlewares.filter((middleware) => middleware.interface === "SMART_CONTRACT_PORTAL");
|
|
273816
273874
|
return servicePrompt({
|
|
273817
273875
|
env: env2,
|
|
273818
273876
|
services: possible,
|
|
273819
273877
|
accept,
|
|
273820
273878
|
envKey: "SETTLEMINT_PORTAL",
|
|
273879
|
+
isRequired,
|
|
273821
273880
|
defaultHandler: async ({ defaultService: defaultMiddleware }) => {
|
|
273822
273881
|
return esm_default2({
|
|
273823
273882
|
message: "Which Smart Contract Portal instance do you want to connect to?",
|
|
@@ -273826,10 +273885,12 @@ async function portalPrompt(env2, middlewares, accept) {
|
|
|
273826
273885
|
name: middleware.name,
|
|
273827
273886
|
value: middleware
|
|
273828
273887
|
})),
|
|
273829
|
-
|
|
273830
|
-
|
|
273831
|
-
|
|
273832
|
-
|
|
273888
|
+
...isRequired ? [] : [
|
|
273889
|
+
{
|
|
273890
|
+
name: "None",
|
|
273891
|
+
value: undefined
|
|
273892
|
+
}
|
|
273893
|
+
]
|
|
273833
273894
|
],
|
|
273834
273895
|
default: defaultMiddleware
|
|
273835
273896
|
});
|
|
@@ -273846,12 +273907,12 @@ async function servicesSpinner(settlemint, application) {
|
|
|
273846
273907
|
const [
|
|
273847
273908
|
blockchainNetworks,
|
|
273848
273909
|
blockchainNodes,
|
|
273849
|
-
|
|
273850
|
-
|
|
273851
|
-
|
|
273852
|
-
|
|
273910
|
+
middlewares,
|
|
273911
|
+
integrationTools,
|
|
273912
|
+
storages,
|
|
273913
|
+
privateKeys,
|
|
273853
273914
|
insights,
|
|
273854
|
-
|
|
273915
|
+
customDeployments
|
|
273855
273916
|
] = await Promise.all([
|
|
273856
273917
|
settlemint.blockchainNetwork.list(application.uniqueName),
|
|
273857
273918
|
settlemint.blockchainNode.list(application.uniqueName),
|
|
@@ -273865,19 +273926,25 @@ async function servicesSpinner(settlemint, application) {
|
|
|
273865
273926
|
return {
|
|
273866
273927
|
blockchainNetworks,
|
|
273867
273928
|
blockchainNodes,
|
|
273868
|
-
|
|
273869
|
-
|
|
273870
|
-
|
|
273871
|
-
|
|
273929
|
+
middlewares,
|
|
273930
|
+
integrationTools,
|
|
273931
|
+
storages,
|
|
273932
|
+
privateKeys,
|
|
273872
273933
|
insights,
|
|
273873
|
-
|
|
273934
|
+
customDeployments
|
|
273874
273935
|
};
|
|
273875
273936
|
}
|
|
273876
273937
|
});
|
|
273877
273938
|
}
|
|
273878
273939
|
|
|
273879
273940
|
// src/commands/connect/thegraph.prompt.ts
|
|
273880
|
-
async function theGraphPrompt(
|
|
273941
|
+
async function theGraphPrompt({
|
|
273942
|
+
env: env2,
|
|
273943
|
+
middlewares,
|
|
273944
|
+
accept,
|
|
273945
|
+
filterRunningOnly = false,
|
|
273946
|
+
isRequired = false
|
|
273947
|
+
}) {
|
|
273881
273948
|
const graphMiddlewares = middlewares.filter((middleware) => middleware.__typename === "HAGraphMiddleware");
|
|
273882
273949
|
const choices = filterRunningOnly ? graphMiddlewares.filter((middleware) => middleware.status === "COMPLETED") : graphMiddlewares;
|
|
273883
273950
|
return servicePrompt({
|
|
@@ -273885,6 +273952,7 @@ async function theGraphPrompt(env2, middlewares, accept, filterRunningOnly = fal
|
|
|
273885
273952
|
services: graphMiddlewares,
|
|
273886
273953
|
accept,
|
|
273887
273954
|
envKey: "SETTLEMINT_THEGRAPH",
|
|
273955
|
+
isRequired,
|
|
273888
273956
|
defaultHandler: async ({ defaultService: defaultMiddleware }) => {
|
|
273889
273957
|
return esm_default2({
|
|
273890
273958
|
message: "Which The Graph instance do you want to connect to?",
|
|
@@ -273893,10 +273961,12 @@ async function theGraphPrompt(env2, middlewares, accept, filterRunningOnly = fal
|
|
|
273893
273961
|
name: middleware.name,
|
|
273894
273962
|
value: middleware
|
|
273895
273963
|
})),
|
|
273896
|
-
|
|
273897
|
-
|
|
273898
|
-
|
|
273899
|
-
|
|
273964
|
+
...isRequired ? [] : [
|
|
273965
|
+
{
|
|
273966
|
+
name: "None",
|
|
273967
|
+
value: undefined
|
|
273968
|
+
}
|
|
273969
|
+
]
|
|
273900
273970
|
],
|
|
273901
273971
|
default: defaultMiddleware
|
|
273902
273972
|
});
|
|
@@ -273951,16 +274021,52 @@ function connectCommand() {
|
|
|
273951
274021
|
const workspace = await workspacePrompt(env2, workspaces, acceptDefaults);
|
|
273952
274022
|
const application = await applicationPrompt(env2, workspace?.applications ?? [], acceptDefaults);
|
|
273953
274023
|
const aatToken = await applicationAccessTokenPrompt(env2, application, settlemint, acceptDefaults);
|
|
273954
|
-
const {
|
|
273955
|
-
const blockchainNode = await blockchainNodePrompt(
|
|
273956
|
-
|
|
273957
|
-
|
|
273958
|
-
|
|
273959
|
-
|
|
273960
|
-
const
|
|
273961
|
-
|
|
273962
|
-
|
|
273963
|
-
|
|
274024
|
+
const { middlewares, integrationTools, storages, privateKeys, insights, customDeployments, blockchainNodes } = await servicesSpinner(settlemint, application);
|
|
274025
|
+
const blockchainNode = await blockchainNodePrompt({
|
|
274026
|
+
env: env2,
|
|
274027
|
+
nodes: blockchainNodes,
|
|
274028
|
+
accept: acceptDefaults
|
|
274029
|
+
});
|
|
274030
|
+
const hasura = await hasuraPrompt({
|
|
274031
|
+
env: env2,
|
|
274032
|
+
integrations: integrationTools,
|
|
274033
|
+
accept: acceptDefaults
|
|
274034
|
+
});
|
|
274035
|
+
const thegraph = await theGraphPrompt({
|
|
274036
|
+
env: env2,
|
|
274037
|
+
middlewares,
|
|
274038
|
+
accept: acceptDefaults
|
|
274039
|
+
});
|
|
274040
|
+
const portal = await portalPrompt({
|
|
274041
|
+
env: env2,
|
|
274042
|
+
middlewares,
|
|
274043
|
+
accept: acceptDefaults
|
|
274044
|
+
});
|
|
274045
|
+
const ipfs = await ipfsPrompt({
|
|
274046
|
+
env: env2,
|
|
274047
|
+
storages,
|
|
274048
|
+
accept: acceptDefaults
|
|
274049
|
+
});
|
|
274050
|
+
const minio = await minioPrompt({
|
|
274051
|
+
env: env2,
|
|
274052
|
+
storages,
|
|
274053
|
+
accept: acceptDefaults
|
|
274054
|
+
});
|
|
274055
|
+
const hdPrivateKey = await hdPrivateKeyPrompt({
|
|
274056
|
+
env: env2,
|
|
274057
|
+
privateKeys,
|
|
274058
|
+
accept: acceptDefaults
|
|
274059
|
+
});
|
|
274060
|
+
const cDeployment = await customDeploymentPrompt({
|
|
274061
|
+
env: env2,
|
|
274062
|
+
customDeployments,
|
|
274063
|
+
accept: acceptDefaults
|
|
274064
|
+
});
|
|
274065
|
+
const blockscout = await blockscoutPrompt({
|
|
274066
|
+
env: env2,
|
|
274067
|
+
insights,
|
|
274068
|
+
accept: acceptDefaults
|
|
274069
|
+
});
|
|
273964
274070
|
if (acceptDefaults) {
|
|
273965
274071
|
const selectedServices = [
|
|
273966
274072
|
`Workspace: ${workspace.name}`,
|
|
@@ -275590,12 +275696,18 @@ function applicationCreateCommand() {
|
|
|
275590
275696
|
}
|
|
275591
275697
|
|
|
275592
275698
|
// src/commands/connect/blockchain-network.prompt.ts
|
|
275593
|
-
async function blockchainNetworkPrompt(
|
|
275699
|
+
async function blockchainNetworkPrompt({
|
|
275700
|
+
env: env2,
|
|
275701
|
+
networks,
|
|
275702
|
+
accept,
|
|
275703
|
+
isRequired = false
|
|
275704
|
+
}) {
|
|
275594
275705
|
return servicePrompt({
|
|
275595
275706
|
env: env2,
|
|
275596
275707
|
services: networks,
|
|
275597
275708
|
accept,
|
|
275598
275709
|
envKey: "SETTLEMINT_BLOCKCHAIN_NETWORK",
|
|
275710
|
+
isRequired,
|
|
275599
275711
|
defaultHandler: async ({ defaultService: defaultNetwork }) => {
|
|
275600
275712
|
return esm_default2({
|
|
275601
275713
|
message: "Which blockchain network do you want to connect to?",
|
|
@@ -275604,10 +275716,12 @@ async function blockchainNetworkPrompt(env2, networks, accept) {
|
|
|
275604
275716
|
name: network.name,
|
|
275605
275717
|
value: network
|
|
275606
275718
|
})),
|
|
275607
|
-
|
|
275608
|
-
|
|
275609
|
-
|
|
275610
|
-
|
|
275719
|
+
...isRequired ? [] : [
|
|
275720
|
+
{
|
|
275721
|
+
name: "None",
|
|
275722
|
+
value: undefined
|
|
275723
|
+
}
|
|
275724
|
+
]
|
|
275611
275725
|
],
|
|
275612
275726
|
default: defaultNetwork
|
|
275613
275727
|
});
|
|
@@ -275647,7 +275761,12 @@ function blockchainNodeBesuCreateCommand() {
|
|
|
275647
275761
|
let networkUniqueName = blockchainNetwork;
|
|
275648
275762
|
if (!networkUniqueName) {
|
|
275649
275763
|
const networks = await settlemint.blockchainNetwork.list(applicationUniqueName);
|
|
275650
|
-
const network = await blockchainNetworkPrompt(
|
|
275764
|
+
const network = await blockchainNetworkPrompt({
|
|
275765
|
+
env: env2,
|
|
275766
|
+
networks,
|
|
275767
|
+
accept: acceptDefaults,
|
|
275768
|
+
isRequired: true
|
|
275769
|
+
});
|
|
275651
275770
|
if (!network) {
|
|
275652
275771
|
return nothingSelectedError("blockchain network");
|
|
275653
275772
|
}
|
|
@@ -275720,7 +275839,12 @@ function blockscoutInsightsCreateCommand() {
|
|
|
275720
275839
|
const loadBalancerUniqueName = blockchainNodeUniqueName ? undefined : loadBalancer ?? env2.SETTLEMINT_LOAD_BALANCER;
|
|
275721
275840
|
if (!blockchainNodeUniqueName && !loadBalancerUniqueName) {
|
|
275722
275841
|
const blockchainNodes = await settlemint.blockchainNode.list(applicationUniqueName);
|
|
275723
|
-
const node = await blockchainNodePrompt(
|
|
275842
|
+
const node = await blockchainNodePrompt({
|
|
275843
|
+
env: env2,
|
|
275844
|
+
nodes: blockchainNodes,
|
|
275845
|
+
accept: acceptDefaults,
|
|
275846
|
+
isRequired: true
|
|
275847
|
+
});
|
|
275724
275848
|
if (!node) {
|
|
275725
275849
|
return nothingSelectedError("blockchain node");
|
|
275726
275850
|
}
|
|
@@ -275850,7 +275974,12 @@ function graphMiddlewareCreateCommand() {
|
|
|
275850
275974
|
let blockchainNodeUniqueName = blockchainNode;
|
|
275851
275975
|
if (!blockchainNodeUniqueName) {
|
|
275852
275976
|
const blockchainNodes = await settlemint.blockchainNode.list(applicationUniqueName);
|
|
275853
|
-
const node = await blockchainNodePrompt(
|
|
275977
|
+
const node = await blockchainNodePrompt({
|
|
275978
|
+
env: env2,
|
|
275979
|
+
nodes: blockchainNodes,
|
|
275980
|
+
accept: acceptDefaults,
|
|
275981
|
+
isRequired: true
|
|
275982
|
+
});
|
|
275854
275983
|
if (!node) {
|
|
275855
275984
|
return nothingSelectedError("blockchain node");
|
|
275856
275985
|
}
|
|
@@ -275928,7 +276057,12 @@ function smartContractPortalMiddlewareCreateCommand() {
|
|
|
275928
276057
|
const loadBalancerUniqueName = blockchainNodeUniqueName ? undefined : loadBalancer ?? env2.SETTLEMINT_LOAD_BALANCER;
|
|
275929
276058
|
if (!blockchainNodeUniqueName && !loadBalancerUniqueName) {
|
|
275930
276059
|
const blockchainNodes = await settlemint.blockchainNode.list(applicationUniqueName);
|
|
275931
|
-
const node = await blockchainNodePrompt(
|
|
276060
|
+
const node = await blockchainNodePrompt({
|
|
276061
|
+
env: env2,
|
|
276062
|
+
nodes: blockchainNodes,
|
|
276063
|
+
accept: acceptDefaults,
|
|
276064
|
+
isRequired: true
|
|
276065
|
+
});
|
|
275932
276066
|
if (!node) {
|
|
275933
276067
|
return nothingSelectedError("blockchain node");
|
|
275934
276068
|
}
|
|
@@ -276020,7 +276154,12 @@ function privateKeyHdCreateCommand() {
|
|
|
276020
276154
|
let blockchainNodeUniqueName = blockchainNode;
|
|
276021
276155
|
if (!blockchainNodeUniqueName) {
|
|
276022
276156
|
const blockchainNodes = await settlemint.blockchainNode.list(applicationUniqueName);
|
|
276023
|
-
const node = await blockchainNodePrompt(
|
|
276157
|
+
const node = await blockchainNodePrompt({
|
|
276158
|
+
env: env2,
|
|
276159
|
+
nodes: blockchainNodes,
|
|
276160
|
+
accept: acceptDefaults,
|
|
276161
|
+
isRequired: true
|
|
276162
|
+
});
|
|
276024
276163
|
if (!node) {
|
|
276025
276164
|
return nothingSelectedError("blockchain node");
|
|
276026
276165
|
}
|
|
@@ -276086,7 +276225,12 @@ function privateKeyHsmCreateCommand() {
|
|
|
276086
276225
|
let blockchainNodeUniqueName = blockchainNode;
|
|
276087
276226
|
if (!blockchainNodeUniqueName) {
|
|
276088
276227
|
const blockchainNodes = await settlemint.blockchainNode.list(applicationUniqueName);
|
|
276089
|
-
const node = await blockchainNodePrompt(
|
|
276228
|
+
const node = await blockchainNodePrompt({
|
|
276229
|
+
env: env2,
|
|
276230
|
+
nodes: blockchainNodes,
|
|
276231
|
+
accept: acceptDefaults,
|
|
276232
|
+
isRequired: true
|
|
276233
|
+
});
|
|
276090
276234
|
if (!node) {
|
|
276091
276235
|
return nothingSelectedError("blockchain node");
|
|
276092
276236
|
}
|
|
@@ -276924,7 +277068,12 @@ async function selectTargetNode({
|
|
|
276924
277068
|
if (nodesWithActivePrivateKey.length === 0) {
|
|
276925
277069
|
cancel("No EVM blockchain nodes with private keys found. Please activate a private key on your EVM blockchain node and try again.");
|
|
276926
277070
|
}
|
|
276927
|
-
const blockchainNode = await blockchainNodePrompt(
|
|
277071
|
+
const blockchainNode = await blockchainNodePrompt({
|
|
277072
|
+
env: env2,
|
|
277073
|
+
nodes: nodesWithActivePrivateKey,
|
|
277074
|
+
accept: autoAccept,
|
|
277075
|
+
isRequired: true
|
|
277076
|
+
});
|
|
276928
277077
|
if (!blockchainNode) {
|
|
276929
277078
|
return nothingSelectedError("EVM blockchain node");
|
|
276930
277079
|
}
|
|
@@ -277368,7 +277517,12 @@ async function getTheGraphMiddleware({
|
|
|
277368
277517
|
return missingApplication();
|
|
277369
277518
|
}
|
|
277370
277519
|
const middlewares = await settlemintClient.middleware.list(env2.SETTLEMINT_APPLICATION);
|
|
277371
|
-
return theGraphPrompt(
|
|
277520
|
+
return theGraphPrompt({
|
|
277521
|
+
env: env2,
|
|
277522
|
+
middlewares,
|
|
277523
|
+
accept: autoAccept,
|
|
277524
|
+
isRequired: true
|
|
277525
|
+
});
|
|
277372
277526
|
}
|
|
277373
277527
|
async function getTheGraphNetwork({
|
|
277374
277528
|
theGraphMiddleware,
|
|
@@ -277521,8 +277675,8 @@ function subgraphDeployCommand() {
|
|
|
277521
277675
|
accessToken,
|
|
277522
277676
|
instance
|
|
277523
277677
|
});
|
|
277524
|
-
const middleware = await
|
|
277525
|
-
const graphEndpoints = await getGraphEndpoint(middleware, env2
|
|
277678
|
+
const middleware = await settlemintClient.middleware.read(theGraphMiddleware.uniqueName);
|
|
277679
|
+
const graphEndpoints = await getGraphEndpoint(middleware, env2);
|
|
277526
277680
|
await writeEnvSpinner(!!prod, {
|
|
277527
277681
|
...env2,
|
|
277528
277682
|
SETTLEMINT_THEGRAPH: theGraphMiddleware.uniqueName,
|
|
@@ -277535,16 +277689,6 @@ async function updateSpecVersion(specVersion) {
|
|
|
277535
277689
|
yamlConfig.specVersion = specVersion;
|
|
277536
277690
|
await updateSubgraphYamlConfig(yamlConfig);
|
|
277537
277691
|
}
|
|
277538
|
-
async function getMiddlewareAndValidateSubgraphIsAvailable(uniqueName, settlemintClient, graphName) {
|
|
277539
|
-
const middleware = await settlemintClient.middleware.read(uniqueName);
|
|
277540
|
-
if (middleware.__typename === "HAGraphMiddleware") {
|
|
277541
|
-
if (middleware.subgraphs.some((s8) => s8.name === graphName)) {
|
|
277542
|
-
return middleware;
|
|
277543
|
-
}
|
|
277544
|
-
throw new Error("Subgraph not available");
|
|
277545
|
-
}
|
|
277546
|
-
return middleware;
|
|
277547
|
-
}
|
|
277548
277692
|
|
|
277549
277693
|
// src/commands/smart-contract.set.ts
|
|
277550
277694
|
function smartContractSetCommand() {
|
|
@@ -277592,4 +277736,4 @@ function sdkCliCommand(exitOverride = undefined) {
|
|
|
277592
277736
|
ascii();
|
|
277593
277737
|
sdkCliCommand();
|
|
277594
277738
|
|
|
277595
|
-
//# debugId=
|
|
277739
|
+
//# debugId=C4F44BB1DB1D4FA064756E2164756E21
|