@settlemint/sdk-cli 0.8.2-pr21a90128 → 0.8.2-pr80e8abbb
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 -68
- package/dist/cli.js.map +14 -14
- 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.LgOMQSUpts:/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.2-
|
|
200567
|
+
binaryVersion: "0.8.2-pr80e8abbb",
|
|
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.LgOMQSUpts:/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.LgOMQSUpts:/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.LgOMQSUpts:/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.LgOMQSUpts:/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) : [""];
|
|
@@ -257014,7 +257014,6 @@ export const { client: portalClient, graphql: portalGraphql } = createPortalClie
|
|
|
257014
257014
|
}
|
|
257015
257015
|
|
|
257016
257016
|
// ../utils/dist/index.mjs
|
|
257017
|
-
import { spawn as spawn2 } from "node:child_process";
|
|
257018
257017
|
import { join as join3 } from "node:path";
|
|
257019
257018
|
|
|
257020
257019
|
// ../../node_modules/yoctocolors/base.js
|
|
@@ -257128,6 +257127,9 @@ var bgBlueBright = format(104, 49);
|
|
|
257128
257127
|
var bgMagentaBright = format(105, 49);
|
|
257129
257128
|
var bgCyanBright = format(106, 49);
|
|
257130
257129
|
var bgWhiteBright = format(107, 49);
|
|
257130
|
+
// ../utils/dist/index.mjs
|
|
257131
|
+
import { spawn as spawn2 } from "node:child_process";
|
|
257132
|
+
|
|
257131
257133
|
// ../../node_modules/is-in-ci/index.js
|
|
257132
257134
|
import { env } from "node:process";
|
|
257133
257135
|
var isInCi = env.CI !== "0" && env.CI !== "false" && (("CI" in env) || ("CONTINUOUS_INTEGRATION" in env) || Object.keys(env).some((key) => key.startsWith("CI_")));
|
|
@@ -267628,23 +267630,29 @@ var isIos = platform === "iOS" || globalThis.navigator?.platform === "MacIntel"
|
|
|
267628
267630
|
var isAndroid = platform === "Android" || globalThis.navigator?.platform === "Android" || globalThis.navigator?.userAgent?.includes(" Android ") === true || globalThis.process?.platform === "android";
|
|
267629
267631
|
|
|
267630
267632
|
// ../utils/dist/index.mjs
|
|
267631
|
-
|
|
267632
|
-
return
|
|
267633
|
-
}
|
|
267633
|
+
var maskTokens = (output) => {
|
|
267634
|
+
return output.replace(/sm_(pat|aat|sat)_[0-9a-zA-Z]+/g, "***");
|
|
267635
|
+
};
|
|
267636
|
+
var cancel = (msg) => {
|
|
267637
|
+
console.log("");
|
|
267638
|
+
console.log(inverse(redBright(maskTokens(msg))));
|
|
267639
|
+
console.log("");
|
|
267640
|
+
process.exit(1);
|
|
267641
|
+
};
|
|
267634
267642
|
async function executeCommand(command, args, options) {
|
|
267635
267643
|
const child = spawn2(command, args, { env: { ...process.env, ...options?.env } });
|
|
267636
267644
|
process.stdin.pipe(child.stdin);
|
|
267637
267645
|
const output = [];
|
|
267646
|
+
const writeOutput2 = (data) => {
|
|
267647
|
+
const maskedData = maskTokens(data.toString());
|
|
267648
|
+
if (!options?.silent) {
|
|
267649
|
+
process.stderr.write(maskedData);
|
|
267650
|
+
}
|
|
267651
|
+
output.push(maskedData);
|
|
267652
|
+
};
|
|
267638
267653
|
return new Promise((resolve22, reject) => {
|
|
267639
|
-
child.stdout.on("data",
|
|
267640
|
-
|
|
267641
|
-
process.stdout.write(data);
|
|
267642
|
-
}
|
|
267643
|
-
output.push(data.toString());
|
|
267644
|
-
});
|
|
267645
|
-
child.stderr.on("data", (data) => {
|
|
267646
|
-
process.stderr.write(data);
|
|
267647
|
-
});
|
|
267654
|
+
child.stdout.on("data", writeOutput2);
|
|
267655
|
+
child.stderr.on("data", writeOutput2);
|
|
267648
267656
|
child.on("error", (err) => reject(err));
|
|
267649
267657
|
child.on("close", (code2) => {
|
|
267650
267658
|
if (code2 === 0 || code2 === null || code2 === 143) {
|
|
@@ -267656,6 +267664,9 @@ async function executeCommand(command, args, options) {
|
|
|
267656
267664
|
});
|
|
267657
267665
|
});
|
|
267658
267666
|
}
|
|
267667
|
+
var ApplicationAccessTokenSchema = z3.string().regex(/^sm_aat_.*$/);
|
|
267668
|
+
var PersonalAccessTokenSchema = z3.string().regex(/^sm_pat_.*$/);
|
|
267669
|
+
var AccessTokenSchema = z3.string().regex(/^sm_pat_.*|sm_aat_.*$/);
|
|
267659
267670
|
function tryParseJson(value4, defaultValue = null) {
|
|
267660
267671
|
try {
|
|
267661
267672
|
const parsed = JSON.parse(value4);
|
|
@@ -267667,15 +267678,6 @@ function tryParseJson(value4, defaultValue = null) {
|
|
|
267667
267678
|
return defaultValue;
|
|
267668
267679
|
}
|
|
267669
267680
|
}
|
|
267670
|
-
var cancel = (msg) => {
|
|
267671
|
-
console.log("");
|
|
267672
|
-
console.log(inverse(redBright(msg)));
|
|
267673
|
-
console.log("");
|
|
267674
|
-
process.exit(1);
|
|
267675
|
-
};
|
|
267676
|
-
var ApplicationAccessTokenSchema = z3.string().regex(/^sm_aat_.*$/);
|
|
267677
|
-
var PersonalAccessTokenSchema = z3.string().regex(/^sm_pat_.*$/);
|
|
267678
|
-
var AccessTokenSchema = z3.string().regex(/^sm_pat_.*|sm_aat_.*$/);
|
|
267679
267681
|
var UniqueNameSchema = z3.string().regex(/^[a-z0-9-]+$/);
|
|
267680
267682
|
var UrlSchema = z3.string().url();
|
|
267681
267683
|
var UrlPathSchema = z3.string().regex(/^\/(?:[a-zA-Z0-9-_]+(?:\/[a-zA-Z0-9-_]+)*\/?)?$/, {
|
|
@@ -267788,6 +267790,9 @@ async function getPackageManagerExecutable(targetDir) {
|
|
|
267788
267790
|
}
|
|
267789
267791
|
return { command: "npx", args: [] };
|
|
267790
267792
|
}
|
|
267793
|
+
function capitalizeFirstLetter(val) {
|
|
267794
|
+
return String(val).charAt(0).toUpperCase() + String(val).slice(1);
|
|
267795
|
+
}
|
|
267791
267796
|
|
|
267792
267797
|
// ../utils/dist/terminal.mjs
|
|
267793
267798
|
var ascii = () => console.log(magentaBright(`
|
|
@@ -267797,24 +267802,27 @@ var ascii = () => console.log(magentaBright(`
|
|
|
267797
267802
|
/ \\ ___/| | | | | |_\\ ___// Y \\ | | \\ |
|
|
267798
267803
|
/_________/\\_____>__| |__| |____/\\_____>____|____/__|___|__/__|
|
|
267799
267804
|
`));
|
|
267805
|
+
var maskTokens2 = (output) => {
|
|
267806
|
+
return output.replace(/sm_(pat|aat|sat)_[0-9a-zA-Z]+/g, "***");
|
|
267807
|
+
};
|
|
267800
267808
|
var cancel2 = (msg) => {
|
|
267801
267809
|
console.log("");
|
|
267802
|
-
console.log(inverse(redBright(msg)));
|
|
267810
|
+
console.log(inverse(redBright(maskTokens2(msg))));
|
|
267803
267811
|
console.log("");
|
|
267804
267812
|
process.exit(1);
|
|
267805
267813
|
};
|
|
267806
267814
|
var intro = (msg) => {
|
|
267807
267815
|
console.log("");
|
|
267808
|
-
console.log(magentaBright(msg));
|
|
267816
|
+
console.log(magentaBright(maskTokens2(msg)));
|
|
267809
267817
|
console.log("");
|
|
267810
267818
|
};
|
|
267811
267819
|
var note = (message) => {
|
|
267812
267820
|
console.log("");
|
|
267813
|
-
console.log(message);
|
|
267821
|
+
console.log(maskTokens2(message));
|
|
267814
267822
|
};
|
|
267815
267823
|
var outro = (msg) => {
|
|
267816
267824
|
console.log("");
|
|
267817
|
-
console.log(inverse(greenBright(msg)));
|
|
267825
|
+
console.log(inverse(greenBright(maskTokens2(msg))));
|
|
267818
267826
|
console.log("");
|
|
267819
267827
|
};
|
|
267820
267828
|
var spinner = async (options) => {
|
|
@@ -269958,9 +269966,12 @@ import { dirname as dirname32, join as join22 } from "node:path";
|
|
|
269958
269966
|
import { stat as stat7 } from "node:fs/promises";
|
|
269959
269967
|
import { dirname as dirname22 } from "node:path";
|
|
269960
269968
|
var import_dotenvx4 = __toESM(require_main2(), 1);
|
|
269969
|
+
var maskTokens3 = (output) => {
|
|
269970
|
+
return output.replace(/sm_(pat|aat|sat)_[0-9a-zA-Z]+/g, "***");
|
|
269971
|
+
};
|
|
269961
269972
|
var cancel3 = (msg) => {
|
|
269962
269973
|
console.log("");
|
|
269963
|
-
console.log(inverse(redBright(msg)));
|
|
269974
|
+
console.log(inverse(redBright(maskTokens3(msg))));
|
|
269964
269975
|
console.log("");
|
|
269965
269976
|
process.exit(1);
|
|
269966
269977
|
};
|
|
@@ -273211,7 +273222,7 @@ async function workspacePrompt(env2, workspaces, accept) {
|
|
|
273211
273222
|
return defaultWorkspace;
|
|
273212
273223
|
}
|
|
273213
273224
|
if (workspaces.length === 0) {
|
|
273214
|
-
|
|
273225
|
+
cancel("No workspaces found");
|
|
273215
273226
|
}
|
|
273216
273227
|
const workspace = await esm_default2({
|
|
273217
273228
|
message: "Which workspace do you want to connect to?",
|
|
@@ -273222,7 +273233,7 @@ async function workspacePrompt(env2, workspaces, accept) {
|
|
|
273222
273233
|
default: defaultWorkspace
|
|
273223
273234
|
});
|
|
273224
273235
|
if (!workspace) {
|
|
273225
|
-
|
|
273236
|
+
cancel("No workspace selected");
|
|
273226
273237
|
}
|
|
273227
273238
|
return workspace;
|
|
273228
273239
|
}
|
|
@@ -273287,7 +273298,7 @@ function connectCommand() {
|
|
|
273287
273298
|
var package_default = {
|
|
273288
273299
|
name: "@settlemint/sdk-cli",
|
|
273289
273300
|
description: "SettleMint SDK, integrate SettleMint into your application with ease.",
|
|
273290
|
-
version: "0.8.2-
|
|
273301
|
+
version: "0.8.2-pr80e8abbb",
|
|
273291
273302
|
type: "module",
|
|
273292
273303
|
private: false,
|
|
273293
273304
|
license: "FSL-1.1-MIT",
|
|
@@ -273338,8 +273349,8 @@ var package_default = {
|
|
|
273338
273349
|
"@inquirer/input": "4.1.1",
|
|
273339
273350
|
"@inquirer/password": "4.0.4",
|
|
273340
273351
|
"@inquirer/select": "4.0.4",
|
|
273341
|
-
"@settlemint/sdk-js": "0.8.2-
|
|
273342
|
-
"@settlemint/sdk-utils": "0.8.2-
|
|
273352
|
+
"@settlemint/sdk-js": "0.8.2-pr80e8abbb",
|
|
273353
|
+
"@settlemint/sdk-utils": "0.8.2-pr80e8abbb",
|
|
273343
273354
|
"get-tsconfig": "4.8.1",
|
|
273344
273355
|
giget: "1.2.3"
|
|
273345
273356
|
},
|
|
@@ -273377,13 +273388,13 @@ async function namePrompt(env2, argument) {
|
|
|
273377
273388
|
// src/commands/create/template.prompt.ts
|
|
273378
273389
|
async function templatePrompt(templates, argument) {
|
|
273379
273390
|
if (templates.length === 0) {
|
|
273380
|
-
|
|
273391
|
+
cancel("No templates found");
|
|
273381
273392
|
}
|
|
273382
273393
|
const defaultInstance = argument;
|
|
273383
273394
|
if (defaultInstance) {
|
|
273384
273395
|
const template2 = templates.find((template3) => template3.value === argument);
|
|
273385
273396
|
if (!template2) {
|
|
273386
|
-
|
|
273397
|
+
cancel(`No template found with name '${argument}'`);
|
|
273387
273398
|
}
|
|
273388
273399
|
return template2;
|
|
273389
273400
|
}
|
|
@@ -274250,46 +274261,37 @@ ${createExamples([
|
|
|
274250
274261
|
command: "login --token-stdin --accept-defaults",
|
|
274251
274262
|
commandPrefix: "cat ~/my_token.txt | "
|
|
274252
274263
|
}
|
|
274253
|
-
])}`).option("-a, --accept-defaults", "Accept the default and previously set values").option("-d, --default", "Set this instance as the default").option("--token-stdin", "Provide a token using STDIN").
|
|
274264
|
+
])}`).option("-a, --accept-defaults", "Accept the default and previously set values").option("-d, --default", "Set this instance as the default").option("--token-stdin", "Provide a token using STDIN").action(async ({ acceptDefaults, default: isDefault, tokenStdin }) => {
|
|
274254
274265
|
intro("Login to your SettleMint account");
|
|
274255
|
-
const autoAccept = !!acceptDefaults || !!tokenStdin;
|
|
274256
274266
|
const env2 = await loadEnv2(false, false);
|
|
274257
|
-
const
|
|
274258
|
-
let personalAccessToken
|
|
274267
|
+
const instance = await instancePrompt(env2, !!acceptDefaults);
|
|
274268
|
+
let personalAccessToken;
|
|
274259
274269
|
if (tokenStdin) {
|
|
274260
|
-
|
|
274261
|
-
|
|
274270
|
+
const chunks = [];
|
|
274271
|
+
for await (const chunk of process.stdin) {
|
|
274272
|
+
chunks.push(Buffer.from(chunk));
|
|
274262
274273
|
}
|
|
274263
|
-
personalAccessToken =
|
|
274264
|
-
(async () => {
|
|
274265
|
-
const chunks = [];
|
|
274266
|
-
for await (const chunk of process.stdin) {
|
|
274267
|
-
chunks.push(Buffer.from(chunk));
|
|
274268
|
-
}
|
|
274269
|
-
return Buffer.concat(chunks).toString().trim();
|
|
274270
|
-
})(),
|
|
274271
|
-
new Promise((resolve6) => setTimeout(() => resolve6(""), 1000))
|
|
274272
|
-
]);
|
|
274274
|
+
personalAccessToken = Buffer.concat(chunks).toString().trim();
|
|
274273
274275
|
try {
|
|
274274
274276
|
validate3(PersonalAccessTokenSchema3, personalAccessToken);
|
|
274275
274277
|
} catch {
|
|
274276
274278
|
cancel2("Invalid personal access token");
|
|
274277
274279
|
}
|
|
274278
274280
|
} else {
|
|
274279
|
-
personalAccessToken = await personalAccessTokenPrompt(env2,
|
|
274281
|
+
personalAccessToken = await personalAccessTokenPrompt(env2, instance, !!acceptDefaults);
|
|
274280
274282
|
}
|
|
274281
274283
|
const client = createSettleMintClient({
|
|
274282
|
-
instance
|
|
274284
|
+
instance,
|
|
274283
274285
|
accessToken: personalAccessToken
|
|
274284
274286
|
});
|
|
274285
274287
|
try {
|
|
274286
274288
|
await loginSpinner(client);
|
|
274287
274289
|
} catch (error5) {
|
|
274288
|
-
cancel2(`Invalid personal access token for instance ${
|
|
274290
|
+
cancel2(`Invalid personal access token for instance ${instance}`);
|
|
274289
274291
|
}
|
|
274290
|
-
await storeCredentials(personalAccessToken,
|
|
274292
|
+
await storeCredentials(personalAccessToken, instance);
|
|
274291
274293
|
if (isDefault) {
|
|
274292
|
-
await setDefaultInstance(
|
|
274294
|
+
await setDefaultInstance(instance);
|
|
274293
274295
|
}
|
|
274294
274296
|
outro("Successfully logged in to SettleMint!");
|
|
274295
274297
|
});
|
|
@@ -275164,7 +275166,7 @@ function smartContractPortalMiddlewareCreateCommand() {
|
|
|
275164
275166
|
parsedAbis.push(...parsedAbiResults);
|
|
275165
275167
|
} catch (err) {
|
|
275166
275168
|
const error5 = err;
|
|
275167
|
-
|
|
275169
|
+
cancel(`Failed to read or parse ABI file: ${error5.message}`);
|
|
275168
275170
|
}
|
|
275169
275171
|
}
|
|
275170
275172
|
const result = await settlemint.middleware.create({
|
|
@@ -275573,7 +275575,7 @@ ${createExamples([
|
|
|
275573
275575
|
const isDefaultUniqueName = uniqueName === "default";
|
|
275574
275576
|
const serviceUniqueName = isDefaultUniqueName ? typeof env2[envKey] === "string" ? env2[envKey] : null : uniqueName;
|
|
275575
275577
|
if (!serviceUniqueName) {
|
|
275576
|
-
|
|
275578
|
+
cancel(`No default ${type4} found in your .env file. Please provide a valid ${type4} unique name or set a default ${type4} first.`);
|
|
275577
275579
|
}
|
|
275578
275580
|
const result = await spinner({
|
|
275579
275581
|
startMessage: `Restarting ${type4}`,
|
|
@@ -275967,11 +275969,11 @@ var SMART_CONTRACT_SETS = SMART_CONTRACT_SET_DETAILS.map((set) => set.id);
|
|
|
275967
275969
|
// src/commands/smart-contract-set/prompts/use-case.prompt.ts
|
|
275968
275970
|
async function useCasePrompt(argument) {
|
|
275969
275971
|
if (SMART_CONTRACT_SETS.length === 0) {
|
|
275970
|
-
|
|
275972
|
+
cancel("No use cases found");
|
|
275971
275973
|
}
|
|
275972
275974
|
if (argument) {
|
|
275973
275975
|
if (!SMART_CONTRACT_SETS.includes(argument)) {
|
|
275974
|
-
|
|
275976
|
+
cancel(`No use case found with name '${argument}'`);
|
|
275975
275977
|
}
|
|
275976
275978
|
return argument;
|
|
275977
275979
|
}
|
|
@@ -276116,7 +276118,7 @@ async function addressPrompt({
|
|
|
276116
276118
|
return defaultAddress;
|
|
276117
276119
|
}
|
|
276118
276120
|
if (possiblePrivateKeys.length === 0) {
|
|
276119
|
-
|
|
276121
|
+
cancel("No private key is activated on the node to sign the transaction.");
|
|
276120
276122
|
}
|
|
276121
276123
|
const address = await esm_default2({
|
|
276122
276124
|
message: "Which private key do you want to deploy from?",
|
|
@@ -276616,7 +276618,7 @@ function subgraphDeployCommand() {
|
|
|
276616
276618
|
if (generated) {
|
|
276617
276619
|
const currentConfig = await getSubgraphConfig();
|
|
276618
276620
|
if (!currentConfig || currentConfig?.datasources.some((ds) => ds.address === "0x0000000000000000000000000000000000000000")) {
|
|
276619
|
-
|
|
276621
|
+
cancel2('The "subgraph/subgraph.config.json" config has not been set, ensure all the contracts listed have an address added');
|
|
276620
276622
|
}
|
|
276621
276623
|
}
|
|
276622
276624
|
const graphName = await subgraphNamePrompt2(subgraphName, env2, autoAccept, !!prod);
|
|
@@ -276692,4 +276694,4 @@ sdkcli.parseAsync(process.argv).catch((reason) => {
|
|
|
276692
276694
|
cancel2(reason);
|
|
276693
276695
|
});
|
|
276694
276696
|
|
|
276695
|
-
//# debugId=
|
|
276697
|
+
//# debugId=E187092F8A68976C64756E2164756E21
|