@settlemint/sdk-cli 0.9.3-pr40802d9d → 0.9.3-pr4d53708b
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/README.md +1 -1
- package/dist/cli.js +1846 -515
- package/dist/cli.js.map +53 -11
- package/package.json +4 -4
package/dist/cli.js
CHANGED
|
@@ -19607,13 +19607,13 @@ var require_cjs = __commonJS((exports) => {
|
|
|
19607
19607
|
// ../../node_modules/@npmcli/promise-spawn/node_modules/which/lib/index.js
|
|
19608
19608
|
var require_lib4 = __commonJS((exports, module) => {
|
|
19609
19609
|
var { isexe, sync: isexeSync } = require_cjs();
|
|
19610
|
-
var { join:
|
|
19610
|
+
var { join: join2, delimiter, sep: sep2, posix: posix2 } = __require("path");
|
|
19611
19611
|
var isWindows = process.platform === "win32";
|
|
19612
19612
|
var rSlash = new RegExp(`[${posix2.sep}${sep2 === posix2.sep ? "" : sep2}]`.replace(/(\\)/g, "\\$1"));
|
|
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.eMe6gnI606:/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
|
}) => {
|
|
@@ -19634,7 +19634,7 @@ var require_lib4 = __commonJS((exports, module) => {
|
|
|
19634
19634
|
var getPathPart = (raw, cmd) => {
|
|
19635
19635
|
const pathPart = /^".*"$/.test(raw) ? raw.slice(1, -1) : raw;
|
|
19636
19636
|
const prefix = !pathPart && rRel.test(cmd) ? cmd.slice(0, 2) : "";
|
|
19637
|
-
return prefix +
|
|
19637
|
+
return prefix + join2(pathPart, cmd);
|
|
19638
19638
|
};
|
|
19639
19639
|
var which = async (cmd, opt = {}) => {
|
|
19640
19640
|
const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt);
|
|
@@ -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.eMe6gnI606:/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) {
|
|
@@ -20528,13 +20528,13 @@ var require_opts = __commonJS((exports, module) => {
|
|
|
20528
20528
|
// ../../node_modules/@npmcli/git/node_modules/which/lib/index.js
|
|
20529
20529
|
var require_lib6 = __commonJS((exports, module) => {
|
|
20530
20530
|
var { isexe, sync: isexeSync } = require_cjs();
|
|
20531
|
-
var { join:
|
|
20531
|
+
var { join: join2, delimiter, sep: sep2, posix: posix2 } = __require("path");
|
|
20532
20532
|
var isWindows = process.platform === "win32";
|
|
20533
20533
|
var rSlash = new RegExp(`[${posix2.sep}${sep2 === posix2.sep ? "" : sep2}]`.replace(/(\\)/g, "\\$1"));
|
|
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.eMe6gnI606:/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
|
}) => {
|
|
@@ -20555,7 +20555,7 @@ var require_lib6 = __commonJS((exports, module) => {
|
|
|
20555
20555
|
var getPathPart = (raw, cmd) => {
|
|
20556
20556
|
const pathPart = /^".*"$/.test(raw) ? raw.slice(1, -1) : raw;
|
|
20557
20557
|
const prefix = !pathPart && rRel.test(cmd) ? cmd.slice(0, 2) : "";
|
|
20558
|
-
return prefix +
|
|
20558
|
+
return prefix + join2(pathPart, cmd);
|
|
20559
20559
|
};
|
|
20560
20560
|
var which = async (cmd, opt = {}) => {
|
|
20561
20561
|
const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt);
|
|
@@ -22838,7 +22838,7 @@ var require_lib8 = __commonJS((exports, module) => {
|
|
|
22838
22838
|
|
|
22839
22839
|
// ../../node_modules/npm-normalize-package-bin/lib/index.js
|
|
22840
22840
|
var require_lib9 = __commonJS((exports, module) => {
|
|
22841
|
-
var { join:
|
|
22841
|
+
var { join: join2, basename } = __require("path");
|
|
22842
22842
|
var normalize2 = (pkg) => !pkg.bin ? removeBin(pkg) : typeof pkg.bin === "string" ? normalizeString(pkg) : Array.isArray(pkg.bin) ? normalizeArray(pkg) : typeof pkg.bin === "object" ? normalizeObject(pkg) : removeBin(pkg);
|
|
22843
22843
|
var normalizeString = (pkg) => {
|
|
22844
22844
|
if (!pkg.name) {
|
|
@@ -22863,11 +22863,11 @@ var require_lib9 = __commonJS((exports, module) => {
|
|
|
22863
22863
|
const clean = {};
|
|
22864
22864
|
let hasBins = false;
|
|
22865
22865
|
Object.keys(orig).forEach((binKey) => {
|
|
22866
|
-
const base2 =
|
|
22866
|
+
const base2 = join2("/", basename(binKey.replace(/\\|:/g, "/"))).slice(1);
|
|
22867
22867
|
if (typeof orig[binKey] !== "string" || !base2) {
|
|
22868
22868
|
return;
|
|
22869
22869
|
}
|
|
22870
|
-
const binTarget =
|
|
22870
|
+
const binTarget = join2("/", orig[binKey].replace(/\\/g, "/")).replace(/\\/g, "/").slice(1);
|
|
22871
22871
|
if (!binTarget) {
|
|
22872
22872
|
return;
|
|
22873
22873
|
}
|
|
@@ -26088,7 +26088,7 @@ var require_util = __commonJS((exports) => {
|
|
|
26088
26088
|
return path5;
|
|
26089
26089
|
}
|
|
26090
26090
|
exports.normalize = normalize2;
|
|
26091
|
-
function
|
|
26091
|
+
function join4(aRoot, aPath) {
|
|
26092
26092
|
if (aRoot === "") {
|
|
26093
26093
|
aRoot = ".";
|
|
26094
26094
|
}
|
|
@@ -26120,7 +26120,7 @@ var require_util = __commonJS((exports) => {
|
|
|
26120
26120
|
}
|
|
26121
26121
|
return joined;
|
|
26122
26122
|
}
|
|
26123
|
-
exports.join =
|
|
26123
|
+
exports.join = join4;
|
|
26124
26124
|
exports.isAbsolute = function(aPath) {
|
|
26125
26125
|
return aPath.charAt(0) === "/" || urlRegexp.test(aPath);
|
|
26126
26126
|
};
|
|
@@ -26293,7 +26293,7 @@ var require_util = __commonJS((exports) => {
|
|
|
26293
26293
|
parsed.path = parsed.path.substring(0, index + 1);
|
|
26294
26294
|
}
|
|
26295
26295
|
}
|
|
26296
|
-
sourceURL =
|
|
26296
|
+
sourceURL = join4(urlGenerate(parsed), sourceURL);
|
|
26297
26297
|
}
|
|
26298
26298
|
return normalize2(sourceURL);
|
|
26299
26299
|
}
|
|
@@ -198504,23 +198504,23 @@ var require_printer = __commonJS((exports) => {
|
|
|
198504
198504
|
leave: (node) => "$" + node.name
|
|
198505
198505
|
},
|
|
198506
198506
|
Document: {
|
|
198507
|
-
leave: (node) =>
|
|
198507
|
+
leave: (node) => join4(node.definitions, `
|
|
198508
198508
|
|
|
198509
198509
|
`)
|
|
198510
198510
|
},
|
|
198511
198511
|
OperationDefinition: {
|
|
198512
198512
|
leave(node) {
|
|
198513
|
-
const varDefs = wrap("(",
|
|
198514
|
-
const prefix =
|
|
198513
|
+
const varDefs = wrap("(", join4(node.variableDefinitions, ", "), ")");
|
|
198514
|
+
const prefix = join4([
|
|
198515
198515
|
node.operation,
|
|
198516
|
-
|
|
198517
|
-
|
|
198516
|
+
join4([node.name, varDefs]),
|
|
198517
|
+
join4(node.directives, " ")
|
|
198518
198518
|
], " ");
|
|
198519
198519
|
return (prefix === "query" ? "" : prefix + " ") + node.selectionSet;
|
|
198520
198520
|
}
|
|
198521
198521
|
},
|
|
198522
198522
|
VariableDefinition: {
|
|
198523
|
-
leave: ({ variable, type, defaultValue, directives }) => variable + ": " + type + wrap(" = ", defaultValue) + wrap(" ",
|
|
198523
|
+
leave: ({ variable, type, defaultValue, directives }) => variable + ": " + type + wrap(" = ", defaultValue) + wrap(" ", join4(directives, " "))
|
|
198524
198524
|
},
|
|
198525
198525
|
SelectionSet: {
|
|
198526
198526
|
leave: ({ selections }) => block(selections)
|
|
@@ -198528,32 +198528,32 @@ var require_printer = __commonJS((exports) => {
|
|
|
198528
198528
|
Field: {
|
|
198529
198529
|
leave({ alias, name, arguments: args, directives, selectionSet }) {
|
|
198530
198530
|
const prefix = wrap("", alias, ": ") + name;
|
|
198531
|
-
let argsLine = prefix + wrap("(",
|
|
198531
|
+
let argsLine = prefix + wrap("(", join4(args, ", "), ")");
|
|
198532
198532
|
if (argsLine.length > MAX_LINE_LENGTH) {
|
|
198533
198533
|
argsLine = prefix + wrap(`(
|
|
198534
|
-
`, indent(
|
|
198534
|
+
`, indent(join4(args, `
|
|
198535
198535
|
`)), `
|
|
198536
198536
|
)`);
|
|
198537
198537
|
}
|
|
198538
|
-
return
|
|
198538
|
+
return join4([argsLine, join4(directives, " "), selectionSet], " ");
|
|
198539
198539
|
}
|
|
198540
198540
|
},
|
|
198541
198541
|
Argument: {
|
|
198542
198542
|
leave: ({ name, value }) => name + ": " + value
|
|
198543
198543
|
},
|
|
198544
198544
|
FragmentSpread: {
|
|
198545
|
-
leave: ({ name, directives }) => "..." + name + wrap(" ",
|
|
198545
|
+
leave: ({ name, directives }) => "..." + name + wrap(" ", join4(directives, " "))
|
|
198546
198546
|
},
|
|
198547
198547
|
InlineFragment: {
|
|
198548
|
-
leave: ({ typeCondition, directives, selectionSet }) =>
|
|
198548
|
+
leave: ({ typeCondition, directives, selectionSet }) => join4([
|
|
198549
198549
|
"...",
|
|
198550
198550
|
wrap("on ", typeCondition),
|
|
198551
|
-
|
|
198551
|
+
join4(directives, " "),
|
|
198552
198552
|
selectionSet
|
|
198553
198553
|
], " ")
|
|
198554
198554
|
},
|
|
198555
198555
|
FragmentDefinition: {
|
|
198556
|
-
leave: ({ name, typeCondition, variableDefinitions, directives, selectionSet }) => `fragment ${name}${wrap("(",
|
|
198556
|
+
leave: ({ name, typeCondition, variableDefinitions, directives, selectionSet }) => `fragment ${name}${wrap("(", join4(variableDefinitions, ", "), ")")} ` + `on ${typeCondition} ${wrap("", join4(directives, " "), " ")}` + selectionSet
|
|
198557
198557
|
},
|
|
198558
198558
|
IntValue: {
|
|
198559
198559
|
leave: ({ value }) => value
|
|
@@ -198574,16 +198574,16 @@ var require_printer = __commonJS((exports) => {
|
|
|
198574
198574
|
leave: ({ value }) => value
|
|
198575
198575
|
},
|
|
198576
198576
|
ListValue: {
|
|
198577
|
-
leave: ({ values }) => "[" +
|
|
198577
|
+
leave: ({ values }) => "[" + join4(values, ", ") + "]"
|
|
198578
198578
|
},
|
|
198579
198579
|
ObjectValue: {
|
|
198580
|
-
leave: ({ fields }) => "{" +
|
|
198580
|
+
leave: ({ fields }) => "{" + join4(fields, ", ") + "}"
|
|
198581
198581
|
},
|
|
198582
198582
|
ObjectField: {
|
|
198583
198583
|
leave: ({ name, value }) => name + ": " + value
|
|
198584
198584
|
},
|
|
198585
198585
|
Directive: {
|
|
198586
|
-
leave: ({ name, arguments: args }) => "@" + name + wrap("(",
|
|
198586
|
+
leave: ({ name, arguments: args }) => "@" + name + wrap("(", join4(args, ", "), ")")
|
|
198587
198587
|
},
|
|
198588
198588
|
NamedType: {
|
|
198589
198589
|
leave: ({ name }) => name
|
|
@@ -198596,115 +198596,115 @@ var require_printer = __commonJS((exports) => {
|
|
|
198596
198596
|
},
|
|
198597
198597
|
SchemaDefinition: {
|
|
198598
198598
|
leave: ({ description, directives, operationTypes }) => wrap("", description, `
|
|
198599
|
-
`) +
|
|
198599
|
+
`) + join4(["schema", join4(directives, " "), block(operationTypes)], " ")
|
|
198600
198600
|
},
|
|
198601
198601
|
OperationTypeDefinition: {
|
|
198602
198602
|
leave: ({ operation, type }) => operation + ": " + type
|
|
198603
198603
|
},
|
|
198604
198604
|
ScalarTypeDefinition: {
|
|
198605
198605
|
leave: ({ description, name, directives }) => wrap("", description, `
|
|
198606
|
-
`) +
|
|
198606
|
+
`) + join4(["scalar", name, join4(directives, " ")], " ")
|
|
198607
198607
|
},
|
|
198608
198608
|
ObjectTypeDefinition: {
|
|
198609
198609
|
leave: ({ description, name, interfaces, directives, fields }) => wrap("", description, `
|
|
198610
|
-
`) +
|
|
198610
|
+
`) + join4([
|
|
198611
198611
|
"type",
|
|
198612
198612
|
name,
|
|
198613
|
-
wrap("implements ",
|
|
198614
|
-
|
|
198613
|
+
wrap("implements ", join4(interfaces, " & ")),
|
|
198614
|
+
join4(directives, " "),
|
|
198615
198615
|
block(fields)
|
|
198616
198616
|
], " ")
|
|
198617
198617
|
},
|
|
198618
198618
|
FieldDefinition: {
|
|
198619
198619
|
leave: ({ description, name, arguments: args, type, directives }) => wrap("", description, `
|
|
198620
198620
|
`) + name + (hasMultilineItems(args) ? wrap(`(
|
|
198621
|
-
`, indent(
|
|
198621
|
+
`, indent(join4(args, `
|
|
198622
198622
|
`)), `
|
|
198623
|
-
)`) : wrap("(",
|
|
198623
|
+
)`) : wrap("(", join4(args, ", "), ")")) + ": " + type + wrap(" ", join4(directives, " "))
|
|
198624
198624
|
},
|
|
198625
198625
|
InputValueDefinition: {
|
|
198626
198626
|
leave: ({ description, name, type, defaultValue, directives }) => wrap("", description, `
|
|
198627
|
-
`) +
|
|
198627
|
+
`) + join4([name + ": " + type, wrap("= ", defaultValue), join4(directives, " ")], " ")
|
|
198628
198628
|
},
|
|
198629
198629
|
InterfaceTypeDefinition: {
|
|
198630
198630
|
leave: ({ description, name, interfaces, directives, fields }) => wrap("", description, `
|
|
198631
|
-
`) +
|
|
198631
|
+
`) + join4([
|
|
198632
198632
|
"interface",
|
|
198633
198633
|
name,
|
|
198634
|
-
wrap("implements ",
|
|
198635
|
-
|
|
198634
|
+
wrap("implements ", join4(interfaces, " & ")),
|
|
198635
|
+
join4(directives, " "),
|
|
198636
198636
|
block(fields)
|
|
198637
198637
|
], " ")
|
|
198638
198638
|
},
|
|
198639
198639
|
UnionTypeDefinition: {
|
|
198640
198640
|
leave: ({ description, name, directives, types: types2 }) => wrap("", description, `
|
|
198641
|
-
`) +
|
|
198641
|
+
`) + join4(["union", name, join4(directives, " "), wrap("= ", join4(types2, " | "))], " ")
|
|
198642
198642
|
},
|
|
198643
198643
|
EnumTypeDefinition: {
|
|
198644
198644
|
leave: ({ description, name, directives, values }) => wrap("", description, `
|
|
198645
|
-
`) +
|
|
198645
|
+
`) + join4(["enum", name, join4(directives, " "), block(values)], " ")
|
|
198646
198646
|
},
|
|
198647
198647
|
EnumValueDefinition: {
|
|
198648
198648
|
leave: ({ description, name, directives }) => wrap("", description, `
|
|
198649
|
-
`) +
|
|
198649
|
+
`) + join4([name, join4(directives, " ")], " ")
|
|
198650
198650
|
},
|
|
198651
198651
|
InputObjectTypeDefinition: {
|
|
198652
198652
|
leave: ({ description, name, directives, fields }) => wrap("", description, `
|
|
198653
|
-
`) +
|
|
198653
|
+
`) + join4(["input", name, join4(directives, " "), block(fields)], " ")
|
|
198654
198654
|
},
|
|
198655
198655
|
DirectiveDefinition: {
|
|
198656
198656
|
leave: ({ description, name, arguments: args, repeatable, locations }) => wrap("", description, `
|
|
198657
198657
|
`) + "directive @" + name + (hasMultilineItems(args) ? wrap(`(
|
|
198658
|
-
`, indent(
|
|
198658
|
+
`, indent(join4(args, `
|
|
198659
198659
|
`)), `
|
|
198660
|
-
)`) : wrap("(",
|
|
198660
|
+
)`) : wrap("(", join4(args, ", "), ")")) + (repeatable ? " repeatable" : "") + " on " + join4(locations, " | ")
|
|
198661
198661
|
},
|
|
198662
198662
|
SchemaExtension: {
|
|
198663
|
-
leave: ({ directives, operationTypes }) =>
|
|
198663
|
+
leave: ({ directives, operationTypes }) => join4(["extend schema", join4(directives, " "), block(operationTypes)], " ")
|
|
198664
198664
|
},
|
|
198665
198665
|
ScalarTypeExtension: {
|
|
198666
|
-
leave: ({ name, directives }) =>
|
|
198666
|
+
leave: ({ name, directives }) => join4(["extend scalar", name, join4(directives, " ")], " ")
|
|
198667
198667
|
},
|
|
198668
198668
|
ObjectTypeExtension: {
|
|
198669
|
-
leave: ({ name, interfaces, directives, fields }) =>
|
|
198669
|
+
leave: ({ name, interfaces, directives, fields }) => join4([
|
|
198670
198670
|
"extend type",
|
|
198671
198671
|
name,
|
|
198672
|
-
wrap("implements ",
|
|
198673
|
-
|
|
198672
|
+
wrap("implements ", join4(interfaces, " & ")),
|
|
198673
|
+
join4(directives, " "),
|
|
198674
198674
|
block(fields)
|
|
198675
198675
|
], " ")
|
|
198676
198676
|
},
|
|
198677
198677
|
InterfaceTypeExtension: {
|
|
198678
|
-
leave: ({ name, interfaces, directives, fields }) =>
|
|
198678
|
+
leave: ({ name, interfaces, directives, fields }) => join4([
|
|
198679
198679
|
"extend interface",
|
|
198680
198680
|
name,
|
|
198681
|
-
wrap("implements ",
|
|
198682
|
-
|
|
198681
|
+
wrap("implements ", join4(interfaces, " & ")),
|
|
198682
|
+
join4(directives, " "),
|
|
198683
198683
|
block(fields)
|
|
198684
198684
|
], " ")
|
|
198685
198685
|
},
|
|
198686
198686
|
UnionTypeExtension: {
|
|
198687
|
-
leave: ({ name, directives, types: types2 }) =>
|
|
198687
|
+
leave: ({ name, directives, types: types2 }) => join4([
|
|
198688
198688
|
"extend union",
|
|
198689
198689
|
name,
|
|
198690
|
-
|
|
198691
|
-
wrap("= ",
|
|
198690
|
+
join4(directives, " "),
|
|
198691
|
+
wrap("= ", join4(types2, " | "))
|
|
198692
198692
|
], " ")
|
|
198693
198693
|
},
|
|
198694
198694
|
EnumTypeExtension: {
|
|
198695
|
-
leave: ({ name, directives, values }) =>
|
|
198695
|
+
leave: ({ name, directives, values }) => join4(["extend enum", name, join4(directives, " "), block(values)], " ")
|
|
198696
198696
|
},
|
|
198697
198697
|
InputObjectTypeExtension: {
|
|
198698
|
-
leave: ({ name, directives, fields }) =>
|
|
198698
|
+
leave: ({ name, directives, fields }) => join4(["extend input", name, join4(directives, " "), block(fields)], " ")
|
|
198699
198699
|
}
|
|
198700
198700
|
};
|
|
198701
|
-
function
|
|
198701
|
+
function join4(maybeArray, separator = "") {
|
|
198702
198702
|
var _maybeArray$filter$jo;
|
|
198703
198703
|
return (_maybeArray$filter$jo = maybeArray === null || maybeArray === undefined ? undefined : maybeArray.filter((x2) => x2).join(separator)) !== null && _maybeArray$filter$jo !== undefined ? _maybeArray$filter$jo : "";
|
|
198704
198704
|
}
|
|
198705
198705
|
function block(array) {
|
|
198706
198706
|
return wrap(`{
|
|
198707
|
-
`, indent(
|
|
198707
|
+
`, indent(join4(array, `
|
|
198708
198708
|
`)), `
|
|
198709
198709
|
}`);
|
|
198710
198710
|
}
|
|
@@ -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.eMe6gnI606:/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: "0.9.3-
|
|
226467
|
+
binaryVersion: "0.9.3-pr4d53708b",
|
|
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, key5) => cache.get(normPath(key5));
|
|
233761
|
+
var cSet = (cache, key5, val) => cache.set(normPath(key5), val);
|
|
233762
233762
|
var checkCwd = (dir, cb) => {
|
|
233763
233763
|
fs3.stat(dir, (er2, st2) => {
|
|
233764
233764
|
if (er2 || !st2.isDirectory()) {
|
|
@@ -233936,7 +233936,7 @@ var require_path_reservations = __commonJS((exports, module) => {
|
|
|
233936
233936
|
var assert = __require("assert");
|
|
233937
233937
|
var normalize3 = require_normalize_unicode();
|
|
233938
233938
|
var stripSlashes = require_strip_trailing_slashes();
|
|
233939
|
-
var { join:
|
|
233939
|
+
var { join: join6 } = __require("path");
|
|
233940
233940
|
var platform2 = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
|
|
233941
233941
|
var isWindows2 = platform2 === "win32";
|
|
233942
233942
|
module.exports = () => {
|
|
@@ -233945,7 +233945,7 @@ var require_path_reservations = __commonJS((exports, module) => {
|
|
|
233945
233945
|
const getDirs = (path5) => {
|
|
233946
233946
|
const dirs = path5.split("/").slice(0, -1).reduce((set, path6) => {
|
|
233947
233947
|
if (set.length) {
|
|
233948
|
-
path6 =
|
|
233948
|
+
path6 = join6(set[set.length - 1], path6);
|
|
233949
233949
|
}
|
|
233950
233950
|
set.push(path6 || "/");
|
|
233951
233951
|
return set;
|
|
@@ -234013,7 +234013,7 @@ var require_path_reservations = __commonJS((exports, module) => {
|
|
|
234013
234013
|
};
|
|
234014
234014
|
const reserve = (paths, fn) => {
|
|
234015
234015
|
paths = isWindows2 ? ["win32 parallelization disabled"] : paths.map((p5) => {
|
|
234016
|
-
return stripSlashes(
|
|
234016
|
+
return stripSlashes(join6(normalize3(p5))).toLowerCase();
|
|
234017
234017
|
});
|
|
234018
234018
|
const dirs = new Set(paths.map((path5) => getDirs(path5)).reduce((a8, b4) => a8.concat(b4)));
|
|
234019
234019
|
reservations.set(fn, { dirs, paths });
|
|
@@ -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 key5 of cache.keys()) {
|
|
234133
|
+
cache.delete(key5);
|
|
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.eMe6gnI606:/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((key5) => key5.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((key5) => key5.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 key5 in nodeFetch) {
|
|
240756
|
+
fetch2[key5] = nodeFetch[key5];
|
|
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: AsyncResource13 } = 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 AsyncResource13 {
|
|
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 errors5 = errors$1;
|
|
248642
248642
|
var util2 = util$m;
|
|
248643
|
-
var { InvalidArgumentError: InvalidArgumentError2 } =
|
|
248643
|
+
var { InvalidArgumentError: InvalidArgumentError2 } = errors5;
|
|
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_(key5, node, visitor, path8) {
|
|
249550
|
+
const ctrl = callVisitor(key5, node, visitor, path8);
|
|
249551
249551
|
if (identity3.isNode(ctrl) || identity3.isPair(ctrl)) {
|
|
249552
|
-
replaceNode(
|
|
249553
|
-
return visit_(
|
|
249552
|
+
replaceNode(key5, path8, ctrl);
|
|
249553
|
+
return visit_(key5, 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_(key5, node, visitor, path8) {
|
|
249598
|
+
const ctrl = await callVisitor(key5, node, visitor, path8);
|
|
249599
249599
|
if (identity3.isNode(ctrl) || identity3.isPair(ctrl)) {
|
|
249600
|
-
replaceNode(
|
|
249601
|
-
return visitAsync_(
|
|
249600
|
+
replaceNode(key5, path8, ctrl);
|
|
249601
|
+
return visitAsync_(key5, 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(key5, node, visitor, path8) {
|
|
249652
249652
|
if (typeof visitor === "function")
|
|
249653
|
-
return visitor(
|
|
249653
|
+
return visitor(key5, node, path8);
|
|
249654
249654
|
if (identity3.isMap(node))
|
|
249655
|
-
return visitor.Map?.(
|
|
249655
|
+
return visitor.Map?.(key5, node, path8);
|
|
249656
249656
|
if (identity3.isSeq(node))
|
|
249657
|
-
return visitor.Seq?.(
|
|
249657
|
+
return visitor.Seq?.(key5, node, path8);
|
|
249658
249658
|
if (identity3.isPair(node))
|
|
249659
|
-
return visitor.Pair?.(
|
|
249659
|
+
return visitor.Pair?.(key5, node, path8);
|
|
249660
249660
|
if (identity3.isScalar(node))
|
|
249661
|
-
return visitor.Scalar?.(
|
|
249661
|
+
return visitor.Scalar?.(key5, node, path8);
|
|
249662
249662
|
if (identity3.isAlias(node))
|
|
249663
|
-
return visitor.Alias?.(
|
|
249663
|
+
return visitor.Alias?.(key5, node, path8);
|
|
249664
249664
|
return;
|
|
249665
249665
|
}
|
|
249666
|
-
function replaceNode(
|
|
249666
|
+
function replaceNode(key5, path8, node) {
|
|
249667
249667
|
const parent = path8[path8.length - 1];
|
|
249668
249668
|
if (identity3.isCollection(parent)) {
|
|
249669
|
-
parent.items[
|
|
249669
|
+
parent.items[key5] = node;
|
|
249670
249670
|
} else if (identity3.isPair(parent)) {
|
|
249671
|
-
if (
|
|
249671
|
+
if (key5 === "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, key5, 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, key5, 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 [key5, ...rest] = path8;
|
|
250262
|
+
const node = this.get(key5, 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(key5, collectionFromPath(this.schema, rest, value4));
|
|
250267
250267
|
else
|
|
250268
|
-
throw new Error(`Expected YAML collection at ${
|
|
250268
|
+
throw new Error(`Expected YAML collection at ${key5}. Remaining path: ${rest}`);
|
|
250269
250269
|
}
|
|
250270
250270
|
}
|
|
250271
250271
|
deleteIn(path8) {
|
|
250272
|
-
const [
|
|
250272
|
+
const [key5, ...rest] = path8;
|
|
250273
250273
|
if (rest.length === 0)
|
|
250274
|
-
return this.delete(
|
|
250275
|
-
const node = this.get(
|
|
250274
|
+
return this.delete(key5);
|
|
250275
|
+
const node = this.get(key5, 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 ${key5}. Remaining path: ${rest}`);
|
|
250280
250280
|
}
|
|
250281
250281
|
getIn(path8, keepScalar) {
|
|
250282
|
-
const [
|
|
250283
|
-
const node = this.get(
|
|
250282
|
+
const [key5, ...rest] = path8;
|
|
250283
|
+
const node = this.get(key5, 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 [key5, ...rest] = path8;
|
|
250299
250299
|
if (rest.length === 0)
|
|
250300
|
-
return this.has(
|
|
250301
|
-
const node = this.get(
|
|
250300
|
+
return this.has(key5);
|
|
250301
|
+
const node = this.get(key5, true);
|
|
250302
250302
|
return identity3.isCollection(node) ? node.hasIn(rest) : false;
|
|
250303
250303
|
}
|
|
250304
250304
|
setIn(path8, value4) {
|
|
250305
|
-
const [
|
|
250305
|
+
const [key5, ...rest] = path8;
|
|
250306
250306
|
if (rest.length === 0) {
|
|
250307
|
-
this.set(
|
|
250307
|
+
this.set(key5, value4);
|
|
250308
250308
|
} else {
|
|
250309
|
-
const node = this.get(
|
|
250309
|
+
const node = this.get(key5, 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(key5, collectionFromPath(this.schema, rest, value4));
|
|
250314
250314
|
else
|
|
250315
|
-
throw new Error(`Expected YAML collection at ${
|
|
250315
|
+
throw new Error(`Expected YAML collection at ${key5}. 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: key5, 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(key5) && key5.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(key5) || !identity3.isNode(key5) && typeof key5 === "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 && (!key5 || keyComment && value4 == null && !ctx.inFlow || identity3.isCollection(key5) || (identity3.isScalar(key5) ? key5.type === Scalar.Scalar.BLOCK_FOLDED || key5.type === Scalar.Scalar.BLOCK_LITERAL : typeof key5 === "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(key5, 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, key5) => (merge3.identify(key5) || identity3.isScalar(key5) && (!key5.type || key5.type === Scalar.Scalar.PLAIN) && merge3.identify(key5.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 [key5, value5] of srcMap) {
|
|
251085
251085
|
if (map3 instanceof Map) {
|
|
251086
|
-
if (!map3.has(
|
|
251087
|
-
map3.set(
|
|
251086
|
+
if (!map3.has(key5))
|
|
251087
|
+
map3.set(key5, 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(key5);
|
|
251090
|
+
} else if (!Object.prototype.hasOwnProperty.call(map3, key5)) {
|
|
251091
|
+
Object.defineProperty(map3, key5, {
|
|
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: key5, value: value4 }) {
|
|
251114
|
+
if (identity3.isNode(key5) && key5.addToJSMap)
|
|
251115
|
+
key5.addToJSMap(ctx, map3, value4);
|
|
251116
|
+
else if (merge3.isMergeKey(ctx, key5))
|
|
251117
251117
|
merge3.addMergeToJSMap(ctx, map3, value4);
|
|
251118
251118
|
else {
|
|
251119
|
-
const jsKey = toJS.toJS(
|
|
251119
|
+
const jsKey = toJS.toJS(key5, "", 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(key5, 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(key5, 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(key5) && 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 = key5.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(key5, value4, ctx) {
|
|
251174
|
+
const k5 = createNode.createNode(key5, 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(key5, value4 = null) {
|
|
251181
251181
|
Object.defineProperty(this, identity3.NODE_TYPE, { value: identity3.PAIR });
|
|
251182
|
-
this.key =
|
|
251182
|
+
this.key = key5;
|
|
251183
251183
|
this.value = value4;
|
|
251184
251184
|
}
|
|
251185
251185
|
clone(schema) {
|
|
251186
|
-
let { key:
|
|
251187
|
-
if (identity3.isNode(
|
|
251188
|
-
|
|
251186
|
+
let { key: key5, value: value4 } = this;
|
|
251187
|
+
if (identity3.isNode(key5))
|
|
251188
|
+
key5 = key5.clone(schema);
|
|
251189
251189
|
if (identity3.isNode(value4))
|
|
251190
251190
|
value4 = value4.clone(schema);
|
|
251191
|
-
return new Pair(
|
|
251191
|
+
return new Pair(key5, 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, key5) {
|
|
251359
|
+
const k5 = identity3.isScalar(key5) ? key5.value : key5;
|
|
251360
251360
|
for (const it2 of items) {
|
|
251361
251361
|
if (identity3.isPair(it2)) {
|
|
251362
|
-
if (it2.key ===
|
|
251362
|
+
if (it2.key === key5 || 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 = (key5, 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, key5, value4);
|
|
251385
|
+
else if (Array.isArray(replacer) && !replacer.includes(key5))
|
|
251386
251386
|
return;
|
|
251387
251387
|
if (value4 !== undefined || keepUndefined)
|
|
251388
|
-
map3.items.push(Pair.createPair(
|
|
251388
|
+
map3.items.push(Pair.createPair(key5, value4, ctx));
|
|
251389
251389
|
};
|
|
251390
251390
|
if (obj instanceof Map) {
|
|
251391
|
-
for (const [
|
|
251392
|
-
add(
|
|
251391
|
+
for (const [key5, value4] of obj)
|
|
251392
|
+
add(key5, value4);
|
|
251393
251393
|
} else if (obj && typeof obj === "object") {
|
|
251394
|
-
for (const
|
|
251395
|
-
add(
|
|
251394
|
+
for (const key5 of Object.keys(obj))
|
|
251395
|
+
add(key5, obj[key5]);
|
|
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(key5) {
|
|
251430
|
+
const it2 = findPair(this.items, key5);
|
|
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(key5, keepScalar) {
|
|
251437
|
+
const it2 = findPair(this.items, key5);
|
|
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(key5) {
|
|
251442
|
+
return !!findPair(this.items, key5);
|
|
251443
251443
|
}
|
|
251444
|
-
set(
|
|
251445
|
-
this.add(new Pair.Pair(
|
|
251444
|
+
set(key5, value4) {
|
|
251445
|
+
this.add(new Pair.Pair(key5, 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(key5) {
|
|
251517
|
+
const idx = asItemIndex(key5);
|
|
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(key5, keepScalar) {
|
|
251524
|
+
const idx = asItemIndex(key5);
|
|
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(key5) {
|
|
251531
|
+
const idx = asItemIndex(key5);
|
|
251532
251532
|
return typeof idx === "number" && idx < this.items.length;
|
|
251533
251533
|
}
|
|
251534
|
-
set(
|
|
251535
|
-
const idx = asItemIndex(
|
|
251534
|
+
set(key5, value4) {
|
|
251535
|
+
const idx = asItemIndex(key5);
|
|
251536
251536
|
if (typeof idx !== "number")
|
|
251537
|
-
throw new Error(`Expected a valid index, not ${
|
|
251537
|
+
throw new Error(`Expected a valid index, not ${key5}.`);
|
|
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 key5 = obj instanceof Set ? it2 : String(i6++);
|
|
251572
|
+
it2 = replacer.call(obj, key5, 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(key5) {
|
|
251581
|
+
let idx = identity3.isScalar(key5) ? key5.value : key5;
|
|
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 key5, value4;
|
|
251954
251954
|
if (Array.isArray(it2)) {
|
|
251955
251955
|
if (it2.length === 2) {
|
|
251956
|
-
|
|
251956
|
+
key5 = 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
|
+
key5 = keys[0];
|
|
251964
|
+
value4 = it2[key5];
|
|
251965
251965
|
} else {
|
|
251966
251966
|
throw new TypeError(`Expected tuple with one key, not ${keys.length} keys`);
|
|
251967
251967
|
}
|
|
251968
251968
|
} else {
|
|
251969
|
-
|
|
251969
|
+
key5 = it2;
|
|
251970
251970
|
}
|
|
251971
|
-
pairs2.items.push(Pair.createPair(
|
|
251971
|
+
pairs2.items.push(Pair.createPair(key5, 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 key5, value4;
|
|
252013
252013
|
if (identity3.isPair(pair)) {
|
|
252014
|
-
|
|
252015
|
-
value4 = toJS.toJS(pair.value,
|
|
252014
|
+
key5 = toJS.toJS(pair.key, "", ctx);
|
|
252015
|
+
value4 = toJS.toJS(pair.value, key5, ctx);
|
|
252016
252016
|
} else {
|
|
252017
|
-
|
|
252017
|
+
key5 = toJS.toJS(pair, "", ctx);
|
|
252018
252018
|
}
|
|
252019
|
-
if (map3.has(
|
|
252019
|
+
if (map3.has(key5))
|
|
252020
252020
|
throw new Error("Ordered maps must not include duplicate keys");
|
|
252021
|
-
map3.set(
|
|
252021
|
+
map3.set(key5, 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: key5 } of pairs$1.items) {
|
|
252043
|
+
if (identity3.isScalar(key5)) {
|
|
252044
|
+
if (seenKeys.includes(key5.value)) {
|
|
252045
|
+
onError(`Ordered maps must not include duplicate keys: ${key5.value}`);
|
|
252046
252046
|
} else {
|
|
252047
|
-
seenKeys.push(
|
|
252047
|
+
seenKeys.push(key5.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(key5) {
|
|
252222
252222
|
let pair;
|
|
252223
|
-
if (identity3.isPair(
|
|
252224
|
-
pair =
|
|
252225
|
-
else if (
|
|
252226
|
-
pair = new Pair.Pair(
|
|
252223
|
+
if (identity3.isPair(key5))
|
|
252224
|
+
pair = key5;
|
|
252225
|
+
else if (key5 && typeof key5 === "object" && "key" in key5 && "value" in key5 && key5.value === null)
|
|
252226
|
+
pair = new Pair.Pair(key5.key, null);
|
|
252227
252227
|
else
|
|
252228
|
-
pair = new Pair.Pair(
|
|
252228
|
+
pair = new Pair.Pair(key5, 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(key5, keepPair) {
|
|
252234
|
+
const pair = YAMLMap.findPair(this.items, key5);
|
|
252235
252235
|
return !keepPair && identity3.isPair(pair) ? identity3.isScalar(pair.key) ? pair.key.value : pair.key : pair;
|
|
252236
252236
|
}
|
|
252237
|
-
set(
|
|
252237
|
+
set(key5, 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, key5);
|
|
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(key5));
|
|
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((key5) => key5 !== "yaml11").map((key5) => JSON.stringify(key5)).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((key5) => JSON.stringify(key5)).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(key5, value4, options = {}) {
|
|
252731
|
+
const k5 = this.createNode(key5, 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(key5) {
|
|
252736
|
+
return assertCollection(this.contents) ? this.contents.delete(key5) : 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(key5, keepScalar) {
|
|
252748
|
+
return identity3.isCollection(this.contents) ? this.contents.get(key5, 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(key5) {
|
|
252756
|
+
return identity3.isCollection(this.contents) ? this.contents.has(key5) : 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(key5, value4) {
|
|
252764
252764
|
if (this.contents == null) {
|
|
252765
|
-
this.contents = Collection.collectionFromPath(this.schema, [
|
|
252765
|
+
this.contents = Collection.collectionFromPath(this.schema, [key5], value4);
|
|
252766
252766
|
} else if (assertCollection(this.contents)) {
|
|
252767
|
-
this.contents.set(
|
|
252767
|
+
this.contents.set(key5, 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(key5) {
|
|
253052
|
+
if (!key5)
|
|
253053
253053
|
return null;
|
|
253054
|
-
switch (
|
|
253054
|
+
switch (key5.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 (key5.source.includes(`
|
|
253060
253060
|
`))
|
|
253061
253061
|
return true;
|
|
253062
|
-
if (
|
|
253063
|
-
for (const st2 of
|
|
253062
|
+
if (key5.end) {
|
|
253063
|
+
for (const st2 of key5.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 key5.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: key5, sep: sep3, value: value4 } = collItem;
|
|
253135
253135
|
const keyProps = resolveProps.resolveProps(start3, {
|
|
253136
253136
|
indicator: "explicit-key-ind",
|
|
253137
|
-
next:
|
|
253137
|
+
next: key5 ?? 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 (key5) {
|
|
253146
|
+
if (key5.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 key5 && key5.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(key5)) {
|
|
253163
|
+
onError(key5 ?? 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 = key5 ? composeNode(ctx, key5, 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, key5, 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: !key5 || key5.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: key5, 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: key5 ?? 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(key5))
|
|
253365
|
+
onError(key5, "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 = key5 ? composeNode(ctx, key5, props, onError) : composeEmptyNode(ctx, keyStart, start3, null, props, onError);
|
|
253411
|
+
if (isBlock(key5))
|
|
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 errors5 = 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 errors5.YAMLWarning(pos, code2, message));
|
|
254275
254275
|
else
|
|
254276
|
-
this.errors.push(new
|
|
254276
|
+
this.errors.push(new errors5.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 errors5.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 errors5.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 errors5.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 errors5 = 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 errors5.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 key5 of Object.keys(token))
|
|
254535
|
+
if (key5 !== "type" && key5 !== "offset")
|
|
254536
|
+
delete token[key5];
|
|
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 key5 of Object.keys(token))
|
|
254586
|
+
if (key5 !== "type" && key5 !== "offset")
|
|
254587
|
+
delete token[key5];
|
|
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: key5, 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 (key5)
|
|
254644
|
+
res += stringifyToken(key5);
|
|
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 key5 = 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: key5, 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 errors5 = 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(errors5.prettifyError(source, lineCounter2));
|
|
256291
|
+
doc.warnings.forEach(errors5.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 errors5.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(errors5.prettifyError(source, lineCounter2));
|
|
256312
|
+
doc.warnings.forEach(errors5.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: "SettleMint SDK, integrate SettleMint into your application with ease.",
|
|
256791
|
-
version: "0.9.3-
|
|
256791
|
+
version: "0.9.3-pr4d53708b",
|
|
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.2",
|
|
256841
256841
|
"@inquirer/input": "4.1.1",
|
|
256842
256842
|
"@inquirer/password": "4.0.4",
|
|
256843
256843
|
"@inquirer/select": "4.0.4",
|
|
256844
|
-
"@settlemint/sdk-js": "0.9.3-
|
|
256845
|
-
"@settlemint/sdk-utils": "0.9.3-
|
|
256844
|
+
"@settlemint/sdk-js": "0.9.3-pr4d53708b",
|
|
256845
|
+
"@settlemint/sdk-utils": "0.9.3-pr4d53708b",
|
|
256846
256846
|
"get-tsconfig": "4.8.1",
|
|
256847
256847
|
giget: "1.2.3"
|
|
256848
256848
|
},
|
|
@@ -256867,10 +256867,10 @@ var package_default = {
|
|
|
256867
256867
|
|
|
256868
256868
|
// src/commands/codegen/write-template.ts
|
|
256869
256869
|
import { mkdir, writeFile } from "node:fs/promises";
|
|
256870
|
-
import { join
|
|
256870
|
+
import { join } from "node:path";
|
|
256871
256871
|
|
|
256872
256872
|
// ../utils/dist/filesystem.mjs
|
|
256873
|
-
import { dirname
|
|
256873
|
+
import { dirname } from "node:path";
|
|
256874
256874
|
|
|
256875
256875
|
// ../../node_modules/find-up/index.js
|
|
256876
256876
|
import path2 from "node:path";
|
|
@@ -257103,20 +257103,7 @@ async function findUp(name, options = {}) {
|
|
|
257103
257103
|
|
|
257104
257104
|
// ../utils/dist/filesystem.mjs
|
|
257105
257105
|
import { stat } from "node:fs/promises";
|
|
257106
|
-
async function exists(path3) {
|
|
257107
|
-
try {
|
|
257108
|
-
await stat(path3);
|
|
257109
|
-
return true;
|
|
257110
|
-
} catch {
|
|
257111
|
-
return false;
|
|
257112
|
-
}
|
|
257113
|
-
}
|
|
257114
257106
|
async function projectRoot(fallbackToCwd = false) {
|
|
257115
|
-
const lockFiles = ["package-lock.json", "yarn.lock", "pnpm-lock.yaml", "bun.lockb", "bun.lock"];
|
|
257116
|
-
const lockFilesInCwd = await Promise.race(lockFiles.map((lockFile) => exists(join(process.cwd(), lockFile))));
|
|
257117
|
-
if (lockFilesInCwd) {
|
|
257118
|
-
return process.cwd();
|
|
257119
|
-
}
|
|
257120
257107
|
const packageJsonPath = await findUp("package.json");
|
|
257121
257108
|
if (!packageJsonPath) {
|
|
257122
257109
|
if (fallbackToCwd) {
|
|
@@ -257126,15 +257113,23 @@ async function projectRoot(fallbackToCwd = false) {
|
|
|
257126
257113
|
}
|
|
257127
257114
|
return dirname(packageJsonPath);
|
|
257128
257115
|
}
|
|
257116
|
+
async function exists(path3) {
|
|
257117
|
+
try {
|
|
257118
|
+
await stat(path3);
|
|
257119
|
+
return true;
|
|
257120
|
+
} catch {
|
|
257121
|
+
return false;
|
|
257122
|
+
}
|
|
257123
|
+
}
|
|
257129
257124
|
|
|
257130
257125
|
// src/commands/codegen/write-template.ts
|
|
257131
257126
|
async function writeTemplate(template, directory, filename) {
|
|
257132
257127
|
const projectDir = await projectRoot();
|
|
257133
|
-
const hasSrcDir = await exists(
|
|
257134
|
-
const basePath = hasSrcDir ?
|
|
257135
|
-
const codegenDir =
|
|
257128
|
+
const hasSrcDir = await exists(join(projectDir, "src"));
|
|
257129
|
+
const basePath = hasSrcDir ? join(projectDir, "src") : projectDir;
|
|
257130
|
+
const codegenDir = join(basePath, directory);
|
|
257136
257131
|
await mkdir(codegenDir, { recursive: true });
|
|
257137
|
-
const filePath =
|
|
257132
|
+
const filePath = join(codegenDir, filename);
|
|
257138
257133
|
await writeFile(filePath, template, "utf8");
|
|
257139
257134
|
}
|
|
257140
257135
|
|
|
@@ -257155,10 +257150,10 @@ function missingApplication() {
|
|
|
257155
257150
|
// src/utils/config.ts
|
|
257156
257151
|
import { mkdir as mkdir2, readFile, writeFile as writeFile2 } from "node:fs/promises";
|
|
257157
257152
|
import { homedir } from "node:os";
|
|
257158
|
-
import { join as
|
|
257153
|
+
import { join as join3 } from "node:path";
|
|
257159
257154
|
|
|
257160
257155
|
// ../utils/dist/index.mjs
|
|
257161
|
-
import { join as
|
|
257156
|
+
import { join as join2 } from "node:path";
|
|
257162
257157
|
import { spawn } from "node:child_process";
|
|
257163
257158
|
|
|
257164
257159
|
// ../../node_modules/zod/lib/index.mjs
|
|
@@ -261153,7 +261148,7 @@ var z = /* @__PURE__ */ Object.freeze({
|
|
|
261153
261148
|
|
|
261154
261149
|
// ../utils/dist/index.mjs
|
|
261155
261150
|
var import_dotenvx = __toESM(require_main2(), 1);
|
|
261156
|
-
import { dirname as dirname2
|
|
261151
|
+
import { dirname as dirname2 } from "node:path";
|
|
261157
261152
|
var import_dotenvx2 = __toESM(require_main2(), 1);
|
|
261158
261153
|
import { stat as stat2 } from "node:fs/promises";
|
|
261159
261154
|
|
|
@@ -267566,7 +267561,7 @@ var et = l((Re, tt) => {
|
|
|
267566
267561
|
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) => {
|
|
267567
267562
|
let n = e.colon || Bt, r = t.match(/\//) || g && t.match(/\\/) ? [""] : [
|
|
267568
267563
|
...g ? [process.cwd()] : [],
|
|
267569
|
-
...(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.
|
|
267564
|
+
...(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.eMe6gnI606:/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)
|
|
267570
267565
|
], s = g ? e.pathExt || process.env.PATHEXT || ".EXE;.CMD;.BAT;.COM" : "", o = g ? s.split(n) : [""];
|
|
267571
267566
|
return g && t.indexOf(".") !== -1 && o[0] !== "" && o.unshift(""), {
|
|
267572
267567
|
pathEnv: r,
|
|
@@ -268172,7 +268167,7 @@ async function loadEnvironmentEnv(validateEnv, prod, path5 = process.cwd()) {
|
|
|
268172
268167
|
logLevel: "error",
|
|
268173
268168
|
overload: true,
|
|
268174
268169
|
quiet: true,
|
|
268175
|
-
path:
|
|
268170
|
+
path: join2(path5, ".env")
|
|
268176
268171
|
});
|
|
268177
268172
|
if (!parsed) {
|
|
268178
268173
|
parsed = {};
|
|
@@ -268188,20 +268183,7 @@ async function loadEnvironmentEnv(validateEnv, prod, path5 = process.cwd()) {
|
|
|
268188
268183
|
return {};
|
|
268189
268184
|
}
|
|
268190
268185
|
}
|
|
268191
|
-
async function exists2(path5) {
|
|
268192
|
-
try {
|
|
268193
|
-
await stat2(path5);
|
|
268194
|
-
return true;
|
|
268195
|
-
} catch {
|
|
268196
|
-
return false;
|
|
268197
|
-
}
|
|
268198
|
-
}
|
|
268199
268186
|
async function projectRoot2(fallbackToCwd = false) {
|
|
268200
|
-
const lockFiles = ["package-lock.json", "yarn.lock", "pnpm-lock.yaml", "bun.lockb", "bun.lock"];
|
|
268201
|
-
const lockFilesInCwd = await Promise.race(lockFiles.map((lockFile) => exists2(join22(process.cwd(), lockFile))));
|
|
268202
|
-
if (lockFilesInCwd) {
|
|
268203
|
-
return process.cwd();
|
|
268204
|
-
}
|
|
268205
268187
|
const packageJsonPath = await findUp("package.json");
|
|
268206
268188
|
if (!packageJsonPath) {
|
|
268207
268189
|
if (fallbackToCwd) {
|
|
@@ -268211,6 +268193,14 @@ async function projectRoot2(fallbackToCwd = false) {
|
|
|
268211
268193
|
}
|
|
268212
268194
|
return dirname2(packageJsonPath);
|
|
268213
268195
|
}
|
|
268196
|
+
async function exists2(path5) {
|
|
268197
|
+
try {
|
|
268198
|
+
await stat2(path5);
|
|
268199
|
+
return true;
|
|
268200
|
+
} catch {
|
|
268201
|
+
return false;
|
|
268202
|
+
}
|
|
268203
|
+
}
|
|
268214
268204
|
async function getPackageManager(targetDir) {
|
|
268215
268205
|
const packageManager = await detect({ cwd: targetDir || process.cwd() });
|
|
268216
268206
|
return packageManager?.name ?? "npm";
|
|
@@ -268242,35 +268232,13 @@ async function isPackageInstalled(name, path5) {
|
|
|
268242
268232
|
const inPeerDependencies = !!pkgJson.content.peerDependencies?.[name];
|
|
268243
268233
|
return inDependencies || inDevDependencies || inPeerDependencies;
|
|
268244
268234
|
}
|
|
268245
|
-
var retryWhenFailed = async (fn, maxRetries = 5, initialSleepTime = 3000, stopOnError) => {
|
|
268246
|
-
let attempt = 0;
|
|
268247
|
-
while (attempt < maxRetries) {
|
|
268248
|
-
try {
|
|
268249
|
-
return await fn();
|
|
268250
|
-
} catch (e) {
|
|
268251
|
-
if (typeof stopOnError === "function") {
|
|
268252
|
-
const error = e;
|
|
268253
|
-
if (stopOnError(error)) {
|
|
268254
|
-
throw error;
|
|
268255
|
-
}
|
|
268256
|
-
}
|
|
268257
|
-
attempt += 1;
|
|
268258
|
-
if (attempt >= maxRetries) {
|
|
268259
|
-
throw e;
|
|
268260
|
-
}
|
|
268261
|
-
const delay = 2 ** attempt * initialSleepTime;
|
|
268262
|
-
await new Promise((resolve2) => setTimeout(resolve2, delay));
|
|
268263
|
-
}
|
|
268264
|
-
}
|
|
268265
|
-
return;
|
|
268266
|
-
};
|
|
268267
268235
|
function capitalizeFirstLetter(val) {
|
|
268268
268236
|
return String(val).charAt(0).toUpperCase() + String(val).slice(1);
|
|
268269
268237
|
}
|
|
268270
268238
|
|
|
268271
268239
|
// src/utils/config.ts
|
|
268272
|
-
var CONFIG_DIR =
|
|
268273
|
-
var CONFIG_FILE =
|
|
268240
|
+
var CONFIG_DIR = join3(homedir(), ".config", "settlemint");
|
|
268241
|
+
var CONFIG_FILE = join3(CONFIG_DIR, "config.json");
|
|
268274
268242
|
async function ensureConfigDir() {
|
|
268275
268243
|
if (!await exists(CONFIG_DIR)) {
|
|
268276
268244
|
await mkdir2(CONFIG_DIR, { recursive: true });
|
|
@@ -268546,41 +268514,50 @@ async function testGqlEndpoint({
|
|
|
268546
268514
|
accessToken,
|
|
268547
268515
|
hasuraAdminSecret,
|
|
268548
268516
|
gqlEndpoint,
|
|
268549
|
-
isHasura = false
|
|
268517
|
+
isHasura = false,
|
|
268518
|
+
maxRetries = 3
|
|
268550
268519
|
}) {
|
|
268551
268520
|
if (!gqlEndpoint) {
|
|
268552
268521
|
return false;
|
|
268553
268522
|
}
|
|
268554
|
-
|
|
268555
|
-
|
|
268556
|
-
|
|
268557
|
-
|
|
268558
|
-
|
|
268559
|
-
|
|
268560
|
-
|
|
268561
|
-
|
|
268562
|
-
|
|
268563
|
-
|
|
268564
|
-
query
|
|
268565
|
-
|
|
268566
|
-
|
|
268567
|
-
|
|
268523
|
+
for (let attempt = 0;attempt < maxRetries; attempt++) {
|
|
268524
|
+
try {
|
|
268525
|
+
const response = await fetch(gqlEndpoint, {
|
|
268526
|
+
method: "POST",
|
|
268527
|
+
headers: {
|
|
268528
|
+
"x-auth-token": accessToken,
|
|
268529
|
+
...isHasura ? { "x-hasura-admin-secret": hasuraAdminSecret ?? "" } : {},
|
|
268530
|
+
"Content-Type": "application/json"
|
|
268531
|
+
},
|
|
268532
|
+
body: JSON.stringify({
|
|
268533
|
+
query: `
|
|
268534
|
+
query {
|
|
268535
|
+
__schema {
|
|
268536
|
+
types {
|
|
268537
|
+
name
|
|
268538
|
+
}
|
|
268568
268539
|
}
|
|
268569
268540
|
}
|
|
268570
|
-
|
|
268571
|
-
|
|
268572
|
-
})
|
|
268573
|
-
|
|
268574
|
-
|
|
268575
|
-
|
|
268576
|
-
|
|
268577
|
-
|
|
268578
|
-
|
|
268579
|
-
|
|
268541
|
+
`
|
|
268542
|
+
})
|
|
268543
|
+
});
|
|
268544
|
+
if (!response.ok) {
|
|
268545
|
+
throw new Error(`HTTP error! status: ${response.status}`);
|
|
268546
|
+
}
|
|
268547
|
+
const data = await response.json();
|
|
268548
|
+
if (data.errors) {
|
|
268549
|
+
throw new Error("GraphQL errors in response");
|
|
268550
|
+
}
|
|
268551
|
+
return true;
|
|
268552
|
+
} catch (error5) {
|
|
268553
|
+
if (attempt === maxRetries - 1) {
|
|
268554
|
+
return false;
|
|
268555
|
+
}
|
|
268556
|
+
const delay2 = 2 ** attempt * 1000;
|
|
268557
|
+
await new Promise((resolve4) => setTimeout(resolve4, delay2));
|
|
268580
268558
|
}
|
|
268581
|
-
|
|
268582
|
-
|
|
268583
|
-
return result ?? false;
|
|
268559
|
+
}
|
|
268560
|
+
return false;
|
|
268584
268561
|
}
|
|
268585
268562
|
|
|
268586
268563
|
// ../../node_modules/get-tsconfig/dist/index.mjs
|
|
@@ -269567,13 +269544,13 @@ async function codegenTsconfig(env2, thegraphSubgraphNames) {
|
|
|
269567
269544
|
};
|
|
269568
269545
|
}
|
|
269569
269546
|
|
|
269570
|
-
// ../../node_modules/@inquirer/core/dist/esm/lib/key.js
|
|
269547
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/key.js
|
|
269571
269548
|
var isUpKey = (key) => key.name === "up" || key.name === "k" || key.ctrl && key.name === "p";
|
|
269572
269549
|
var isDownKey = (key) => key.name === "down" || key.name === "j" || key.ctrl && key.name === "n";
|
|
269573
269550
|
var isBackspaceKey = (key) => key.name === "backspace";
|
|
269574
269551
|
var isNumberKey = (key) => "123456789".includes(key.name);
|
|
269575
269552
|
var isEnterKey = (key) => key.name === "enter" || key.name === "return";
|
|
269576
|
-
// ../../node_modules/@inquirer/core/dist/esm/lib/errors.js
|
|
269553
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/errors.js
|
|
269577
269554
|
class AbortPromptError extends Error {
|
|
269578
269555
|
name = "AbortPromptError";
|
|
269579
269556
|
message = "Prompt was aborted";
|
|
@@ -269599,10 +269576,10 @@ class HookError extends Error {
|
|
|
269599
269576
|
class ValidationError extends Error {
|
|
269600
269577
|
name = "ValidationError";
|
|
269601
269578
|
}
|
|
269602
|
-
// ../../node_modules/@inquirer/core/dist/esm/lib/use-prefix.js
|
|
269579
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/use-prefix.js
|
|
269603
269580
|
import { AsyncResource as AsyncResource2 } from "node:async_hooks";
|
|
269604
269581
|
|
|
269605
|
-
// ../../node_modules/@inquirer/core/dist/esm/lib/hook-engine.js
|
|
269582
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/hook-engine.js
|
|
269606
269583
|
import { AsyncLocalStorage, AsyncResource } from "node:async_hooks";
|
|
269607
269584
|
var hookStorage = new AsyncLocalStorage;
|
|
269608
269585
|
function createStore(rl) {
|
|
@@ -269708,7 +269685,7 @@ var effectScheduler = {
|
|
|
269708
269685
|
}
|
|
269709
269686
|
};
|
|
269710
269687
|
|
|
269711
|
-
// ../../node_modules/@inquirer/core/dist/esm/lib/use-state.js
|
|
269688
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/use-state.js
|
|
269712
269689
|
function useState(defaultValue) {
|
|
269713
269690
|
return withPointer((pointer) => {
|
|
269714
269691
|
const setFn = (newValue) => {
|
|
@@ -269726,7 +269703,7 @@ function useState(defaultValue) {
|
|
|
269726
269703
|
});
|
|
269727
269704
|
}
|
|
269728
269705
|
|
|
269729
|
-
// ../../node_modules/@inquirer/core/dist/esm/lib/use-effect.js
|
|
269706
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/use-effect.js
|
|
269730
269707
|
function useEffect(cb, depArray) {
|
|
269731
269708
|
withPointer((pointer) => {
|
|
269732
269709
|
const oldDeps = pointer.get();
|
|
@@ -269738,7 +269715,7 @@ function useEffect(cb, depArray) {
|
|
|
269738
269715
|
});
|
|
269739
269716
|
}
|
|
269740
269717
|
|
|
269741
|
-
// ../../node_modules/@inquirer/core/dist/esm/lib/theme.js
|
|
269718
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/theme.js
|
|
269742
269719
|
var import_yoctocolors_cjs = __toESM(require_yoctocolors_cjs(), 1);
|
|
269743
269720
|
|
|
269744
269721
|
// ../../node_modules/@inquirer/figures/dist/esm/index.js
|
|
@@ -270027,7 +270004,7 @@ var figures = shouldUseMain ? mainSymbols : fallbackSymbols;
|
|
|
270027
270004
|
var esm_default = figures;
|
|
270028
270005
|
var replacements = Object.entries(specialMainSymbols);
|
|
270029
270006
|
|
|
270030
|
-
// ../../node_modules/@inquirer/core/dist/esm/lib/theme.js
|
|
270007
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/theme.js
|
|
270031
270008
|
var defaultTheme = {
|
|
270032
270009
|
prefix: {
|
|
270033
270010
|
idle: import_yoctocolors_cjs.default.blue("?"),
|
|
@@ -270048,7 +270025,7 @@ var defaultTheme = {
|
|
|
270048
270025
|
}
|
|
270049
270026
|
};
|
|
270050
270027
|
|
|
270051
|
-
// ../../node_modules/@inquirer/core/dist/esm/lib/make-theme.js
|
|
270028
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/make-theme.js
|
|
270052
270029
|
function isPlainObject(value4) {
|
|
270053
270030
|
if (typeof value4 !== "object" || value4 === null)
|
|
270054
270031
|
return false;
|
|
@@ -270076,7 +270053,7 @@ function makeTheme(...themes) {
|
|
|
270076
270053
|
return deepMerge2(...themesToMerge);
|
|
270077
270054
|
}
|
|
270078
270055
|
|
|
270079
|
-
// ../../node_modules/@inquirer/core/dist/esm/lib/use-prefix.js
|
|
270056
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/use-prefix.js
|
|
270080
270057
|
function usePrefix({ status = "idle", theme }) {
|
|
270081
270058
|
const [showLoader, setShowLoader] = useState(false);
|
|
270082
270059
|
const [tick, setTick] = useState(0);
|
|
@@ -270106,7 +270083,7 @@ function usePrefix({ status = "idle", theme }) {
|
|
|
270106
270083
|
const iconName = status === "loading" ? "idle" : status;
|
|
270107
270084
|
return typeof prefix === "string" ? prefix : prefix[iconName] ?? prefix["idle"];
|
|
270108
270085
|
}
|
|
270109
|
-
// ../../node_modules/@inquirer/core/dist/esm/lib/use-memo.js
|
|
270086
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/use-memo.js
|
|
270110
270087
|
function useMemo(fn, dependencies) {
|
|
270111
270088
|
return withPointer((pointer) => {
|
|
270112
270089
|
const prev = pointer.get();
|
|
@@ -270118,11 +270095,11 @@ function useMemo(fn, dependencies) {
|
|
|
270118
270095
|
return prev.value;
|
|
270119
270096
|
});
|
|
270120
270097
|
}
|
|
270121
|
-
// ../../node_modules/@inquirer/core/dist/esm/lib/use-ref.js
|
|
270098
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/use-ref.js
|
|
270122
270099
|
function useRef(val) {
|
|
270123
270100
|
return useState({ current: val })[0];
|
|
270124
270101
|
}
|
|
270125
|
-
// ../../node_modules/@inquirer/core/dist/esm/lib/use-keypress.js
|
|
270102
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/use-keypress.js
|
|
270126
270103
|
function useKeypress(userHandler) {
|
|
270127
270104
|
const signal = useRef(userHandler);
|
|
270128
270105
|
signal.current = userHandler;
|
|
@@ -270140,7 +270117,7 @@ function useKeypress(userHandler) {
|
|
|
270140
270117
|
};
|
|
270141
270118
|
}, []);
|
|
270142
270119
|
}
|
|
270143
|
-
// ../../node_modules/@inquirer/core/dist/esm/lib/utils.js
|
|
270120
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/utils.js
|
|
270144
270121
|
var import_cli_width = __toESM(require_cli_width(), 1);
|
|
270145
270122
|
var import_wrap_ansi = __toESM(require_wrap_ansi(), 1);
|
|
270146
270123
|
function breakLines(content, width) {
|
|
@@ -270153,7 +270130,7 @@ function readlineWidth() {
|
|
|
270153
270130
|
return import_cli_width.default({ defaultWidth: 80, output: readline().output });
|
|
270154
270131
|
}
|
|
270155
270132
|
|
|
270156
|
-
// ../../node_modules/@inquirer/core/dist/esm/lib/pagination/lines.js
|
|
270133
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/pagination/lines.js
|
|
270157
270134
|
function split2(content, width) {
|
|
270158
270135
|
return breakLines(content, width).split(`
|
|
270159
270136
|
`);
|
|
@@ -270198,7 +270175,7 @@ function lines({ items, width, renderItem, active, position: requested, pageSize
|
|
|
270198
270175
|
return pageBuffer.filter((line) => typeof line === "string");
|
|
270199
270176
|
}
|
|
270200
270177
|
|
|
270201
|
-
// ../../node_modules/@inquirer/core/dist/esm/lib/pagination/position.js
|
|
270178
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/pagination/position.js
|
|
270202
270179
|
function finite({ active, pageSize, total }) {
|
|
270203
270180
|
const middle = Math.floor(pageSize / 2);
|
|
270204
270181
|
if (total <= pageSize || active < middle)
|
|
@@ -270216,7 +270193,7 @@ function infinite({ active, lastActive, total, pageSize, pointer }) {
|
|
|
270216
270193
|
return pointer;
|
|
270217
270194
|
}
|
|
270218
270195
|
|
|
270219
|
-
// ../../node_modules/@inquirer/core/dist/esm/lib/pagination/use-pagination.js
|
|
270196
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/pagination/use-pagination.js
|
|
270220
270197
|
function usePagination({ items, active, renderItem, pageSize, loop = true }) {
|
|
270221
270198
|
const state = useRef({ position: 0, lastActive: 0 });
|
|
270222
270199
|
const position = loop ? infinite({
|
|
@@ -270242,13 +270219,13 @@ function usePagination({ items, active, renderItem, pageSize, loop = true }) {
|
|
|
270242
270219
|
}).join(`
|
|
270243
270220
|
`);
|
|
270244
270221
|
}
|
|
270245
|
-
// ../../node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
|
|
270222
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
|
|
270246
270223
|
var import_mute_stream = __toESM(require_lib13(), 1);
|
|
270247
270224
|
init_mjs();
|
|
270248
270225
|
import * as readline2 from "node:readline";
|
|
270249
270226
|
import { AsyncResource as AsyncResource3 } from "node:async_hooks";
|
|
270250
270227
|
|
|
270251
|
-
// ../../node_modules/@inquirer/core/dist/esm/lib/screen-manager.js
|
|
270228
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/screen-manager.js
|
|
270252
270229
|
var import_strip_ansi = __toESM(require_strip_ansi(), 1);
|
|
270253
270230
|
var import_ansi_escapes = __toESM(require_ansi_escapes(), 1);
|
|
270254
270231
|
var height = (content) => content.split(`
|
|
@@ -270319,7 +270296,7 @@ class ScreenManager {
|
|
|
270319
270296
|
}
|
|
270320
270297
|
}
|
|
270321
270298
|
|
|
270322
|
-
// ../../node_modules/@inquirer/core/dist/esm/lib/promise-polyfill.js
|
|
270299
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/promise-polyfill.js
|
|
270323
270300
|
class PromisePolyfill extends Promise {
|
|
270324
270301
|
static withResolver() {
|
|
270325
270302
|
let resolve4;
|
|
@@ -270332,7 +270309,7 @@ class PromisePolyfill extends Promise {
|
|
|
270332
270309
|
}
|
|
270333
270310
|
}
|
|
270334
270311
|
|
|
270335
|
-
// ../../node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
|
|
270312
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
|
|
270336
270313
|
function getCallSites() {
|
|
270337
270314
|
const _prepareStackTrace = Error.prepareStackTrace;
|
|
270338
270315
|
try {
|
|
@@ -270414,7 +270391,7 @@ function createPrompt(view) {
|
|
|
270414
270391
|
};
|
|
270415
270392
|
return prompt;
|
|
270416
270393
|
}
|
|
270417
|
-
// ../../node_modules/@inquirer/core/dist/esm/lib/Separator.js
|
|
270394
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/Separator.js
|
|
270418
270395
|
var import_yoctocolors_cjs2 = __toESM(require_yoctocolors_cjs(), 1);
|
|
270419
270396
|
class Separator {
|
|
270420
270397
|
separator = import_yoctocolors_cjs2.default.dim(Array.from({ length: 15 }).join(esm_default.line));
|
|
@@ -270597,11 +270574,11 @@ async function subgraphNamePrompt(env2) {
|
|
|
270597
270574
|
}
|
|
270598
270575
|
|
|
270599
270576
|
// ../utils/dist/environment.mjs
|
|
270600
|
-
import { join as
|
|
270577
|
+
import { join as join5 } from "node:path";
|
|
270601
270578
|
var import_dotenvx3 = __toESM(require_main2(), 1);
|
|
270602
270579
|
import { readFile as readFile4, writeFile as writeFile5 } from "node:fs/promises";
|
|
270603
|
-
import { dirname as dirname22, join as
|
|
270604
|
-
import { dirname as dirname6
|
|
270580
|
+
import { dirname as dirname22, join as join22 } from "node:path";
|
|
270581
|
+
import { dirname as dirname6 } from "node:path";
|
|
270605
270582
|
var import_dotenvx4 = __toESM(require_main2(), 1);
|
|
270606
270583
|
import { stat as stat7 } from "node:fs/promises";
|
|
270607
270584
|
var maskTokens3 = (output) => {
|
|
@@ -270700,7 +270677,7 @@ async function loadEnvironmentEnv2(validateEnv, prod, path5 = process.cwd()) {
|
|
|
270700
270677
|
logLevel: "error",
|
|
270701
270678
|
overload: true,
|
|
270702
270679
|
quiet: true,
|
|
270703
|
-
path:
|
|
270680
|
+
path: join5(path5, ".env")
|
|
270704
270681
|
});
|
|
270705
270682
|
if (!parsed) {
|
|
270706
270683
|
parsed = {};
|
|
@@ -270716,20 +270693,7 @@ async function loadEnvironmentEnv2(validateEnv, prod, path5 = process.cwd()) {
|
|
|
270716
270693
|
return {};
|
|
270717
270694
|
}
|
|
270718
270695
|
}
|
|
270719
|
-
async function exists3(path5) {
|
|
270720
|
-
try {
|
|
270721
|
-
await stat7(path5);
|
|
270722
|
-
return true;
|
|
270723
|
-
} catch {
|
|
270724
|
-
return false;
|
|
270725
|
-
}
|
|
270726
|
-
}
|
|
270727
270696
|
async function projectRoot3(fallbackToCwd = false) {
|
|
270728
|
-
const lockFiles = ["package-lock.json", "yarn.lock", "pnpm-lock.yaml", "bun.lockb", "bun.lock"];
|
|
270729
|
-
const lockFilesInCwd = await Promise.race(lockFiles.map((lockFile) => exists3(join23(process.cwd(), lockFile))));
|
|
270730
|
-
if (lockFilesInCwd) {
|
|
270731
|
-
return process.cwd();
|
|
270732
|
-
}
|
|
270733
270697
|
const packageJsonPath = await findUp("package.json");
|
|
270734
270698
|
if (!packageJsonPath) {
|
|
270735
270699
|
if (fallbackToCwd) {
|
|
@@ -270739,10 +270703,18 @@ async function projectRoot3(fallbackToCwd = false) {
|
|
|
270739
270703
|
}
|
|
270740
270704
|
return dirname6(packageJsonPath);
|
|
270741
270705
|
}
|
|
270706
|
+
async function exists3(path5) {
|
|
270707
|
+
try {
|
|
270708
|
+
await stat7(path5);
|
|
270709
|
+
return true;
|
|
270710
|
+
} catch {
|
|
270711
|
+
return false;
|
|
270712
|
+
}
|
|
270713
|
+
}
|
|
270742
270714
|
async function findMonoRepoRoot(startDir) {
|
|
270743
270715
|
let currentDir = startDir;
|
|
270744
270716
|
while (currentDir !== "/") {
|
|
270745
|
-
const packageJsonPath =
|
|
270717
|
+
const packageJsonPath = join22(currentDir, "package.json");
|
|
270746
270718
|
if (await exists3(packageJsonPath)) {
|
|
270747
270719
|
const packageJson = tryParseJson2(await readFile4(packageJsonPath, "utf-8"));
|
|
270748
270720
|
if (packageJson?.workspaces && Array.isArray(packageJson?.workspaces) && packageJson?.workspaces.length > 0) {
|
|
@@ -270763,12 +270735,12 @@ async function findMonoRepoPackages(projectDir) {
|
|
|
270763
270735
|
if (!monoRepoRoot) {
|
|
270764
270736
|
return [projectDir];
|
|
270765
270737
|
}
|
|
270766
|
-
const packageJsonPath =
|
|
270738
|
+
const packageJsonPath = join22(monoRepoRoot, "package.json");
|
|
270767
270739
|
const packageJson = tryParseJson2(await readFile4(packageJsonPath, "utf-8"));
|
|
270768
270740
|
const workspaces = packageJson?.workspaces ?? [];
|
|
270769
270741
|
const packagePaths = await Promise.all(workspaces.map(async (workspace) => {
|
|
270770
|
-
const matches = await glob(
|
|
270771
|
-
return matches.map((match2) =>
|
|
270742
|
+
const matches = await glob(join22(monoRepoRoot, workspace, "package.json"));
|
|
270743
|
+
return matches.map((match2) => join22(match2, ".."));
|
|
270772
270744
|
}));
|
|
270773
270745
|
const allPaths = packagePaths.flat();
|
|
270774
270746
|
return allPaths.length === 0 ? [projectDir] : [monoRepoRoot, ...allPaths];
|
|
@@ -270783,7 +270755,7 @@ async function writeEnv(prod, env2, secrets) {
|
|
|
270783
270755
|
}
|
|
270784
270756
|
const targetDirs = await findMonoRepoPackages(projectDir);
|
|
270785
270757
|
await Promise.all(targetDirs.map(async (dir) => {
|
|
270786
|
-
const envFile =
|
|
270758
|
+
const envFile = join22(dir, secrets ? `.env${prod ? ".production" : ""}.local` : `.env${prod ? ".production" : ""}`);
|
|
270787
270759
|
let { parsed: currentEnv } = await exists3(envFile) ? import_dotenvx4.config({
|
|
270788
270760
|
path: envFile,
|
|
270789
270761
|
logLevel: "error",
|
|
@@ -271177,12 +271149,12 @@ async function writeEnvSpinner(prod, env2) {
|
|
|
271177
271149
|
}
|
|
271178
271150
|
|
|
271179
271151
|
// src/utils/get-cluster-service-endpoint.ts
|
|
271180
|
-
async function getGraphEndpoint(service, env2
|
|
271152
|
+
async function getGraphEndpoint(service, env2) {
|
|
271181
271153
|
if (!service || service.__typename !== "HAGraphMiddleware") {
|
|
271182
271154
|
return {};
|
|
271183
271155
|
}
|
|
271184
271156
|
const isStarterKit = (id) => id.endsWith("-starterkits");
|
|
271185
|
-
const testEndpoint = service.subgraphs.find(({ graphqlQueryEndpoint }) =>
|
|
271157
|
+
const testEndpoint = service.subgraphs.find(({ graphqlQueryEndpoint }) => !isStarterKit(graphqlQueryEndpoint?.id))?.graphqlQueryEndpoint?.displayValue;
|
|
271186
271158
|
const starterKitEndpoint = service.subgraphs.find(({ graphqlQueryEndpoint }) => isStarterKit(graphqlQueryEndpoint?.id))?.graphqlQueryEndpoint?.displayValue;
|
|
271187
271159
|
const hasEndpoint = testEndpoint && env2.SETTLEMINT_ACCESS_TOKEN ? await testGqlEndpoint({ accessToken: env2.SETTLEMINT_ACCESS_TOKEN, gqlEndpoint: testEndpoint }) : false;
|
|
271188
271160
|
const endpoints = hasEndpoint ? service.subgraphs.map(({ graphqlQueryEndpoint }) => graphqlQueryEndpoint?.displayValue) : starterKitEndpoint ? [starterKitEndpoint] : [];
|
|
@@ -273181,20 +273153,28 @@ function createSettleMintClient(options) {
|
|
|
273181
273153
|
"x-auth-token": validatedOptions.accessToken
|
|
273182
273154
|
},
|
|
273183
273155
|
fetch: async (input, init2) => {
|
|
273184
|
-
const
|
|
273185
|
-
|
|
273186
|
-
|
|
273187
|
-
|
|
273188
|
-
|
|
273189
|
-
|
|
273190
|
-
|
|
273156
|
+
const maxRetries = 3;
|
|
273157
|
+
const retryDelay = 1000;
|
|
273158
|
+
for (let attempt = 1;attempt <= maxRetries; attempt++) {
|
|
273159
|
+
try {
|
|
273160
|
+
const response = await fetch(input, init2);
|
|
273161
|
+
if (response.ok) {
|
|
273162
|
+
return response;
|
|
273163
|
+
}
|
|
273164
|
+
if (response.status < 500 && response.status !== 429 && response.status !== 408 && response.status !== 0) {
|
|
273165
|
+
return response;
|
|
273166
|
+
}
|
|
273167
|
+
if (attempt === maxRetries) {
|
|
273168
|
+
return response;
|
|
273169
|
+
}
|
|
273170
|
+
} catch (error5) {
|
|
273171
|
+
if (attempt === maxRetries) {
|
|
273172
|
+
throw error5;
|
|
273173
|
+
}
|
|
273191
273174
|
}
|
|
273192
|
-
|
|
273193
|
-
});
|
|
273194
|
-
if (!response) {
|
|
273195
|
-
throw new Error("Failed to fetch");
|
|
273175
|
+
await new Promise((resolve5) => setTimeout(resolve5, retryDelay * 2 ** (attempt - 1) * (0.5 + Math.random())));
|
|
273196
273176
|
}
|
|
273197
|
-
|
|
273177
|
+
throw new Error("Max retries exceeded");
|
|
273198
273178
|
}
|
|
273199
273179
|
});
|
|
273200
273180
|
return {
|
|
@@ -273273,6 +273253,461 @@ function createSettleMintClient(options) {
|
|
|
273273
273253
|
};
|
|
273274
273254
|
}
|
|
273275
273255
|
|
|
273256
|
+
// ../../node_modules/@inquirer/core/dist/esm/lib/key.js
|
|
273257
|
+
var isEnterKey2 = (key2) => key2.name === "enter" || key2.name === "return";
|
|
273258
|
+
// ../../node_modules/@inquirer/core/dist/esm/lib/errors.js
|
|
273259
|
+
class AbortPromptError2 extends Error {
|
|
273260
|
+
name = "AbortPromptError";
|
|
273261
|
+
message = "Prompt was aborted";
|
|
273262
|
+
constructor(options) {
|
|
273263
|
+
super();
|
|
273264
|
+
this.cause = options?.cause;
|
|
273265
|
+
}
|
|
273266
|
+
}
|
|
273267
|
+
|
|
273268
|
+
class CancelPromptError2 extends Error {
|
|
273269
|
+
name = "CancelPromptError";
|
|
273270
|
+
message = "Prompt was canceled";
|
|
273271
|
+
}
|
|
273272
|
+
|
|
273273
|
+
class ExitPromptError2 extends Error {
|
|
273274
|
+
name = "ExitPromptError";
|
|
273275
|
+
}
|
|
273276
|
+
|
|
273277
|
+
class HookError2 extends Error {
|
|
273278
|
+
name = "HookError";
|
|
273279
|
+
}
|
|
273280
|
+
|
|
273281
|
+
class ValidationError2 extends Error {
|
|
273282
|
+
name = "ValidationError";
|
|
273283
|
+
}
|
|
273284
|
+
// ../../node_modules/@inquirer/core/dist/esm/lib/use-prefix.js
|
|
273285
|
+
import { AsyncResource as AsyncResource5 } from "node:async_hooks";
|
|
273286
|
+
|
|
273287
|
+
// ../../node_modules/@inquirer/core/dist/esm/lib/hook-engine.js
|
|
273288
|
+
import { AsyncLocalStorage as AsyncLocalStorage2, AsyncResource as AsyncResource4 } from "node:async_hooks";
|
|
273289
|
+
var hookStorage2 = new AsyncLocalStorage2;
|
|
273290
|
+
function createStore2(rl) {
|
|
273291
|
+
const store = {
|
|
273292
|
+
rl,
|
|
273293
|
+
hooks: [],
|
|
273294
|
+
hooksCleanup: [],
|
|
273295
|
+
hooksEffect: [],
|
|
273296
|
+
index: 0,
|
|
273297
|
+
handleChange() {
|
|
273298
|
+
}
|
|
273299
|
+
};
|
|
273300
|
+
return store;
|
|
273301
|
+
}
|
|
273302
|
+
function withHooks2(rl, cb) {
|
|
273303
|
+
const store = createStore2(rl);
|
|
273304
|
+
return hookStorage2.run(store, () => {
|
|
273305
|
+
function cycle(render) {
|
|
273306
|
+
store.handleChange = () => {
|
|
273307
|
+
store.index = 0;
|
|
273308
|
+
render();
|
|
273309
|
+
};
|
|
273310
|
+
store.handleChange();
|
|
273311
|
+
}
|
|
273312
|
+
return cb(cycle);
|
|
273313
|
+
});
|
|
273314
|
+
}
|
|
273315
|
+
function getStore2() {
|
|
273316
|
+
const store = hookStorage2.getStore();
|
|
273317
|
+
if (!store) {
|
|
273318
|
+
throw new HookError2("[Inquirer] Hook functions can only be called from within a prompt");
|
|
273319
|
+
}
|
|
273320
|
+
return store;
|
|
273321
|
+
}
|
|
273322
|
+
function readline3() {
|
|
273323
|
+
return getStore2().rl;
|
|
273324
|
+
}
|
|
273325
|
+
function withUpdates2(fn) {
|
|
273326
|
+
const wrapped = (...args) => {
|
|
273327
|
+
const store = getStore2();
|
|
273328
|
+
let shouldUpdate = false;
|
|
273329
|
+
const oldHandleChange = store.handleChange;
|
|
273330
|
+
store.handleChange = () => {
|
|
273331
|
+
shouldUpdate = true;
|
|
273332
|
+
};
|
|
273333
|
+
const returnValue = fn(...args);
|
|
273334
|
+
if (shouldUpdate) {
|
|
273335
|
+
oldHandleChange();
|
|
273336
|
+
}
|
|
273337
|
+
store.handleChange = oldHandleChange;
|
|
273338
|
+
return returnValue;
|
|
273339
|
+
};
|
|
273340
|
+
return AsyncResource4.bind(wrapped);
|
|
273341
|
+
}
|
|
273342
|
+
function withPointer2(cb) {
|
|
273343
|
+
const store = getStore2();
|
|
273344
|
+
const { index } = store;
|
|
273345
|
+
const pointer = {
|
|
273346
|
+
get() {
|
|
273347
|
+
return store.hooks[index];
|
|
273348
|
+
},
|
|
273349
|
+
set(value4) {
|
|
273350
|
+
store.hooks[index] = value4;
|
|
273351
|
+
},
|
|
273352
|
+
initialized: index in store.hooks
|
|
273353
|
+
};
|
|
273354
|
+
const returnValue = cb(pointer);
|
|
273355
|
+
store.index++;
|
|
273356
|
+
return returnValue;
|
|
273357
|
+
}
|
|
273358
|
+
function handleChange2() {
|
|
273359
|
+
getStore2().handleChange();
|
|
273360
|
+
}
|
|
273361
|
+
var effectScheduler2 = {
|
|
273362
|
+
queue(cb) {
|
|
273363
|
+
const store = getStore2();
|
|
273364
|
+
const { index } = store;
|
|
273365
|
+
store.hooksEffect.push(() => {
|
|
273366
|
+
store.hooksCleanup[index]?.();
|
|
273367
|
+
const cleanFn = cb(readline3());
|
|
273368
|
+
if (cleanFn != null && typeof cleanFn !== "function") {
|
|
273369
|
+
throw new ValidationError2("useEffect return value must be a cleanup function or nothing.");
|
|
273370
|
+
}
|
|
273371
|
+
store.hooksCleanup[index] = cleanFn;
|
|
273372
|
+
});
|
|
273373
|
+
},
|
|
273374
|
+
run() {
|
|
273375
|
+
const store = getStore2();
|
|
273376
|
+
withUpdates2(() => {
|
|
273377
|
+
store.hooksEffect.forEach((effect) => {
|
|
273378
|
+
effect();
|
|
273379
|
+
});
|
|
273380
|
+
store.hooksEffect.length = 0;
|
|
273381
|
+
})();
|
|
273382
|
+
},
|
|
273383
|
+
clearAll() {
|
|
273384
|
+
const store = getStore2();
|
|
273385
|
+
store.hooksCleanup.forEach((cleanFn) => {
|
|
273386
|
+
cleanFn?.();
|
|
273387
|
+
});
|
|
273388
|
+
store.hooksEffect.length = 0;
|
|
273389
|
+
store.hooksCleanup.length = 0;
|
|
273390
|
+
}
|
|
273391
|
+
};
|
|
273392
|
+
|
|
273393
|
+
// ../../node_modules/@inquirer/core/dist/esm/lib/use-state.js
|
|
273394
|
+
function useState2(defaultValue) {
|
|
273395
|
+
return withPointer2((pointer) => {
|
|
273396
|
+
const setFn = (newValue) => {
|
|
273397
|
+
if (pointer.get() !== newValue) {
|
|
273398
|
+
pointer.set(newValue);
|
|
273399
|
+
handleChange2();
|
|
273400
|
+
}
|
|
273401
|
+
};
|
|
273402
|
+
if (pointer.initialized) {
|
|
273403
|
+
return [pointer.get(), setFn];
|
|
273404
|
+
}
|
|
273405
|
+
const value4 = typeof defaultValue === "function" ? defaultValue() : defaultValue;
|
|
273406
|
+
pointer.set(value4);
|
|
273407
|
+
return [value4, setFn];
|
|
273408
|
+
});
|
|
273409
|
+
}
|
|
273410
|
+
|
|
273411
|
+
// ../../node_modules/@inquirer/core/dist/esm/lib/use-effect.js
|
|
273412
|
+
function useEffect2(cb, depArray) {
|
|
273413
|
+
withPointer2((pointer) => {
|
|
273414
|
+
const oldDeps = pointer.get();
|
|
273415
|
+
const hasChanged = !Array.isArray(oldDeps) || depArray.some((dep, i6) => !Object.is(dep, oldDeps[i6]));
|
|
273416
|
+
if (hasChanged) {
|
|
273417
|
+
effectScheduler2.queue(cb);
|
|
273418
|
+
}
|
|
273419
|
+
pointer.set(depArray);
|
|
273420
|
+
});
|
|
273421
|
+
}
|
|
273422
|
+
|
|
273423
|
+
// ../../node_modules/@inquirer/core/dist/esm/lib/theme.js
|
|
273424
|
+
var import_yoctocolors_cjs4 = __toESM(require_yoctocolors_cjs(), 1);
|
|
273425
|
+
var defaultTheme2 = {
|
|
273426
|
+
prefix: {
|
|
273427
|
+
idle: import_yoctocolors_cjs4.default.blue("?"),
|
|
273428
|
+
done: import_yoctocolors_cjs4.default.green(esm_default.tick)
|
|
273429
|
+
},
|
|
273430
|
+
spinner: {
|
|
273431
|
+
interval: 80,
|
|
273432
|
+
frames: ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"].map((frame) => import_yoctocolors_cjs4.default.yellow(frame))
|
|
273433
|
+
},
|
|
273434
|
+
style: {
|
|
273435
|
+
answer: import_yoctocolors_cjs4.default.cyan,
|
|
273436
|
+
message: import_yoctocolors_cjs4.default.bold,
|
|
273437
|
+
error: (text2) => import_yoctocolors_cjs4.default.red(`> ${text2}`),
|
|
273438
|
+
defaultAnswer: (text2) => import_yoctocolors_cjs4.default.dim(`(${text2})`),
|
|
273439
|
+
help: import_yoctocolors_cjs4.default.dim,
|
|
273440
|
+
highlight: import_yoctocolors_cjs4.default.cyan,
|
|
273441
|
+
key: (text2) => import_yoctocolors_cjs4.default.cyan(import_yoctocolors_cjs4.default.bold(`<${text2}>`))
|
|
273442
|
+
}
|
|
273443
|
+
};
|
|
273444
|
+
|
|
273445
|
+
// ../../node_modules/@inquirer/core/dist/esm/lib/make-theme.js
|
|
273446
|
+
function isPlainObject3(value4) {
|
|
273447
|
+
if (typeof value4 !== "object" || value4 === null)
|
|
273448
|
+
return false;
|
|
273449
|
+
let proto = value4;
|
|
273450
|
+
while (Object.getPrototypeOf(proto) !== null) {
|
|
273451
|
+
proto = Object.getPrototypeOf(proto);
|
|
273452
|
+
}
|
|
273453
|
+
return Object.getPrototypeOf(value4) === proto;
|
|
273454
|
+
}
|
|
273455
|
+
function deepMerge3(...objects) {
|
|
273456
|
+
const output = {};
|
|
273457
|
+
for (const obj of objects) {
|
|
273458
|
+
for (const [key2, value4] of Object.entries(obj)) {
|
|
273459
|
+
const prevValue = output[key2];
|
|
273460
|
+
output[key2] = isPlainObject3(prevValue) && isPlainObject3(value4) ? deepMerge3(prevValue, value4) : value4;
|
|
273461
|
+
}
|
|
273462
|
+
}
|
|
273463
|
+
return output;
|
|
273464
|
+
}
|
|
273465
|
+
function makeTheme2(...themes) {
|
|
273466
|
+
const themesToMerge = [
|
|
273467
|
+
defaultTheme2,
|
|
273468
|
+
...themes.filter((theme) => theme != null)
|
|
273469
|
+
];
|
|
273470
|
+
return deepMerge3(...themesToMerge);
|
|
273471
|
+
}
|
|
273472
|
+
|
|
273473
|
+
// ../../node_modules/@inquirer/core/dist/esm/lib/use-prefix.js
|
|
273474
|
+
function usePrefix2({ status = "idle", theme }) {
|
|
273475
|
+
const [showLoader, setShowLoader] = useState2(false);
|
|
273476
|
+
const [tick, setTick] = useState2(0);
|
|
273477
|
+
const { prefix, spinner: spinner2 } = makeTheme2(theme);
|
|
273478
|
+
useEffect2(() => {
|
|
273479
|
+
if (status === "loading") {
|
|
273480
|
+
let tickInterval;
|
|
273481
|
+
let inc = -1;
|
|
273482
|
+
const delayTimeout = setTimeout(AsyncResource5.bind(() => {
|
|
273483
|
+
setShowLoader(true);
|
|
273484
|
+
tickInterval = setInterval(AsyncResource5.bind(() => {
|
|
273485
|
+
inc = inc + 1;
|
|
273486
|
+
setTick(inc % spinner2.frames.length);
|
|
273487
|
+
}), spinner2.interval);
|
|
273488
|
+
}), 300);
|
|
273489
|
+
return () => {
|
|
273490
|
+
clearTimeout(delayTimeout);
|
|
273491
|
+
clearInterval(tickInterval);
|
|
273492
|
+
};
|
|
273493
|
+
} else {
|
|
273494
|
+
setShowLoader(false);
|
|
273495
|
+
}
|
|
273496
|
+
}, [status]);
|
|
273497
|
+
if (showLoader) {
|
|
273498
|
+
return spinner2.frames[tick];
|
|
273499
|
+
}
|
|
273500
|
+
const iconName = status === "loading" ? "idle" : status;
|
|
273501
|
+
return typeof prefix === "string" ? prefix : prefix[iconName] ?? prefix["idle"];
|
|
273502
|
+
}
|
|
273503
|
+
// ../../node_modules/@inquirer/core/dist/esm/lib/use-ref.js
|
|
273504
|
+
function useRef2(val) {
|
|
273505
|
+
return useState2({ current: val })[0];
|
|
273506
|
+
}
|
|
273507
|
+
|
|
273508
|
+
// ../../node_modules/@inquirer/core/dist/esm/lib/use-keypress.js
|
|
273509
|
+
function useKeypress2(userHandler) {
|
|
273510
|
+
const signal = useRef2(userHandler);
|
|
273511
|
+
signal.current = userHandler;
|
|
273512
|
+
useEffect2((rl) => {
|
|
273513
|
+
let ignore = false;
|
|
273514
|
+
const handler = withUpdates2((_input, event) => {
|
|
273515
|
+
if (ignore)
|
|
273516
|
+
return;
|
|
273517
|
+
signal.current(event, rl);
|
|
273518
|
+
});
|
|
273519
|
+
rl.input.on("keypress", handler);
|
|
273520
|
+
return () => {
|
|
273521
|
+
ignore = true;
|
|
273522
|
+
rl.input.removeListener("keypress", handler);
|
|
273523
|
+
};
|
|
273524
|
+
}, []);
|
|
273525
|
+
}
|
|
273526
|
+
// ../../node_modules/@inquirer/core/dist/esm/lib/utils.js
|
|
273527
|
+
var import_cli_width2 = __toESM(require_cli_width(), 1);
|
|
273528
|
+
var import_wrap_ansi2 = __toESM(require_wrap_ansi(), 1);
|
|
273529
|
+
function breakLines2(content, width) {
|
|
273530
|
+
return content.split(`
|
|
273531
|
+
`).flatMap((line) => import_wrap_ansi2.default(line, width, { trim: false, hard: true }).split(`
|
|
273532
|
+
`).map((str) => str.trimEnd())).join(`
|
|
273533
|
+
`);
|
|
273534
|
+
}
|
|
273535
|
+
function readlineWidth2() {
|
|
273536
|
+
return import_cli_width2.default({ defaultWidth: 80, output: readline3().output });
|
|
273537
|
+
}
|
|
273538
|
+
|
|
273539
|
+
// ../../node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
|
|
273540
|
+
var import_mute_stream2 = __toESM(require_lib13(), 1);
|
|
273541
|
+
init_mjs();
|
|
273542
|
+
import * as readline4 from "node:readline";
|
|
273543
|
+
import { AsyncResource as AsyncResource6 } from "node:async_hooks";
|
|
273544
|
+
|
|
273545
|
+
// ../../node_modules/@inquirer/core/dist/esm/lib/screen-manager.js
|
|
273546
|
+
var import_strip_ansi2 = __toESM(require_strip_ansi(), 1);
|
|
273547
|
+
var import_ansi_escapes3 = __toESM(require_ansi_escapes(), 1);
|
|
273548
|
+
var height2 = (content) => content.split(`
|
|
273549
|
+
`).length;
|
|
273550
|
+
var lastLine2 = (content) => content.split(`
|
|
273551
|
+
`).pop() ?? "";
|
|
273552
|
+
function cursorDown2(n6) {
|
|
273553
|
+
return n6 > 0 ? import_ansi_escapes3.default.cursorDown(n6) : "";
|
|
273554
|
+
}
|
|
273555
|
+
|
|
273556
|
+
class ScreenManager2 {
|
|
273557
|
+
rl;
|
|
273558
|
+
height = 0;
|
|
273559
|
+
extraLinesUnderPrompt = 0;
|
|
273560
|
+
cursorPos;
|
|
273561
|
+
constructor(rl) {
|
|
273562
|
+
this.rl = rl;
|
|
273563
|
+
this.rl = rl;
|
|
273564
|
+
this.cursorPos = rl.getCursorPos();
|
|
273565
|
+
}
|
|
273566
|
+
write(content) {
|
|
273567
|
+
this.rl.output.unmute();
|
|
273568
|
+
this.rl.output.write(content);
|
|
273569
|
+
this.rl.output.mute();
|
|
273570
|
+
}
|
|
273571
|
+
render(content, bottomContent = "") {
|
|
273572
|
+
const promptLine = lastLine2(content);
|
|
273573
|
+
const rawPromptLine = import_strip_ansi2.default(promptLine);
|
|
273574
|
+
let prompt = rawPromptLine;
|
|
273575
|
+
if (this.rl.line.length > 0) {
|
|
273576
|
+
prompt = prompt.slice(0, -this.rl.line.length);
|
|
273577
|
+
}
|
|
273578
|
+
this.rl.setPrompt(prompt);
|
|
273579
|
+
this.cursorPos = this.rl.getCursorPos();
|
|
273580
|
+
const width = readlineWidth2();
|
|
273581
|
+
content = breakLines2(content, width);
|
|
273582
|
+
bottomContent = breakLines2(bottomContent, width);
|
|
273583
|
+
if (rawPromptLine.length % width === 0) {
|
|
273584
|
+
content += `
|
|
273585
|
+
`;
|
|
273586
|
+
}
|
|
273587
|
+
let output = content + (bottomContent ? `
|
|
273588
|
+
` + bottomContent : "");
|
|
273589
|
+
const promptLineUpDiff = Math.floor(rawPromptLine.length / width) - this.cursorPos.rows;
|
|
273590
|
+
const bottomContentHeight = promptLineUpDiff + (bottomContent ? height2(bottomContent) : 0);
|
|
273591
|
+
if (bottomContentHeight > 0)
|
|
273592
|
+
output += import_ansi_escapes3.default.cursorUp(bottomContentHeight);
|
|
273593
|
+
output += import_ansi_escapes3.default.cursorTo(this.cursorPos.cols);
|
|
273594
|
+
this.write(cursorDown2(this.extraLinesUnderPrompt) + import_ansi_escapes3.default.eraseLines(this.height) + output);
|
|
273595
|
+
this.extraLinesUnderPrompt = bottomContentHeight;
|
|
273596
|
+
this.height = height2(output);
|
|
273597
|
+
}
|
|
273598
|
+
checkCursorPos() {
|
|
273599
|
+
const cursorPos = this.rl.getCursorPos();
|
|
273600
|
+
if (cursorPos.cols !== this.cursorPos.cols) {
|
|
273601
|
+
this.write(import_ansi_escapes3.default.cursorTo(cursorPos.cols));
|
|
273602
|
+
this.cursorPos = cursorPos;
|
|
273603
|
+
}
|
|
273604
|
+
}
|
|
273605
|
+
done({ clearContent }) {
|
|
273606
|
+
this.rl.setPrompt("");
|
|
273607
|
+
let output = cursorDown2(this.extraLinesUnderPrompt);
|
|
273608
|
+
output += clearContent ? import_ansi_escapes3.default.eraseLines(this.height) : `
|
|
273609
|
+
`;
|
|
273610
|
+
output += import_ansi_escapes3.default.cursorShow;
|
|
273611
|
+
this.write(output);
|
|
273612
|
+
this.rl.close();
|
|
273613
|
+
}
|
|
273614
|
+
}
|
|
273615
|
+
|
|
273616
|
+
// ../../node_modules/@inquirer/core/dist/esm/lib/promise-polyfill.js
|
|
273617
|
+
class PromisePolyfill2 extends Promise {
|
|
273618
|
+
static withResolver() {
|
|
273619
|
+
let resolve5;
|
|
273620
|
+
let reject;
|
|
273621
|
+
const promise = new Promise((res, rej) => {
|
|
273622
|
+
resolve5 = res;
|
|
273623
|
+
reject = rej;
|
|
273624
|
+
});
|
|
273625
|
+
return { promise, resolve: resolve5, reject };
|
|
273626
|
+
}
|
|
273627
|
+
}
|
|
273628
|
+
|
|
273629
|
+
// ../../node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
|
|
273630
|
+
function getCallSites2() {
|
|
273631
|
+
const _prepareStackTrace = Error.prepareStackTrace;
|
|
273632
|
+
try {
|
|
273633
|
+
let result = [];
|
|
273634
|
+
Error.prepareStackTrace = (_5, callSites) => {
|
|
273635
|
+
const callSitesWithoutCurrent = callSites.slice(1);
|
|
273636
|
+
result = callSitesWithoutCurrent;
|
|
273637
|
+
return callSitesWithoutCurrent;
|
|
273638
|
+
};
|
|
273639
|
+
new Error().stack;
|
|
273640
|
+
return result;
|
|
273641
|
+
} finally {
|
|
273642
|
+
Error.prepareStackTrace = _prepareStackTrace;
|
|
273643
|
+
}
|
|
273644
|
+
}
|
|
273645
|
+
function createPrompt2(view) {
|
|
273646
|
+
const callSites = getCallSites2();
|
|
273647
|
+
const callerFilename = callSites[1]?.getFileName?.();
|
|
273648
|
+
const prompt = (config4, context = {}) => {
|
|
273649
|
+
const { input = process.stdin, signal } = context;
|
|
273650
|
+
const cleanups = new Set;
|
|
273651
|
+
const output = new import_mute_stream2.default;
|
|
273652
|
+
output.pipe(context.output ?? process.stdout);
|
|
273653
|
+
const rl = readline4.createInterface({
|
|
273654
|
+
terminal: true,
|
|
273655
|
+
input,
|
|
273656
|
+
output
|
|
273657
|
+
});
|
|
273658
|
+
const screen = new ScreenManager2(rl);
|
|
273659
|
+
const { promise, resolve: resolve5, reject } = PromisePolyfill2.withResolver();
|
|
273660
|
+
const cancel4 = () => reject(new CancelPromptError2);
|
|
273661
|
+
if (signal) {
|
|
273662
|
+
const abort = () => reject(new AbortPromptError2({ cause: signal.reason }));
|
|
273663
|
+
if (signal.aborted) {
|
|
273664
|
+
abort();
|
|
273665
|
+
return Object.assign(promise, { cancel: cancel4 });
|
|
273666
|
+
}
|
|
273667
|
+
signal.addEventListener("abort", abort);
|
|
273668
|
+
cleanups.add(() => signal.removeEventListener("abort", abort));
|
|
273669
|
+
}
|
|
273670
|
+
cleanups.add(onExit((code2, signal2) => {
|
|
273671
|
+
reject(new ExitPromptError2(`User force closed the prompt with ${code2} ${signal2}`));
|
|
273672
|
+
}));
|
|
273673
|
+
const checkCursorPos = () => screen.checkCursorPos();
|
|
273674
|
+
rl.input.on("keypress", checkCursorPos);
|
|
273675
|
+
cleanups.add(() => rl.input.removeListener("keypress", checkCursorPos));
|
|
273676
|
+
return withHooks2(rl, (cycle) => {
|
|
273677
|
+
const hooksCleanup = AsyncResource6.bind(() => effectScheduler2.clearAll());
|
|
273678
|
+
rl.on("close", hooksCleanup);
|
|
273679
|
+
cleanups.add(() => rl.removeListener("close", hooksCleanup));
|
|
273680
|
+
cycle(() => {
|
|
273681
|
+
try {
|
|
273682
|
+
const nextView = view(config4, (value4) => {
|
|
273683
|
+
setImmediate(() => resolve5(value4));
|
|
273684
|
+
});
|
|
273685
|
+
if (nextView === undefined) {
|
|
273686
|
+
throw new Error(`Prompt functions must return a string.
|
|
273687
|
+
at ${callerFilename}`);
|
|
273688
|
+
}
|
|
273689
|
+
const [content, bottomContent] = typeof nextView === "string" ? [nextView] : nextView;
|
|
273690
|
+
screen.render(content, bottomContent);
|
|
273691
|
+
effectScheduler2.run();
|
|
273692
|
+
} catch (error5) {
|
|
273693
|
+
reject(error5);
|
|
273694
|
+
}
|
|
273695
|
+
});
|
|
273696
|
+
return Object.assign(promise.then((answer) => {
|
|
273697
|
+
effectScheduler2.clearAll();
|
|
273698
|
+
return answer;
|
|
273699
|
+
}, (error5) => {
|
|
273700
|
+
effectScheduler2.clearAll();
|
|
273701
|
+
throw error5;
|
|
273702
|
+
}).finally(() => {
|
|
273703
|
+
cleanups.forEach((cleanup) => cleanup());
|
|
273704
|
+
screen.done({ clearContent: Boolean(context.clearPromptOnDone) });
|
|
273705
|
+
output.end();
|
|
273706
|
+
}).then(() => promise), { cancel: cancel4 });
|
|
273707
|
+
});
|
|
273708
|
+
};
|
|
273709
|
+
return prompt;
|
|
273710
|
+
}
|
|
273276
273711
|
// ../../node_modules/@inquirer/confirm/dist/esm/index.js
|
|
273277
273712
|
function getBooleanValue(value4, defaultValue) {
|
|
273278
273713
|
let answer = defaultValue !== false;
|
|
@@ -273285,19 +273720,19 @@ function getBooleanValue(value4, defaultValue) {
|
|
|
273285
273720
|
function boolToString(value4) {
|
|
273286
273721
|
return value4 ? "Yes" : "No";
|
|
273287
273722
|
}
|
|
273288
|
-
var esm_default3 =
|
|
273723
|
+
var esm_default3 = createPrompt2((config4, done) => {
|
|
273289
273724
|
const { transformer = boolToString } = config4;
|
|
273290
|
-
const [status, setStatus] =
|
|
273291
|
-
const [value4, setValue] =
|
|
273292
|
-
const theme =
|
|
273293
|
-
const prefix =
|
|
273294
|
-
|
|
273295
|
-
if (
|
|
273725
|
+
const [status, setStatus] = useState2("idle");
|
|
273726
|
+
const [value4, setValue] = useState2("");
|
|
273727
|
+
const theme = makeTheme2(config4.theme);
|
|
273728
|
+
const prefix = usePrefix2({ status, theme });
|
|
273729
|
+
useKeypress2((key3, rl) => {
|
|
273730
|
+
if (isEnterKey2(key3)) {
|
|
273296
273731
|
const answer = getBooleanValue(value4, config4.default);
|
|
273297
273732
|
setValue(transformer(answer));
|
|
273298
273733
|
setStatus("done");
|
|
273299
273734
|
done(answer);
|
|
273300
|
-
} else if (
|
|
273735
|
+
} else if (key3.name === "tab") {
|
|
273301
273736
|
const answer = boolToString(!getBooleanValue(value4, config4.default));
|
|
273302
273737
|
rl.clearLine(0);
|
|
273303
273738
|
rl.write(answer);
|
|
@@ -273317,23 +273752,479 @@ var esm_default3 = createPrompt((config4, done) => {
|
|
|
273317
273752
|
return `${prefix} ${message}${defaultValue} ${formattedValue}`;
|
|
273318
273753
|
});
|
|
273319
273754
|
|
|
273755
|
+
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/key.js
|
|
273756
|
+
var isBackspaceKey2 = (key3) => key3.name === "backspace";
|
|
273757
|
+
var isEnterKey3 = (key3) => key3.name === "enter" || key3.name === "return";
|
|
273758
|
+
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/errors.js
|
|
273759
|
+
class AbortPromptError3 extends Error {
|
|
273760
|
+
name = "AbortPromptError";
|
|
273761
|
+
message = "Prompt was aborted";
|
|
273762
|
+
constructor(options) {
|
|
273763
|
+
super();
|
|
273764
|
+
this.cause = options?.cause;
|
|
273765
|
+
}
|
|
273766
|
+
}
|
|
273767
|
+
|
|
273768
|
+
class CancelPromptError3 extends Error {
|
|
273769
|
+
name = "CancelPromptError";
|
|
273770
|
+
message = "Prompt was canceled";
|
|
273771
|
+
}
|
|
273772
|
+
|
|
273773
|
+
class ExitPromptError3 extends Error {
|
|
273774
|
+
name = "ExitPromptError";
|
|
273775
|
+
}
|
|
273776
|
+
|
|
273777
|
+
class HookError3 extends Error {
|
|
273778
|
+
name = "HookError";
|
|
273779
|
+
}
|
|
273780
|
+
|
|
273781
|
+
class ValidationError3 extends Error {
|
|
273782
|
+
name = "ValidationError";
|
|
273783
|
+
}
|
|
273784
|
+
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/use-prefix.js
|
|
273785
|
+
import { AsyncResource as AsyncResource8 } from "node:async_hooks";
|
|
273786
|
+
|
|
273787
|
+
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/hook-engine.js
|
|
273788
|
+
import { AsyncLocalStorage as AsyncLocalStorage3, AsyncResource as AsyncResource7 } from "node:async_hooks";
|
|
273789
|
+
var hookStorage3 = new AsyncLocalStorage3;
|
|
273790
|
+
function createStore3(rl) {
|
|
273791
|
+
const store = {
|
|
273792
|
+
rl,
|
|
273793
|
+
hooks: [],
|
|
273794
|
+
hooksCleanup: [],
|
|
273795
|
+
hooksEffect: [],
|
|
273796
|
+
index: 0,
|
|
273797
|
+
handleChange() {
|
|
273798
|
+
}
|
|
273799
|
+
};
|
|
273800
|
+
return store;
|
|
273801
|
+
}
|
|
273802
|
+
function withHooks3(rl, cb) {
|
|
273803
|
+
const store = createStore3(rl);
|
|
273804
|
+
return hookStorage3.run(store, () => {
|
|
273805
|
+
function cycle(render) {
|
|
273806
|
+
store.handleChange = () => {
|
|
273807
|
+
store.index = 0;
|
|
273808
|
+
render();
|
|
273809
|
+
};
|
|
273810
|
+
store.handleChange();
|
|
273811
|
+
}
|
|
273812
|
+
return cb(cycle);
|
|
273813
|
+
});
|
|
273814
|
+
}
|
|
273815
|
+
function getStore3() {
|
|
273816
|
+
const store = hookStorage3.getStore();
|
|
273817
|
+
if (!store) {
|
|
273818
|
+
throw new HookError3("[Inquirer] Hook functions can only be called from within a prompt");
|
|
273819
|
+
}
|
|
273820
|
+
return store;
|
|
273821
|
+
}
|
|
273822
|
+
function readline5() {
|
|
273823
|
+
return getStore3().rl;
|
|
273824
|
+
}
|
|
273825
|
+
function withUpdates3(fn) {
|
|
273826
|
+
const wrapped = (...args) => {
|
|
273827
|
+
const store = getStore3();
|
|
273828
|
+
let shouldUpdate = false;
|
|
273829
|
+
const oldHandleChange = store.handleChange;
|
|
273830
|
+
store.handleChange = () => {
|
|
273831
|
+
shouldUpdate = true;
|
|
273832
|
+
};
|
|
273833
|
+
const returnValue = fn(...args);
|
|
273834
|
+
if (shouldUpdate) {
|
|
273835
|
+
oldHandleChange();
|
|
273836
|
+
}
|
|
273837
|
+
store.handleChange = oldHandleChange;
|
|
273838
|
+
return returnValue;
|
|
273839
|
+
};
|
|
273840
|
+
return AsyncResource7.bind(wrapped);
|
|
273841
|
+
}
|
|
273842
|
+
function withPointer3(cb) {
|
|
273843
|
+
const store = getStore3();
|
|
273844
|
+
const { index } = store;
|
|
273845
|
+
const pointer = {
|
|
273846
|
+
get() {
|
|
273847
|
+
return store.hooks[index];
|
|
273848
|
+
},
|
|
273849
|
+
set(value4) {
|
|
273850
|
+
store.hooks[index] = value4;
|
|
273851
|
+
},
|
|
273852
|
+
initialized: index in store.hooks
|
|
273853
|
+
};
|
|
273854
|
+
const returnValue = cb(pointer);
|
|
273855
|
+
store.index++;
|
|
273856
|
+
return returnValue;
|
|
273857
|
+
}
|
|
273858
|
+
function handleChange3() {
|
|
273859
|
+
getStore3().handleChange();
|
|
273860
|
+
}
|
|
273861
|
+
var effectScheduler3 = {
|
|
273862
|
+
queue(cb) {
|
|
273863
|
+
const store = getStore3();
|
|
273864
|
+
const { index } = store;
|
|
273865
|
+
store.hooksEffect.push(() => {
|
|
273866
|
+
store.hooksCleanup[index]?.();
|
|
273867
|
+
const cleanFn = cb(readline5());
|
|
273868
|
+
if (cleanFn != null && typeof cleanFn !== "function") {
|
|
273869
|
+
throw new ValidationError3("useEffect return value must be a cleanup function or nothing.");
|
|
273870
|
+
}
|
|
273871
|
+
store.hooksCleanup[index] = cleanFn;
|
|
273872
|
+
});
|
|
273873
|
+
},
|
|
273874
|
+
run() {
|
|
273875
|
+
const store = getStore3();
|
|
273876
|
+
withUpdates3(() => {
|
|
273877
|
+
store.hooksEffect.forEach((effect) => {
|
|
273878
|
+
effect();
|
|
273879
|
+
});
|
|
273880
|
+
store.hooksEffect.length = 0;
|
|
273881
|
+
})();
|
|
273882
|
+
},
|
|
273883
|
+
clearAll() {
|
|
273884
|
+
const store = getStore3();
|
|
273885
|
+
store.hooksCleanup.forEach((cleanFn) => {
|
|
273886
|
+
cleanFn?.();
|
|
273887
|
+
});
|
|
273888
|
+
store.hooksEffect.length = 0;
|
|
273889
|
+
store.hooksCleanup.length = 0;
|
|
273890
|
+
}
|
|
273891
|
+
};
|
|
273892
|
+
|
|
273893
|
+
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/use-state.js
|
|
273894
|
+
function useState3(defaultValue) {
|
|
273895
|
+
return withPointer3((pointer) => {
|
|
273896
|
+
const setFn = (newValue) => {
|
|
273897
|
+
if (pointer.get() !== newValue) {
|
|
273898
|
+
pointer.set(newValue);
|
|
273899
|
+
handleChange3();
|
|
273900
|
+
}
|
|
273901
|
+
};
|
|
273902
|
+
if (pointer.initialized) {
|
|
273903
|
+
return [pointer.get(), setFn];
|
|
273904
|
+
}
|
|
273905
|
+
const value4 = typeof defaultValue === "function" ? defaultValue() : defaultValue;
|
|
273906
|
+
pointer.set(value4);
|
|
273907
|
+
return [value4, setFn];
|
|
273908
|
+
});
|
|
273909
|
+
}
|
|
273910
|
+
|
|
273911
|
+
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/use-effect.js
|
|
273912
|
+
function useEffect3(cb, depArray) {
|
|
273913
|
+
withPointer3((pointer) => {
|
|
273914
|
+
const oldDeps = pointer.get();
|
|
273915
|
+
const hasChanged = !Array.isArray(oldDeps) || depArray.some((dep, i6) => !Object.is(dep, oldDeps[i6]));
|
|
273916
|
+
if (hasChanged) {
|
|
273917
|
+
effectScheduler3.queue(cb);
|
|
273918
|
+
}
|
|
273919
|
+
pointer.set(depArray);
|
|
273920
|
+
});
|
|
273921
|
+
}
|
|
273922
|
+
|
|
273923
|
+
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/theme.js
|
|
273924
|
+
var import_yoctocolors_cjs5 = __toESM(require_yoctocolors_cjs(), 1);
|
|
273925
|
+
var defaultTheme3 = {
|
|
273926
|
+
prefix: {
|
|
273927
|
+
idle: import_yoctocolors_cjs5.default.blue("?"),
|
|
273928
|
+
done: import_yoctocolors_cjs5.default.green(esm_default.tick)
|
|
273929
|
+
},
|
|
273930
|
+
spinner: {
|
|
273931
|
+
interval: 80,
|
|
273932
|
+
frames: ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"].map((frame) => import_yoctocolors_cjs5.default.yellow(frame))
|
|
273933
|
+
},
|
|
273934
|
+
style: {
|
|
273935
|
+
answer: import_yoctocolors_cjs5.default.cyan,
|
|
273936
|
+
message: import_yoctocolors_cjs5.default.bold,
|
|
273937
|
+
error: (text2) => import_yoctocolors_cjs5.default.red(`> ${text2}`),
|
|
273938
|
+
defaultAnswer: (text2) => import_yoctocolors_cjs5.default.dim(`(${text2})`),
|
|
273939
|
+
help: import_yoctocolors_cjs5.default.dim,
|
|
273940
|
+
highlight: import_yoctocolors_cjs5.default.cyan,
|
|
273941
|
+
key: (text2) => import_yoctocolors_cjs5.default.cyan(import_yoctocolors_cjs5.default.bold(`<${text2}>`))
|
|
273942
|
+
}
|
|
273943
|
+
};
|
|
273944
|
+
|
|
273945
|
+
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/make-theme.js
|
|
273946
|
+
function isPlainObject4(value4) {
|
|
273947
|
+
if (typeof value4 !== "object" || value4 === null)
|
|
273948
|
+
return false;
|
|
273949
|
+
let proto = value4;
|
|
273950
|
+
while (Object.getPrototypeOf(proto) !== null) {
|
|
273951
|
+
proto = Object.getPrototypeOf(proto);
|
|
273952
|
+
}
|
|
273953
|
+
return Object.getPrototypeOf(value4) === proto;
|
|
273954
|
+
}
|
|
273955
|
+
function deepMerge4(...objects) {
|
|
273956
|
+
const output = {};
|
|
273957
|
+
for (const obj of objects) {
|
|
273958
|
+
for (const [key3, value4] of Object.entries(obj)) {
|
|
273959
|
+
const prevValue = output[key3];
|
|
273960
|
+
output[key3] = isPlainObject4(prevValue) && isPlainObject4(value4) ? deepMerge4(prevValue, value4) : value4;
|
|
273961
|
+
}
|
|
273962
|
+
}
|
|
273963
|
+
return output;
|
|
273964
|
+
}
|
|
273965
|
+
function makeTheme3(...themes) {
|
|
273966
|
+
const themesToMerge = [
|
|
273967
|
+
defaultTheme3,
|
|
273968
|
+
...themes.filter((theme) => theme != null)
|
|
273969
|
+
];
|
|
273970
|
+
return deepMerge4(...themesToMerge);
|
|
273971
|
+
}
|
|
273972
|
+
|
|
273973
|
+
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/use-prefix.js
|
|
273974
|
+
function usePrefix3({ status = "idle", theme }) {
|
|
273975
|
+
const [showLoader, setShowLoader] = useState3(false);
|
|
273976
|
+
const [tick, setTick] = useState3(0);
|
|
273977
|
+
const { prefix, spinner: spinner2 } = makeTheme3(theme);
|
|
273978
|
+
useEffect3(() => {
|
|
273979
|
+
if (status === "loading") {
|
|
273980
|
+
let tickInterval;
|
|
273981
|
+
let inc = -1;
|
|
273982
|
+
const delayTimeout = setTimeout(AsyncResource8.bind(() => {
|
|
273983
|
+
setShowLoader(true);
|
|
273984
|
+
tickInterval = setInterval(AsyncResource8.bind(() => {
|
|
273985
|
+
inc = inc + 1;
|
|
273986
|
+
setTick(inc % spinner2.frames.length);
|
|
273987
|
+
}), spinner2.interval);
|
|
273988
|
+
}), 300);
|
|
273989
|
+
return () => {
|
|
273990
|
+
clearTimeout(delayTimeout);
|
|
273991
|
+
clearInterval(tickInterval);
|
|
273992
|
+
};
|
|
273993
|
+
} else {
|
|
273994
|
+
setShowLoader(false);
|
|
273995
|
+
}
|
|
273996
|
+
}, [status]);
|
|
273997
|
+
if (showLoader) {
|
|
273998
|
+
return spinner2.frames[tick];
|
|
273999
|
+
}
|
|
274000
|
+
const iconName = status === "loading" ? "idle" : status;
|
|
274001
|
+
return typeof prefix === "string" ? prefix : prefix[iconName] ?? prefix["idle"];
|
|
274002
|
+
}
|
|
274003
|
+
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/use-ref.js
|
|
274004
|
+
function useRef3(val) {
|
|
274005
|
+
return useState3({ current: val })[0];
|
|
274006
|
+
}
|
|
274007
|
+
|
|
274008
|
+
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/use-keypress.js
|
|
274009
|
+
function useKeypress3(userHandler) {
|
|
274010
|
+
const signal = useRef3(userHandler);
|
|
274011
|
+
signal.current = userHandler;
|
|
274012
|
+
useEffect3((rl) => {
|
|
274013
|
+
let ignore = false;
|
|
274014
|
+
const handler = withUpdates3((_input, event) => {
|
|
274015
|
+
if (ignore)
|
|
274016
|
+
return;
|
|
274017
|
+
signal.current(event, rl);
|
|
274018
|
+
});
|
|
274019
|
+
rl.input.on("keypress", handler);
|
|
274020
|
+
return () => {
|
|
274021
|
+
ignore = true;
|
|
274022
|
+
rl.input.removeListener("keypress", handler);
|
|
274023
|
+
};
|
|
274024
|
+
}, []);
|
|
274025
|
+
}
|
|
274026
|
+
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/utils.js
|
|
274027
|
+
var import_cli_width3 = __toESM(require_cli_width(), 1);
|
|
274028
|
+
var import_wrap_ansi3 = __toESM(require_wrap_ansi(), 1);
|
|
274029
|
+
function breakLines3(content, width) {
|
|
274030
|
+
return content.split(`
|
|
274031
|
+
`).flatMap((line) => import_wrap_ansi3.default(line, width, { trim: false, hard: true }).split(`
|
|
274032
|
+
`).map((str) => str.trimEnd())).join(`
|
|
274033
|
+
`);
|
|
274034
|
+
}
|
|
274035
|
+
function readlineWidth3() {
|
|
274036
|
+
return import_cli_width3.default({ defaultWidth: 80, output: readline5().output });
|
|
274037
|
+
}
|
|
274038
|
+
|
|
274039
|
+
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
|
|
274040
|
+
var import_mute_stream3 = __toESM(require_lib13(), 1);
|
|
274041
|
+
init_mjs();
|
|
274042
|
+
import * as readline6 from "node:readline";
|
|
274043
|
+
import { AsyncResource as AsyncResource9 } from "node:async_hooks";
|
|
274044
|
+
|
|
274045
|
+
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/screen-manager.js
|
|
274046
|
+
var import_strip_ansi3 = __toESM(require_strip_ansi(), 1);
|
|
274047
|
+
var import_ansi_escapes4 = __toESM(require_ansi_escapes(), 1);
|
|
274048
|
+
var height3 = (content) => content.split(`
|
|
274049
|
+
`).length;
|
|
274050
|
+
var lastLine3 = (content) => content.split(`
|
|
274051
|
+
`).pop() ?? "";
|
|
274052
|
+
function cursorDown3(n6) {
|
|
274053
|
+
return n6 > 0 ? import_ansi_escapes4.default.cursorDown(n6) : "";
|
|
274054
|
+
}
|
|
274055
|
+
|
|
274056
|
+
class ScreenManager3 {
|
|
274057
|
+
rl;
|
|
274058
|
+
height = 0;
|
|
274059
|
+
extraLinesUnderPrompt = 0;
|
|
274060
|
+
cursorPos;
|
|
274061
|
+
constructor(rl) {
|
|
274062
|
+
this.rl = rl;
|
|
274063
|
+
this.rl = rl;
|
|
274064
|
+
this.cursorPos = rl.getCursorPos();
|
|
274065
|
+
}
|
|
274066
|
+
write(content) {
|
|
274067
|
+
this.rl.output.unmute();
|
|
274068
|
+
this.rl.output.write(content);
|
|
274069
|
+
this.rl.output.mute();
|
|
274070
|
+
}
|
|
274071
|
+
render(content, bottomContent = "") {
|
|
274072
|
+
const promptLine = lastLine3(content);
|
|
274073
|
+
const rawPromptLine = import_strip_ansi3.default(promptLine);
|
|
274074
|
+
let prompt = rawPromptLine;
|
|
274075
|
+
if (this.rl.line.length > 0) {
|
|
274076
|
+
prompt = prompt.slice(0, -this.rl.line.length);
|
|
274077
|
+
}
|
|
274078
|
+
this.rl.setPrompt(prompt);
|
|
274079
|
+
this.cursorPos = this.rl.getCursorPos();
|
|
274080
|
+
const width = readlineWidth3();
|
|
274081
|
+
content = breakLines3(content, width);
|
|
274082
|
+
bottomContent = breakLines3(bottomContent, width);
|
|
274083
|
+
if (rawPromptLine.length % width === 0) {
|
|
274084
|
+
content += `
|
|
274085
|
+
`;
|
|
274086
|
+
}
|
|
274087
|
+
let output = content + (bottomContent ? `
|
|
274088
|
+
` + bottomContent : "");
|
|
274089
|
+
const promptLineUpDiff = Math.floor(rawPromptLine.length / width) - this.cursorPos.rows;
|
|
274090
|
+
const bottomContentHeight = promptLineUpDiff + (bottomContent ? height3(bottomContent) : 0);
|
|
274091
|
+
if (bottomContentHeight > 0)
|
|
274092
|
+
output += import_ansi_escapes4.default.cursorUp(bottomContentHeight);
|
|
274093
|
+
output += import_ansi_escapes4.default.cursorTo(this.cursorPos.cols);
|
|
274094
|
+
this.write(cursorDown3(this.extraLinesUnderPrompt) + import_ansi_escapes4.default.eraseLines(this.height) + output);
|
|
274095
|
+
this.extraLinesUnderPrompt = bottomContentHeight;
|
|
274096
|
+
this.height = height3(output);
|
|
274097
|
+
}
|
|
274098
|
+
checkCursorPos() {
|
|
274099
|
+
const cursorPos = this.rl.getCursorPos();
|
|
274100
|
+
if (cursorPos.cols !== this.cursorPos.cols) {
|
|
274101
|
+
this.write(import_ansi_escapes4.default.cursorTo(cursorPos.cols));
|
|
274102
|
+
this.cursorPos = cursorPos;
|
|
274103
|
+
}
|
|
274104
|
+
}
|
|
274105
|
+
done({ clearContent }) {
|
|
274106
|
+
this.rl.setPrompt("");
|
|
274107
|
+
let output = cursorDown3(this.extraLinesUnderPrompt);
|
|
274108
|
+
output += clearContent ? import_ansi_escapes4.default.eraseLines(this.height) : `
|
|
274109
|
+
`;
|
|
274110
|
+
output += import_ansi_escapes4.default.cursorShow;
|
|
274111
|
+
this.write(output);
|
|
274112
|
+
this.rl.close();
|
|
274113
|
+
}
|
|
274114
|
+
}
|
|
274115
|
+
|
|
274116
|
+
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/promise-polyfill.js
|
|
274117
|
+
class PromisePolyfill3 extends Promise {
|
|
274118
|
+
static withResolver() {
|
|
274119
|
+
let resolve5;
|
|
274120
|
+
let reject;
|
|
274121
|
+
const promise = new Promise((res, rej) => {
|
|
274122
|
+
resolve5 = res;
|
|
274123
|
+
reject = rej;
|
|
274124
|
+
});
|
|
274125
|
+
return { promise, resolve: resolve5, reject };
|
|
274126
|
+
}
|
|
274127
|
+
}
|
|
274128
|
+
|
|
274129
|
+
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
|
|
274130
|
+
function getCallSites3() {
|
|
274131
|
+
const _prepareStackTrace = Error.prepareStackTrace;
|
|
274132
|
+
try {
|
|
274133
|
+
let result = [];
|
|
274134
|
+
Error.prepareStackTrace = (_5, callSites) => {
|
|
274135
|
+
const callSitesWithoutCurrent = callSites.slice(1);
|
|
274136
|
+
result = callSitesWithoutCurrent;
|
|
274137
|
+
return callSitesWithoutCurrent;
|
|
274138
|
+
};
|
|
274139
|
+
new Error().stack;
|
|
274140
|
+
return result;
|
|
274141
|
+
} finally {
|
|
274142
|
+
Error.prepareStackTrace = _prepareStackTrace;
|
|
274143
|
+
}
|
|
274144
|
+
}
|
|
274145
|
+
function createPrompt3(view) {
|
|
274146
|
+
const callSites = getCallSites3();
|
|
274147
|
+
const callerFilename = callSites[1]?.getFileName?.();
|
|
274148
|
+
const prompt = (config4, context = {}) => {
|
|
274149
|
+
const { input = process.stdin, signal } = context;
|
|
274150
|
+
const cleanups = new Set;
|
|
274151
|
+
const output = new import_mute_stream3.default;
|
|
274152
|
+
output.pipe(context.output ?? process.stdout);
|
|
274153
|
+
const rl = readline6.createInterface({
|
|
274154
|
+
terminal: true,
|
|
274155
|
+
input,
|
|
274156
|
+
output
|
|
274157
|
+
});
|
|
274158
|
+
const screen = new ScreenManager3(rl);
|
|
274159
|
+
const { promise, resolve: resolve5, reject } = PromisePolyfill3.withResolver();
|
|
274160
|
+
const cancel4 = () => reject(new CancelPromptError3);
|
|
274161
|
+
if (signal) {
|
|
274162
|
+
const abort = () => reject(new AbortPromptError3({ cause: signal.reason }));
|
|
274163
|
+
if (signal.aborted) {
|
|
274164
|
+
abort();
|
|
274165
|
+
return Object.assign(promise, { cancel: cancel4 });
|
|
274166
|
+
}
|
|
274167
|
+
signal.addEventListener("abort", abort);
|
|
274168
|
+
cleanups.add(() => signal.removeEventListener("abort", abort));
|
|
274169
|
+
}
|
|
274170
|
+
cleanups.add(onExit((code2, signal2) => {
|
|
274171
|
+
reject(new ExitPromptError3(`User force closed the prompt with ${code2} ${signal2}`));
|
|
274172
|
+
}));
|
|
274173
|
+
const checkCursorPos = () => screen.checkCursorPos();
|
|
274174
|
+
rl.input.on("keypress", checkCursorPos);
|
|
274175
|
+
cleanups.add(() => rl.input.removeListener("keypress", checkCursorPos));
|
|
274176
|
+
return withHooks3(rl, (cycle) => {
|
|
274177
|
+
const hooksCleanup = AsyncResource9.bind(() => effectScheduler3.clearAll());
|
|
274178
|
+
rl.on("close", hooksCleanup);
|
|
274179
|
+
cleanups.add(() => rl.removeListener("close", hooksCleanup));
|
|
274180
|
+
cycle(() => {
|
|
274181
|
+
try {
|
|
274182
|
+
const nextView = view(config4, (value4) => {
|
|
274183
|
+
setImmediate(() => resolve5(value4));
|
|
274184
|
+
});
|
|
274185
|
+
if (nextView === undefined) {
|
|
274186
|
+
throw new Error(`Prompt functions must return a string.
|
|
274187
|
+
at ${callerFilename}`);
|
|
274188
|
+
}
|
|
274189
|
+
const [content, bottomContent] = typeof nextView === "string" ? [nextView] : nextView;
|
|
274190
|
+
screen.render(content, bottomContent);
|
|
274191
|
+
effectScheduler3.run();
|
|
274192
|
+
} catch (error5) {
|
|
274193
|
+
reject(error5);
|
|
274194
|
+
}
|
|
274195
|
+
});
|
|
274196
|
+
return Object.assign(promise.then((answer) => {
|
|
274197
|
+
effectScheduler3.clearAll();
|
|
274198
|
+
return answer;
|
|
274199
|
+
}, (error5) => {
|
|
274200
|
+
effectScheduler3.clearAll();
|
|
274201
|
+
throw error5;
|
|
274202
|
+
}).finally(() => {
|
|
274203
|
+
cleanups.forEach((cleanup) => cleanup());
|
|
274204
|
+
screen.done({ clearContent: Boolean(context.clearPromptOnDone) });
|
|
274205
|
+
output.end();
|
|
274206
|
+
}).then(() => promise), { cancel: cancel4 });
|
|
274207
|
+
});
|
|
274208
|
+
};
|
|
274209
|
+
return prompt;
|
|
274210
|
+
}
|
|
273320
274211
|
// ../../node_modules/@inquirer/input/dist/esm/index.js
|
|
273321
274212
|
var inputTheme = {
|
|
273322
274213
|
validationFailureMode: "keep"
|
|
273323
274214
|
};
|
|
273324
|
-
var esm_default4 =
|
|
274215
|
+
var esm_default4 = createPrompt3((config4, done) => {
|
|
273325
274216
|
const { required, validate: validate4 = () => true } = config4;
|
|
273326
|
-
const theme =
|
|
273327
|
-
const [status, setStatus] =
|
|
273328
|
-
const [defaultValue = "", setDefaultValue] =
|
|
273329
|
-
const [errorMsg, setError] =
|
|
273330
|
-
const [value4, setValue] =
|
|
273331
|
-
const prefix =
|
|
273332
|
-
|
|
274217
|
+
const theme = makeTheme3(inputTheme, config4.theme);
|
|
274218
|
+
const [status, setStatus] = useState3("idle");
|
|
274219
|
+
const [defaultValue = "", setDefaultValue] = useState3(config4.default);
|
|
274220
|
+
const [errorMsg, setError] = useState3();
|
|
274221
|
+
const [value4, setValue] = useState3("");
|
|
274222
|
+
const prefix = usePrefix3({ status, theme });
|
|
274223
|
+
useKeypress3(async (key4, rl) => {
|
|
273333
274224
|
if (status !== "idle") {
|
|
273334
274225
|
return;
|
|
273335
274226
|
}
|
|
273336
|
-
if (
|
|
274227
|
+
if (isEnterKey3(key4)) {
|
|
273337
274228
|
const answer = value4 || defaultValue;
|
|
273338
274229
|
setStatus("loading");
|
|
273339
274230
|
const isValid2 = required && !answer ? "You must provide a value" : await validate4(answer);
|
|
@@ -273350,9 +274241,9 @@ var esm_default4 = createPrompt((config4, done) => {
|
|
|
273350
274241
|
setError(isValid2 || "You must provide a valid value");
|
|
273351
274242
|
setStatus("idle");
|
|
273352
274243
|
}
|
|
273353
|
-
} else if (
|
|
274244
|
+
} else if (isBackspaceKey2(key4) && !value4) {
|
|
273354
274245
|
setDefaultValue(undefined);
|
|
273355
|
-
} else if (
|
|
274246
|
+
} else if (key4.name === "tab" && !value4) {
|
|
273356
274247
|
setDefaultValue(undefined);
|
|
273357
274248
|
rl.clearLine(0);
|
|
273358
274249
|
rl.write(defaultValue);
|
|
@@ -273383,20 +274274,475 @@ var esm_default4 = createPrompt((config4, done) => {
|
|
|
273383
274274
|
];
|
|
273384
274275
|
});
|
|
273385
274276
|
|
|
274277
|
+
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/key.js
|
|
274278
|
+
var isEnterKey4 = (key4) => key4.name === "enter" || key4.name === "return";
|
|
274279
|
+
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/errors.js
|
|
274280
|
+
class AbortPromptError4 extends Error {
|
|
274281
|
+
name = "AbortPromptError";
|
|
274282
|
+
message = "Prompt was aborted";
|
|
274283
|
+
constructor(options) {
|
|
274284
|
+
super();
|
|
274285
|
+
this.cause = options?.cause;
|
|
274286
|
+
}
|
|
274287
|
+
}
|
|
274288
|
+
|
|
274289
|
+
class CancelPromptError4 extends Error {
|
|
274290
|
+
name = "CancelPromptError";
|
|
274291
|
+
message = "Prompt was canceled";
|
|
274292
|
+
}
|
|
274293
|
+
|
|
274294
|
+
class ExitPromptError4 extends Error {
|
|
274295
|
+
name = "ExitPromptError";
|
|
274296
|
+
}
|
|
274297
|
+
|
|
274298
|
+
class HookError4 extends Error {
|
|
274299
|
+
name = "HookError";
|
|
274300
|
+
}
|
|
274301
|
+
|
|
274302
|
+
class ValidationError4 extends Error {
|
|
274303
|
+
name = "ValidationError";
|
|
274304
|
+
}
|
|
274305
|
+
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/use-prefix.js
|
|
274306
|
+
import { AsyncResource as AsyncResource11 } from "node:async_hooks";
|
|
274307
|
+
|
|
274308
|
+
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/hook-engine.js
|
|
274309
|
+
import { AsyncLocalStorage as AsyncLocalStorage4, AsyncResource as AsyncResource10 } from "node:async_hooks";
|
|
274310
|
+
var hookStorage4 = new AsyncLocalStorage4;
|
|
274311
|
+
function createStore4(rl) {
|
|
274312
|
+
const store = {
|
|
274313
|
+
rl,
|
|
274314
|
+
hooks: [],
|
|
274315
|
+
hooksCleanup: [],
|
|
274316
|
+
hooksEffect: [],
|
|
274317
|
+
index: 0,
|
|
274318
|
+
handleChange() {
|
|
274319
|
+
}
|
|
274320
|
+
};
|
|
274321
|
+
return store;
|
|
274322
|
+
}
|
|
274323
|
+
function withHooks4(rl, cb) {
|
|
274324
|
+
const store = createStore4(rl);
|
|
274325
|
+
return hookStorage4.run(store, () => {
|
|
274326
|
+
function cycle(render) {
|
|
274327
|
+
store.handleChange = () => {
|
|
274328
|
+
store.index = 0;
|
|
274329
|
+
render();
|
|
274330
|
+
};
|
|
274331
|
+
store.handleChange();
|
|
274332
|
+
}
|
|
274333
|
+
return cb(cycle);
|
|
274334
|
+
});
|
|
274335
|
+
}
|
|
274336
|
+
function getStore4() {
|
|
274337
|
+
const store = hookStorage4.getStore();
|
|
274338
|
+
if (!store) {
|
|
274339
|
+
throw new HookError4("[Inquirer] Hook functions can only be called from within a prompt");
|
|
274340
|
+
}
|
|
274341
|
+
return store;
|
|
274342
|
+
}
|
|
274343
|
+
function readline7() {
|
|
274344
|
+
return getStore4().rl;
|
|
274345
|
+
}
|
|
274346
|
+
function withUpdates4(fn) {
|
|
274347
|
+
const wrapped = (...args) => {
|
|
274348
|
+
const store = getStore4();
|
|
274349
|
+
let shouldUpdate = false;
|
|
274350
|
+
const oldHandleChange = store.handleChange;
|
|
274351
|
+
store.handleChange = () => {
|
|
274352
|
+
shouldUpdate = true;
|
|
274353
|
+
};
|
|
274354
|
+
const returnValue = fn(...args);
|
|
274355
|
+
if (shouldUpdate) {
|
|
274356
|
+
oldHandleChange();
|
|
274357
|
+
}
|
|
274358
|
+
store.handleChange = oldHandleChange;
|
|
274359
|
+
return returnValue;
|
|
274360
|
+
};
|
|
274361
|
+
return AsyncResource10.bind(wrapped);
|
|
274362
|
+
}
|
|
274363
|
+
function withPointer4(cb) {
|
|
274364
|
+
const store = getStore4();
|
|
274365
|
+
const { index } = store;
|
|
274366
|
+
const pointer = {
|
|
274367
|
+
get() {
|
|
274368
|
+
return store.hooks[index];
|
|
274369
|
+
},
|
|
274370
|
+
set(value4) {
|
|
274371
|
+
store.hooks[index] = value4;
|
|
274372
|
+
},
|
|
274373
|
+
initialized: index in store.hooks
|
|
274374
|
+
};
|
|
274375
|
+
const returnValue = cb(pointer);
|
|
274376
|
+
store.index++;
|
|
274377
|
+
return returnValue;
|
|
274378
|
+
}
|
|
274379
|
+
function handleChange4() {
|
|
274380
|
+
getStore4().handleChange();
|
|
274381
|
+
}
|
|
274382
|
+
var effectScheduler4 = {
|
|
274383
|
+
queue(cb) {
|
|
274384
|
+
const store = getStore4();
|
|
274385
|
+
const { index } = store;
|
|
274386
|
+
store.hooksEffect.push(() => {
|
|
274387
|
+
store.hooksCleanup[index]?.();
|
|
274388
|
+
const cleanFn = cb(readline7());
|
|
274389
|
+
if (cleanFn != null && typeof cleanFn !== "function") {
|
|
274390
|
+
throw new ValidationError4("useEffect return value must be a cleanup function or nothing.");
|
|
274391
|
+
}
|
|
274392
|
+
store.hooksCleanup[index] = cleanFn;
|
|
274393
|
+
});
|
|
274394
|
+
},
|
|
274395
|
+
run() {
|
|
274396
|
+
const store = getStore4();
|
|
274397
|
+
withUpdates4(() => {
|
|
274398
|
+
store.hooksEffect.forEach((effect) => {
|
|
274399
|
+
effect();
|
|
274400
|
+
});
|
|
274401
|
+
store.hooksEffect.length = 0;
|
|
274402
|
+
})();
|
|
274403
|
+
},
|
|
274404
|
+
clearAll() {
|
|
274405
|
+
const store = getStore4();
|
|
274406
|
+
store.hooksCleanup.forEach((cleanFn) => {
|
|
274407
|
+
cleanFn?.();
|
|
274408
|
+
});
|
|
274409
|
+
store.hooksEffect.length = 0;
|
|
274410
|
+
store.hooksCleanup.length = 0;
|
|
274411
|
+
}
|
|
274412
|
+
};
|
|
274413
|
+
|
|
274414
|
+
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/use-state.js
|
|
274415
|
+
function useState4(defaultValue) {
|
|
274416
|
+
return withPointer4((pointer) => {
|
|
274417
|
+
const setFn = (newValue) => {
|
|
274418
|
+
if (pointer.get() !== newValue) {
|
|
274419
|
+
pointer.set(newValue);
|
|
274420
|
+
handleChange4();
|
|
274421
|
+
}
|
|
274422
|
+
};
|
|
274423
|
+
if (pointer.initialized) {
|
|
274424
|
+
return [pointer.get(), setFn];
|
|
274425
|
+
}
|
|
274426
|
+
const value4 = typeof defaultValue === "function" ? defaultValue() : defaultValue;
|
|
274427
|
+
pointer.set(value4);
|
|
274428
|
+
return [value4, setFn];
|
|
274429
|
+
});
|
|
274430
|
+
}
|
|
274431
|
+
|
|
274432
|
+
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/use-effect.js
|
|
274433
|
+
function useEffect4(cb, depArray) {
|
|
274434
|
+
withPointer4((pointer) => {
|
|
274435
|
+
const oldDeps = pointer.get();
|
|
274436
|
+
const hasChanged = !Array.isArray(oldDeps) || depArray.some((dep, i6) => !Object.is(dep, oldDeps[i6]));
|
|
274437
|
+
if (hasChanged) {
|
|
274438
|
+
effectScheduler4.queue(cb);
|
|
274439
|
+
}
|
|
274440
|
+
pointer.set(depArray);
|
|
274441
|
+
});
|
|
274442
|
+
}
|
|
274443
|
+
|
|
274444
|
+
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/theme.js
|
|
274445
|
+
var import_yoctocolors_cjs6 = __toESM(require_yoctocolors_cjs(), 1);
|
|
274446
|
+
var defaultTheme4 = {
|
|
274447
|
+
prefix: {
|
|
274448
|
+
idle: import_yoctocolors_cjs6.default.blue("?"),
|
|
274449
|
+
done: import_yoctocolors_cjs6.default.green(esm_default.tick)
|
|
274450
|
+
},
|
|
274451
|
+
spinner: {
|
|
274452
|
+
interval: 80,
|
|
274453
|
+
frames: ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"].map((frame) => import_yoctocolors_cjs6.default.yellow(frame))
|
|
274454
|
+
},
|
|
274455
|
+
style: {
|
|
274456
|
+
answer: import_yoctocolors_cjs6.default.cyan,
|
|
274457
|
+
message: import_yoctocolors_cjs6.default.bold,
|
|
274458
|
+
error: (text2) => import_yoctocolors_cjs6.default.red(`> ${text2}`),
|
|
274459
|
+
defaultAnswer: (text2) => import_yoctocolors_cjs6.default.dim(`(${text2})`),
|
|
274460
|
+
help: import_yoctocolors_cjs6.default.dim,
|
|
274461
|
+
highlight: import_yoctocolors_cjs6.default.cyan,
|
|
274462
|
+
key: (text2) => import_yoctocolors_cjs6.default.cyan(import_yoctocolors_cjs6.default.bold(`<${text2}>`))
|
|
274463
|
+
}
|
|
274464
|
+
};
|
|
274465
|
+
|
|
274466
|
+
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/make-theme.js
|
|
274467
|
+
function isPlainObject5(value4) {
|
|
274468
|
+
if (typeof value4 !== "object" || value4 === null)
|
|
274469
|
+
return false;
|
|
274470
|
+
let proto = value4;
|
|
274471
|
+
while (Object.getPrototypeOf(proto) !== null) {
|
|
274472
|
+
proto = Object.getPrototypeOf(proto);
|
|
274473
|
+
}
|
|
274474
|
+
return Object.getPrototypeOf(value4) === proto;
|
|
274475
|
+
}
|
|
274476
|
+
function deepMerge5(...objects) {
|
|
274477
|
+
const output = {};
|
|
274478
|
+
for (const obj of objects) {
|
|
274479
|
+
for (const [key4, value4] of Object.entries(obj)) {
|
|
274480
|
+
const prevValue = output[key4];
|
|
274481
|
+
output[key4] = isPlainObject5(prevValue) && isPlainObject5(value4) ? deepMerge5(prevValue, value4) : value4;
|
|
274482
|
+
}
|
|
274483
|
+
}
|
|
274484
|
+
return output;
|
|
274485
|
+
}
|
|
274486
|
+
function makeTheme4(...themes) {
|
|
274487
|
+
const themesToMerge = [
|
|
274488
|
+
defaultTheme4,
|
|
274489
|
+
...themes.filter((theme) => theme != null)
|
|
274490
|
+
];
|
|
274491
|
+
return deepMerge5(...themesToMerge);
|
|
274492
|
+
}
|
|
274493
|
+
|
|
274494
|
+
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/use-prefix.js
|
|
274495
|
+
function usePrefix4({ status = "idle", theme }) {
|
|
274496
|
+
const [showLoader, setShowLoader] = useState4(false);
|
|
274497
|
+
const [tick, setTick] = useState4(0);
|
|
274498
|
+
const { prefix, spinner: spinner2 } = makeTheme4(theme);
|
|
274499
|
+
useEffect4(() => {
|
|
274500
|
+
if (status === "loading") {
|
|
274501
|
+
let tickInterval;
|
|
274502
|
+
let inc = -1;
|
|
274503
|
+
const delayTimeout = setTimeout(AsyncResource11.bind(() => {
|
|
274504
|
+
setShowLoader(true);
|
|
274505
|
+
tickInterval = setInterval(AsyncResource11.bind(() => {
|
|
274506
|
+
inc = inc + 1;
|
|
274507
|
+
setTick(inc % spinner2.frames.length);
|
|
274508
|
+
}), spinner2.interval);
|
|
274509
|
+
}), 300);
|
|
274510
|
+
return () => {
|
|
274511
|
+
clearTimeout(delayTimeout);
|
|
274512
|
+
clearInterval(tickInterval);
|
|
274513
|
+
};
|
|
274514
|
+
} else {
|
|
274515
|
+
setShowLoader(false);
|
|
274516
|
+
}
|
|
274517
|
+
}, [status]);
|
|
274518
|
+
if (showLoader) {
|
|
274519
|
+
return spinner2.frames[tick];
|
|
274520
|
+
}
|
|
274521
|
+
const iconName = status === "loading" ? "idle" : status;
|
|
274522
|
+
return typeof prefix === "string" ? prefix : prefix[iconName] ?? prefix["idle"];
|
|
274523
|
+
}
|
|
274524
|
+
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/use-ref.js
|
|
274525
|
+
function useRef4(val) {
|
|
274526
|
+
return useState4({ current: val })[0];
|
|
274527
|
+
}
|
|
274528
|
+
|
|
274529
|
+
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/use-keypress.js
|
|
274530
|
+
function useKeypress4(userHandler) {
|
|
274531
|
+
const signal = useRef4(userHandler);
|
|
274532
|
+
signal.current = userHandler;
|
|
274533
|
+
useEffect4((rl) => {
|
|
274534
|
+
let ignore = false;
|
|
274535
|
+
const handler = withUpdates4((_input, event) => {
|
|
274536
|
+
if (ignore)
|
|
274537
|
+
return;
|
|
274538
|
+
signal.current(event, rl);
|
|
274539
|
+
});
|
|
274540
|
+
rl.input.on("keypress", handler);
|
|
274541
|
+
return () => {
|
|
274542
|
+
ignore = true;
|
|
274543
|
+
rl.input.removeListener("keypress", handler);
|
|
274544
|
+
};
|
|
274545
|
+
}, []);
|
|
274546
|
+
}
|
|
274547
|
+
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/utils.js
|
|
274548
|
+
var import_cli_width4 = __toESM(require_cli_width(), 1);
|
|
274549
|
+
var import_wrap_ansi4 = __toESM(require_wrap_ansi(), 1);
|
|
274550
|
+
function breakLines4(content, width) {
|
|
274551
|
+
return content.split(`
|
|
274552
|
+
`).flatMap((line) => import_wrap_ansi4.default(line, width, { trim: false, hard: true }).split(`
|
|
274553
|
+
`).map((str) => str.trimEnd())).join(`
|
|
274554
|
+
`);
|
|
274555
|
+
}
|
|
274556
|
+
function readlineWidth4() {
|
|
274557
|
+
return import_cli_width4.default({ defaultWidth: 80, output: readline7().output });
|
|
274558
|
+
}
|
|
274559
|
+
|
|
274560
|
+
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
|
|
274561
|
+
var import_mute_stream4 = __toESM(require_lib13(), 1);
|
|
274562
|
+
init_mjs();
|
|
274563
|
+
import * as readline8 from "node:readline";
|
|
274564
|
+
import { AsyncResource as AsyncResource12 } from "node:async_hooks";
|
|
274565
|
+
|
|
274566
|
+
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/screen-manager.js
|
|
274567
|
+
var import_strip_ansi4 = __toESM(require_strip_ansi(), 1);
|
|
274568
|
+
var import_ansi_escapes5 = __toESM(require_ansi_escapes(), 1);
|
|
274569
|
+
var height4 = (content) => content.split(`
|
|
274570
|
+
`).length;
|
|
274571
|
+
var lastLine4 = (content) => content.split(`
|
|
274572
|
+
`).pop() ?? "";
|
|
274573
|
+
function cursorDown4(n6) {
|
|
274574
|
+
return n6 > 0 ? import_ansi_escapes5.default.cursorDown(n6) : "";
|
|
274575
|
+
}
|
|
274576
|
+
|
|
274577
|
+
class ScreenManager4 {
|
|
274578
|
+
rl;
|
|
274579
|
+
height = 0;
|
|
274580
|
+
extraLinesUnderPrompt = 0;
|
|
274581
|
+
cursorPos;
|
|
274582
|
+
constructor(rl) {
|
|
274583
|
+
this.rl = rl;
|
|
274584
|
+
this.rl = rl;
|
|
274585
|
+
this.cursorPos = rl.getCursorPos();
|
|
274586
|
+
}
|
|
274587
|
+
write(content) {
|
|
274588
|
+
this.rl.output.unmute();
|
|
274589
|
+
this.rl.output.write(content);
|
|
274590
|
+
this.rl.output.mute();
|
|
274591
|
+
}
|
|
274592
|
+
render(content, bottomContent = "") {
|
|
274593
|
+
const promptLine = lastLine4(content);
|
|
274594
|
+
const rawPromptLine = import_strip_ansi4.default(promptLine);
|
|
274595
|
+
let prompt = rawPromptLine;
|
|
274596
|
+
if (this.rl.line.length > 0) {
|
|
274597
|
+
prompt = prompt.slice(0, -this.rl.line.length);
|
|
274598
|
+
}
|
|
274599
|
+
this.rl.setPrompt(prompt);
|
|
274600
|
+
this.cursorPos = this.rl.getCursorPos();
|
|
274601
|
+
const width = readlineWidth4();
|
|
274602
|
+
content = breakLines4(content, width);
|
|
274603
|
+
bottomContent = breakLines4(bottomContent, width);
|
|
274604
|
+
if (rawPromptLine.length % width === 0) {
|
|
274605
|
+
content += `
|
|
274606
|
+
`;
|
|
274607
|
+
}
|
|
274608
|
+
let output = content + (bottomContent ? `
|
|
274609
|
+
` + bottomContent : "");
|
|
274610
|
+
const promptLineUpDiff = Math.floor(rawPromptLine.length / width) - this.cursorPos.rows;
|
|
274611
|
+
const bottomContentHeight = promptLineUpDiff + (bottomContent ? height4(bottomContent) : 0);
|
|
274612
|
+
if (bottomContentHeight > 0)
|
|
274613
|
+
output += import_ansi_escapes5.default.cursorUp(bottomContentHeight);
|
|
274614
|
+
output += import_ansi_escapes5.default.cursorTo(this.cursorPos.cols);
|
|
274615
|
+
this.write(cursorDown4(this.extraLinesUnderPrompt) + import_ansi_escapes5.default.eraseLines(this.height) + output);
|
|
274616
|
+
this.extraLinesUnderPrompt = bottomContentHeight;
|
|
274617
|
+
this.height = height4(output);
|
|
274618
|
+
}
|
|
274619
|
+
checkCursorPos() {
|
|
274620
|
+
const cursorPos = this.rl.getCursorPos();
|
|
274621
|
+
if (cursorPos.cols !== this.cursorPos.cols) {
|
|
274622
|
+
this.write(import_ansi_escapes5.default.cursorTo(cursorPos.cols));
|
|
274623
|
+
this.cursorPos = cursorPos;
|
|
274624
|
+
}
|
|
274625
|
+
}
|
|
274626
|
+
done({ clearContent }) {
|
|
274627
|
+
this.rl.setPrompt("");
|
|
274628
|
+
let output = cursorDown4(this.extraLinesUnderPrompt);
|
|
274629
|
+
output += clearContent ? import_ansi_escapes5.default.eraseLines(this.height) : `
|
|
274630
|
+
`;
|
|
274631
|
+
output += import_ansi_escapes5.default.cursorShow;
|
|
274632
|
+
this.write(output);
|
|
274633
|
+
this.rl.close();
|
|
274634
|
+
}
|
|
274635
|
+
}
|
|
274636
|
+
|
|
274637
|
+
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/promise-polyfill.js
|
|
274638
|
+
class PromisePolyfill4 extends Promise {
|
|
274639
|
+
static withResolver() {
|
|
274640
|
+
let resolve5;
|
|
274641
|
+
let reject;
|
|
274642
|
+
const promise = new Promise((res, rej) => {
|
|
274643
|
+
resolve5 = res;
|
|
274644
|
+
reject = rej;
|
|
274645
|
+
});
|
|
274646
|
+
return { promise, resolve: resolve5, reject };
|
|
274647
|
+
}
|
|
274648
|
+
}
|
|
274649
|
+
|
|
274650
|
+
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
|
|
274651
|
+
function getCallSites4() {
|
|
274652
|
+
const _prepareStackTrace = Error.prepareStackTrace;
|
|
274653
|
+
try {
|
|
274654
|
+
let result = [];
|
|
274655
|
+
Error.prepareStackTrace = (_5, callSites) => {
|
|
274656
|
+
const callSitesWithoutCurrent = callSites.slice(1);
|
|
274657
|
+
result = callSitesWithoutCurrent;
|
|
274658
|
+
return callSitesWithoutCurrent;
|
|
274659
|
+
};
|
|
274660
|
+
new Error().stack;
|
|
274661
|
+
return result;
|
|
274662
|
+
} finally {
|
|
274663
|
+
Error.prepareStackTrace = _prepareStackTrace;
|
|
274664
|
+
}
|
|
274665
|
+
}
|
|
274666
|
+
function createPrompt4(view) {
|
|
274667
|
+
const callSites = getCallSites4();
|
|
274668
|
+
const callerFilename = callSites[1]?.getFileName?.();
|
|
274669
|
+
const prompt = (config4, context = {}) => {
|
|
274670
|
+
const { input = process.stdin, signal } = context;
|
|
274671
|
+
const cleanups = new Set;
|
|
274672
|
+
const output = new import_mute_stream4.default;
|
|
274673
|
+
output.pipe(context.output ?? process.stdout);
|
|
274674
|
+
const rl = readline8.createInterface({
|
|
274675
|
+
terminal: true,
|
|
274676
|
+
input,
|
|
274677
|
+
output
|
|
274678
|
+
});
|
|
274679
|
+
const screen = new ScreenManager4(rl);
|
|
274680
|
+
const { promise, resolve: resolve5, reject } = PromisePolyfill4.withResolver();
|
|
274681
|
+
const cancel4 = () => reject(new CancelPromptError4);
|
|
274682
|
+
if (signal) {
|
|
274683
|
+
const abort = () => reject(new AbortPromptError4({ cause: signal.reason }));
|
|
274684
|
+
if (signal.aborted) {
|
|
274685
|
+
abort();
|
|
274686
|
+
return Object.assign(promise, { cancel: cancel4 });
|
|
274687
|
+
}
|
|
274688
|
+
signal.addEventListener("abort", abort);
|
|
274689
|
+
cleanups.add(() => signal.removeEventListener("abort", abort));
|
|
274690
|
+
}
|
|
274691
|
+
cleanups.add(onExit((code2, signal2) => {
|
|
274692
|
+
reject(new ExitPromptError4(`User force closed the prompt with ${code2} ${signal2}`));
|
|
274693
|
+
}));
|
|
274694
|
+
const checkCursorPos = () => screen.checkCursorPos();
|
|
274695
|
+
rl.input.on("keypress", checkCursorPos);
|
|
274696
|
+
cleanups.add(() => rl.input.removeListener("keypress", checkCursorPos));
|
|
274697
|
+
return withHooks4(rl, (cycle) => {
|
|
274698
|
+
const hooksCleanup = AsyncResource12.bind(() => effectScheduler4.clearAll());
|
|
274699
|
+
rl.on("close", hooksCleanup);
|
|
274700
|
+
cleanups.add(() => rl.removeListener("close", hooksCleanup));
|
|
274701
|
+
cycle(() => {
|
|
274702
|
+
try {
|
|
274703
|
+
const nextView = view(config4, (value4) => {
|
|
274704
|
+
setImmediate(() => resolve5(value4));
|
|
274705
|
+
});
|
|
274706
|
+
if (nextView === undefined) {
|
|
274707
|
+
throw new Error(`Prompt functions must return a string.
|
|
274708
|
+
at ${callerFilename}`);
|
|
274709
|
+
}
|
|
274710
|
+
const [content, bottomContent] = typeof nextView === "string" ? [nextView] : nextView;
|
|
274711
|
+
screen.render(content, bottomContent);
|
|
274712
|
+
effectScheduler4.run();
|
|
274713
|
+
} catch (error5) {
|
|
274714
|
+
reject(error5);
|
|
274715
|
+
}
|
|
274716
|
+
});
|
|
274717
|
+
return Object.assign(promise.then((answer) => {
|
|
274718
|
+
effectScheduler4.clearAll();
|
|
274719
|
+
return answer;
|
|
274720
|
+
}, (error5) => {
|
|
274721
|
+
effectScheduler4.clearAll();
|
|
274722
|
+
throw error5;
|
|
274723
|
+
}).finally(() => {
|
|
274724
|
+
cleanups.forEach((cleanup) => cleanup());
|
|
274725
|
+
screen.done({ clearContent: Boolean(context.clearPromptOnDone) });
|
|
274726
|
+
output.end();
|
|
274727
|
+
}).then(() => promise), { cancel: cancel4 });
|
|
274728
|
+
});
|
|
274729
|
+
};
|
|
274730
|
+
return prompt;
|
|
274731
|
+
}
|
|
273386
274732
|
// ../../node_modules/@inquirer/password/dist/esm/index.js
|
|
273387
|
-
var
|
|
273388
|
-
var esm_default5 =
|
|
274733
|
+
var import_ansi_escapes6 = __toESM(require_ansi_escapes(), 1);
|
|
274734
|
+
var esm_default5 = createPrompt4((config4, done) => {
|
|
273389
274735
|
const { validate: validate4 = () => true } = config4;
|
|
273390
|
-
const theme =
|
|
273391
|
-
const [status, setStatus] =
|
|
273392
|
-
const [errorMsg, setError] =
|
|
273393
|
-
const [value4, setValue] =
|
|
273394
|
-
const prefix =
|
|
273395
|
-
|
|
274736
|
+
const theme = makeTheme4(config4.theme);
|
|
274737
|
+
const [status, setStatus] = useState4("idle");
|
|
274738
|
+
const [errorMsg, setError] = useState4();
|
|
274739
|
+
const [value4, setValue] = useState4("");
|
|
274740
|
+
const prefix = usePrefix4({ status, theme });
|
|
274741
|
+
useKeypress4(async (key5, rl) => {
|
|
273396
274742
|
if (status !== "idle") {
|
|
273397
274743
|
return;
|
|
273398
274744
|
}
|
|
273399
|
-
if (
|
|
274745
|
+
if (isEnterKey4(key5)) {
|
|
273400
274746
|
const answer = value4;
|
|
273401
274747
|
setStatus("loading");
|
|
273402
274748
|
const isValid2 = await validate4(answer);
|
|
@@ -273421,7 +274767,7 @@ var esm_default5 = createPrompt((config4, done) => {
|
|
|
273421
274767
|
const maskChar = typeof config4.mask === "string" ? config4.mask : "*";
|
|
273422
274768
|
formattedValue = maskChar.repeat(value4.length);
|
|
273423
274769
|
} else if (status !== "done") {
|
|
273424
|
-
helpTip = `${theme.style.help("[input is masked]")}${
|
|
274770
|
+
helpTip = `${theme.style.help("[input is masked]")}${import_ansi_escapes6.default.cursorHide}`;
|
|
273425
274771
|
}
|
|
273426
274772
|
if (status === "done") {
|
|
273427
274773
|
formattedValue = theme.style.answer(formattedValue);
|
|
@@ -274025,7 +275371,7 @@ function connectCommand() {
|
|
|
274025
275371
|
|
|
274026
275372
|
// src/commands/create.ts
|
|
274027
275373
|
import { mkdir as mkdir6 } from "node:fs/promises";
|
|
274028
|
-
import { join as
|
|
275374
|
+
import { join as join7 } from "node:path";
|
|
274029
275375
|
|
|
274030
275376
|
// src/commands/create/name.prompt.ts
|
|
274031
275377
|
async function namePrompt(env2, argument) {
|
|
@@ -274076,24 +275422,11 @@ async function templatePrompt(templates, argument) {
|
|
|
274076
275422
|
// ../utils/dist/package-manager.mjs
|
|
274077
275423
|
import { readdir as readdir3, rm as rm2 } from "node:fs/promises";
|
|
274078
275424
|
import { resolve as resolve5 } from "node:path";
|
|
274079
|
-
import { dirname as dirname7
|
|
275425
|
+
import { dirname as dirname7 } from "node:path";
|
|
274080
275426
|
import { stat as stat8 } from "node:fs/promises";
|
|
274081
275427
|
var import_package_json3 = __toESM(require_lib12(), 1);
|
|
274082
275428
|
var import_package_json4 = __toESM(require_lib12(), 1);
|
|
274083
|
-
async function exists4(path5) {
|
|
274084
|
-
try {
|
|
274085
|
-
await stat8(path5);
|
|
274086
|
-
return true;
|
|
274087
|
-
} catch {
|
|
274088
|
-
return false;
|
|
274089
|
-
}
|
|
274090
|
-
}
|
|
274091
275429
|
async function projectRoot4(fallbackToCwd = false) {
|
|
274092
|
-
const lockFiles = ["package-lock.json", "yarn.lock", "pnpm-lock.yaml", "bun.lockb", "bun.lock"];
|
|
274093
|
-
const lockFilesInCwd = await Promise.race(lockFiles.map((lockFile) => exists4(join7(process.cwd(), lockFile))));
|
|
274094
|
-
if (lockFilesInCwd) {
|
|
274095
|
-
return process.cwd();
|
|
274096
|
-
}
|
|
274097
275430
|
const packageJsonPath = await findUp("package.json");
|
|
274098
275431
|
if (!packageJsonPath) {
|
|
274099
275432
|
if (fallbackToCwd) {
|
|
@@ -274103,6 +275436,14 @@ async function projectRoot4(fallbackToCwd = false) {
|
|
|
274103
275436
|
}
|
|
274104
275437
|
return dirname7(packageJsonPath);
|
|
274105
275438
|
}
|
|
275439
|
+
async function exists4(path5) {
|
|
275440
|
+
try {
|
|
275441
|
+
await stat8(path5);
|
|
275442
|
+
return true;
|
|
275443
|
+
} catch {
|
|
275444
|
+
return false;
|
|
275445
|
+
}
|
|
275446
|
+
}
|
|
274106
275447
|
var templates = [
|
|
274107
275448
|
{ value: "@settlemint/starterkit-asset-tokenization", label: "Asset Tokenization" }
|
|
274108
275449
|
];
|
|
@@ -274178,7 +275519,7 @@ var normalize3 = function(path5) {
|
|
|
274178
275519
|
}
|
|
274179
275520
|
return isPathAbsolute && !isAbsolute(path5) ? `/${path5}` : path5;
|
|
274180
275521
|
};
|
|
274181
|
-
var
|
|
275522
|
+
var join6 = function(...arguments_4) {
|
|
274182
275523
|
if (arguments_4.length === 0) {
|
|
274183
275524
|
return ".";
|
|
274184
275525
|
}
|
|
@@ -274297,7 +275638,7 @@ var basename2 = function(p5, extension) {
|
|
|
274297
275638
|
return extension && lastSegment.endsWith(extension) ? lastSegment.slice(0, -extension.length) : lastSegment;
|
|
274298
275639
|
};
|
|
274299
275640
|
// ../../node_modules/defu/dist/defu.mjs
|
|
274300
|
-
function
|
|
275641
|
+
function isPlainObject6(value4) {
|
|
274301
275642
|
if (value4 === null || typeof value4 !== "object") {
|
|
274302
275643
|
return false;
|
|
274303
275644
|
}
|
|
@@ -274314,27 +275655,27 @@ function isPlainObject3(value4) {
|
|
|
274314
275655
|
return true;
|
|
274315
275656
|
}
|
|
274316
275657
|
function _defu(baseObject, defaults2, namespace = ".", merger) {
|
|
274317
|
-
if (!
|
|
275658
|
+
if (!isPlainObject6(defaults2)) {
|
|
274318
275659
|
return _defu(baseObject, {}, namespace, merger);
|
|
274319
275660
|
}
|
|
274320
275661
|
const object = Object.assign({}, defaults2);
|
|
274321
|
-
for (const
|
|
274322
|
-
if (
|
|
275662
|
+
for (const key5 in baseObject) {
|
|
275663
|
+
if (key5 === "__proto__" || key5 === "constructor") {
|
|
274323
275664
|
continue;
|
|
274324
275665
|
}
|
|
274325
|
-
const value4 = baseObject[
|
|
275666
|
+
const value4 = baseObject[key5];
|
|
274326
275667
|
if (value4 === null || value4 === undefined) {
|
|
274327
275668
|
continue;
|
|
274328
275669
|
}
|
|
274329
|
-
if (merger && merger(object,
|
|
275670
|
+
if (merger && merger(object, key5, value4, namespace)) {
|
|
274330
275671
|
continue;
|
|
274331
275672
|
}
|
|
274332
|
-
if (Array.isArray(value4) && Array.isArray(object[
|
|
274333
|
-
object[
|
|
274334
|
-
} else if (
|
|
274335
|
-
object[
|
|
275673
|
+
if (Array.isArray(value4) && Array.isArray(object[key5])) {
|
|
275674
|
+
object[key5] = [...value4, ...object[key5]];
|
|
275675
|
+
} else if (isPlainObject6(value4) && isPlainObject6(object[key5])) {
|
|
275676
|
+
object[key5] = _defu(value4, object[key5], (namespace ? `${namespace}.` : "") + key5.toString(), merger);
|
|
274336
275677
|
} else {
|
|
274337
|
-
object[
|
|
275678
|
+
object[key5] = value4;
|
|
274338
275679
|
}
|
|
274339
275680
|
}
|
|
274340
275681
|
return object;
|
|
@@ -274343,15 +275684,15 @@ function createDefu(merger) {
|
|
|
274343
275684
|
return (...arguments_4) => arguments_4.reduce((p5, c3) => _defu(p5, c3, "", merger), {});
|
|
274344
275685
|
}
|
|
274345
275686
|
var defu = createDefu();
|
|
274346
|
-
var defuFn = createDefu((object,
|
|
274347
|
-
if (object[
|
|
274348
|
-
object[
|
|
275687
|
+
var defuFn = createDefu((object, key5, currentValue) => {
|
|
275688
|
+
if (object[key5] !== undefined && typeof currentValue === "function") {
|
|
275689
|
+
object[key5] = currentValue(object[key5]);
|
|
274349
275690
|
return true;
|
|
274350
275691
|
}
|
|
274351
275692
|
});
|
|
274352
|
-
var defuArrayFn = createDefu((object,
|
|
274353
|
-
if (Array.isArray(object[
|
|
274354
|
-
object[
|
|
275693
|
+
var defuArrayFn = createDefu((object, key5, currentValue) => {
|
|
275694
|
+
if (Array.isArray(object[key5]) && typeof currentValue === "function") {
|
|
275695
|
+
object[key5] = currentValue(object[key5]);
|
|
274355
275696
|
return true;
|
|
274356
275697
|
}
|
|
274357
275698
|
});
|
|
@@ -274450,7 +275791,7 @@ var packageManagers = [
|
|
|
274450
275791
|
async function detectPackageManager2(cwd2, options = {}) {
|
|
274451
275792
|
const detected = await findup(resolve6(cwd2 || "."), async (path8) => {
|
|
274452
275793
|
if (!options.ignorePackageJSON) {
|
|
274453
|
-
const packageJSONPath =
|
|
275794
|
+
const packageJSONPath = join6(path8, "package.json");
|
|
274454
275795
|
if (existsSync2(packageJSONPath)) {
|
|
274455
275796
|
const packageJSON = JSON.parse(await readFile5(packageJSONPath, "utf8"));
|
|
274456
275797
|
if (packageJSON?.packageManager) {
|
|
@@ -274574,11 +275915,11 @@ function cacheDirectory() {
|
|
|
274574
275915
|
}
|
|
274575
275916
|
function normalizeHeaders(headers = {}) {
|
|
274576
275917
|
const normalized = {};
|
|
274577
|
-
for (const [
|
|
275918
|
+
for (const [key5, value4] of Object.entries(headers)) {
|
|
274578
275919
|
if (!value4) {
|
|
274579
275920
|
continue;
|
|
274580
275921
|
}
|
|
274581
|
-
normalized[
|
|
275922
|
+
normalized[key5.toLowerCase()] = value4;
|
|
274582
275923
|
}
|
|
274583
275924
|
return normalized;
|
|
274584
275925
|
}
|
|
@@ -274835,7 +276176,7 @@ function createCommand2() {
|
|
|
274835
276176
|
const env2 = await loadEnv2(false, false);
|
|
274836
276177
|
const name2 = await namePrompt(env2, projectName);
|
|
274837
276178
|
const targetDir = formatTargetDir(name2);
|
|
274838
|
-
const projectDir =
|
|
276179
|
+
const projectDir = join7(process.cwd(), targetDir);
|
|
274839
276180
|
if (!await exists(projectDir)) {
|
|
274840
276181
|
await mkdir6(projectDir, { recursive: true });
|
|
274841
276182
|
}
|
|
@@ -276671,7 +278012,7 @@ function platformCommand() {
|
|
|
276671
278012
|
|
|
276672
278013
|
// src/commands/smart-contract-set/create.ts
|
|
276673
278014
|
import { rmdir } from "node:fs/promises";
|
|
276674
|
-
import { join as
|
|
278015
|
+
import { join as join8 } from "node:path";
|
|
276675
278016
|
|
|
276676
278017
|
// src/commands/smart-contract-set/prompts/use-case.prompt.ts
|
|
276677
278018
|
async function useCasePrompt(platformConfig, argument) {
|
|
@@ -276724,7 +278065,7 @@ function createCommand4() {
|
|
|
276724
278065
|
return nothingSelectedError("use case");
|
|
276725
278066
|
}
|
|
276726
278067
|
const targetDir = formatTargetDir(name2);
|
|
276727
|
-
const projectDir =
|
|
278068
|
+
const projectDir = join8(process.cwd(), targetDir);
|
|
276728
278069
|
if (await exists2(projectDir) && !await isEmpty(projectDir)) {
|
|
276729
278070
|
const confirmEmpty = await esm_default3({
|
|
276730
278071
|
message: `The folder ${projectDir} already exists. Do you want to delete it?`,
|
|
@@ -276756,11 +278097,11 @@ function createCommand4() {
|
|
|
276756
278097
|
|
|
276757
278098
|
// src/utils/passthrough-options.ts
|
|
276758
278099
|
function mapPassthroughOptions(options, command) {
|
|
276759
|
-
const optionArgs = Object.entries(options).map(([
|
|
278100
|
+
const optionArgs = Object.entries(options).map(([key5, value4]) => {
|
|
276760
278101
|
if (value4 === true) {
|
|
276761
|
-
return `--${
|
|
278102
|
+
return `--${key5}`;
|
|
276762
278103
|
}
|
|
276763
|
-
return `--${
|
|
278104
|
+
return `--${key5}=${value4}`;
|
|
276764
278105
|
});
|
|
276765
278106
|
return [...optionArgs, ...command.args];
|
|
276766
278107
|
}
|
|
@@ -277216,13 +278557,13 @@ import { rm as rm4 } from "node:fs/promises";
|
|
|
277216
278557
|
|
|
277217
278558
|
// src/commands/smart-contract-set/subgraph/utils/subgraph-config.ts
|
|
277218
278559
|
import { readFile as readFile7, writeFile as writeFile8 } from "node:fs/promises";
|
|
277219
|
-
import { basename as basename4, join as
|
|
278560
|
+
import { basename as basename4, join as join9 } from "node:path";
|
|
277220
278561
|
|
|
277221
278562
|
// ../../node_modules/yaml/dist/index.js
|
|
277222
278563
|
var composer = require_composer();
|
|
277223
278564
|
var Document = require_Document();
|
|
277224
278565
|
var Schema = require_Schema();
|
|
277225
|
-
var
|
|
278566
|
+
var errors5 = require_errors3();
|
|
277226
278567
|
var Alias = require_Alias();
|
|
277227
278568
|
var identity3 = require_identity();
|
|
277228
278569
|
var Pair = require_Pair();
|
|
@@ -277238,9 +278579,9 @@ var visit2 = require_visit();
|
|
|
277238
278579
|
var $Composer = composer.Composer;
|
|
277239
278580
|
var $Document = Document.Document;
|
|
277240
278581
|
var $Schema = Schema.Schema;
|
|
277241
|
-
var $YAMLError =
|
|
277242
|
-
var $YAMLParseError =
|
|
277243
|
-
var $YAMLWarning =
|
|
278582
|
+
var $YAMLError = errors5.YAMLError;
|
|
278583
|
+
var $YAMLParseError = errors5.YAMLParseError;
|
|
278584
|
+
var $YAMLWarning = errors5.YAMLWarning;
|
|
277244
278585
|
var $Alias = Alias.Alias;
|
|
277245
278586
|
var $isAlias = identity3.isAlias;
|
|
277246
278587
|
var $isCollection = identity3.isCollection;
|
|
@@ -277266,17 +278607,17 @@ var $visitAsync = visit2.visitAsync;
|
|
|
277266
278607
|
|
|
277267
278608
|
// src/commands/smart-contract-set/subgraph/utils/subgraph-config.ts
|
|
277268
278609
|
var CONFIG_FILE_PATH = "./subgraph/subgraph.config.json";
|
|
277269
|
-
var isGenerated = (path8 = process.cwd()) => exists2(
|
|
278610
|
+
var isGenerated = (path8 = process.cwd()) => exists2(join9(path8, CONFIG_FILE_PATH));
|
|
277270
278611
|
var getSubgraphYamlFile = async (path8 = process.cwd()) => {
|
|
277271
278612
|
const generated = await isGenerated(path8);
|
|
277272
|
-
if (generated && await exists2(
|
|
277273
|
-
return
|
|
278613
|
+
if (generated && await exists2(join9(path8, "generated/scs.subgraph.yaml"))) {
|
|
278614
|
+
return join9(path8, "generated/scs.subgraph.yaml");
|
|
277274
278615
|
}
|
|
277275
|
-
if (await exists2(
|
|
277276
|
-
return
|
|
278616
|
+
if (await exists2(join9(path8, "subgraph/subgraph.yaml"))) {
|
|
278617
|
+
return join9(path8, "subgraph/subgraph.yaml");
|
|
277277
278618
|
}
|
|
277278
|
-
if (await exists2(
|
|
277279
|
-
return
|
|
278619
|
+
if (await exists2(join9(path8, "subgraph.yaml"))) {
|
|
278620
|
+
return join9(path8, "subgraph.yaml");
|
|
277280
278621
|
}
|
|
277281
278622
|
throw new Error("Subgraph configuration file not found");
|
|
277282
278623
|
};
|
|
@@ -277291,7 +278632,7 @@ var updateSubgraphYamlConfig = async (config4, cwd2 = process.cwd()) => {
|
|
|
277291
278632
|
};
|
|
277292
278633
|
var getSubgraphConfig = async (path8 = process.cwd()) => {
|
|
277293
278634
|
try {
|
|
277294
|
-
const configContents = await readFile7(
|
|
278635
|
+
const configContents = await readFile7(join9(path8, CONFIG_FILE_PATH));
|
|
277295
278636
|
const currentConfig = tryParseJson(configContents.toString());
|
|
277296
278637
|
return currentConfig;
|
|
277297
278638
|
} catch (err) {
|
|
@@ -277541,8 +278882,8 @@ function subgraphDeployCommand() {
|
|
|
277541
278882
|
accessToken,
|
|
277542
278883
|
instance
|
|
277543
278884
|
});
|
|
277544
|
-
const middleware = await
|
|
277545
|
-
const graphEndpoints = await getGraphEndpoint(middleware, env2
|
|
278885
|
+
const middleware = await settlemintClient.middleware.read(theGraphMiddleware.uniqueName);
|
|
278886
|
+
const graphEndpoints = await getGraphEndpoint(middleware, env2);
|
|
277546
278887
|
await writeEnvSpinner(!!prod, {
|
|
277547
278888
|
...env2,
|
|
277548
278889
|
SETTLEMINT_THEGRAPH: theGraphMiddleware.uniqueName,
|
|
@@ -277555,16 +278896,6 @@ async function updateSpecVersion(specVersion) {
|
|
|
277555
278896
|
yamlConfig.specVersion = specVersion;
|
|
277556
278897
|
await updateSubgraphYamlConfig(yamlConfig);
|
|
277557
278898
|
}
|
|
277558
|
-
async function getMiddlewareAndValidateSubgraphIsAvailable(uniqueName, settlemintClient, graphName) {
|
|
277559
|
-
const middleware = await settlemintClient.middleware.read(uniqueName);
|
|
277560
|
-
if (middleware.__typename === "HAGraphMiddleware") {
|
|
277561
|
-
if (middleware.subgraphs.some((s8) => s8.name === graphName)) {
|
|
277562
|
-
return middleware;
|
|
277563
|
-
}
|
|
277564
|
-
throw new Error("Subgraph not available");
|
|
277565
|
-
}
|
|
277566
|
-
return middleware;
|
|
277567
|
-
}
|
|
277568
278899
|
|
|
277569
278900
|
// src/commands/smart-contract.set.ts
|
|
277570
278901
|
function smartContractSetCommand() {
|
|
@@ -277612,4 +278943,4 @@ function sdkCliCommand(exitOverride = undefined) {
|
|
|
277612
278943
|
ascii();
|
|
277613
278944
|
sdkCliCommand();
|
|
277614
278945
|
|
|
277615
|
-
//# debugId=
|
|
278946
|
+
//# debugId=DEBE9BFB7BC357EC64756E2164756E21
|