@settlemint/sdk-cli 0.9.3-pr928eae3a → 0.9.3-pra0f7c804
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 +70 -77
- package/dist/cli.js.map +6 -6
- 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.Y6OrQrWq4k:/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.Y6OrQrWq4k:/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.Y6OrQrWq4k:/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.Y6OrQrWq4k:/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-pra0f7c804",
|
|
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.Y6OrQrWq4k:/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-pra0f7c804",
|
|
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-pra0f7c804",
|
|
256845
|
+
"@settlemint/sdk-utils": "0.9.3-pra0f7c804",
|
|
256846
256846
|
"get-tsconfig": "4.8.1",
|
|
256847
256847
|
giget: "1.2.3"
|
|
256848
256848
|
},
|
|
@@ -267738,57 +267738,6 @@ var getApplicationOrPersonalAccessToken = async ({
|
|
|
267738
267738
|
// ../../node_modules/@gql.tada/cli-utils/dist/gql-tada-cli.mjs
|
|
267739
267739
|
init_index_chunk();
|
|
267740
267740
|
|
|
267741
|
-
// src/commands/codegen/test-gql-endpoint.ts
|
|
267742
|
-
async function testGqlEndpoint({
|
|
267743
|
-
accessToken,
|
|
267744
|
-
hasuraAdminSecret,
|
|
267745
|
-
gqlEndpoint,
|
|
267746
|
-
isHasura = false,
|
|
267747
|
-
maxRetries = 3
|
|
267748
|
-
}) {
|
|
267749
|
-
if (!gqlEndpoint) {
|
|
267750
|
-
return false;
|
|
267751
|
-
}
|
|
267752
|
-
for (let attempt = 0;attempt < maxRetries; attempt++) {
|
|
267753
|
-
try {
|
|
267754
|
-
const response = await fetch(gqlEndpoint, {
|
|
267755
|
-
method: "POST",
|
|
267756
|
-
headers: {
|
|
267757
|
-
"x-auth-token": accessToken,
|
|
267758
|
-
...isHasura ? { "x-hasura-admin-secret": hasuraAdminSecret ?? "" } : {},
|
|
267759
|
-
"Content-Type": "application/json"
|
|
267760
|
-
},
|
|
267761
|
-
body: JSON.stringify({
|
|
267762
|
-
query: `
|
|
267763
|
-
query {
|
|
267764
|
-
__schema {
|
|
267765
|
-
types {
|
|
267766
|
-
name
|
|
267767
|
-
}
|
|
267768
|
-
}
|
|
267769
|
-
}
|
|
267770
|
-
`
|
|
267771
|
-
})
|
|
267772
|
-
});
|
|
267773
|
-
if (!response.ok) {
|
|
267774
|
-
throw new Error(`HTTP error! status: ${response.status}`);
|
|
267775
|
-
}
|
|
267776
|
-
const data = await response.json();
|
|
267777
|
-
if (data.errors) {
|
|
267778
|
-
throw new Error("GraphQL errors in response");
|
|
267779
|
-
}
|
|
267780
|
-
return true;
|
|
267781
|
-
} catch (error5) {
|
|
267782
|
-
if (attempt === maxRetries - 1) {
|
|
267783
|
-
return false;
|
|
267784
|
-
}
|
|
267785
|
-
const delay2 = 2 ** attempt * 1000;
|
|
267786
|
-
await new Promise((resolve3) => setTimeout(resolve3, delay2));
|
|
267787
|
-
}
|
|
267788
|
-
}
|
|
267789
|
-
return false;
|
|
267790
|
-
}
|
|
267791
|
-
|
|
267792
267741
|
// src/commands/codegen/codegen-hasura.ts
|
|
267793
267742
|
async function codegenHasura(env2) {
|
|
267794
267743
|
const gqlEndpoint = env2.SETTLEMINT_HASURA_ENDPOINT;
|
|
@@ -267804,12 +267753,6 @@ async function codegenHasura(env2) {
|
|
|
267804
267753
|
return;
|
|
267805
267754
|
}
|
|
267806
267755
|
if (gqlEndpoint && accessToken && adminSecret) {
|
|
267807
|
-
await testGqlEndpoint({
|
|
267808
|
-
accessToken,
|
|
267809
|
-
hasuraAdminSecret: adminSecret,
|
|
267810
|
-
gqlEndpoint,
|
|
267811
|
-
isHasura: true
|
|
267812
|
-
});
|
|
267813
267756
|
await generateSchema({
|
|
267814
267757
|
input: gqlEndpoint,
|
|
267815
267758
|
output: "hasura-schema.graphql",
|
|
@@ -267865,10 +267808,6 @@ async function codegenPortal(env2) {
|
|
|
267865
267808
|
if (!accessToken) {
|
|
267866
267809
|
return;
|
|
267867
267810
|
}
|
|
267868
|
-
await testGqlEndpoint({
|
|
267869
|
-
accessToken,
|
|
267870
|
-
gqlEndpoint
|
|
267871
|
-
});
|
|
267872
267811
|
await generateSchema({
|
|
267873
267812
|
input: gqlEndpoint,
|
|
267874
267813
|
output: "portal-schema.graphql",
|
|
@@ -267899,6 +267838,57 @@ export const { client: portalClient, graphql: portalGraphql } = createPortalClie
|
|
|
267899
267838
|
await writeTemplate(template, "/lib/settlemint", "portal.ts");
|
|
267900
267839
|
}
|
|
267901
267840
|
|
|
267841
|
+
// src/commands/codegen/test-gql-endpoint.ts
|
|
267842
|
+
async function testGqlEndpoint({
|
|
267843
|
+
accessToken,
|
|
267844
|
+
hasuraAdminSecret,
|
|
267845
|
+
gqlEndpoint,
|
|
267846
|
+
isHasura = false,
|
|
267847
|
+
maxRetries = 3
|
|
267848
|
+
}) {
|
|
267849
|
+
if (!gqlEndpoint) {
|
|
267850
|
+
return false;
|
|
267851
|
+
}
|
|
267852
|
+
for (let attempt = 0;attempt < maxRetries; attempt++) {
|
|
267853
|
+
try {
|
|
267854
|
+
const response = await fetch(gqlEndpoint, {
|
|
267855
|
+
method: "POST",
|
|
267856
|
+
headers: {
|
|
267857
|
+
"x-auth-token": accessToken,
|
|
267858
|
+
...isHasura ? { "x-hasura-admin-secret": hasuraAdminSecret ?? "" } : {},
|
|
267859
|
+
"Content-Type": "application/json"
|
|
267860
|
+
},
|
|
267861
|
+
body: JSON.stringify({
|
|
267862
|
+
query: `
|
|
267863
|
+
query {
|
|
267864
|
+
__schema {
|
|
267865
|
+
types {
|
|
267866
|
+
name
|
|
267867
|
+
}
|
|
267868
|
+
}
|
|
267869
|
+
}
|
|
267870
|
+
`
|
|
267871
|
+
})
|
|
267872
|
+
});
|
|
267873
|
+
if (!response.ok) {
|
|
267874
|
+
throw new Error(`HTTP error! status: ${response.status}`);
|
|
267875
|
+
}
|
|
267876
|
+
const data = await response.json();
|
|
267877
|
+
if (data.errors) {
|
|
267878
|
+
throw new Error("GraphQL errors in response");
|
|
267879
|
+
}
|
|
267880
|
+
return true;
|
|
267881
|
+
} catch (error5) {
|
|
267882
|
+
if (attempt === maxRetries - 1) {
|
|
267883
|
+
return false;
|
|
267884
|
+
}
|
|
267885
|
+
const delay2 = 2 ** attempt * 1000;
|
|
267886
|
+
await new Promise((resolve3) => setTimeout(resolve3, delay2));
|
|
267887
|
+
}
|
|
267888
|
+
}
|
|
267889
|
+
return false;
|
|
267890
|
+
}
|
|
267891
|
+
|
|
267902
267892
|
// src/commands/codegen/codegen-the-graph.ts
|
|
267903
267893
|
async function codegenTheGraph(env2, subgraphNames) {
|
|
267904
267894
|
const gqlEndpoints = env2.SETTLEMINT_THEGRAPH_SUBGRAPHS_ENDPOINTS;
|
|
@@ -268868,7 +268858,7 @@ async function codegenTsconfig(env2, thegraphSubgraphNames) {
|
|
|
268868
268858
|
const name2 = gqlEndpoint.split("/").pop();
|
|
268869
268859
|
return name2 && (!thegraphSubgraphNames || thegraphSubgraphNames.includes(name2));
|
|
268870
268860
|
});
|
|
268871
|
-
const [hasura, portal,
|
|
268861
|
+
const [hasura, portal, blockscout] = await Promise.all([
|
|
268872
268862
|
testGqlEndpoint({
|
|
268873
268863
|
accessToken,
|
|
268874
268864
|
hasuraAdminSecret: env2.SETTLEMINT_HASURA_ADMIN_SECRET,
|
|
@@ -268879,15 +268869,18 @@ async function codegenTsconfig(env2, thegraphSubgraphNames) {
|
|
|
268879
268869
|
accessToken,
|
|
268880
268870
|
gqlEndpoint: env2.SETTLEMINT_PORTAL_GRAPHQL_ENDPOINT
|
|
268881
268871
|
}),
|
|
268882
|
-
testGqlEndpoint({
|
|
268883
|
-
accessToken,
|
|
268884
|
-
gqlEndpoint: theGraphEndpoints[0]
|
|
268885
|
-
}),
|
|
268886
268872
|
testGqlEndpoint({
|
|
268887
268873
|
accessToken,
|
|
268888
268874
|
gqlEndpoint: env2.SETTLEMINT_BLOCKSCOUT_GRAPHQL_ENDPOINT
|
|
268889
268875
|
})
|
|
268890
268876
|
]);
|
|
268877
|
+
const thegraph = await Promise.all(theGraphEndpoints.map((endpoint) => {
|
|
268878
|
+
const success = testGqlEndpoint({
|
|
268879
|
+
accessToken,
|
|
268880
|
+
gqlEndpoint: endpoint
|
|
268881
|
+
});
|
|
268882
|
+
return { success, endpoint };
|
|
268883
|
+
}));
|
|
268891
268884
|
if (!tsconfig.config.compilerOptions) {
|
|
268892
268885
|
tsconfig.config.compilerOptions = {};
|
|
268893
268886
|
}
|
|
@@ -268906,7 +268899,7 @@ async function codegenTsconfig(env2, thegraphSubgraphNames) {
|
|
|
268906
268899
|
tadaTurboLocation: "hasura-cache.d.ts"
|
|
268907
268900
|
}
|
|
268908
268901
|
] : [],
|
|
268909
|
-
...thegraph ?
|
|
268902
|
+
...thegraph ? thegraph.filter((endpoint) => endpoint.success).map(({ endpoint }) => {
|
|
268910
268903
|
const name2 = endpoint.split("/").pop();
|
|
268911
268904
|
return {
|
|
268912
268905
|
name: `thegraph-${name2}`,
|
|
@@ -276922,4 +276915,4 @@ function sdkCliCommand(exitOverride = undefined) {
|
|
|
276922
276915
|
ascii();
|
|
276923
276916
|
sdkCliCommand();
|
|
276924
276917
|
|
|
276925
|
-
//# debugId=
|
|
276918
|
+
//# debugId=008BD711F17DEA0564756E2164756E21
|