@settlemint/sdk-cli 1.0.8-pr23e99b83 → 1.0.8-pr366f8fa7
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 +45 -76
- package/dist/cli.js.map +9 -9
- package/package.json +3 -3
package/dist/cli.js
CHANGED
|
@@ -209465,7 +209465,7 @@ ${Bt.cyan(Yt)}
|
|
|
209465
209465
|
code: "ENOENT"
|
|
209466
209466
|
}), getPathInfo = (e9, t7) => {
|
|
209467
209467
|
var r6 = t7.colon || or;
|
|
209468
|
-
var i6 = e9.match(/\//) || nr && e9.match(/\\/) ? [""] : [...nr ? [process.cwd()] : [], ...(t7.path || "/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/tmp/bunx-1001-turbo@latest/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/22.13.0/x64/bin:/home/runner/.bun/bin:/tmp/tmp.
|
|
209468
|
+
var i6 = e9.match(/\//) || nr && e9.match(/\\/) ? [""] : [...nr ? [process.cwd()] : [], ...(t7.path || "/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/tmp/bunx-1001-turbo@latest/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/22.13.0/x64/bin:/home/runner/.bun/bin:/tmp/tmp.SmDXJ9CUce:/nsc/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/snap/bin/:/usr/games:/usr/local/games:/home/linuxbrew/.linuxbrew/bin:/home/runner/.config/composer/vendor/bin:/home/runner/.dotnet/tools:/home/runner/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin").split(r6)];
|
|
209469
209469
|
var n6 = nr ? t7.pathExt || process.env.PATHEXT || ".EXE;.CMD;.BAT;.COM" : "";
|
|
209470
209470
|
var a5 = nr ? n6.split(r6) : [""];
|
|
209471
209471
|
if (nr) {
|
|
@@ -212602,7 +212602,7 @@ ${whileRunning(e9)}`;
|
|
|
212602
212602
|
};
|
|
212603
212603
|
ni = Object.assign(async function _main() {
|
|
212604
212604
|
var e9 = new Cli({
|
|
212605
|
-
binaryVersion: "1.0.8-
|
|
212605
|
+
binaryVersion: "1.0.8-pr366f8fa7",
|
|
212606
212606
|
binaryLabel: "gql.tada CLI",
|
|
212607
212607
|
binaryName: "gql.tada"
|
|
212608
212608
|
});
|
|
@@ -220192,7 +220192,7 @@ var require_lib4 = __commonJS((exports, module) => {
|
|
|
220192
220192
|
var rRel = new RegExp(`^\\.${rSlash.source}`);
|
|
220193
220193
|
var getNotFoundError2 = (cmd2) => Object.assign(new Error(`not found: ${cmd2}`), { code: "ENOENT" });
|
|
220194
220194
|
var getPathInfo2 = (cmd2, {
|
|
220195
|
-
path: optPath = "/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/tmp/bunx-1001-turbo@latest/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/22.13.0/x64/bin:/home/runner/.bun/bin:/tmp/tmp.
|
|
220195
|
+
path: optPath = "/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/tmp/bunx-1001-turbo@latest/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/22.13.0/x64/bin:/home/runner/.bun/bin:/tmp/tmp.SmDXJ9CUce:/nsc/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/snap/bin/:/usr/games:/usr/local/games:/home/linuxbrew/.linuxbrew/bin:/home/runner/.config/composer/vendor/bin:/home/runner/.dotnet/tools:/home/runner/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin",
|
|
220196
220196
|
pathExt: optPathExt = process.env.PATHEXT,
|
|
220197
220197
|
delimiter: optDelimiter = delimiter
|
|
220198
220198
|
}) => {
|
|
@@ -220396,7 +220396,7 @@ var require_lib5 = __commonJS((exports, module) => {
|
|
|
220396
220396
|
let pathToInitial;
|
|
220397
220397
|
try {
|
|
220398
220398
|
pathToInitial = which.sync(initialCmd, {
|
|
220399
|
-
path: options.env && findInObject(options.env, "PATH") || "/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/tmp/bunx-1001-turbo@latest/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/22.13.0/x64/bin:/home/runner/.bun/bin:/tmp/tmp.
|
|
220399
|
+
path: options.env && findInObject(options.env, "PATH") || "/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/tmp/bunx-1001-turbo@latest/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/22.13.0/x64/bin:/home/runner/.bun/bin:/tmp/tmp.SmDXJ9CUce:/nsc/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/snap/bin/:/usr/games:/usr/local/games:/home/linuxbrew/.linuxbrew/bin:/home/runner/.config/composer/vendor/bin:/home/runner/.dotnet/tools:/home/runner/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin",
|
|
220400
220400
|
pathext: options.env && findInObject(options.env, "PATHEXT") || process.env.PATHEXT
|
|
220401
220401
|
}).toLowerCase();
|
|
220402
220402
|
} catch (err) {
|
|
@@ -221113,7 +221113,7 @@ var require_lib6 = __commonJS((exports, module) => {
|
|
|
221113
221113
|
var rRel = new RegExp(`^\\.${rSlash.source}`);
|
|
221114
221114
|
var getNotFoundError2 = (cmd2) => Object.assign(new Error(`not found: ${cmd2}`), { code: "ENOENT" });
|
|
221115
221115
|
var getPathInfo2 = (cmd2, {
|
|
221116
|
-
path: optPath = "/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/tmp/bunx-1001-turbo@latest/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/22.13.0/x64/bin:/home/runner/.bun/bin:/tmp/tmp.
|
|
221116
|
+
path: optPath = "/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/tmp/bunx-1001-turbo@latest/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/22.13.0/x64/bin:/home/runner/.bun/bin:/tmp/tmp.SmDXJ9CUce:/nsc/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/snap/bin/:/usr/games:/usr/local/games:/home/linuxbrew/.linuxbrew/bin:/home/runner/.config/composer/vendor/bin:/home/runner/.dotnet/tools:/home/runner/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin",
|
|
221117
221117
|
pathExt: optPathExt = process.env.PATHEXT,
|
|
221118
221118
|
delimiter: optDelimiter = delimiter
|
|
221119
221119
|
}) => {
|
|
@@ -234988,7 +234988,7 @@ var require_which2 = __commonJS((exports, module) => {
|
|
|
234988
234988
|
const colon = opt2.colon || COLON;
|
|
234989
234989
|
const pathEnv = cmd2.match(/\//) || isWindows2 && cmd2.match(/\\/) ? [""] : [
|
|
234990
234990
|
...isWindows2 ? [process.cwd()] : [],
|
|
234991
|
-
...(opt2.path || "/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/tmp/bunx-1001-turbo@latest/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/22.13.0/x64/bin:/home/runner/.bun/bin:/tmp/tmp.
|
|
234991
|
+
...(opt2.path || "/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/tmp/bunx-1001-turbo@latest/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/22.13.0/x64/bin:/home/runner/.bun/bin:/tmp/tmp.SmDXJ9CUce:/nsc/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/snap/bin/:/usr/games:/usr/local/games:/home/linuxbrew/.linuxbrew/bin:/home/runner/.config/composer/vendor/bin:/home/runner/.dotnet/tools:/home/runner/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin").split(colon)
|
|
234992
234992
|
];
|
|
234993
234993
|
const pathExtExe = isWindows2 ? opt2.pathExt || process.env.PATHEXT || ".EXE;.CMD;.BAT;.COM" : "";
|
|
234994
234994
|
const pathExt = isWindows2 ? pathExtExe.split(colon) : [""];
|
|
@@ -256556,7 +256556,6 @@ var is_in_ci_default = isInCi;
|
|
|
256556
256556
|
|
|
256557
256557
|
// ../../node_modules/yocto-spinner/index.js
|
|
256558
256558
|
import process2 from "node:process";
|
|
256559
|
-
import { stripVTControlCharacters } from "node:util";
|
|
256560
256559
|
var isUnicodeSupported = process2.platform !== "win32" || Boolean(process2.env.WT_SESSION);
|
|
256561
256560
|
var isInteractive = (stream) => Boolean(stream.isTTY && process2.env.TERM !== "dumb" && !("CI" in process2.env));
|
|
256562
256561
|
var infoSymbol = exports_base.blue(isUnicodeSupported ? "ℹ" : "i");
|
|
@@ -256706,7 +256705,7 @@ class YoctoSpinner {
|
|
|
256706
256705
|
}
|
|
256707
256706
|
#lineCount(text) {
|
|
256708
256707
|
const width = this.#stream.columns ?? 80;
|
|
256709
|
-
const lines =
|
|
256708
|
+
const lines = text.split(`
|
|
256710
256709
|
`);
|
|
256711
256710
|
let lineCount = 0;
|
|
256712
256711
|
for (const line of lines) {
|
|
@@ -267180,13 +267179,11 @@ function mergeOthers(values, utils, meta) {
|
|
|
267180
267179
|
var maskTokens = (output) => {
|
|
267181
267180
|
return output.replace(/sm_(pat|aat|sat)_[0-9a-zA-Z]+/g, "***");
|
|
267182
267181
|
};
|
|
267183
|
-
var CancelError = class extends Error {
|
|
267184
|
-
};
|
|
267185
267182
|
var cancel = (msg) => {
|
|
267186
267183
|
console.log("");
|
|
267187
267184
|
console.log(inverse(redBright(maskTokens(msg))));
|
|
267188
267185
|
console.log("");
|
|
267189
|
-
|
|
267186
|
+
process.exit(1);
|
|
267190
267187
|
};
|
|
267191
267188
|
function validate(schema, value) {
|
|
267192
267189
|
try {
|
|
@@ -267483,13 +267480,11 @@ var ascii = () => console.log(magentaBright(`
|
|
|
267483
267480
|
var maskTokens2 = (output) => {
|
|
267484
267481
|
return output.replace(/sm_(pat|aat|sat)_[0-9a-zA-Z]+/g, "***");
|
|
267485
267482
|
};
|
|
267486
|
-
var CancelError2 = class extends Error {
|
|
267487
|
-
};
|
|
267488
267483
|
var cancel2 = (msg) => {
|
|
267489
267484
|
console.log("");
|
|
267490
267485
|
console.log(inverse(redBright(maskTokens2(msg))));
|
|
267491
267486
|
console.log("");
|
|
267492
|
-
|
|
267487
|
+
process.exit(1);
|
|
267493
267488
|
};
|
|
267494
267489
|
async function executeCommand(command, args, options) {
|
|
267495
267490
|
const child = spawn(command, args, { env: { ...process.env, ...options?.env } });
|
|
@@ -267566,11 +267561,10 @@ var spinner = async (options) => {
|
|
|
267566
267561
|
return result;
|
|
267567
267562
|
} catch (error) {
|
|
267568
267563
|
spinner2.error(redBright(`${options.startMessage} --> Error!`));
|
|
267569
|
-
|
|
267570
|
-
note(redBright(`${errorMessage}
|
|
267564
|
+
note(redBright(`${error.message}
|
|
267571
267565
|
|
|
267572
267566
|
${error.stack}`));
|
|
267573
|
-
|
|
267567
|
+
process.exit(1);
|
|
267574
267568
|
}
|
|
267575
267569
|
};
|
|
267576
267570
|
function capitalizeFirstLetter(val) {
|
|
@@ -267606,7 +267600,7 @@ function table(title, data, compact = true) {
|
|
|
267606
267600
|
var package_default = {
|
|
267607
267601
|
name: "@settlemint/sdk-cli",
|
|
267608
267602
|
description: "Command-line interface for SettleMint SDK, providing development tools and project management capabilities",
|
|
267609
|
-
version: "1.0.8-
|
|
267603
|
+
version: "1.0.8-pr366f8fa7",
|
|
267610
267604
|
type: "module",
|
|
267611
267605
|
private: false,
|
|
267612
267606
|
license: "FSL-1.1-MIT",
|
|
@@ -267662,8 +267656,8 @@ var package_default = {
|
|
|
267662
267656
|
"@inquirer/input": "4.1.3",
|
|
267663
267657
|
"@inquirer/password": "4.0.6",
|
|
267664
267658
|
"@inquirer/select": "4.0.6",
|
|
267665
|
-
"@settlemint/sdk-js": "1.0.8-
|
|
267666
|
-
"@settlemint/sdk-utils": "1.0.8-
|
|
267659
|
+
"@settlemint/sdk-js": "1.0.8-pr366f8fa7",
|
|
267660
|
+
"@settlemint/sdk-utils": "1.0.8-pr366f8fa7",
|
|
267667
267661
|
"get-tsconfig": "4.9.0",
|
|
267668
267662
|
giget: "1.2.3",
|
|
267669
267663
|
yaml: "2.7.0"
|
|
@@ -274929,7 +274923,7 @@ function getCreateCommand({
|
|
|
274929
274923
|
if (isDefault && typeof mapDefaultEnv === "function") {
|
|
274930
274924
|
const defaultEnv = mapDefaultEnv();
|
|
274931
274925
|
const updatedEnv = defaultEnv instanceof Promise ? await defaultEnv : defaultEnv;
|
|
274932
|
-
const isApplicationChanged = updatedEnv.SETTLEMINT_APPLICATION
|
|
274926
|
+
const isApplicationChanged = updatedEnv.SETTLEMINT_APPLICATION === env2.SETTLEMINT_APPLICATION;
|
|
274933
274927
|
const newEnv = isApplicationChanged ? {
|
|
274934
274928
|
SETTLEMINT_ACCESS_TOKEN: usePersonalAccessToken ? env2.SETTLEMINT_ACCESS_TOKEN : accessToken,
|
|
274935
274929
|
SETTLEMINT_INSTANCE: instance,
|
|
@@ -277505,18 +277499,13 @@ function subgraphCodegenCommand() {
|
|
|
277505
277499
|
import { dirname as dirname12 } from "node:path";
|
|
277506
277500
|
|
|
277507
277501
|
// src/prompts/smart-contract-set/subgraph-name.prompt.ts
|
|
277508
|
-
async function subgraphNamePrompt({
|
|
277509
|
-
defaultName
|
|
277510
|
-
env: env2,
|
|
277511
|
-
accept,
|
|
277512
|
-
prod
|
|
277513
|
-
}) {
|
|
277514
|
-
const defaultSubgraphName = defaultName ? sanitizeName(defaultName) : undefined;
|
|
277502
|
+
async function subgraphNamePrompt(defaultName, env2, accept, prod) {
|
|
277503
|
+
const defaultSubgraphName = defaultName ? sanitizeName(defaultName) : env2.SETTLEMINT_THEGRAPH_SUBGRAPH_NAME;
|
|
277515
277504
|
if (accept) {
|
|
277516
277505
|
if (defaultSubgraphName && env2.SETTLEMINT_THEGRAPH_SUBGRAPH_NAME !== defaultSubgraphName) {
|
|
277517
277506
|
await saveSubgraphName(defaultSubgraphName, env2, prod);
|
|
277518
277507
|
}
|
|
277519
|
-
return defaultSubgraphName
|
|
277508
|
+
return defaultSubgraphName;
|
|
277520
277509
|
}
|
|
277521
277510
|
const subgraphName = await esm_default4({
|
|
277522
277511
|
message: "What is the name of your subgraph?",
|
|
@@ -277524,7 +277513,7 @@ async function subgraphNamePrompt({
|
|
|
277524
277513
|
required: true
|
|
277525
277514
|
});
|
|
277526
277515
|
const sanitizedSubgraphName = sanitizeName(subgraphName);
|
|
277527
|
-
if (
|
|
277516
|
+
if (sanitizedSubgraphName !== defaultSubgraphName) {
|
|
277528
277517
|
await saveSubgraphName(sanitizedSubgraphName, env2, prod);
|
|
277529
277518
|
}
|
|
277530
277519
|
return sanitizedSubgraphName;
|
|
@@ -277580,12 +277569,7 @@ function subgraphDeployCommand() {
|
|
|
277580
277569
|
cancel2('The "subgraph/subgraph.config.json" config has not been set, ensure all the contracts listed have an address added');
|
|
277581
277570
|
}
|
|
277582
277571
|
}
|
|
277583
|
-
const graphName = await subgraphNamePrompt(
|
|
277584
|
-
defaultName: subgraphName,
|
|
277585
|
-
env: env2,
|
|
277586
|
-
accept: autoAccept,
|
|
277587
|
-
prod: !!prod
|
|
277588
|
-
});
|
|
277572
|
+
const graphName = await subgraphNamePrompt(subgraphName, env2, autoAccept, !!prod);
|
|
277589
277573
|
if (!graphName) {
|
|
277590
277574
|
cancel2("No graph name provided. Please provide a graph name to continue.");
|
|
277591
277575
|
}
|
|
@@ -277655,14 +277639,6 @@ function getCommandPath(command) {
|
|
|
277655
277639
|
}
|
|
277656
277640
|
return parts.join(" ");
|
|
277657
277641
|
}
|
|
277658
|
-
function getCommandPathFromArgv(argv) {
|
|
277659
|
-
const settlemintIndex = argv.indexOf("settlemint");
|
|
277660
|
-
const args = argv.slice(settlemintIndex !== -1 ? settlemintIndex + 1 : 0);
|
|
277661
|
-
if (!args.length) {
|
|
277662
|
-
return null;
|
|
277663
|
-
}
|
|
277664
|
-
return args.join(" ");
|
|
277665
|
-
}
|
|
277666
277642
|
function isLeafCommand(command) {
|
|
277667
277643
|
return command.commands.length === 0;
|
|
277668
277644
|
}
|
|
@@ -277670,20 +277646,18 @@ function isJsonOrYamlOutput(command) {
|
|
|
277670
277646
|
const options = command.opts();
|
|
277671
277647
|
return typeof options.output === "string" && (options.output === "json" || options.output === "yaml");
|
|
277672
277648
|
}
|
|
277673
|
-
function addHooksToCommand(cmd2, rootCmd
|
|
277649
|
+
function addHooksToCommand(cmd2, rootCmd) {
|
|
277674
277650
|
const extendedCmd = cmd2;
|
|
277675
277651
|
extendedCmd.hook("preAction", async (thisCommand) => {
|
|
277676
|
-
if (isLeafCommand(thisCommand)) {
|
|
277677
|
-
const commandPath = getCommandPath(thisCommand);
|
|
277678
|
-
rootCmd._lastCommand = thisCommand;
|
|
277679
|
-
rootCmd._lastCommand._commandPath = commandPath;
|
|
277680
|
-
}
|
|
277681
277652
|
if (isLeafCommand(thisCommand) && !isJsonOrYamlOutput(thisCommand)) {
|
|
277682
277653
|
ascii();
|
|
277683
277654
|
}
|
|
277655
|
+
const commandPath = getCommandPath(thisCommand);
|
|
277656
|
+
rootCmd._lastCommand = thisCommand;
|
|
277657
|
+
rootCmd._lastCommand._commandPath = commandPath;
|
|
277684
277658
|
}).hook("postAction", async (thisCommand) => {
|
|
277685
277659
|
if (isLeafCommand(thisCommand)) {
|
|
277686
|
-
const commandPath = thisCommand
|
|
277660
|
+
const commandPath = getCommandPath(thisCommand);
|
|
277687
277661
|
if (commandPath) {
|
|
277688
277662
|
await telemetry({
|
|
277689
277663
|
command: commandPath,
|
|
@@ -277693,11 +277667,14 @@ function addHooksToCommand(cmd2, rootCmd, argv) {
|
|
|
277693
277667
|
}
|
|
277694
277668
|
});
|
|
277695
277669
|
for (const subcmd of cmd2.commands) {
|
|
277696
|
-
addHooksToCommand(subcmd, rootCmd
|
|
277670
|
+
addHooksToCommand(subcmd, rootCmd);
|
|
277697
277671
|
}
|
|
277698
277672
|
}
|
|
277699
|
-
function
|
|
277673
|
+
function sdkCliCommand(exitOverride = undefined) {
|
|
277700
277674
|
const sdkcli = new Command;
|
|
277675
|
+
if (exitOverride) {
|
|
277676
|
+
sdkcli.exitOverride(exitOverride);
|
|
277677
|
+
}
|
|
277701
277678
|
sdkcli.name("settlemint").usage("[command]").description(`CLI for SettleMint (v${package_default.version})`).version(package_default.version, "-v, --version", "Output the current version").helpOption("-h, --help", "Display help for command").allowUnknownOption().showSuggestionAfterError(true).showHelpAfterError();
|
|
277702
277679
|
sdkcli.addCommand(connectCommand());
|
|
277703
277680
|
sdkcli.addCommand(codegenCommand());
|
|
@@ -277706,34 +277683,26 @@ function registerCommands() {
|
|
|
277706
277683
|
sdkcli.addCommand(createCommand2());
|
|
277707
277684
|
sdkcli.addCommand(loginCommand());
|
|
277708
277685
|
sdkcli.addCommand(logoutCommand());
|
|
277709
|
-
return sdkcli;
|
|
277710
|
-
}
|
|
277711
|
-
async function sdkCliCommand(argv = process.argv) {
|
|
277712
|
-
const sdkcli = registerCommands();
|
|
277713
|
-
sdkcli.exitOverride(onError);
|
|
277714
|
-
async function onError(error5) {
|
|
277715
|
-
const commandPath = sdkcli._lastCommand?._commandPath ?? getCommandPathFromArgv(argv);
|
|
277716
|
-
if (commandPath) {
|
|
277717
|
-
await telemetry({
|
|
277718
|
-
command: commandPath,
|
|
277719
|
-
status: "error",
|
|
277720
|
-
message: error5.message
|
|
277721
|
-
});
|
|
277722
|
-
}
|
|
277723
|
-
}
|
|
277724
277686
|
for (const cmd2 of sdkcli.commands) {
|
|
277725
|
-
addHooksToCommand(cmd2, sdkcli
|
|
277687
|
+
addHooksToCommand(cmd2, sdkcli);
|
|
277726
277688
|
}
|
|
277727
|
-
|
|
277728
|
-
|
|
277729
|
-
|
|
277730
|
-
|
|
277731
|
-
|
|
277732
|
-
|
|
277689
|
+
if (!exitOverride) {
|
|
277690
|
+
sdkcli.parseAsync(process.argv).catch(async (error5) => {
|
|
277691
|
+
const commandPath = sdkcli._lastCommand?._commandPath;
|
|
277692
|
+
if (commandPath) {
|
|
277693
|
+
await telemetry({
|
|
277694
|
+
command: commandPath,
|
|
277695
|
+
status: "error",
|
|
277696
|
+
message: error5.message
|
|
277697
|
+
});
|
|
277698
|
+
}
|
|
277699
|
+
cancel2(error5.message);
|
|
277700
|
+
});
|
|
277733
277701
|
}
|
|
277702
|
+
return sdkcli;
|
|
277734
277703
|
}
|
|
277735
277704
|
|
|
277736
277705
|
// src/cli.ts
|
|
277737
277706
|
sdkCliCommand();
|
|
277738
277707
|
|
|
277739
|
-
//# debugId=
|
|
277708
|
+
//# debugId=CAB8D94A49B5322664756E2164756E21
|