@settlemint/sdk-cli 2.2.3-pra7ca0397 → 2.2.3-prb9a00194
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +1834 -465
- package/dist/cli.js.map +50 -8
- package/package.json +8 -8
package/dist/cli.js
CHANGED
@@ -14539,8 +14539,8 @@ var require_printLocation = __commonJS((exports) => {
|
|
14539
14539
|
const columnNum = sourceLocation.column + columnOffset;
|
14540
14540
|
const locationStr = `${source.name}:${lineNum}:${columnNum}
|
14541
14541
|
`;
|
14542
|
-
const
|
14543
|
-
const locationLine =
|
14542
|
+
const lines = body.split(/\r\n|[\n\r]/g);
|
14543
|
+
const locationLine = lines[lineIndex];
|
14544
14544
|
if (locationLine.length > 120) {
|
14545
14545
|
const subLineIndex = Math.floor(columnNum / 80);
|
14546
14546
|
const subLineColumnNum = columnNum % 80;
|
@@ -14556,14 +14556,14 @@ var require_printLocation = __commonJS((exports) => {
|
|
14556
14556
|
]);
|
14557
14557
|
}
|
14558
14558
|
return locationStr + printPrefixedLines([
|
14559
|
-
[`${lineNum - 1} |`,
|
14559
|
+
[`${lineNum - 1} |`, lines[lineIndex - 1]],
|
14560
14560
|
[`${lineNum} |`, locationLine],
|
14561
14561
|
["|", "^".padStart(columnNum)],
|
14562
|
-
[`${lineNum + 1} |`,
|
14562
|
+
[`${lineNum + 1} |`, lines[lineIndex + 1]]
|
14563
14563
|
]);
|
14564
14564
|
}
|
14565
|
-
function printPrefixedLines(
|
14566
|
-
const existingLines =
|
14565
|
+
function printPrefixedLines(lines) {
|
14566
|
+
const existingLines = lines.filter(([_, line]) => line !== undefined);
|
14567
14567
|
const padLen = Math.max(...existingLines.map(([prefix]) => prefix.length));
|
14568
14568
|
return existingLines.map(([prefix, line]) => prefix.padStart(padLen) + (line ? " " + line : "")).join(`
|
14569
14569
|
`);
|
@@ -14976,14 +14976,14 @@ var require_blockString = __commonJS((exports) => {
|
|
14976
14976
|
exports.isPrintableAsBlockString = isPrintableAsBlockString;
|
14977
14977
|
exports.printBlockString = printBlockString;
|
14978
14978
|
var _characterClasses = require_characterClasses();
|
14979
|
-
function dedentBlockStringLines(
|
14979
|
+
function dedentBlockStringLines(lines) {
|
14980
14980
|
var _firstNonEmptyLine2;
|
14981
14981
|
let commonIndent = Number.MAX_SAFE_INTEGER;
|
14982
14982
|
let firstNonEmptyLine = null;
|
14983
14983
|
let lastNonEmptyLine = -1;
|
14984
|
-
for (let i = 0;i <
|
14984
|
+
for (let i = 0;i < lines.length; ++i) {
|
14985
14985
|
var _firstNonEmptyLine;
|
14986
|
-
const line =
|
14986
|
+
const line = lines[i];
|
14987
14987
|
const indent = leadingWhitespace(line);
|
14988
14988
|
if (indent === line.length) {
|
14989
14989
|
continue;
|
@@ -14994,7 +14994,7 @@ var require_blockString = __commonJS((exports) => {
|
|
14994
14994
|
commonIndent = indent;
|
14995
14995
|
}
|
14996
14996
|
}
|
14997
|
-
return
|
14997
|
+
return lines.map((line, i) => i === 0 ? line : line.slice(commonIndent)).slice((_firstNonEmptyLine2 = firstNonEmptyLine) !== null && _firstNonEmptyLine2 !== undefined ? _firstNonEmptyLine2 : 0, lastNonEmptyLine + 1);
|
14998
14998
|
}
|
14999
14999
|
function leadingWhitespace(str) {
|
15000
15000
|
let i = 0;
|
@@ -15056,9 +15056,9 @@ var require_blockString = __commonJS((exports) => {
|
|
15056
15056
|
}
|
15057
15057
|
function printBlockString(value, options) {
|
15058
15058
|
const escapedValue = value.replace(/"""/g, '\\"""');
|
15059
|
-
const
|
15060
|
-
const isSingleLine =
|
15061
|
-
const forceLeadingNewLine =
|
15059
|
+
const lines = escapedValue.split(/\r\n|[\n\r]/g);
|
15060
|
+
const isSingleLine = lines.length === 1;
|
15061
|
+
const forceLeadingNewLine = lines.length > 1 && lines.slice(1).every((line) => line.length === 0 || (0, _characterClasses.isWhiteSpace)(line.charCodeAt(0)));
|
15062
15062
|
const hasTrailingTripleQuotes = escapedValue.endsWith('\\"""');
|
15063
15063
|
const hasTrailingQuote = value.endsWith('"') && !hasTrailingTripleQuotes;
|
15064
15064
|
const hasTrailingSlash = value.endsWith("\\");
|
@@ -35254,9 +35254,9 @@ var require_commonjs5 = __commonJS((exports) => {
|
|
35254
35254
|
this.#resolveCache = new ResolveCache2;
|
35255
35255
|
this.#resolvePosixCache = new ResolveCache2;
|
35256
35256
|
this.#children = new ChildrenCache2(childrenCacheSize);
|
35257
|
-
const
|
35258
|
-
if (
|
35259
|
-
|
35257
|
+
const split = cwdPath.substring(this.rootPath.length).split(sep2);
|
35258
|
+
if (split.length === 1 && !split[0]) {
|
35259
|
+
split.pop();
|
35260
35260
|
}
|
35261
35261
|
if (nocase === undefined) {
|
35262
35262
|
throw new TypeError("must provide nocase setting to PathScurryBase ctor");
|
@@ -35265,11 +35265,11 @@ var require_commonjs5 = __commonJS((exports) => {
|
|
35265
35265
|
this.root = this.newRoot(this.#fs);
|
35266
35266
|
this.roots[this.rootPath] = this.root;
|
35267
35267
|
let prev = this.root;
|
35268
|
-
let len =
|
35268
|
+
let len = split.length - 1;
|
35269
35269
|
const joinSep = pathImpl.sep;
|
35270
35270
|
let abs = this.rootPath;
|
35271
35271
|
let sawFirst = false;
|
35272
|
-
for (const part of
|
35272
|
+
for (const part of split) {
|
35273
35273
|
const l2 = len--;
|
35274
35274
|
prev = prev.child(part, {
|
35275
35275
|
relative: new Array(l2).fill("..").join(joinSep),
|
@@ -37720,9 +37720,9 @@ var require_ini = __commonJS((exports, module) => {
|
|
37720
37720
|
let p = out;
|
37721
37721
|
let section = null;
|
37722
37722
|
const re = /^\[([^\]]*)\]\s*$|^([^=]+)(=(.*))?$/i;
|
37723
|
-
const
|
37723
|
+
const lines = str.split(/[\r\n]+/g);
|
37724
37724
|
const duplicates = {};
|
37725
|
-
for (const line of
|
37725
|
+
for (const line of lines) {
|
37726
37726
|
if (!line || line.match(/^\s*[;#]/) || line.match(/^\s*$/)) {
|
37727
37727
|
continue;
|
37728
37728
|
}
|
@@ -40390,7 +40390,7 @@ var require_semver2 = __commonJS((exports, module) => {
|
|
40390
40390
|
// ../../node_modules/@npmcli/git/lib/lines-to-revs.js
|
40391
40391
|
var require_lines_to_revs = __commonJS((exports, module) => {
|
40392
40392
|
var semver = require_semver2();
|
40393
|
-
module.exports = (
|
40393
|
+
module.exports = (lines) => finish(lines.reduce(linesToRevsReducer, {
|
40394
40394
|
versions: {},
|
40395
40395
|
"dist-tags": {},
|
40396
40396
|
refs: {},
|
@@ -40451,12 +40451,12 @@ var require_lines_to_revs = __commonJS((exports, module) => {
|
|
40451
40451
|
return "other";
|
40452
40452
|
};
|
40453
40453
|
var lineToRevDoc = (line) => {
|
40454
|
-
const
|
40455
|
-
if (
|
40454
|
+
const split = line.trim().split(/\s+/, 2);
|
40455
|
+
if (split.length < 2) {
|
40456
40456
|
return null;
|
40457
40457
|
}
|
40458
|
-
const sha =
|
40459
|
-
const rawRef =
|
40458
|
+
const sha = split[0].trim();
|
40459
|
+
const rawRef = split[1].trim();
|
40460
40460
|
const type2 = refType(rawRef);
|
40461
40461
|
if (type2 === "tag") {
|
40462
40462
|
const ref = rawRef.slice("refs/tags/".length);
|
@@ -43017,17 +43017,17 @@ var require_normalize_data = __commonJS((exports, module) => {
|
|
43017
43017
|
};
|
43018
43018
|
var isEmail = (str) => str.includes("@") && str.indexOf("@") < str.lastIndexOf(".");
|
43019
43019
|
function extractDescription(description) {
|
43020
|
-
const
|
43020
|
+
const lines = description.trim().split(`
|
43021
43021
|
`);
|
43022
43022
|
let start = 0;
|
43023
|
-
while (
|
43023
|
+
while (lines[start]?.trim().match(/^(#|$)/)) {
|
43024
43024
|
start++;
|
43025
43025
|
}
|
43026
43026
|
let end = start + 1;
|
43027
|
-
while (end <
|
43027
|
+
while (end < lines.length && lines[end].trim()) {
|
43028
43028
|
end++;
|
43029
43029
|
}
|
43030
|
-
return
|
43030
|
+
return lines.slice(start, end).join(" ").trim();
|
43031
43031
|
}
|
43032
43032
|
function stringifyPerson(person) {
|
43033
43033
|
if (typeof person !== "string") {
|
@@ -61724,9 +61724,9 @@ ${lanes.join(`
|
|
61724
61724
|
return node.kind === 183 || node.kind === 233;
|
61725
61725
|
}
|
61726
61726
|
var MAX_SMI_X86 = 1073741823;
|
61727
|
-
function guessIndentation(
|
61727
|
+
function guessIndentation(lines) {
|
61728
61728
|
let indentation = MAX_SMI_X86;
|
61729
|
-
for (const line of
|
61729
|
+
for (const line of lines) {
|
61730
61730
|
if (!line.length) {
|
61731
61731
|
continue;
|
61732
61732
|
}
|
@@ -150284,8 +150284,8 @@ ${lanes.join(`
|
|
150284
150284
|
if (node.comment) {
|
150285
150285
|
const text = getTextOfJSDocComment(node.comment);
|
150286
150286
|
if (text) {
|
150287
|
-
const
|
150288
|
-
for (const line of
|
150287
|
+
const lines = text.split(/\r\n?|\n/);
|
150288
|
+
for (const line of lines) {
|
150289
150289
|
writeLine();
|
150290
150290
|
writeSpace();
|
150291
150291
|
writePunctuation("*");
|
@@ -150929,9 +150929,9 @@ ${lanes.join(`
|
|
150929
150929
|
if (getEmitFlags(parentNode) & 1) {
|
150930
150930
|
writeSpace();
|
150931
150931
|
} else if (preserveSourceNewlines) {
|
150932
|
-
const
|
150933
|
-
if (
|
150934
|
-
writeLine(
|
150932
|
+
const lines = getLinesBetweenNodes(parentNode, prevChildNode, nextChildNode);
|
150933
|
+
if (lines) {
|
150934
|
+
writeLine(lines);
|
150935
150935
|
} else {
|
150936
150936
|
writeSpace();
|
150937
150937
|
}
|
@@ -150940,9 +150940,9 @@ ${lanes.join(`
|
|
150940
150940
|
}
|
150941
150941
|
}
|
150942
150942
|
function writeLines(text) {
|
150943
|
-
const
|
150944
|
-
const indentation = guessIndentation(
|
150945
|
-
for (const lineText of
|
150943
|
+
const lines = text.split(/\r\n?|\n/);
|
150944
|
+
const indentation = guessIndentation(lines);
|
150945
|
+
for (const lineText of lines) {
|
150946
150946
|
const line = indentation ? lineText.slice(indentation) : lineText;
|
150947
150947
|
if (line.length) {
|
150948
150948
|
writeLine();
|
@@ -151040,11 +151040,11 @@ ${lanes.join(`
|
|
151040
151040
|
}
|
151041
151041
|
function getEffectiveLines(getLineDifference) {
|
151042
151042
|
Debug.assert(!!preserveSourceNewlines);
|
151043
|
-
const
|
151044
|
-
if (
|
151043
|
+
const lines = getLineDifference(true);
|
151044
|
+
if (lines === 0) {
|
151045
151045
|
return getLineDifference(false);
|
151046
151046
|
}
|
151047
|
-
return
|
151047
|
+
return lines;
|
151048
151048
|
}
|
151049
151049
|
function writeLineSeparatorsAndIndentBefore(node, parent2) {
|
151050
151050
|
const leadingNewlines = preserveSourceNewlines && getLeadingLineTerminatorCount(parent2, node, 0);
|
@@ -161330,7 +161330,7 @@ ${lanes.join(`
|
|
161330
161330
|
function generateOptionOutput(sys2, option, rightAlignOfLeft, leftAlignOfRight) {
|
161331
161331
|
var _a;
|
161332
161332
|
const text = [];
|
161333
|
-
const
|
161333
|
+
const colors2 = createColors(sys2);
|
161334
161334
|
const name2 = getDisplayNameTextOfOption(option);
|
161335
161335
|
const valueCandidates = getValueCandidate(option);
|
161336
161336
|
const defaultValueDescription = typeof option.defaultValueDescription === "object" ? getDiagnosticText(option.defaultValueDescription) : formatDefaultValue(option.defaultValueDescription, option.type === "list" || option.type === "listOrElement" ? option.element.type : option.type);
|
@@ -161351,7 +161351,7 @@ ${lanes.join(`
|
|
161351
161351
|
}
|
161352
161352
|
text.push(sys2.newLine);
|
161353
161353
|
} else {
|
161354
|
-
text.push(
|
161354
|
+
text.push(colors2.blue(name2), sys2.newLine);
|
161355
161355
|
if (option.description) {
|
161356
161356
|
const description3 = getDiagnosticText(option.description);
|
161357
161357
|
text.push(description3);
|
@@ -161396,7 +161396,7 @@ ${lanes.join(`
|
|
161396
161396
|
if (isFirstLine) {
|
161397
161397
|
curLeft = left.padStart(rightAlignOfLeft2);
|
161398
161398
|
curLeft = curLeft.padEnd(leftAlignOfRight2);
|
161399
|
-
curLeft = colorLeft ?
|
161399
|
+
curLeft = colorLeft ? colors2.blue(curLeft) : curLeft;
|
161400
161400
|
} else {
|
161401
161401
|
curLeft = "".padStart(leftAlignOfRight2);
|
161402
161402
|
}
|
@@ -161465,15 +161465,15 @@ ${lanes.join(`
|
|
161465
161465
|
}
|
161466
161466
|
const rightAlignOfLeftPart = maxLength2 + 2;
|
161467
161467
|
const leftAlignOfRightPart = rightAlignOfLeftPart + 2;
|
161468
|
-
let
|
161468
|
+
let lines = [];
|
161469
161469
|
for (const option of optionsList) {
|
161470
161470
|
const tmp = generateOptionOutput(sys2, option, rightAlignOfLeftPart, leftAlignOfRightPart);
|
161471
|
-
|
161471
|
+
lines = [...lines, ...tmp];
|
161472
161472
|
}
|
161473
|
-
if (
|
161474
|
-
|
161473
|
+
if (lines[lines.length - 2] !== sys2.newLine) {
|
161474
|
+
lines.push(sys2.newLine);
|
161475
161475
|
}
|
161476
|
-
return
|
161476
|
+
return lines;
|
161477
161477
|
}
|
161478
161478
|
function generateSectionOptionsOutput(sys2, sectionName, options, subCategory, beforeOptionsDescription, afterOptionsDescription) {
|
161479
161479
|
let res = [];
|
@@ -161508,9 +161508,9 @@ ${lanes.join(`
|
|
161508
161508
|
return res;
|
161509
161509
|
}
|
161510
161510
|
function printEasyHelp(sys2, simpleOptions) {
|
161511
|
-
const
|
161511
|
+
const colors2 = createColors(sys2);
|
161512
161512
|
let output = [...getHeader(sys2, `${getDiagnosticText(Diagnostics.tsc_Colon_The_TypeScript_Compiler)} - ${getDiagnosticText(Diagnostics.Version_0, version)}`)];
|
161513
|
-
output.push(
|
161513
|
+
output.push(colors2.bold(getDiagnosticText(Diagnostics.COMMON_COMMANDS)) + sys2.newLine + sys2.newLine);
|
161514
161514
|
example("tsc", Diagnostics.Compiles_the_current_project_tsconfig_json_in_the_working_directory);
|
161515
161515
|
example("tsc app.ts util.ts", Diagnostics.Ignoring_tsconfig_json_compiles_the_specified_files_with_default_compiler_options);
|
161516
161516
|
example("tsc -b", Diagnostics.Build_a_composite_project_in_the_working_directory);
|
@@ -161531,7 +161531,7 @@ ${lanes.join(`
|
|
161531
161531
|
function example(ex, desc) {
|
161532
161532
|
const examples = typeof ex === "string" ? [ex] : ex;
|
161533
161533
|
for (const example2 of examples) {
|
161534
|
-
output.push(" " +
|
161534
|
+
output.push(" " + colors2.blue(example2) + sys2.newLine);
|
161535
161535
|
}
|
161536
161536
|
output.push(" " + getDiagnosticText(desc) + sys2.newLine + sys2.newLine);
|
161537
161537
|
}
|
@@ -161554,12 +161554,12 @@ ${lanes.join(`
|
|
161554
161554
|
}
|
161555
161555
|
function getHeader(sys2, message) {
|
161556
161556
|
var _a;
|
161557
|
-
const
|
161557
|
+
const colors2 = createColors(sys2);
|
161558
161558
|
const header = [];
|
161559
161559
|
const terminalWidth = ((_a = sys2.getWidthOfTerminal) == null ? undefined : _a.call(sys2)) ?? 0;
|
161560
161560
|
const tsIconLength = 5;
|
161561
|
-
const tsIconFirstLine =
|
161562
|
-
const tsIconSecondLine =
|
161561
|
+
const tsIconFirstLine = colors2.blueBackground("".padStart(tsIconLength));
|
161562
|
+
const tsIconSecondLine = colors2.blueBackground(colors2.brightWhite("TS ".padStart(tsIconLength)));
|
161563
161563
|
if (terminalWidth >= message.length + tsIconLength) {
|
161564
161564
|
const rightAlign = terminalWidth > 120 ? 120 : terminalWidth;
|
161565
161565
|
const leftAlign = rightAlign - tsIconLength;
|
@@ -213265,9 +213265,9 @@ Additional information: BADCLIENT: Bad error code, ${badCode} not found in range
|
|
213265
213265
|
insertedText = this.initialText + this.trailingText;
|
213266
213266
|
}
|
213267
213267
|
const lm = LineIndex.linesFromText(insertedText);
|
213268
|
-
const
|
213269
|
-
if (
|
213270
|
-
|
213268
|
+
const lines = lm.lines;
|
213269
|
+
if (lines.length > 1 && lines[lines.length - 1] === "") {
|
213270
|
+
lines.pop();
|
213271
213271
|
}
|
213272
213272
|
let branchParent;
|
213273
213273
|
let lastZeroCount;
|
@@ -213286,13 +213286,13 @@ Additional information: BADCLIENT: Bad error code, ${badCode} not found in range
|
|
213286
213286
|
branchParent.remove(lastZeroCount);
|
213287
213287
|
}
|
213288
213288
|
const leafNode = this.startPath[this.startPath.length - 1];
|
213289
|
-
if (
|
213290
|
-
leafNode.text =
|
213291
|
-
if (
|
213292
|
-
let insertedNodes = new Array(
|
213289
|
+
if (lines.length > 0) {
|
213290
|
+
leafNode.text = lines[0];
|
213291
|
+
if (lines.length > 1) {
|
213292
|
+
let insertedNodes = new Array(lines.length - 1);
|
213293
213293
|
let startNode2 = leafNode;
|
213294
|
-
for (let i2 = 1;i2 <
|
213295
|
-
insertedNodes[i2 - 1] = new LineLeaf(
|
213294
|
+
for (let i2 = 1;i2 < lines.length; i2++) {
|
213295
|
+
insertedNodes[i2 - 1] = new LineLeaf(lines[i2]);
|
213296
213296
|
}
|
213297
213297
|
let pathIndex = this.startPath.length - 2;
|
213298
213298
|
while (pathIndex >= 0) {
|
@@ -213562,11 +213562,11 @@ Additional information: BADCLIENT: Bad error code, ${badCode} not found in range
|
|
213562
213562
|
return { absolutePosition: this.root.charCount(), lineText: undefined };
|
213563
213563
|
}
|
213564
213564
|
}
|
213565
|
-
load(
|
213566
|
-
if (
|
213565
|
+
load(lines) {
|
213566
|
+
if (lines.length > 0) {
|
213567
213567
|
const leaves = [];
|
213568
|
-
for (let i2 = 0;i2 <
|
213569
|
-
leaves[i2] = new LineLeaf(
|
213568
|
+
for (let i2 = 0;i2 < lines.length; i2++) {
|
213569
|
+
leaves[i2] = new LineLeaf(lines[i2]);
|
213570
213570
|
}
|
213571
213571
|
this.root = _LineIndex.buildTreeFromBottom(leaves);
|
213572
213572
|
} else {
|
@@ -213669,18 +213669,18 @@ Additional information: BADCLIENT: Bad error code, ${badCode} not found in range
|
|
213669
213669
|
if (lineMap.length === 0) {
|
213670
213670
|
return { lines: [], lineMap };
|
213671
213671
|
}
|
213672
|
-
const
|
213672
|
+
const lines = new Array(lineMap.length);
|
213673
213673
|
const lc = lineMap.length - 1;
|
213674
213674
|
for (let lmi = 0;lmi < lc; lmi++) {
|
213675
|
-
|
213675
|
+
lines[lmi] = text.substring(lineMap[lmi], lineMap[lmi + 1]);
|
213676
213676
|
}
|
213677
213677
|
const endText = text.substring(lineMap[lc]);
|
213678
213678
|
if (endText.length > 0) {
|
213679
|
-
|
213679
|
+
lines[lc] = endText;
|
213680
213680
|
} else {
|
213681
|
-
|
213681
|
+
lines.pop();
|
213682
213682
|
}
|
213683
|
-
return { lines
|
213683
|
+
return { lines, lineMap };
|
213684
213684
|
}
|
213685
213685
|
};
|
213686
213686
|
var LineNode = class _LineNode {
|
@@ -214751,7 +214751,7 @@ async function* streamBody(e4) {
|
|
214751
214751
|
}
|
214752
214752
|
}
|
214753
214753
|
}
|
214754
|
-
async function*
|
214754
|
+
async function* split(e4, r3) {
|
214755
214755
|
var a4 = "";
|
214756
214756
|
var n3;
|
214757
214757
|
for await (var t4 of e4) {
|
@@ -214785,7 +214785,7 @@ function makeFetchSource(e4, r3, a4) {
|
|
214785
214785
|
var n5 = "--" + (a6 ? a6[1] : "-");
|
214786
214786
|
var t5 = true;
|
214787
214787
|
var i4;
|
214788
|
-
for await (var o4 of
|
214788
|
+
for await (var o4 of split(streamBody(r5), `\r
|
214789
214789
|
` + n5)) {
|
214790
214790
|
if (t5) {
|
214791
214791
|
t5 = false;
|
@@ -214818,7 +214818,7 @@ function makeFetchSource(e4, r3, a4) {
|
|
214818
214818
|
} else if (/text\/event-stream/i.test(o3)) {
|
214819
214819
|
s2 = async function* parseEventStream(e6) {
|
214820
214820
|
var r5;
|
214821
|
-
for await (var a6 of
|
214821
|
+
for await (var a6 of split(streamBody(e6), `
|
214822
214822
|
|
214823
214823
|
`)) {
|
214824
214824
|
var n5 = a6.match(S);
|
@@ -230414,11 +230414,11 @@ var require_visit = __commonJS((exports) => {
|
|
230414
230414
|
visit2.BREAK = BREAK;
|
230415
230415
|
visit2.SKIP = SKIP;
|
230416
230416
|
visit2.REMOVE = REMOVE;
|
230417
|
-
function visit_(
|
230418
|
-
const ctrl = callVisitor(
|
230417
|
+
function visit_(key5, node, visitor, path6) {
|
230418
|
+
const ctrl = callVisitor(key5, node, visitor, path6);
|
230419
230419
|
if (identity2.isNode(ctrl) || identity2.isPair(ctrl)) {
|
230420
|
-
replaceNode(
|
230421
|
-
return visit_(
|
230420
|
+
replaceNode(key5, path6, ctrl);
|
230421
|
+
return visit_(key5, ctrl, visitor, path6);
|
230422
230422
|
}
|
230423
230423
|
if (typeof ctrl !== "symbol") {
|
230424
230424
|
if (identity2.isCollection(node)) {
|
@@ -230462,11 +230462,11 @@ var require_visit = __commonJS((exports) => {
|
|
230462
230462
|
visitAsync.BREAK = BREAK;
|
230463
230463
|
visitAsync.SKIP = SKIP;
|
230464
230464
|
visitAsync.REMOVE = REMOVE;
|
230465
|
-
async function visitAsync_(
|
230466
|
-
const ctrl = await callVisitor(
|
230465
|
+
async function visitAsync_(key5, node, visitor, path6) {
|
230466
|
+
const ctrl = await callVisitor(key5, node, visitor, path6);
|
230467
230467
|
if (identity2.isNode(ctrl) || identity2.isPair(ctrl)) {
|
230468
|
-
replaceNode(
|
230469
|
-
return visitAsync_(
|
230468
|
+
replaceNode(key5, path6, ctrl);
|
230469
|
+
return visitAsync_(key5, ctrl, visitor, path6);
|
230470
230470
|
}
|
230471
230471
|
if (typeof ctrl !== "symbol") {
|
230472
230472
|
if (identity2.isCollection(node)) {
|
@@ -230516,27 +230516,27 @@ var require_visit = __commonJS((exports) => {
|
|
230516
230516
|
}
|
230517
230517
|
return visitor;
|
230518
230518
|
}
|
230519
|
-
function callVisitor(
|
230519
|
+
function callVisitor(key5, node, visitor, path6) {
|
230520
230520
|
if (typeof visitor === "function")
|
230521
|
-
return visitor(
|
230521
|
+
return visitor(key5, node, path6);
|
230522
230522
|
if (identity2.isMap(node))
|
230523
|
-
return visitor.Map?.(
|
230523
|
+
return visitor.Map?.(key5, node, path6);
|
230524
230524
|
if (identity2.isSeq(node))
|
230525
|
-
return visitor.Seq?.(
|
230525
|
+
return visitor.Seq?.(key5, node, path6);
|
230526
230526
|
if (identity2.isPair(node))
|
230527
|
-
return visitor.Pair?.(
|
230527
|
+
return visitor.Pair?.(key5, node, path6);
|
230528
230528
|
if (identity2.isScalar(node))
|
230529
|
-
return visitor.Scalar?.(
|
230529
|
+
return visitor.Scalar?.(key5, node, path6);
|
230530
230530
|
if (identity2.isAlias(node))
|
230531
|
-
return visitor.Alias?.(
|
230531
|
+
return visitor.Alias?.(key5, node, path6);
|
230532
230532
|
return;
|
230533
230533
|
}
|
230534
|
-
function replaceNode(
|
230534
|
+
function replaceNode(key5, path6, node) {
|
230535
230535
|
const parent = path6[path6.length - 1];
|
230536
230536
|
if (identity2.isCollection(parent)) {
|
230537
|
-
parent.items[
|
230537
|
+
parent.items[key5] = node;
|
230538
230538
|
} else if (identity2.isPair(parent)) {
|
230539
|
-
if (
|
230539
|
+
if (key5 === "key")
|
230540
230540
|
parent.key = node;
|
230541
230541
|
else
|
230542
230542
|
parent.value = node;
|
@@ -230768,7 +230768,7 @@ var require_anchors = __commonJS((exports) => {
|
|
230768
230768
|
|
230769
230769
|
// ../../node_modules/yaml/dist/doc/applyReviver.js
|
230770
230770
|
var require_applyReviver = __commonJS((exports) => {
|
230771
|
-
function applyReviver(reviver, obj,
|
230771
|
+
function applyReviver(reviver, obj, key5, val) {
|
230772
230772
|
if (val && typeof val === "object") {
|
230773
230773
|
if (Array.isArray(val)) {
|
230774
230774
|
for (let i7 = 0, len = val.length;i7 < len; ++i7) {
|
@@ -230808,7 +230808,7 @@ var require_applyReviver = __commonJS((exports) => {
|
|
230808
230808
|
}
|
230809
230809
|
}
|
230810
230810
|
}
|
230811
|
-
return reviver.call(obj,
|
230811
|
+
return reviver.call(obj, key5, val);
|
230812
230812
|
}
|
230813
230813
|
exports.applyReviver = applyReviver;
|
230814
230814
|
});
|
@@ -231126,29 +231126,29 @@ var require_Collection = __commonJS((exports) => {
|
|
231126
231126
|
if (isEmptyPath(path6))
|
231127
231127
|
this.add(value4);
|
231128
231128
|
else {
|
231129
|
-
const [
|
231130
|
-
const node = this.get(
|
231129
|
+
const [key5, ...rest] = path6;
|
231130
|
+
const node = this.get(key5, true);
|
231131
231131
|
if (identity2.isCollection(node))
|
231132
231132
|
node.addIn(rest, value4);
|
231133
231133
|
else if (node === undefined && this.schema)
|
231134
|
-
this.set(
|
231134
|
+
this.set(key5, collectionFromPath(this.schema, rest, value4));
|
231135
231135
|
else
|
231136
|
-
throw new Error(`Expected YAML collection at ${
|
231136
|
+
throw new Error(`Expected YAML collection at ${key5}. Remaining path: ${rest}`);
|
231137
231137
|
}
|
231138
231138
|
}
|
231139
231139
|
deleteIn(path6) {
|
231140
|
-
const [
|
231140
|
+
const [key5, ...rest] = path6;
|
231141
231141
|
if (rest.length === 0)
|
231142
|
-
return this.delete(
|
231143
|
-
const node = this.get(
|
231142
|
+
return this.delete(key5);
|
231143
|
+
const node = this.get(key5, true);
|
231144
231144
|
if (identity2.isCollection(node))
|
231145
231145
|
return node.deleteIn(rest);
|
231146
231146
|
else
|
231147
|
-
throw new Error(`Expected YAML collection at ${
|
231147
|
+
throw new Error(`Expected YAML collection at ${key5}. Remaining path: ${rest}`);
|
231148
231148
|
}
|
231149
231149
|
getIn(path6, keepScalar) {
|
231150
|
-
const [
|
231151
|
-
const node = this.get(
|
231150
|
+
const [key5, ...rest] = path6;
|
231151
|
+
const node = this.get(key5, true);
|
231152
231152
|
if (rest.length === 0)
|
231153
231153
|
return !keepScalar && identity2.isScalar(node) ? node.value : node;
|
231154
231154
|
else
|
@@ -231163,24 +231163,24 @@ var require_Collection = __commonJS((exports) => {
|
|
231163
231163
|
});
|
231164
231164
|
}
|
231165
231165
|
hasIn(path6) {
|
231166
|
-
const [
|
231166
|
+
const [key5, ...rest] = path6;
|
231167
231167
|
if (rest.length === 0)
|
231168
|
-
return this.has(
|
231169
|
-
const node = this.get(
|
231168
|
+
return this.has(key5);
|
231169
|
+
const node = this.get(key5, true);
|
231170
231170
|
return identity2.isCollection(node) ? node.hasIn(rest) : false;
|
231171
231171
|
}
|
231172
231172
|
setIn(path6, value4) {
|
231173
|
-
const [
|
231173
|
+
const [key5, ...rest] = path6;
|
231174
231174
|
if (rest.length === 0) {
|
231175
|
-
this.set(
|
231175
|
+
this.set(key5, value4);
|
231176
231176
|
} else {
|
231177
|
-
const node = this.get(
|
231177
|
+
const node = this.get(key5, true);
|
231178
231178
|
if (identity2.isCollection(node))
|
231179
231179
|
node.setIn(rest, value4);
|
231180
231180
|
else if (node === undefined && this.schema)
|
231181
|
-
this.set(
|
231181
|
+
this.set(key5, collectionFromPath(this.schema, rest, value4));
|
231182
231182
|
else
|
231183
|
-
throw new Error(`Expected YAML collection at ${
|
231183
|
+
throw new Error(`Expected YAML collection at ${key5}. Remaining path: ${rest}`);
|
231184
231184
|
}
|
231185
231185
|
}
|
231186
231186
|
}
|
@@ -231768,19 +231768,19 @@ var require_stringifyPair = __commonJS((exports) => {
|
|
231768
231768
|
var Scalar = require_Scalar();
|
231769
231769
|
var stringify3 = require_stringify();
|
231770
231770
|
var stringifyComment = require_stringifyComment();
|
231771
|
-
function stringifyPair2({ key:
|
231771
|
+
function stringifyPair2({ key: key5, value: value4 }, ctx, onComment, onChompKeep) {
|
231772
231772
|
const { allNullValues, doc, indent: indent2, indentStep, options: { commentString, indentSeq, simpleKeys } } = ctx;
|
231773
|
-
let keyComment = identity2.isNode(
|
231773
|
+
let keyComment = identity2.isNode(key5) && key5.comment || null;
|
231774
231774
|
if (simpleKeys) {
|
231775
231775
|
if (keyComment) {
|
231776
231776
|
throw new Error("With simple keys, key nodes cannot have comments");
|
231777
231777
|
}
|
231778
|
-
if (identity2.isCollection(
|
231778
|
+
if (identity2.isCollection(key5) || !identity2.isNode(key5) && typeof key5 === "object") {
|
231779
231779
|
const msg = "With simple keys, collection cannot be used as a key value";
|
231780
231780
|
throw new Error(msg);
|
231781
231781
|
}
|
231782
231782
|
}
|
231783
|
-
let explicitKey = !simpleKeys && (!
|
231783
|
+
let explicitKey = !simpleKeys && (!key5 || keyComment && value4 == null && !ctx.inFlow || identity2.isCollection(key5) || (identity2.isScalar(key5) ? key5.type === Scalar.Scalar.BLOCK_FOLDED || key5.type === Scalar.Scalar.BLOCK_LITERAL : typeof key5 === "object"));
|
231784
231784
|
ctx = Object.assign({}, ctx, {
|
231785
231785
|
allNullValues: false,
|
231786
231786
|
implicitKey: !explicitKey && (simpleKeys || !allNullValues),
|
@@ -231788,7 +231788,7 @@ var require_stringifyPair = __commonJS((exports) => {
|
|
231788
231788
|
});
|
231789
231789
|
let keyCommentDone = false;
|
231790
231790
|
let chompKeep = false;
|
231791
|
-
let str = stringify3.stringify(
|
231791
|
+
let str = stringify3.stringify(key5, ctx, () => keyCommentDone = true, () => chompKeep = true);
|
231792
231792
|
if (!explicitKey && !ctx.inFlow && str.length > 1024) {
|
231793
231793
|
if (simpleKeys)
|
231794
231794
|
throw new Error("With simple keys, single line scalar must not span more than 1024 characters");
|
@@ -231932,7 +231932,7 @@ var require_merge = __commonJS((exports) => {
|
|
231932
231932
|
}),
|
231933
231933
|
stringify: () => MERGE_KEY
|
231934
231934
|
};
|
231935
|
-
var isMergeKey = (ctx,
|
231935
|
+
var isMergeKey = (ctx, key5) => (merge3.identify(key5) || identity2.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);
|
231936
231936
|
function addMergeToJSMap(ctx, map3, value4) {
|
231937
231937
|
value4 = ctx && identity2.isAlias(value4) ? value4.resolve(ctx.doc) : value4;
|
231938
231938
|
if (identity2.isSeq(value4))
|
@@ -231949,14 +231949,14 @@ var require_merge = __commonJS((exports) => {
|
|
231949
231949
|
if (!identity2.isMap(source))
|
231950
231950
|
throw new Error("Merge sources must be maps or map aliases");
|
231951
231951
|
const srcMap = source.toJSON(null, ctx, Map);
|
231952
|
-
for (const [
|
231952
|
+
for (const [key5, value5] of srcMap) {
|
231953
231953
|
if (map3 instanceof Map) {
|
231954
|
-
if (!map3.has(
|
231955
|
-
map3.set(
|
231954
|
+
if (!map3.has(key5))
|
231955
|
+
map3.set(key5, value5);
|
231956
231956
|
} else if (map3 instanceof Set) {
|
231957
|
-
map3.add(
|
231958
|
-
} else if (!Object.prototype.hasOwnProperty.call(map3,
|
231959
|
-
Object.defineProperty(map3,
|
231957
|
+
map3.add(key5);
|
231958
|
+
} else if (!Object.prototype.hasOwnProperty.call(map3, key5)) {
|
231959
|
+
Object.defineProperty(map3, key5, {
|
231960
231960
|
value: value5,
|
231961
231961
|
writable: true,
|
231962
231962
|
enumerable: true,
|
@@ -231978,19 +231978,19 @@ var require_addPairToJSMap = __commonJS((exports) => {
|
|
231978
231978
|
var stringify3 = require_stringify();
|
231979
231979
|
var identity2 = require_identity();
|
231980
231980
|
var toJS = require_toJS();
|
231981
|
-
function addPairToJSMap(ctx, map3, { key:
|
231982
|
-
if (identity2.isNode(
|
231983
|
-
|
231984
|
-
else if (merge3.isMergeKey(ctx,
|
231981
|
+
function addPairToJSMap(ctx, map3, { key: key5, value: value4 }) {
|
231982
|
+
if (identity2.isNode(key5) && key5.addToJSMap)
|
231983
|
+
key5.addToJSMap(ctx, map3, value4);
|
231984
|
+
else if (merge3.isMergeKey(ctx, key5))
|
231985
231985
|
merge3.addMergeToJSMap(ctx, map3, value4);
|
231986
231986
|
else {
|
231987
|
-
const jsKey = toJS.toJS(
|
231987
|
+
const jsKey = toJS.toJS(key5, "", ctx);
|
231988
231988
|
if (map3 instanceof Map) {
|
231989
231989
|
map3.set(jsKey, toJS.toJS(value4, jsKey, ctx));
|
231990
231990
|
} else if (map3 instanceof Set) {
|
231991
231991
|
map3.add(jsKey);
|
231992
231992
|
} else {
|
231993
|
-
const stringKey = stringifyKey(
|
231993
|
+
const stringKey = stringifyKey(key5, jsKey, ctx);
|
231994
231994
|
const jsValue = toJS.toJS(value4, stringKey, ctx);
|
231995
231995
|
if (stringKey in map3)
|
231996
231996
|
Object.defineProperty(map3, stringKey, {
|
@@ -232005,19 +232005,19 @@ var require_addPairToJSMap = __commonJS((exports) => {
|
|
232005
232005
|
}
|
232006
232006
|
return map3;
|
232007
232007
|
}
|
232008
|
-
function stringifyKey(
|
232008
|
+
function stringifyKey(key5, jsKey, ctx) {
|
232009
232009
|
if (jsKey === null)
|
232010
232010
|
return "";
|
232011
232011
|
if (typeof jsKey !== "object")
|
232012
232012
|
return String(jsKey);
|
232013
|
-
if (identity2.isNode(
|
232013
|
+
if (identity2.isNode(key5) && ctx?.doc) {
|
232014
232014
|
const strCtx = stringify3.createStringifyContext(ctx.doc, {});
|
232015
232015
|
strCtx.anchors = new Set;
|
232016
232016
|
for (const node of ctx.anchors.keys())
|
232017
232017
|
strCtx.anchors.add(node.anchor);
|
232018
232018
|
strCtx.inFlow = true;
|
232019
232019
|
strCtx.inStringifyKey = true;
|
232020
|
-
const strKey =
|
232020
|
+
const strKey = key5.toString(strCtx);
|
232021
232021
|
if (!ctx.mapKeyWarned) {
|
232022
232022
|
let jsonStr = JSON.stringify(strKey);
|
232023
232023
|
if (jsonStr.length > 40)
|
@@ -232038,25 +232038,25 @@ var require_Pair = __commonJS((exports) => {
|
|
232038
232038
|
var stringifyPair2 = require_stringifyPair();
|
232039
232039
|
var addPairToJSMap = require_addPairToJSMap();
|
232040
232040
|
var identity2 = require_identity();
|
232041
|
-
function createPair(
|
232042
|
-
const k6 = createNode.createNode(
|
232041
|
+
function createPair(key5, value4, ctx) {
|
232042
|
+
const k6 = createNode.createNode(key5, undefined, ctx);
|
232043
232043
|
const v7 = createNode.createNode(value4, undefined, ctx);
|
232044
232044
|
return new Pair(k6, v7);
|
232045
232045
|
}
|
232046
232046
|
|
232047
232047
|
class Pair {
|
232048
|
-
constructor(
|
232048
|
+
constructor(key5, value4 = null) {
|
232049
232049
|
Object.defineProperty(this, identity2.NODE_TYPE, { value: identity2.PAIR });
|
232050
|
-
this.key =
|
232050
|
+
this.key = key5;
|
232051
232051
|
this.value = value4;
|
232052
232052
|
}
|
232053
232053
|
clone(schema) {
|
232054
|
-
let { key:
|
232055
|
-
if (identity2.isNode(
|
232056
|
-
|
232054
|
+
let { key: key5, value: value4 } = this;
|
232055
|
+
if (identity2.isNode(key5))
|
232056
|
+
key5 = key5.clone(schema);
|
232057
232057
|
if (identity2.isNode(value4))
|
232058
232058
|
value4 = value4.clone(schema);
|
232059
|
-
return new Pair(
|
232059
|
+
return new Pair(key5, value4);
|
232060
232060
|
}
|
232061
232061
|
toJSON(_6, ctx) {
|
232062
232062
|
const pair = ctx?.mapAsMap ? new Map : {};
|
@@ -232223,11 +232223,11 @@ var require_YAMLMap = __commonJS((exports) => {
|
|
232223
232223
|
var identity2 = require_identity();
|
232224
232224
|
var Pair = require_Pair();
|
232225
232225
|
var Scalar = require_Scalar();
|
232226
|
-
function findPair(items,
|
232227
|
-
const k6 = identity2.isScalar(
|
232226
|
+
function findPair(items, key5) {
|
232227
|
+
const k6 = identity2.isScalar(key5) ? key5.value : key5;
|
232228
232228
|
for (const it2 of items) {
|
232229
232229
|
if (identity2.isPair(it2)) {
|
232230
|
-
if (it2.key ===
|
232230
|
+
if (it2.key === key5 || it2.key === k6)
|
232231
232231
|
return it2;
|
232232
232232
|
if (identity2.isScalar(it2.key) && it2.key.value === k6)
|
232233
232233
|
return it2;
|
@@ -232247,20 +232247,20 @@ var require_YAMLMap = __commonJS((exports) => {
|
|
232247
232247
|
static from(schema, obj, ctx) {
|
232248
232248
|
const { keepUndefined, replacer } = ctx;
|
232249
232249
|
const map3 = new this(schema);
|
232250
|
-
const add = (
|
232250
|
+
const add = (key5, value4) => {
|
232251
232251
|
if (typeof replacer === "function")
|
232252
|
-
value4 = replacer.call(obj,
|
232253
|
-
else if (Array.isArray(replacer) && !replacer.includes(
|
232252
|
+
value4 = replacer.call(obj, key5, value4);
|
232253
|
+
else if (Array.isArray(replacer) && !replacer.includes(key5))
|
232254
232254
|
return;
|
232255
232255
|
if (value4 !== undefined || keepUndefined)
|
232256
|
-
map3.items.push(Pair.createPair(
|
232256
|
+
map3.items.push(Pair.createPair(key5, value4, ctx));
|
232257
232257
|
};
|
232258
232258
|
if (obj instanceof Map) {
|
232259
|
-
for (const [
|
232260
|
-
add(
|
232259
|
+
for (const [key5, value4] of obj)
|
232260
|
+
add(key5, value4);
|
232261
232261
|
} else if (obj && typeof obj === "object") {
|
232262
|
-
for (const
|
232263
|
-
add(
|
232262
|
+
for (const key5 of Object.keys(obj))
|
232263
|
+
add(key5, obj[key5]);
|
232264
232264
|
}
|
232265
232265
|
if (typeof schema.sortMapEntries === "function") {
|
232266
232266
|
map3.items.sort(schema.sortMapEntries);
|
@@ -232294,23 +232294,23 @@ var require_YAMLMap = __commonJS((exports) => {
|
|
232294
232294
|
this.items.push(_pair);
|
232295
232295
|
}
|
232296
232296
|
}
|
232297
|
-
delete(
|
232298
|
-
const it2 = findPair(this.items,
|
232297
|
+
delete(key5) {
|
232298
|
+
const it2 = findPair(this.items, key5);
|
232299
232299
|
if (!it2)
|
232300
232300
|
return false;
|
232301
232301
|
const del = this.items.splice(this.items.indexOf(it2), 1);
|
232302
232302
|
return del.length > 0;
|
232303
232303
|
}
|
232304
|
-
get(
|
232305
|
-
const it2 = findPair(this.items,
|
232304
|
+
get(key5, keepScalar) {
|
232305
|
+
const it2 = findPair(this.items, key5);
|
232306
232306
|
const node = it2?.value;
|
232307
232307
|
return (!keepScalar && identity2.isScalar(node) ? node.value : node) ?? undefined;
|
232308
232308
|
}
|
232309
|
-
has(
|
232310
|
-
return !!findPair(this.items,
|
232309
|
+
has(key5) {
|
232310
|
+
return !!findPair(this.items, key5);
|
232311
232311
|
}
|
232312
|
-
set(
|
232313
|
-
this.add(new Pair.Pair(
|
232312
|
+
set(key5, value4) {
|
232313
|
+
this.add(new Pair.Pair(key5, value4), true);
|
232314
232314
|
}
|
232315
232315
|
toJSON(_6, ctx, Type) {
|
232316
232316
|
const map3 = Type ? new Type : ctx?.mapAsMap ? new Map : {};
|
@@ -232381,28 +232381,28 @@ var require_YAMLSeq = __commonJS((exports) => {
|
|
232381
232381
|
add(value4) {
|
232382
232382
|
this.items.push(value4);
|
232383
232383
|
}
|
232384
|
-
delete(
|
232385
|
-
const idx = asItemIndex(
|
232384
|
+
delete(key5) {
|
232385
|
+
const idx = asItemIndex(key5);
|
232386
232386
|
if (typeof idx !== "number")
|
232387
232387
|
return false;
|
232388
232388
|
const del = this.items.splice(idx, 1);
|
232389
232389
|
return del.length > 0;
|
232390
232390
|
}
|
232391
|
-
get(
|
232392
|
-
const idx = asItemIndex(
|
232391
|
+
get(key5, keepScalar) {
|
232392
|
+
const idx = asItemIndex(key5);
|
232393
232393
|
if (typeof idx !== "number")
|
232394
232394
|
return;
|
232395
232395
|
const it2 = this.items[idx];
|
232396
232396
|
return !keepScalar && identity2.isScalar(it2) ? it2.value : it2;
|
232397
232397
|
}
|
232398
|
-
has(
|
232399
|
-
const idx = asItemIndex(
|
232398
|
+
has(key5) {
|
232399
|
+
const idx = asItemIndex(key5);
|
232400
232400
|
return typeof idx === "number" && idx < this.items.length;
|
232401
232401
|
}
|
232402
|
-
set(
|
232403
|
-
const idx = asItemIndex(
|
232402
|
+
set(key5, value4) {
|
232403
|
+
const idx = asItemIndex(key5);
|
232404
232404
|
if (typeof idx !== "number")
|
232405
|
-
throw new Error(`Expected a valid index, not ${
|
232405
|
+
throw new Error(`Expected a valid index, not ${key5}.`);
|
232406
232406
|
const prev = this.items[idx];
|
232407
232407
|
if (identity2.isScalar(prev) && Scalar.isScalarValue(value4))
|
232408
232408
|
prev.value = value4;
|
@@ -232436,8 +232436,8 @@ var require_YAMLSeq = __commonJS((exports) => {
|
|
232436
232436
|
let i7 = 0;
|
232437
232437
|
for (let it2 of obj) {
|
232438
232438
|
if (typeof replacer === "function") {
|
232439
|
-
const
|
232440
|
-
it2 = replacer.call(obj,
|
232439
|
+
const key5 = obj instanceof Set ? it2 : String(i7++);
|
232440
|
+
it2 = replacer.call(obj, key5, it2);
|
232441
232441
|
}
|
232442
232442
|
seq.items.push(createNode.createNode(it2, undefined, ctx));
|
232443
232443
|
}
|
@@ -232445,8 +232445,8 @@ var require_YAMLSeq = __commonJS((exports) => {
|
|
232445
232445
|
return seq;
|
232446
232446
|
}
|
232447
232447
|
}
|
232448
|
-
function asItemIndex(
|
232449
|
-
let idx = identity2.isScalar(
|
232448
|
+
function asItemIndex(key5) {
|
232449
|
+
let idx = identity2.isScalar(key5) ? key5.value : key5;
|
232450
232450
|
if (idx && typeof idx === "string")
|
232451
232451
|
idx = Number(idx);
|
232452
232452
|
return typeof idx === "number" && Number.isInteger(idx) && idx >= 0 ? idx : null;
|
@@ -232820,25 +232820,25 @@ ${cn.comment}` : item.comment;
|
|
232820
232820
|
for (let it2 of iterable) {
|
232821
232821
|
if (typeof replacer === "function")
|
232822
232822
|
it2 = replacer.call(iterable, String(i7++), it2);
|
232823
|
-
let
|
232823
|
+
let key5, value4;
|
232824
232824
|
if (Array.isArray(it2)) {
|
232825
232825
|
if (it2.length === 2) {
|
232826
|
-
|
232826
|
+
key5 = it2[0];
|
232827
232827
|
value4 = it2[1];
|
232828
232828
|
} else
|
232829
232829
|
throw new TypeError(`Expected [key, value] tuple: ${it2}`);
|
232830
232830
|
} else if (it2 && it2 instanceof Object) {
|
232831
232831
|
const keys = Object.keys(it2);
|
232832
232832
|
if (keys.length === 1) {
|
232833
|
-
|
232834
|
-
value4 = it2[
|
232833
|
+
key5 = keys[0];
|
232834
|
+
value4 = it2[key5];
|
232835
232835
|
} else {
|
232836
232836
|
throw new TypeError(`Expected tuple with one key, not ${keys.length} keys`);
|
232837
232837
|
}
|
232838
232838
|
} else {
|
232839
|
-
|
232839
|
+
key5 = it2;
|
232840
232840
|
}
|
232841
|
-
pairs2.items.push(Pair.createPair(
|
232841
|
+
pairs2.items.push(Pair.createPair(key5, value4, ctx));
|
232842
232842
|
}
|
232843
232843
|
return pairs2;
|
232844
232844
|
}
|
@@ -232879,16 +232879,16 @@ var require_omap = __commonJS((exports) => {
|
|
232879
232879
|
if (ctx?.onCreate)
|
232880
232880
|
ctx.onCreate(map3);
|
232881
232881
|
for (const pair of this.items) {
|
232882
|
-
let
|
232882
|
+
let key5, value4;
|
232883
232883
|
if (identity2.isPair(pair)) {
|
232884
|
-
|
232885
|
-
value4 = toJS.toJS(pair.value,
|
232884
|
+
key5 = toJS.toJS(pair.key, "", ctx);
|
232885
|
+
value4 = toJS.toJS(pair.value, key5, ctx);
|
232886
232886
|
} else {
|
232887
|
-
|
232887
|
+
key5 = toJS.toJS(pair, "", ctx);
|
232888
232888
|
}
|
232889
|
-
if (map3.has(
|
232889
|
+
if (map3.has(key5))
|
232890
232890
|
throw new Error("Ordered maps must not include duplicate keys");
|
232891
|
-
map3.set(
|
232891
|
+
map3.set(key5, value4);
|
232892
232892
|
}
|
232893
232893
|
return map3;
|
232894
232894
|
}
|
@@ -232909,12 +232909,12 @@ var require_omap = __commonJS((exports) => {
|
|
232909
232909
|
resolve(seq, onError) {
|
232910
232910
|
const pairs$1 = pairs.resolvePairs(seq, onError);
|
232911
232911
|
const seenKeys = [];
|
232912
|
-
for (const { key:
|
232913
|
-
if (identity2.isScalar(
|
232914
|
-
if (seenKeys.includes(
|
232915
|
-
onError(`Ordered maps must not include duplicate keys: ${
|
232912
|
+
for (const { key: key5 } of pairs$1.items) {
|
232913
|
+
if (identity2.isScalar(key5)) {
|
232914
|
+
if (seenKeys.includes(key5.value)) {
|
232915
|
+
onError(`Ordered maps must not include duplicate keys: ${key5.value}`);
|
232916
232916
|
} else {
|
232917
|
-
seenKeys.push(
|
232917
|
+
seenKeys.push(key5.value);
|
232918
232918
|
}
|
232919
232919
|
}
|
232920
232920
|
}
|
@@ -233088,30 +233088,30 @@ var require_set = __commonJS((exports) => {
|
|
233088
233088
|
super(schema);
|
233089
233089
|
this.tag = YAMLSet.tag;
|
233090
233090
|
}
|
233091
|
-
add(
|
233091
|
+
add(key5) {
|
233092
233092
|
let pair;
|
233093
|
-
if (identity2.isPair(
|
233094
|
-
pair =
|
233095
|
-
else if (
|
233096
|
-
pair = new Pair.Pair(
|
233093
|
+
if (identity2.isPair(key5))
|
233094
|
+
pair = key5;
|
233095
|
+
else if (key5 && typeof key5 === "object" && "key" in key5 && "value" in key5 && key5.value === null)
|
233096
|
+
pair = new Pair.Pair(key5.key, null);
|
233097
233097
|
else
|
233098
|
-
pair = new Pair.Pair(
|
233098
|
+
pair = new Pair.Pair(key5, null);
|
233099
233099
|
const prev = YAMLMap.findPair(this.items, pair.key);
|
233100
233100
|
if (!prev)
|
233101
233101
|
this.items.push(pair);
|
233102
233102
|
}
|
233103
|
-
get(
|
233104
|
-
const pair = YAMLMap.findPair(this.items,
|
233103
|
+
get(key5, keepPair) {
|
233104
|
+
const pair = YAMLMap.findPair(this.items, key5);
|
233105
233105
|
return !keepPair && identity2.isPair(pair) ? identity2.isScalar(pair.key) ? pair.key.value : pair.key : pair;
|
233106
233106
|
}
|
233107
|
-
set(
|
233107
|
+
set(key5, value4) {
|
233108
233108
|
if (typeof value4 !== "boolean")
|
233109
233109
|
throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof value4}`);
|
233110
|
-
const prev = YAMLMap.findPair(this.items,
|
233110
|
+
const prev = YAMLMap.findPair(this.items, key5);
|
233111
233111
|
if (prev && !value4) {
|
233112
233112
|
this.items.splice(this.items.indexOf(prev), 1);
|
233113
233113
|
} else if (!prev && value4) {
|
233114
|
-
this.items.push(new Pair.Pair(
|
233114
|
+
this.items.push(new Pair.Pair(key5));
|
233115
233115
|
}
|
233116
233116
|
}
|
233117
233117
|
toJSON(_6, ctx) {
|
@@ -233346,7 +233346,7 @@ var require_tags = __commonJS((exports) => {
|
|
233346
233346
|
if (Array.isArray(customTags))
|
233347
233347
|
tags = [];
|
233348
233348
|
else {
|
233349
|
-
const keys = Array.from(schemas.keys()).filter((
|
233349
|
+
const keys = Array.from(schemas.keys()).filter((key5) => key5 !== "yaml11").map((key5) => JSON.stringify(key5)).join(", ");
|
233350
233350
|
throw new Error(`Unknown schema "${schemaName}"; use one of ${keys} or define customTags array`);
|
233351
233351
|
}
|
233352
233352
|
}
|
@@ -233362,7 +233362,7 @@ var require_tags = __commonJS((exports) => {
|
|
233362
233362
|
const tagObj = typeof tag === "string" ? tagsByName[tag] : tag;
|
233363
233363
|
if (!tagObj) {
|
233364
233364
|
const tagName = JSON.stringify(tag);
|
233365
|
-
const keys = Object.keys(tagsByName).map((
|
233365
|
+
const keys = Object.keys(tagsByName).map((key5) => JSON.stringify(key5)).join(", ");
|
233366
233366
|
throw new Error(`Unknown custom tag ${tagName}; use one of ${keys}`);
|
233367
233367
|
}
|
233368
233368
|
if (!tags2.includes(tagObj))
|
@@ -233597,13 +233597,13 @@ var require_Document = __commonJS((exports) => {
|
|
233597
233597
|
setAnchors();
|
233598
233598
|
return node;
|
233599
233599
|
}
|
233600
|
-
createPair(
|
233601
|
-
const k6 = this.createNode(
|
233600
|
+
createPair(key5, value4, options = {}) {
|
233601
|
+
const k6 = this.createNode(key5, null, options);
|
233602
233602
|
const v7 = this.createNode(value4, null, options);
|
233603
233603
|
return new Pair.Pair(k6, v7);
|
233604
233604
|
}
|
233605
|
-
delete(
|
233606
|
-
return assertCollection(this.contents) ? this.contents.delete(
|
233605
|
+
delete(key5) {
|
233606
|
+
return assertCollection(this.contents) ? this.contents.delete(key5) : false;
|
233607
233607
|
}
|
233608
233608
|
deleteIn(path6) {
|
233609
233609
|
if (Collection.isEmptyPath(path6)) {
|
@@ -233614,27 +233614,27 @@ var require_Document = __commonJS((exports) => {
|
|
233614
233614
|
}
|
233615
233615
|
return assertCollection(this.contents) ? this.contents.deleteIn(path6) : false;
|
233616
233616
|
}
|
233617
|
-
get(
|
233618
|
-
return identity2.isCollection(this.contents) ? this.contents.get(
|
233617
|
+
get(key5, keepScalar) {
|
233618
|
+
return identity2.isCollection(this.contents) ? this.contents.get(key5, keepScalar) : undefined;
|
233619
233619
|
}
|
233620
233620
|
getIn(path6, keepScalar) {
|
233621
233621
|
if (Collection.isEmptyPath(path6))
|
233622
233622
|
return !keepScalar && identity2.isScalar(this.contents) ? this.contents.value : this.contents;
|
233623
233623
|
return identity2.isCollection(this.contents) ? this.contents.getIn(path6, keepScalar) : undefined;
|
233624
233624
|
}
|
233625
|
-
has(
|
233626
|
-
return identity2.isCollection(this.contents) ? this.contents.has(
|
233625
|
+
has(key5) {
|
233626
|
+
return identity2.isCollection(this.contents) ? this.contents.has(key5) : false;
|
233627
233627
|
}
|
233628
233628
|
hasIn(path6) {
|
233629
233629
|
if (Collection.isEmptyPath(path6))
|
233630
233630
|
return this.contents !== undefined;
|
233631
233631
|
return identity2.isCollection(this.contents) ? this.contents.hasIn(path6) : false;
|
233632
233632
|
}
|
233633
|
-
set(
|
233633
|
+
set(key5, value4) {
|
233634
233634
|
if (this.contents == null) {
|
233635
|
-
this.contents = Collection.collectionFromPath(this.schema, [
|
233635
|
+
this.contents = Collection.collectionFromPath(this.schema, [key5], value4);
|
233636
233636
|
} else if (assertCollection(this.contents)) {
|
233637
|
-
this.contents.set(
|
233637
|
+
this.contents.set(key5, value4);
|
233638
233638
|
}
|
233639
233639
|
}
|
233640
233640
|
setIn(path6, value4) {
|
@@ -233918,25 +233918,25 @@ var require_resolve_props = __commonJS((exports) => {
|
|
233918
233918
|
|
233919
233919
|
// ../../node_modules/yaml/dist/compose/util-contains-newline.js
|
233920
233920
|
var require_util_contains_newline = __commonJS((exports) => {
|
233921
|
-
function containsNewline(
|
233922
|
-
if (!
|
233921
|
+
function containsNewline(key5) {
|
233922
|
+
if (!key5)
|
233923
233923
|
return null;
|
233924
|
-
switch (
|
233924
|
+
switch (key5.type) {
|
233925
233925
|
case "alias":
|
233926
233926
|
case "scalar":
|
233927
233927
|
case "double-quoted-scalar":
|
233928
233928
|
case "single-quoted-scalar":
|
233929
|
-
if (
|
233929
|
+
if (key5.source.includes(`
|
233930
233930
|
`))
|
233931
233931
|
return true;
|
233932
|
-
if (
|
233933
|
-
for (const st2 of
|
233932
|
+
if (key5.end) {
|
233933
|
+
for (const st2 of key5.end)
|
233934
233934
|
if (st2.type === "newline")
|
233935
233935
|
return true;
|
233936
233936
|
}
|
233937
233937
|
return false;
|
233938
233938
|
case "flow-collection":
|
233939
|
-
for (const it2 of
|
233939
|
+
for (const it2 of key5.items) {
|
233940
233940
|
for (const st2 of it2.start)
|
233941
233941
|
if (st2.type === "newline")
|
233942
233942
|
return true;
|
@@ -234001,10 +234001,10 @@ var require_resolve_block_map = __commonJS((exports) => {
|
|
234001
234001
|
let offset = bm.offset;
|
234002
234002
|
let commentEnd = null;
|
234003
234003
|
for (const collItem of bm.items) {
|
234004
|
-
const { start: start3, key:
|
234004
|
+
const { start: start3, key: key5, sep: sep3, value: value4 } = collItem;
|
234005
234005
|
const keyProps = resolveProps.resolveProps(start3, {
|
234006
234006
|
indicator: "explicit-key-ind",
|
234007
|
-
next:
|
234007
|
+
next: key5 ?? sep3?.[0],
|
234008
234008
|
offset,
|
234009
234009
|
onError,
|
234010
234010
|
parentIndent: bm.indent,
|
@@ -234012,10 +234012,10 @@ var require_resolve_block_map = __commonJS((exports) => {
|
|
234012
234012
|
});
|
234013
234013
|
const implicitKey = !keyProps.found;
|
234014
234014
|
if (implicitKey) {
|
234015
|
-
if (
|
234016
|
-
if (
|
234015
|
+
if (key5) {
|
234016
|
+
if (key5.type === "block-seq")
|
234017
234017
|
onError(offset, "BLOCK_AS_IMPLICIT_KEY", "A block sequence may not be used as an implicit map key");
|
234018
|
-
else if ("indent" in
|
234018
|
+
else if ("indent" in key5 && key5.indent !== bm.indent)
|
234019
234019
|
onError(offset, "BAD_INDENT", startColMsg);
|
234020
234020
|
}
|
234021
234021
|
if (!keyProps.anchor && !keyProps.tag && !sep3) {
|
@@ -234029,17 +234029,17 @@ var require_resolve_block_map = __commonJS((exports) => {
|
|
234029
234029
|
}
|
234030
234030
|
continue;
|
234031
234031
|
}
|
234032
|
-
if (keyProps.newlineAfterProp || utilContainsNewline.containsNewline(
|
234033
|
-
onError(
|
234032
|
+
if (keyProps.newlineAfterProp || utilContainsNewline.containsNewline(key5)) {
|
234033
|
+
onError(key5 ?? start3[start3.length - 1], "MULTILINE_IMPLICIT_KEY", "Implicit keys need to be on a single line");
|
234034
234034
|
}
|
234035
234035
|
} else if (keyProps.found?.indent !== bm.indent) {
|
234036
234036
|
onError(offset, "BAD_INDENT", startColMsg);
|
234037
234037
|
}
|
234038
234038
|
ctx.atKey = true;
|
234039
234039
|
const keyStart = keyProps.end;
|
234040
|
-
const keyNode =
|
234040
|
+
const keyNode = key5 ? composeNode(ctx, key5, keyProps, onError) : composeEmptyNode(ctx, keyStart, start3, null, keyProps, onError);
|
234041
234041
|
if (ctx.schema.compat)
|
234042
|
-
utilFlowIndentCheck.flowIndentCheck(bm.indent,
|
234042
|
+
utilFlowIndentCheck.flowIndentCheck(bm.indent, key5, onError);
|
234043
234043
|
ctx.atKey = false;
|
234044
234044
|
if (utilMapIncludes.mapIncludes(ctx, map3.items, keyNode))
|
234045
234045
|
onError(keyStart, "DUPLICATE_KEY", "Map keys must be unique");
|
@@ -234049,7 +234049,7 @@ var require_resolve_block_map = __commonJS((exports) => {
|
|
234049
234049
|
offset: keyNode.range[2],
|
234050
234050
|
onError,
|
234051
234051
|
parentIndent: bm.indent,
|
234052
|
-
startOnNewline: !
|
234052
|
+
startOnNewline: !key5 || key5.type === "block-scalar"
|
234053
234053
|
});
|
234054
234054
|
offset = valueProps.end;
|
234055
234055
|
if (valueProps.found) {
|
@@ -234205,11 +234205,11 @@ var require_resolve_flow_collection = __commonJS((exports) => {
|
|
234205
234205
|
let offset = fc.offset + fc.start.source.length;
|
234206
234206
|
for (let i7 = 0;i7 < fc.items.length; ++i7) {
|
234207
234207
|
const collItem = fc.items[i7];
|
234208
|
-
const { start: start3, key:
|
234208
|
+
const { start: start3, key: key5, sep: sep3, value: value4 } = collItem;
|
234209
234209
|
const props = resolveProps.resolveProps(start3, {
|
234210
234210
|
flow: fcName,
|
234211
234211
|
indicator: "explicit-key-ind",
|
234212
|
-
next:
|
234212
|
+
next: key5 ?? sep3?.[0],
|
234213
234213
|
offset,
|
234214
234214
|
onError,
|
234215
234215
|
parentIndent: fc.indent,
|
@@ -234231,8 +234231,8 @@ var require_resolve_flow_collection = __commonJS((exports) => {
|
|
234231
234231
|
offset = props.end;
|
234232
234232
|
continue;
|
234233
234233
|
}
|
234234
|
-
if (!isMap && ctx.options.strict && utilContainsNewline.containsNewline(
|
234235
|
-
onError(
|
234234
|
+
if (!isMap && ctx.options.strict && utilContainsNewline.containsNewline(key5))
|
234235
|
+
onError(key5, "MULTILINE_IMPLICIT_KEY", "Implicit keys of flow sequence pairs need to be on a single line");
|
234236
234236
|
}
|
234237
234237
|
if (i7 === 0) {
|
234238
234238
|
if (props.comma)
|
@@ -234277,8 +234277,8 @@ var require_resolve_flow_collection = __commonJS((exports) => {
|
|
234277
234277
|
} else {
|
234278
234278
|
ctx.atKey = true;
|
234279
234279
|
const keyStart = props.end;
|
234280
|
-
const keyNode =
|
234281
|
-
if (isBlock(
|
234280
|
+
const keyNode = key5 ? composeNode(ctx, key5, props, onError) : composeEmptyNode(ctx, keyStart, start3, null, props, onError);
|
234281
|
+
if (isBlock(key5))
|
234282
234282
|
onError(keyNode.range, "BLOCK_IN_FLOW", blockMsg);
|
234283
234283
|
ctx.atKey = false;
|
234284
234284
|
const valueProps = resolveProps.resolveProps(sep3 ?? [], {
|
@@ -235090,7 +235090,7 @@ var require_composer = __commonJS((exports) => {
|
|
235090
235090
|
var node_process = __require("node:process");
|
235091
235091
|
var directives4 = require_directives2();
|
235092
235092
|
var Document = require_Document();
|
235093
|
-
var
|
235093
|
+
var errors5 = require_errors3();
|
235094
235094
|
var identity2 = require_identity();
|
235095
235095
|
var composeDoc = require_compose_doc();
|
235096
235096
|
var resolveEnd = require_resolve_end();
|
@@ -235141,9 +235141,9 @@ var require_composer = __commonJS((exports) => {
|
|
235141
235141
|
this.onError = (source, code2, message, warning) => {
|
235142
235142
|
const pos = getErrorPos(source);
|
235143
235143
|
if (warning)
|
235144
|
-
this.warnings.push(new
|
235144
|
+
this.warnings.push(new errors5.YAMLWarning(pos, code2, message));
|
235145
235145
|
else
|
235146
|
-
this.errors.push(new
|
235146
|
+
this.errors.push(new errors5.YAMLParseError(pos, code2, message));
|
235147
235147
|
};
|
235148
235148
|
this.directives = new directives4.Directives({ version: options.version || "1.2" });
|
235149
235149
|
this.options = options;
|
@@ -235227,7 +235227,7 @@ ${cb}` : comment;
|
|
235227
235227
|
break;
|
235228
235228
|
case "error": {
|
235229
235229
|
const msg = token.source ? `${token.message}: ${JSON.stringify(token.source)}` : token.message;
|
235230
|
-
const error5 = new
|
235230
|
+
const error5 = new errors5.YAMLParseError(getErrorPos(token), "UNEXPECTED_TOKEN", msg);
|
235231
235231
|
if (this.atDirectives || !this.doc)
|
235232
235232
|
this.errors.push(error5);
|
235233
235233
|
else
|
@@ -235237,7 +235237,7 @@ ${cb}` : comment;
|
|
235237
235237
|
case "doc-end": {
|
235238
235238
|
if (!this.doc) {
|
235239
235239
|
const msg = "Unexpected doc-end without preceding document";
|
235240
|
-
this.errors.push(new
|
235240
|
+
this.errors.push(new errors5.YAMLParseError(getErrorPos(token), "UNEXPECTED_TOKEN", msg));
|
235241
235241
|
break;
|
235242
235242
|
}
|
235243
235243
|
this.doc.directives.docEnd = true;
|
@@ -235252,7 +235252,7 @@ ${end.comment}` : end.comment;
|
|
235252
235252
|
break;
|
235253
235253
|
}
|
235254
235254
|
default:
|
235255
|
-
this.errors.push(new
|
235255
|
+
this.errors.push(new errors5.YAMLParseError(getErrorPos(token), "UNEXPECTED_TOKEN", `Unsupported token ${token.type}`));
|
235256
235256
|
}
|
235257
235257
|
}
|
235258
235258
|
*end(forceDoc = false, endOffset = -1) {
|
@@ -235278,7 +235278,7 @@ ${end.comment}` : end.comment;
|
|
235278
235278
|
var require_cst_scalar = __commonJS((exports) => {
|
235279
235279
|
var resolveBlockScalar = require_resolve_block_scalar();
|
235280
235280
|
var resolveFlowScalar = require_resolve_flow_scalar();
|
235281
|
-
var
|
235281
|
+
var errors5 = require_errors3();
|
235282
235282
|
var stringifyString = require_stringifyString();
|
235283
235283
|
function resolveAsScalar(token, strict = true, onError) {
|
235284
235284
|
if (token) {
|
@@ -235287,7 +235287,7 @@ var require_cst_scalar = __commonJS((exports) => {
|
|
235287
235287
|
if (onError)
|
235288
235288
|
onError(offset, code2, message);
|
235289
235289
|
else
|
235290
|
-
throw new
|
235290
|
+
throw new errors5.YAMLParseError([offset, offset + 1], code2, message);
|
235291
235291
|
};
|
235292
235292
|
switch (token.type) {
|
235293
235293
|
case "scalar":
|
@@ -235401,9 +235401,9 @@ var require_cst_scalar = __commonJS((exports) => {
|
|
235401
235401
|
if (!addEndtoBlockProps(props, "end" in token ? token.end : undefined))
|
235402
235402
|
props.push({ type: "newline", offset: -1, indent: indent2, source: `
|
235403
235403
|
` });
|
235404
|
-
for (const
|
235405
|
-
if (
|
235406
|
-
delete token[
|
235404
|
+
for (const key5 of Object.keys(token))
|
235405
|
+
if (key5 !== "type" && key5 !== "offset")
|
235406
|
+
delete token[key5];
|
235407
235407
|
Object.assign(token, { type: "block-scalar", indent: indent2, props, source: body });
|
235408
235408
|
}
|
235409
235409
|
}
|
@@ -235452,9 +235452,9 @@ var require_cst_scalar = __commonJS((exports) => {
|
|
235452
235452
|
default: {
|
235453
235453
|
const indent2 = "indent" in token ? token.indent : -1;
|
235454
235454
|
const end = "end" in token && Array.isArray(token.end) ? token.end.filter((st2) => st2.type === "space" || st2.type === "comment" || st2.type === "newline") : [];
|
235455
|
-
for (const
|
235456
|
-
if (
|
235457
|
-
delete token[
|
235455
|
+
for (const key5 of Object.keys(token))
|
235456
|
+
if (key5 !== "type" && key5 !== "offset")
|
235457
|
+
delete token[key5];
|
235458
235458
|
Object.assign(token, { type: type4, indent: indent2, source, end });
|
235459
235459
|
}
|
235460
235460
|
}
|
@@ -235506,12 +235506,12 @@ var require_cst_stringify = __commonJS((exports) => {
|
|
235506
235506
|
}
|
235507
235507
|
}
|
235508
235508
|
}
|
235509
|
-
function stringifyItem({ start: start3, key:
|
235509
|
+
function stringifyItem({ start: start3, key: key5, sep: sep3, value: value4 }) {
|
235510
235510
|
let res = "";
|
235511
235511
|
for (const st2 of start3)
|
235512
235512
|
res += st2.source;
|
235513
|
-
if (
|
235514
|
-
res += stringifyToken(
|
235513
|
+
if (key5)
|
235514
|
+
res += stringifyToken(key5);
|
235515
235515
|
if (sep3)
|
235516
235516
|
for (const st2 of sep3)
|
235517
235517
|
res += st2.source;
|
@@ -236807,7 +236807,7 @@ var require_parser2 = __commonJS((exports) => {
|
|
236807
236807
|
});
|
236808
236808
|
} else if (isFlowToken(it2.key) && !includesToken(it2.sep, "newline")) {
|
236809
236809
|
const start4 = getFirstKeyStartProps(it2.start);
|
236810
|
-
const
|
236810
|
+
const key5 = it2.key;
|
236811
236811
|
const sep3 = it2.sep;
|
236812
236812
|
sep3.push(this.sourceToken);
|
236813
236813
|
delete it2.key;
|
@@ -236816,7 +236816,7 @@ var require_parser2 = __commonJS((exports) => {
|
|
236816
236816
|
type: "block-map",
|
236817
236817
|
offset: this.offset,
|
236818
236818
|
indent: this.indent,
|
236819
|
-
items: [{ start: start4, key:
|
236819
|
+
items: [{ start: start4, key: key5, sep: sep3 }]
|
236820
236820
|
});
|
236821
236821
|
} else if (start3.length > 0) {
|
236822
236822
|
it2.sep = it2.sep.concat(start3, this.sourceToken);
|
@@ -237149,7 +237149,7 @@ var require_parser2 = __commonJS((exports) => {
|
|
237149
237149
|
var require_public_api = __commonJS((exports) => {
|
237150
237150
|
var composer = require_composer();
|
237151
237151
|
var Document = require_Document();
|
237152
|
-
var
|
237152
|
+
var errors5 = require_errors3();
|
237153
237153
|
var log = require_log();
|
237154
237154
|
var identity2 = require_identity();
|
237155
237155
|
var lineCounter = require_line_counter();
|
@@ -237166,8 +237166,8 @@ var require_public_api = __commonJS((exports) => {
|
|
237166
237166
|
const docs = Array.from(composer$1.compose(parser$1.parse(source)));
|
237167
237167
|
if (prettyErrors && lineCounter2)
|
237168
237168
|
for (const doc of docs) {
|
237169
|
-
doc.errors.forEach(
|
237170
|
-
doc.warnings.forEach(
|
237169
|
+
doc.errors.forEach(errors5.prettifyError(source, lineCounter2));
|
237170
|
+
doc.warnings.forEach(errors5.prettifyError(source, lineCounter2));
|
237171
237171
|
}
|
237172
237172
|
if (docs.length > 0)
|
237173
237173
|
return docs;
|
@@ -237182,13 +237182,13 @@ var require_public_api = __commonJS((exports) => {
|
|
237182
237182
|
if (!doc)
|
237183
237183
|
doc = _doc;
|
237184
237184
|
else if (doc.options.logLevel !== "silent") {
|
237185
|
-
doc.errors.push(new
|
237185
|
+
doc.errors.push(new errors5.YAMLParseError(_doc.range.slice(0, 2), "MULTIPLE_DOCS", "Source contains multiple documents; please use YAML.parseAllDocuments()"));
|
237186
237186
|
break;
|
237187
237187
|
}
|
237188
237188
|
}
|
237189
237189
|
if (prettyErrors && lineCounter2) {
|
237190
|
-
doc.errors.forEach(
|
237191
|
-
doc.warnings.forEach(
|
237190
|
+
doc.errors.forEach(errors5.prettifyError(source, lineCounter2));
|
237191
|
+
doc.warnings.forEach(errors5.prettifyError(source, lineCounter2));
|
237192
237192
|
}
|
237193
237193
|
return doc;
|
237194
237194
|
}
|
@@ -247575,7 +247575,7 @@ function pruneCurrentEnv(currentEnv, env2) {
|
|
247575
247575
|
var package_default = {
|
247576
247576
|
name: "@settlemint/sdk-cli",
|
247577
247577
|
description: "Command-line interface for SettleMint SDK, providing development tools and project management capabilities",
|
247578
|
-
version: "2.2.3-
|
247578
|
+
version: "2.2.3-prb9a00194",
|
247579
247579
|
type: "module",
|
247580
247580
|
private: false,
|
247581
247581
|
license: "FSL-1.1-MIT",
|
@@ -247621,12 +247621,12 @@ var package_default = {
|
|
247621
247621
|
"@commander-js/extra-typings": "11.1.0",
|
247622
247622
|
commander: "11.1.0",
|
247623
247623
|
"@inquirer/confirm": "5.1.9",
|
247624
|
-
"@inquirer/input": "4.1.
|
247625
|
-
"@inquirer/password": "4.0.
|
247626
|
-
"@inquirer/select": "4.2.
|
247627
|
-
"@settlemint/sdk-js": "2.2.3-
|
247628
|
-
"@settlemint/sdk-utils": "2.2.3-
|
247629
|
-
"@types/node": "22.15.
|
247624
|
+
"@inquirer/input": "4.1.10",
|
247625
|
+
"@inquirer/password": "4.0.13",
|
247626
|
+
"@inquirer/select": "4.2.1",
|
247627
|
+
"@settlemint/sdk-js": "2.2.3-prb9a00194",
|
247628
|
+
"@settlemint/sdk-utils": "2.2.3-prb9a00194",
|
247629
|
+
"@types/node": "22.15.17",
|
247630
247630
|
"@types/semver": "7.7.0",
|
247631
247631
|
"@types/which": "3.0.4",
|
247632
247632
|
"get-tsconfig": "4.10.0",
|
@@ -247639,7 +247639,7 @@ var package_default = {
|
|
247639
247639
|
yoctocolors: "2.1.1"
|
247640
247640
|
},
|
247641
247641
|
peerDependencies: {
|
247642
|
-
hardhat: "2.
|
247642
|
+
hardhat: "2.24.0"
|
247643
247643
|
},
|
247644
247644
|
peerDependenciesMeta: {
|
247645
247645
|
hardhat: {
|
@@ -247714,10 +247714,6 @@ var {
|
|
247714
247714
|
} = import__.default;
|
247715
247715
|
|
247716
247716
|
// ../../node_modules/@inquirer/core/dist/esm/lib/key.js
|
247717
|
-
var isUpKey = (key) => key.name === "up" || key.name === "k" || key.ctrl && key.name === "p";
|
247718
|
-
var isDownKey = (key) => key.name === "down" || key.name === "j" || key.ctrl && key.name === "n";
|
247719
|
-
var isBackspaceKey = (key) => key.name === "backspace";
|
247720
|
-
var isNumberKey = (key) => "1234567890".includes(key.name);
|
247721
247717
|
var isEnterKey = (key) => key.name === "enter" || key.name === "return";
|
247722
247718
|
// ../../node_modules/@inquirer/core/dist/esm/lib/errors.js
|
247723
247719
|
class AbortPromptError extends Error {
|
@@ -248251,22 +248247,11 @@ function usePrefix({ status = "idle", theme }) {
|
|
248251
248247
|
const iconName = status === "loading" ? "idle" : status;
|
248252
248248
|
return typeof prefix === "string" ? prefix : prefix[iconName] ?? prefix["idle"];
|
248253
248249
|
}
|
248254
|
-
// ../../node_modules/@inquirer/core/dist/esm/lib/use-memo.js
|
248255
|
-
function useMemo(fn, dependencies) {
|
248256
|
-
return withPointer((pointer) => {
|
248257
|
-
const prev = pointer.get();
|
248258
|
-
if (!prev || prev.dependencies.length !== dependencies.length || prev.dependencies.some((dep, i) => dep !== dependencies[i])) {
|
248259
|
-
const value = fn();
|
248260
|
-
pointer.set({ value, dependencies });
|
248261
|
-
return value;
|
248262
|
-
}
|
248263
|
-
return prev.value;
|
248264
|
-
});
|
248265
|
-
}
|
248266
248250
|
// ../../node_modules/@inquirer/core/dist/esm/lib/use-ref.js
|
248267
248251
|
function useRef(val) {
|
248268
248252
|
return useState({ current: val })[0];
|
248269
248253
|
}
|
248254
|
+
|
248270
248255
|
// ../../node_modules/@inquirer/core/dist/esm/lib/use-keypress.js
|
248271
248256
|
function useKeypress(userHandler) {
|
248272
248257
|
const signal = useRef(userHandler);
|
@@ -248298,95 +248283,6 @@ function readlineWidth() {
|
|
248298
248283
|
return import_cli_width.default({ defaultWidth: 80, output: readline().output });
|
248299
248284
|
}
|
248300
248285
|
|
248301
|
-
// ../../node_modules/@inquirer/core/dist/esm/lib/pagination/lines.js
|
248302
|
-
function split(content, width) {
|
248303
|
-
return breakLines(content, width).split(`
|
248304
|
-
`);
|
248305
|
-
}
|
248306
|
-
function rotate(count, items) {
|
248307
|
-
const max = items.length;
|
248308
|
-
const offset = (count % max + max) % max;
|
248309
|
-
return [...items.slice(offset), ...items.slice(0, offset)];
|
248310
|
-
}
|
248311
|
-
function lines({ items, width, renderItem, active, position: requested, pageSize }) {
|
248312
|
-
const layouts = items.map((item, index) => ({
|
248313
|
-
item,
|
248314
|
-
index,
|
248315
|
-
isActive: index === active
|
248316
|
-
}));
|
248317
|
-
const layoutsInPage = rotate(active - requested, layouts).slice(0, pageSize);
|
248318
|
-
const renderItemAt = (index) => layoutsInPage[index] == null ? [] : split(renderItem(layoutsInPage[index]), width);
|
248319
|
-
const pageBuffer = Array.from({ length: pageSize });
|
248320
|
-
const activeItem = renderItemAt(requested).slice(0, pageSize);
|
248321
|
-
const position = requested + activeItem.length <= pageSize ? requested : pageSize - activeItem.length;
|
248322
|
-
pageBuffer.splice(position, activeItem.length, ...activeItem);
|
248323
|
-
let bufferPointer = position + activeItem.length;
|
248324
|
-
let layoutPointer = requested + 1;
|
248325
|
-
while (bufferPointer < pageSize && layoutPointer < layoutsInPage.length) {
|
248326
|
-
for (const line of renderItemAt(layoutPointer)) {
|
248327
|
-
pageBuffer[bufferPointer++] = line;
|
248328
|
-
if (bufferPointer >= pageSize)
|
248329
|
-
break;
|
248330
|
-
}
|
248331
|
-
layoutPointer++;
|
248332
|
-
}
|
248333
|
-
bufferPointer = position - 1;
|
248334
|
-
layoutPointer = requested - 1;
|
248335
|
-
while (bufferPointer >= 0 && layoutPointer >= 0) {
|
248336
|
-
for (const line of renderItemAt(layoutPointer).reverse()) {
|
248337
|
-
pageBuffer[bufferPointer--] = line;
|
248338
|
-
if (bufferPointer < 0)
|
248339
|
-
break;
|
248340
|
-
}
|
248341
|
-
layoutPointer--;
|
248342
|
-
}
|
248343
|
-
return pageBuffer.filter((line) => typeof line === "string");
|
248344
|
-
}
|
248345
|
-
|
248346
|
-
// ../../node_modules/@inquirer/core/dist/esm/lib/pagination/position.js
|
248347
|
-
function finite({ active, pageSize, total }) {
|
248348
|
-
const middle = Math.floor(pageSize / 2);
|
248349
|
-
if (total <= pageSize || active < middle)
|
248350
|
-
return active;
|
248351
|
-
if (active >= total - middle)
|
248352
|
-
return active + pageSize - total;
|
248353
|
-
return middle;
|
248354
|
-
}
|
248355
|
-
function infinite({ active, lastActive, total, pageSize, pointer }) {
|
248356
|
-
if (total <= pageSize)
|
248357
|
-
return active;
|
248358
|
-
if (lastActive < active && active - lastActive < pageSize) {
|
248359
|
-
return Math.min(Math.floor(pageSize / 2), pointer + active - lastActive);
|
248360
|
-
}
|
248361
|
-
return pointer;
|
248362
|
-
}
|
248363
|
-
|
248364
|
-
// ../../node_modules/@inquirer/core/dist/esm/lib/pagination/use-pagination.js
|
248365
|
-
function usePagination({ items, active, renderItem, pageSize, loop = true }) {
|
248366
|
-
const state = useRef({ position: 0, lastActive: 0 });
|
248367
|
-
const position = loop ? infinite({
|
248368
|
-
active,
|
248369
|
-
lastActive: state.current.lastActive,
|
248370
|
-
total: items.length,
|
248371
|
-
pageSize,
|
248372
|
-
pointer: state.current.position
|
248373
|
-
}) : finite({
|
248374
|
-
active,
|
248375
|
-
total: items.length,
|
248376
|
-
pageSize
|
248377
|
-
});
|
248378
|
-
state.current.position = position;
|
248379
|
-
state.current.lastActive = active;
|
248380
|
-
return lines({
|
248381
|
-
items,
|
248382
|
-
width: readlineWidth(),
|
248383
|
-
renderItem,
|
248384
|
-
active,
|
248385
|
-
position,
|
248386
|
-
pageSize
|
248387
|
-
}).join(`
|
248388
|
-
`);
|
248389
|
-
}
|
248390
248286
|
// ../../node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
|
248391
248287
|
var import_mute_stream = __toESM(require_lib(), 1);
|
248392
248288
|
import * as readline2 from "node:readline";
|
@@ -248766,20 +248662,6 @@ function createPrompt(view) {
|
|
248766
248662
|
};
|
248767
248663
|
return prompt;
|
248768
248664
|
}
|
248769
|
-
// ../../node_modules/@inquirer/core/dist/esm/lib/Separator.js
|
248770
|
-
var import_yoctocolors_cjs2 = __toESM(require_yoctocolors_cjs(), 1);
|
248771
|
-
class Separator {
|
248772
|
-
separator = import_yoctocolors_cjs2.default.dim(Array.from({ length: 15 }).join(esm_default.line));
|
248773
|
-
type = "separator";
|
248774
|
-
constructor(separator) {
|
248775
|
-
if (separator) {
|
248776
|
-
this.separator = separator;
|
248777
|
-
}
|
248778
|
-
}
|
248779
|
-
static isSeparator(choice) {
|
248780
|
-
return Boolean(choice && typeof choice === "object" && "type" in choice && choice.type === "separator");
|
248781
|
-
}
|
248782
|
-
}
|
248783
248665
|
// ../utils/dist/terminal.mjs
|
248784
248666
|
import { spawn } from "node:child_process";
|
248785
248667
|
var import_console_table_printer2 = __toESM(require_dist2(), 1);
|
@@ -253914,23 +253796,480 @@ function sanitizeName(value4, length = 35) {
|
|
253914
253796
|
}).slice(0, length).replaceAll(/(^\d*)/g, "").replaceAll(/(-$)/g, "").replaceAll(/(^-)/g, "");
|
253915
253797
|
}
|
253916
253798
|
|
253799
|
+
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/key.js
|
253800
|
+
var isBackspaceKey = (key2) => key2.name === "backspace";
|
253801
|
+
var isEnterKey2 = (key2) => key2.name === "enter" || key2.name === "return";
|
253802
|
+
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/errors.js
|
253803
|
+
class AbortPromptError2 extends Error {
|
253804
|
+
name = "AbortPromptError";
|
253805
|
+
message = "Prompt was aborted";
|
253806
|
+
constructor(options) {
|
253807
|
+
super();
|
253808
|
+
this.cause = options?.cause;
|
253809
|
+
}
|
253810
|
+
}
|
253811
|
+
|
253812
|
+
class CancelPromptError2 extends Error {
|
253813
|
+
name = "CancelPromptError";
|
253814
|
+
message = "Prompt was canceled";
|
253815
|
+
}
|
253816
|
+
|
253817
|
+
class ExitPromptError2 extends Error {
|
253818
|
+
name = "ExitPromptError";
|
253819
|
+
}
|
253820
|
+
|
253821
|
+
class HookError2 extends Error {
|
253822
|
+
name = "HookError";
|
253823
|
+
}
|
253824
|
+
|
253825
|
+
class ValidationError2 extends Error {
|
253826
|
+
name = "ValidationError";
|
253827
|
+
}
|
253828
|
+
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/use-prefix.js
|
253829
|
+
import { AsyncResource as AsyncResource5 } from "node:async_hooks";
|
253830
|
+
|
253831
|
+
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/hook-engine.js
|
253832
|
+
import { AsyncLocalStorage as AsyncLocalStorage2, AsyncResource as AsyncResource4 } from "node:async_hooks";
|
253833
|
+
var hookStorage2 = new AsyncLocalStorage2;
|
253834
|
+
function createStore2(rl) {
|
253835
|
+
const store = {
|
253836
|
+
rl,
|
253837
|
+
hooks: [],
|
253838
|
+
hooksCleanup: [],
|
253839
|
+
hooksEffect: [],
|
253840
|
+
index: 0,
|
253841
|
+
handleChange() {}
|
253842
|
+
};
|
253843
|
+
return store;
|
253844
|
+
}
|
253845
|
+
function withHooks2(rl, cb) {
|
253846
|
+
const store = createStore2(rl);
|
253847
|
+
return hookStorage2.run(store, () => {
|
253848
|
+
function cycle(render) {
|
253849
|
+
store.handleChange = () => {
|
253850
|
+
store.index = 0;
|
253851
|
+
render();
|
253852
|
+
};
|
253853
|
+
store.handleChange();
|
253854
|
+
}
|
253855
|
+
return cb(cycle);
|
253856
|
+
});
|
253857
|
+
}
|
253858
|
+
function getStore2() {
|
253859
|
+
const store = hookStorage2.getStore();
|
253860
|
+
if (!store) {
|
253861
|
+
throw new HookError2("[Inquirer] Hook functions can only be called from within a prompt");
|
253862
|
+
}
|
253863
|
+
return store;
|
253864
|
+
}
|
253865
|
+
function readline3() {
|
253866
|
+
return getStore2().rl;
|
253867
|
+
}
|
253868
|
+
function withUpdates2(fn) {
|
253869
|
+
const wrapped = (...args) => {
|
253870
|
+
const store = getStore2();
|
253871
|
+
let shouldUpdate = false;
|
253872
|
+
const oldHandleChange = store.handleChange;
|
253873
|
+
store.handleChange = () => {
|
253874
|
+
shouldUpdate = true;
|
253875
|
+
};
|
253876
|
+
const returnValue = fn(...args);
|
253877
|
+
if (shouldUpdate) {
|
253878
|
+
oldHandleChange();
|
253879
|
+
}
|
253880
|
+
store.handleChange = oldHandleChange;
|
253881
|
+
return returnValue;
|
253882
|
+
};
|
253883
|
+
return AsyncResource4.bind(wrapped);
|
253884
|
+
}
|
253885
|
+
function withPointer2(cb) {
|
253886
|
+
const store = getStore2();
|
253887
|
+
const { index } = store;
|
253888
|
+
const pointer = {
|
253889
|
+
get() {
|
253890
|
+
return store.hooks[index];
|
253891
|
+
},
|
253892
|
+
set(value4) {
|
253893
|
+
store.hooks[index] = value4;
|
253894
|
+
},
|
253895
|
+
initialized: index in store.hooks
|
253896
|
+
};
|
253897
|
+
const returnValue = cb(pointer);
|
253898
|
+
store.index++;
|
253899
|
+
return returnValue;
|
253900
|
+
}
|
253901
|
+
function handleChange2() {
|
253902
|
+
getStore2().handleChange();
|
253903
|
+
}
|
253904
|
+
var effectScheduler2 = {
|
253905
|
+
queue(cb) {
|
253906
|
+
const store = getStore2();
|
253907
|
+
const { index } = store;
|
253908
|
+
store.hooksEffect.push(() => {
|
253909
|
+
store.hooksCleanup[index]?.();
|
253910
|
+
const cleanFn = cb(readline3());
|
253911
|
+
if (cleanFn != null && typeof cleanFn !== "function") {
|
253912
|
+
throw new ValidationError2("useEffect return value must be a cleanup function or nothing.");
|
253913
|
+
}
|
253914
|
+
store.hooksCleanup[index] = cleanFn;
|
253915
|
+
});
|
253916
|
+
},
|
253917
|
+
run() {
|
253918
|
+
const store = getStore2();
|
253919
|
+
withUpdates2(() => {
|
253920
|
+
store.hooksEffect.forEach((effect) => {
|
253921
|
+
effect();
|
253922
|
+
});
|
253923
|
+
store.hooksEffect.length = 0;
|
253924
|
+
})();
|
253925
|
+
},
|
253926
|
+
clearAll() {
|
253927
|
+
const store = getStore2();
|
253928
|
+
store.hooksCleanup.forEach((cleanFn) => {
|
253929
|
+
cleanFn?.();
|
253930
|
+
});
|
253931
|
+
store.hooksEffect.length = 0;
|
253932
|
+
store.hooksCleanup.length = 0;
|
253933
|
+
}
|
253934
|
+
};
|
253935
|
+
|
253936
|
+
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/use-state.js
|
253937
|
+
function useState2(defaultValue) {
|
253938
|
+
return withPointer2((pointer) => {
|
253939
|
+
const setFn = (newValue) => {
|
253940
|
+
if (pointer.get() !== newValue) {
|
253941
|
+
pointer.set(newValue);
|
253942
|
+
handleChange2();
|
253943
|
+
}
|
253944
|
+
};
|
253945
|
+
if (pointer.initialized) {
|
253946
|
+
return [pointer.get(), setFn];
|
253947
|
+
}
|
253948
|
+
const value4 = typeof defaultValue === "function" ? defaultValue() : defaultValue;
|
253949
|
+
pointer.set(value4);
|
253950
|
+
return [value4, setFn];
|
253951
|
+
});
|
253952
|
+
}
|
253953
|
+
|
253954
|
+
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/use-effect.js
|
253955
|
+
function useEffect2(cb, depArray) {
|
253956
|
+
withPointer2((pointer) => {
|
253957
|
+
const oldDeps = pointer.get();
|
253958
|
+
const hasChanged = !Array.isArray(oldDeps) || depArray.some((dep, i6) => !Object.is(dep, oldDeps[i6]));
|
253959
|
+
if (hasChanged) {
|
253960
|
+
effectScheduler2.queue(cb);
|
253961
|
+
}
|
253962
|
+
pointer.set(depArray);
|
253963
|
+
});
|
253964
|
+
}
|
253965
|
+
|
253966
|
+
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/theme.js
|
253967
|
+
var import_yoctocolors_cjs2 = __toESM(require_yoctocolors_cjs(), 1);
|
253968
|
+
var defaultTheme2 = {
|
253969
|
+
prefix: {
|
253970
|
+
idle: import_yoctocolors_cjs2.default.blue("?"),
|
253971
|
+
done: import_yoctocolors_cjs2.default.green(esm_default.tick)
|
253972
|
+
},
|
253973
|
+
spinner: {
|
253974
|
+
interval: 80,
|
253975
|
+
frames: ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"].map((frame) => import_yoctocolors_cjs2.default.yellow(frame))
|
253976
|
+
},
|
253977
|
+
style: {
|
253978
|
+
answer: import_yoctocolors_cjs2.default.cyan,
|
253979
|
+
message: import_yoctocolors_cjs2.default.bold,
|
253980
|
+
error: (text2) => import_yoctocolors_cjs2.default.red(`> ${text2}`),
|
253981
|
+
defaultAnswer: (text2) => import_yoctocolors_cjs2.default.dim(`(${text2})`),
|
253982
|
+
help: import_yoctocolors_cjs2.default.dim,
|
253983
|
+
highlight: import_yoctocolors_cjs2.default.cyan,
|
253984
|
+
key: (text2) => import_yoctocolors_cjs2.default.cyan(import_yoctocolors_cjs2.default.bold(`<${text2}>`))
|
253985
|
+
}
|
253986
|
+
};
|
253987
|
+
|
253988
|
+
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/make-theme.js
|
253989
|
+
function isPlainObject3(value4) {
|
253990
|
+
if (typeof value4 !== "object" || value4 === null)
|
253991
|
+
return false;
|
253992
|
+
let proto = value4;
|
253993
|
+
while (Object.getPrototypeOf(proto) !== null) {
|
253994
|
+
proto = Object.getPrototypeOf(proto);
|
253995
|
+
}
|
253996
|
+
return Object.getPrototypeOf(value4) === proto;
|
253997
|
+
}
|
253998
|
+
function deepMerge3(...objects) {
|
253999
|
+
const output = {};
|
254000
|
+
for (const obj of objects) {
|
254001
|
+
for (const [key2, value4] of Object.entries(obj)) {
|
254002
|
+
const prevValue = output[key2];
|
254003
|
+
output[key2] = isPlainObject3(prevValue) && isPlainObject3(value4) ? deepMerge3(prevValue, value4) : value4;
|
254004
|
+
}
|
254005
|
+
}
|
254006
|
+
return output;
|
254007
|
+
}
|
254008
|
+
function makeTheme2(...themes) {
|
254009
|
+
const themesToMerge = [
|
254010
|
+
defaultTheme2,
|
254011
|
+
...themes.filter((theme) => theme != null)
|
254012
|
+
];
|
254013
|
+
return deepMerge3(...themesToMerge);
|
254014
|
+
}
|
254015
|
+
|
254016
|
+
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/use-prefix.js
|
254017
|
+
function usePrefix2({ status = "idle", theme }) {
|
254018
|
+
const [showLoader, setShowLoader] = useState2(false);
|
254019
|
+
const [tick, setTick] = useState2(0);
|
254020
|
+
const { prefix, spinner: spinner2 } = makeTheme2(theme);
|
254021
|
+
useEffect2(() => {
|
254022
|
+
if (status === "loading") {
|
254023
|
+
let tickInterval;
|
254024
|
+
let inc = -1;
|
254025
|
+
const delayTimeout = setTimeout(AsyncResource5.bind(() => {
|
254026
|
+
setShowLoader(true);
|
254027
|
+
tickInterval = setInterval(AsyncResource5.bind(() => {
|
254028
|
+
inc = inc + 1;
|
254029
|
+
setTick(inc % spinner2.frames.length);
|
254030
|
+
}), spinner2.interval);
|
254031
|
+
}), 300);
|
254032
|
+
return () => {
|
254033
|
+
clearTimeout(delayTimeout);
|
254034
|
+
clearInterval(tickInterval);
|
254035
|
+
};
|
254036
|
+
} else {
|
254037
|
+
setShowLoader(false);
|
254038
|
+
}
|
254039
|
+
}, [status]);
|
254040
|
+
if (showLoader) {
|
254041
|
+
return spinner2.frames[tick];
|
254042
|
+
}
|
254043
|
+
const iconName = status === "loading" ? "idle" : status;
|
254044
|
+
return typeof prefix === "string" ? prefix : prefix[iconName] ?? prefix["idle"];
|
254045
|
+
}
|
254046
|
+
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/use-ref.js
|
254047
|
+
function useRef2(val) {
|
254048
|
+
return useState2({ current: val })[0];
|
254049
|
+
}
|
254050
|
+
|
254051
|
+
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/use-keypress.js
|
254052
|
+
function useKeypress2(userHandler) {
|
254053
|
+
const signal = useRef2(userHandler);
|
254054
|
+
signal.current = userHandler;
|
254055
|
+
useEffect2((rl) => {
|
254056
|
+
let ignore = false;
|
254057
|
+
const handler = withUpdates2((_input, event) => {
|
254058
|
+
if (ignore)
|
254059
|
+
return;
|
254060
|
+
signal.current(event, rl);
|
254061
|
+
});
|
254062
|
+
rl.input.on("keypress", handler);
|
254063
|
+
return () => {
|
254064
|
+
ignore = true;
|
254065
|
+
rl.input.removeListener("keypress", handler);
|
254066
|
+
};
|
254067
|
+
}, []);
|
254068
|
+
}
|
254069
|
+
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/utils.js
|
254070
|
+
var import_cli_width2 = __toESM(require_cli_width(), 1);
|
254071
|
+
var import_wrap_ansi2 = __toESM(require_wrap_ansi(), 1);
|
254072
|
+
function breakLines2(content, width) {
|
254073
|
+
return content.split(`
|
254074
|
+
`).flatMap((line) => import_wrap_ansi2.default(line, width, { trim: false, hard: true }).split(`
|
254075
|
+
`).map((str) => str.trimEnd())).join(`
|
254076
|
+
`);
|
254077
|
+
}
|
254078
|
+
function readlineWidth2() {
|
254079
|
+
return import_cli_width2.default({ defaultWidth: 80, output: readline3().output });
|
254080
|
+
}
|
254081
|
+
|
254082
|
+
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
|
254083
|
+
var import_mute_stream2 = __toESM(require_lib(), 1);
|
254084
|
+
import * as readline4 from "node:readline";
|
254085
|
+
import { AsyncResource as AsyncResource6 } from "node:async_hooks";
|
254086
|
+
|
254087
|
+
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/screen-manager.js
|
254088
|
+
var import_ansi_escapes2 = __toESM(require_ansi_escapes(), 1);
|
254089
|
+
import { stripVTControlCharacters as stripVTControlCharacters3 } from "node:util";
|
254090
|
+
var height2 = (content) => content.split(`
|
254091
|
+
`).length;
|
254092
|
+
var lastLine2 = (content) => content.split(`
|
254093
|
+
`).pop() ?? "";
|
254094
|
+
function cursorDown2(n6) {
|
254095
|
+
return n6 > 0 ? import_ansi_escapes2.default.cursorDown(n6) : "";
|
254096
|
+
}
|
254097
|
+
|
254098
|
+
class ScreenManager2 {
|
254099
|
+
height = 0;
|
254100
|
+
extraLinesUnderPrompt = 0;
|
254101
|
+
cursorPos;
|
254102
|
+
rl;
|
254103
|
+
constructor(rl) {
|
254104
|
+
this.rl = rl;
|
254105
|
+
this.cursorPos = rl.getCursorPos();
|
254106
|
+
}
|
254107
|
+
write(content) {
|
254108
|
+
this.rl.output.unmute();
|
254109
|
+
this.rl.output.write(content);
|
254110
|
+
this.rl.output.mute();
|
254111
|
+
}
|
254112
|
+
render(content, bottomContent = "") {
|
254113
|
+
const promptLine = lastLine2(content);
|
254114
|
+
const rawPromptLine = stripVTControlCharacters3(promptLine);
|
254115
|
+
let prompt = rawPromptLine;
|
254116
|
+
if (this.rl.line.length > 0) {
|
254117
|
+
prompt = prompt.slice(0, -this.rl.line.length);
|
254118
|
+
}
|
254119
|
+
this.rl.setPrompt(prompt);
|
254120
|
+
this.cursorPos = this.rl.getCursorPos();
|
254121
|
+
const width = readlineWidth2();
|
254122
|
+
content = breakLines2(content, width);
|
254123
|
+
bottomContent = breakLines2(bottomContent, width);
|
254124
|
+
if (rawPromptLine.length % width === 0) {
|
254125
|
+
content += `
|
254126
|
+
`;
|
254127
|
+
}
|
254128
|
+
let output = content + (bottomContent ? `
|
254129
|
+
` + bottomContent : "");
|
254130
|
+
const promptLineUpDiff = Math.floor(rawPromptLine.length / width) - this.cursorPos.rows;
|
254131
|
+
const bottomContentHeight = promptLineUpDiff + (bottomContent ? height2(bottomContent) : 0);
|
254132
|
+
if (bottomContentHeight > 0)
|
254133
|
+
output += import_ansi_escapes2.default.cursorUp(bottomContentHeight);
|
254134
|
+
output += import_ansi_escapes2.default.cursorTo(this.cursorPos.cols);
|
254135
|
+
this.write(cursorDown2(this.extraLinesUnderPrompt) + import_ansi_escapes2.default.eraseLines(this.height) + output);
|
254136
|
+
this.extraLinesUnderPrompt = bottomContentHeight;
|
254137
|
+
this.height = height2(output);
|
254138
|
+
}
|
254139
|
+
checkCursorPos() {
|
254140
|
+
const cursorPos = this.rl.getCursorPos();
|
254141
|
+
if (cursorPos.cols !== this.cursorPos.cols) {
|
254142
|
+
this.write(import_ansi_escapes2.default.cursorTo(cursorPos.cols));
|
254143
|
+
this.cursorPos = cursorPos;
|
254144
|
+
}
|
254145
|
+
}
|
254146
|
+
done({ clearContent }) {
|
254147
|
+
this.rl.setPrompt("");
|
254148
|
+
let output = cursorDown2(this.extraLinesUnderPrompt);
|
254149
|
+
output += clearContent ? import_ansi_escapes2.default.eraseLines(this.height) : `
|
254150
|
+
`;
|
254151
|
+
output += import_ansi_escapes2.default.cursorShow;
|
254152
|
+
this.write(output);
|
254153
|
+
this.rl.close();
|
254154
|
+
}
|
254155
|
+
}
|
254156
|
+
|
254157
|
+
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/promise-polyfill.js
|
254158
|
+
class PromisePolyfill2 extends Promise {
|
254159
|
+
static withResolver() {
|
254160
|
+
let resolve5;
|
254161
|
+
let reject;
|
254162
|
+
const promise = new Promise((res, rej) => {
|
254163
|
+
resolve5 = res;
|
254164
|
+
reject = rej;
|
254165
|
+
});
|
254166
|
+
return { promise, resolve: resolve5, reject };
|
254167
|
+
}
|
254168
|
+
}
|
254169
|
+
|
254170
|
+
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
|
254171
|
+
function getCallSites2() {
|
254172
|
+
const _prepareStackTrace = Error.prepareStackTrace;
|
254173
|
+
let result = [];
|
254174
|
+
try {
|
254175
|
+
Error.prepareStackTrace = (_5, callSites) => {
|
254176
|
+
const callSitesWithoutCurrent = callSites.slice(1);
|
254177
|
+
result = callSitesWithoutCurrent;
|
254178
|
+
return callSitesWithoutCurrent;
|
254179
|
+
};
|
254180
|
+
new Error().stack;
|
254181
|
+
} catch {
|
254182
|
+
return result;
|
254183
|
+
}
|
254184
|
+
Error.prepareStackTrace = _prepareStackTrace;
|
254185
|
+
return result;
|
254186
|
+
}
|
254187
|
+
function createPrompt2(view) {
|
254188
|
+
const callSites = getCallSites2();
|
254189
|
+
const prompt = (config3, context = {}) => {
|
254190
|
+
const { input = process.stdin, signal } = context;
|
254191
|
+
const cleanups = new Set;
|
254192
|
+
const output = new import_mute_stream2.default;
|
254193
|
+
output.pipe(context.output ?? process.stdout);
|
254194
|
+
const rl = readline4.createInterface({
|
254195
|
+
terminal: true,
|
254196
|
+
input,
|
254197
|
+
output
|
254198
|
+
});
|
254199
|
+
const screen = new ScreenManager2(rl);
|
254200
|
+
const { promise, resolve: resolve5, reject } = PromisePolyfill2.withResolver();
|
254201
|
+
const cancel3 = () => reject(new CancelPromptError2);
|
254202
|
+
if (signal) {
|
254203
|
+
const abort = () => reject(new AbortPromptError2({ cause: signal.reason }));
|
254204
|
+
if (signal.aborted) {
|
254205
|
+
abort();
|
254206
|
+
return Object.assign(promise, { cancel: cancel3 });
|
254207
|
+
}
|
254208
|
+
signal.addEventListener("abort", abort);
|
254209
|
+
cleanups.add(() => signal.removeEventListener("abort", abort));
|
254210
|
+
}
|
254211
|
+
cleanups.add(onExit((code2, signal2) => {
|
254212
|
+
reject(new ExitPromptError2(`User force closed the prompt with ${code2} ${signal2}`));
|
254213
|
+
}));
|
254214
|
+
const sigint = () => reject(new ExitPromptError2(`User force closed the prompt with SIGINT`));
|
254215
|
+
rl.on("SIGINT", sigint);
|
254216
|
+
cleanups.add(() => rl.removeListener("SIGINT", sigint));
|
254217
|
+
const checkCursorPos = () => screen.checkCursorPos();
|
254218
|
+
rl.input.on("keypress", checkCursorPos);
|
254219
|
+
cleanups.add(() => rl.input.removeListener("keypress", checkCursorPos));
|
254220
|
+
return withHooks2(rl, (cycle) => {
|
254221
|
+
const hooksCleanup = AsyncResource6.bind(() => effectScheduler2.clearAll());
|
254222
|
+
rl.on("close", hooksCleanup);
|
254223
|
+
cleanups.add(() => rl.removeListener("close", hooksCleanup));
|
254224
|
+
cycle(() => {
|
254225
|
+
try {
|
254226
|
+
const nextView = view(config3, (value4) => {
|
254227
|
+
setImmediate(() => resolve5(value4));
|
254228
|
+
});
|
254229
|
+
if (nextView === undefined) {
|
254230
|
+
const callerFilename = callSites[1]?.getFileName();
|
254231
|
+
throw new Error(`Prompt functions must return a string.
|
254232
|
+
at ${callerFilename}`);
|
254233
|
+
}
|
254234
|
+
const [content, bottomContent] = typeof nextView === "string" ? [nextView] : nextView;
|
254235
|
+
screen.render(content, bottomContent);
|
254236
|
+
effectScheduler2.run();
|
254237
|
+
} catch (error5) {
|
254238
|
+
reject(error5);
|
254239
|
+
}
|
254240
|
+
});
|
254241
|
+
return Object.assign(promise.then((answer) => {
|
254242
|
+
effectScheduler2.clearAll();
|
254243
|
+
return answer;
|
254244
|
+
}, (error5) => {
|
254245
|
+
effectScheduler2.clearAll();
|
254246
|
+
throw error5;
|
254247
|
+
}).finally(() => {
|
254248
|
+
cleanups.forEach((cleanup) => cleanup());
|
254249
|
+
screen.done({ clearContent: Boolean(context.clearPromptOnDone) });
|
254250
|
+
output.end();
|
254251
|
+
}).then(() => promise), { cancel: cancel3 });
|
254252
|
+
});
|
254253
|
+
};
|
254254
|
+
return prompt;
|
254255
|
+
}
|
253917
254256
|
// ../../node_modules/@inquirer/input/dist/esm/index.js
|
253918
254257
|
var inputTheme = {
|
253919
254258
|
validationFailureMode: "keep"
|
253920
254259
|
};
|
253921
|
-
var esm_default2 =
|
254260
|
+
var esm_default2 = createPrompt2((config3, done) => {
|
253922
254261
|
const { required, validate: validate3 = () => true } = config3;
|
253923
|
-
const theme =
|
253924
|
-
const [status, setStatus] =
|
253925
|
-
const [defaultValue = "", setDefaultValue] =
|
253926
|
-
const [errorMsg, setError] =
|
253927
|
-
const [value4, setValue] =
|
253928
|
-
const prefix =
|
253929
|
-
|
254262
|
+
const theme = makeTheme2(inputTheme, config3.theme);
|
254263
|
+
const [status, setStatus] = useState2("idle");
|
254264
|
+
const [defaultValue = "", setDefaultValue] = useState2(config3.default);
|
254265
|
+
const [errorMsg, setError] = useState2();
|
254266
|
+
const [value4, setValue] = useState2("");
|
254267
|
+
const prefix = usePrefix2({ status, theme });
|
254268
|
+
useKeypress2(async (key3, rl) => {
|
253930
254269
|
if (status !== "idle") {
|
253931
254270
|
return;
|
253932
254271
|
}
|
253933
|
-
if (
|
254272
|
+
if (isEnterKey2(key3)) {
|
253934
254273
|
const answer = value4 || defaultValue;
|
253935
254274
|
setStatus("loading");
|
253936
254275
|
const isValid2 = required && !answer ? "You must provide a value" : await validate3(answer);
|
@@ -253947,9 +254286,9 @@ var esm_default2 = createPrompt((config3, done) => {
|
|
253947
254286
|
setError(isValid2 || "You must provide a valid value");
|
253948
254287
|
setStatus("idle");
|
253949
254288
|
}
|
253950
|
-
} else if (isBackspaceKey(
|
254289
|
+
} else if (isBackspaceKey(key3) && !value4) {
|
253951
254290
|
setDefaultValue(undefined);
|
253952
|
-
} else if (
|
254291
|
+
} else if (key3.name === "tab" && !value4) {
|
253953
254292
|
setDefaultValue(undefined);
|
253954
254293
|
rl.clearLine(0);
|
253955
254294
|
rl.write(defaultValue);
|
@@ -253998,14 +254337,588 @@ async function subgraphNamePrompt({
|
|
253998
254337
|
return sanitizeName(subgraphName);
|
253999
254338
|
}
|
254000
254339
|
|
254001
|
-
// ../../node_modules/@inquirer/select/dist/esm/
|
254340
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/key.js
|
254341
|
+
var isUpKey = (key3) => key3.name === "up" || key3.name === "k" || key3.ctrl && key3.name === "p";
|
254342
|
+
var isDownKey = (key3) => key3.name === "down" || key3.name === "j" || key3.ctrl && key3.name === "n";
|
254343
|
+
var isBackspaceKey2 = (key3) => key3.name === "backspace";
|
254344
|
+
var isNumberKey = (key3) => "1234567890".includes(key3.name);
|
254345
|
+
var isEnterKey3 = (key3) => key3.name === "enter" || key3.name === "return";
|
254346
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/errors.js
|
254347
|
+
class AbortPromptError3 extends Error {
|
254348
|
+
name = "AbortPromptError";
|
254349
|
+
message = "Prompt was aborted";
|
254350
|
+
constructor(options) {
|
254351
|
+
super();
|
254352
|
+
this.cause = options?.cause;
|
254353
|
+
}
|
254354
|
+
}
|
254355
|
+
|
254356
|
+
class CancelPromptError3 extends Error {
|
254357
|
+
name = "CancelPromptError";
|
254358
|
+
message = "Prompt was canceled";
|
254359
|
+
}
|
254360
|
+
|
254361
|
+
class ExitPromptError3 extends Error {
|
254362
|
+
name = "ExitPromptError";
|
254363
|
+
}
|
254364
|
+
|
254365
|
+
class HookError3 extends Error {
|
254366
|
+
name = "HookError";
|
254367
|
+
}
|
254368
|
+
|
254369
|
+
class ValidationError3 extends Error {
|
254370
|
+
name = "ValidationError";
|
254371
|
+
}
|
254372
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/use-prefix.js
|
254373
|
+
import { AsyncResource as AsyncResource8 } from "node:async_hooks";
|
254374
|
+
|
254375
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/hook-engine.js
|
254376
|
+
import { AsyncLocalStorage as AsyncLocalStorage3, AsyncResource as AsyncResource7 } from "node:async_hooks";
|
254377
|
+
var hookStorage3 = new AsyncLocalStorage3;
|
254378
|
+
function createStore3(rl) {
|
254379
|
+
const store = {
|
254380
|
+
rl,
|
254381
|
+
hooks: [],
|
254382
|
+
hooksCleanup: [],
|
254383
|
+
hooksEffect: [],
|
254384
|
+
index: 0,
|
254385
|
+
handleChange() {}
|
254386
|
+
};
|
254387
|
+
return store;
|
254388
|
+
}
|
254389
|
+
function withHooks3(rl, cb) {
|
254390
|
+
const store = createStore3(rl);
|
254391
|
+
return hookStorage3.run(store, () => {
|
254392
|
+
function cycle(render) {
|
254393
|
+
store.handleChange = () => {
|
254394
|
+
store.index = 0;
|
254395
|
+
render();
|
254396
|
+
};
|
254397
|
+
store.handleChange();
|
254398
|
+
}
|
254399
|
+
return cb(cycle);
|
254400
|
+
});
|
254401
|
+
}
|
254402
|
+
function getStore3() {
|
254403
|
+
const store = hookStorage3.getStore();
|
254404
|
+
if (!store) {
|
254405
|
+
throw new HookError3("[Inquirer] Hook functions can only be called from within a prompt");
|
254406
|
+
}
|
254407
|
+
return store;
|
254408
|
+
}
|
254409
|
+
function readline5() {
|
254410
|
+
return getStore3().rl;
|
254411
|
+
}
|
254412
|
+
function withUpdates3(fn) {
|
254413
|
+
const wrapped = (...args) => {
|
254414
|
+
const store = getStore3();
|
254415
|
+
let shouldUpdate = false;
|
254416
|
+
const oldHandleChange = store.handleChange;
|
254417
|
+
store.handleChange = () => {
|
254418
|
+
shouldUpdate = true;
|
254419
|
+
};
|
254420
|
+
const returnValue = fn(...args);
|
254421
|
+
if (shouldUpdate) {
|
254422
|
+
oldHandleChange();
|
254423
|
+
}
|
254424
|
+
store.handleChange = oldHandleChange;
|
254425
|
+
return returnValue;
|
254426
|
+
};
|
254427
|
+
return AsyncResource7.bind(wrapped);
|
254428
|
+
}
|
254429
|
+
function withPointer3(cb) {
|
254430
|
+
const store = getStore3();
|
254431
|
+
const { index } = store;
|
254432
|
+
const pointer = {
|
254433
|
+
get() {
|
254434
|
+
return store.hooks[index];
|
254435
|
+
},
|
254436
|
+
set(value4) {
|
254437
|
+
store.hooks[index] = value4;
|
254438
|
+
},
|
254439
|
+
initialized: index in store.hooks
|
254440
|
+
};
|
254441
|
+
const returnValue = cb(pointer);
|
254442
|
+
store.index++;
|
254443
|
+
return returnValue;
|
254444
|
+
}
|
254445
|
+
function handleChange3() {
|
254446
|
+
getStore3().handleChange();
|
254447
|
+
}
|
254448
|
+
var effectScheduler3 = {
|
254449
|
+
queue(cb) {
|
254450
|
+
const store = getStore3();
|
254451
|
+
const { index } = store;
|
254452
|
+
store.hooksEffect.push(() => {
|
254453
|
+
store.hooksCleanup[index]?.();
|
254454
|
+
const cleanFn = cb(readline5());
|
254455
|
+
if (cleanFn != null && typeof cleanFn !== "function") {
|
254456
|
+
throw new ValidationError3("useEffect return value must be a cleanup function or nothing.");
|
254457
|
+
}
|
254458
|
+
store.hooksCleanup[index] = cleanFn;
|
254459
|
+
});
|
254460
|
+
},
|
254461
|
+
run() {
|
254462
|
+
const store = getStore3();
|
254463
|
+
withUpdates3(() => {
|
254464
|
+
store.hooksEffect.forEach((effect) => {
|
254465
|
+
effect();
|
254466
|
+
});
|
254467
|
+
store.hooksEffect.length = 0;
|
254468
|
+
})();
|
254469
|
+
},
|
254470
|
+
clearAll() {
|
254471
|
+
const store = getStore3();
|
254472
|
+
store.hooksCleanup.forEach((cleanFn) => {
|
254473
|
+
cleanFn?.();
|
254474
|
+
});
|
254475
|
+
store.hooksEffect.length = 0;
|
254476
|
+
store.hooksCleanup.length = 0;
|
254477
|
+
}
|
254478
|
+
};
|
254479
|
+
|
254480
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/use-state.js
|
254481
|
+
function useState3(defaultValue) {
|
254482
|
+
return withPointer3((pointer) => {
|
254483
|
+
const setFn = (newValue) => {
|
254484
|
+
if (pointer.get() !== newValue) {
|
254485
|
+
pointer.set(newValue);
|
254486
|
+
handleChange3();
|
254487
|
+
}
|
254488
|
+
};
|
254489
|
+
if (pointer.initialized) {
|
254490
|
+
return [pointer.get(), setFn];
|
254491
|
+
}
|
254492
|
+
const value4 = typeof defaultValue === "function" ? defaultValue() : defaultValue;
|
254493
|
+
pointer.set(value4);
|
254494
|
+
return [value4, setFn];
|
254495
|
+
});
|
254496
|
+
}
|
254497
|
+
|
254498
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/use-effect.js
|
254499
|
+
function useEffect3(cb, depArray) {
|
254500
|
+
withPointer3((pointer) => {
|
254501
|
+
const oldDeps = pointer.get();
|
254502
|
+
const hasChanged = !Array.isArray(oldDeps) || depArray.some((dep, i6) => !Object.is(dep, oldDeps[i6]));
|
254503
|
+
if (hasChanged) {
|
254504
|
+
effectScheduler3.queue(cb);
|
254505
|
+
}
|
254506
|
+
pointer.set(depArray);
|
254507
|
+
});
|
254508
|
+
}
|
254509
|
+
|
254510
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/theme.js
|
254002
254511
|
var import_yoctocolors_cjs3 = __toESM(require_yoctocolors_cjs(), 1);
|
254003
|
-
var
|
254512
|
+
var defaultTheme3 = {
|
254513
|
+
prefix: {
|
254514
|
+
idle: import_yoctocolors_cjs3.default.blue("?"),
|
254515
|
+
done: import_yoctocolors_cjs3.default.green(esm_default.tick)
|
254516
|
+
},
|
254517
|
+
spinner: {
|
254518
|
+
interval: 80,
|
254519
|
+
frames: ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"].map((frame) => import_yoctocolors_cjs3.default.yellow(frame))
|
254520
|
+
},
|
254521
|
+
style: {
|
254522
|
+
answer: import_yoctocolors_cjs3.default.cyan,
|
254523
|
+
message: import_yoctocolors_cjs3.default.bold,
|
254524
|
+
error: (text2) => import_yoctocolors_cjs3.default.red(`> ${text2}`),
|
254525
|
+
defaultAnswer: (text2) => import_yoctocolors_cjs3.default.dim(`(${text2})`),
|
254526
|
+
help: import_yoctocolors_cjs3.default.dim,
|
254527
|
+
highlight: import_yoctocolors_cjs3.default.cyan,
|
254528
|
+
key: (text2) => import_yoctocolors_cjs3.default.cyan(import_yoctocolors_cjs3.default.bold(`<${text2}>`))
|
254529
|
+
}
|
254530
|
+
};
|
254531
|
+
|
254532
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/make-theme.js
|
254533
|
+
function isPlainObject4(value4) {
|
254534
|
+
if (typeof value4 !== "object" || value4 === null)
|
254535
|
+
return false;
|
254536
|
+
let proto = value4;
|
254537
|
+
while (Object.getPrototypeOf(proto) !== null) {
|
254538
|
+
proto = Object.getPrototypeOf(proto);
|
254539
|
+
}
|
254540
|
+
return Object.getPrototypeOf(value4) === proto;
|
254541
|
+
}
|
254542
|
+
function deepMerge4(...objects) {
|
254543
|
+
const output = {};
|
254544
|
+
for (const obj of objects) {
|
254545
|
+
for (const [key3, value4] of Object.entries(obj)) {
|
254546
|
+
const prevValue = output[key3];
|
254547
|
+
output[key3] = isPlainObject4(prevValue) && isPlainObject4(value4) ? deepMerge4(prevValue, value4) : value4;
|
254548
|
+
}
|
254549
|
+
}
|
254550
|
+
return output;
|
254551
|
+
}
|
254552
|
+
function makeTheme3(...themes) {
|
254553
|
+
const themesToMerge = [
|
254554
|
+
defaultTheme3,
|
254555
|
+
...themes.filter((theme) => theme != null)
|
254556
|
+
];
|
254557
|
+
return deepMerge4(...themesToMerge);
|
254558
|
+
}
|
254559
|
+
|
254560
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/use-prefix.js
|
254561
|
+
function usePrefix3({ status = "idle", theme }) {
|
254562
|
+
const [showLoader, setShowLoader] = useState3(false);
|
254563
|
+
const [tick, setTick] = useState3(0);
|
254564
|
+
const { prefix, spinner: spinner2 } = makeTheme3(theme);
|
254565
|
+
useEffect3(() => {
|
254566
|
+
if (status === "loading") {
|
254567
|
+
let tickInterval;
|
254568
|
+
let inc = -1;
|
254569
|
+
const delayTimeout = setTimeout(AsyncResource8.bind(() => {
|
254570
|
+
setShowLoader(true);
|
254571
|
+
tickInterval = setInterval(AsyncResource8.bind(() => {
|
254572
|
+
inc = inc + 1;
|
254573
|
+
setTick(inc % spinner2.frames.length);
|
254574
|
+
}), spinner2.interval);
|
254575
|
+
}), 300);
|
254576
|
+
return () => {
|
254577
|
+
clearTimeout(delayTimeout);
|
254578
|
+
clearInterval(tickInterval);
|
254579
|
+
};
|
254580
|
+
} else {
|
254581
|
+
setShowLoader(false);
|
254582
|
+
}
|
254583
|
+
}, [status]);
|
254584
|
+
if (showLoader) {
|
254585
|
+
return spinner2.frames[tick];
|
254586
|
+
}
|
254587
|
+
const iconName = status === "loading" ? "idle" : status;
|
254588
|
+
return typeof prefix === "string" ? prefix : prefix[iconName] ?? prefix["idle"];
|
254589
|
+
}
|
254590
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/use-memo.js
|
254591
|
+
function useMemo(fn, dependencies) {
|
254592
|
+
return withPointer3((pointer) => {
|
254593
|
+
const prev = pointer.get();
|
254594
|
+
if (!prev || prev.dependencies.length !== dependencies.length || prev.dependencies.some((dep, i6) => dep !== dependencies[i6])) {
|
254595
|
+
const value4 = fn();
|
254596
|
+
pointer.set({ value: value4, dependencies });
|
254597
|
+
return value4;
|
254598
|
+
}
|
254599
|
+
return prev.value;
|
254600
|
+
});
|
254601
|
+
}
|
254602
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/use-ref.js
|
254603
|
+
function useRef3(val) {
|
254604
|
+
return useState3({ current: val })[0];
|
254605
|
+
}
|
254606
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/use-keypress.js
|
254607
|
+
function useKeypress3(userHandler) {
|
254608
|
+
const signal = useRef3(userHandler);
|
254609
|
+
signal.current = userHandler;
|
254610
|
+
useEffect3((rl) => {
|
254611
|
+
let ignore = false;
|
254612
|
+
const handler = withUpdates3((_input, event) => {
|
254613
|
+
if (ignore)
|
254614
|
+
return;
|
254615
|
+
signal.current(event, rl);
|
254616
|
+
});
|
254617
|
+
rl.input.on("keypress", handler);
|
254618
|
+
return () => {
|
254619
|
+
ignore = true;
|
254620
|
+
rl.input.removeListener("keypress", handler);
|
254621
|
+
};
|
254622
|
+
}, []);
|
254623
|
+
}
|
254624
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/utils.js
|
254625
|
+
var import_cli_width3 = __toESM(require_cli_width(), 1);
|
254626
|
+
var import_wrap_ansi3 = __toESM(require_wrap_ansi(), 1);
|
254627
|
+
function breakLines3(content, width) {
|
254628
|
+
return content.split(`
|
254629
|
+
`).flatMap((line) => import_wrap_ansi3.default(line, width, { trim: false, hard: true }).split(`
|
254630
|
+
`).map((str) => str.trimEnd())).join(`
|
254631
|
+
`);
|
254632
|
+
}
|
254633
|
+
function readlineWidth3() {
|
254634
|
+
return import_cli_width3.default({ defaultWidth: 80, output: readline5().output });
|
254635
|
+
}
|
254636
|
+
|
254637
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/pagination/lines.js
|
254638
|
+
function split2(content, width) {
|
254639
|
+
return breakLines3(content, width).split(`
|
254640
|
+
`);
|
254641
|
+
}
|
254642
|
+
function rotate(count, items) {
|
254643
|
+
const max = items.length;
|
254644
|
+
const offset = (count % max + max) % max;
|
254645
|
+
return [...items.slice(offset), ...items.slice(0, offset)];
|
254646
|
+
}
|
254647
|
+
function lines({ items, width, renderItem, active, position: requested, pageSize }) {
|
254648
|
+
const layouts = items.map((item, index) => ({
|
254649
|
+
item,
|
254650
|
+
index,
|
254651
|
+
isActive: index === active
|
254652
|
+
}));
|
254653
|
+
const layoutsInPage = rotate(active - requested, layouts).slice(0, pageSize);
|
254654
|
+
const renderItemAt = (index) => layoutsInPage[index] == null ? [] : split2(renderItem(layoutsInPage[index]), width);
|
254655
|
+
const pageBuffer = Array.from({ length: pageSize });
|
254656
|
+
const activeItem = renderItemAt(requested).slice(0, pageSize);
|
254657
|
+
const position = requested + activeItem.length <= pageSize ? requested : pageSize - activeItem.length;
|
254658
|
+
pageBuffer.splice(position, activeItem.length, ...activeItem);
|
254659
|
+
let bufferPointer = position + activeItem.length;
|
254660
|
+
let layoutPointer = requested + 1;
|
254661
|
+
while (bufferPointer < pageSize && layoutPointer < layoutsInPage.length) {
|
254662
|
+
for (const line of renderItemAt(layoutPointer)) {
|
254663
|
+
pageBuffer[bufferPointer++] = line;
|
254664
|
+
if (bufferPointer >= pageSize)
|
254665
|
+
break;
|
254666
|
+
}
|
254667
|
+
layoutPointer++;
|
254668
|
+
}
|
254669
|
+
bufferPointer = position - 1;
|
254670
|
+
layoutPointer = requested - 1;
|
254671
|
+
while (bufferPointer >= 0 && layoutPointer >= 0) {
|
254672
|
+
for (const line of renderItemAt(layoutPointer).reverse()) {
|
254673
|
+
pageBuffer[bufferPointer--] = line;
|
254674
|
+
if (bufferPointer < 0)
|
254675
|
+
break;
|
254676
|
+
}
|
254677
|
+
layoutPointer--;
|
254678
|
+
}
|
254679
|
+
return pageBuffer.filter((line) => typeof line === "string");
|
254680
|
+
}
|
254681
|
+
|
254682
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/pagination/position.js
|
254683
|
+
function finite({ active, pageSize, total }) {
|
254684
|
+
const middle = Math.floor(pageSize / 2);
|
254685
|
+
if (total <= pageSize || active < middle)
|
254686
|
+
return active;
|
254687
|
+
if (active >= total - middle)
|
254688
|
+
return active + pageSize - total;
|
254689
|
+
return middle;
|
254690
|
+
}
|
254691
|
+
function infinite({ active, lastActive, total, pageSize, pointer }) {
|
254692
|
+
if (total <= pageSize)
|
254693
|
+
return active;
|
254694
|
+
if (lastActive < active && active - lastActive < pageSize) {
|
254695
|
+
return Math.min(Math.floor(pageSize / 2), pointer + active - lastActive);
|
254696
|
+
}
|
254697
|
+
return pointer;
|
254698
|
+
}
|
254699
|
+
|
254700
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/pagination/use-pagination.js
|
254701
|
+
function usePagination({ items, active, renderItem, pageSize, loop = true }) {
|
254702
|
+
const state = useRef3({ position: 0, lastActive: 0 });
|
254703
|
+
const position = loop ? infinite({
|
254704
|
+
active,
|
254705
|
+
lastActive: state.current.lastActive,
|
254706
|
+
total: items.length,
|
254707
|
+
pageSize,
|
254708
|
+
pointer: state.current.position
|
254709
|
+
}) : finite({
|
254710
|
+
active,
|
254711
|
+
total: items.length,
|
254712
|
+
pageSize
|
254713
|
+
});
|
254714
|
+
state.current.position = position;
|
254715
|
+
state.current.lastActive = active;
|
254716
|
+
return lines({
|
254717
|
+
items,
|
254718
|
+
width: readlineWidth3(),
|
254719
|
+
renderItem,
|
254720
|
+
active,
|
254721
|
+
position,
|
254722
|
+
pageSize
|
254723
|
+
}).join(`
|
254724
|
+
`);
|
254725
|
+
}
|
254726
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
|
254727
|
+
var import_mute_stream3 = __toESM(require_lib(), 1);
|
254728
|
+
import * as readline6 from "node:readline";
|
254729
|
+
import { AsyncResource as AsyncResource9 } from "node:async_hooks";
|
254730
|
+
|
254731
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/screen-manager.js
|
254732
|
+
var import_ansi_escapes3 = __toESM(require_ansi_escapes(), 1);
|
254733
|
+
import { stripVTControlCharacters as stripVTControlCharacters4 } from "node:util";
|
254734
|
+
var height3 = (content) => content.split(`
|
254735
|
+
`).length;
|
254736
|
+
var lastLine3 = (content) => content.split(`
|
254737
|
+
`).pop() ?? "";
|
254738
|
+
function cursorDown3(n6) {
|
254739
|
+
return n6 > 0 ? import_ansi_escapes3.default.cursorDown(n6) : "";
|
254740
|
+
}
|
254741
|
+
|
254742
|
+
class ScreenManager3 {
|
254743
|
+
height = 0;
|
254744
|
+
extraLinesUnderPrompt = 0;
|
254745
|
+
cursorPos;
|
254746
|
+
rl;
|
254747
|
+
constructor(rl) {
|
254748
|
+
this.rl = rl;
|
254749
|
+
this.cursorPos = rl.getCursorPos();
|
254750
|
+
}
|
254751
|
+
write(content) {
|
254752
|
+
this.rl.output.unmute();
|
254753
|
+
this.rl.output.write(content);
|
254754
|
+
this.rl.output.mute();
|
254755
|
+
}
|
254756
|
+
render(content, bottomContent = "") {
|
254757
|
+
const promptLine = lastLine3(content);
|
254758
|
+
const rawPromptLine = stripVTControlCharacters4(promptLine);
|
254759
|
+
let prompt = rawPromptLine;
|
254760
|
+
if (this.rl.line.length > 0) {
|
254761
|
+
prompt = prompt.slice(0, -this.rl.line.length);
|
254762
|
+
}
|
254763
|
+
this.rl.setPrompt(prompt);
|
254764
|
+
this.cursorPos = this.rl.getCursorPos();
|
254765
|
+
const width = readlineWidth3();
|
254766
|
+
content = breakLines3(content, width);
|
254767
|
+
bottomContent = breakLines3(bottomContent, width);
|
254768
|
+
if (rawPromptLine.length % width === 0) {
|
254769
|
+
content += `
|
254770
|
+
`;
|
254771
|
+
}
|
254772
|
+
let output = content + (bottomContent ? `
|
254773
|
+
` + bottomContent : "");
|
254774
|
+
const promptLineUpDiff = Math.floor(rawPromptLine.length / width) - this.cursorPos.rows;
|
254775
|
+
const bottomContentHeight = promptLineUpDiff + (bottomContent ? height3(bottomContent) : 0);
|
254776
|
+
if (bottomContentHeight > 0)
|
254777
|
+
output += import_ansi_escapes3.default.cursorUp(bottomContentHeight);
|
254778
|
+
output += import_ansi_escapes3.default.cursorTo(this.cursorPos.cols);
|
254779
|
+
this.write(cursorDown3(this.extraLinesUnderPrompt) + import_ansi_escapes3.default.eraseLines(this.height) + output);
|
254780
|
+
this.extraLinesUnderPrompt = bottomContentHeight;
|
254781
|
+
this.height = height3(output);
|
254782
|
+
}
|
254783
|
+
checkCursorPos() {
|
254784
|
+
const cursorPos = this.rl.getCursorPos();
|
254785
|
+
if (cursorPos.cols !== this.cursorPos.cols) {
|
254786
|
+
this.write(import_ansi_escapes3.default.cursorTo(cursorPos.cols));
|
254787
|
+
this.cursorPos = cursorPos;
|
254788
|
+
}
|
254789
|
+
}
|
254790
|
+
done({ clearContent }) {
|
254791
|
+
this.rl.setPrompt("");
|
254792
|
+
let output = cursorDown3(this.extraLinesUnderPrompt);
|
254793
|
+
output += clearContent ? import_ansi_escapes3.default.eraseLines(this.height) : `
|
254794
|
+
`;
|
254795
|
+
output += import_ansi_escapes3.default.cursorShow;
|
254796
|
+
this.write(output);
|
254797
|
+
this.rl.close();
|
254798
|
+
}
|
254799
|
+
}
|
254800
|
+
|
254801
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/promise-polyfill.js
|
254802
|
+
class PromisePolyfill3 extends Promise {
|
254803
|
+
static withResolver() {
|
254804
|
+
let resolve5;
|
254805
|
+
let reject;
|
254806
|
+
const promise = new Promise((res, rej) => {
|
254807
|
+
resolve5 = res;
|
254808
|
+
reject = rej;
|
254809
|
+
});
|
254810
|
+
return { promise, resolve: resolve5, reject };
|
254811
|
+
}
|
254812
|
+
}
|
254813
|
+
|
254814
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
|
254815
|
+
function getCallSites3() {
|
254816
|
+
const _prepareStackTrace = Error.prepareStackTrace;
|
254817
|
+
let result = [];
|
254818
|
+
try {
|
254819
|
+
Error.prepareStackTrace = (_5, callSites) => {
|
254820
|
+
const callSitesWithoutCurrent = callSites.slice(1);
|
254821
|
+
result = callSitesWithoutCurrent;
|
254822
|
+
return callSitesWithoutCurrent;
|
254823
|
+
};
|
254824
|
+
new Error().stack;
|
254825
|
+
} catch {
|
254826
|
+
return result;
|
254827
|
+
}
|
254828
|
+
Error.prepareStackTrace = _prepareStackTrace;
|
254829
|
+
return result;
|
254830
|
+
}
|
254831
|
+
function createPrompt3(view) {
|
254832
|
+
const callSites = getCallSites3();
|
254833
|
+
const prompt = (config3, context = {}) => {
|
254834
|
+
const { input = process.stdin, signal } = context;
|
254835
|
+
const cleanups = new Set;
|
254836
|
+
const output = new import_mute_stream3.default;
|
254837
|
+
output.pipe(context.output ?? process.stdout);
|
254838
|
+
const rl = readline6.createInterface({
|
254839
|
+
terminal: true,
|
254840
|
+
input,
|
254841
|
+
output
|
254842
|
+
});
|
254843
|
+
const screen = new ScreenManager3(rl);
|
254844
|
+
const { promise, resolve: resolve5, reject } = PromisePolyfill3.withResolver();
|
254845
|
+
const cancel3 = () => reject(new CancelPromptError3);
|
254846
|
+
if (signal) {
|
254847
|
+
const abort = () => reject(new AbortPromptError3({ cause: signal.reason }));
|
254848
|
+
if (signal.aborted) {
|
254849
|
+
abort();
|
254850
|
+
return Object.assign(promise, { cancel: cancel3 });
|
254851
|
+
}
|
254852
|
+
signal.addEventListener("abort", abort);
|
254853
|
+
cleanups.add(() => signal.removeEventListener("abort", abort));
|
254854
|
+
}
|
254855
|
+
cleanups.add(onExit((code2, signal2) => {
|
254856
|
+
reject(new ExitPromptError3(`User force closed the prompt with ${code2} ${signal2}`));
|
254857
|
+
}));
|
254858
|
+
const sigint = () => reject(new ExitPromptError3(`User force closed the prompt with SIGINT`));
|
254859
|
+
rl.on("SIGINT", sigint);
|
254860
|
+
cleanups.add(() => rl.removeListener("SIGINT", sigint));
|
254861
|
+
const checkCursorPos = () => screen.checkCursorPos();
|
254862
|
+
rl.input.on("keypress", checkCursorPos);
|
254863
|
+
cleanups.add(() => rl.input.removeListener("keypress", checkCursorPos));
|
254864
|
+
return withHooks3(rl, (cycle) => {
|
254865
|
+
const hooksCleanup = AsyncResource9.bind(() => effectScheduler3.clearAll());
|
254866
|
+
rl.on("close", hooksCleanup);
|
254867
|
+
cleanups.add(() => rl.removeListener("close", hooksCleanup));
|
254868
|
+
cycle(() => {
|
254869
|
+
try {
|
254870
|
+
const nextView = view(config3, (value4) => {
|
254871
|
+
setImmediate(() => resolve5(value4));
|
254872
|
+
});
|
254873
|
+
if (nextView === undefined) {
|
254874
|
+
const callerFilename = callSites[1]?.getFileName();
|
254875
|
+
throw new Error(`Prompt functions must return a string.
|
254876
|
+
at ${callerFilename}`);
|
254877
|
+
}
|
254878
|
+
const [content, bottomContent] = typeof nextView === "string" ? [nextView] : nextView;
|
254879
|
+
screen.render(content, bottomContent);
|
254880
|
+
effectScheduler3.run();
|
254881
|
+
} catch (error5) {
|
254882
|
+
reject(error5);
|
254883
|
+
}
|
254884
|
+
});
|
254885
|
+
return Object.assign(promise.then((answer) => {
|
254886
|
+
effectScheduler3.clearAll();
|
254887
|
+
return answer;
|
254888
|
+
}, (error5) => {
|
254889
|
+
effectScheduler3.clearAll();
|
254890
|
+
throw error5;
|
254891
|
+
}).finally(() => {
|
254892
|
+
cleanups.forEach((cleanup) => cleanup());
|
254893
|
+
screen.done({ clearContent: Boolean(context.clearPromptOnDone) });
|
254894
|
+
output.end();
|
254895
|
+
}).then(() => promise), { cancel: cancel3 });
|
254896
|
+
});
|
254897
|
+
};
|
254898
|
+
return prompt;
|
254899
|
+
}
|
254900
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/Separator.js
|
254901
|
+
var import_yoctocolors_cjs4 = __toESM(require_yoctocolors_cjs(), 1);
|
254902
|
+
class Separator {
|
254903
|
+
separator = import_yoctocolors_cjs4.default.dim(Array.from({ length: 15 }).join(esm_default.line));
|
254904
|
+
type = "separator";
|
254905
|
+
constructor(separator) {
|
254906
|
+
if (separator) {
|
254907
|
+
this.separator = separator;
|
254908
|
+
}
|
254909
|
+
}
|
254910
|
+
static isSeparator(choice) {
|
254911
|
+
return Boolean(choice && typeof choice === "object" && "type" in choice && choice.type === "separator");
|
254912
|
+
}
|
254913
|
+
}
|
254914
|
+
// ../../node_modules/@inquirer/select/dist/esm/index.js
|
254915
|
+
var import_yoctocolors_cjs5 = __toESM(require_yoctocolors_cjs(), 1);
|
254916
|
+
var import_ansi_escapes4 = __toESM(require_ansi_escapes(), 1);
|
254004
254917
|
var selectTheme = {
|
254005
254918
|
icon: { cursor: esm_default.pointer },
|
254006
254919
|
style: {
|
254007
|
-
disabled: (text2) =>
|
254008
|
-
description: (text2) =>
|
254920
|
+
disabled: (text2) => import_yoctocolors_cjs5.default.dim(`- ${text2}`),
|
254921
|
+
description: (text2) => import_yoctocolors_cjs5.default.cyan(text2)
|
254009
254922
|
},
|
254010
254923
|
helpMode: "auto",
|
254011
254924
|
indexMode: "hidden"
|
@@ -254038,19 +254951,19 @@ function normalizeChoices(choices) {
|
|
254038
254951
|
return normalizedChoice;
|
254039
254952
|
});
|
254040
254953
|
}
|
254041
|
-
var esm_default3 =
|
254954
|
+
var esm_default3 = createPrompt3((config3, done) => {
|
254042
254955
|
const { loop = true, pageSize = 7 } = config3;
|
254043
|
-
const firstRender =
|
254044
|
-
const theme =
|
254045
|
-
const [status, setStatus] =
|
254046
|
-
const prefix =
|
254047
|
-
const searchTimeoutRef =
|
254956
|
+
const firstRender = useRef3(true);
|
254957
|
+
const theme = makeTheme3(selectTheme, config3.theme);
|
254958
|
+
const [status, setStatus] = useState3("idle");
|
254959
|
+
const prefix = usePrefix3({ status, theme });
|
254960
|
+
const searchTimeoutRef = useRef3();
|
254048
254961
|
const items = useMemo(() => normalizeChoices(config3.choices), [config3.choices]);
|
254049
254962
|
const bounds = useMemo(() => {
|
254050
254963
|
const first = items.findIndex(isSelectable);
|
254051
254964
|
const last = items.findLastIndex(isSelectable);
|
254052
254965
|
if (first === -1) {
|
254053
|
-
throw new
|
254966
|
+
throw new ValidationError3("[select prompt] No selectable choices. All choices are disabled.");
|
254054
254967
|
}
|
254055
254968
|
return { first, last };
|
254056
254969
|
}, [items]);
|
@@ -254059,24 +254972,24 @@ var esm_default3 = createPrompt((config3, done) => {
|
|
254059
254972
|
return -1;
|
254060
254973
|
return items.findIndex((item) => isSelectable(item) && item.value === config3.default);
|
254061
254974
|
}, [config3.default, items]);
|
254062
|
-
const [active, setActive] =
|
254975
|
+
const [active, setActive] = useState3(defaultItemIndex === -1 ? bounds.first : defaultItemIndex);
|
254063
254976
|
const selectedChoice = items[active];
|
254064
|
-
|
254977
|
+
useKeypress3((key4, rl) => {
|
254065
254978
|
clearTimeout(searchTimeoutRef.current);
|
254066
|
-
if (
|
254979
|
+
if (isEnterKey3(key4)) {
|
254067
254980
|
setStatus("done");
|
254068
254981
|
done(selectedChoice.value);
|
254069
|
-
} else if (isUpKey(
|
254982
|
+
} else if (isUpKey(key4) || isDownKey(key4)) {
|
254070
254983
|
rl.clearLine(0);
|
254071
|
-
if (loop || isUpKey(
|
254072
|
-
const offset = isUpKey(
|
254984
|
+
if (loop || isUpKey(key4) && active !== bounds.first || isDownKey(key4) && active !== bounds.last) {
|
254985
|
+
const offset = isUpKey(key4) ? -1 : 1;
|
254073
254986
|
let next = active;
|
254074
254987
|
do {
|
254075
254988
|
next = (next + offset + items.length) % items.length;
|
254076
254989
|
} while (!isSelectable(items[next]));
|
254077
254990
|
setActive(next);
|
254078
254991
|
}
|
254079
|
-
} else if (isNumberKey(
|
254992
|
+
} else if (isNumberKey(key4) && !Number.isNaN(Number(rl.line))) {
|
254080
254993
|
const position = Number(rl.line) - 1;
|
254081
254994
|
const item = items[position];
|
254082
254995
|
if (item != null && isSelectable(item)) {
|
@@ -254085,7 +254998,7 @@ var esm_default3 = createPrompt((config3, done) => {
|
|
254085
254998
|
searchTimeoutRef.current = setTimeout(() => {
|
254086
254999
|
rl.clearLine(0);
|
254087
255000
|
}, 700);
|
254088
|
-
} else if (
|
255001
|
+
} else if (isBackspaceKey2(key4)) {
|
254089
255002
|
rl.clearLine(0);
|
254090
255003
|
} else {
|
254091
255004
|
const searchTerm = rl.line.toLowerCase();
|
@@ -254102,7 +255015,7 @@ var esm_default3 = createPrompt((config3, done) => {
|
|
254102
255015
|
}, 700);
|
254103
255016
|
}
|
254104
255017
|
});
|
254105
|
-
|
255018
|
+
useEffect3(() => () => {
|
254106
255019
|
clearTimeout(searchTimeoutRef.current);
|
254107
255020
|
}, []);
|
254108
255021
|
const message = theme.style.message(config3.message, status);
|
@@ -254142,7 +255055,7 @@ ${theme.style.help(`(${config3.instructions?.pager ?? "Use arrow keys to reveal
|
|
254142
255055
|
const choiceDescription = selectedChoice.description ? `
|
254143
255056
|
${theme.style.description(selectedChoice.description)}` : ``;
|
254144
255057
|
return `${[prefix, message, helpTipTop].filter(Boolean).join(" ")}
|
254145
|
-
${page}${helpTipBottom}${choiceDescription}${
|
255058
|
+
${page}${helpTipBottom}${choiceDescription}${import_ansi_escapes4.default.cursorHide}`;
|
254146
255059
|
});
|
254147
255060
|
|
254148
255061
|
// src/prompts/smart-contract-set/subgraph.prompt.ts
|
@@ -254617,13 +255530,13 @@ var esm_default4 = createPrompt((config3, done) => {
|
|
254617
255530
|
const [value4, setValue] = useState("");
|
254618
255531
|
const theme = makeTheme(config3.theme);
|
254619
255532
|
const prefix = usePrefix({ status, theme });
|
254620
|
-
useKeypress((
|
254621
|
-
if (isEnterKey(
|
255533
|
+
useKeypress((key4, rl) => {
|
255534
|
+
if (isEnterKey(key4)) {
|
254622
255535
|
const answer = getBooleanValue(value4, config3.default);
|
254623
255536
|
setValue(transformer(answer));
|
254624
255537
|
setStatus("done");
|
254625
255538
|
done(answer);
|
254626
|
-
} else if (
|
255539
|
+
} else if (key4.name === "tab") {
|
254627
255540
|
const answer = boolToString(!getBooleanValue(value4, config3.default));
|
254628
255541
|
rl.clearLine(0);
|
254629
255542
|
rl.write(answer);
|
@@ -254643,20 +255556,476 @@ var esm_default4 = createPrompt((config3, done) => {
|
|
254643
255556
|
return `${prefix} ${message}${defaultValue} ${formattedValue}`;
|
254644
255557
|
});
|
254645
255558
|
|
255559
|
+
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/key.js
|
255560
|
+
var isEnterKey4 = (key4) => key4.name === "enter" || key4.name === "return";
|
255561
|
+
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/errors.js
|
255562
|
+
class AbortPromptError4 extends Error {
|
255563
|
+
name = "AbortPromptError";
|
255564
|
+
message = "Prompt was aborted";
|
255565
|
+
constructor(options) {
|
255566
|
+
super();
|
255567
|
+
this.cause = options?.cause;
|
255568
|
+
}
|
255569
|
+
}
|
255570
|
+
|
255571
|
+
class CancelPromptError4 extends Error {
|
255572
|
+
name = "CancelPromptError";
|
255573
|
+
message = "Prompt was canceled";
|
255574
|
+
}
|
255575
|
+
|
255576
|
+
class ExitPromptError4 extends Error {
|
255577
|
+
name = "ExitPromptError";
|
255578
|
+
}
|
255579
|
+
|
255580
|
+
class HookError4 extends Error {
|
255581
|
+
name = "HookError";
|
255582
|
+
}
|
255583
|
+
|
255584
|
+
class ValidationError4 extends Error {
|
255585
|
+
name = "ValidationError";
|
255586
|
+
}
|
255587
|
+
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/use-prefix.js
|
255588
|
+
import { AsyncResource as AsyncResource11 } from "node:async_hooks";
|
255589
|
+
|
255590
|
+
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/hook-engine.js
|
255591
|
+
import { AsyncLocalStorage as AsyncLocalStorage4, AsyncResource as AsyncResource10 } from "node:async_hooks";
|
255592
|
+
var hookStorage4 = new AsyncLocalStorage4;
|
255593
|
+
function createStore4(rl) {
|
255594
|
+
const store = {
|
255595
|
+
rl,
|
255596
|
+
hooks: [],
|
255597
|
+
hooksCleanup: [],
|
255598
|
+
hooksEffect: [],
|
255599
|
+
index: 0,
|
255600
|
+
handleChange() {}
|
255601
|
+
};
|
255602
|
+
return store;
|
255603
|
+
}
|
255604
|
+
function withHooks4(rl, cb) {
|
255605
|
+
const store = createStore4(rl);
|
255606
|
+
return hookStorage4.run(store, () => {
|
255607
|
+
function cycle(render) {
|
255608
|
+
store.handleChange = () => {
|
255609
|
+
store.index = 0;
|
255610
|
+
render();
|
255611
|
+
};
|
255612
|
+
store.handleChange();
|
255613
|
+
}
|
255614
|
+
return cb(cycle);
|
255615
|
+
});
|
255616
|
+
}
|
255617
|
+
function getStore4() {
|
255618
|
+
const store = hookStorage4.getStore();
|
255619
|
+
if (!store) {
|
255620
|
+
throw new HookError4("[Inquirer] Hook functions can only be called from within a prompt");
|
255621
|
+
}
|
255622
|
+
return store;
|
255623
|
+
}
|
255624
|
+
function readline7() {
|
255625
|
+
return getStore4().rl;
|
255626
|
+
}
|
255627
|
+
function withUpdates4(fn) {
|
255628
|
+
const wrapped = (...args) => {
|
255629
|
+
const store = getStore4();
|
255630
|
+
let shouldUpdate = false;
|
255631
|
+
const oldHandleChange = store.handleChange;
|
255632
|
+
store.handleChange = () => {
|
255633
|
+
shouldUpdate = true;
|
255634
|
+
};
|
255635
|
+
const returnValue = fn(...args);
|
255636
|
+
if (shouldUpdate) {
|
255637
|
+
oldHandleChange();
|
255638
|
+
}
|
255639
|
+
store.handleChange = oldHandleChange;
|
255640
|
+
return returnValue;
|
255641
|
+
};
|
255642
|
+
return AsyncResource10.bind(wrapped);
|
255643
|
+
}
|
255644
|
+
function withPointer4(cb) {
|
255645
|
+
const store = getStore4();
|
255646
|
+
const { index } = store;
|
255647
|
+
const pointer = {
|
255648
|
+
get() {
|
255649
|
+
return store.hooks[index];
|
255650
|
+
},
|
255651
|
+
set(value4) {
|
255652
|
+
store.hooks[index] = value4;
|
255653
|
+
},
|
255654
|
+
initialized: index in store.hooks
|
255655
|
+
};
|
255656
|
+
const returnValue = cb(pointer);
|
255657
|
+
store.index++;
|
255658
|
+
return returnValue;
|
255659
|
+
}
|
255660
|
+
function handleChange4() {
|
255661
|
+
getStore4().handleChange();
|
255662
|
+
}
|
255663
|
+
var effectScheduler4 = {
|
255664
|
+
queue(cb) {
|
255665
|
+
const store = getStore4();
|
255666
|
+
const { index } = store;
|
255667
|
+
store.hooksEffect.push(() => {
|
255668
|
+
store.hooksCleanup[index]?.();
|
255669
|
+
const cleanFn = cb(readline7());
|
255670
|
+
if (cleanFn != null && typeof cleanFn !== "function") {
|
255671
|
+
throw new ValidationError4("useEffect return value must be a cleanup function or nothing.");
|
255672
|
+
}
|
255673
|
+
store.hooksCleanup[index] = cleanFn;
|
255674
|
+
});
|
255675
|
+
},
|
255676
|
+
run() {
|
255677
|
+
const store = getStore4();
|
255678
|
+
withUpdates4(() => {
|
255679
|
+
store.hooksEffect.forEach((effect) => {
|
255680
|
+
effect();
|
255681
|
+
});
|
255682
|
+
store.hooksEffect.length = 0;
|
255683
|
+
})();
|
255684
|
+
},
|
255685
|
+
clearAll() {
|
255686
|
+
const store = getStore4();
|
255687
|
+
store.hooksCleanup.forEach((cleanFn) => {
|
255688
|
+
cleanFn?.();
|
255689
|
+
});
|
255690
|
+
store.hooksEffect.length = 0;
|
255691
|
+
store.hooksCleanup.length = 0;
|
255692
|
+
}
|
255693
|
+
};
|
255694
|
+
|
255695
|
+
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/use-state.js
|
255696
|
+
function useState4(defaultValue) {
|
255697
|
+
return withPointer4((pointer) => {
|
255698
|
+
const setFn = (newValue) => {
|
255699
|
+
if (pointer.get() !== newValue) {
|
255700
|
+
pointer.set(newValue);
|
255701
|
+
handleChange4();
|
255702
|
+
}
|
255703
|
+
};
|
255704
|
+
if (pointer.initialized) {
|
255705
|
+
return [pointer.get(), setFn];
|
255706
|
+
}
|
255707
|
+
const value4 = typeof defaultValue === "function" ? defaultValue() : defaultValue;
|
255708
|
+
pointer.set(value4);
|
255709
|
+
return [value4, setFn];
|
255710
|
+
});
|
255711
|
+
}
|
255712
|
+
|
255713
|
+
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/use-effect.js
|
255714
|
+
function useEffect4(cb, depArray) {
|
255715
|
+
withPointer4((pointer) => {
|
255716
|
+
const oldDeps = pointer.get();
|
255717
|
+
const hasChanged = !Array.isArray(oldDeps) || depArray.some((dep, i6) => !Object.is(dep, oldDeps[i6]));
|
255718
|
+
if (hasChanged) {
|
255719
|
+
effectScheduler4.queue(cb);
|
255720
|
+
}
|
255721
|
+
pointer.set(depArray);
|
255722
|
+
});
|
255723
|
+
}
|
255724
|
+
|
255725
|
+
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/theme.js
|
255726
|
+
var import_yoctocolors_cjs6 = __toESM(require_yoctocolors_cjs(), 1);
|
255727
|
+
var defaultTheme4 = {
|
255728
|
+
prefix: {
|
255729
|
+
idle: import_yoctocolors_cjs6.default.blue("?"),
|
255730
|
+
done: import_yoctocolors_cjs6.default.green(esm_default.tick)
|
255731
|
+
},
|
255732
|
+
spinner: {
|
255733
|
+
interval: 80,
|
255734
|
+
frames: ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"].map((frame) => import_yoctocolors_cjs6.default.yellow(frame))
|
255735
|
+
},
|
255736
|
+
style: {
|
255737
|
+
answer: import_yoctocolors_cjs6.default.cyan,
|
255738
|
+
message: import_yoctocolors_cjs6.default.bold,
|
255739
|
+
error: (text2) => import_yoctocolors_cjs6.default.red(`> ${text2}`),
|
255740
|
+
defaultAnswer: (text2) => import_yoctocolors_cjs6.default.dim(`(${text2})`),
|
255741
|
+
help: import_yoctocolors_cjs6.default.dim,
|
255742
|
+
highlight: import_yoctocolors_cjs6.default.cyan,
|
255743
|
+
key: (text2) => import_yoctocolors_cjs6.default.cyan(import_yoctocolors_cjs6.default.bold(`<${text2}>`))
|
255744
|
+
}
|
255745
|
+
};
|
255746
|
+
|
255747
|
+
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/make-theme.js
|
255748
|
+
function isPlainObject5(value4) {
|
255749
|
+
if (typeof value4 !== "object" || value4 === null)
|
255750
|
+
return false;
|
255751
|
+
let proto = value4;
|
255752
|
+
while (Object.getPrototypeOf(proto) !== null) {
|
255753
|
+
proto = Object.getPrototypeOf(proto);
|
255754
|
+
}
|
255755
|
+
return Object.getPrototypeOf(value4) === proto;
|
255756
|
+
}
|
255757
|
+
function deepMerge5(...objects) {
|
255758
|
+
const output = {};
|
255759
|
+
for (const obj of objects) {
|
255760
|
+
for (const [key4, value4] of Object.entries(obj)) {
|
255761
|
+
const prevValue = output[key4];
|
255762
|
+
output[key4] = isPlainObject5(prevValue) && isPlainObject5(value4) ? deepMerge5(prevValue, value4) : value4;
|
255763
|
+
}
|
255764
|
+
}
|
255765
|
+
return output;
|
255766
|
+
}
|
255767
|
+
function makeTheme4(...themes) {
|
255768
|
+
const themesToMerge = [
|
255769
|
+
defaultTheme4,
|
255770
|
+
...themes.filter((theme) => theme != null)
|
255771
|
+
];
|
255772
|
+
return deepMerge5(...themesToMerge);
|
255773
|
+
}
|
255774
|
+
|
255775
|
+
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/use-prefix.js
|
255776
|
+
function usePrefix4({ status = "idle", theme }) {
|
255777
|
+
const [showLoader, setShowLoader] = useState4(false);
|
255778
|
+
const [tick, setTick] = useState4(0);
|
255779
|
+
const { prefix, spinner: spinner2 } = makeTheme4(theme);
|
255780
|
+
useEffect4(() => {
|
255781
|
+
if (status === "loading") {
|
255782
|
+
let tickInterval;
|
255783
|
+
let inc = -1;
|
255784
|
+
const delayTimeout = setTimeout(AsyncResource11.bind(() => {
|
255785
|
+
setShowLoader(true);
|
255786
|
+
tickInterval = setInterval(AsyncResource11.bind(() => {
|
255787
|
+
inc = inc + 1;
|
255788
|
+
setTick(inc % spinner2.frames.length);
|
255789
|
+
}), spinner2.interval);
|
255790
|
+
}), 300);
|
255791
|
+
return () => {
|
255792
|
+
clearTimeout(delayTimeout);
|
255793
|
+
clearInterval(tickInterval);
|
255794
|
+
};
|
255795
|
+
} else {
|
255796
|
+
setShowLoader(false);
|
255797
|
+
}
|
255798
|
+
}, [status]);
|
255799
|
+
if (showLoader) {
|
255800
|
+
return spinner2.frames[tick];
|
255801
|
+
}
|
255802
|
+
const iconName = status === "loading" ? "idle" : status;
|
255803
|
+
return typeof prefix === "string" ? prefix : prefix[iconName] ?? prefix["idle"];
|
255804
|
+
}
|
255805
|
+
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/use-ref.js
|
255806
|
+
function useRef4(val) {
|
255807
|
+
return useState4({ current: val })[0];
|
255808
|
+
}
|
255809
|
+
|
255810
|
+
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/use-keypress.js
|
255811
|
+
function useKeypress4(userHandler) {
|
255812
|
+
const signal = useRef4(userHandler);
|
255813
|
+
signal.current = userHandler;
|
255814
|
+
useEffect4((rl) => {
|
255815
|
+
let ignore = false;
|
255816
|
+
const handler = withUpdates4((_input, event) => {
|
255817
|
+
if (ignore)
|
255818
|
+
return;
|
255819
|
+
signal.current(event, rl);
|
255820
|
+
});
|
255821
|
+
rl.input.on("keypress", handler);
|
255822
|
+
return () => {
|
255823
|
+
ignore = true;
|
255824
|
+
rl.input.removeListener("keypress", handler);
|
255825
|
+
};
|
255826
|
+
}, []);
|
255827
|
+
}
|
255828
|
+
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/utils.js
|
255829
|
+
var import_cli_width4 = __toESM(require_cli_width(), 1);
|
255830
|
+
var import_wrap_ansi4 = __toESM(require_wrap_ansi(), 1);
|
255831
|
+
function breakLines4(content, width) {
|
255832
|
+
return content.split(`
|
255833
|
+
`).flatMap((line) => import_wrap_ansi4.default(line, width, { trim: false, hard: true }).split(`
|
255834
|
+
`).map((str) => str.trimEnd())).join(`
|
255835
|
+
`);
|
255836
|
+
}
|
255837
|
+
function readlineWidth4() {
|
255838
|
+
return import_cli_width4.default({ defaultWidth: 80, output: readline7().output });
|
255839
|
+
}
|
255840
|
+
|
255841
|
+
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
|
255842
|
+
var import_mute_stream4 = __toESM(require_lib(), 1);
|
255843
|
+
import * as readline8 from "node:readline";
|
255844
|
+
import { AsyncResource as AsyncResource12 } from "node:async_hooks";
|
255845
|
+
|
255846
|
+
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/screen-manager.js
|
255847
|
+
var import_ansi_escapes5 = __toESM(require_ansi_escapes(), 1);
|
255848
|
+
import { stripVTControlCharacters as stripVTControlCharacters5 } from "node:util";
|
255849
|
+
var height4 = (content) => content.split(`
|
255850
|
+
`).length;
|
255851
|
+
var lastLine4 = (content) => content.split(`
|
255852
|
+
`).pop() ?? "";
|
255853
|
+
function cursorDown4(n6) {
|
255854
|
+
return n6 > 0 ? import_ansi_escapes5.default.cursorDown(n6) : "";
|
255855
|
+
}
|
255856
|
+
|
255857
|
+
class ScreenManager4 {
|
255858
|
+
height = 0;
|
255859
|
+
extraLinesUnderPrompt = 0;
|
255860
|
+
cursorPos;
|
255861
|
+
rl;
|
255862
|
+
constructor(rl) {
|
255863
|
+
this.rl = rl;
|
255864
|
+
this.cursorPos = rl.getCursorPos();
|
255865
|
+
}
|
255866
|
+
write(content) {
|
255867
|
+
this.rl.output.unmute();
|
255868
|
+
this.rl.output.write(content);
|
255869
|
+
this.rl.output.mute();
|
255870
|
+
}
|
255871
|
+
render(content, bottomContent = "") {
|
255872
|
+
const promptLine = lastLine4(content);
|
255873
|
+
const rawPromptLine = stripVTControlCharacters5(promptLine);
|
255874
|
+
let prompt = rawPromptLine;
|
255875
|
+
if (this.rl.line.length > 0) {
|
255876
|
+
prompt = prompt.slice(0, -this.rl.line.length);
|
255877
|
+
}
|
255878
|
+
this.rl.setPrompt(prompt);
|
255879
|
+
this.cursorPos = this.rl.getCursorPos();
|
255880
|
+
const width = readlineWidth4();
|
255881
|
+
content = breakLines4(content, width);
|
255882
|
+
bottomContent = breakLines4(bottomContent, width);
|
255883
|
+
if (rawPromptLine.length % width === 0) {
|
255884
|
+
content += `
|
255885
|
+
`;
|
255886
|
+
}
|
255887
|
+
let output = content + (bottomContent ? `
|
255888
|
+
` + bottomContent : "");
|
255889
|
+
const promptLineUpDiff = Math.floor(rawPromptLine.length / width) - this.cursorPos.rows;
|
255890
|
+
const bottomContentHeight = promptLineUpDiff + (bottomContent ? height4(bottomContent) : 0);
|
255891
|
+
if (bottomContentHeight > 0)
|
255892
|
+
output += import_ansi_escapes5.default.cursorUp(bottomContentHeight);
|
255893
|
+
output += import_ansi_escapes5.default.cursorTo(this.cursorPos.cols);
|
255894
|
+
this.write(cursorDown4(this.extraLinesUnderPrompt) + import_ansi_escapes5.default.eraseLines(this.height) + output);
|
255895
|
+
this.extraLinesUnderPrompt = bottomContentHeight;
|
255896
|
+
this.height = height4(output);
|
255897
|
+
}
|
255898
|
+
checkCursorPos() {
|
255899
|
+
const cursorPos = this.rl.getCursorPos();
|
255900
|
+
if (cursorPos.cols !== this.cursorPos.cols) {
|
255901
|
+
this.write(import_ansi_escapes5.default.cursorTo(cursorPos.cols));
|
255902
|
+
this.cursorPos = cursorPos;
|
255903
|
+
}
|
255904
|
+
}
|
255905
|
+
done({ clearContent }) {
|
255906
|
+
this.rl.setPrompt("");
|
255907
|
+
let output = cursorDown4(this.extraLinesUnderPrompt);
|
255908
|
+
output += clearContent ? import_ansi_escapes5.default.eraseLines(this.height) : `
|
255909
|
+
`;
|
255910
|
+
output += import_ansi_escapes5.default.cursorShow;
|
255911
|
+
this.write(output);
|
255912
|
+
this.rl.close();
|
255913
|
+
}
|
255914
|
+
}
|
255915
|
+
|
255916
|
+
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/promise-polyfill.js
|
255917
|
+
class PromisePolyfill4 extends Promise {
|
255918
|
+
static withResolver() {
|
255919
|
+
let resolve6;
|
255920
|
+
let reject;
|
255921
|
+
const promise = new Promise((res, rej) => {
|
255922
|
+
resolve6 = res;
|
255923
|
+
reject = rej;
|
255924
|
+
});
|
255925
|
+
return { promise, resolve: resolve6, reject };
|
255926
|
+
}
|
255927
|
+
}
|
255928
|
+
|
255929
|
+
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
|
255930
|
+
function getCallSites4() {
|
255931
|
+
const _prepareStackTrace = Error.prepareStackTrace;
|
255932
|
+
let result = [];
|
255933
|
+
try {
|
255934
|
+
Error.prepareStackTrace = (_5, callSites) => {
|
255935
|
+
const callSitesWithoutCurrent = callSites.slice(1);
|
255936
|
+
result = callSitesWithoutCurrent;
|
255937
|
+
return callSitesWithoutCurrent;
|
255938
|
+
};
|
255939
|
+
new Error().stack;
|
255940
|
+
} catch {
|
255941
|
+
return result;
|
255942
|
+
}
|
255943
|
+
Error.prepareStackTrace = _prepareStackTrace;
|
255944
|
+
return result;
|
255945
|
+
}
|
255946
|
+
function createPrompt4(view) {
|
255947
|
+
const callSites = getCallSites4();
|
255948
|
+
const prompt = (config3, context = {}) => {
|
255949
|
+
const { input = process.stdin, signal } = context;
|
255950
|
+
const cleanups = new Set;
|
255951
|
+
const output = new import_mute_stream4.default;
|
255952
|
+
output.pipe(context.output ?? process.stdout);
|
255953
|
+
const rl = readline8.createInterface({
|
255954
|
+
terminal: true,
|
255955
|
+
input,
|
255956
|
+
output
|
255957
|
+
});
|
255958
|
+
const screen = new ScreenManager4(rl);
|
255959
|
+
const { promise, resolve: resolve6, reject } = PromisePolyfill4.withResolver();
|
255960
|
+
const cancel3 = () => reject(new CancelPromptError4);
|
255961
|
+
if (signal) {
|
255962
|
+
const abort = () => reject(new AbortPromptError4({ cause: signal.reason }));
|
255963
|
+
if (signal.aborted) {
|
255964
|
+
abort();
|
255965
|
+
return Object.assign(promise, { cancel: cancel3 });
|
255966
|
+
}
|
255967
|
+
signal.addEventListener("abort", abort);
|
255968
|
+
cleanups.add(() => signal.removeEventListener("abort", abort));
|
255969
|
+
}
|
255970
|
+
cleanups.add(onExit((code2, signal2) => {
|
255971
|
+
reject(new ExitPromptError4(`User force closed the prompt with ${code2} ${signal2}`));
|
255972
|
+
}));
|
255973
|
+
const sigint = () => reject(new ExitPromptError4(`User force closed the prompt with SIGINT`));
|
255974
|
+
rl.on("SIGINT", sigint);
|
255975
|
+
cleanups.add(() => rl.removeListener("SIGINT", sigint));
|
255976
|
+
const checkCursorPos = () => screen.checkCursorPos();
|
255977
|
+
rl.input.on("keypress", checkCursorPos);
|
255978
|
+
cleanups.add(() => rl.input.removeListener("keypress", checkCursorPos));
|
255979
|
+
return withHooks4(rl, (cycle) => {
|
255980
|
+
const hooksCleanup = AsyncResource12.bind(() => effectScheduler4.clearAll());
|
255981
|
+
rl.on("close", hooksCleanup);
|
255982
|
+
cleanups.add(() => rl.removeListener("close", hooksCleanup));
|
255983
|
+
cycle(() => {
|
255984
|
+
try {
|
255985
|
+
const nextView = view(config3, (value4) => {
|
255986
|
+
setImmediate(() => resolve6(value4));
|
255987
|
+
});
|
255988
|
+
if (nextView === undefined) {
|
255989
|
+
const callerFilename = callSites[1]?.getFileName();
|
255990
|
+
throw new Error(`Prompt functions must return a string.
|
255991
|
+
at ${callerFilename}`);
|
255992
|
+
}
|
255993
|
+
const [content, bottomContent] = typeof nextView === "string" ? [nextView] : nextView;
|
255994
|
+
screen.render(content, bottomContent);
|
255995
|
+
effectScheduler4.run();
|
255996
|
+
} catch (error5) {
|
255997
|
+
reject(error5);
|
255998
|
+
}
|
255999
|
+
});
|
256000
|
+
return Object.assign(promise.then((answer) => {
|
256001
|
+
effectScheduler4.clearAll();
|
256002
|
+
return answer;
|
256003
|
+
}, (error5) => {
|
256004
|
+
effectScheduler4.clearAll();
|
256005
|
+
throw error5;
|
256006
|
+
}).finally(() => {
|
256007
|
+
cleanups.forEach((cleanup) => cleanup());
|
256008
|
+
screen.done({ clearContent: Boolean(context.clearPromptOnDone) });
|
256009
|
+
output.end();
|
256010
|
+
}).then(() => promise), { cancel: cancel3 });
|
256011
|
+
});
|
256012
|
+
};
|
256013
|
+
return prompt;
|
256014
|
+
}
|
254646
256015
|
// ../../node_modules/@inquirer/password/dist/esm/index.js
|
254647
|
-
var
|
254648
|
-
var esm_default5 =
|
256016
|
+
var import_ansi_escapes6 = __toESM(require_ansi_escapes(), 1);
|
256017
|
+
var esm_default5 = createPrompt4((config3, done) => {
|
254649
256018
|
const { validate: validate3 = () => true } = config3;
|
254650
|
-
const theme =
|
254651
|
-
const [status, setStatus] =
|
254652
|
-
const [errorMsg, setError] =
|
254653
|
-
const [value4, setValue] =
|
254654
|
-
const prefix =
|
254655
|
-
|
256019
|
+
const theme = makeTheme4(config3.theme);
|
256020
|
+
const [status, setStatus] = useState4("idle");
|
256021
|
+
const [errorMsg, setError] = useState4();
|
256022
|
+
const [value4, setValue] = useState4("");
|
256023
|
+
const prefix = usePrefix4({ status, theme });
|
256024
|
+
useKeypress4(async (key5, rl) => {
|
254656
256025
|
if (status !== "idle") {
|
254657
256026
|
return;
|
254658
256027
|
}
|
254659
|
-
if (
|
256028
|
+
if (isEnterKey4(key5)) {
|
254660
256029
|
const answer = value4;
|
254661
256030
|
setStatus("loading");
|
254662
256031
|
const isValid2 = await validate3(answer);
|
@@ -254681,7 +256050,7 @@ var esm_default5 = createPrompt((config3, done) => {
|
|
254681
256050
|
const maskChar = typeof config3.mask === "string" ? config3.mask : "*";
|
254682
256051
|
formattedValue = maskChar.repeat(value4.length);
|
254683
256052
|
} else if (status !== "done") {
|
254684
|
-
helpTip = `${theme.style.help("[input is masked]")}${
|
256053
|
+
helpTip = `${theme.style.help("[input is masked]")}${import_ansi_escapes6.default.cursorHide}`;
|
254685
256054
|
}
|
254686
256055
|
if (status === "done") {
|
254687
256056
|
formattedValue = theme.style.answer(formattedValue);
|
@@ -255905,7 +257274,7 @@ var basename2 = function(p6, extension) {
|
|
255905
257274
|
return extension && lastSegment.endsWith(extension) ? lastSegment.slice(0, -extension.length) : lastSegment;
|
255906
257275
|
};
|
255907
257276
|
// ../../node_modules/defu/dist/defu.mjs
|
255908
|
-
function
|
257277
|
+
function isPlainObject6(value4) {
|
255909
257278
|
if (value4 === null || typeof value4 !== "object") {
|
255910
257279
|
return false;
|
255911
257280
|
}
|
@@ -255922,27 +257291,27 @@ function isPlainObject3(value4) {
|
|
255922
257291
|
return true;
|
255923
257292
|
}
|
255924
257293
|
function _defu(baseObject, defaults2, namespace = ".", merger) {
|
255925
|
-
if (!
|
257294
|
+
if (!isPlainObject6(defaults2)) {
|
255926
257295
|
return _defu(baseObject, {}, namespace, merger);
|
255927
257296
|
}
|
255928
257297
|
const object = Object.assign({}, defaults2);
|
255929
|
-
for (const
|
255930
|
-
if (
|
257298
|
+
for (const key5 in baseObject) {
|
257299
|
+
if (key5 === "__proto__" || key5 === "constructor") {
|
255931
257300
|
continue;
|
255932
257301
|
}
|
255933
|
-
const value4 = baseObject[
|
257302
|
+
const value4 = baseObject[key5];
|
255934
257303
|
if (value4 === null || value4 === undefined) {
|
255935
257304
|
continue;
|
255936
257305
|
}
|
255937
|
-
if (merger && merger(object,
|
257306
|
+
if (merger && merger(object, key5, value4, namespace)) {
|
255938
257307
|
continue;
|
255939
257308
|
}
|
255940
|
-
if (Array.isArray(value4) && Array.isArray(object[
|
255941
|
-
object[
|
255942
|
-
} else if (
|
255943
|
-
object[
|
257309
|
+
if (Array.isArray(value4) && Array.isArray(object[key5])) {
|
257310
|
+
object[key5] = [...value4, ...object[key5]];
|
257311
|
+
} else if (isPlainObject6(value4) && isPlainObject6(object[key5])) {
|
257312
|
+
object[key5] = _defu(value4, object[key5], (namespace ? `${namespace}.` : "") + key5.toString(), merger);
|
255944
257313
|
} else {
|
255945
|
-
object[
|
257314
|
+
object[key5] = value4;
|
255946
257315
|
}
|
255947
257316
|
}
|
255948
257317
|
return object;
|
@@ -255951,15 +257320,15 @@ function createDefu(merger) {
|
|
255951
257320
|
return (...arguments_4) => arguments_4.reduce((p6, c3) => _defu(p6, c3, "", merger), {});
|
255952
257321
|
}
|
255953
257322
|
var defu = createDefu();
|
255954
|
-
var defuFn = createDefu((object,
|
255955
|
-
if (object[
|
255956
|
-
object[
|
257323
|
+
var defuFn = createDefu((object, key5, currentValue) => {
|
257324
|
+
if (object[key5] !== undefined && typeof currentValue === "function") {
|
257325
|
+
object[key5] = currentValue(object[key5]);
|
255957
257326
|
return true;
|
255958
257327
|
}
|
255959
257328
|
});
|
255960
|
-
var defuArrayFn = createDefu((object,
|
255961
|
-
if (Array.isArray(object[
|
255962
|
-
object[
|
257329
|
+
var defuArrayFn = createDefu((object, key5, currentValue) => {
|
257330
|
+
if (Array.isArray(object[key5]) && typeof currentValue === "function") {
|
257331
|
+
object[key5] = currentValue(object[key5]);
|
255963
257332
|
return true;
|
255964
257333
|
}
|
255965
257334
|
});
|
@@ -258656,11 +260025,11 @@ function cacheDirectory() {
|
|
258656
260025
|
}
|
258657
260026
|
function normalizeHeaders(headers = {}) {
|
258658
260027
|
const normalized = {};
|
258659
|
-
for (const [
|
260028
|
+
for (const [key5, value4] of Object.entries(headers)) {
|
258660
260029
|
if (!value4) {
|
258661
260030
|
continue;
|
258662
260031
|
}
|
258663
|
-
normalized[
|
260032
|
+
normalized[key5.toLowerCase()] = value4;
|
258664
260033
|
}
|
258665
260034
|
return normalized;
|
258666
260035
|
}
|
@@ -261294,7 +262663,7 @@ function jsonOutput(data) {
|
|
261294
262663
|
var composer = require_composer();
|
261295
262664
|
var Document = require_Document();
|
261296
262665
|
var Schema = require_Schema();
|
261297
|
-
var
|
262666
|
+
var errors5 = require_errors3();
|
261298
262667
|
var Alias = require_Alias();
|
261299
262668
|
var identity2 = require_identity();
|
261300
262669
|
var Pair = require_Pair();
|
@@ -261310,9 +262679,9 @@ var visit2 = require_visit();
|
|
261310
262679
|
var $Composer = composer.Composer;
|
261311
262680
|
var $Document = Document.Document;
|
261312
262681
|
var $Schema = Schema.Schema;
|
261313
|
-
var $YAMLError =
|
261314
|
-
var $YAMLParseError =
|
261315
|
-
var $YAMLWarning =
|
262682
|
+
var $YAMLError = errors5.YAMLError;
|
262683
|
+
var $YAMLParseError = errors5.YAMLParseError;
|
262684
|
+
var $YAMLWarning = errors5.YAMLWarning;
|
261316
262685
|
var $Alias = Alias.Alias;
|
261317
262686
|
var $isAlias = identity2.isAlias;
|
261318
262687
|
var $isCollection = identity2.isCollection;
|
@@ -261662,7 +263031,7 @@ async function getServicesAndMapResults({
|
|
261662
263031
|
const application = await settlemint.application.read(applicationUniqueName);
|
261663
263032
|
const services = await servicesSpinner(settlemint, applicationUniqueName, types2);
|
261664
263033
|
const results = (types2 ?? SERVICE_TYPES).filter((serviceType) => !types2 || types2.includes(serviceType)).map((serviceType) => {
|
261665
|
-
const [_6, labels] = Object.entries(LABELS_MAP).find(([
|
263034
|
+
const [_6, labels] = Object.entries(LABELS_MAP).find(([key5, value4]) => value4.command === serviceType) ?? [
|
261666
263035
|
null,
|
261667
263036
|
{ plural: serviceType }
|
261668
263037
|
];
|
@@ -261897,11 +263266,11 @@ function createCommand4() {
|
|
261897
263266
|
|
261898
263267
|
// src/utils/commands/passthrough-options.ts
|
261899
263268
|
function mapPassthroughOptions(options, command) {
|
261900
|
-
const optionArgs = Object.entries(options).map(([
|
263269
|
+
const optionArgs = Object.entries(options).map(([key5, value4]) => {
|
261901
263270
|
if (value4 === true) {
|
261902
|
-
return `--${
|
263271
|
+
return `--${key5}`;
|
261903
263272
|
}
|
261904
|
-
return `--${
|
263273
|
+
return `--${key5}=${value4}`;
|
261905
263274
|
});
|
261906
263275
|
return [...optionArgs, ...command.args];
|
261907
263276
|
}
|
@@ -262940,4 +264309,4 @@ async function sdkCliCommand(argv = process.argv) {
|
|
262940
264309
|
// src/cli.ts
|
262941
264310
|
sdkCliCommand();
|
262942
264311
|
|
262943
|
-
//# debugId=
|
264312
|
+
//# debugId=FEAACD993452AD5064756E2164756E21
|