@settlemint/sdk-cli 1.0.0-main0c394db9 → 1.0.0-maind552bede
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 +384 -1272
- package/dist/cli.js.map +13 -41
- package/package.json +5 -5
package/dist/cli.js
CHANGED
|
@@ -19613,7 +19613,7 @@ var require_lib4 = __commonJS((exports, module) => {
|
|
|
19613
19613
|
var rRel = new RegExp(`^\\.${rSlash.source}`);
|
|
19614
19614
|
var getNotFoundError = (cmd) => Object.assign(new Error(`not found: ${cmd}`), { code: "ENOENT" });
|
|
19615
19615
|
var getPathInfo = (cmd, {
|
|
19616
|
-
path: optPath = "/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/tmp/bunx-1001-turbo@latest/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/22.12.0/x64/bin:/home/runner/.bun/bin:/tmp/tmp.
|
|
19616
|
+
path: optPath = "/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/tmp/bunx-1001-turbo@latest/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/22.12.0/x64/bin:/home/runner/.bun/bin:/tmp/tmp.Q1ZfVcAqCa:/nsc/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/snap/bin/:/usr/games:/usr/local/games:/home/linuxbrew/.linuxbrew/bin:/home/runner/.config/composer/vendor/bin:/home/runner/.dotnet/tools:/home/runner/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin",
|
|
19617
19617
|
pathExt: optPathExt = process.env.PATHEXT,
|
|
19618
19618
|
delimiter: optDelimiter = delimiter
|
|
19619
19619
|
}) => {
|
|
@@ -19817,7 +19817,7 @@ var require_lib5 = __commonJS((exports, module) => {
|
|
|
19817
19817
|
let pathToInitial;
|
|
19818
19818
|
try {
|
|
19819
19819
|
pathToInitial = which.sync(initialCmd, {
|
|
19820
|
-
path: options.env && findInObject(options.env, "PATH") || "/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/tmp/bunx-1001-turbo@latest/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/22.12.0/x64/bin:/home/runner/.bun/bin:/tmp/tmp.
|
|
19820
|
+
path: options.env && findInObject(options.env, "PATH") || "/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/tmp/bunx-1001-turbo@latest/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/22.12.0/x64/bin:/home/runner/.bun/bin:/tmp/tmp.Q1ZfVcAqCa:/nsc/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/snap/bin/:/usr/games:/usr/local/games:/home/linuxbrew/.linuxbrew/bin:/home/runner/.config/composer/vendor/bin:/home/runner/.dotnet/tools:/home/runner/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin",
|
|
19821
19821
|
pathext: options.env && findInObject(options.env, "PATHEXT") || process.env.PATHEXT
|
|
19822
19822
|
}).toLowerCase();
|
|
19823
19823
|
} catch (err) {
|
|
@@ -20534,7 +20534,7 @@ var require_lib6 = __commonJS((exports, module) => {
|
|
|
20534
20534
|
var rRel = new RegExp(`^\\.${rSlash.source}`);
|
|
20535
20535
|
var getNotFoundError = (cmd) => Object.assign(new Error(`not found: ${cmd}`), { code: "ENOENT" });
|
|
20536
20536
|
var getPathInfo = (cmd, {
|
|
20537
|
-
path: optPath = "/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/tmp/bunx-1001-turbo@latest/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/22.12.0/x64/bin:/home/runner/.bun/bin:/tmp/tmp.
|
|
20537
|
+
path: optPath = "/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/tmp/bunx-1001-turbo@latest/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/22.12.0/x64/bin:/home/runner/.bun/bin:/tmp/tmp.Q1ZfVcAqCa:/nsc/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/snap/bin/:/usr/games:/usr/local/games:/home/linuxbrew/.linuxbrew/bin:/home/runner/.config/composer/vendor/bin:/home/runner/.dotnet/tools:/home/runner/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin",
|
|
20538
20538
|
pathExt: optPathExt = process.env.PATHEXT,
|
|
20539
20539
|
delimiter: optDelimiter = delimiter
|
|
20540
20540
|
}) => {
|
|
@@ -223327,7 +223327,7 @@ ${Bt.cyan(Yt)}
|
|
|
223327
223327
|
code: "ENOENT"
|
|
223328
223328
|
}), getPathInfo = (e9, t7) => {
|
|
223329
223329
|
var r6 = t7.colon || or;
|
|
223330
|
-
var i6 = e9.match(/\//) || nr && e9.match(/\\/) ? [""] : [...nr ? [process.cwd()] : [], ...(t7.path || "/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/tmp/bunx-1001-turbo@latest/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/22.12.0/x64/bin:/home/runner/.bun/bin:/tmp/tmp.
|
|
223330
|
+
var i6 = e9.match(/\//) || nr && e9.match(/\\/) ? [""] : [...nr ? [process.cwd()] : [], ...(t7.path || "/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/tmp/bunx-1001-turbo@latest/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/22.12.0/x64/bin:/home/runner/.bun/bin:/tmp/tmp.Q1ZfVcAqCa:/nsc/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/snap/bin/:/usr/games:/usr/local/games:/home/linuxbrew/.linuxbrew/bin:/home/runner/.config/composer/vendor/bin:/home/runner/.dotnet/tools:/home/runner/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin").split(r6)];
|
|
223331
223331
|
var n6 = nr ? t7.pathExt || process.env.PATHEXT || ".EXE;.CMD;.BAT;.COM" : "";
|
|
223332
223332
|
var a5 = nr ? n6.split(r6) : [""];
|
|
223333
223333
|
if (nr) {
|
|
@@ -226464,7 +226464,7 @@ ${whileRunning(e9)}`;
|
|
|
226464
226464
|
};
|
|
226465
226465
|
ni = Object.assign(async function _main() {
|
|
226466
226466
|
var e9 = new Cli({
|
|
226467
|
-
binaryVersion: "1.0.0-
|
|
226467
|
+
binaryVersion: "1.0.0-maind552bede",
|
|
226468
226468
|
binaryLabel: "gql.tada CLI",
|
|
226469
226469
|
binaryName: "gql.tada"
|
|
226470
226470
|
});
|
|
@@ -233757,8 +233757,8 @@ var require_mkdir = __commonJS((exports, module) => {
|
|
|
233757
233757
|
return "CwdError";
|
|
233758
233758
|
}
|
|
233759
233759
|
}
|
|
233760
|
-
var cGet = (cache,
|
|
233761
|
-
var cSet = (cache,
|
|
233760
|
+
var cGet = (cache, key2) => cache.get(normPath(key2));
|
|
233761
|
+
var cSet = (cache, key2, val) => cache.set(normPath(key2), val);
|
|
233762
233762
|
var checkCwd = (dir, cb) => {
|
|
233763
233763
|
fs3.stat(dir, (er2, st2) => {
|
|
233764
233764
|
if (er2 || !st2.isDirectory()) {
|
|
@@ -234129,8 +234129,8 @@ var require_unpack = __commonJS((exports, module) => {
|
|
|
234129
234129
|
}
|
|
234130
234130
|
};
|
|
234131
234131
|
var dropCache = (cache) => {
|
|
234132
|
-
for (const
|
|
234133
|
-
cache.delete(
|
|
234132
|
+
for (const key2 of cache.keys()) {
|
|
234133
|
+
cache.delete(key2);
|
|
234134
234134
|
}
|
|
234135
234135
|
};
|
|
234136
234136
|
|
|
@@ -234964,7 +234964,7 @@ var require_which2 = __commonJS((exports, module) => {
|
|
|
234964
234964
|
const colon = opt2.colon || COLON;
|
|
234965
234965
|
const pathEnv = cmd2.match(/\//) || isWindows2 && cmd2.match(/\\/) ? [""] : [
|
|
234966
234966
|
...isWindows2 ? [process.cwd()] : [],
|
|
234967
|
-
...(opt2.path || "/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/tmp/bunx-1001-turbo@latest/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/22.12.0/x64/bin:/home/runner/.bun/bin:/tmp/tmp.
|
|
234967
|
+
...(opt2.path || "/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/tmp/bunx-1001-turbo@latest/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/22.12.0/x64/bin:/home/runner/.bun/bin:/tmp/tmp.Q1ZfVcAqCa:/nsc/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/snap/bin/:/usr/games:/usr/local/games:/home/linuxbrew/.linuxbrew/bin:/home/runner/.config/composer/vendor/bin:/home/runner/.dotnet/tools:/home/runner/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin").split(colon)
|
|
234968
234968
|
];
|
|
234969
234969
|
const pathExtExe = isWindows2 ? opt2.pathExt || process.env.PATHEXT || ".EXE;.CMD;.BAT;.COM" : "";
|
|
234970
234970
|
const pathExt = isWindows2 ? pathExtExe.split(colon) : [""];
|
|
@@ -235053,7 +235053,7 @@ var require_path_key = __commonJS((exports, module) => {
|
|
|
235053
235053
|
if (platform2 !== "win32") {
|
|
235054
235054
|
return "PATH";
|
|
235055
235055
|
}
|
|
235056
|
-
return Object.keys(environment).reverse().find((
|
|
235056
|
+
return Object.keys(environment).reverse().find((key2) => key2.toUpperCase() === "PATH") || "Path";
|
|
235057
235057
|
};
|
|
235058
235058
|
module.exports = pathKey2;
|
|
235059
235059
|
module.exports.default = pathKey2;
|
|
@@ -235315,7 +235315,7 @@ function pathKey2(options = {}) {
|
|
|
235315
235315
|
if (platform2 !== "win32") {
|
|
235316
235316
|
return "PATH";
|
|
235317
235317
|
}
|
|
235318
|
-
return Object.keys(env2).reverse().find((
|
|
235318
|
+
return Object.keys(env2).reverse().find((key2) => key2.toUpperCase() === "PATH") || "Path";
|
|
235319
235319
|
}
|
|
235320
235320
|
|
|
235321
235321
|
// ../../node_modules/nypm/node_modules/execa/node_modules/npm-run-path/index.js
|
|
@@ -240752,8 +240752,8 @@ var require_lib14 = __commonJS((exports, module) => {
|
|
|
240752
240752
|
function fetch2(input, options) {
|
|
240753
240753
|
return nodeFetch.fetch(input, options);
|
|
240754
240754
|
}
|
|
240755
|
-
for (const
|
|
240756
|
-
fetch2[
|
|
240755
|
+
for (const key2 in nodeFetch) {
|
|
240756
|
+
fetch2[key2] = nodeFetch[key2];
|
|
240757
240757
|
}
|
|
240758
240758
|
module.exports = fetch2;
|
|
240759
240759
|
});
|
|
@@ -245304,11 +245304,11 @@ ${f6.toString(16)}\r
|
|
|
245304
245304
|
}
|
|
245305
245305
|
Q4(upgrade, "upgrade");
|
|
245306
245306
|
var apiUpgrade = upgrade;
|
|
245307
|
-
var { AsyncResource:
|
|
245307
|
+
var { AsyncResource: AsyncResource4 } = require$$4__default$2;
|
|
245308
245308
|
var { InvalidArgumentError: InvalidArgumentError$5, RequestAbortedError, SocketError } = errors$1;
|
|
245309
245309
|
var util$6 = util$m;
|
|
245310
245310
|
var { addSignal, removeSignal } = abortSignal;
|
|
245311
|
-
var Jt2 = class Jt3 extends
|
|
245311
|
+
var Jt2 = class Jt3 extends AsyncResource4 {
|
|
245312
245312
|
constructor(A5, t8) {
|
|
245313
245313
|
if (!A5 || typeof A5 != "object")
|
|
245314
245314
|
throw new InvalidArgumentError$5("invalid opts");
|
|
@@ -248638,9 +248638,9 @@ ${F4}`;
|
|
|
248638
248638
|
var Dispatcher = dispatcher;
|
|
248639
248639
|
var Agent = agent;
|
|
248640
248640
|
var ProxyAgent = proxyAgent;
|
|
248641
|
-
var
|
|
248641
|
+
var errors2 = errors$1;
|
|
248642
248642
|
var util2 = util$m;
|
|
248643
|
-
var { InvalidArgumentError: InvalidArgumentError2 } =
|
|
248643
|
+
var { InvalidArgumentError: InvalidArgumentError2 } = errors2;
|
|
248644
248644
|
var api = api$1;
|
|
248645
248645
|
var { getGlobalDispatcher, setGlobalDispatcher } = global3;
|
|
248646
248646
|
Object.assign(Dispatcher.prototype, api);
|
|
@@ -249546,11 +249546,11 @@ var require_visit = __commonJS((exports) => {
|
|
|
249546
249546
|
visit2.BREAK = BREAK;
|
|
249547
249547
|
visit2.SKIP = SKIP;
|
|
249548
249548
|
visit2.REMOVE = REMOVE;
|
|
249549
|
-
function visit_(
|
|
249550
|
-
const ctrl = callVisitor(
|
|
249549
|
+
function visit_(key2, node, visitor, path8) {
|
|
249550
|
+
const ctrl = callVisitor(key2, node, visitor, path8);
|
|
249551
249551
|
if (identity3.isNode(ctrl) || identity3.isPair(ctrl)) {
|
|
249552
|
-
replaceNode(
|
|
249553
|
-
return visit_(
|
|
249552
|
+
replaceNode(key2, path8, ctrl);
|
|
249553
|
+
return visit_(key2, ctrl, visitor, path8);
|
|
249554
249554
|
}
|
|
249555
249555
|
if (typeof ctrl !== "symbol") {
|
|
249556
249556
|
if (identity3.isCollection(node)) {
|
|
@@ -249594,11 +249594,11 @@ var require_visit = __commonJS((exports) => {
|
|
|
249594
249594
|
visitAsync.BREAK = BREAK;
|
|
249595
249595
|
visitAsync.SKIP = SKIP;
|
|
249596
249596
|
visitAsync.REMOVE = REMOVE;
|
|
249597
|
-
async function visitAsync_(
|
|
249598
|
-
const ctrl = await callVisitor(
|
|
249597
|
+
async function visitAsync_(key2, node, visitor, path8) {
|
|
249598
|
+
const ctrl = await callVisitor(key2, node, visitor, path8);
|
|
249599
249599
|
if (identity3.isNode(ctrl) || identity3.isPair(ctrl)) {
|
|
249600
|
-
replaceNode(
|
|
249601
|
-
return visitAsync_(
|
|
249600
|
+
replaceNode(key2, path8, ctrl);
|
|
249601
|
+
return visitAsync_(key2, ctrl, visitor, path8);
|
|
249602
249602
|
}
|
|
249603
249603
|
if (typeof ctrl !== "symbol") {
|
|
249604
249604
|
if (identity3.isCollection(node)) {
|
|
@@ -249648,27 +249648,27 @@ var require_visit = __commonJS((exports) => {
|
|
|
249648
249648
|
}
|
|
249649
249649
|
return visitor;
|
|
249650
249650
|
}
|
|
249651
|
-
function callVisitor(
|
|
249651
|
+
function callVisitor(key2, node, visitor, path8) {
|
|
249652
249652
|
if (typeof visitor === "function")
|
|
249653
|
-
return visitor(
|
|
249653
|
+
return visitor(key2, node, path8);
|
|
249654
249654
|
if (identity3.isMap(node))
|
|
249655
|
-
return visitor.Map?.(
|
|
249655
|
+
return visitor.Map?.(key2, node, path8);
|
|
249656
249656
|
if (identity3.isSeq(node))
|
|
249657
|
-
return visitor.Seq?.(
|
|
249657
|
+
return visitor.Seq?.(key2, node, path8);
|
|
249658
249658
|
if (identity3.isPair(node))
|
|
249659
|
-
return visitor.Pair?.(
|
|
249659
|
+
return visitor.Pair?.(key2, node, path8);
|
|
249660
249660
|
if (identity3.isScalar(node))
|
|
249661
|
-
return visitor.Scalar?.(
|
|
249661
|
+
return visitor.Scalar?.(key2, node, path8);
|
|
249662
249662
|
if (identity3.isAlias(node))
|
|
249663
|
-
return visitor.Alias?.(
|
|
249663
|
+
return visitor.Alias?.(key2, node, path8);
|
|
249664
249664
|
return;
|
|
249665
249665
|
}
|
|
249666
|
-
function replaceNode(
|
|
249666
|
+
function replaceNode(key2, path8, node) {
|
|
249667
249667
|
const parent = path8[path8.length - 1];
|
|
249668
249668
|
if (identity3.isCollection(parent)) {
|
|
249669
|
-
parent.items[
|
|
249669
|
+
parent.items[key2] = node;
|
|
249670
249670
|
} else if (identity3.isPair(parent)) {
|
|
249671
|
-
if (
|
|
249671
|
+
if (key2 === "key")
|
|
249672
249672
|
parent.key = node;
|
|
249673
249673
|
else
|
|
249674
249674
|
parent.value = node;
|
|
@@ -249900,7 +249900,7 @@ var require_anchors = __commonJS((exports) => {
|
|
|
249900
249900
|
|
|
249901
249901
|
// ../../node_modules/yaml/dist/doc/applyReviver.js
|
|
249902
249902
|
var require_applyReviver = __commonJS((exports) => {
|
|
249903
|
-
function applyReviver(reviver, obj,
|
|
249903
|
+
function applyReviver(reviver, obj, key2, val) {
|
|
249904
249904
|
if (val && typeof val === "object") {
|
|
249905
249905
|
if (Array.isArray(val)) {
|
|
249906
249906
|
for (let i6 = 0, len = val.length;i6 < len; ++i6) {
|
|
@@ -249940,7 +249940,7 @@ var require_applyReviver = __commonJS((exports) => {
|
|
|
249940
249940
|
}
|
|
249941
249941
|
}
|
|
249942
249942
|
}
|
|
249943
|
-
return reviver.call(obj,
|
|
249943
|
+
return reviver.call(obj, key2, val);
|
|
249944
249944
|
}
|
|
249945
249945
|
exports.applyReviver = applyReviver;
|
|
249946
249946
|
});
|
|
@@ -250258,29 +250258,29 @@ var require_Collection = __commonJS((exports) => {
|
|
|
250258
250258
|
if (isEmptyPath(path8))
|
|
250259
250259
|
this.add(value4);
|
|
250260
250260
|
else {
|
|
250261
|
-
const [
|
|
250262
|
-
const node = this.get(
|
|
250261
|
+
const [key2, ...rest] = path8;
|
|
250262
|
+
const node = this.get(key2, true);
|
|
250263
250263
|
if (identity3.isCollection(node))
|
|
250264
250264
|
node.addIn(rest, value4);
|
|
250265
250265
|
else if (node === undefined && this.schema)
|
|
250266
|
-
this.set(
|
|
250266
|
+
this.set(key2, collectionFromPath(this.schema, rest, value4));
|
|
250267
250267
|
else
|
|
250268
|
-
throw new Error(`Expected YAML collection at ${
|
|
250268
|
+
throw new Error(`Expected YAML collection at ${key2}. Remaining path: ${rest}`);
|
|
250269
250269
|
}
|
|
250270
250270
|
}
|
|
250271
250271
|
deleteIn(path8) {
|
|
250272
|
-
const [
|
|
250272
|
+
const [key2, ...rest] = path8;
|
|
250273
250273
|
if (rest.length === 0)
|
|
250274
|
-
return this.delete(
|
|
250275
|
-
const node = this.get(
|
|
250274
|
+
return this.delete(key2);
|
|
250275
|
+
const node = this.get(key2, true);
|
|
250276
250276
|
if (identity3.isCollection(node))
|
|
250277
250277
|
return node.deleteIn(rest);
|
|
250278
250278
|
else
|
|
250279
|
-
throw new Error(`Expected YAML collection at ${
|
|
250279
|
+
throw new Error(`Expected YAML collection at ${key2}. Remaining path: ${rest}`);
|
|
250280
250280
|
}
|
|
250281
250281
|
getIn(path8, keepScalar) {
|
|
250282
|
-
const [
|
|
250283
|
-
const node = this.get(
|
|
250282
|
+
const [key2, ...rest] = path8;
|
|
250283
|
+
const node = this.get(key2, true);
|
|
250284
250284
|
if (rest.length === 0)
|
|
250285
250285
|
return !keepScalar && identity3.isScalar(node) ? node.value : node;
|
|
250286
250286
|
else
|
|
@@ -250295,24 +250295,24 @@ var require_Collection = __commonJS((exports) => {
|
|
|
250295
250295
|
});
|
|
250296
250296
|
}
|
|
250297
250297
|
hasIn(path8) {
|
|
250298
|
-
const [
|
|
250298
|
+
const [key2, ...rest] = path8;
|
|
250299
250299
|
if (rest.length === 0)
|
|
250300
|
-
return this.has(
|
|
250301
|
-
const node = this.get(
|
|
250300
|
+
return this.has(key2);
|
|
250301
|
+
const node = this.get(key2, true);
|
|
250302
250302
|
return identity3.isCollection(node) ? node.hasIn(rest) : false;
|
|
250303
250303
|
}
|
|
250304
250304
|
setIn(path8, value4) {
|
|
250305
|
-
const [
|
|
250305
|
+
const [key2, ...rest] = path8;
|
|
250306
250306
|
if (rest.length === 0) {
|
|
250307
|
-
this.set(
|
|
250307
|
+
this.set(key2, value4);
|
|
250308
250308
|
} else {
|
|
250309
|
-
const node = this.get(
|
|
250309
|
+
const node = this.get(key2, true);
|
|
250310
250310
|
if (identity3.isCollection(node))
|
|
250311
250311
|
node.setIn(rest, value4);
|
|
250312
250312
|
else if (node === undefined && this.schema)
|
|
250313
|
-
this.set(
|
|
250313
|
+
this.set(key2, collectionFromPath(this.schema, rest, value4));
|
|
250314
250314
|
else
|
|
250315
|
-
throw new Error(`Expected YAML collection at ${
|
|
250315
|
+
throw new Error(`Expected YAML collection at ${key2}. Remaining path: ${rest}`);
|
|
250316
250316
|
}
|
|
250317
250317
|
}
|
|
250318
250318
|
}
|
|
@@ -250900,19 +250900,19 @@ var require_stringifyPair = __commonJS((exports) => {
|
|
|
250900
250900
|
var Scalar = require_Scalar();
|
|
250901
250901
|
var stringify3 = require_stringify();
|
|
250902
250902
|
var stringifyComment = require_stringifyComment();
|
|
250903
|
-
function stringifyPair2({ key:
|
|
250903
|
+
function stringifyPair2({ key: key2, value: value4 }, ctx, onComment, onChompKeep) {
|
|
250904
250904
|
const { allNullValues, doc, indent: indent2, indentStep, options: { commentString, indentSeq, simpleKeys } } = ctx;
|
|
250905
|
-
let keyComment = identity3.isNode(
|
|
250905
|
+
let keyComment = identity3.isNode(key2) && key2.comment || null;
|
|
250906
250906
|
if (simpleKeys) {
|
|
250907
250907
|
if (keyComment) {
|
|
250908
250908
|
throw new Error("With simple keys, key nodes cannot have comments");
|
|
250909
250909
|
}
|
|
250910
|
-
if (identity3.isCollection(
|
|
250910
|
+
if (identity3.isCollection(key2) || !identity3.isNode(key2) && typeof key2 === "object") {
|
|
250911
250911
|
const msg = "With simple keys, collection cannot be used as a key value";
|
|
250912
250912
|
throw new Error(msg);
|
|
250913
250913
|
}
|
|
250914
250914
|
}
|
|
250915
|
-
let explicitKey = !simpleKeys && (!
|
|
250915
|
+
let explicitKey = !simpleKeys && (!key2 || keyComment && value4 == null && !ctx.inFlow || identity3.isCollection(key2) || (identity3.isScalar(key2) ? key2.type === Scalar.Scalar.BLOCK_FOLDED || key2.type === Scalar.Scalar.BLOCK_LITERAL : typeof key2 === "object"));
|
|
250916
250916
|
ctx = Object.assign({}, ctx, {
|
|
250917
250917
|
allNullValues: false,
|
|
250918
250918
|
implicitKey: !explicitKey && (simpleKeys || !allNullValues),
|
|
@@ -250920,7 +250920,7 @@ var require_stringifyPair = __commonJS((exports) => {
|
|
|
250920
250920
|
});
|
|
250921
250921
|
let keyCommentDone = false;
|
|
250922
250922
|
let chompKeep = false;
|
|
250923
|
-
let str = stringify3.stringify(
|
|
250923
|
+
let str = stringify3.stringify(key2, ctx, () => keyCommentDone = true, () => chompKeep = true);
|
|
250924
250924
|
if (!explicitKey && !ctx.inFlow && str.length > 1024) {
|
|
250925
250925
|
if (simpleKeys)
|
|
250926
250926
|
throw new Error("With simple keys, single line scalar must not span more than 1024 characters");
|
|
@@ -251064,7 +251064,7 @@ var require_merge = __commonJS((exports) => {
|
|
|
251064
251064
|
}),
|
|
251065
251065
|
stringify: () => MERGE_KEY
|
|
251066
251066
|
};
|
|
251067
|
-
var isMergeKey = (ctx,
|
|
251067
|
+
var isMergeKey = (ctx, key2) => (merge3.identify(key2) || identity3.isScalar(key2) && (!key2.type || key2.type === Scalar.Scalar.PLAIN) && merge3.identify(key2.value)) && ctx?.doc.schema.tags.some((tag) => tag.tag === merge3.tag && tag.default);
|
|
251068
251068
|
function addMergeToJSMap(ctx, map3, value4) {
|
|
251069
251069
|
value4 = ctx && identity3.isAlias(value4) ? value4.resolve(ctx.doc) : value4;
|
|
251070
251070
|
if (identity3.isSeq(value4))
|
|
@@ -251081,14 +251081,14 @@ var require_merge = __commonJS((exports) => {
|
|
|
251081
251081
|
if (!identity3.isMap(source))
|
|
251082
251082
|
throw new Error("Merge sources must be maps or map aliases");
|
|
251083
251083
|
const srcMap = source.toJSON(null, ctx, Map);
|
|
251084
|
-
for (const [
|
|
251084
|
+
for (const [key2, value5] of srcMap) {
|
|
251085
251085
|
if (map3 instanceof Map) {
|
|
251086
|
-
if (!map3.has(
|
|
251087
|
-
map3.set(
|
|
251086
|
+
if (!map3.has(key2))
|
|
251087
|
+
map3.set(key2, value5);
|
|
251088
251088
|
} else if (map3 instanceof Set) {
|
|
251089
|
-
map3.add(
|
|
251090
|
-
} else if (!Object.prototype.hasOwnProperty.call(map3,
|
|
251091
|
-
Object.defineProperty(map3,
|
|
251089
|
+
map3.add(key2);
|
|
251090
|
+
} else if (!Object.prototype.hasOwnProperty.call(map3, key2)) {
|
|
251091
|
+
Object.defineProperty(map3, key2, {
|
|
251092
251092
|
value: value5,
|
|
251093
251093
|
writable: true,
|
|
251094
251094
|
enumerable: true,
|
|
@@ -251110,19 +251110,19 @@ var require_addPairToJSMap = __commonJS((exports) => {
|
|
|
251110
251110
|
var stringify3 = require_stringify();
|
|
251111
251111
|
var identity3 = require_identity();
|
|
251112
251112
|
var toJS = require_toJS();
|
|
251113
|
-
function addPairToJSMap(ctx, map3, { key:
|
|
251114
|
-
if (identity3.isNode(
|
|
251115
|
-
|
|
251116
|
-
else if (merge3.isMergeKey(ctx,
|
|
251113
|
+
function addPairToJSMap(ctx, map3, { key: key2, value: value4 }) {
|
|
251114
|
+
if (identity3.isNode(key2) && key2.addToJSMap)
|
|
251115
|
+
key2.addToJSMap(ctx, map3, value4);
|
|
251116
|
+
else if (merge3.isMergeKey(ctx, key2))
|
|
251117
251117
|
merge3.addMergeToJSMap(ctx, map3, value4);
|
|
251118
251118
|
else {
|
|
251119
|
-
const jsKey = toJS.toJS(
|
|
251119
|
+
const jsKey = toJS.toJS(key2, "", ctx);
|
|
251120
251120
|
if (map3 instanceof Map) {
|
|
251121
251121
|
map3.set(jsKey, toJS.toJS(value4, jsKey, ctx));
|
|
251122
251122
|
} else if (map3 instanceof Set) {
|
|
251123
251123
|
map3.add(jsKey);
|
|
251124
251124
|
} else {
|
|
251125
|
-
const stringKey = stringifyKey(
|
|
251125
|
+
const stringKey = stringifyKey(key2, jsKey, ctx);
|
|
251126
251126
|
const jsValue = toJS.toJS(value4, stringKey, ctx);
|
|
251127
251127
|
if (stringKey in map3)
|
|
251128
251128
|
Object.defineProperty(map3, stringKey, {
|
|
@@ -251137,19 +251137,19 @@ var require_addPairToJSMap = __commonJS((exports) => {
|
|
|
251137
251137
|
}
|
|
251138
251138
|
return map3;
|
|
251139
251139
|
}
|
|
251140
|
-
function stringifyKey(
|
|
251140
|
+
function stringifyKey(key2, jsKey, ctx) {
|
|
251141
251141
|
if (jsKey === null)
|
|
251142
251142
|
return "";
|
|
251143
251143
|
if (typeof jsKey !== "object")
|
|
251144
251144
|
return String(jsKey);
|
|
251145
|
-
if (identity3.isNode(
|
|
251145
|
+
if (identity3.isNode(key2) && ctx?.doc) {
|
|
251146
251146
|
const strCtx = stringify3.createStringifyContext(ctx.doc, {});
|
|
251147
251147
|
strCtx.anchors = new Set;
|
|
251148
251148
|
for (const node of ctx.anchors.keys())
|
|
251149
251149
|
strCtx.anchors.add(node.anchor);
|
|
251150
251150
|
strCtx.inFlow = true;
|
|
251151
251151
|
strCtx.inStringifyKey = true;
|
|
251152
|
-
const strKey =
|
|
251152
|
+
const strKey = key2.toString(strCtx);
|
|
251153
251153
|
if (!ctx.mapKeyWarned) {
|
|
251154
251154
|
let jsonStr = JSON.stringify(strKey);
|
|
251155
251155
|
if (jsonStr.length > 40)
|
|
@@ -251170,25 +251170,25 @@ var require_Pair = __commonJS((exports) => {
|
|
|
251170
251170
|
var stringifyPair2 = require_stringifyPair();
|
|
251171
251171
|
var addPairToJSMap = require_addPairToJSMap();
|
|
251172
251172
|
var identity3 = require_identity();
|
|
251173
|
-
function createPair(
|
|
251174
|
-
const k5 = createNode.createNode(
|
|
251173
|
+
function createPair(key2, value4, ctx) {
|
|
251174
|
+
const k5 = createNode.createNode(key2, undefined, ctx);
|
|
251175
251175
|
const v7 = createNode.createNode(value4, undefined, ctx);
|
|
251176
251176
|
return new Pair(k5, v7);
|
|
251177
251177
|
}
|
|
251178
251178
|
|
|
251179
251179
|
class Pair {
|
|
251180
|
-
constructor(
|
|
251180
|
+
constructor(key2, value4 = null) {
|
|
251181
251181
|
Object.defineProperty(this, identity3.NODE_TYPE, { value: identity3.PAIR });
|
|
251182
|
-
this.key =
|
|
251182
|
+
this.key = key2;
|
|
251183
251183
|
this.value = value4;
|
|
251184
251184
|
}
|
|
251185
251185
|
clone(schema) {
|
|
251186
|
-
let { key:
|
|
251187
|
-
if (identity3.isNode(
|
|
251188
|
-
|
|
251186
|
+
let { key: key2, value: value4 } = this;
|
|
251187
|
+
if (identity3.isNode(key2))
|
|
251188
|
+
key2 = key2.clone(schema);
|
|
251189
251189
|
if (identity3.isNode(value4))
|
|
251190
251190
|
value4 = value4.clone(schema);
|
|
251191
|
-
return new Pair(
|
|
251191
|
+
return new Pair(key2, value4);
|
|
251192
251192
|
}
|
|
251193
251193
|
toJSON(_5, ctx) {
|
|
251194
251194
|
const pair = ctx?.mapAsMap ? new Map : {};
|
|
@@ -251355,11 +251355,11 @@ var require_YAMLMap = __commonJS((exports) => {
|
|
|
251355
251355
|
var identity3 = require_identity();
|
|
251356
251356
|
var Pair = require_Pair();
|
|
251357
251357
|
var Scalar = require_Scalar();
|
|
251358
|
-
function findPair(items,
|
|
251359
|
-
const k5 = identity3.isScalar(
|
|
251358
|
+
function findPair(items, key2) {
|
|
251359
|
+
const k5 = identity3.isScalar(key2) ? key2.value : key2;
|
|
251360
251360
|
for (const it2 of items) {
|
|
251361
251361
|
if (identity3.isPair(it2)) {
|
|
251362
|
-
if (it2.key ===
|
|
251362
|
+
if (it2.key === key2 || it2.key === k5)
|
|
251363
251363
|
return it2;
|
|
251364
251364
|
if (identity3.isScalar(it2.key) && it2.key.value === k5)
|
|
251365
251365
|
return it2;
|
|
@@ -251379,20 +251379,20 @@ var require_YAMLMap = __commonJS((exports) => {
|
|
|
251379
251379
|
static from(schema, obj, ctx) {
|
|
251380
251380
|
const { keepUndefined, replacer } = ctx;
|
|
251381
251381
|
const map3 = new this(schema);
|
|
251382
|
-
const add = (
|
|
251382
|
+
const add = (key2, value4) => {
|
|
251383
251383
|
if (typeof replacer === "function")
|
|
251384
|
-
value4 = replacer.call(obj,
|
|
251385
|
-
else if (Array.isArray(replacer) && !replacer.includes(
|
|
251384
|
+
value4 = replacer.call(obj, key2, value4);
|
|
251385
|
+
else if (Array.isArray(replacer) && !replacer.includes(key2))
|
|
251386
251386
|
return;
|
|
251387
251387
|
if (value4 !== undefined || keepUndefined)
|
|
251388
|
-
map3.items.push(Pair.createPair(
|
|
251388
|
+
map3.items.push(Pair.createPair(key2, value4, ctx));
|
|
251389
251389
|
};
|
|
251390
251390
|
if (obj instanceof Map) {
|
|
251391
|
-
for (const [
|
|
251392
|
-
add(
|
|
251391
|
+
for (const [key2, value4] of obj)
|
|
251392
|
+
add(key2, value4);
|
|
251393
251393
|
} else if (obj && typeof obj === "object") {
|
|
251394
|
-
for (const
|
|
251395
|
-
add(
|
|
251394
|
+
for (const key2 of Object.keys(obj))
|
|
251395
|
+
add(key2, obj[key2]);
|
|
251396
251396
|
}
|
|
251397
251397
|
if (typeof schema.sortMapEntries === "function") {
|
|
251398
251398
|
map3.items.sort(schema.sortMapEntries);
|
|
@@ -251426,23 +251426,23 @@ var require_YAMLMap = __commonJS((exports) => {
|
|
|
251426
251426
|
this.items.push(_pair);
|
|
251427
251427
|
}
|
|
251428
251428
|
}
|
|
251429
|
-
delete(
|
|
251430
|
-
const it2 = findPair(this.items,
|
|
251429
|
+
delete(key2) {
|
|
251430
|
+
const it2 = findPair(this.items, key2);
|
|
251431
251431
|
if (!it2)
|
|
251432
251432
|
return false;
|
|
251433
251433
|
const del = this.items.splice(this.items.indexOf(it2), 1);
|
|
251434
251434
|
return del.length > 0;
|
|
251435
251435
|
}
|
|
251436
|
-
get(
|
|
251437
|
-
const it2 = findPair(this.items,
|
|
251436
|
+
get(key2, keepScalar) {
|
|
251437
|
+
const it2 = findPair(this.items, key2);
|
|
251438
251438
|
const node = it2?.value;
|
|
251439
251439
|
return (!keepScalar && identity3.isScalar(node) ? node.value : node) ?? undefined;
|
|
251440
251440
|
}
|
|
251441
|
-
has(
|
|
251442
|
-
return !!findPair(this.items,
|
|
251441
|
+
has(key2) {
|
|
251442
|
+
return !!findPair(this.items, key2);
|
|
251443
251443
|
}
|
|
251444
|
-
set(
|
|
251445
|
-
this.add(new Pair.Pair(
|
|
251444
|
+
set(key2, value4) {
|
|
251445
|
+
this.add(new Pair.Pair(key2, value4), true);
|
|
251446
251446
|
}
|
|
251447
251447
|
toJSON(_5, ctx, Type) {
|
|
251448
251448
|
const map3 = Type ? new Type : ctx?.mapAsMap ? new Map : {};
|
|
@@ -251513,28 +251513,28 @@ var require_YAMLSeq = __commonJS((exports) => {
|
|
|
251513
251513
|
add(value4) {
|
|
251514
251514
|
this.items.push(value4);
|
|
251515
251515
|
}
|
|
251516
|
-
delete(
|
|
251517
|
-
const idx = asItemIndex(
|
|
251516
|
+
delete(key2) {
|
|
251517
|
+
const idx = asItemIndex(key2);
|
|
251518
251518
|
if (typeof idx !== "number")
|
|
251519
251519
|
return false;
|
|
251520
251520
|
const del = this.items.splice(idx, 1);
|
|
251521
251521
|
return del.length > 0;
|
|
251522
251522
|
}
|
|
251523
|
-
get(
|
|
251524
|
-
const idx = asItemIndex(
|
|
251523
|
+
get(key2, keepScalar) {
|
|
251524
|
+
const idx = asItemIndex(key2);
|
|
251525
251525
|
if (typeof idx !== "number")
|
|
251526
251526
|
return;
|
|
251527
251527
|
const it2 = this.items[idx];
|
|
251528
251528
|
return !keepScalar && identity3.isScalar(it2) ? it2.value : it2;
|
|
251529
251529
|
}
|
|
251530
|
-
has(
|
|
251531
|
-
const idx = asItemIndex(
|
|
251530
|
+
has(key2) {
|
|
251531
|
+
const idx = asItemIndex(key2);
|
|
251532
251532
|
return typeof idx === "number" && idx < this.items.length;
|
|
251533
251533
|
}
|
|
251534
|
-
set(
|
|
251535
|
-
const idx = asItemIndex(
|
|
251534
|
+
set(key2, value4) {
|
|
251535
|
+
const idx = asItemIndex(key2);
|
|
251536
251536
|
if (typeof idx !== "number")
|
|
251537
|
-
throw new Error(`Expected a valid index, not ${
|
|
251537
|
+
throw new Error(`Expected a valid index, not ${key2}.`);
|
|
251538
251538
|
const prev = this.items[idx];
|
|
251539
251539
|
if (identity3.isScalar(prev) && Scalar.isScalarValue(value4))
|
|
251540
251540
|
prev.value = value4;
|
|
@@ -251568,8 +251568,8 @@ var require_YAMLSeq = __commonJS((exports) => {
|
|
|
251568
251568
|
let i6 = 0;
|
|
251569
251569
|
for (let it2 of obj) {
|
|
251570
251570
|
if (typeof replacer === "function") {
|
|
251571
|
-
const
|
|
251572
|
-
it2 = replacer.call(obj,
|
|
251571
|
+
const key2 = obj instanceof Set ? it2 : String(i6++);
|
|
251572
|
+
it2 = replacer.call(obj, key2, it2);
|
|
251573
251573
|
}
|
|
251574
251574
|
seq.items.push(createNode.createNode(it2, undefined, ctx));
|
|
251575
251575
|
}
|
|
@@ -251577,8 +251577,8 @@ var require_YAMLSeq = __commonJS((exports) => {
|
|
|
251577
251577
|
return seq;
|
|
251578
251578
|
}
|
|
251579
251579
|
}
|
|
251580
|
-
function asItemIndex(
|
|
251581
|
-
let idx = identity3.isScalar(
|
|
251580
|
+
function asItemIndex(key2) {
|
|
251581
|
+
let idx = identity3.isScalar(key2) ? key2.value : key2;
|
|
251582
251582
|
if (idx && typeof idx === "string")
|
|
251583
251583
|
idx = Number(idx);
|
|
251584
251584
|
return typeof idx === "number" && Number.isInteger(idx) && idx >= 0 ? idx : null;
|
|
@@ -251950,25 +251950,25 @@ ${cn.comment}` : item.comment;
|
|
|
251950
251950
|
for (let it2 of iterable) {
|
|
251951
251951
|
if (typeof replacer === "function")
|
|
251952
251952
|
it2 = replacer.call(iterable, String(i6++), it2);
|
|
251953
|
-
let
|
|
251953
|
+
let key2, value4;
|
|
251954
251954
|
if (Array.isArray(it2)) {
|
|
251955
251955
|
if (it2.length === 2) {
|
|
251956
|
-
|
|
251956
|
+
key2 = it2[0];
|
|
251957
251957
|
value4 = it2[1];
|
|
251958
251958
|
} else
|
|
251959
251959
|
throw new TypeError(`Expected [key, value] tuple: ${it2}`);
|
|
251960
251960
|
} else if (it2 && it2 instanceof Object) {
|
|
251961
251961
|
const keys = Object.keys(it2);
|
|
251962
251962
|
if (keys.length === 1) {
|
|
251963
|
-
|
|
251964
|
-
value4 = it2[
|
|
251963
|
+
key2 = keys[0];
|
|
251964
|
+
value4 = it2[key2];
|
|
251965
251965
|
} else {
|
|
251966
251966
|
throw new TypeError(`Expected tuple with one key, not ${keys.length} keys`);
|
|
251967
251967
|
}
|
|
251968
251968
|
} else {
|
|
251969
|
-
|
|
251969
|
+
key2 = it2;
|
|
251970
251970
|
}
|
|
251971
|
-
pairs2.items.push(Pair.createPair(
|
|
251971
|
+
pairs2.items.push(Pair.createPair(key2, value4, ctx));
|
|
251972
251972
|
}
|
|
251973
251973
|
return pairs2;
|
|
251974
251974
|
}
|
|
@@ -252009,16 +252009,16 @@ var require_omap = __commonJS((exports) => {
|
|
|
252009
252009
|
if (ctx?.onCreate)
|
|
252010
252010
|
ctx.onCreate(map3);
|
|
252011
252011
|
for (const pair of this.items) {
|
|
252012
|
-
let
|
|
252012
|
+
let key2, value4;
|
|
252013
252013
|
if (identity3.isPair(pair)) {
|
|
252014
|
-
|
|
252015
|
-
value4 = toJS.toJS(pair.value,
|
|
252014
|
+
key2 = toJS.toJS(pair.key, "", ctx);
|
|
252015
|
+
value4 = toJS.toJS(pair.value, key2, ctx);
|
|
252016
252016
|
} else {
|
|
252017
|
-
|
|
252017
|
+
key2 = toJS.toJS(pair, "", ctx);
|
|
252018
252018
|
}
|
|
252019
|
-
if (map3.has(
|
|
252019
|
+
if (map3.has(key2))
|
|
252020
252020
|
throw new Error("Ordered maps must not include duplicate keys");
|
|
252021
|
-
map3.set(
|
|
252021
|
+
map3.set(key2, value4);
|
|
252022
252022
|
}
|
|
252023
252023
|
return map3;
|
|
252024
252024
|
}
|
|
@@ -252039,12 +252039,12 @@ var require_omap = __commonJS((exports) => {
|
|
|
252039
252039
|
resolve(seq, onError) {
|
|
252040
252040
|
const pairs$1 = pairs.resolvePairs(seq, onError);
|
|
252041
252041
|
const seenKeys = [];
|
|
252042
|
-
for (const { key:
|
|
252043
|
-
if (identity3.isScalar(
|
|
252044
|
-
if (seenKeys.includes(
|
|
252045
|
-
onError(`Ordered maps must not include duplicate keys: ${
|
|
252042
|
+
for (const { key: key2 } of pairs$1.items) {
|
|
252043
|
+
if (identity3.isScalar(key2)) {
|
|
252044
|
+
if (seenKeys.includes(key2.value)) {
|
|
252045
|
+
onError(`Ordered maps must not include duplicate keys: ${key2.value}`);
|
|
252046
252046
|
} else {
|
|
252047
|
-
seenKeys.push(
|
|
252047
|
+
seenKeys.push(key2.value);
|
|
252048
252048
|
}
|
|
252049
252049
|
}
|
|
252050
252050
|
}
|
|
@@ -252218,30 +252218,30 @@ var require_set = __commonJS((exports) => {
|
|
|
252218
252218
|
super(schema);
|
|
252219
252219
|
this.tag = YAMLSet.tag;
|
|
252220
252220
|
}
|
|
252221
|
-
add(
|
|
252221
|
+
add(key2) {
|
|
252222
252222
|
let pair;
|
|
252223
|
-
if (identity3.isPair(
|
|
252224
|
-
pair =
|
|
252225
|
-
else if (
|
|
252226
|
-
pair = new Pair.Pair(
|
|
252223
|
+
if (identity3.isPair(key2))
|
|
252224
|
+
pair = key2;
|
|
252225
|
+
else if (key2 && typeof key2 === "object" && "key" in key2 && "value" in key2 && key2.value === null)
|
|
252226
|
+
pair = new Pair.Pair(key2.key, null);
|
|
252227
252227
|
else
|
|
252228
|
-
pair = new Pair.Pair(
|
|
252228
|
+
pair = new Pair.Pair(key2, null);
|
|
252229
252229
|
const prev = YAMLMap.findPair(this.items, pair.key);
|
|
252230
252230
|
if (!prev)
|
|
252231
252231
|
this.items.push(pair);
|
|
252232
252232
|
}
|
|
252233
|
-
get(
|
|
252234
|
-
const pair = YAMLMap.findPair(this.items,
|
|
252233
|
+
get(key2, keepPair) {
|
|
252234
|
+
const pair = YAMLMap.findPair(this.items, key2);
|
|
252235
252235
|
return !keepPair && identity3.isPair(pair) ? identity3.isScalar(pair.key) ? pair.key.value : pair.key : pair;
|
|
252236
252236
|
}
|
|
252237
|
-
set(
|
|
252237
|
+
set(key2, value4) {
|
|
252238
252238
|
if (typeof value4 !== "boolean")
|
|
252239
252239
|
throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof value4}`);
|
|
252240
|
-
const prev = YAMLMap.findPair(this.items,
|
|
252240
|
+
const prev = YAMLMap.findPair(this.items, key2);
|
|
252241
252241
|
if (prev && !value4) {
|
|
252242
252242
|
this.items.splice(this.items.indexOf(prev), 1);
|
|
252243
252243
|
} else if (!prev && value4) {
|
|
252244
|
-
this.items.push(new Pair.Pair(
|
|
252244
|
+
this.items.push(new Pair.Pair(key2));
|
|
252245
252245
|
}
|
|
252246
252246
|
}
|
|
252247
252247
|
toJSON(_5, ctx) {
|
|
@@ -252476,7 +252476,7 @@ var require_tags = __commonJS((exports) => {
|
|
|
252476
252476
|
if (Array.isArray(customTags))
|
|
252477
252477
|
tags = [];
|
|
252478
252478
|
else {
|
|
252479
|
-
const keys = Array.from(schemas.keys()).filter((
|
|
252479
|
+
const keys = Array.from(schemas.keys()).filter((key2) => key2 !== "yaml11").map((key2) => JSON.stringify(key2)).join(", ");
|
|
252480
252480
|
throw new Error(`Unknown schema "${schemaName}"; use one of ${keys} or define customTags array`);
|
|
252481
252481
|
}
|
|
252482
252482
|
}
|
|
@@ -252492,7 +252492,7 @@ var require_tags = __commonJS((exports) => {
|
|
|
252492
252492
|
const tagObj = typeof tag === "string" ? tagsByName[tag] : tag;
|
|
252493
252493
|
if (!tagObj) {
|
|
252494
252494
|
const tagName = JSON.stringify(tag);
|
|
252495
|
-
const keys = Object.keys(tagsByName).map((
|
|
252495
|
+
const keys = Object.keys(tagsByName).map((key2) => JSON.stringify(key2)).join(", ");
|
|
252496
252496
|
throw new Error(`Unknown custom tag ${tagName}; use one of ${keys}`);
|
|
252497
252497
|
}
|
|
252498
252498
|
if (!tags2.includes(tagObj))
|
|
@@ -252727,13 +252727,13 @@ var require_Document = __commonJS((exports) => {
|
|
|
252727
252727
|
setAnchors();
|
|
252728
252728
|
return node;
|
|
252729
252729
|
}
|
|
252730
|
-
createPair(
|
|
252731
|
-
const k5 = this.createNode(
|
|
252730
|
+
createPair(key2, value4, options = {}) {
|
|
252731
|
+
const k5 = this.createNode(key2, null, options);
|
|
252732
252732
|
const v7 = this.createNode(value4, null, options);
|
|
252733
252733
|
return new Pair.Pair(k5, v7);
|
|
252734
252734
|
}
|
|
252735
|
-
delete(
|
|
252736
|
-
return assertCollection(this.contents) ? this.contents.delete(
|
|
252735
|
+
delete(key2) {
|
|
252736
|
+
return assertCollection(this.contents) ? this.contents.delete(key2) : false;
|
|
252737
252737
|
}
|
|
252738
252738
|
deleteIn(path8) {
|
|
252739
252739
|
if (Collection.isEmptyPath(path8)) {
|
|
@@ -252744,27 +252744,27 @@ var require_Document = __commonJS((exports) => {
|
|
|
252744
252744
|
}
|
|
252745
252745
|
return assertCollection(this.contents) ? this.contents.deleteIn(path8) : false;
|
|
252746
252746
|
}
|
|
252747
|
-
get(
|
|
252748
|
-
return identity3.isCollection(this.contents) ? this.contents.get(
|
|
252747
|
+
get(key2, keepScalar) {
|
|
252748
|
+
return identity3.isCollection(this.contents) ? this.contents.get(key2, keepScalar) : undefined;
|
|
252749
252749
|
}
|
|
252750
252750
|
getIn(path8, keepScalar) {
|
|
252751
252751
|
if (Collection.isEmptyPath(path8))
|
|
252752
252752
|
return !keepScalar && identity3.isScalar(this.contents) ? this.contents.value : this.contents;
|
|
252753
252753
|
return identity3.isCollection(this.contents) ? this.contents.getIn(path8, keepScalar) : undefined;
|
|
252754
252754
|
}
|
|
252755
|
-
has(
|
|
252756
|
-
return identity3.isCollection(this.contents) ? this.contents.has(
|
|
252755
|
+
has(key2) {
|
|
252756
|
+
return identity3.isCollection(this.contents) ? this.contents.has(key2) : false;
|
|
252757
252757
|
}
|
|
252758
252758
|
hasIn(path8) {
|
|
252759
252759
|
if (Collection.isEmptyPath(path8))
|
|
252760
252760
|
return this.contents !== undefined;
|
|
252761
252761
|
return identity3.isCollection(this.contents) ? this.contents.hasIn(path8) : false;
|
|
252762
252762
|
}
|
|
252763
|
-
set(
|
|
252763
|
+
set(key2, value4) {
|
|
252764
252764
|
if (this.contents == null) {
|
|
252765
|
-
this.contents = Collection.collectionFromPath(this.schema, [
|
|
252765
|
+
this.contents = Collection.collectionFromPath(this.schema, [key2], value4);
|
|
252766
252766
|
} else if (assertCollection(this.contents)) {
|
|
252767
|
-
this.contents.set(
|
|
252767
|
+
this.contents.set(key2, value4);
|
|
252768
252768
|
}
|
|
252769
252769
|
}
|
|
252770
252770
|
setIn(path8, value4) {
|
|
@@ -253048,25 +253048,25 @@ var require_resolve_props = __commonJS((exports) => {
|
|
|
253048
253048
|
|
|
253049
253049
|
// ../../node_modules/yaml/dist/compose/util-contains-newline.js
|
|
253050
253050
|
var require_util_contains_newline = __commonJS((exports) => {
|
|
253051
|
-
function containsNewline(
|
|
253052
|
-
if (!
|
|
253051
|
+
function containsNewline(key2) {
|
|
253052
|
+
if (!key2)
|
|
253053
253053
|
return null;
|
|
253054
|
-
switch (
|
|
253054
|
+
switch (key2.type) {
|
|
253055
253055
|
case "alias":
|
|
253056
253056
|
case "scalar":
|
|
253057
253057
|
case "double-quoted-scalar":
|
|
253058
253058
|
case "single-quoted-scalar":
|
|
253059
|
-
if (
|
|
253059
|
+
if (key2.source.includes(`
|
|
253060
253060
|
`))
|
|
253061
253061
|
return true;
|
|
253062
|
-
if (
|
|
253063
|
-
for (const st2 of
|
|
253062
|
+
if (key2.end) {
|
|
253063
|
+
for (const st2 of key2.end)
|
|
253064
253064
|
if (st2.type === "newline")
|
|
253065
253065
|
return true;
|
|
253066
253066
|
}
|
|
253067
253067
|
return false;
|
|
253068
253068
|
case "flow-collection":
|
|
253069
|
-
for (const it2 of
|
|
253069
|
+
for (const it2 of key2.items) {
|
|
253070
253070
|
for (const st2 of it2.start)
|
|
253071
253071
|
if (st2.type === "newline")
|
|
253072
253072
|
return true;
|
|
@@ -253131,10 +253131,10 @@ var require_resolve_block_map = __commonJS((exports) => {
|
|
|
253131
253131
|
let offset = bm.offset;
|
|
253132
253132
|
let commentEnd = null;
|
|
253133
253133
|
for (const collItem of bm.items) {
|
|
253134
|
-
const { start: start3, key:
|
|
253134
|
+
const { start: start3, key: key2, sep: sep3, value: value4 } = collItem;
|
|
253135
253135
|
const keyProps = resolveProps.resolveProps(start3, {
|
|
253136
253136
|
indicator: "explicit-key-ind",
|
|
253137
|
-
next:
|
|
253137
|
+
next: key2 ?? sep3?.[0],
|
|
253138
253138
|
offset,
|
|
253139
253139
|
onError,
|
|
253140
253140
|
parentIndent: bm.indent,
|
|
@@ -253142,10 +253142,10 @@ var require_resolve_block_map = __commonJS((exports) => {
|
|
|
253142
253142
|
});
|
|
253143
253143
|
const implicitKey = !keyProps.found;
|
|
253144
253144
|
if (implicitKey) {
|
|
253145
|
-
if (
|
|
253146
|
-
if (
|
|
253145
|
+
if (key2) {
|
|
253146
|
+
if (key2.type === "block-seq")
|
|
253147
253147
|
onError(offset, "BLOCK_AS_IMPLICIT_KEY", "A block sequence may not be used as an implicit map key");
|
|
253148
|
-
else if ("indent" in
|
|
253148
|
+
else if ("indent" in key2 && key2.indent !== bm.indent)
|
|
253149
253149
|
onError(offset, "BAD_INDENT", startColMsg);
|
|
253150
253150
|
}
|
|
253151
253151
|
if (!keyProps.anchor && !keyProps.tag && !sep3) {
|
|
@@ -253159,17 +253159,17 @@ var require_resolve_block_map = __commonJS((exports) => {
|
|
|
253159
253159
|
}
|
|
253160
253160
|
continue;
|
|
253161
253161
|
}
|
|
253162
|
-
if (keyProps.newlineAfterProp || utilContainsNewline.containsNewline(
|
|
253163
|
-
onError(
|
|
253162
|
+
if (keyProps.newlineAfterProp || utilContainsNewline.containsNewline(key2)) {
|
|
253163
|
+
onError(key2 ?? start3[start3.length - 1], "MULTILINE_IMPLICIT_KEY", "Implicit keys need to be on a single line");
|
|
253164
253164
|
}
|
|
253165
253165
|
} else if (keyProps.found?.indent !== bm.indent) {
|
|
253166
253166
|
onError(offset, "BAD_INDENT", startColMsg);
|
|
253167
253167
|
}
|
|
253168
253168
|
ctx.atKey = true;
|
|
253169
253169
|
const keyStart = keyProps.end;
|
|
253170
|
-
const keyNode =
|
|
253170
|
+
const keyNode = key2 ? composeNode(ctx, key2, keyProps, onError) : composeEmptyNode(ctx, keyStart, start3, null, keyProps, onError);
|
|
253171
253171
|
if (ctx.schema.compat)
|
|
253172
|
-
utilFlowIndentCheck.flowIndentCheck(bm.indent,
|
|
253172
|
+
utilFlowIndentCheck.flowIndentCheck(bm.indent, key2, onError);
|
|
253173
253173
|
ctx.atKey = false;
|
|
253174
253174
|
if (utilMapIncludes.mapIncludes(ctx, map3.items, keyNode))
|
|
253175
253175
|
onError(keyStart, "DUPLICATE_KEY", "Map keys must be unique");
|
|
@@ -253179,7 +253179,7 @@ var require_resolve_block_map = __commonJS((exports) => {
|
|
|
253179
253179
|
offset: keyNode.range[2],
|
|
253180
253180
|
onError,
|
|
253181
253181
|
parentIndent: bm.indent,
|
|
253182
|
-
startOnNewline: !
|
|
253182
|
+
startOnNewline: !key2 || key2.type === "block-scalar"
|
|
253183
253183
|
});
|
|
253184
253184
|
offset = valueProps.end;
|
|
253185
253185
|
if (valueProps.found) {
|
|
@@ -253335,11 +253335,11 @@ var require_resolve_flow_collection = __commonJS((exports) => {
|
|
|
253335
253335
|
let offset = fc.offset + fc.start.source.length;
|
|
253336
253336
|
for (let i6 = 0;i6 < fc.items.length; ++i6) {
|
|
253337
253337
|
const collItem = fc.items[i6];
|
|
253338
|
-
const { start: start3, key:
|
|
253338
|
+
const { start: start3, key: key2, sep: sep3, value: value4 } = collItem;
|
|
253339
253339
|
const props = resolveProps.resolveProps(start3, {
|
|
253340
253340
|
flow: fcName,
|
|
253341
253341
|
indicator: "explicit-key-ind",
|
|
253342
|
-
next:
|
|
253342
|
+
next: key2 ?? sep3?.[0],
|
|
253343
253343
|
offset,
|
|
253344
253344
|
onError,
|
|
253345
253345
|
parentIndent: fc.indent,
|
|
@@ -253361,8 +253361,8 @@ var require_resolve_flow_collection = __commonJS((exports) => {
|
|
|
253361
253361
|
offset = props.end;
|
|
253362
253362
|
continue;
|
|
253363
253363
|
}
|
|
253364
|
-
if (!isMap && ctx.options.strict && utilContainsNewline.containsNewline(
|
|
253365
|
-
onError(
|
|
253364
|
+
if (!isMap && ctx.options.strict && utilContainsNewline.containsNewline(key2))
|
|
253365
|
+
onError(key2, "MULTILINE_IMPLICIT_KEY", "Implicit keys of flow sequence pairs need to be on a single line");
|
|
253366
253366
|
}
|
|
253367
253367
|
if (i6 === 0) {
|
|
253368
253368
|
if (props.comma)
|
|
@@ -253407,8 +253407,8 @@ var require_resolve_flow_collection = __commonJS((exports) => {
|
|
|
253407
253407
|
} else {
|
|
253408
253408
|
ctx.atKey = true;
|
|
253409
253409
|
const keyStart = props.end;
|
|
253410
|
-
const keyNode =
|
|
253411
|
-
if (isBlock(
|
|
253410
|
+
const keyNode = key2 ? composeNode(ctx, key2, props, onError) : composeEmptyNode(ctx, keyStart, start3, null, props, onError);
|
|
253411
|
+
if (isBlock(key2))
|
|
253412
253412
|
onError(keyNode.range, "BLOCK_IN_FLOW", blockMsg);
|
|
253413
253413
|
ctx.atKey = false;
|
|
253414
253414
|
const valueProps = resolveProps.resolveProps(sep3 ?? [], {
|
|
@@ -254220,7 +254220,7 @@ var require_composer = __commonJS((exports) => {
|
|
|
254220
254220
|
var node_process = __require("node:process");
|
|
254221
254221
|
var directives4 = require_directives2();
|
|
254222
254222
|
var Document = require_Document();
|
|
254223
|
-
var
|
|
254223
|
+
var errors2 = require_errors3();
|
|
254224
254224
|
var identity3 = require_identity();
|
|
254225
254225
|
var composeDoc = require_compose_doc();
|
|
254226
254226
|
var resolveEnd = require_resolve_end();
|
|
@@ -254271,9 +254271,9 @@ var require_composer = __commonJS((exports) => {
|
|
|
254271
254271
|
this.onError = (source, code2, message, warning) => {
|
|
254272
254272
|
const pos = getErrorPos(source);
|
|
254273
254273
|
if (warning)
|
|
254274
|
-
this.warnings.push(new
|
|
254274
|
+
this.warnings.push(new errors2.YAMLWarning(pos, code2, message));
|
|
254275
254275
|
else
|
|
254276
|
-
this.errors.push(new
|
|
254276
|
+
this.errors.push(new errors2.YAMLParseError(pos, code2, message));
|
|
254277
254277
|
};
|
|
254278
254278
|
this.directives = new directives4.Directives({ version: options.version || "1.2" });
|
|
254279
254279
|
this.options = options;
|
|
@@ -254357,7 +254357,7 @@ ${cb}` : comment;
|
|
|
254357
254357
|
break;
|
|
254358
254358
|
case "error": {
|
|
254359
254359
|
const msg = token.source ? `${token.message}: ${JSON.stringify(token.source)}` : token.message;
|
|
254360
|
-
const error5 = new
|
|
254360
|
+
const error5 = new errors2.YAMLParseError(getErrorPos(token), "UNEXPECTED_TOKEN", msg);
|
|
254361
254361
|
if (this.atDirectives || !this.doc)
|
|
254362
254362
|
this.errors.push(error5);
|
|
254363
254363
|
else
|
|
@@ -254367,7 +254367,7 @@ ${cb}` : comment;
|
|
|
254367
254367
|
case "doc-end": {
|
|
254368
254368
|
if (!this.doc) {
|
|
254369
254369
|
const msg = "Unexpected doc-end without preceding document";
|
|
254370
|
-
this.errors.push(new
|
|
254370
|
+
this.errors.push(new errors2.YAMLParseError(getErrorPos(token), "UNEXPECTED_TOKEN", msg));
|
|
254371
254371
|
break;
|
|
254372
254372
|
}
|
|
254373
254373
|
this.doc.directives.docEnd = true;
|
|
@@ -254382,7 +254382,7 @@ ${end.comment}` : end.comment;
|
|
|
254382
254382
|
break;
|
|
254383
254383
|
}
|
|
254384
254384
|
default:
|
|
254385
|
-
this.errors.push(new
|
|
254385
|
+
this.errors.push(new errors2.YAMLParseError(getErrorPos(token), "UNEXPECTED_TOKEN", `Unsupported token ${token.type}`));
|
|
254386
254386
|
}
|
|
254387
254387
|
}
|
|
254388
254388
|
*end(forceDoc = false, endOffset = -1) {
|
|
@@ -254408,7 +254408,7 @@ ${end.comment}` : end.comment;
|
|
|
254408
254408
|
var require_cst_scalar = __commonJS((exports) => {
|
|
254409
254409
|
var resolveBlockScalar = require_resolve_block_scalar();
|
|
254410
254410
|
var resolveFlowScalar = require_resolve_flow_scalar();
|
|
254411
|
-
var
|
|
254411
|
+
var errors2 = require_errors3();
|
|
254412
254412
|
var stringifyString = require_stringifyString();
|
|
254413
254413
|
function resolveAsScalar(token, strict = true, onError) {
|
|
254414
254414
|
if (token) {
|
|
@@ -254417,7 +254417,7 @@ var require_cst_scalar = __commonJS((exports) => {
|
|
|
254417
254417
|
if (onError)
|
|
254418
254418
|
onError(offset, code2, message);
|
|
254419
254419
|
else
|
|
254420
|
-
throw new
|
|
254420
|
+
throw new errors2.YAMLParseError([offset, offset + 1], code2, message);
|
|
254421
254421
|
};
|
|
254422
254422
|
switch (token.type) {
|
|
254423
254423
|
case "scalar":
|
|
@@ -254531,9 +254531,9 @@ var require_cst_scalar = __commonJS((exports) => {
|
|
|
254531
254531
|
if (!addEndtoBlockProps(props, "end" in token ? token.end : undefined))
|
|
254532
254532
|
props.push({ type: "newline", offset: -1, indent: indent2, source: `
|
|
254533
254533
|
` });
|
|
254534
|
-
for (const
|
|
254535
|
-
if (
|
|
254536
|
-
delete token[
|
|
254534
|
+
for (const key2 of Object.keys(token))
|
|
254535
|
+
if (key2 !== "type" && key2 !== "offset")
|
|
254536
|
+
delete token[key2];
|
|
254537
254537
|
Object.assign(token, { type: "block-scalar", indent: indent2, props, source: body });
|
|
254538
254538
|
}
|
|
254539
254539
|
}
|
|
@@ -254582,9 +254582,9 @@ var require_cst_scalar = __commonJS((exports) => {
|
|
|
254582
254582
|
default: {
|
|
254583
254583
|
const indent2 = "indent" in token ? token.indent : -1;
|
|
254584
254584
|
const end = "end" in token && Array.isArray(token.end) ? token.end.filter((st2) => st2.type === "space" || st2.type === "comment" || st2.type === "newline") : [];
|
|
254585
|
-
for (const
|
|
254586
|
-
if (
|
|
254587
|
-
delete token[
|
|
254585
|
+
for (const key2 of Object.keys(token))
|
|
254586
|
+
if (key2 !== "type" && key2 !== "offset")
|
|
254587
|
+
delete token[key2];
|
|
254588
254588
|
Object.assign(token, { type: type4, indent: indent2, source, end });
|
|
254589
254589
|
}
|
|
254590
254590
|
}
|
|
@@ -254636,12 +254636,12 @@ var require_cst_stringify = __commonJS((exports) => {
|
|
|
254636
254636
|
}
|
|
254637
254637
|
}
|
|
254638
254638
|
}
|
|
254639
|
-
function stringifyItem({ start: start3, key:
|
|
254639
|
+
function stringifyItem({ start: start3, key: key2, sep: sep3, value: value4 }) {
|
|
254640
254640
|
let res = "";
|
|
254641
254641
|
for (const st2 of start3)
|
|
254642
254642
|
res += st2.source;
|
|
254643
|
-
if (
|
|
254644
|
-
res += stringifyToken(
|
|
254643
|
+
if (key2)
|
|
254644
|
+
res += stringifyToken(key2);
|
|
254645
254645
|
if (sep3)
|
|
254646
254646
|
for (const st2 of sep3)
|
|
254647
254647
|
res += st2.source;
|
|
@@ -255938,7 +255938,7 @@ var require_parser2 = __commonJS((exports) => {
|
|
|
255938
255938
|
});
|
|
255939
255939
|
} else if (isFlowToken(it2.key) && !includesToken(it2.sep, "newline")) {
|
|
255940
255940
|
const start4 = getFirstKeyStartProps(it2.start);
|
|
255941
|
-
const
|
|
255941
|
+
const key2 = it2.key;
|
|
255942
255942
|
const sep3 = it2.sep;
|
|
255943
255943
|
sep3.push(this.sourceToken);
|
|
255944
255944
|
delete it2.key;
|
|
@@ -255947,7 +255947,7 @@ var require_parser2 = __commonJS((exports) => {
|
|
|
255947
255947
|
type: "block-map",
|
|
255948
255948
|
offset: this.offset,
|
|
255949
255949
|
indent: this.indent,
|
|
255950
|
-
items: [{ start: start4, key:
|
|
255950
|
+
items: [{ start: start4, key: key2, sep: sep3 }]
|
|
255951
255951
|
});
|
|
255952
255952
|
} else if (start3.length > 0) {
|
|
255953
255953
|
it2.sep = it2.sep.concat(start3, this.sourceToken);
|
|
@@ -256270,7 +256270,7 @@ var require_parser2 = __commonJS((exports) => {
|
|
|
256270
256270
|
var require_public_api = __commonJS((exports) => {
|
|
256271
256271
|
var composer = require_composer();
|
|
256272
256272
|
var Document = require_Document();
|
|
256273
|
-
var
|
|
256273
|
+
var errors2 = require_errors3();
|
|
256274
256274
|
var log = require_log();
|
|
256275
256275
|
var identity3 = require_identity();
|
|
256276
256276
|
var lineCounter = require_line_counter();
|
|
@@ -256287,8 +256287,8 @@ var require_public_api = __commonJS((exports) => {
|
|
|
256287
256287
|
const docs = Array.from(composer$1.compose(parser$1.parse(source)));
|
|
256288
256288
|
if (prettyErrors && lineCounter2)
|
|
256289
256289
|
for (const doc of docs) {
|
|
256290
|
-
doc.errors.forEach(
|
|
256291
|
-
doc.warnings.forEach(
|
|
256290
|
+
doc.errors.forEach(errors2.prettifyError(source, lineCounter2));
|
|
256291
|
+
doc.warnings.forEach(errors2.prettifyError(source, lineCounter2));
|
|
256292
256292
|
}
|
|
256293
256293
|
if (docs.length > 0)
|
|
256294
256294
|
return docs;
|
|
@@ -256303,13 +256303,13 @@ var require_public_api = __commonJS((exports) => {
|
|
|
256303
256303
|
if (!doc)
|
|
256304
256304
|
doc = _doc;
|
|
256305
256305
|
else if (doc.options.logLevel !== "silent") {
|
|
256306
|
-
doc.errors.push(new
|
|
256306
|
+
doc.errors.push(new errors2.YAMLParseError(_doc.range.slice(0, 2), "MULTIPLE_DOCS", "Source contains multiple documents; please use YAML.parseAllDocuments()"));
|
|
256307
256307
|
break;
|
|
256308
256308
|
}
|
|
256309
256309
|
}
|
|
256310
256310
|
if (prettyErrors && lineCounter2) {
|
|
256311
|
-
doc.errors.forEach(
|
|
256312
|
-
doc.warnings.forEach(
|
|
256311
|
+
doc.errors.forEach(errors2.prettifyError(source, lineCounter2));
|
|
256312
|
+
doc.warnings.forEach(errors2.prettifyError(source, lineCounter2));
|
|
256313
256313
|
}
|
|
256314
256314
|
return doc;
|
|
256315
256315
|
}
|
|
@@ -256788,7 +256788,7 @@ ${error.stack}`));
|
|
|
256788
256788
|
var package_default = {
|
|
256789
256789
|
name: "@settlemint/sdk-cli",
|
|
256790
256790
|
description: "Command-line interface for SettleMint SDK, providing development tools and project management capabilities",
|
|
256791
|
-
version: "1.0.0-
|
|
256791
|
+
version: "1.0.0-maind552bede",
|
|
256792
256792
|
type: "module",
|
|
256793
256793
|
private: false,
|
|
256794
256794
|
license: "FSL-1.1-MIT",
|
|
@@ -256837,12 +256837,12 @@ var package_default = {
|
|
|
256837
256837
|
slugify: "1.6.6",
|
|
256838
256838
|
yoctocolors: "2.1.1",
|
|
256839
256839
|
"@commander-js/extra-typings": "13.0.0",
|
|
256840
|
-
"@inquirer/confirm": "5.1.
|
|
256840
|
+
"@inquirer/confirm": "5.1.3",
|
|
256841
256841
|
"@inquirer/input": "4.1.3",
|
|
256842
|
-
"@inquirer/password": "4.0.
|
|
256842
|
+
"@inquirer/password": "4.0.6",
|
|
256843
256843
|
"@inquirer/select": "4.0.6",
|
|
256844
|
-
"@settlemint/sdk-js": "1.0.0-
|
|
256845
|
-
"@settlemint/sdk-utils": "1.0.0-
|
|
256844
|
+
"@settlemint/sdk-js": "1.0.0-maind552bede",
|
|
256845
|
+
"@settlemint/sdk-utils": "1.0.0-maind552bede",
|
|
256846
256846
|
"get-tsconfig": "4.8.1",
|
|
256847
256847
|
giget: "1.2.3"
|
|
256848
256848
|
},
|
|
@@ -267563,7 +267563,7 @@ var et = l((Re, tt) => {
|
|
|
267563
267563
|
var g = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys", Y = h("path"), Bt = g ? ";" : ":", V = U(), J = (t) => Object.assign(new Error(`not found: ${t}`), { code: "ENOENT" }), Q = (t, e) => {
|
|
267564
267564
|
let n = e.colon || Bt, r = t.match(/\//) || g && t.match(/\\/) ? [""] : [
|
|
267565
267565
|
...g ? [process.cwd()] : [],
|
|
267566
|
-
...(e.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.
|
|
267566
|
+
...(e.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.Q1ZfVcAqCa:/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(n)
|
|
267567
267567
|
], s = g ? e.pathExt || process.env.PATHEXT || ".EXE;.CMD;.BAT;.COM" : "", o = g ? s.split(n) : [""];
|
|
267568
267568
|
return g && t.indexOf(".") !== -1 && o[0] !== "" && o.unshift(""), {
|
|
267569
267569
|
pathEnv: r,
|
|
@@ -268203,37 +268203,6 @@ async function exists2(path5) {
|
|
|
268203
268203
|
return false;
|
|
268204
268204
|
}
|
|
268205
268205
|
}
|
|
268206
|
-
async function getPackageManager(targetDir) {
|
|
268207
|
-
const packageManager = await detect({ cwd: targetDir || process.cwd() });
|
|
268208
|
-
return packageManager?.name ?? "npm";
|
|
268209
|
-
}
|
|
268210
|
-
async function getPackageManagerExecutable(targetDir) {
|
|
268211
|
-
const packageManager = await getPackageManager(targetDir ?? process.cwd());
|
|
268212
|
-
switch (packageManager) {
|
|
268213
|
-
case "pnpm":
|
|
268214
|
-
return { command: "pnpm", args: ["dlx"] };
|
|
268215
|
-
case "bun":
|
|
268216
|
-
return { command: "bunx", args: [] };
|
|
268217
|
-
case "yarn":
|
|
268218
|
-
return { command: "yarn", args: ["create"] };
|
|
268219
|
-
}
|
|
268220
|
-
return { command: "npx", args: [] };
|
|
268221
|
-
}
|
|
268222
|
-
async function installDependencies(pkgs, cwd) {
|
|
268223
|
-
try {
|
|
268224
|
-
await installPackage(pkgs, { silent: true, additionalArgs: ["--exact"], cwd });
|
|
268225
|
-
} catch (err) {
|
|
268226
|
-
const error = err instanceof Error ? err.message : "Unknown error";
|
|
268227
|
-
note2(`Failed to install ${Array.isArray(pkgs) ? `dependencies '${pkgs.join(", ")}'` : `dependency '${pkgs}'`}: ${error}`, "warn");
|
|
268228
|
-
}
|
|
268229
|
-
}
|
|
268230
|
-
async function isPackageInstalled(name, path5) {
|
|
268231
|
-
const pkgJson = await import_package_json.default.load(path5 ?? await projectRoot2());
|
|
268232
|
-
const inDependencies = !!pkgJson.content.dependencies?.[name];
|
|
268233
|
-
const inDevDependencies = !!pkgJson.content.devDependencies?.[name];
|
|
268234
|
-
const inPeerDependencies = !!pkgJson.content.peerDependencies?.[name];
|
|
268235
|
-
return inDependencies || inDevDependencies || inPeerDependencies;
|
|
268236
|
-
}
|
|
268237
268206
|
async function retryWhenFailed(fn, maxRetries = 5, initialSleepTime = 3000, stopOnError) {
|
|
268238
268207
|
let attempt = 0;
|
|
268239
268208
|
while (attempt < maxRetries) {
|
|
@@ -268269,6 +268238,47 @@ async function fetchWithRetry(input, init, maxRetries = 5, initialSleepTime = 30
|
|
|
268269
268238
|
throw new Error(`HTTP error! status: ${response.status} ${response.statusText}`);
|
|
268270
268239
|
}, maxRetries, initialSleepTime);
|
|
268271
268240
|
}
|
|
268241
|
+
async function graphqlFetchWithRetry(input, init, maxRetries = 5, initialSleepTime = 3000) {
|
|
268242
|
+
return retryWhenFailed(async () => {
|
|
268243
|
+
const response = await fetchWithRetry(input, init);
|
|
268244
|
+
const json = await response.json();
|
|
268245
|
+
if (json.errors) {
|
|
268246
|
+
throw new Error(`GraphQL errors in response: ${json.errors.map((error) => error.message).join(", ")}`);
|
|
268247
|
+
}
|
|
268248
|
+
return json.data;
|
|
268249
|
+
}, maxRetries, initialSleepTime);
|
|
268250
|
+
}
|
|
268251
|
+
async function getPackageManager(targetDir) {
|
|
268252
|
+
const packageManager = await detect({ cwd: targetDir || process.cwd() });
|
|
268253
|
+
return packageManager?.name ?? "npm";
|
|
268254
|
+
}
|
|
268255
|
+
async function getPackageManagerExecutable(targetDir) {
|
|
268256
|
+
const packageManager = await getPackageManager(targetDir ?? process.cwd());
|
|
268257
|
+
switch (packageManager) {
|
|
268258
|
+
case "pnpm":
|
|
268259
|
+
return { command: "pnpm", args: ["dlx"] };
|
|
268260
|
+
case "bun":
|
|
268261
|
+
return { command: "bunx", args: [] };
|
|
268262
|
+
case "yarn":
|
|
268263
|
+
return { command: "yarn", args: ["create"] };
|
|
268264
|
+
}
|
|
268265
|
+
return { command: "npx", args: [] };
|
|
268266
|
+
}
|
|
268267
|
+
async function installDependencies(pkgs, cwd) {
|
|
268268
|
+
try {
|
|
268269
|
+
await installPackage(pkgs, { silent: true, additionalArgs: ["--exact"], cwd });
|
|
268270
|
+
} catch (err) {
|
|
268271
|
+
const error = err instanceof Error ? err.message : "Unknown error";
|
|
268272
|
+
note2(`Failed to install ${Array.isArray(pkgs) ? `dependencies '${pkgs.join(", ")}'` : `dependency '${pkgs}'`}: ${error}`, "warn");
|
|
268273
|
+
}
|
|
268274
|
+
}
|
|
268275
|
+
async function isPackageInstalled(name, path5) {
|
|
268276
|
+
const pkgJson = await import_package_json.default.load(path5 ?? await projectRoot2());
|
|
268277
|
+
const inDependencies = !!pkgJson.content.dependencies?.[name];
|
|
268278
|
+
const inDevDependencies = !!pkgJson.content.devDependencies?.[name];
|
|
268279
|
+
const inPeerDependencies = !!pkgJson.content.peerDependencies?.[name];
|
|
268280
|
+
return inDependencies || inDevDependencies || inPeerDependencies;
|
|
268281
|
+
}
|
|
268272
268282
|
function capitalizeFirstLetter(val) {
|
|
268273
268283
|
return String(val).charAt(0).toUpperCase() + String(val).slice(1);
|
|
268274
268284
|
}
|
|
@@ -268556,7 +268566,7 @@ async function testGqlEndpoint({
|
|
|
268556
268566
|
if (!gqlEndpoint) {
|
|
268557
268567
|
return false;
|
|
268558
268568
|
}
|
|
268559
|
-
|
|
268569
|
+
await graphqlFetchWithRetry(gqlEndpoint, {
|
|
268560
268570
|
method: "POST",
|
|
268561
268571
|
headers: {
|
|
268562
268572
|
"x-auth-token": accessToken,
|
|
@@ -268575,10 +268585,6 @@ async function testGqlEndpoint({
|
|
|
268575
268585
|
`
|
|
268576
268586
|
})
|
|
268577
268587
|
});
|
|
268578
|
-
const data = await response.json();
|
|
268579
|
-
if (data.errors) {
|
|
268580
|
-
throw new Error("GraphQL errors in response");
|
|
268581
|
-
}
|
|
268582
268588
|
return true;
|
|
268583
268589
|
}
|
|
268584
268590
|
|
|
@@ -269566,13 +269572,13 @@ async function codegenTsconfig(env2, thegraphSubgraphNames) {
|
|
|
269566
269572
|
};
|
|
269567
269573
|
}
|
|
269568
269574
|
|
|
269569
|
-
// ../../node_modules/@inquirer/
|
|
269575
|
+
// ../../node_modules/@inquirer/core/dist/esm/lib/key.js
|
|
269570
269576
|
var isUpKey = (key) => key.name === "up" || key.name === "k" || key.ctrl && key.name === "p";
|
|
269571
269577
|
var isDownKey = (key) => key.name === "down" || key.name === "j" || key.ctrl && key.name === "n";
|
|
269572
269578
|
var isBackspaceKey = (key) => key.name === "backspace";
|
|
269573
269579
|
var isNumberKey = (key) => "123456789".includes(key.name);
|
|
269574
269580
|
var isEnterKey = (key) => key.name === "enter" || key.name === "return";
|
|
269575
|
-
// ../../node_modules/@inquirer/
|
|
269581
|
+
// ../../node_modules/@inquirer/core/dist/esm/lib/errors.js
|
|
269576
269582
|
class AbortPromptError extends Error {
|
|
269577
269583
|
name = "AbortPromptError";
|
|
269578
269584
|
message = "Prompt was aborted";
|
|
@@ -269598,10 +269604,10 @@ class HookError extends Error {
|
|
|
269598
269604
|
class ValidationError extends Error {
|
|
269599
269605
|
name = "ValidationError";
|
|
269600
269606
|
}
|
|
269601
|
-
// ../../node_modules/@inquirer/
|
|
269607
|
+
// ../../node_modules/@inquirer/core/dist/esm/lib/use-prefix.js
|
|
269602
269608
|
import { AsyncResource as AsyncResource2 } from "node:async_hooks";
|
|
269603
269609
|
|
|
269604
|
-
// ../../node_modules/@inquirer/
|
|
269610
|
+
// ../../node_modules/@inquirer/core/dist/esm/lib/hook-engine.js
|
|
269605
269611
|
import { AsyncLocalStorage, AsyncResource } from "node:async_hooks";
|
|
269606
269612
|
var hookStorage = new AsyncLocalStorage;
|
|
269607
269613
|
function createStore(rl) {
|
|
@@ -269707,7 +269713,7 @@ var effectScheduler = {
|
|
|
269707
269713
|
}
|
|
269708
269714
|
};
|
|
269709
269715
|
|
|
269710
|
-
// ../../node_modules/@inquirer/
|
|
269716
|
+
// ../../node_modules/@inquirer/core/dist/esm/lib/use-state.js
|
|
269711
269717
|
function useState(defaultValue) {
|
|
269712
269718
|
return withPointer((pointer) => {
|
|
269713
269719
|
const setFn = (newValue) => {
|
|
@@ -269725,7 +269731,7 @@ function useState(defaultValue) {
|
|
|
269725
269731
|
});
|
|
269726
269732
|
}
|
|
269727
269733
|
|
|
269728
|
-
// ../../node_modules/@inquirer/
|
|
269734
|
+
// ../../node_modules/@inquirer/core/dist/esm/lib/use-effect.js
|
|
269729
269735
|
function useEffect(cb, depArray) {
|
|
269730
269736
|
withPointer((pointer) => {
|
|
269731
269737
|
const oldDeps = pointer.get();
|
|
@@ -269737,7 +269743,7 @@ function useEffect(cb, depArray) {
|
|
|
269737
269743
|
});
|
|
269738
269744
|
}
|
|
269739
269745
|
|
|
269740
|
-
// ../../node_modules/@inquirer/
|
|
269746
|
+
// ../../node_modules/@inquirer/core/dist/esm/lib/theme.js
|
|
269741
269747
|
var import_yoctocolors_cjs = __toESM(require_yoctocolors_cjs(), 1);
|
|
269742
269748
|
|
|
269743
269749
|
// ../../node_modules/@inquirer/figures/dist/esm/index.js
|
|
@@ -270026,7 +270032,7 @@ var figures = shouldUseMain ? mainSymbols : fallbackSymbols;
|
|
|
270026
270032
|
var esm_default = figures;
|
|
270027
270033
|
var replacements = Object.entries(specialMainSymbols);
|
|
270028
270034
|
|
|
270029
|
-
// ../../node_modules/@inquirer/
|
|
270035
|
+
// ../../node_modules/@inquirer/core/dist/esm/lib/theme.js
|
|
270030
270036
|
var defaultTheme = {
|
|
270031
270037
|
prefix: {
|
|
270032
270038
|
idle: import_yoctocolors_cjs.default.blue("?"),
|
|
@@ -270047,7 +270053,7 @@ var defaultTheme = {
|
|
|
270047
270053
|
}
|
|
270048
270054
|
};
|
|
270049
270055
|
|
|
270050
|
-
// ../../node_modules/@inquirer/
|
|
270056
|
+
// ../../node_modules/@inquirer/core/dist/esm/lib/make-theme.js
|
|
270051
270057
|
function isPlainObject(value4) {
|
|
270052
270058
|
if (typeof value4 !== "object" || value4 === null)
|
|
270053
270059
|
return false;
|
|
@@ -270075,7 +270081,7 @@ function makeTheme(...themes) {
|
|
|
270075
270081
|
return deepMerge2(...themesToMerge);
|
|
270076
270082
|
}
|
|
270077
270083
|
|
|
270078
|
-
// ../../node_modules/@inquirer/
|
|
270084
|
+
// ../../node_modules/@inquirer/core/dist/esm/lib/use-prefix.js
|
|
270079
270085
|
function usePrefix({ status = "idle", theme }) {
|
|
270080
270086
|
const [showLoader, setShowLoader] = useState(false);
|
|
270081
270087
|
const [tick, setTick] = useState(0);
|
|
@@ -270105,7 +270111,7 @@ function usePrefix({ status = "idle", theme }) {
|
|
|
270105
270111
|
const iconName = status === "loading" ? "idle" : status;
|
|
270106
270112
|
return typeof prefix === "string" ? prefix : prefix[iconName] ?? prefix["idle"];
|
|
270107
270113
|
}
|
|
270108
|
-
// ../../node_modules/@inquirer/
|
|
270114
|
+
// ../../node_modules/@inquirer/core/dist/esm/lib/use-memo.js
|
|
270109
270115
|
function useMemo(fn, dependencies) {
|
|
270110
270116
|
return withPointer((pointer) => {
|
|
270111
270117
|
const prev = pointer.get();
|
|
@@ -270117,11 +270123,11 @@ function useMemo(fn, dependencies) {
|
|
|
270117
270123
|
return prev.value;
|
|
270118
270124
|
});
|
|
270119
270125
|
}
|
|
270120
|
-
// ../../node_modules/@inquirer/
|
|
270126
|
+
// ../../node_modules/@inquirer/core/dist/esm/lib/use-ref.js
|
|
270121
270127
|
function useRef(val) {
|
|
270122
270128
|
return useState({ current: val })[0];
|
|
270123
270129
|
}
|
|
270124
|
-
// ../../node_modules/@inquirer/
|
|
270130
|
+
// ../../node_modules/@inquirer/core/dist/esm/lib/use-keypress.js
|
|
270125
270131
|
function useKeypress(userHandler) {
|
|
270126
270132
|
const signal = useRef(userHandler);
|
|
270127
270133
|
signal.current = userHandler;
|
|
@@ -270139,7 +270145,7 @@ function useKeypress(userHandler) {
|
|
|
270139
270145
|
};
|
|
270140
270146
|
}, []);
|
|
270141
270147
|
}
|
|
270142
|
-
// ../../node_modules/@inquirer/
|
|
270148
|
+
// ../../node_modules/@inquirer/core/dist/esm/lib/utils.js
|
|
270143
270149
|
var import_cli_width = __toESM(require_cli_width(), 1);
|
|
270144
270150
|
var import_wrap_ansi = __toESM(require_wrap_ansi(), 1);
|
|
270145
270151
|
function breakLines(content, width) {
|
|
@@ -270152,7 +270158,7 @@ function readlineWidth() {
|
|
|
270152
270158
|
return import_cli_width.default({ defaultWidth: 80, output: readline().output });
|
|
270153
270159
|
}
|
|
270154
270160
|
|
|
270155
|
-
// ../../node_modules/@inquirer/
|
|
270161
|
+
// ../../node_modules/@inquirer/core/dist/esm/lib/pagination/lines.js
|
|
270156
270162
|
function split2(content, width) {
|
|
270157
270163
|
return breakLines(content, width).split(`
|
|
270158
270164
|
`);
|
|
@@ -270197,7 +270203,7 @@ function lines({ items, width, renderItem, active, position: requested, pageSize
|
|
|
270197
270203
|
return pageBuffer.filter((line) => typeof line === "string");
|
|
270198
270204
|
}
|
|
270199
270205
|
|
|
270200
|
-
// ../../node_modules/@inquirer/
|
|
270206
|
+
// ../../node_modules/@inquirer/core/dist/esm/lib/pagination/position.js
|
|
270201
270207
|
function finite({ active, pageSize, total }) {
|
|
270202
270208
|
const middle = Math.floor(pageSize / 2);
|
|
270203
270209
|
if (total <= pageSize || active < middle)
|
|
@@ -270215,7 +270221,7 @@ function infinite({ active, lastActive, total, pageSize, pointer }) {
|
|
|
270215
270221
|
return pointer;
|
|
270216
270222
|
}
|
|
270217
270223
|
|
|
270218
|
-
// ../../node_modules/@inquirer/
|
|
270224
|
+
// ../../node_modules/@inquirer/core/dist/esm/lib/pagination/use-pagination.js
|
|
270219
270225
|
function usePagination({ items, active, renderItem, pageSize, loop = true }) {
|
|
270220
270226
|
const state = useRef({ position: 0, lastActive: 0 });
|
|
270221
270227
|
const position = loop ? infinite({
|
|
@@ -270241,13 +270247,13 @@ function usePagination({ items, active, renderItem, pageSize, loop = true }) {
|
|
|
270241
270247
|
}).join(`
|
|
270242
270248
|
`);
|
|
270243
270249
|
}
|
|
270244
|
-
// ../../node_modules/@inquirer/
|
|
270250
|
+
// ../../node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
|
|
270245
270251
|
var import_mute_stream = __toESM(require_lib13(), 1);
|
|
270246
270252
|
init_mjs();
|
|
270247
270253
|
import * as readline2 from "node:readline";
|
|
270248
270254
|
import { AsyncResource as AsyncResource3 } from "node:async_hooks";
|
|
270249
270255
|
|
|
270250
|
-
// ../../node_modules/@inquirer/
|
|
270256
|
+
// ../../node_modules/@inquirer/core/dist/esm/lib/screen-manager.js
|
|
270251
270257
|
var import_strip_ansi = __toESM(require_strip_ansi(), 1);
|
|
270252
270258
|
var import_ansi_escapes = __toESM(require_ansi_escapes(), 1);
|
|
270253
270259
|
var height = (content) => content.split(`
|
|
@@ -270318,7 +270324,7 @@ class ScreenManager {
|
|
|
270318
270324
|
}
|
|
270319
270325
|
}
|
|
270320
270326
|
|
|
270321
|
-
// ../../node_modules/@inquirer/
|
|
270327
|
+
// ../../node_modules/@inquirer/core/dist/esm/lib/promise-polyfill.js
|
|
270322
270328
|
class PromisePolyfill extends Promise {
|
|
270323
270329
|
static withResolver() {
|
|
270324
270330
|
let resolve4;
|
|
@@ -270331,7 +270337,7 @@ class PromisePolyfill extends Promise {
|
|
|
270331
270337
|
}
|
|
270332
270338
|
}
|
|
270333
270339
|
|
|
270334
|
-
// ../../node_modules/@inquirer/
|
|
270340
|
+
// ../../node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
|
|
270335
270341
|
function getCallSites() {
|
|
270336
270342
|
const _prepareStackTrace = Error.prepareStackTrace;
|
|
270337
270343
|
try {
|
|
@@ -270413,7 +270419,7 @@ function createPrompt(view) {
|
|
|
270413
270419
|
};
|
|
270414
270420
|
return prompt;
|
|
270415
270421
|
}
|
|
270416
|
-
// ../../node_modules/@inquirer/
|
|
270422
|
+
// ../../node_modules/@inquirer/core/dist/esm/lib/Separator.js
|
|
270417
270423
|
var import_yoctocolors_cjs2 = __toESM(require_yoctocolors_cjs(), 1);
|
|
270418
270424
|
class Separator {
|
|
270419
270425
|
separator = import_yoctocolors_cjs2.default.dim(Array.from({ length: 15 }).join(esm_default.line));
|
|
@@ -270848,7 +270854,7 @@ async function codegenBlockscout(env2) {
|
|
|
270848
270854
|
if (!accessToken) {
|
|
270849
270855
|
return;
|
|
270850
270856
|
}
|
|
270851
|
-
const
|
|
270857
|
+
const data = await graphqlFetchWithRetry(endpoint, {
|
|
270852
270858
|
method: "POST",
|
|
270853
270859
|
headers: {
|
|
270854
270860
|
"x-auth-token": accessToken,
|
|
@@ -270957,15 +270963,8 @@ async function codegenBlockscout(env2) {
|
|
|
270957
270963
|
`
|
|
270958
270964
|
})
|
|
270959
270965
|
});
|
|
270960
|
-
if (!response.ok) {
|
|
270961
|
-
throw new Error(`HTTP error! status: ${response.status}`);
|
|
270962
|
-
}
|
|
270963
|
-
const data = await response.json();
|
|
270964
|
-
if (data.errors) {
|
|
270965
|
-
throw new Error("GraphQL errors in response");
|
|
270966
|
-
}
|
|
270967
270966
|
const introspectionJsonPath = resolve4(process.cwd(), "__blockscout-introspection__.json");
|
|
270968
|
-
await writeFile6(introspectionJsonPath, JSON.stringify(data
|
|
270967
|
+
await writeFile6(introspectionJsonPath, JSON.stringify(data));
|
|
270969
270968
|
try {
|
|
270970
270969
|
await generateSchema({
|
|
270971
270970
|
input: basename(introspectionJsonPath),
|
|
@@ -271187,15 +271186,19 @@ async function writeEnvSpinner(prod, env2) {
|
|
|
271187
271186
|
}
|
|
271188
271187
|
|
|
271189
271188
|
// src/utils/get-cluster-service-endpoint.ts
|
|
271190
|
-
async function getGraphEndpoint(service, env2, graphName) {
|
|
271189
|
+
async function getGraphEndpoint(settlemint, service, env2, graphName) {
|
|
271191
271190
|
if (!service || service.__typename !== "HAGraphMiddleware") {
|
|
271192
271191
|
return {};
|
|
271193
271192
|
}
|
|
271193
|
+
const middleware = await retryWhenFailed(() => settlemint.middleware.graphSubgraphs(service.uniqueName, !!graphName));
|
|
271194
|
+
if (!middleware || middleware.__typename !== "HAGraphMiddleware") {
|
|
271195
|
+
return {};
|
|
271196
|
+
}
|
|
271194
271197
|
const isStarterKit = (id) => id.endsWith("-starterkits");
|
|
271195
|
-
const testEndpoint =
|
|
271196
|
-
const starterKitEndpoint =
|
|
271198
|
+
const testEndpoint = middleware.subgraphs.find(({ graphqlQueryEndpoint }) => graphName ? graphqlQueryEndpoint?.id.endsWith(graphName) : !isStarterKit(graphqlQueryEndpoint?.id))?.graphqlQueryEndpoint?.displayValue;
|
|
271199
|
+
const starterKitEndpoint = middleware.subgraphs.find(({ graphqlQueryEndpoint }) => isStarterKit(graphqlQueryEndpoint?.id))?.graphqlQueryEndpoint?.displayValue;
|
|
271197
271200
|
const hasEndpoint = testEndpoint && env2.SETTLEMINT_ACCESS_TOKEN ? await testGqlEndpoint({ accessToken: env2.SETTLEMINT_ACCESS_TOKEN, gqlEndpoint: testEndpoint }) : false;
|
|
271198
|
-
const endpoints = hasEndpoint ?
|
|
271201
|
+
const endpoints = hasEndpoint ? middleware.subgraphs.map(({ graphqlQueryEndpoint }) => graphqlQueryEndpoint?.displayValue) : starterKitEndpoint ? [starterKitEndpoint] : [];
|
|
271199
271202
|
if (endpoints.length === 0) {
|
|
271200
271203
|
return {};
|
|
271201
271204
|
}
|
|
@@ -272941,18 +272944,11 @@ var MiddlewareFragment = graphql(`
|
|
|
272941
272944
|
}
|
|
272942
272945
|
... on HAGraphMiddleware {
|
|
272943
272946
|
specVersion
|
|
272944
|
-
subgraphs(noCache: $noCache) {
|
|
272945
|
-
name
|
|
272946
|
-
graphqlQueryEndpoint {
|
|
272947
|
-
displayValue
|
|
272948
|
-
id
|
|
272949
|
-
}
|
|
272950
|
-
}
|
|
272951
272947
|
}
|
|
272952
272948
|
}
|
|
272953
272949
|
`);
|
|
272954
272950
|
var getMiddlewares = graphql(`
|
|
272955
|
-
query GetMiddlewares($applicationUniqueName: String
|
|
272951
|
+
query GetMiddlewares($applicationUniqueName: String!) {
|
|
272956
272952
|
middlewaresByUniqueName(applicationUniqueName: $applicationUniqueName) {
|
|
272957
272953
|
items {
|
|
272958
272954
|
...Middleware
|
|
@@ -272961,9 +272957,25 @@ var getMiddlewares = graphql(`
|
|
|
272961
272957
|
}
|
|
272962
272958
|
`, [MiddlewareFragment]);
|
|
272963
272959
|
var getMiddleware = graphql(`
|
|
272964
|
-
query GetMiddleware($uniqueName: String
|
|
272960
|
+
query GetMiddleware($uniqueName: String!) {
|
|
272961
|
+
middlewareByUniqueName(uniqueName: $uniqueName) {
|
|
272962
|
+
...Middleware
|
|
272963
|
+
}
|
|
272964
|
+
}
|
|
272965
|
+
`, [MiddlewareFragment]);
|
|
272966
|
+
var getGraphMiddlewareSubgraphs = graphql(`
|
|
272967
|
+
query GetMiddleware($uniqueName: String!, $noCache: Boolean) {
|
|
272965
272968
|
middlewareByUniqueName(uniqueName: $uniqueName) {
|
|
272966
272969
|
...Middleware
|
|
272970
|
+
... on HAGraphMiddleware {
|
|
272971
|
+
subgraphs(noCache: $noCache) {
|
|
272972
|
+
name
|
|
272973
|
+
graphqlQueryEndpoint {
|
|
272974
|
+
displayValue
|
|
272975
|
+
id
|
|
272976
|
+
}
|
|
272977
|
+
}
|
|
272978
|
+
}
|
|
272967
272979
|
}
|
|
272968
272980
|
}
|
|
272969
272981
|
`, [MiddlewareFragment]);
|
|
@@ -272981,7 +272993,6 @@ var createMiddleware = graphql(`
|
|
|
272981
272993
|
$loadBalancerId: ID
|
|
272982
272994
|
$abis: [SmartContractPortalMiddlewareAbiInputDto!]
|
|
272983
272995
|
$includePredeployedAbis: [String!]
|
|
272984
|
-
$noCache: Boolean = false
|
|
272985
272996
|
) {
|
|
272986
272997
|
createMiddleware(
|
|
272987
272998
|
applicationId: $applicationId
|
|
@@ -273002,7 +273013,7 @@ var createMiddleware = graphql(`
|
|
|
273002
273013
|
}
|
|
273003
273014
|
`, [MiddlewareFragment]);
|
|
273004
273015
|
var restartMiddleware = graphql(`
|
|
273005
|
-
mutation RestartMiddleware($uniqueName: String
|
|
273016
|
+
mutation RestartMiddleware($uniqueName: String!) {
|
|
273006
273017
|
restartMiddlewareByUniqueName(uniqueName: $uniqueName) {
|
|
273007
273018
|
...Middleware
|
|
273008
273019
|
}
|
|
@@ -273024,6 +273035,15 @@ var middlewareRead = (gqlClient) => {
|
|
|
273024
273035
|
return middleware;
|
|
273025
273036
|
};
|
|
273026
273037
|
};
|
|
273038
|
+
var graphMiddlewareSubgraphs = (gqlClient) => {
|
|
273039
|
+
return async (middlewareUniqueName, noCache = false) => {
|
|
273040
|
+
const { middlewareByUniqueName: middleware } = await gqlClient.request(getGraphMiddlewareSubgraphs, {
|
|
273041
|
+
uniqueName: middlewareUniqueName,
|
|
273042
|
+
noCache
|
|
273043
|
+
});
|
|
273044
|
+
return middleware;
|
|
273045
|
+
};
|
|
273046
|
+
};
|
|
273027
273047
|
var middlewareCreate = (gqlClient) => {
|
|
273028
273048
|
return async (args) => {
|
|
273029
273049
|
const { applicationUniqueName, blockchainNodeUniqueName, loadBalancerUniqueName, storageUniqueName, ...otherArgs } = args;
|
|
@@ -273222,6 +273242,7 @@ function createSettleMintClient(options) {
|
|
|
273222
273242
|
middleware: {
|
|
273223
273243
|
list: middlewareList(gqlClient),
|
|
273224
273244
|
read: middlewareRead(gqlClient),
|
|
273245
|
+
graphSubgraphs: graphMiddlewareSubgraphs(gqlClient),
|
|
273225
273246
|
create: middlewareCreate(gqlClient),
|
|
273226
273247
|
restart: middlewareRestart(gqlClient)
|
|
273227
273248
|
},
|
|
@@ -273268,461 +273289,6 @@ function createSettleMintClient(options) {
|
|
|
273268
273289
|
};
|
|
273269
273290
|
}
|
|
273270
273291
|
|
|
273271
|
-
// ../../node_modules/@inquirer/core/dist/esm/lib/key.js
|
|
273272
|
-
var isEnterKey2 = (key2) => key2.name === "enter" || key2.name === "return";
|
|
273273
|
-
// ../../node_modules/@inquirer/core/dist/esm/lib/errors.js
|
|
273274
|
-
class AbortPromptError2 extends Error {
|
|
273275
|
-
name = "AbortPromptError";
|
|
273276
|
-
message = "Prompt was aborted";
|
|
273277
|
-
constructor(options) {
|
|
273278
|
-
super();
|
|
273279
|
-
this.cause = options?.cause;
|
|
273280
|
-
}
|
|
273281
|
-
}
|
|
273282
|
-
|
|
273283
|
-
class CancelPromptError2 extends Error {
|
|
273284
|
-
name = "CancelPromptError";
|
|
273285
|
-
message = "Prompt was canceled";
|
|
273286
|
-
}
|
|
273287
|
-
|
|
273288
|
-
class ExitPromptError2 extends Error {
|
|
273289
|
-
name = "ExitPromptError";
|
|
273290
|
-
}
|
|
273291
|
-
|
|
273292
|
-
class HookError2 extends Error {
|
|
273293
|
-
name = "HookError";
|
|
273294
|
-
}
|
|
273295
|
-
|
|
273296
|
-
class ValidationError2 extends Error {
|
|
273297
|
-
name = "ValidationError";
|
|
273298
|
-
}
|
|
273299
|
-
// ../../node_modules/@inquirer/core/dist/esm/lib/use-prefix.js
|
|
273300
|
-
import { AsyncResource as AsyncResource5 } from "node:async_hooks";
|
|
273301
|
-
|
|
273302
|
-
// ../../node_modules/@inquirer/core/dist/esm/lib/hook-engine.js
|
|
273303
|
-
import { AsyncLocalStorage as AsyncLocalStorage2, AsyncResource as AsyncResource4 } from "node:async_hooks";
|
|
273304
|
-
var hookStorage2 = new AsyncLocalStorage2;
|
|
273305
|
-
function createStore2(rl) {
|
|
273306
|
-
const store = {
|
|
273307
|
-
rl,
|
|
273308
|
-
hooks: [],
|
|
273309
|
-
hooksCleanup: [],
|
|
273310
|
-
hooksEffect: [],
|
|
273311
|
-
index: 0,
|
|
273312
|
-
handleChange() {
|
|
273313
|
-
}
|
|
273314
|
-
};
|
|
273315
|
-
return store;
|
|
273316
|
-
}
|
|
273317
|
-
function withHooks2(rl, cb) {
|
|
273318
|
-
const store = createStore2(rl);
|
|
273319
|
-
return hookStorage2.run(store, () => {
|
|
273320
|
-
function cycle(render) {
|
|
273321
|
-
store.handleChange = () => {
|
|
273322
|
-
store.index = 0;
|
|
273323
|
-
render();
|
|
273324
|
-
};
|
|
273325
|
-
store.handleChange();
|
|
273326
|
-
}
|
|
273327
|
-
return cb(cycle);
|
|
273328
|
-
});
|
|
273329
|
-
}
|
|
273330
|
-
function getStore2() {
|
|
273331
|
-
const store = hookStorage2.getStore();
|
|
273332
|
-
if (!store) {
|
|
273333
|
-
throw new HookError2("[Inquirer] Hook functions can only be called from within a prompt");
|
|
273334
|
-
}
|
|
273335
|
-
return store;
|
|
273336
|
-
}
|
|
273337
|
-
function readline3() {
|
|
273338
|
-
return getStore2().rl;
|
|
273339
|
-
}
|
|
273340
|
-
function withUpdates2(fn) {
|
|
273341
|
-
const wrapped = (...args) => {
|
|
273342
|
-
const store = getStore2();
|
|
273343
|
-
let shouldUpdate = false;
|
|
273344
|
-
const oldHandleChange = store.handleChange;
|
|
273345
|
-
store.handleChange = () => {
|
|
273346
|
-
shouldUpdate = true;
|
|
273347
|
-
};
|
|
273348
|
-
const returnValue = fn(...args);
|
|
273349
|
-
if (shouldUpdate) {
|
|
273350
|
-
oldHandleChange();
|
|
273351
|
-
}
|
|
273352
|
-
store.handleChange = oldHandleChange;
|
|
273353
|
-
return returnValue;
|
|
273354
|
-
};
|
|
273355
|
-
return AsyncResource4.bind(wrapped);
|
|
273356
|
-
}
|
|
273357
|
-
function withPointer2(cb) {
|
|
273358
|
-
const store = getStore2();
|
|
273359
|
-
const { index } = store;
|
|
273360
|
-
const pointer = {
|
|
273361
|
-
get() {
|
|
273362
|
-
return store.hooks[index];
|
|
273363
|
-
},
|
|
273364
|
-
set(value4) {
|
|
273365
|
-
store.hooks[index] = value4;
|
|
273366
|
-
},
|
|
273367
|
-
initialized: index in store.hooks
|
|
273368
|
-
};
|
|
273369
|
-
const returnValue = cb(pointer);
|
|
273370
|
-
store.index++;
|
|
273371
|
-
return returnValue;
|
|
273372
|
-
}
|
|
273373
|
-
function handleChange2() {
|
|
273374
|
-
getStore2().handleChange();
|
|
273375
|
-
}
|
|
273376
|
-
var effectScheduler2 = {
|
|
273377
|
-
queue(cb) {
|
|
273378
|
-
const store = getStore2();
|
|
273379
|
-
const { index } = store;
|
|
273380
|
-
store.hooksEffect.push(() => {
|
|
273381
|
-
store.hooksCleanup[index]?.();
|
|
273382
|
-
const cleanFn = cb(readline3());
|
|
273383
|
-
if (cleanFn != null && typeof cleanFn !== "function") {
|
|
273384
|
-
throw new ValidationError2("useEffect return value must be a cleanup function or nothing.");
|
|
273385
|
-
}
|
|
273386
|
-
store.hooksCleanup[index] = cleanFn;
|
|
273387
|
-
});
|
|
273388
|
-
},
|
|
273389
|
-
run() {
|
|
273390
|
-
const store = getStore2();
|
|
273391
|
-
withUpdates2(() => {
|
|
273392
|
-
store.hooksEffect.forEach((effect) => {
|
|
273393
|
-
effect();
|
|
273394
|
-
});
|
|
273395
|
-
store.hooksEffect.length = 0;
|
|
273396
|
-
})();
|
|
273397
|
-
},
|
|
273398
|
-
clearAll() {
|
|
273399
|
-
const store = getStore2();
|
|
273400
|
-
store.hooksCleanup.forEach((cleanFn) => {
|
|
273401
|
-
cleanFn?.();
|
|
273402
|
-
});
|
|
273403
|
-
store.hooksEffect.length = 0;
|
|
273404
|
-
store.hooksCleanup.length = 0;
|
|
273405
|
-
}
|
|
273406
|
-
};
|
|
273407
|
-
|
|
273408
|
-
// ../../node_modules/@inquirer/core/dist/esm/lib/use-state.js
|
|
273409
|
-
function useState2(defaultValue) {
|
|
273410
|
-
return withPointer2((pointer) => {
|
|
273411
|
-
const setFn = (newValue) => {
|
|
273412
|
-
if (pointer.get() !== newValue) {
|
|
273413
|
-
pointer.set(newValue);
|
|
273414
|
-
handleChange2();
|
|
273415
|
-
}
|
|
273416
|
-
};
|
|
273417
|
-
if (pointer.initialized) {
|
|
273418
|
-
return [pointer.get(), setFn];
|
|
273419
|
-
}
|
|
273420
|
-
const value4 = typeof defaultValue === "function" ? defaultValue() : defaultValue;
|
|
273421
|
-
pointer.set(value4);
|
|
273422
|
-
return [value4, setFn];
|
|
273423
|
-
});
|
|
273424
|
-
}
|
|
273425
|
-
|
|
273426
|
-
// ../../node_modules/@inquirer/core/dist/esm/lib/use-effect.js
|
|
273427
|
-
function useEffect2(cb, depArray) {
|
|
273428
|
-
withPointer2((pointer) => {
|
|
273429
|
-
const oldDeps = pointer.get();
|
|
273430
|
-
const hasChanged = !Array.isArray(oldDeps) || depArray.some((dep, i6) => !Object.is(dep, oldDeps[i6]));
|
|
273431
|
-
if (hasChanged) {
|
|
273432
|
-
effectScheduler2.queue(cb);
|
|
273433
|
-
}
|
|
273434
|
-
pointer.set(depArray);
|
|
273435
|
-
});
|
|
273436
|
-
}
|
|
273437
|
-
|
|
273438
|
-
// ../../node_modules/@inquirer/core/dist/esm/lib/theme.js
|
|
273439
|
-
var import_yoctocolors_cjs4 = __toESM(require_yoctocolors_cjs(), 1);
|
|
273440
|
-
var defaultTheme2 = {
|
|
273441
|
-
prefix: {
|
|
273442
|
-
idle: import_yoctocolors_cjs4.default.blue("?"),
|
|
273443
|
-
done: import_yoctocolors_cjs4.default.green(esm_default.tick)
|
|
273444
|
-
},
|
|
273445
|
-
spinner: {
|
|
273446
|
-
interval: 80,
|
|
273447
|
-
frames: ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"].map((frame) => import_yoctocolors_cjs4.default.yellow(frame))
|
|
273448
|
-
},
|
|
273449
|
-
style: {
|
|
273450
|
-
answer: import_yoctocolors_cjs4.default.cyan,
|
|
273451
|
-
message: import_yoctocolors_cjs4.default.bold,
|
|
273452
|
-
error: (text2) => import_yoctocolors_cjs4.default.red(`> ${text2}`),
|
|
273453
|
-
defaultAnswer: (text2) => import_yoctocolors_cjs4.default.dim(`(${text2})`),
|
|
273454
|
-
help: import_yoctocolors_cjs4.default.dim,
|
|
273455
|
-
highlight: import_yoctocolors_cjs4.default.cyan,
|
|
273456
|
-
key: (text2) => import_yoctocolors_cjs4.default.cyan(import_yoctocolors_cjs4.default.bold(`<${text2}>`))
|
|
273457
|
-
}
|
|
273458
|
-
};
|
|
273459
|
-
|
|
273460
|
-
// ../../node_modules/@inquirer/core/dist/esm/lib/make-theme.js
|
|
273461
|
-
function isPlainObject3(value4) {
|
|
273462
|
-
if (typeof value4 !== "object" || value4 === null)
|
|
273463
|
-
return false;
|
|
273464
|
-
let proto = value4;
|
|
273465
|
-
while (Object.getPrototypeOf(proto) !== null) {
|
|
273466
|
-
proto = Object.getPrototypeOf(proto);
|
|
273467
|
-
}
|
|
273468
|
-
return Object.getPrototypeOf(value4) === proto;
|
|
273469
|
-
}
|
|
273470
|
-
function deepMerge3(...objects) {
|
|
273471
|
-
const output = {};
|
|
273472
|
-
for (const obj of objects) {
|
|
273473
|
-
for (const [key2, value4] of Object.entries(obj)) {
|
|
273474
|
-
const prevValue = output[key2];
|
|
273475
|
-
output[key2] = isPlainObject3(prevValue) && isPlainObject3(value4) ? deepMerge3(prevValue, value4) : value4;
|
|
273476
|
-
}
|
|
273477
|
-
}
|
|
273478
|
-
return output;
|
|
273479
|
-
}
|
|
273480
|
-
function makeTheme2(...themes) {
|
|
273481
|
-
const themesToMerge = [
|
|
273482
|
-
defaultTheme2,
|
|
273483
|
-
...themes.filter((theme) => theme != null)
|
|
273484
|
-
];
|
|
273485
|
-
return deepMerge3(...themesToMerge);
|
|
273486
|
-
}
|
|
273487
|
-
|
|
273488
|
-
// ../../node_modules/@inquirer/core/dist/esm/lib/use-prefix.js
|
|
273489
|
-
function usePrefix2({ status = "idle", theme }) {
|
|
273490
|
-
const [showLoader, setShowLoader] = useState2(false);
|
|
273491
|
-
const [tick, setTick] = useState2(0);
|
|
273492
|
-
const { prefix, spinner: spinner2 } = makeTheme2(theme);
|
|
273493
|
-
useEffect2(() => {
|
|
273494
|
-
if (status === "loading") {
|
|
273495
|
-
let tickInterval;
|
|
273496
|
-
let inc = -1;
|
|
273497
|
-
const delayTimeout = setTimeout(AsyncResource5.bind(() => {
|
|
273498
|
-
setShowLoader(true);
|
|
273499
|
-
tickInterval = setInterval(AsyncResource5.bind(() => {
|
|
273500
|
-
inc = inc + 1;
|
|
273501
|
-
setTick(inc % spinner2.frames.length);
|
|
273502
|
-
}), spinner2.interval);
|
|
273503
|
-
}), 300);
|
|
273504
|
-
return () => {
|
|
273505
|
-
clearTimeout(delayTimeout);
|
|
273506
|
-
clearInterval(tickInterval);
|
|
273507
|
-
};
|
|
273508
|
-
} else {
|
|
273509
|
-
setShowLoader(false);
|
|
273510
|
-
}
|
|
273511
|
-
}, [status]);
|
|
273512
|
-
if (showLoader) {
|
|
273513
|
-
return spinner2.frames[tick];
|
|
273514
|
-
}
|
|
273515
|
-
const iconName = status === "loading" ? "idle" : status;
|
|
273516
|
-
return typeof prefix === "string" ? prefix : prefix[iconName] ?? prefix["idle"];
|
|
273517
|
-
}
|
|
273518
|
-
// ../../node_modules/@inquirer/core/dist/esm/lib/use-ref.js
|
|
273519
|
-
function useRef2(val) {
|
|
273520
|
-
return useState2({ current: val })[0];
|
|
273521
|
-
}
|
|
273522
|
-
|
|
273523
|
-
// ../../node_modules/@inquirer/core/dist/esm/lib/use-keypress.js
|
|
273524
|
-
function useKeypress2(userHandler) {
|
|
273525
|
-
const signal = useRef2(userHandler);
|
|
273526
|
-
signal.current = userHandler;
|
|
273527
|
-
useEffect2((rl) => {
|
|
273528
|
-
let ignore = false;
|
|
273529
|
-
const handler = withUpdates2((_input, event) => {
|
|
273530
|
-
if (ignore)
|
|
273531
|
-
return;
|
|
273532
|
-
signal.current(event, rl);
|
|
273533
|
-
});
|
|
273534
|
-
rl.input.on("keypress", handler);
|
|
273535
|
-
return () => {
|
|
273536
|
-
ignore = true;
|
|
273537
|
-
rl.input.removeListener("keypress", handler);
|
|
273538
|
-
};
|
|
273539
|
-
}, []);
|
|
273540
|
-
}
|
|
273541
|
-
// ../../node_modules/@inquirer/core/dist/esm/lib/utils.js
|
|
273542
|
-
var import_cli_width2 = __toESM(require_cli_width(), 1);
|
|
273543
|
-
var import_wrap_ansi2 = __toESM(require_wrap_ansi(), 1);
|
|
273544
|
-
function breakLines2(content, width) {
|
|
273545
|
-
return content.split(`
|
|
273546
|
-
`).flatMap((line) => import_wrap_ansi2.default(line, width, { trim: false, hard: true }).split(`
|
|
273547
|
-
`).map((str) => str.trimEnd())).join(`
|
|
273548
|
-
`);
|
|
273549
|
-
}
|
|
273550
|
-
function readlineWidth2() {
|
|
273551
|
-
return import_cli_width2.default({ defaultWidth: 80, output: readline3().output });
|
|
273552
|
-
}
|
|
273553
|
-
|
|
273554
|
-
// ../../node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
|
|
273555
|
-
var import_mute_stream2 = __toESM(require_lib13(), 1);
|
|
273556
|
-
init_mjs();
|
|
273557
|
-
import * as readline4 from "node:readline";
|
|
273558
|
-
import { AsyncResource as AsyncResource6 } from "node:async_hooks";
|
|
273559
|
-
|
|
273560
|
-
// ../../node_modules/@inquirer/core/dist/esm/lib/screen-manager.js
|
|
273561
|
-
var import_strip_ansi2 = __toESM(require_strip_ansi(), 1);
|
|
273562
|
-
var import_ansi_escapes3 = __toESM(require_ansi_escapes(), 1);
|
|
273563
|
-
var height2 = (content) => content.split(`
|
|
273564
|
-
`).length;
|
|
273565
|
-
var lastLine2 = (content) => content.split(`
|
|
273566
|
-
`).pop() ?? "";
|
|
273567
|
-
function cursorDown2(n6) {
|
|
273568
|
-
return n6 > 0 ? import_ansi_escapes3.default.cursorDown(n6) : "";
|
|
273569
|
-
}
|
|
273570
|
-
|
|
273571
|
-
class ScreenManager2 {
|
|
273572
|
-
rl;
|
|
273573
|
-
height = 0;
|
|
273574
|
-
extraLinesUnderPrompt = 0;
|
|
273575
|
-
cursorPos;
|
|
273576
|
-
constructor(rl) {
|
|
273577
|
-
this.rl = rl;
|
|
273578
|
-
this.rl = rl;
|
|
273579
|
-
this.cursorPos = rl.getCursorPos();
|
|
273580
|
-
}
|
|
273581
|
-
write(content) {
|
|
273582
|
-
this.rl.output.unmute();
|
|
273583
|
-
this.rl.output.write(content);
|
|
273584
|
-
this.rl.output.mute();
|
|
273585
|
-
}
|
|
273586
|
-
render(content, bottomContent = "") {
|
|
273587
|
-
const promptLine = lastLine2(content);
|
|
273588
|
-
const rawPromptLine = import_strip_ansi2.default(promptLine);
|
|
273589
|
-
let prompt = rawPromptLine;
|
|
273590
|
-
if (this.rl.line.length > 0) {
|
|
273591
|
-
prompt = prompt.slice(0, -this.rl.line.length);
|
|
273592
|
-
}
|
|
273593
|
-
this.rl.setPrompt(prompt);
|
|
273594
|
-
this.cursorPos = this.rl.getCursorPos();
|
|
273595
|
-
const width = readlineWidth2();
|
|
273596
|
-
content = breakLines2(content, width);
|
|
273597
|
-
bottomContent = breakLines2(bottomContent, width);
|
|
273598
|
-
if (rawPromptLine.length % width === 0) {
|
|
273599
|
-
content += `
|
|
273600
|
-
`;
|
|
273601
|
-
}
|
|
273602
|
-
let output = content + (bottomContent ? `
|
|
273603
|
-
` + bottomContent : "");
|
|
273604
|
-
const promptLineUpDiff = Math.floor(rawPromptLine.length / width) - this.cursorPos.rows;
|
|
273605
|
-
const bottomContentHeight = promptLineUpDiff + (bottomContent ? height2(bottomContent) : 0);
|
|
273606
|
-
if (bottomContentHeight > 0)
|
|
273607
|
-
output += import_ansi_escapes3.default.cursorUp(bottomContentHeight);
|
|
273608
|
-
output += import_ansi_escapes3.default.cursorTo(this.cursorPos.cols);
|
|
273609
|
-
this.write(cursorDown2(this.extraLinesUnderPrompt) + import_ansi_escapes3.default.eraseLines(this.height) + output);
|
|
273610
|
-
this.extraLinesUnderPrompt = bottomContentHeight;
|
|
273611
|
-
this.height = height2(output);
|
|
273612
|
-
}
|
|
273613
|
-
checkCursorPos() {
|
|
273614
|
-
const cursorPos = this.rl.getCursorPos();
|
|
273615
|
-
if (cursorPos.cols !== this.cursorPos.cols) {
|
|
273616
|
-
this.write(import_ansi_escapes3.default.cursorTo(cursorPos.cols));
|
|
273617
|
-
this.cursorPos = cursorPos;
|
|
273618
|
-
}
|
|
273619
|
-
}
|
|
273620
|
-
done({ clearContent }) {
|
|
273621
|
-
this.rl.setPrompt("");
|
|
273622
|
-
let output = cursorDown2(this.extraLinesUnderPrompt);
|
|
273623
|
-
output += clearContent ? import_ansi_escapes3.default.eraseLines(this.height) : `
|
|
273624
|
-
`;
|
|
273625
|
-
output += import_ansi_escapes3.default.cursorShow;
|
|
273626
|
-
this.write(output);
|
|
273627
|
-
this.rl.close();
|
|
273628
|
-
}
|
|
273629
|
-
}
|
|
273630
|
-
|
|
273631
|
-
// ../../node_modules/@inquirer/core/dist/esm/lib/promise-polyfill.js
|
|
273632
|
-
class PromisePolyfill2 extends Promise {
|
|
273633
|
-
static withResolver() {
|
|
273634
|
-
let resolve5;
|
|
273635
|
-
let reject;
|
|
273636
|
-
const promise = new Promise((res, rej) => {
|
|
273637
|
-
resolve5 = res;
|
|
273638
|
-
reject = rej;
|
|
273639
|
-
});
|
|
273640
|
-
return { promise, resolve: resolve5, reject };
|
|
273641
|
-
}
|
|
273642
|
-
}
|
|
273643
|
-
|
|
273644
|
-
// ../../node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
|
|
273645
|
-
function getCallSites2() {
|
|
273646
|
-
const _prepareStackTrace = Error.prepareStackTrace;
|
|
273647
|
-
try {
|
|
273648
|
-
let result = [];
|
|
273649
|
-
Error.prepareStackTrace = (_5, callSites) => {
|
|
273650
|
-
const callSitesWithoutCurrent = callSites.slice(1);
|
|
273651
|
-
result = callSitesWithoutCurrent;
|
|
273652
|
-
return callSitesWithoutCurrent;
|
|
273653
|
-
};
|
|
273654
|
-
new Error().stack;
|
|
273655
|
-
return result;
|
|
273656
|
-
} finally {
|
|
273657
|
-
Error.prepareStackTrace = _prepareStackTrace;
|
|
273658
|
-
}
|
|
273659
|
-
}
|
|
273660
|
-
function createPrompt2(view) {
|
|
273661
|
-
const callSites = getCallSites2();
|
|
273662
|
-
const callerFilename = callSites[1]?.getFileName?.();
|
|
273663
|
-
const prompt = (config4, context = {}) => {
|
|
273664
|
-
const { input = process.stdin, signal } = context;
|
|
273665
|
-
const cleanups = new Set;
|
|
273666
|
-
const output = new import_mute_stream2.default;
|
|
273667
|
-
output.pipe(context.output ?? process.stdout);
|
|
273668
|
-
const rl = readline4.createInterface({
|
|
273669
|
-
terminal: true,
|
|
273670
|
-
input,
|
|
273671
|
-
output
|
|
273672
|
-
});
|
|
273673
|
-
const screen = new ScreenManager2(rl);
|
|
273674
|
-
const { promise, resolve: resolve5, reject } = PromisePolyfill2.withResolver();
|
|
273675
|
-
const cancel4 = () => reject(new CancelPromptError2);
|
|
273676
|
-
if (signal) {
|
|
273677
|
-
const abort = () => reject(new AbortPromptError2({ cause: signal.reason }));
|
|
273678
|
-
if (signal.aborted) {
|
|
273679
|
-
abort();
|
|
273680
|
-
return Object.assign(promise, { cancel: cancel4 });
|
|
273681
|
-
}
|
|
273682
|
-
signal.addEventListener("abort", abort);
|
|
273683
|
-
cleanups.add(() => signal.removeEventListener("abort", abort));
|
|
273684
|
-
}
|
|
273685
|
-
cleanups.add(onExit((code2, signal2) => {
|
|
273686
|
-
reject(new ExitPromptError2(`User force closed the prompt with ${code2} ${signal2}`));
|
|
273687
|
-
}));
|
|
273688
|
-
const checkCursorPos = () => screen.checkCursorPos();
|
|
273689
|
-
rl.input.on("keypress", checkCursorPos);
|
|
273690
|
-
cleanups.add(() => rl.input.removeListener("keypress", checkCursorPos));
|
|
273691
|
-
return withHooks2(rl, (cycle) => {
|
|
273692
|
-
const hooksCleanup = AsyncResource6.bind(() => effectScheduler2.clearAll());
|
|
273693
|
-
rl.on("close", hooksCleanup);
|
|
273694
|
-
cleanups.add(() => rl.removeListener("close", hooksCleanup));
|
|
273695
|
-
cycle(() => {
|
|
273696
|
-
try {
|
|
273697
|
-
const nextView = view(config4, (value4) => {
|
|
273698
|
-
setImmediate(() => resolve5(value4));
|
|
273699
|
-
});
|
|
273700
|
-
if (nextView === undefined) {
|
|
273701
|
-
throw new Error(`Prompt functions must return a string.
|
|
273702
|
-
at ${callerFilename}`);
|
|
273703
|
-
}
|
|
273704
|
-
const [content, bottomContent] = typeof nextView === "string" ? [nextView] : nextView;
|
|
273705
|
-
screen.render(content, bottomContent);
|
|
273706
|
-
effectScheduler2.run();
|
|
273707
|
-
} catch (error5) {
|
|
273708
|
-
reject(error5);
|
|
273709
|
-
}
|
|
273710
|
-
});
|
|
273711
|
-
return Object.assign(promise.then((answer) => {
|
|
273712
|
-
effectScheduler2.clearAll();
|
|
273713
|
-
return answer;
|
|
273714
|
-
}, (error5) => {
|
|
273715
|
-
effectScheduler2.clearAll();
|
|
273716
|
-
throw error5;
|
|
273717
|
-
}).finally(() => {
|
|
273718
|
-
cleanups.forEach((cleanup) => cleanup());
|
|
273719
|
-
screen.done({ clearContent: Boolean(context.clearPromptOnDone) });
|
|
273720
|
-
output.end();
|
|
273721
|
-
}).then(() => promise), { cancel: cancel4 });
|
|
273722
|
-
});
|
|
273723
|
-
};
|
|
273724
|
-
return prompt;
|
|
273725
|
-
}
|
|
273726
273292
|
// ../../node_modules/@inquirer/confirm/dist/esm/index.js
|
|
273727
273293
|
function getBooleanValue(value4, defaultValue) {
|
|
273728
273294
|
let answer = defaultValue !== false;
|
|
@@ -273735,19 +273301,19 @@ function getBooleanValue(value4, defaultValue) {
|
|
|
273735
273301
|
function boolToString(value4) {
|
|
273736
273302
|
return value4 ? "Yes" : "No";
|
|
273737
273303
|
}
|
|
273738
|
-
var esm_default3 =
|
|
273304
|
+
var esm_default3 = createPrompt((config4, done) => {
|
|
273739
273305
|
const { transformer = boolToString } = config4;
|
|
273740
|
-
const [status, setStatus] =
|
|
273741
|
-
const [value4, setValue] =
|
|
273742
|
-
const theme =
|
|
273743
|
-
const prefix =
|
|
273744
|
-
|
|
273745
|
-
if (
|
|
273306
|
+
const [status, setStatus] = useState("idle");
|
|
273307
|
+
const [value4, setValue] = useState("");
|
|
273308
|
+
const theme = makeTheme(config4.theme);
|
|
273309
|
+
const prefix = usePrefix({ status, theme });
|
|
273310
|
+
useKeypress((key2, rl) => {
|
|
273311
|
+
if (isEnterKey(key2)) {
|
|
273746
273312
|
const answer = getBooleanValue(value4, config4.default);
|
|
273747
273313
|
setValue(transformer(answer));
|
|
273748
273314
|
setStatus("done");
|
|
273749
273315
|
done(answer);
|
|
273750
|
-
} else if (
|
|
273316
|
+
} else if (key2.name === "tab") {
|
|
273751
273317
|
const answer = boolToString(!getBooleanValue(value4, config4.default));
|
|
273752
273318
|
rl.clearLine(0);
|
|
273753
273319
|
rl.write(answer);
|
|
@@ -273767,479 +273333,23 @@ var esm_default3 = createPrompt2((config4, done) => {
|
|
|
273767
273333
|
return `${prefix} ${message}${defaultValue} ${formattedValue}`;
|
|
273768
273334
|
});
|
|
273769
273335
|
|
|
273770
|
-
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/key.js
|
|
273771
|
-
var isBackspaceKey2 = (key3) => key3.name === "backspace";
|
|
273772
|
-
var isEnterKey3 = (key3) => key3.name === "enter" || key3.name === "return";
|
|
273773
|
-
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/errors.js
|
|
273774
|
-
class AbortPromptError3 extends Error {
|
|
273775
|
-
name = "AbortPromptError";
|
|
273776
|
-
message = "Prompt was aborted";
|
|
273777
|
-
constructor(options) {
|
|
273778
|
-
super();
|
|
273779
|
-
this.cause = options?.cause;
|
|
273780
|
-
}
|
|
273781
|
-
}
|
|
273782
|
-
|
|
273783
|
-
class CancelPromptError3 extends Error {
|
|
273784
|
-
name = "CancelPromptError";
|
|
273785
|
-
message = "Prompt was canceled";
|
|
273786
|
-
}
|
|
273787
|
-
|
|
273788
|
-
class ExitPromptError3 extends Error {
|
|
273789
|
-
name = "ExitPromptError";
|
|
273790
|
-
}
|
|
273791
|
-
|
|
273792
|
-
class HookError3 extends Error {
|
|
273793
|
-
name = "HookError";
|
|
273794
|
-
}
|
|
273795
|
-
|
|
273796
|
-
class ValidationError3 extends Error {
|
|
273797
|
-
name = "ValidationError";
|
|
273798
|
-
}
|
|
273799
|
-
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/use-prefix.js
|
|
273800
|
-
import { AsyncResource as AsyncResource8 } from "node:async_hooks";
|
|
273801
|
-
|
|
273802
|
-
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/hook-engine.js
|
|
273803
|
-
import { AsyncLocalStorage as AsyncLocalStorage3, AsyncResource as AsyncResource7 } from "node:async_hooks";
|
|
273804
|
-
var hookStorage3 = new AsyncLocalStorage3;
|
|
273805
|
-
function createStore3(rl) {
|
|
273806
|
-
const store = {
|
|
273807
|
-
rl,
|
|
273808
|
-
hooks: [],
|
|
273809
|
-
hooksCleanup: [],
|
|
273810
|
-
hooksEffect: [],
|
|
273811
|
-
index: 0,
|
|
273812
|
-
handleChange() {
|
|
273813
|
-
}
|
|
273814
|
-
};
|
|
273815
|
-
return store;
|
|
273816
|
-
}
|
|
273817
|
-
function withHooks3(rl, cb) {
|
|
273818
|
-
const store = createStore3(rl);
|
|
273819
|
-
return hookStorage3.run(store, () => {
|
|
273820
|
-
function cycle(render) {
|
|
273821
|
-
store.handleChange = () => {
|
|
273822
|
-
store.index = 0;
|
|
273823
|
-
render();
|
|
273824
|
-
};
|
|
273825
|
-
store.handleChange();
|
|
273826
|
-
}
|
|
273827
|
-
return cb(cycle);
|
|
273828
|
-
});
|
|
273829
|
-
}
|
|
273830
|
-
function getStore3() {
|
|
273831
|
-
const store = hookStorage3.getStore();
|
|
273832
|
-
if (!store) {
|
|
273833
|
-
throw new HookError3("[Inquirer] Hook functions can only be called from within a prompt");
|
|
273834
|
-
}
|
|
273835
|
-
return store;
|
|
273836
|
-
}
|
|
273837
|
-
function readline5() {
|
|
273838
|
-
return getStore3().rl;
|
|
273839
|
-
}
|
|
273840
|
-
function withUpdates3(fn) {
|
|
273841
|
-
const wrapped = (...args) => {
|
|
273842
|
-
const store = getStore3();
|
|
273843
|
-
let shouldUpdate = false;
|
|
273844
|
-
const oldHandleChange = store.handleChange;
|
|
273845
|
-
store.handleChange = () => {
|
|
273846
|
-
shouldUpdate = true;
|
|
273847
|
-
};
|
|
273848
|
-
const returnValue = fn(...args);
|
|
273849
|
-
if (shouldUpdate) {
|
|
273850
|
-
oldHandleChange();
|
|
273851
|
-
}
|
|
273852
|
-
store.handleChange = oldHandleChange;
|
|
273853
|
-
return returnValue;
|
|
273854
|
-
};
|
|
273855
|
-
return AsyncResource7.bind(wrapped);
|
|
273856
|
-
}
|
|
273857
|
-
function withPointer3(cb) {
|
|
273858
|
-
const store = getStore3();
|
|
273859
|
-
const { index } = store;
|
|
273860
|
-
const pointer = {
|
|
273861
|
-
get() {
|
|
273862
|
-
return store.hooks[index];
|
|
273863
|
-
},
|
|
273864
|
-
set(value4) {
|
|
273865
|
-
store.hooks[index] = value4;
|
|
273866
|
-
},
|
|
273867
|
-
initialized: index in store.hooks
|
|
273868
|
-
};
|
|
273869
|
-
const returnValue = cb(pointer);
|
|
273870
|
-
store.index++;
|
|
273871
|
-
return returnValue;
|
|
273872
|
-
}
|
|
273873
|
-
function handleChange3() {
|
|
273874
|
-
getStore3().handleChange();
|
|
273875
|
-
}
|
|
273876
|
-
var effectScheduler3 = {
|
|
273877
|
-
queue(cb) {
|
|
273878
|
-
const store = getStore3();
|
|
273879
|
-
const { index } = store;
|
|
273880
|
-
store.hooksEffect.push(() => {
|
|
273881
|
-
store.hooksCleanup[index]?.();
|
|
273882
|
-
const cleanFn = cb(readline5());
|
|
273883
|
-
if (cleanFn != null && typeof cleanFn !== "function") {
|
|
273884
|
-
throw new ValidationError3("useEffect return value must be a cleanup function or nothing.");
|
|
273885
|
-
}
|
|
273886
|
-
store.hooksCleanup[index] = cleanFn;
|
|
273887
|
-
});
|
|
273888
|
-
},
|
|
273889
|
-
run() {
|
|
273890
|
-
const store = getStore3();
|
|
273891
|
-
withUpdates3(() => {
|
|
273892
|
-
store.hooksEffect.forEach((effect) => {
|
|
273893
|
-
effect();
|
|
273894
|
-
});
|
|
273895
|
-
store.hooksEffect.length = 0;
|
|
273896
|
-
})();
|
|
273897
|
-
},
|
|
273898
|
-
clearAll() {
|
|
273899
|
-
const store = getStore3();
|
|
273900
|
-
store.hooksCleanup.forEach((cleanFn) => {
|
|
273901
|
-
cleanFn?.();
|
|
273902
|
-
});
|
|
273903
|
-
store.hooksEffect.length = 0;
|
|
273904
|
-
store.hooksCleanup.length = 0;
|
|
273905
|
-
}
|
|
273906
|
-
};
|
|
273907
|
-
|
|
273908
|
-
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/use-state.js
|
|
273909
|
-
function useState3(defaultValue) {
|
|
273910
|
-
return withPointer3((pointer) => {
|
|
273911
|
-
const setFn = (newValue) => {
|
|
273912
|
-
if (pointer.get() !== newValue) {
|
|
273913
|
-
pointer.set(newValue);
|
|
273914
|
-
handleChange3();
|
|
273915
|
-
}
|
|
273916
|
-
};
|
|
273917
|
-
if (pointer.initialized) {
|
|
273918
|
-
return [pointer.get(), setFn];
|
|
273919
|
-
}
|
|
273920
|
-
const value4 = typeof defaultValue === "function" ? defaultValue() : defaultValue;
|
|
273921
|
-
pointer.set(value4);
|
|
273922
|
-
return [value4, setFn];
|
|
273923
|
-
});
|
|
273924
|
-
}
|
|
273925
|
-
|
|
273926
|
-
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/use-effect.js
|
|
273927
|
-
function useEffect3(cb, depArray) {
|
|
273928
|
-
withPointer3((pointer) => {
|
|
273929
|
-
const oldDeps = pointer.get();
|
|
273930
|
-
const hasChanged = !Array.isArray(oldDeps) || depArray.some((dep, i6) => !Object.is(dep, oldDeps[i6]));
|
|
273931
|
-
if (hasChanged) {
|
|
273932
|
-
effectScheduler3.queue(cb);
|
|
273933
|
-
}
|
|
273934
|
-
pointer.set(depArray);
|
|
273935
|
-
});
|
|
273936
|
-
}
|
|
273937
|
-
|
|
273938
|
-
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/theme.js
|
|
273939
|
-
var import_yoctocolors_cjs5 = __toESM(require_yoctocolors_cjs(), 1);
|
|
273940
|
-
var defaultTheme3 = {
|
|
273941
|
-
prefix: {
|
|
273942
|
-
idle: import_yoctocolors_cjs5.default.blue("?"),
|
|
273943
|
-
done: import_yoctocolors_cjs5.default.green(esm_default.tick)
|
|
273944
|
-
},
|
|
273945
|
-
spinner: {
|
|
273946
|
-
interval: 80,
|
|
273947
|
-
frames: ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"].map((frame) => import_yoctocolors_cjs5.default.yellow(frame))
|
|
273948
|
-
},
|
|
273949
|
-
style: {
|
|
273950
|
-
answer: import_yoctocolors_cjs5.default.cyan,
|
|
273951
|
-
message: import_yoctocolors_cjs5.default.bold,
|
|
273952
|
-
error: (text2) => import_yoctocolors_cjs5.default.red(`> ${text2}`),
|
|
273953
|
-
defaultAnswer: (text2) => import_yoctocolors_cjs5.default.dim(`(${text2})`),
|
|
273954
|
-
help: import_yoctocolors_cjs5.default.dim,
|
|
273955
|
-
highlight: import_yoctocolors_cjs5.default.cyan,
|
|
273956
|
-
key: (text2) => import_yoctocolors_cjs5.default.cyan(import_yoctocolors_cjs5.default.bold(`<${text2}>`))
|
|
273957
|
-
}
|
|
273958
|
-
};
|
|
273959
|
-
|
|
273960
|
-
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/make-theme.js
|
|
273961
|
-
function isPlainObject4(value4) {
|
|
273962
|
-
if (typeof value4 !== "object" || value4 === null)
|
|
273963
|
-
return false;
|
|
273964
|
-
let proto = value4;
|
|
273965
|
-
while (Object.getPrototypeOf(proto) !== null) {
|
|
273966
|
-
proto = Object.getPrototypeOf(proto);
|
|
273967
|
-
}
|
|
273968
|
-
return Object.getPrototypeOf(value4) === proto;
|
|
273969
|
-
}
|
|
273970
|
-
function deepMerge4(...objects) {
|
|
273971
|
-
const output = {};
|
|
273972
|
-
for (const obj of objects) {
|
|
273973
|
-
for (const [key3, value4] of Object.entries(obj)) {
|
|
273974
|
-
const prevValue = output[key3];
|
|
273975
|
-
output[key3] = isPlainObject4(prevValue) && isPlainObject4(value4) ? deepMerge4(prevValue, value4) : value4;
|
|
273976
|
-
}
|
|
273977
|
-
}
|
|
273978
|
-
return output;
|
|
273979
|
-
}
|
|
273980
|
-
function makeTheme3(...themes) {
|
|
273981
|
-
const themesToMerge = [
|
|
273982
|
-
defaultTheme3,
|
|
273983
|
-
...themes.filter((theme) => theme != null)
|
|
273984
|
-
];
|
|
273985
|
-
return deepMerge4(...themesToMerge);
|
|
273986
|
-
}
|
|
273987
|
-
|
|
273988
|
-
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/use-prefix.js
|
|
273989
|
-
function usePrefix3({ status = "idle", theme }) {
|
|
273990
|
-
const [showLoader, setShowLoader] = useState3(false);
|
|
273991
|
-
const [tick, setTick] = useState3(0);
|
|
273992
|
-
const { prefix, spinner: spinner2 } = makeTheme3(theme);
|
|
273993
|
-
useEffect3(() => {
|
|
273994
|
-
if (status === "loading") {
|
|
273995
|
-
let tickInterval;
|
|
273996
|
-
let inc = -1;
|
|
273997
|
-
const delayTimeout = setTimeout(AsyncResource8.bind(() => {
|
|
273998
|
-
setShowLoader(true);
|
|
273999
|
-
tickInterval = setInterval(AsyncResource8.bind(() => {
|
|
274000
|
-
inc = inc + 1;
|
|
274001
|
-
setTick(inc % spinner2.frames.length);
|
|
274002
|
-
}), spinner2.interval);
|
|
274003
|
-
}), 300);
|
|
274004
|
-
return () => {
|
|
274005
|
-
clearTimeout(delayTimeout);
|
|
274006
|
-
clearInterval(tickInterval);
|
|
274007
|
-
};
|
|
274008
|
-
} else {
|
|
274009
|
-
setShowLoader(false);
|
|
274010
|
-
}
|
|
274011
|
-
}, [status]);
|
|
274012
|
-
if (showLoader) {
|
|
274013
|
-
return spinner2.frames[tick];
|
|
274014
|
-
}
|
|
274015
|
-
const iconName = status === "loading" ? "idle" : status;
|
|
274016
|
-
return typeof prefix === "string" ? prefix : prefix[iconName] ?? prefix["idle"];
|
|
274017
|
-
}
|
|
274018
|
-
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/use-ref.js
|
|
274019
|
-
function useRef3(val) {
|
|
274020
|
-
return useState3({ current: val })[0];
|
|
274021
|
-
}
|
|
274022
|
-
|
|
274023
|
-
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/use-keypress.js
|
|
274024
|
-
function useKeypress3(userHandler) {
|
|
274025
|
-
const signal = useRef3(userHandler);
|
|
274026
|
-
signal.current = userHandler;
|
|
274027
|
-
useEffect3((rl) => {
|
|
274028
|
-
let ignore = false;
|
|
274029
|
-
const handler = withUpdates3((_input, event) => {
|
|
274030
|
-
if (ignore)
|
|
274031
|
-
return;
|
|
274032
|
-
signal.current(event, rl);
|
|
274033
|
-
});
|
|
274034
|
-
rl.input.on("keypress", handler);
|
|
274035
|
-
return () => {
|
|
274036
|
-
ignore = true;
|
|
274037
|
-
rl.input.removeListener("keypress", handler);
|
|
274038
|
-
};
|
|
274039
|
-
}, []);
|
|
274040
|
-
}
|
|
274041
|
-
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/utils.js
|
|
274042
|
-
var import_cli_width3 = __toESM(require_cli_width(), 1);
|
|
274043
|
-
var import_wrap_ansi3 = __toESM(require_wrap_ansi(), 1);
|
|
274044
|
-
function breakLines3(content, width) {
|
|
274045
|
-
return content.split(`
|
|
274046
|
-
`).flatMap((line) => import_wrap_ansi3.default(line, width, { trim: false, hard: true }).split(`
|
|
274047
|
-
`).map((str) => str.trimEnd())).join(`
|
|
274048
|
-
`);
|
|
274049
|
-
}
|
|
274050
|
-
function readlineWidth3() {
|
|
274051
|
-
return import_cli_width3.default({ defaultWidth: 80, output: readline5().output });
|
|
274052
|
-
}
|
|
274053
|
-
|
|
274054
|
-
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
|
|
274055
|
-
var import_mute_stream3 = __toESM(require_lib13(), 1);
|
|
274056
|
-
init_mjs();
|
|
274057
|
-
import * as readline6 from "node:readline";
|
|
274058
|
-
import { AsyncResource as AsyncResource9 } from "node:async_hooks";
|
|
274059
|
-
|
|
274060
|
-
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/screen-manager.js
|
|
274061
|
-
var import_strip_ansi3 = __toESM(require_strip_ansi(), 1);
|
|
274062
|
-
var import_ansi_escapes4 = __toESM(require_ansi_escapes(), 1);
|
|
274063
|
-
var height3 = (content) => content.split(`
|
|
274064
|
-
`).length;
|
|
274065
|
-
var lastLine3 = (content) => content.split(`
|
|
274066
|
-
`).pop() ?? "";
|
|
274067
|
-
function cursorDown3(n6) {
|
|
274068
|
-
return n6 > 0 ? import_ansi_escapes4.default.cursorDown(n6) : "";
|
|
274069
|
-
}
|
|
274070
|
-
|
|
274071
|
-
class ScreenManager3 {
|
|
274072
|
-
rl;
|
|
274073
|
-
height = 0;
|
|
274074
|
-
extraLinesUnderPrompt = 0;
|
|
274075
|
-
cursorPos;
|
|
274076
|
-
constructor(rl) {
|
|
274077
|
-
this.rl = rl;
|
|
274078
|
-
this.rl = rl;
|
|
274079
|
-
this.cursorPos = rl.getCursorPos();
|
|
274080
|
-
}
|
|
274081
|
-
write(content) {
|
|
274082
|
-
this.rl.output.unmute();
|
|
274083
|
-
this.rl.output.write(content);
|
|
274084
|
-
this.rl.output.mute();
|
|
274085
|
-
}
|
|
274086
|
-
render(content, bottomContent = "") {
|
|
274087
|
-
const promptLine = lastLine3(content);
|
|
274088
|
-
const rawPromptLine = import_strip_ansi3.default(promptLine);
|
|
274089
|
-
let prompt = rawPromptLine;
|
|
274090
|
-
if (this.rl.line.length > 0) {
|
|
274091
|
-
prompt = prompt.slice(0, -this.rl.line.length);
|
|
274092
|
-
}
|
|
274093
|
-
this.rl.setPrompt(prompt);
|
|
274094
|
-
this.cursorPos = this.rl.getCursorPos();
|
|
274095
|
-
const width = readlineWidth3();
|
|
274096
|
-
content = breakLines3(content, width);
|
|
274097
|
-
bottomContent = breakLines3(bottomContent, width);
|
|
274098
|
-
if (rawPromptLine.length % width === 0) {
|
|
274099
|
-
content += `
|
|
274100
|
-
`;
|
|
274101
|
-
}
|
|
274102
|
-
let output = content + (bottomContent ? `
|
|
274103
|
-
` + bottomContent : "");
|
|
274104
|
-
const promptLineUpDiff = Math.floor(rawPromptLine.length / width) - this.cursorPos.rows;
|
|
274105
|
-
const bottomContentHeight = promptLineUpDiff + (bottomContent ? height3(bottomContent) : 0);
|
|
274106
|
-
if (bottomContentHeight > 0)
|
|
274107
|
-
output += import_ansi_escapes4.default.cursorUp(bottomContentHeight);
|
|
274108
|
-
output += import_ansi_escapes4.default.cursorTo(this.cursorPos.cols);
|
|
274109
|
-
this.write(cursorDown3(this.extraLinesUnderPrompt) + import_ansi_escapes4.default.eraseLines(this.height) + output);
|
|
274110
|
-
this.extraLinesUnderPrompt = bottomContentHeight;
|
|
274111
|
-
this.height = height3(output);
|
|
274112
|
-
}
|
|
274113
|
-
checkCursorPos() {
|
|
274114
|
-
const cursorPos = this.rl.getCursorPos();
|
|
274115
|
-
if (cursorPos.cols !== this.cursorPos.cols) {
|
|
274116
|
-
this.write(import_ansi_escapes4.default.cursorTo(cursorPos.cols));
|
|
274117
|
-
this.cursorPos = cursorPos;
|
|
274118
|
-
}
|
|
274119
|
-
}
|
|
274120
|
-
done({ clearContent }) {
|
|
274121
|
-
this.rl.setPrompt("");
|
|
274122
|
-
let output = cursorDown3(this.extraLinesUnderPrompt);
|
|
274123
|
-
output += clearContent ? import_ansi_escapes4.default.eraseLines(this.height) : `
|
|
274124
|
-
`;
|
|
274125
|
-
output += import_ansi_escapes4.default.cursorShow;
|
|
274126
|
-
this.write(output);
|
|
274127
|
-
this.rl.close();
|
|
274128
|
-
}
|
|
274129
|
-
}
|
|
274130
|
-
|
|
274131
|
-
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/promise-polyfill.js
|
|
274132
|
-
class PromisePolyfill3 extends Promise {
|
|
274133
|
-
static withResolver() {
|
|
274134
|
-
let resolve5;
|
|
274135
|
-
let reject;
|
|
274136
|
-
const promise = new Promise((res, rej) => {
|
|
274137
|
-
resolve5 = res;
|
|
274138
|
-
reject = rej;
|
|
274139
|
-
});
|
|
274140
|
-
return { promise, resolve: resolve5, reject };
|
|
274141
|
-
}
|
|
274142
|
-
}
|
|
274143
|
-
|
|
274144
|
-
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
|
|
274145
|
-
function getCallSites3() {
|
|
274146
|
-
const _prepareStackTrace = Error.prepareStackTrace;
|
|
274147
|
-
try {
|
|
274148
|
-
let result = [];
|
|
274149
|
-
Error.prepareStackTrace = (_5, callSites) => {
|
|
274150
|
-
const callSitesWithoutCurrent = callSites.slice(1);
|
|
274151
|
-
result = callSitesWithoutCurrent;
|
|
274152
|
-
return callSitesWithoutCurrent;
|
|
274153
|
-
};
|
|
274154
|
-
new Error().stack;
|
|
274155
|
-
return result;
|
|
274156
|
-
} finally {
|
|
274157
|
-
Error.prepareStackTrace = _prepareStackTrace;
|
|
274158
|
-
}
|
|
274159
|
-
}
|
|
274160
|
-
function createPrompt3(view) {
|
|
274161
|
-
const callSites = getCallSites3();
|
|
274162
|
-
const callerFilename = callSites[1]?.getFileName?.();
|
|
274163
|
-
const prompt = (config4, context = {}) => {
|
|
274164
|
-
const { input = process.stdin, signal } = context;
|
|
274165
|
-
const cleanups = new Set;
|
|
274166
|
-
const output = new import_mute_stream3.default;
|
|
274167
|
-
output.pipe(context.output ?? process.stdout);
|
|
274168
|
-
const rl = readline6.createInterface({
|
|
274169
|
-
terminal: true,
|
|
274170
|
-
input,
|
|
274171
|
-
output
|
|
274172
|
-
});
|
|
274173
|
-
const screen = new ScreenManager3(rl);
|
|
274174
|
-
const { promise, resolve: resolve5, reject } = PromisePolyfill3.withResolver();
|
|
274175
|
-
const cancel4 = () => reject(new CancelPromptError3);
|
|
274176
|
-
if (signal) {
|
|
274177
|
-
const abort = () => reject(new AbortPromptError3({ cause: signal.reason }));
|
|
274178
|
-
if (signal.aborted) {
|
|
274179
|
-
abort();
|
|
274180
|
-
return Object.assign(promise, { cancel: cancel4 });
|
|
274181
|
-
}
|
|
274182
|
-
signal.addEventListener("abort", abort);
|
|
274183
|
-
cleanups.add(() => signal.removeEventListener("abort", abort));
|
|
274184
|
-
}
|
|
274185
|
-
cleanups.add(onExit((code2, signal2) => {
|
|
274186
|
-
reject(new ExitPromptError3(`User force closed the prompt with ${code2} ${signal2}`));
|
|
274187
|
-
}));
|
|
274188
|
-
const checkCursorPos = () => screen.checkCursorPos();
|
|
274189
|
-
rl.input.on("keypress", checkCursorPos);
|
|
274190
|
-
cleanups.add(() => rl.input.removeListener("keypress", checkCursorPos));
|
|
274191
|
-
return withHooks3(rl, (cycle) => {
|
|
274192
|
-
const hooksCleanup = AsyncResource9.bind(() => effectScheduler3.clearAll());
|
|
274193
|
-
rl.on("close", hooksCleanup);
|
|
274194
|
-
cleanups.add(() => rl.removeListener("close", hooksCleanup));
|
|
274195
|
-
cycle(() => {
|
|
274196
|
-
try {
|
|
274197
|
-
const nextView = view(config4, (value4) => {
|
|
274198
|
-
setImmediate(() => resolve5(value4));
|
|
274199
|
-
});
|
|
274200
|
-
if (nextView === undefined) {
|
|
274201
|
-
throw new Error(`Prompt functions must return a string.
|
|
274202
|
-
at ${callerFilename}`);
|
|
274203
|
-
}
|
|
274204
|
-
const [content, bottomContent] = typeof nextView === "string" ? [nextView] : nextView;
|
|
274205
|
-
screen.render(content, bottomContent);
|
|
274206
|
-
effectScheduler3.run();
|
|
274207
|
-
} catch (error5) {
|
|
274208
|
-
reject(error5);
|
|
274209
|
-
}
|
|
274210
|
-
});
|
|
274211
|
-
return Object.assign(promise.then((answer) => {
|
|
274212
|
-
effectScheduler3.clearAll();
|
|
274213
|
-
return answer;
|
|
274214
|
-
}, (error5) => {
|
|
274215
|
-
effectScheduler3.clearAll();
|
|
274216
|
-
throw error5;
|
|
274217
|
-
}).finally(() => {
|
|
274218
|
-
cleanups.forEach((cleanup) => cleanup());
|
|
274219
|
-
screen.done({ clearContent: Boolean(context.clearPromptOnDone) });
|
|
274220
|
-
output.end();
|
|
274221
|
-
}).then(() => promise), { cancel: cancel4 });
|
|
274222
|
-
});
|
|
274223
|
-
};
|
|
274224
|
-
return prompt;
|
|
274225
|
-
}
|
|
274226
273336
|
// ../../node_modules/@inquirer/input/dist/esm/index.js
|
|
274227
273337
|
var inputTheme = {
|
|
274228
273338
|
validationFailureMode: "keep"
|
|
274229
273339
|
};
|
|
274230
|
-
var esm_default4 =
|
|
273340
|
+
var esm_default4 = createPrompt((config4, done) => {
|
|
274231
273341
|
const { required, validate: validate4 = () => true } = config4;
|
|
274232
|
-
const theme =
|
|
274233
|
-
const [status, setStatus] =
|
|
274234
|
-
const [defaultValue = "", setDefaultValue] =
|
|
274235
|
-
const [errorMsg, setError] =
|
|
274236
|
-
const [value4, setValue] =
|
|
274237
|
-
const prefix =
|
|
274238
|
-
|
|
273342
|
+
const theme = makeTheme(inputTheme, config4.theme);
|
|
273343
|
+
const [status, setStatus] = useState("idle");
|
|
273344
|
+
const [defaultValue = "", setDefaultValue] = useState(config4.default);
|
|
273345
|
+
const [errorMsg, setError] = useState();
|
|
273346
|
+
const [value4, setValue] = useState("");
|
|
273347
|
+
const prefix = usePrefix({ status, theme });
|
|
273348
|
+
useKeypress(async (key2, rl) => {
|
|
274239
273349
|
if (status !== "idle") {
|
|
274240
273350
|
return;
|
|
274241
273351
|
}
|
|
274242
|
-
if (
|
|
273352
|
+
if (isEnterKey(key2)) {
|
|
274243
273353
|
const answer = value4 || defaultValue;
|
|
274244
273354
|
setStatus("loading");
|
|
274245
273355
|
const isValid2 = required && !answer ? "You must provide a value" : await validate4(answer);
|
|
@@ -274256,9 +273366,9 @@ var esm_default4 = createPrompt3((config4, done) => {
|
|
|
274256
273366
|
setError(isValid2 || "You must provide a valid value");
|
|
274257
273367
|
setStatus("idle");
|
|
274258
273368
|
}
|
|
274259
|
-
} else if (
|
|
273369
|
+
} else if (isBackspaceKey(key2) && !value4) {
|
|
274260
273370
|
setDefaultValue(undefined);
|
|
274261
|
-
} else if (
|
|
273371
|
+
} else if (key2.name === "tab" && !value4) {
|
|
274262
273372
|
setDefaultValue(undefined);
|
|
274263
273373
|
rl.clearLine(0);
|
|
274264
273374
|
rl.write(defaultValue);
|
|
@@ -274290,19 +273400,19 @@ var esm_default4 = createPrompt3((config4, done) => {
|
|
|
274290
273400
|
});
|
|
274291
273401
|
|
|
274292
273402
|
// ../../node_modules/@inquirer/password/dist/esm/index.js
|
|
274293
|
-
var
|
|
274294
|
-
var esm_default5 =
|
|
273403
|
+
var import_ansi_escapes3 = __toESM(require_ansi_escapes(), 1);
|
|
273404
|
+
var esm_default5 = createPrompt((config4, done) => {
|
|
274295
273405
|
const { validate: validate4 = () => true } = config4;
|
|
274296
|
-
const theme =
|
|
274297
|
-
const [status, setStatus] =
|
|
274298
|
-
const [errorMsg, setError] =
|
|
274299
|
-
const [value4, setValue] =
|
|
274300
|
-
const prefix =
|
|
274301
|
-
|
|
273406
|
+
const theme = makeTheme(config4.theme);
|
|
273407
|
+
const [status, setStatus] = useState("idle");
|
|
273408
|
+
const [errorMsg, setError] = useState();
|
|
273409
|
+
const [value4, setValue] = useState("");
|
|
273410
|
+
const prefix = usePrefix({ status, theme });
|
|
273411
|
+
useKeypress(async (key2, rl) => {
|
|
274302
273412
|
if (status !== "idle") {
|
|
274303
273413
|
return;
|
|
274304
273414
|
}
|
|
274305
|
-
if (
|
|
273415
|
+
if (isEnterKey(key2)) {
|
|
274306
273416
|
const answer = value4;
|
|
274307
273417
|
setStatus("loading");
|
|
274308
273418
|
const isValid2 = await validate4(answer);
|
|
@@ -274327,7 +273437,7 @@ var esm_default5 = createPrompt2((config4, done) => {
|
|
|
274327
273437
|
const maskChar = typeof config4.mask === "string" ? config4.mask : "*";
|
|
274328
273438
|
formattedValue = maskChar.repeat(value4.length);
|
|
274329
273439
|
} else if (status !== "done") {
|
|
274330
|
-
helpTip = `${theme.style.help("[input is masked]")}${
|
|
273440
|
+
helpTip = `${theme.style.help("[input is masked]")}${import_ansi_escapes3.default.cursorHide}`;
|
|
274331
273441
|
}
|
|
274332
273442
|
if (status === "done") {
|
|
274333
273443
|
formattedValue = theme.style.answer(formattedValue);
|
|
@@ -274629,18 +273739,23 @@ async function hdPrivateKeyPrompt({
|
|
|
274629
273739
|
}
|
|
274630
273740
|
|
|
274631
273741
|
// src/commands/connect/instance.prompt.ts
|
|
274632
|
-
async function instancePrompt(env2, accept, freeTextInput = false) {
|
|
273742
|
+
async function instancePrompt(env2, accept, freeTextInput = false, isCi = is_in_ci_default) {
|
|
274633
273743
|
const knownInstances = await getInstances();
|
|
274634
|
-
const autoAccept = !!accept ||
|
|
274635
|
-
const defaultInstance = env2.SETTLEMINT_INSTANCE
|
|
273744
|
+
const autoAccept = !!accept || isCi;
|
|
273745
|
+
const defaultInstance = env2.SETTLEMINT_INSTANCE;
|
|
274636
273746
|
const defaultPossible = autoAccept && defaultInstance;
|
|
274637
273747
|
if (defaultPossible) {
|
|
274638
273748
|
return defaultInstance;
|
|
274639
273749
|
}
|
|
273750
|
+
const defaultLoginInstance = await getDefaultInstance();
|
|
273751
|
+
const defaultPromptInstance = defaultInstance ?? defaultLoginInstance ?? "https://console.settlemint.com";
|
|
273752
|
+
if (isCi) {
|
|
273753
|
+
return defaultPromptInstance;
|
|
273754
|
+
}
|
|
274640
273755
|
if (freeTextInput) {
|
|
274641
273756
|
const instance = await esm_default4({
|
|
274642
273757
|
message: "What is the URL of your SettleMint instance?",
|
|
274643
|
-
default:
|
|
273758
|
+
default: defaultPromptInstance,
|
|
274644
273759
|
required: true,
|
|
274645
273760
|
validate(value4) {
|
|
274646
273761
|
try {
|
|
@@ -274668,7 +273783,7 @@ async function instancePrompt(env2, accept, freeTextInput = false) {
|
|
|
274668
273783
|
value: instance
|
|
274669
273784
|
}))
|
|
274670
273785
|
],
|
|
274671
|
-
default:
|
|
273786
|
+
default: defaultPromptInstance
|
|
274672
273787
|
});
|
|
274673
273788
|
}
|
|
274674
273789
|
|
|
@@ -274932,7 +274047,7 @@ function connectCommand() {
|
|
|
274932
274047
|
SETTLEMINT_HASURA: hasura?.uniqueName,
|
|
274933
274048
|
...getHasuraEndpoints(hasura),
|
|
274934
274049
|
SETTLEMINT_THEGRAPH: thegraph?.uniqueName,
|
|
274935
|
-
...await getGraphEndpoint(thegraph, env2),
|
|
274050
|
+
...await getGraphEndpoint(settlemint, thegraph, env2),
|
|
274936
274051
|
SETTLEMINT_PORTAL: portal?.uniqueName,
|
|
274937
274052
|
...getPortalEndpoints(portal),
|
|
274938
274053
|
SETTLEMINT_HD_PRIVATE_KEY: hdPrivateKey?.uniqueName,
|
|
@@ -275218,7 +274333,7 @@ var basename2 = function(p5, extension) {
|
|
|
275218
274333
|
return extension && lastSegment.endsWith(extension) ? lastSegment.slice(0, -extension.length) : lastSegment;
|
|
275219
274334
|
};
|
|
275220
274335
|
// ../../node_modules/defu/dist/defu.mjs
|
|
275221
|
-
function
|
|
274336
|
+
function isPlainObject3(value4) {
|
|
275222
274337
|
if (value4 === null || typeof value4 !== "object") {
|
|
275223
274338
|
return false;
|
|
275224
274339
|
}
|
|
@@ -275235,27 +274350,27 @@ function isPlainObject5(value4) {
|
|
|
275235
274350
|
return true;
|
|
275236
274351
|
}
|
|
275237
274352
|
function _defu(baseObject, defaults2, namespace = ".", merger) {
|
|
275238
|
-
if (!
|
|
274353
|
+
if (!isPlainObject3(defaults2)) {
|
|
275239
274354
|
return _defu(baseObject, {}, namespace, merger);
|
|
275240
274355
|
}
|
|
275241
274356
|
const object = Object.assign({}, defaults2);
|
|
275242
|
-
for (const
|
|
275243
|
-
if (
|
|
274357
|
+
for (const key2 in baseObject) {
|
|
274358
|
+
if (key2 === "__proto__" || key2 === "constructor") {
|
|
275244
274359
|
continue;
|
|
275245
274360
|
}
|
|
275246
|
-
const value4 = baseObject[
|
|
274361
|
+
const value4 = baseObject[key2];
|
|
275247
274362
|
if (value4 === null || value4 === undefined) {
|
|
275248
274363
|
continue;
|
|
275249
274364
|
}
|
|
275250
|
-
if (merger && merger(object,
|
|
274365
|
+
if (merger && merger(object, key2, value4, namespace)) {
|
|
275251
274366
|
continue;
|
|
275252
274367
|
}
|
|
275253
|
-
if (Array.isArray(value4) && Array.isArray(object[
|
|
275254
|
-
object[
|
|
275255
|
-
} else if (
|
|
275256
|
-
object[
|
|
274368
|
+
if (Array.isArray(value4) && Array.isArray(object[key2])) {
|
|
274369
|
+
object[key2] = [...value4, ...object[key2]];
|
|
274370
|
+
} else if (isPlainObject3(value4) && isPlainObject3(object[key2])) {
|
|
274371
|
+
object[key2] = _defu(value4, object[key2], (namespace ? `${namespace}.` : "") + key2.toString(), merger);
|
|
275257
274372
|
} else {
|
|
275258
|
-
object[
|
|
274373
|
+
object[key2] = value4;
|
|
275259
274374
|
}
|
|
275260
274375
|
}
|
|
275261
274376
|
return object;
|
|
@@ -275264,15 +274379,15 @@ function createDefu(merger) {
|
|
|
275264
274379
|
return (...arguments_4) => arguments_4.reduce((p5, c3) => _defu(p5, c3, "", merger), {});
|
|
275265
274380
|
}
|
|
275266
274381
|
var defu = createDefu();
|
|
275267
|
-
var defuFn = createDefu((object,
|
|
275268
|
-
if (object[
|
|
275269
|
-
object[
|
|
274382
|
+
var defuFn = createDefu((object, key2, currentValue) => {
|
|
274383
|
+
if (object[key2] !== undefined && typeof currentValue === "function") {
|
|
274384
|
+
object[key2] = currentValue(object[key2]);
|
|
275270
274385
|
return true;
|
|
275271
274386
|
}
|
|
275272
274387
|
});
|
|
275273
|
-
var defuArrayFn = createDefu((object,
|
|
275274
|
-
if (Array.isArray(object[
|
|
275275
|
-
object[
|
|
274388
|
+
var defuArrayFn = createDefu((object, key2, currentValue) => {
|
|
274389
|
+
if (Array.isArray(object[key2]) && typeof currentValue === "function") {
|
|
274390
|
+
object[key2] = currentValue(object[key2]);
|
|
275276
274391
|
return true;
|
|
275277
274392
|
}
|
|
275278
274393
|
});
|
|
@@ -275495,11 +274610,11 @@ function cacheDirectory() {
|
|
|
275495
274610
|
}
|
|
275496
274611
|
function normalizeHeaders(headers = {}) {
|
|
275497
274612
|
const normalized = {};
|
|
275498
|
-
for (const [
|
|
274613
|
+
for (const [key2, value4] of Object.entries(headers)) {
|
|
275499
274614
|
if (!value4) {
|
|
275500
274615
|
continue;
|
|
275501
274616
|
}
|
|
275502
|
-
normalized[
|
|
274617
|
+
normalized[key2.toLowerCase()] = value4;
|
|
275503
274618
|
}
|
|
275504
274619
|
return normalized;
|
|
275505
274620
|
}
|
|
@@ -275843,9 +274958,6 @@ function loginCommand() {
|
|
|
275843
274958
|
intro("Login to your SettleMint account");
|
|
275844
274959
|
const autoAccept = !!acceptDefaults || !!tokenStdin;
|
|
275845
274960
|
const env2 = await loadEnv2(false, false);
|
|
275846
|
-
if (instance) {
|
|
275847
|
-
validate3(UrlSchema, instance);
|
|
275848
|
-
}
|
|
275849
274961
|
const selectedInstance = instance ? sanitizeAndValidateInstanceUrl(instance) : await instancePrompt(env2, autoAccept, true);
|
|
275850
274962
|
let personalAccessToken = "";
|
|
275851
274963
|
if (tokenStdin) {
|
|
@@ -276826,7 +275938,7 @@ function graphMiddlewareCreateCommand() {
|
|
|
276826
275938
|
return {
|
|
276827
275939
|
SETTLEMINT_APPLICATION: applicationUniqueName,
|
|
276828
275940
|
SETTLEMINT_THEGRAPH: result.uniqueName,
|
|
276829
|
-
...await getGraphEndpoint(graphMiddleware, env2)
|
|
275941
|
+
...await getGraphEndpoint(settlemint, graphMiddleware, env2)
|
|
276830
275942
|
};
|
|
276831
275943
|
}
|
|
276832
275944
|
};
|
|
@@ -277704,11 +276816,11 @@ function createCommand4() {
|
|
|
277704
276816
|
|
|
277705
276817
|
// src/utils/passthrough-options.ts
|
|
277706
276818
|
function mapPassthroughOptions(options, command) {
|
|
277707
|
-
const optionArgs = Object.entries(options).map(([
|
|
276819
|
+
const optionArgs = Object.entries(options).map(([key2, value4]) => {
|
|
277708
276820
|
if (value4 === true) {
|
|
277709
|
-
return `--${
|
|
276821
|
+
return `--${key2}`;
|
|
277710
276822
|
}
|
|
277711
|
-
return `--${
|
|
276823
|
+
return `--${key2}=${value4}`;
|
|
277712
276824
|
});
|
|
277713
276825
|
return [...optionArgs, ...command.args];
|
|
277714
276826
|
}
|
|
@@ -278175,7 +277287,7 @@ import { basename as basename4, join as join9 } from "node:path";
|
|
|
278175
277287
|
var composer = require_composer();
|
|
278176
277288
|
var Document = require_Document();
|
|
278177
277289
|
var Schema = require_Schema();
|
|
278178
|
-
var
|
|
277290
|
+
var errors2 = require_errors3();
|
|
278179
277291
|
var Alias = require_Alias();
|
|
278180
277292
|
var identity3 = require_identity();
|
|
278181
277293
|
var Pair = require_Pair();
|
|
@@ -278191,9 +277303,9 @@ var visit2 = require_visit();
|
|
|
278191
277303
|
var $Composer = composer.Composer;
|
|
278192
277304
|
var $Document = Document.Document;
|
|
278193
277305
|
var $Schema = Schema.Schema;
|
|
278194
|
-
var $YAMLError =
|
|
278195
|
-
var $YAMLParseError =
|
|
278196
|
-
var $YAMLWarning =
|
|
277306
|
+
var $YAMLError = errors2.YAMLError;
|
|
277307
|
+
var $YAMLParseError = errors2.YAMLParseError;
|
|
277308
|
+
var $YAMLWarning = errors2.YAMLWarning;
|
|
278197
277309
|
var $Alias = Alias.Alias;
|
|
278198
277310
|
var $isAlias = identity3.isAlias;
|
|
278199
277311
|
var $isCollection = identity3.isCollection;
|
|
@@ -278500,7 +277612,7 @@ function subgraphDeployCommand() {
|
|
|
278500
277612
|
instance
|
|
278501
277613
|
});
|
|
278502
277614
|
const middleware = await settlemintClient.middleware.read(theGraphMiddleware.uniqueName);
|
|
278503
|
-
const graphEndpoints = await getGraphEndpoint(middleware, env2, graphName);
|
|
277615
|
+
const graphEndpoints = await getGraphEndpoint(settlemintClient, middleware, env2, graphName);
|
|
278504
277616
|
await writeEnvSpinner(!!prod, {
|
|
278505
277617
|
...env2,
|
|
278506
277618
|
SETTLEMINT_THEGRAPH: theGraphMiddleware.uniqueName,
|
|
@@ -278560,4 +277672,4 @@ function sdkCliCommand(exitOverride = undefined) {
|
|
|
278560
277672
|
ascii();
|
|
278561
277673
|
sdkCliCommand();
|
|
278562
277674
|
|
|
278563
|
-
//# debugId=
|
|
277675
|
+
//# debugId=40C482F4175C417364756E2164756E21
|