@settlemint/sdk-cli 0.8.3 → 0.8.4-pr116dc0ae
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 +66 -38
- package/dist/cli.js.map +8 -8
- package/package.json +3 -3
package/dist/cli.js
CHANGED
|
@@ -197427,7 +197427,7 @@ ${Bt.cyan(Yt)}
|
|
|
197427
197427
|
code: "ENOENT"
|
|
197428
197428
|
}), getPathInfo = (e9, t7) => {
|
|
197429
197429
|
var r6 = t7.colon || or;
|
|
197430
|
-
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.
|
|
197430
|
+
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.500TO5AC05:/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)];
|
|
197431
197431
|
var n6 = nr ? t7.pathExt || process.env.PATHEXT || ".EXE;.CMD;.BAT;.COM" : "";
|
|
197432
197432
|
var a5 = nr ? n6.split(r6) : [""];
|
|
197433
197433
|
if (nr) {
|
|
@@ -200564,7 +200564,7 @@ ${whileRunning(e9)}`;
|
|
|
200564
200564
|
};
|
|
200565
200565
|
ni = Object.assign(async function _main() {
|
|
200566
200566
|
var e9 = new Cli({
|
|
200567
|
-
binaryVersion: "0.8.
|
|
200567
|
+
binaryVersion: "0.8.4-pr116dc0ae",
|
|
200568
200568
|
binaryLabel: "gql.tada CLI",
|
|
200569
200569
|
binaryName: "gql.tada"
|
|
200570
200570
|
});
|
|
@@ -218401,7 +218401,7 @@ var require_lib4 = __commonJS((exports, module) => {
|
|
|
218401
218401
|
var rRel = new RegExp(`^\\.${rSlash.source}`);
|
|
218402
218402
|
var getNotFoundError2 = (cmd2) => Object.assign(new Error(`not found: ${cmd2}`), { code: "ENOENT" });
|
|
218403
218403
|
var getPathInfo2 = (cmd2, {
|
|
218404
|
-
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.
|
|
218404
|
+
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.500TO5AC05:/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",
|
|
218405
218405
|
pathExt: optPathExt = process.env.PATHEXT,
|
|
218406
218406
|
delimiter: optDelimiter = delimiter
|
|
218407
218407
|
}) => {
|
|
@@ -218605,7 +218605,7 @@ var require_lib5 = __commonJS((exports, module) => {
|
|
|
218605
218605
|
let pathToInitial;
|
|
218606
218606
|
try {
|
|
218607
218607
|
pathToInitial = which.sync(initialCmd, {
|
|
218608
|
-
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.
|
|
218608
|
+
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.500TO5AC05:/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",
|
|
218609
218609
|
pathext: options.env && findInObject(options.env, "PATHEXT") || process.env.PATHEXT
|
|
218610
218610
|
}).toLowerCase();
|
|
218611
218611
|
} catch (err) {
|
|
@@ -219322,7 +219322,7 @@ var require_lib6 = __commonJS((exports, module) => {
|
|
|
219322
219322
|
var rRel = new RegExp(`^\\.${rSlash.source}`);
|
|
219323
219323
|
var getNotFoundError2 = (cmd2) => Object.assign(new Error(`not found: ${cmd2}`), { code: "ENOENT" });
|
|
219324
219324
|
var getPathInfo2 = (cmd2, {
|
|
219325
|
-
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.
|
|
219325
|
+
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.500TO5AC05:/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",
|
|
219326
219326
|
pathExt: optPathExt = process.env.PATHEXT,
|
|
219327
219327
|
delimiter: optDelimiter = delimiter
|
|
219328
219328
|
}) => {
|
|
@@ -235213,7 +235213,7 @@ var require_which2 = __commonJS((exports, module) => {
|
|
|
235213
235213
|
const colon = opt2.colon || COLON;
|
|
235214
235214
|
const pathEnv = cmd2.match(/\//) || isWindows2 && cmd2.match(/\\/) ? [""] : [
|
|
235215
235215
|
...isWindows2 ? [process.cwd()] : [],
|
|
235216
|
-
...(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.
|
|
235216
|
+
...(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.500TO5AC05:/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)
|
|
235217
235217
|
];
|
|
235218
235218
|
const pathExtExe = isWindows2 ? opt2.pathExt || process.env.PATHEXT || ".EXE;.CMD;.BAT;.COM" : "";
|
|
235219
235219
|
const pathExt = isWindows2 ? pathExtExe.split(colon) : [""];
|
|
@@ -267669,6 +267669,10 @@ async function executeCommand(command, args, options) {
|
|
|
267669
267669
|
});
|
|
267670
267670
|
});
|
|
267671
267671
|
}
|
|
267672
|
+
var note = (message) => {
|
|
267673
|
+
console.log("");
|
|
267674
|
+
console.log(maskTokens(message));
|
|
267675
|
+
};
|
|
267672
267676
|
var ApplicationAccessTokenSchema = z3.string().regex(/^sm_aat_.*$/);
|
|
267673
267677
|
var PersonalAccessTokenSchema = z3.string().regex(/^sm_pat_.*$/);
|
|
267674
267678
|
var AccessTokenSchema = z3.string().regex(/^sm_pat_.*|sm_aat_.*$/);
|
|
@@ -267761,10 +267765,11 @@ async function loadEnvironmentEnv(validateEnv, prod, path5 = process.cwd()) {
|
|
|
267761
267765
|
if (!parsed) {
|
|
267762
267766
|
parsed = {};
|
|
267763
267767
|
}
|
|
267768
|
+
const defaultEnv = Object.fromEntries(Object.entries(process.env).filter(([_4, value4]) => typeof value4 === "string" && value4 !== ""));
|
|
267764
267769
|
try {
|
|
267765
267770
|
return validate(validateEnv ? DotEnvSchema : DotEnvSchemaPartial, {
|
|
267766
267771
|
...parsed,
|
|
267767
|
-
...
|
|
267772
|
+
...defaultEnv
|
|
267768
267773
|
});
|
|
267769
267774
|
} catch (error5) {
|
|
267770
267775
|
cancel(error5.message);
|
|
@@ -267821,7 +267826,7 @@ var intro = (msg) => {
|
|
|
267821
267826
|
console.log(magentaBright(maskTokens2(msg)));
|
|
267822
267827
|
console.log("");
|
|
267823
267828
|
};
|
|
267824
|
-
var
|
|
267829
|
+
var note2 = (message) => {
|
|
267825
267830
|
console.log("");
|
|
267826
267831
|
console.log(maskTokens2(message));
|
|
267827
267832
|
};
|
|
@@ -267841,7 +267846,7 @@ var spinner = async (options) => {
|
|
|
267841
267846
|
return result;
|
|
267842
267847
|
} catch (error5) {
|
|
267843
267848
|
spinner2.error(redBright(`${options.startMessage} --> Error!`));
|
|
267844
|
-
|
|
267849
|
+
note2(redBright(`${error5.message}
|
|
267845
267850
|
${error5.stack}`));
|
|
267846
267851
|
process.exit(1);
|
|
267847
267852
|
}
|
|
@@ -267864,7 +267869,7 @@ async function codegenTheGraph(env2, subgraphNames) {
|
|
|
267864
267869
|
return false;
|
|
267865
267870
|
}
|
|
267866
267871
|
if (subgraphNames && !subgraphNames.includes(name2)) {
|
|
267867
|
-
|
|
267872
|
+
note2(`[SKIPPED] Generating TheGraph subgraph ${name2}`);
|
|
267868
267873
|
return false;
|
|
267869
267874
|
}
|
|
267870
267875
|
template.push(`import type { introspection as ${name2}Introspection } from "@schemas/the-graph-env-${name2}"`);
|
|
@@ -267872,7 +267877,7 @@ async function codegenTheGraph(env2, subgraphNames) {
|
|
|
267872
267877
|
});
|
|
267873
267878
|
for (const gqlEndpoint of toGenerate) {
|
|
267874
267879
|
const name2 = gqlEndpoint.split("/").pop();
|
|
267875
|
-
|
|
267880
|
+
note2(`Generating TheGraph subgraph ${name2}`);
|
|
267876
267881
|
await generateSchema({
|
|
267877
267882
|
input: gqlEndpoint,
|
|
267878
267883
|
output: `the-graph-schema-${name2}.graphql`,
|
|
@@ -270072,10 +270077,11 @@ async function loadEnvironmentEnv2(validateEnv, prod, path5 = process.cwd()) {
|
|
|
270072
270077
|
if (!parsed) {
|
|
270073
270078
|
parsed = {};
|
|
270074
270079
|
}
|
|
270080
|
+
const defaultEnv = Object.fromEntries(Object.entries(process.env).filter(([_5, value4]) => typeof value4 === "string" && value4 !== ""));
|
|
270075
270081
|
try {
|
|
270076
270082
|
return validate2(validateEnv ? DotEnvSchema2 : DotEnvSchemaPartial2, {
|
|
270077
270083
|
...parsed,
|
|
270078
|
-
...
|
|
270084
|
+
...defaultEnv
|
|
270079
270085
|
});
|
|
270080
270086
|
} catch (error5) {
|
|
270081
270087
|
cancel3(error5.message);
|
|
@@ -270398,34 +270404,36 @@ function codegenCommand() {
|
|
|
270398
270404
|
});
|
|
270399
270405
|
const promises = [];
|
|
270400
270406
|
if (hasura) {
|
|
270401
|
-
|
|
270407
|
+
note2("Generating Hasura resources");
|
|
270402
270408
|
promises.push(codegenHasura(env2));
|
|
270403
270409
|
}
|
|
270404
270410
|
if (portal) {
|
|
270405
|
-
|
|
270411
|
+
note2("Generating Portal resources");
|
|
270406
270412
|
promises.push(codegenPortal(env2));
|
|
270407
270413
|
}
|
|
270408
270414
|
if (thegraph) {
|
|
270409
|
-
|
|
270415
|
+
note2("Generating TheGraph resources");
|
|
270410
270416
|
promises.push(codegenTheGraph(env2, thegraphSubgraphNames));
|
|
270411
270417
|
}
|
|
270412
270418
|
if (blockscout) {
|
|
270413
|
-
|
|
270419
|
+
note2("Generating Blockscout resources");
|
|
270414
270420
|
promises.push(codegenBlockscout(env2));
|
|
270415
270421
|
}
|
|
270416
270422
|
if (shouldCodegenMinio(env2)) {
|
|
270417
|
-
|
|
270423
|
+
note2("Generating Minio resources");
|
|
270418
270424
|
promises.push(codegenMinio(env2));
|
|
270419
270425
|
}
|
|
270420
270426
|
if (shouldCodegenIpfs(env2)) {
|
|
270421
|
-
|
|
270427
|
+
note2("Generating IPFS resources");
|
|
270422
270428
|
promises.push(codegenIpfs(env2));
|
|
270423
270429
|
}
|
|
270424
270430
|
await Promise.all(promises);
|
|
270425
|
-
|
|
270426
|
-
|
|
270427
|
-
|
|
270428
|
-
|
|
270431
|
+
if (hasura || portal || thegraph || blockscout) {
|
|
270432
|
+
await generateOutput({
|
|
270433
|
+
output: undefined,
|
|
270434
|
+
tsconfig: undefined
|
|
270435
|
+
});
|
|
270436
|
+
}
|
|
270429
270437
|
outro("Codegen complete");
|
|
270430
270438
|
});
|
|
270431
270439
|
}
|
|
@@ -272789,7 +272797,7 @@ var esm_default5 = createPrompt((config4, done) => {
|
|
|
272789
272797
|
async function applicationAccessTokenPrompt(env2, application, settlemint, accept) {
|
|
272790
272798
|
const defaultAccessToken = env2.SETTLEMINT_ACCESS_TOKEN;
|
|
272791
272799
|
const defaultPossible = accept && defaultAccessToken;
|
|
272792
|
-
if (defaultPossible) {
|
|
272800
|
+
if (defaultPossible || is_in_ci_default) {
|
|
272793
272801
|
return defaultAccessToken;
|
|
272794
272802
|
}
|
|
272795
272803
|
if (defaultAccessToken) {
|
|
@@ -273273,6 +273281,26 @@ function connectCommand() {
|
|
|
273273
273281
|
const hdPrivateKey = await hdPrivateKeyPrompt(env2, privateKey, autoAccept);
|
|
273274
273282
|
const cDeployment = await customDeploymentPrompt(env2, customDeployment, autoAccept);
|
|
273275
273283
|
const blockscout = await blockscoutPrompt(env2, insights, autoAccept);
|
|
273284
|
+
if (autoAccept) {
|
|
273285
|
+
const selectedServices = [
|
|
273286
|
+
`Workspace: ${workspace.name}`,
|
|
273287
|
+
`Application: ${application.name}`,
|
|
273288
|
+
blockchainNode && `Blockchain Network: ${blockchainNode?.blockchainNetwork?.name}`,
|
|
273289
|
+
blockchainNode && `Blockchain Node: ${blockchainNode?.name}`,
|
|
273290
|
+
hasura && `Hasura: ${hasura?.name}`,
|
|
273291
|
+
thegraph && `TheGraph: ${thegraph?.name}`,
|
|
273292
|
+
portal && `Portal: ${portal?.name}`,
|
|
273293
|
+
ipfs && `IPFS: ${ipfs?.name}`,
|
|
273294
|
+
minio && `MinIO: ${minio?.name}`,
|
|
273295
|
+
hdPrivateKey && `HD Private Key: ${hdPrivateKey?.name}`,
|
|
273296
|
+
cDeployment && `Custom Deployment: ${cDeployment?.name}`,
|
|
273297
|
+
blockscout && `Blockscout: ${blockscout?.name}`
|
|
273298
|
+
];
|
|
273299
|
+
note(`Selected services:
|
|
273300
|
+
• ${selectedServices.filter(Boolean).join(`
|
|
273301
|
+
• `)}
|
|
273302
|
+
`);
|
|
273303
|
+
}
|
|
273276
273304
|
await writeEnvSpinner(!!prod, {
|
|
273277
273305
|
SETTLEMINT_ACCESS_TOKEN: aatToken,
|
|
273278
273306
|
SETTLEMINT_INSTANCE: instance,
|
|
@@ -273303,7 +273331,7 @@ function connectCommand() {
|
|
|
273303
273331
|
var package_default = {
|
|
273304
273332
|
name: "@settlemint/sdk-cli",
|
|
273305
273333
|
description: "SettleMint SDK, integrate SettleMint into your application with ease.",
|
|
273306
|
-
version: "0.8.
|
|
273334
|
+
version: "0.8.4-pr116dc0ae",
|
|
273307
273335
|
type: "module",
|
|
273308
273336
|
private: false,
|
|
273309
273337
|
license: "FSL-1.1-MIT",
|
|
@@ -273354,8 +273382,8 @@ var package_default = {
|
|
|
273354
273382
|
"@inquirer/input": "4.1.1",
|
|
273355
273383
|
"@inquirer/password": "4.0.4",
|
|
273356
273384
|
"@inquirer/select": "4.0.4",
|
|
273357
|
-
"@settlemint/sdk-js": "0.8.
|
|
273358
|
-
"@settlemint/sdk-utils": "0.8.
|
|
273385
|
+
"@settlemint/sdk-js": "0.8.4-pr116dc0ae",
|
|
273386
|
+
"@settlemint/sdk-utils": "0.8.4-pr116dc0ae",
|
|
273359
273387
|
"get-tsconfig": "4.8.1",
|
|
273360
273388
|
giget: "1.2.3"
|
|
273361
273389
|
},
|
|
@@ -274397,16 +274425,16 @@ async function waitForCompletion({
|
|
|
274397
274425
|
try {
|
|
274398
274426
|
const resource = await service.read(uniqueName);
|
|
274399
274427
|
if (resource.status === "COMPLETED") {
|
|
274400
|
-
|
|
274428
|
+
note2(`${capitalizeFirstLetter(type4)} is ${getActionLabel(action)}`);
|
|
274401
274429
|
return true;
|
|
274402
274430
|
}
|
|
274403
274431
|
if (resource.status === "FAILED") {
|
|
274404
|
-
|
|
274432
|
+
note2(`${capitalizeFirstLetter(type4)} failed to ${getActionLabel(action)}`);
|
|
274405
274433
|
return true;
|
|
274406
274434
|
}
|
|
274407
|
-
|
|
274435
|
+
note2(`${capitalizeFirstLetter(type4)} is not ready yet (status: ${resource.status})`);
|
|
274408
274436
|
} catch (error5) {
|
|
274409
|
-
|
|
274437
|
+
note2(`${capitalizeFirstLetter(type4)} is not ready yet (status: UNKNOWN)`);
|
|
274410
274438
|
}
|
|
274411
274439
|
if (Date.now() - startTime > maxTimeout) {
|
|
274412
274440
|
throw new TimeoutError(`Operation timed out after ${maxTimeout / 60000} minutes for ${type4} with unique name ${uniqueName}`);
|
|
@@ -274420,7 +274448,7 @@ async function waitForCompletion({
|
|
|
274420
274448
|
return await showSpinner();
|
|
274421
274449
|
} catch (error5) {
|
|
274422
274450
|
if (restartIfTimeout && error5 instanceof TimeoutError) {
|
|
274423
|
-
|
|
274451
|
+
note2(`Restarting ${capitalizeFirstLetter(type4)}`);
|
|
274424
274452
|
await service.restart(uniqueName);
|
|
274425
274453
|
return showSpinner();
|
|
274426
274454
|
}
|
|
@@ -274525,7 +274553,7 @@ ${createExamples(examples)}`).argument("<name>", `The ${type4} name`).option("-a
|
|
|
274525
274553
|
newEnv.SETTLEMINT_BLOCKCHAIN_NETWORK = (await settlemint.blockchainNode.read(newEnv.SETTLEMINT_BLOCKCHAIN_NODE)).blockchainNetwork.uniqueName;
|
|
274526
274554
|
}
|
|
274527
274555
|
await writeEnvSpinner(!!prod, newEnv);
|
|
274528
|
-
|
|
274556
|
+
note2(`${capitalizeFirstLetter(type4)} ${result.name} set as default`);
|
|
274529
274557
|
}
|
|
274530
274558
|
outro(`${capitalizeFirstLetter(type4)} ${result.name} created successfully`);
|
|
274531
274559
|
});
|
|
@@ -275506,7 +275534,7 @@ ${createExamples([
|
|
|
275506
275534
|
...mapDefaultEnv(env2)
|
|
275507
275535
|
};
|
|
275508
275536
|
await writeEnvSpinner(!!prod, newEnv);
|
|
275509
|
-
|
|
275537
|
+
note2(`${capitalizeFirstLetter(type4)} removed as default`);
|
|
275510
275538
|
}
|
|
275511
275539
|
if (wait) {
|
|
275512
275540
|
await waitForCompletion({ settlemint, type: type4, uniqueName: serviceUniqueName, action: "destroy" });
|
|
@@ -276070,7 +276098,7 @@ function foundryFormatCommand() {
|
|
|
276070
276098
|
return new Command2("format").description("Format the smart contracts using Foundry/forge").helpOption(false).option("-h, --help", "Get list of possible forge options").passThroughOptions().allowUnknownOption(true).action(async (passThroughOptions, cmd2) => {
|
|
276071
276099
|
const forgeOptions = mapPassthroughOptions(passThroughOptions, cmd2);
|
|
276072
276100
|
await executeCommand("forge", ["fmt", ...forgeOptions]);
|
|
276073
|
-
|
|
276101
|
+
note2("Smart contract set formatted successfully!");
|
|
276074
276102
|
});
|
|
276075
276103
|
}
|
|
276076
276104
|
|
|
@@ -276170,7 +276198,7 @@ console.log(JSON.stringify(hardhat.userConfig));`], {
|
|
|
276170
276198
|
throw new Error("Invalid hardhat config");
|
|
276171
276199
|
} catch (err) {
|
|
276172
276200
|
const error5 = err;
|
|
276173
|
-
|
|
276201
|
+
note2(`Error reading hardhat.config.ts: ${error5.message}`);
|
|
276174
276202
|
return {};
|
|
276175
276203
|
}
|
|
276176
276204
|
}
|
|
@@ -276428,7 +276456,7 @@ var getSubgraphConfig = async (path8 = process.cwd()) => {
|
|
|
276428
276456
|
return currentConfig;
|
|
276429
276457
|
} catch (err) {
|
|
276430
276458
|
const error5 = err;
|
|
276431
|
-
|
|
276459
|
+
note2(`Failed to read ${basename4(CONFIG_FILE_PATH)} file: ${error5.message}`);
|
|
276432
276460
|
return null;
|
|
276433
276461
|
}
|
|
276434
276462
|
};
|
|
@@ -276705,7 +276733,7 @@ sdkcli.addCommand(createCommand2());
|
|
|
276705
276733
|
sdkcli.addCommand(loginCommand());
|
|
276706
276734
|
sdkcli.addCommand(logoutCommand());
|
|
276707
276735
|
sdkcli.parseAsync(process.argv).catch((reason) => {
|
|
276708
|
-
cancel2(reason);
|
|
276736
|
+
cancel2(reason.message);
|
|
276709
276737
|
});
|
|
276710
276738
|
|
|
276711
|
-
//# debugId=
|
|
276739
|
+
//# debugId=F063FF0BBD86708A64756E2164756E21
|