@settlemint/sdk-cli 0.8.2 → 0.8.3-main386a8364
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 +78 -53
- 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.kKJ6kpnHCn:/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.3-main386a8364",
|
|
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.kKJ6kpnHCn:/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.kKJ6kpnHCn:/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.kKJ6kpnHCn:/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.kKJ6kpnHCn:/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,22 +267630,33 @@ 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 = [];
|
|
267638
267646
|
return new Promise((resolve22, reject) => {
|
|
267639
267647
|
child.stdout.on("data", (data) => {
|
|
267648
|
+
const maskedData = maskTokens(data.toString());
|
|
267640
267649
|
if (!options?.silent) {
|
|
267641
|
-
process.stdout.write(
|
|
267650
|
+
process.stdout.write(maskedData);
|
|
267642
267651
|
}
|
|
267643
|
-
output.push(
|
|
267652
|
+
output.push(maskedData);
|
|
267644
267653
|
});
|
|
267645
267654
|
child.stderr.on("data", (data) => {
|
|
267646
|
-
|
|
267655
|
+
const maskedData = maskTokens(data.toString());
|
|
267656
|
+
if (!options?.silent) {
|
|
267657
|
+
process.stderr.write(maskedData);
|
|
267658
|
+
}
|
|
267659
|
+
output.push(maskedData);
|
|
267647
267660
|
});
|
|
267648
267661
|
child.on("error", (err) => reject(err));
|
|
267649
267662
|
child.on("close", (code2) => {
|
|
@@ -267656,6 +267669,9 @@ async function executeCommand(command, args, options) {
|
|
|
267656
267669
|
});
|
|
267657
267670
|
});
|
|
267658
267671
|
}
|
|
267672
|
+
var ApplicationAccessTokenSchema = z3.string().regex(/^sm_aat_.*$/);
|
|
267673
|
+
var PersonalAccessTokenSchema = z3.string().regex(/^sm_pat_.*$/);
|
|
267674
|
+
var AccessTokenSchema = z3.string().regex(/^sm_pat_.*|sm_aat_.*$/);
|
|
267659
267675
|
function tryParseJson(value4, defaultValue = null) {
|
|
267660
267676
|
try {
|
|
267661
267677
|
const parsed = JSON.parse(value4);
|
|
@@ -267667,15 +267683,6 @@ function tryParseJson(value4, defaultValue = null) {
|
|
|
267667
267683
|
return defaultValue;
|
|
267668
267684
|
}
|
|
267669
267685
|
}
|
|
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
267686
|
var UniqueNameSchema = z3.string().regex(/^[a-z0-9-]+$/);
|
|
267680
267687
|
var UrlSchema = z3.string().url();
|
|
267681
267688
|
var UrlPathSchema = z3.string().regex(/^\/(?:[a-zA-Z0-9-_]+(?:\/[a-zA-Z0-9-_]+)*\/?)?$/, {
|
|
@@ -267788,6 +267795,9 @@ async function getPackageManagerExecutable(targetDir) {
|
|
|
267788
267795
|
}
|
|
267789
267796
|
return { command: "npx", args: [] };
|
|
267790
267797
|
}
|
|
267798
|
+
function capitalizeFirstLetter(val) {
|
|
267799
|
+
return String(val).charAt(0).toUpperCase() + String(val).slice(1);
|
|
267800
|
+
}
|
|
267791
267801
|
|
|
267792
267802
|
// ../utils/dist/terminal.mjs
|
|
267793
267803
|
var ascii = () => console.log(magentaBright(`
|
|
@@ -267797,24 +267807,27 @@ var ascii = () => console.log(magentaBright(`
|
|
|
267797
267807
|
/ \\ ___/| | | | | |_\\ ___// Y \\ | | \\ |
|
|
267798
267808
|
/_________/\\_____>__| |__| |____/\\_____>____|____/__|___|__/__|
|
|
267799
267809
|
`));
|
|
267810
|
+
var maskTokens2 = (output) => {
|
|
267811
|
+
return output.replace(/sm_(pat|aat|sat)_[0-9a-zA-Z]+/g, "***");
|
|
267812
|
+
};
|
|
267800
267813
|
var cancel2 = (msg) => {
|
|
267801
267814
|
console.log("");
|
|
267802
|
-
console.log(inverse(redBright(msg)));
|
|
267815
|
+
console.log(inverse(redBright(maskTokens2(msg))));
|
|
267803
267816
|
console.log("");
|
|
267804
267817
|
process.exit(1);
|
|
267805
267818
|
};
|
|
267806
267819
|
var intro = (msg) => {
|
|
267807
267820
|
console.log("");
|
|
267808
|
-
console.log(magentaBright(msg));
|
|
267821
|
+
console.log(magentaBright(maskTokens2(msg)));
|
|
267809
267822
|
console.log("");
|
|
267810
267823
|
};
|
|
267811
267824
|
var note = (message) => {
|
|
267812
267825
|
console.log("");
|
|
267813
|
-
console.log(message);
|
|
267826
|
+
console.log(maskTokens2(message));
|
|
267814
267827
|
};
|
|
267815
267828
|
var outro = (msg) => {
|
|
267816
267829
|
console.log("");
|
|
267817
|
-
console.log(inverse(greenBright(msg)));
|
|
267830
|
+
console.log(inverse(greenBright(maskTokens2(msg))));
|
|
267818
267831
|
console.log("");
|
|
267819
267832
|
};
|
|
267820
267833
|
var spinner = async (options) => {
|
|
@@ -269958,9 +269971,12 @@ import { dirname as dirname32, join as join22 } from "node:path";
|
|
|
269958
269971
|
import { stat as stat7 } from "node:fs/promises";
|
|
269959
269972
|
import { dirname as dirname22 } from "node:path";
|
|
269960
269973
|
var import_dotenvx4 = __toESM(require_main2(), 1);
|
|
269974
|
+
var maskTokens3 = (output) => {
|
|
269975
|
+
return output.replace(/sm_(pat|aat|sat)_[0-9a-zA-Z]+/g, "***");
|
|
269976
|
+
};
|
|
269961
269977
|
var cancel3 = (msg) => {
|
|
269962
269978
|
console.log("");
|
|
269963
|
-
console.log(inverse(redBright(msg)));
|
|
269979
|
+
console.log(inverse(redBright(maskTokens3(msg))));
|
|
269964
269980
|
console.log("");
|
|
269965
269981
|
process.exit(1);
|
|
269966
269982
|
};
|
|
@@ -273211,7 +273227,7 @@ async function workspacePrompt(env2, workspaces, accept) {
|
|
|
273211
273227
|
return defaultWorkspace;
|
|
273212
273228
|
}
|
|
273213
273229
|
if (workspaces.length === 0) {
|
|
273214
|
-
|
|
273230
|
+
cancel("No workspaces found");
|
|
273215
273231
|
}
|
|
273216
273232
|
const workspace = await esm_default2({
|
|
273217
273233
|
message: "Which workspace do you want to connect to?",
|
|
@@ -273222,7 +273238,7 @@ async function workspacePrompt(env2, workspaces, accept) {
|
|
|
273222
273238
|
default: defaultWorkspace
|
|
273223
273239
|
});
|
|
273224
273240
|
if (!workspace) {
|
|
273225
|
-
|
|
273241
|
+
cancel("No workspace selected");
|
|
273226
273242
|
}
|
|
273227
273243
|
return workspace;
|
|
273228
273244
|
}
|
|
@@ -273287,7 +273303,7 @@ function connectCommand() {
|
|
|
273287
273303
|
var package_default = {
|
|
273288
273304
|
name: "@settlemint/sdk-cli",
|
|
273289
273305
|
description: "SettleMint SDK, integrate SettleMint into your application with ease.",
|
|
273290
|
-
version: "0.8.
|
|
273306
|
+
version: "0.8.3-main386a8364",
|
|
273291
273307
|
type: "module",
|
|
273292
273308
|
private: false,
|
|
273293
273309
|
license: "FSL-1.1-MIT",
|
|
@@ -273338,8 +273354,8 @@ var package_default = {
|
|
|
273338
273354
|
"@inquirer/input": "4.1.1",
|
|
273339
273355
|
"@inquirer/password": "4.0.4",
|
|
273340
273356
|
"@inquirer/select": "4.0.4",
|
|
273341
|
-
"@settlemint/sdk-js": "0.8.
|
|
273342
|
-
"@settlemint/sdk-utils": "0.8.
|
|
273357
|
+
"@settlemint/sdk-js": "0.8.3-main386a8364",
|
|
273358
|
+
"@settlemint/sdk-utils": "0.8.3-main386a8364",
|
|
273343
273359
|
"get-tsconfig": "4.8.1",
|
|
273344
273360
|
giget: "1.2.3"
|
|
273345
273361
|
},
|
|
@@ -273377,13 +273393,13 @@ async function namePrompt(env2, argument) {
|
|
|
273377
273393
|
// src/commands/create/template.prompt.ts
|
|
273378
273394
|
async function templatePrompt(templates, argument) {
|
|
273379
273395
|
if (templates.length === 0) {
|
|
273380
|
-
|
|
273396
|
+
cancel("No templates found");
|
|
273381
273397
|
}
|
|
273382
273398
|
const defaultInstance = argument;
|
|
273383
273399
|
if (defaultInstance) {
|
|
273384
273400
|
const template2 = templates.find((template3) => template3.value === argument);
|
|
273385
273401
|
if (!template2) {
|
|
273386
|
-
|
|
273402
|
+
cancel(`No template found with name '${argument}'`);
|
|
273387
273403
|
}
|
|
273388
273404
|
return template2;
|
|
273389
273405
|
}
|
|
@@ -274250,37 +274266,46 @@ ${createExamples([
|
|
|
274250
274266
|
command: "login --token-stdin --accept-defaults",
|
|
274251
274267
|
commandPrefix: "cat ~/my_token.txt | "
|
|
274252
274268
|
}
|
|
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").action(async ({ acceptDefaults, default: isDefault, tokenStdin }) => {
|
|
274269
|
+
])}`).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").option("-i, --instance <instance>", "The instance to login to (defaults to the instance in the .env file)").action(async ({ acceptDefaults, default: isDefault, tokenStdin, instance }, cmd2) => {
|
|
274254
274270
|
intro("Login to your SettleMint account");
|
|
274271
|
+
const autoAccept = !!acceptDefaults || !!tokenStdin;
|
|
274255
274272
|
const env2 = await loadEnv2(false, false);
|
|
274256
|
-
const
|
|
274257
|
-
let personalAccessToken;
|
|
274273
|
+
const selectedInstance = instance ?? await instancePrompt(env2, autoAccept);
|
|
274274
|
+
let personalAccessToken = "";
|
|
274258
274275
|
if (tokenStdin) {
|
|
274259
|
-
|
|
274260
|
-
|
|
274261
|
-
chunks.push(Buffer.from(chunk));
|
|
274276
|
+
if (cmd2.args.length > 0) {
|
|
274277
|
+
cancel2("A token should be provided using STDIN, not as an argument");
|
|
274262
274278
|
}
|
|
274263
|
-
personalAccessToken =
|
|
274279
|
+
personalAccessToken = await Promise.race([
|
|
274280
|
+
(async () => {
|
|
274281
|
+
const chunks = [];
|
|
274282
|
+
for await (const chunk of process.stdin) {
|
|
274283
|
+
chunks.push(Buffer.from(chunk));
|
|
274284
|
+
}
|
|
274285
|
+
return Buffer.concat(chunks).toString().trim();
|
|
274286
|
+
})(),
|
|
274287
|
+
new Promise((resolve6) => setTimeout(() => resolve6(""), 1000))
|
|
274288
|
+
]);
|
|
274264
274289
|
try {
|
|
274265
274290
|
validate3(PersonalAccessTokenSchema3, personalAccessToken);
|
|
274266
274291
|
} catch {
|
|
274267
274292
|
cancel2("Invalid personal access token");
|
|
274268
274293
|
}
|
|
274269
274294
|
} else {
|
|
274270
|
-
personalAccessToken = await personalAccessTokenPrompt(env2,
|
|
274295
|
+
personalAccessToken = await personalAccessTokenPrompt(env2, selectedInstance, autoAccept);
|
|
274271
274296
|
}
|
|
274272
274297
|
const client = createSettleMintClient({
|
|
274273
|
-
instance,
|
|
274298
|
+
instance: selectedInstance,
|
|
274274
274299
|
accessToken: personalAccessToken
|
|
274275
274300
|
});
|
|
274276
274301
|
try {
|
|
274277
274302
|
await loginSpinner(client);
|
|
274278
274303
|
} catch (error5) {
|
|
274279
|
-
cancel2(`Invalid personal access token for instance ${
|
|
274304
|
+
cancel2(`Invalid personal access token for instance ${selectedInstance}`);
|
|
274280
274305
|
}
|
|
274281
|
-
await storeCredentials(personalAccessToken,
|
|
274306
|
+
await storeCredentials(personalAccessToken, selectedInstance);
|
|
274282
274307
|
if (isDefault) {
|
|
274283
|
-
await setDefaultInstance(
|
|
274308
|
+
await setDefaultInstance(selectedInstance);
|
|
274284
274309
|
}
|
|
274285
274310
|
outro("Successfully logged in to SettleMint!");
|
|
274286
274311
|
});
|
|
@@ -275155,7 +275180,7 @@ function smartContractPortalMiddlewareCreateCommand() {
|
|
|
275155
275180
|
parsedAbis.push(...parsedAbiResults);
|
|
275156
275181
|
} catch (err) {
|
|
275157
275182
|
const error5 = err;
|
|
275158
|
-
|
|
275183
|
+
cancel(`Failed to read or parse ABI file: ${error5.message}`);
|
|
275159
275184
|
}
|
|
275160
275185
|
}
|
|
275161
275186
|
const result = await settlemint.middleware.create({
|
|
@@ -275564,7 +275589,7 @@ ${createExamples([
|
|
|
275564
275589
|
const isDefaultUniqueName = uniqueName === "default";
|
|
275565
275590
|
const serviceUniqueName = isDefaultUniqueName ? typeof env2[envKey] === "string" ? env2[envKey] : null : uniqueName;
|
|
275566
275591
|
if (!serviceUniqueName) {
|
|
275567
|
-
|
|
275592
|
+
cancel(`No default ${type4} found in your .env file. Please provide a valid ${type4} unique name or set a default ${type4} first.`);
|
|
275568
275593
|
}
|
|
275569
275594
|
const result = await spinner({
|
|
275570
275595
|
startMessage: `Restarting ${type4}`,
|
|
@@ -275958,11 +275983,11 @@ var SMART_CONTRACT_SETS = SMART_CONTRACT_SET_DETAILS.map((set) => set.id);
|
|
|
275958
275983
|
// src/commands/smart-contract-set/prompts/use-case.prompt.ts
|
|
275959
275984
|
async function useCasePrompt(argument) {
|
|
275960
275985
|
if (SMART_CONTRACT_SETS.length === 0) {
|
|
275961
|
-
|
|
275986
|
+
cancel("No use cases found");
|
|
275962
275987
|
}
|
|
275963
275988
|
if (argument) {
|
|
275964
275989
|
if (!SMART_CONTRACT_SETS.includes(argument)) {
|
|
275965
|
-
|
|
275990
|
+
cancel(`No use case found with name '${argument}'`);
|
|
275966
275991
|
}
|
|
275967
275992
|
return argument;
|
|
275968
275993
|
}
|
|
@@ -276107,7 +276132,7 @@ async function addressPrompt({
|
|
|
276107
276132
|
return defaultAddress;
|
|
276108
276133
|
}
|
|
276109
276134
|
if (possiblePrivateKeys.length === 0) {
|
|
276110
|
-
|
|
276135
|
+
cancel("No private key is activated on the node to sign the transaction.");
|
|
276111
276136
|
}
|
|
276112
276137
|
const address = await esm_default2({
|
|
276113
276138
|
message: "Which private key do you want to deploy from?",
|
|
@@ -276607,7 +276632,7 @@ function subgraphDeployCommand() {
|
|
|
276607
276632
|
if (generated) {
|
|
276608
276633
|
const currentConfig = await getSubgraphConfig();
|
|
276609
276634
|
if (!currentConfig || currentConfig?.datasources.some((ds) => ds.address === "0x0000000000000000000000000000000000000000")) {
|
|
276610
|
-
|
|
276635
|
+
cancel2('The "subgraph/subgraph.config.json" config has not been set, ensure all the contracts listed have an address added');
|
|
276611
276636
|
}
|
|
276612
276637
|
}
|
|
276613
276638
|
const graphName = await subgraphNamePrompt2(subgraphName, env2, autoAccept, !!prod);
|
|
@@ -276683,4 +276708,4 @@ sdkcli.parseAsync(process.argv).catch((reason) => {
|
|
|
276683
276708
|
cancel2(reason);
|
|
276684
276709
|
});
|
|
276685
276710
|
|
|
276686
|
-
//# debugId=
|
|
276711
|
+
//# debugId=B9E970BEF462CC6F64756E2164756E21
|