@settlemint/sdk-cli 1.1.3-pra26dc90a → 1.1.3-prae38e267
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 +589 -1498
- package/dist/cli.js.map +8 -36
- package/package.json +5 -5
package/dist/cli.js
CHANGED
@@ -14374,8 +14374,8 @@ var require_printLocation = __commonJS((exports) => {
|
|
14374
14374
|
const columnNum = sourceLocation.column + columnOffset;
|
14375
14375
|
const locationStr = `${source.name}:${lineNum}:${columnNum}
|
14376
14376
|
`;
|
14377
|
-
const
|
14378
|
-
const locationLine =
|
14377
|
+
const lines2 = body.split(/\r\n|[\n\r]/g);
|
14378
|
+
const locationLine = lines2[lineIndex];
|
14379
14379
|
if (locationLine.length > 120) {
|
14380
14380
|
const subLineIndex = Math.floor(columnNum / 80);
|
14381
14381
|
const subLineColumnNum = columnNum % 80;
|
@@ -14391,14 +14391,14 @@ var require_printLocation = __commonJS((exports) => {
|
|
14391
14391
|
]);
|
14392
14392
|
}
|
14393
14393
|
return locationStr + printPrefixedLines([
|
14394
|
-
[`${lineNum - 1} |`,
|
14394
|
+
[`${lineNum - 1} |`, lines2[lineIndex - 1]],
|
14395
14395
|
[`${lineNum} |`, locationLine],
|
14396
14396
|
["|", "^".padStart(columnNum)],
|
14397
|
-
[`${lineNum + 1} |`,
|
14397
|
+
[`${lineNum + 1} |`, lines2[lineIndex + 1]]
|
14398
14398
|
]);
|
14399
14399
|
}
|
14400
|
-
function printPrefixedLines(
|
14401
|
-
const existingLines =
|
14400
|
+
function printPrefixedLines(lines2) {
|
14401
|
+
const existingLines = lines2.filter(([_, line]) => line !== undefined);
|
14402
14402
|
const padLen = Math.max(...existingLines.map(([prefix]) => prefix.length));
|
14403
14403
|
return existingLines.map(([prefix, line]) => prefix.padStart(padLen) + (line ? " " + line : "")).join(`
|
14404
14404
|
`);
|
@@ -14811,14 +14811,14 @@ var require_blockString = __commonJS((exports) => {
|
|
14811
14811
|
exports.isPrintableAsBlockString = isPrintableAsBlockString;
|
14812
14812
|
exports.printBlockString = printBlockString;
|
14813
14813
|
var _characterClasses = require_characterClasses();
|
14814
|
-
function dedentBlockStringLines(
|
14814
|
+
function dedentBlockStringLines(lines2) {
|
14815
14815
|
var _firstNonEmptyLine2;
|
14816
14816
|
let commonIndent = Number.MAX_SAFE_INTEGER;
|
14817
14817
|
let firstNonEmptyLine = null;
|
14818
14818
|
let lastNonEmptyLine = -1;
|
14819
|
-
for (let i = 0;i <
|
14819
|
+
for (let i = 0;i < lines2.length; ++i) {
|
14820
14820
|
var _firstNonEmptyLine;
|
14821
|
-
const line =
|
14821
|
+
const line = lines2[i];
|
14822
14822
|
const indent = leadingWhitespace(line);
|
14823
14823
|
if (indent === line.length) {
|
14824
14824
|
continue;
|
@@ -14829,7 +14829,7 @@ var require_blockString = __commonJS((exports) => {
|
|
14829
14829
|
commonIndent = indent;
|
14830
14830
|
}
|
14831
14831
|
}
|
14832
|
-
return
|
14832
|
+
return lines2.map((line, i) => i === 0 ? line : line.slice(commonIndent)).slice((_firstNonEmptyLine2 = firstNonEmptyLine) !== null && _firstNonEmptyLine2 !== undefined ? _firstNonEmptyLine2 : 0, lastNonEmptyLine + 1);
|
14833
14833
|
}
|
14834
14834
|
function leadingWhitespace(str) {
|
14835
14835
|
let i = 0;
|
@@ -14891,9 +14891,9 @@ var require_blockString = __commonJS((exports) => {
|
|
14891
14891
|
}
|
14892
14892
|
function printBlockString(value, options) {
|
14893
14893
|
const escapedValue = value.replace(/"""/g, '\\"""');
|
14894
|
-
const
|
14895
|
-
const isSingleLine =
|
14896
|
-
const forceLeadingNewLine =
|
14894
|
+
const lines2 = escapedValue.split(/\r\n|[\n\r]/g);
|
14895
|
+
const isSingleLine = lines2.length === 1;
|
14896
|
+
const forceLeadingNewLine = lines2.length > 1 && lines2.slice(1).every((line) => line.length === 0 || (0, _characterClasses.isWhiteSpace)(line.charCodeAt(0)));
|
14897
14897
|
const hasTrailingTripleQuotes = escapedValue.endsWith('\\"""');
|
14898
14898
|
const hasTrailingQuote = value.endsWith('"') && !hasTrailingTripleQuotes;
|
14899
14899
|
const hasTrailingSlash = value.endsWith("\\");
|
@@ -34006,9 +34006,9 @@ var require_commonjs4 = __commonJS((exports) => {
|
|
34006
34006
|
this.#resolveCache = new ResolveCache2;
|
34007
34007
|
this.#resolvePosixCache = new ResolveCache2;
|
34008
34008
|
this.#children = new ChildrenCache2(childrenCacheSize);
|
34009
|
-
const
|
34010
|
-
if (
|
34011
|
-
|
34009
|
+
const split2 = cwdPath.substring(this.rootPath.length).split(sep2);
|
34010
|
+
if (split2.length === 1 && !split2[0]) {
|
34011
|
+
split2.pop();
|
34012
34012
|
}
|
34013
34013
|
if (nocase === undefined) {
|
34014
34014
|
throw new TypeError("must provide nocase setting to PathScurryBase ctor");
|
@@ -34017,11 +34017,11 @@ var require_commonjs4 = __commonJS((exports) => {
|
|
34017
34017
|
this.root = this.newRoot(this.#fs);
|
34018
34018
|
this.roots[this.rootPath] = this.root;
|
34019
34019
|
let prev = this.root;
|
34020
|
-
let len =
|
34020
|
+
let len = split2.length - 1;
|
34021
34021
|
const joinSep = pathImpl.sep;
|
34022
34022
|
let abs = this.rootPath;
|
34023
34023
|
let sawFirst = false;
|
34024
|
-
for (const part of
|
34024
|
+
for (const part of split2) {
|
34025
34025
|
const l2 = len--;
|
34026
34026
|
prev = prev.child(part, {
|
34027
34027
|
relative: new Array(l2).fill("..").join(joinSep),
|
@@ -37186,9 +37186,9 @@ var require_ini = __commonJS((exports, module) => {
|
|
37186
37186
|
let p = out;
|
37187
37187
|
let section = null;
|
37188
37188
|
const re = /^\[([^\]]*)\]\s*$|^([^=]+)(=(.*))?$/i;
|
37189
|
-
const
|
37189
|
+
const lines2 = str.split(/[\r\n]+/g);
|
37190
37190
|
const duplicates = {};
|
37191
|
-
for (const line of
|
37191
|
+
for (const line of lines2) {
|
37192
37192
|
if (!line || line.match(/^\s*[;#]/) || line.match(/^\s*$/)) {
|
37193
37193
|
continue;
|
37194
37194
|
}
|
@@ -39173,7 +39173,7 @@ var require_semver3 = __commonJS((exports, module) => {
|
|
39173
39173
|
// ../../node_modules/@npmcli/git/lib/lines-to-revs.js
|
39174
39174
|
var require_lines_to_revs = __commonJS((exports, module) => {
|
39175
39175
|
var semver = require_semver3();
|
39176
|
-
module.exports = (
|
39176
|
+
module.exports = (lines2) => finish(lines2.reduce(linesToRevsReducer, {
|
39177
39177
|
versions: {},
|
39178
39178
|
"dist-tags": {},
|
39179
39179
|
refs: {},
|
@@ -39234,12 +39234,12 @@ var require_lines_to_revs = __commonJS((exports, module) => {
|
|
39234
39234
|
return "other";
|
39235
39235
|
};
|
39236
39236
|
var lineToRevDoc = (line) => {
|
39237
|
-
const
|
39238
|
-
if (
|
39237
|
+
const split2 = line.trim().split(/\s+/, 2);
|
39238
|
+
if (split2.length < 2) {
|
39239
39239
|
return null;
|
39240
39240
|
}
|
39241
|
-
const sha =
|
39242
|
-
const rawRef =
|
39241
|
+
const sha = split2[0].trim();
|
39242
|
+
const rawRef = split2[1].trim();
|
39243
39243
|
const type2 = refType(rawRef);
|
39244
39244
|
if (type2 === "tag") {
|
39245
39245
|
const ref = rawRef.slice("refs/tags/".length);
|
@@ -46994,17 +46994,17 @@ var require_normalize_data = __commonJS((exports, module) => {
|
|
46994
46994
|
};
|
46995
46995
|
var isEmail = (str) => str.includes("@") && str.indexOf("@") < str.lastIndexOf(".");
|
46996
46996
|
function extractDescription(description) {
|
46997
|
-
const
|
46997
|
+
const lines2 = description.trim().split(`
|
46998
46998
|
`);
|
46999
46999
|
let start = 0;
|
47000
|
-
while (
|
47000
|
+
while (lines2[start]?.trim().match(/^(#|$)/)) {
|
47001
47001
|
start++;
|
47002
47002
|
}
|
47003
47003
|
let end = start + 1;
|
47004
|
-
while (end <
|
47004
|
+
while (end < lines2.length && lines2[end].trim()) {
|
47005
47005
|
end++;
|
47006
47006
|
}
|
47007
|
-
return
|
47007
|
+
return lines2.slice(start, end).join(" ").trim();
|
47008
47008
|
}
|
47009
47009
|
function stringifyPerson(person) {
|
47010
47010
|
if (typeof person !== "string") {
|
@@ -67380,9 +67380,9 @@ ${lanes.join(`
|
|
67380
67380
|
return node.kind === 183 || node.kind === 233;
|
67381
67381
|
}
|
67382
67382
|
var MAX_SMI_X86 = 1073741823;
|
67383
|
-
function guessIndentation(
|
67383
|
+
function guessIndentation(lines2) {
|
67384
67384
|
let indentation = MAX_SMI_X86;
|
67385
|
-
for (const line of
|
67385
|
+
for (const line of lines2) {
|
67386
67386
|
if (!line.length) {
|
67387
67387
|
continue;
|
67388
67388
|
}
|
@@ -155720,8 +155720,8 @@ ${lanes.join(`
|
|
155720
155720
|
if (node.comment) {
|
155721
155721
|
const text = getTextOfJSDocComment(node.comment);
|
155722
155722
|
if (text) {
|
155723
|
-
const
|
155724
|
-
for (const line of
|
155723
|
+
const lines2 = text.split(/\r\n?|\n/);
|
155724
|
+
for (const line of lines2) {
|
155725
155725
|
writeLine();
|
155726
155726
|
writeSpace();
|
155727
155727
|
writePunctuation("*");
|
@@ -156365,9 +156365,9 @@ ${lanes.join(`
|
|
156365
156365
|
if (getEmitFlags(parentNode) & 1) {
|
156366
156366
|
writeSpace();
|
156367
156367
|
} else if (preserveSourceNewlines) {
|
156368
|
-
const
|
156369
|
-
if (
|
156370
|
-
writeLine(
|
156368
|
+
const lines2 = getLinesBetweenNodes(parentNode, prevChildNode, nextChildNode);
|
156369
|
+
if (lines2) {
|
156370
|
+
writeLine(lines2);
|
156371
156371
|
} else {
|
156372
156372
|
writeSpace();
|
156373
156373
|
}
|
@@ -156376,9 +156376,9 @@ ${lanes.join(`
|
|
156376
156376
|
}
|
156377
156377
|
}
|
156378
156378
|
function writeLines(text) {
|
156379
|
-
const
|
156380
|
-
const indentation = guessIndentation(
|
156381
|
-
for (const lineText of
|
156379
|
+
const lines2 = text.split(/\r\n?|\n/);
|
156380
|
+
const indentation = guessIndentation(lines2);
|
156381
|
+
for (const lineText of lines2) {
|
156382
156382
|
const line = indentation ? lineText.slice(indentation) : lineText;
|
156383
156383
|
if (line.length) {
|
156384
156384
|
writeLine();
|
@@ -156476,11 +156476,11 @@ ${lanes.join(`
|
|
156476
156476
|
}
|
156477
156477
|
function getEffectiveLines(getLineDifference) {
|
156478
156478
|
Debug.assert(!!preserveSourceNewlines);
|
156479
|
-
const
|
156480
|
-
if (
|
156479
|
+
const lines2 = getLineDifference(true);
|
156480
|
+
if (lines2 === 0) {
|
156481
156481
|
return getLineDifference(false);
|
156482
156482
|
}
|
156483
|
-
return
|
156483
|
+
return lines2;
|
156484
156484
|
}
|
156485
156485
|
function writeLineSeparatorsAndIndentBefore(node, parent2) {
|
156486
156486
|
const leadingNewlines = preserveSourceNewlines && getLeadingLineTerminatorCount(parent2, node, 0);
|
@@ -166738,7 +166738,7 @@ ${lanes.join(`
|
|
166738
166738
|
function generateOptionOutput(sys2, option, rightAlignOfLeft, leftAlignOfRight) {
|
166739
166739
|
var _a;
|
166740
166740
|
const text = [];
|
166741
|
-
const
|
166741
|
+
const colors3 = createColors(sys2);
|
166742
166742
|
const name = getDisplayNameTextOfOption(option);
|
166743
166743
|
const valueCandidates = getValueCandidate(option);
|
166744
166744
|
const defaultValueDescription = typeof option.defaultValueDescription === "object" ? getDiagnosticText(option.defaultValueDescription) : formatDefaultValue(option.defaultValueDescription, option.type === "list" || option.type === "listOrElement" ? option.element.type : option.type);
|
@@ -166759,7 +166759,7 @@ ${lanes.join(`
|
|
166759
166759
|
}
|
166760
166760
|
text.push(sys2.newLine);
|
166761
166761
|
} else {
|
166762
|
-
text.push(
|
166762
|
+
text.push(colors3.blue(name), sys2.newLine);
|
166763
166763
|
if (option.description) {
|
166764
166764
|
const description3 = getDiagnosticText(option.description);
|
166765
166765
|
text.push(description3);
|
@@ -166804,7 +166804,7 @@ ${lanes.join(`
|
|
166804
166804
|
if (isFirstLine) {
|
166805
166805
|
curLeft = left.padStart(rightAlignOfLeft2);
|
166806
166806
|
curLeft = curLeft.padEnd(leftAlignOfRight2);
|
166807
|
-
curLeft = colorLeft ?
|
166807
|
+
curLeft = colorLeft ? colors3.blue(curLeft) : curLeft;
|
166808
166808
|
} else {
|
166809
166809
|
curLeft = "".padStart(leftAlignOfRight2);
|
166810
166810
|
}
|
@@ -166873,15 +166873,15 @@ ${lanes.join(`
|
|
166873
166873
|
}
|
166874
166874
|
const rightAlignOfLeftPart = maxLength2 + 2;
|
166875
166875
|
const leftAlignOfRightPart = rightAlignOfLeftPart + 2;
|
166876
|
-
let
|
166876
|
+
let lines2 = [];
|
166877
166877
|
for (const option of optionsList) {
|
166878
166878
|
const tmp = generateOptionOutput(sys2, option, rightAlignOfLeftPart, leftAlignOfRightPart);
|
166879
|
-
|
166879
|
+
lines2 = [...lines2, ...tmp];
|
166880
166880
|
}
|
166881
|
-
if (
|
166882
|
-
|
166881
|
+
if (lines2[lines2.length - 2] !== sys2.newLine) {
|
166882
|
+
lines2.push(sys2.newLine);
|
166883
166883
|
}
|
166884
|
-
return
|
166884
|
+
return lines2;
|
166885
166885
|
}
|
166886
166886
|
function generateSectionOptionsOutput(sys2, sectionName, options, subCategory, beforeOptionsDescription, afterOptionsDescription) {
|
166887
166887
|
let res = [];
|
@@ -166916,9 +166916,9 @@ ${lanes.join(`
|
|
166916
166916
|
return res;
|
166917
166917
|
}
|
166918
166918
|
function printEasyHelp(sys2, simpleOptions) {
|
166919
|
-
const
|
166919
|
+
const colors3 = createColors(sys2);
|
166920
166920
|
let output = [...getHeader(sys2, `${getDiagnosticText(Diagnostics.tsc_Colon_The_TypeScript_Compiler)} - ${getDiagnosticText(Diagnostics.Version_0, version)}`)];
|
166921
|
-
output.push(
|
166921
|
+
output.push(colors3.bold(getDiagnosticText(Diagnostics.COMMON_COMMANDS)) + sys2.newLine + sys2.newLine);
|
166922
166922
|
example("tsc", Diagnostics.Compiles_the_current_project_tsconfig_json_in_the_working_directory);
|
166923
166923
|
example("tsc app.ts util.ts", Diagnostics.Ignoring_tsconfig_json_compiles_the_specified_files_with_default_compiler_options);
|
166924
166924
|
example("tsc -b", Diagnostics.Build_a_composite_project_in_the_working_directory);
|
@@ -166939,7 +166939,7 @@ ${lanes.join(`
|
|
166939
166939
|
function example(ex, desc) {
|
166940
166940
|
const examples = typeof ex === "string" ? [ex] : ex;
|
166941
166941
|
for (const example2 of examples) {
|
166942
|
-
output.push(" " +
|
166942
|
+
output.push(" " + colors3.blue(example2) + sys2.newLine);
|
166943
166943
|
}
|
166944
166944
|
output.push(" " + getDiagnosticText(desc) + sys2.newLine + sys2.newLine);
|
166945
166945
|
}
|
@@ -166962,12 +166962,12 @@ ${lanes.join(`
|
|
166962
166962
|
}
|
166963
166963
|
function getHeader(sys2, message) {
|
166964
166964
|
var _a;
|
166965
|
-
const
|
166965
|
+
const colors3 = createColors(sys2);
|
166966
166966
|
const header = [];
|
166967
166967
|
const terminalWidth = ((_a = sys2.getWidthOfTerminal) == null ? undefined : _a.call(sys2)) ?? 0;
|
166968
166968
|
const tsIconLength = 5;
|
166969
|
-
const tsIconFirstLine =
|
166970
|
-
const tsIconSecondLine =
|
166969
|
+
const tsIconFirstLine = colors3.blueBackground("".padStart(tsIconLength));
|
166970
|
+
const tsIconSecondLine = colors3.blueBackground(colors3.brightWhite("TS ".padStart(tsIconLength)));
|
166971
166971
|
if (terminalWidth >= message.length + tsIconLength) {
|
166972
166972
|
const rightAlign = terminalWidth > 120 ? 120 : terminalWidth;
|
166973
166973
|
const leftAlign = rightAlign - tsIconLength;
|
@@ -218657,9 +218657,9 @@ ${e3.message}`;
|
|
218657
218657
|
insertedText = this.initialText + this.trailingText;
|
218658
218658
|
}
|
218659
218659
|
const lm = LineIndex.linesFromText(insertedText);
|
218660
|
-
const
|
218661
|
-
if (
|
218662
|
-
|
218660
|
+
const lines2 = lm.lines;
|
218661
|
+
if (lines2.length > 1 && lines2[lines2.length - 1] === "") {
|
218662
|
+
lines2.pop();
|
218663
218663
|
}
|
218664
218664
|
let branchParent;
|
218665
218665
|
let lastZeroCount;
|
@@ -218678,13 +218678,13 @@ ${e3.message}`;
|
|
218678
218678
|
branchParent.remove(lastZeroCount);
|
218679
218679
|
}
|
218680
218680
|
const leafNode = this.startPath[this.startPath.length - 1];
|
218681
|
-
if (
|
218682
|
-
leafNode.text =
|
218683
|
-
if (
|
218684
|
-
let insertedNodes = new Array(
|
218681
|
+
if (lines2.length > 0) {
|
218682
|
+
leafNode.text = lines2[0];
|
218683
|
+
if (lines2.length > 1) {
|
218684
|
+
let insertedNodes = new Array(lines2.length - 1);
|
218685
218685
|
let startNode2 = leafNode;
|
218686
|
-
for (let i2 = 1;i2 <
|
218687
|
-
insertedNodes[i2 - 1] = new LineLeaf(
|
218686
|
+
for (let i2 = 1;i2 < lines2.length; i2++) {
|
218687
|
+
insertedNodes[i2 - 1] = new LineLeaf(lines2[i2]);
|
218688
218688
|
}
|
218689
218689
|
let pathIndex = this.startPath.length - 2;
|
218690
218690
|
while (pathIndex >= 0) {
|
@@ -218954,11 +218954,11 @@ ${e3.message}`;
|
|
218954
218954
|
return { absolutePosition: this.root.charCount(), lineText: undefined };
|
218955
218955
|
}
|
218956
218956
|
}
|
218957
|
-
load(
|
218958
|
-
if (
|
218957
|
+
load(lines2) {
|
218958
|
+
if (lines2.length > 0) {
|
218959
218959
|
const leaves = [];
|
218960
|
-
for (let i2 = 0;i2 <
|
218961
|
-
leaves[i2] = new LineLeaf(
|
218960
|
+
for (let i2 = 0;i2 < lines2.length; i2++) {
|
218961
|
+
leaves[i2] = new LineLeaf(lines2[i2]);
|
218962
218962
|
}
|
218963
218963
|
this.root = _LineIndex.buildTreeFromBottom(leaves);
|
218964
218964
|
} else {
|
@@ -219061,18 +219061,18 @@ ${e3.message}`;
|
|
219061
219061
|
if (lineMap.length === 0) {
|
219062
219062
|
return { lines: [], lineMap };
|
219063
219063
|
}
|
219064
|
-
const
|
219064
|
+
const lines2 = new Array(lineMap.length);
|
219065
219065
|
const lc = lineMap.length - 1;
|
219066
219066
|
for (let lmi = 0;lmi < lc; lmi++) {
|
219067
|
-
|
219067
|
+
lines2[lmi] = text.substring(lineMap[lmi], lineMap[lmi + 1]);
|
219068
219068
|
}
|
219069
219069
|
const endText = text.substring(lineMap[lc]);
|
219070
219070
|
if (endText.length > 0) {
|
219071
|
-
|
219071
|
+
lines2[lc] = endText;
|
219072
219072
|
} else {
|
219073
|
-
|
219073
|
+
lines2.pop();
|
219074
219074
|
}
|
219075
|
-
return { lines, lineMap };
|
219075
|
+
return { lines: lines2, lineMap };
|
219076
219076
|
}
|
219077
219077
|
};
|
219078
219078
|
var LineNode = class _LineNode {
|
@@ -220152,7 +220152,7 @@ async function* streamBody(e4) {
|
|
220152
220152
|
}
|
220153
220153
|
}
|
220154
220154
|
}
|
220155
|
-
async function*
|
220155
|
+
async function* split2(e4, r3) {
|
220156
220156
|
var a4 = "";
|
220157
220157
|
var n3;
|
220158
220158
|
for await (var t4 of e4) {
|
@@ -220186,7 +220186,7 @@ function makeFetchSource(e4, r3, a4) {
|
|
220186
220186
|
var n5 = "--" + (a6 ? a6[1] : "-");
|
220187
220187
|
var t5 = true;
|
220188
220188
|
var i4;
|
220189
|
-
for await (var o4 of
|
220189
|
+
for await (var o4 of split2(streamBody(r5), `\r
|
220190
220190
|
` + n5)) {
|
220191
220191
|
if (t5) {
|
220192
220192
|
t5 = false;
|
@@ -220219,7 +220219,7 @@ function makeFetchSource(e4, r3, a4) {
|
|
220219
220219
|
} else if (/text\/event-stream/i.test(o3)) {
|
220220
220220
|
s3 = async function* parseEventStream(e6) {
|
220221
220221
|
var r5;
|
220222
|
-
for await (var a6 of
|
220222
|
+
for await (var a6 of split2(streamBody(e6), `
|
220223
220223
|
|
220224
220224
|
`)) {
|
220225
220225
|
var n5 = a6.match(S);
|
@@ -241158,8 +241158,8 @@ var require_mkdir = __commonJS((exports, module) => {
|
|
241158
241158
|
return "CwdError";
|
241159
241159
|
}
|
241160
241160
|
}
|
241161
|
-
var cGet = (cache,
|
241162
|
-
var cSet = (cache,
|
241161
|
+
var cGet = (cache, key3) => cache.get(normPath(key3));
|
241162
|
+
var cSet = (cache, key3, val) => cache.set(normPath(key3), val);
|
241163
241163
|
var checkCwd = (dir, cb) => {
|
241164
241164
|
fs3.stat(dir, (er2, st2) => {
|
241165
241165
|
if (er2 || !st2.isDirectory()) {
|
@@ -241530,8 +241530,8 @@ var require_unpack = __commonJS((exports, module) => {
|
|
241530
241530
|
}
|
241531
241531
|
};
|
241532
241532
|
var dropCache = (cache) => {
|
241533
|
-
for (const
|
241534
|
-
cache.delete(
|
241533
|
+
for (const key3 of cache.keys()) {
|
241534
|
+
cache.delete(key3);
|
241535
241535
|
}
|
241536
241536
|
};
|
241537
241537
|
|
@@ -246328,8 +246328,8 @@ var require_lib13 = __commonJS((exports, module) => {
|
|
246328
246328
|
function fetch2(input, options) {
|
246329
246329
|
return nodeFetch.fetch(input, options);
|
246330
246330
|
}
|
246331
|
-
for (const
|
246332
|
-
fetch2[
|
246331
|
+
for (const key3 in nodeFetch) {
|
246332
|
+
fetch2[key3] = nodeFetch[key3];
|
246333
246333
|
}
|
246334
246334
|
module.exports = fetch2;
|
246335
246335
|
});
|
@@ -246422,11 +246422,11 @@ var require_proxy = __commonJS((exports) => {
|
|
246422
246422
|
return hasRequiredSymbols$4 || (hasRequiredSymbols$4 = 1, symbols$4 = { kClose: Symbol("close"), kDestroy: Symbol("destroy"), kDispatch: Symbol("dispatch"), kUrl: Symbol("url"), kWriting: Symbol("writing"), kResuming: Symbol("resuming"), kQueue: Symbol("queue"), kConnect: Symbol("connect"), kConnecting: Symbol("connecting"), kKeepAliveDefaultTimeout: Symbol("default keep alive timeout"), kKeepAliveMaxTimeout: Symbol("max keep alive timeout"), kKeepAliveTimeoutThreshold: Symbol("keep alive timeout threshold"), kKeepAliveTimeoutValue: Symbol("keep alive timeout"), kKeepAlive: Symbol("keep alive"), kHeadersTimeout: Symbol("headers timeout"), kBodyTimeout: Symbol("body timeout"), kServerName: Symbol("server name"), kLocalAddress: Symbol("local address"), kHost: Symbol("host"), kNoRef: Symbol("no ref"), kBodyUsed: Symbol("used"), kBody: Symbol("abstracted request body"), kRunning: Symbol("running"), kBlocking: Symbol("blocking"), kPending: Symbol("pending"), kSize: Symbol("size"), kBusy: Symbol("busy"), kQueued: Symbol("queued"), kFree: Symbol("free"), kConnected: Symbol("connected"), kClosed: Symbol("closed"), kNeedDrain: Symbol("need drain"), kReset: Symbol("reset"), kDestroyed: Symbol.for("nodejs.stream.destroyed"), kResume: Symbol("resume"), kOnError: Symbol("on error"), kMaxHeadersSize: Symbol("max headers size"), kRunningIdx: Symbol("running index"), kPendingIdx: Symbol("pending index"), kError: Symbol("error"), kClients: Symbol("clients"), kClient: Symbol("client"), kParser: Symbol("parser"), kOnDestroyed: Symbol("destroy callbacks"), kPipelining: Symbol("pipelining"), kSocket: Symbol("socket"), kHostHeader: Symbol("host header"), kConnector: Symbol("connector"), kStrictContentLength: Symbol("strict content length"), kMaxRedirections: Symbol("maxRedirections"), kMaxRequests: Symbol("maxRequestsPerClient"), kProxy: Symbol("proxy agent options"), kCounter: Symbol("socket request counter"), kInterceptors: Symbol("dispatch interceptors"), kMaxResponseSize: Symbol("max response size"), kHTTP2Session: Symbol("http2Session"), kHTTP2SessionState: Symbol("http2Session state"), kRetryHandlerDefaultRetry: Symbol("retry agent default retry"), kConstruct: Symbol("constructable"), kListeners: Symbol("listeners"), kHTTPContext: Symbol("http context"), kMaxConcurrentStreams: Symbol("max concurrent streams"), kNoProxyAgent: Symbol("no proxy agent"), kHttpProxyAgent: Symbol("http proxy agent"), kHttpsProxyAgent: Symbol("https proxy agent") }), symbols$4;
|
246423
246423
|
}
|
246424
246424
|
e10(requireSymbols$4, "requireSymbols$4");
|
246425
|
-
var
|
246425
|
+
var errors3;
|
246426
246426
|
var hasRequiredErrors;
|
246427
246427
|
function requireErrors() {
|
246428
246428
|
if (hasRequiredErrors)
|
246429
|
-
return
|
246429
|
+
return errors3;
|
246430
246430
|
hasRequiredErrors = 1;
|
246431
246431
|
|
246432
246432
|
class A5 extends Error {
|
@@ -246635,7 +246635,7 @@ var require_proxy = __commonJS((exports) => {
|
|
246635
246635
|
super(i6, { cause: k5, ...F3 ?? {} }), this.name = "SecureProxyConnectionError", this.message = i6 || "Secure Proxy Connection failed", this.code = "UND_ERR_PRX_TLS", this.cause = k5;
|
246636
246636
|
}
|
246637
246637
|
}
|
246638
|
-
return
|
246638
|
+
return errors3 = { AbortError: Q4, HTTPParserError: Y4, UndiciError: A5, HeadersTimeoutError: c3, HeadersOverflowError: E6, BodyTimeoutError: t8, RequestContentLengthMismatchError: r6, ConnectTimeoutError: p6, ResponseStatusCodeError: B4, InvalidArgumentError: f6, InvalidReturnValueError: l3, RequestAbortedError: u6, ClientDestroyedError: a7, ClientClosedError: g6, InformationalError: n6, SocketError: d6, NotSupportedError: N6, ResponseContentLengthMismatchError: o8, BalancedPoolMissingUpstreamError: M5, ResponseExceededMaxSizeError: J4, RequestRetryError: V5, ResponseError: H4, SecureProxyConnectionError: h7 }, errors3;
|
246639
246639
|
}
|
246640
246640
|
e10(requireErrors, "requireErrors");
|
246641
246641
|
var constants$4;
|
@@ -256608,11 +256608,11 @@ var require_visit = __commonJS((exports) => {
|
|
256608
256608
|
visit2.BREAK = BREAK;
|
256609
256609
|
visit2.SKIP = SKIP;
|
256610
256610
|
visit2.REMOVE = REMOVE;
|
256611
|
-
function visit_(
|
256612
|
-
const ctrl = callVisitor(
|
256611
|
+
function visit_(key3, node, visitor, path5) {
|
256612
|
+
const ctrl = callVisitor(key3, node, visitor, path5);
|
256613
256613
|
if (identity2.isNode(ctrl) || identity2.isPair(ctrl)) {
|
256614
|
-
replaceNode(
|
256615
|
-
return visit_(
|
256614
|
+
replaceNode(key3, path5, ctrl);
|
256615
|
+
return visit_(key3, ctrl, visitor, path5);
|
256616
256616
|
}
|
256617
256617
|
if (typeof ctrl !== "symbol") {
|
256618
256618
|
if (identity2.isCollection(node)) {
|
@@ -256656,11 +256656,11 @@ var require_visit = __commonJS((exports) => {
|
|
256656
256656
|
visitAsync.BREAK = BREAK;
|
256657
256657
|
visitAsync.SKIP = SKIP;
|
256658
256658
|
visitAsync.REMOVE = REMOVE;
|
256659
|
-
async function visitAsync_(
|
256660
|
-
const ctrl = await callVisitor(
|
256659
|
+
async function visitAsync_(key3, node, visitor, path5) {
|
256660
|
+
const ctrl = await callVisitor(key3, node, visitor, path5);
|
256661
256661
|
if (identity2.isNode(ctrl) || identity2.isPair(ctrl)) {
|
256662
|
-
replaceNode(
|
256663
|
-
return visitAsync_(
|
256662
|
+
replaceNode(key3, path5, ctrl);
|
256663
|
+
return visitAsync_(key3, ctrl, visitor, path5);
|
256664
256664
|
}
|
256665
256665
|
if (typeof ctrl !== "symbol") {
|
256666
256666
|
if (identity2.isCollection(node)) {
|
@@ -256710,27 +256710,27 @@ var require_visit = __commonJS((exports) => {
|
|
256710
256710
|
}
|
256711
256711
|
return visitor;
|
256712
256712
|
}
|
256713
|
-
function callVisitor(
|
256713
|
+
function callVisitor(key3, node, visitor, path5) {
|
256714
256714
|
if (typeof visitor === "function")
|
256715
|
-
return visitor(
|
256715
|
+
return visitor(key3, node, path5);
|
256716
256716
|
if (identity2.isMap(node))
|
256717
|
-
return visitor.Map?.(
|
256717
|
+
return visitor.Map?.(key3, node, path5);
|
256718
256718
|
if (identity2.isSeq(node))
|
256719
|
-
return visitor.Seq?.(
|
256719
|
+
return visitor.Seq?.(key3, node, path5);
|
256720
256720
|
if (identity2.isPair(node))
|
256721
|
-
return visitor.Pair?.(
|
256721
|
+
return visitor.Pair?.(key3, node, path5);
|
256722
256722
|
if (identity2.isScalar(node))
|
256723
|
-
return visitor.Scalar?.(
|
256723
|
+
return visitor.Scalar?.(key3, node, path5);
|
256724
256724
|
if (identity2.isAlias(node))
|
256725
|
-
return visitor.Alias?.(
|
256725
|
+
return visitor.Alias?.(key3, node, path5);
|
256726
256726
|
return;
|
256727
256727
|
}
|
256728
|
-
function replaceNode(
|
256728
|
+
function replaceNode(key3, path5, node) {
|
256729
256729
|
const parent = path5[path5.length - 1];
|
256730
256730
|
if (identity2.isCollection(parent)) {
|
256731
|
-
parent.items[
|
256731
|
+
parent.items[key3] = node;
|
256732
256732
|
} else if (identity2.isPair(parent)) {
|
256733
|
-
if (
|
256733
|
+
if (key3 === "key")
|
256734
256734
|
parent.key = node;
|
256735
256735
|
else
|
256736
256736
|
parent.value = node;
|
@@ -256962,7 +256962,7 @@ var require_anchors = __commonJS((exports) => {
|
|
256962
256962
|
|
256963
256963
|
// ../../node_modules/yaml/dist/doc/applyReviver.js
|
256964
256964
|
var require_applyReviver = __commonJS((exports) => {
|
256965
|
-
function applyReviver(reviver, obj,
|
256965
|
+
function applyReviver(reviver, obj, key3, val) {
|
256966
256966
|
if (val && typeof val === "object") {
|
256967
256967
|
if (Array.isArray(val)) {
|
256968
256968
|
for (let i6 = 0, len = val.length;i6 < len; ++i6) {
|
@@ -257002,7 +257002,7 @@ var require_applyReviver = __commonJS((exports) => {
|
|
257002
257002
|
}
|
257003
257003
|
}
|
257004
257004
|
}
|
257005
|
-
return reviver.call(obj,
|
257005
|
+
return reviver.call(obj, key3, val);
|
257006
257006
|
}
|
257007
257007
|
exports.applyReviver = applyReviver;
|
257008
257008
|
});
|
@@ -257320,29 +257320,29 @@ var require_Collection = __commonJS((exports) => {
|
|
257320
257320
|
if (isEmptyPath(path5))
|
257321
257321
|
this.add(value4);
|
257322
257322
|
else {
|
257323
|
-
const [
|
257324
|
-
const node = this.get(
|
257323
|
+
const [key3, ...rest] = path5;
|
257324
|
+
const node = this.get(key3, true);
|
257325
257325
|
if (identity2.isCollection(node))
|
257326
257326
|
node.addIn(rest, value4);
|
257327
257327
|
else if (node === undefined && this.schema)
|
257328
|
-
this.set(
|
257328
|
+
this.set(key3, collectionFromPath(this.schema, rest, value4));
|
257329
257329
|
else
|
257330
|
-
throw new Error(`Expected YAML collection at ${
|
257330
|
+
throw new Error(`Expected YAML collection at ${key3}. Remaining path: ${rest}`);
|
257331
257331
|
}
|
257332
257332
|
}
|
257333
257333
|
deleteIn(path5) {
|
257334
|
-
const [
|
257334
|
+
const [key3, ...rest] = path5;
|
257335
257335
|
if (rest.length === 0)
|
257336
|
-
return this.delete(
|
257337
|
-
const node = this.get(
|
257336
|
+
return this.delete(key3);
|
257337
|
+
const node = this.get(key3, true);
|
257338
257338
|
if (identity2.isCollection(node))
|
257339
257339
|
return node.deleteIn(rest);
|
257340
257340
|
else
|
257341
|
-
throw new Error(`Expected YAML collection at ${
|
257341
|
+
throw new Error(`Expected YAML collection at ${key3}. Remaining path: ${rest}`);
|
257342
257342
|
}
|
257343
257343
|
getIn(path5, keepScalar) {
|
257344
|
-
const [
|
257345
|
-
const node = this.get(
|
257344
|
+
const [key3, ...rest] = path5;
|
257345
|
+
const node = this.get(key3, true);
|
257346
257346
|
if (rest.length === 0)
|
257347
257347
|
return !keepScalar && identity2.isScalar(node) ? node.value : node;
|
257348
257348
|
else
|
@@ -257357,24 +257357,24 @@ var require_Collection = __commonJS((exports) => {
|
|
257357
257357
|
});
|
257358
257358
|
}
|
257359
257359
|
hasIn(path5) {
|
257360
|
-
const [
|
257360
|
+
const [key3, ...rest] = path5;
|
257361
257361
|
if (rest.length === 0)
|
257362
|
-
return this.has(
|
257363
|
-
const node = this.get(
|
257362
|
+
return this.has(key3);
|
257363
|
+
const node = this.get(key3, true);
|
257364
257364
|
return identity2.isCollection(node) ? node.hasIn(rest) : false;
|
257365
257365
|
}
|
257366
257366
|
setIn(path5, value4) {
|
257367
|
-
const [
|
257367
|
+
const [key3, ...rest] = path5;
|
257368
257368
|
if (rest.length === 0) {
|
257369
|
-
this.set(
|
257369
|
+
this.set(key3, value4);
|
257370
257370
|
} else {
|
257371
|
-
const node = this.get(
|
257371
|
+
const node = this.get(key3, true);
|
257372
257372
|
if (identity2.isCollection(node))
|
257373
257373
|
node.setIn(rest, value4);
|
257374
257374
|
else if (node === undefined && this.schema)
|
257375
|
-
this.set(
|
257375
|
+
this.set(key3, collectionFromPath(this.schema, rest, value4));
|
257376
257376
|
else
|
257377
|
-
throw new Error(`Expected YAML collection at ${
|
257377
|
+
throw new Error(`Expected YAML collection at ${key3}. Remaining path: ${rest}`);
|
257378
257378
|
}
|
257379
257379
|
}
|
257380
257380
|
}
|
@@ -257962,19 +257962,19 @@ var require_stringifyPair = __commonJS((exports) => {
|
|
257962
257962
|
var Scalar = require_Scalar();
|
257963
257963
|
var stringify3 = require_stringify();
|
257964
257964
|
var stringifyComment = require_stringifyComment();
|
257965
|
-
function stringifyPair2({ key:
|
257965
|
+
function stringifyPair2({ key: key3, value: value4 }, ctx, onComment, onChompKeep) {
|
257966
257966
|
const { allNullValues, doc, indent: indent2, indentStep, options: { commentString, indentSeq, simpleKeys } } = ctx;
|
257967
|
-
let keyComment = identity2.isNode(
|
257967
|
+
let keyComment = identity2.isNode(key3) && key3.comment || null;
|
257968
257968
|
if (simpleKeys) {
|
257969
257969
|
if (keyComment) {
|
257970
257970
|
throw new Error("With simple keys, key nodes cannot have comments");
|
257971
257971
|
}
|
257972
|
-
if (identity2.isCollection(
|
257972
|
+
if (identity2.isCollection(key3) || !identity2.isNode(key3) && typeof key3 === "object") {
|
257973
257973
|
const msg = "With simple keys, collection cannot be used as a key value";
|
257974
257974
|
throw new Error(msg);
|
257975
257975
|
}
|
257976
257976
|
}
|
257977
|
-
let explicitKey = !simpleKeys && (!
|
257977
|
+
let explicitKey = !simpleKeys && (!key3 || keyComment && value4 == null && !ctx.inFlow || identity2.isCollection(key3) || (identity2.isScalar(key3) ? key3.type === Scalar.Scalar.BLOCK_FOLDED || key3.type === Scalar.Scalar.BLOCK_LITERAL : typeof key3 === "object"));
|
257978
257978
|
ctx = Object.assign({}, ctx, {
|
257979
257979
|
allNullValues: false,
|
257980
257980
|
implicitKey: !explicitKey && (simpleKeys || !allNullValues),
|
@@ -257982,7 +257982,7 @@ var require_stringifyPair = __commonJS((exports) => {
|
|
257982
257982
|
});
|
257983
257983
|
let keyCommentDone = false;
|
257984
257984
|
let chompKeep = false;
|
257985
|
-
let str = stringify3.stringify(
|
257985
|
+
let str = stringify3.stringify(key3, ctx, () => keyCommentDone = true, () => chompKeep = true);
|
257986
257986
|
if (!explicitKey && !ctx.inFlow && str.length > 1024) {
|
257987
257987
|
if (simpleKeys)
|
257988
257988
|
throw new Error("With simple keys, single line scalar must not span more than 1024 characters");
|
@@ -258126,7 +258126,7 @@ var require_merge = __commonJS((exports) => {
|
|
258126
258126
|
}),
|
258127
258127
|
stringify: () => MERGE_KEY
|
258128
258128
|
};
|
258129
|
-
var isMergeKey = (ctx,
|
258129
|
+
var isMergeKey = (ctx, key3) => (merge3.identify(key3) || identity2.isScalar(key3) && (!key3.type || key3.type === Scalar.Scalar.PLAIN) && merge3.identify(key3.value)) && ctx?.doc.schema.tags.some((tag) => tag.tag === merge3.tag && tag.default);
|
258130
258130
|
function addMergeToJSMap(ctx, map3, value4) {
|
258131
258131
|
value4 = ctx && identity2.isAlias(value4) ? value4.resolve(ctx.doc) : value4;
|
258132
258132
|
if (identity2.isSeq(value4))
|
@@ -258143,14 +258143,14 @@ var require_merge = __commonJS((exports) => {
|
|
258143
258143
|
if (!identity2.isMap(source))
|
258144
258144
|
throw new Error("Merge sources must be maps or map aliases");
|
258145
258145
|
const srcMap = source.toJSON(null, ctx, Map);
|
258146
|
-
for (const [
|
258146
|
+
for (const [key3, value5] of srcMap) {
|
258147
258147
|
if (map3 instanceof Map) {
|
258148
|
-
if (!map3.has(
|
258149
|
-
map3.set(
|
258148
|
+
if (!map3.has(key3))
|
258149
|
+
map3.set(key3, value5);
|
258150
258150
|
} else if (map3 instanceof Set) {
|
258151
|
-
map3.add(
|
258152
|
-
} else if (!Object.prototype.hasOwnProperty.call(map3,
|
258153
|
-
Object.defineProperty(map3,
|
258151
|
+
map3.add(key3);
|
258152
|
+
} else if (!Object.prototype.hasOwnProperty.call(map3, key3)) {
|
258153
|
+
Object.defineProperty(map3, key3, {
|
258154
258154
|
value: value5,
|
258155
258155
|
writable: true,
|
258156
258156
|
enumerable: true,
|
@@ -258172,19 +258172,19 @@ var require_addPairToJSMap = __commonJS((exports) => {
|
|
258172
258172
|
var stringify3 = require_stringify();
|
258173
258173
|
var identity2 = require_identity();
|
258174
258174
|
var toJS = require_toJS();
|
258175
|
-
function addPairToJSMap(ctx, map3, { key:
|
258176
|
-
if (identity2.isNode(
|
258177
|
-
|
258178
|
-
else if (merge3.isMergeKey(ctx,
|
258175
|
+
function addPairToJSMap(ctx, map3, { key: key3, value: value4 }) {
|
258176
|
+
if (identity2.isNode(key3) && key3.addToJSMap)
|
258177
|
+
key3.addToJSMap(ctx, map3, value4);
|
258178
|
+
else if (merge3.isMergeKey(ctx, key3))
|
258179
258179
|
merge3.addMergeToJSMap(ctx, map3, value4);
|
258180
258180
|
else {
|
258181
|
-
const jsKey = toJS.toJS(
|
258181
|
+
const jsKey = toJS.toJS(key3, "", ctx);
|
258182
258182
|
if (map3 instanceof Map) {
|
258183
258183
|
map3.set(jsKey, toJS.toJS(value4, jsKey, ctx));
|
258184
258184
|
} else if (map3 instanceof Set) {
|
258185
258185
|
map3.add(jsKey);
|
258186
258186
|
} else {
|
258187
|
-
const stringKey = stringifyKey(
|
258187
|
+
const stringKey = stringifyKey(key3, jsKey, ctx);
|
258188
258188
|
const jsValue = toJS.toJS(value4, stringKey, ctx);
|
258189
258189
|
if (stringKey in map3)
|
258190
258190
|
Object.defineProperty(map3, stringKey, {
|
@@ -258199,19 +258199,19 @@ var require_addPairToJSMap = __commonJS((exports) => {
|
|
258199
258199
|
}
|
258200
258200
|
return map3;
|
258201
258201
|
}
|
258202
|
-
function stringifyKey(
|
258202
|
+
function stringifyKey(key3, jsKey, ctx) {
|
258203
258203
|
if (jsKey === null)
|
258204
258204
|
return "";
|
258205
258205
|
if (typeof jsKey !== "object")
|
258206
258206
|
return String(jsKey);
|
258207
|
-
if (identity2.isNode(
|
258207
|
+
if (identity2.isNode(key3) && ctx?.doc) {
|
258208
258208
|
const strCtx = stringify3.createStringifyContext(ctx.doc, {});
|
258209
258209
|
strCtx.anchors = new Set;
|
258210
258210
|
for (const node of ctx.anchors.keys())
|
258211
258211
|
strCtx.anchors.add(node.anchor);
|
258212
258212
|
strCtx.inFlow = true;
|
258213
258213
|
strCtx.inStringifyKey = true;
|
258214
|
-
const strKey =
|
258214
|
+
const strKey = key3.toString(strCtx);
|
258215
258215
|
if (!ctx.mapKeyWarned) {
|
258216
258216
|
let jsonStr = JSON.stringify(strKey);
|
258217
258217
|
if (jsonStr.length > 40)
|
@@ -258232,25 +258232,25 @@ var require_Pair = __commonJS((exports) => {
|
|
258232
258232
|
var stringifyPair2 = require_stringifyPair();
|
258233
258233
|
var addPairToJSMap = require_addPairToJSMap();
|
258234
258234
|
var identity2 = require_identity();
|
258235
|
-
function createPair(
|
258236
|
-
const k5 = createNode.createNode(
|
258235
|
+
function createPair(key3, value4, ctx) {
|
258236
|
+
const k5 = createNode.createNode(key3, undefined, ctx);
|
258237
258237
|
const v7 = createNode.createNode(value4, undefined, ctx);
|
258238
258238
|
return new Pair(k5, v7);
|
258239
258239
|
}
|
258240
258240
|
|
258241
258241
|
class Pair {
|
258242
|
-
constructor(
|
258242
|
+
constructor(key3, value4 = null) {
|
258243
258243
|
Object.defineProperty(this, identity2.NODE_TYPE, { value: identity2.PAIR });
|
258244
|
-
this.key =
|
258244
|
+
this.key = key3;
|
258245
258245
|
this.value = value4;
|
258246
258246
|
}
|
258247
258247
|
clone(schema) {
|
258248
|
-
let { key:
|
258249
|
-
if (identity2.isNode(
|
258250
|
-
|
258248
|
+
let { key: key3, value: value4 } = this;
|
258249
|
+
if (identity2.isNode(key3))
|
258250
|
+
key3 = key3.clone(schema);
|
258251
258251
|
if (identity2.isNode(value4))
|
258252
258252
|
value4 = value4.clone(schema);
|
258253
|
-
return new Pair(
|
258253
|
+
return new Pair(key3, value4);
|
258254
258254
|
}
|
258255
258255
|
toJSON(_5, ctx) {
|
258256
258256
|
const pair = ctx?.mapAsMap ? new Map : {};
|
@@ -258417,11 +258417,11 @@ var require_YAMLMap = __commonJS((exports) => {
|
|
258417
258417
|
var identity2 = require_identity();
|
258418
258418
|
var Pair = require_Pair();
|
258419
258419
|
var Scalar = require_Scalar();
|
258420
|
-
function findPair(items,
|
258421
|
-
const k5 = identity2.isScalar(
|
258420
|
+
function findPair(items, key3) {
|
258421
|
+
const k5 = identity2.isScalar(key3) ? key3.value : key3;
|
258422
258422
|
for (const it2 of items) {
|
258423
258423
|
if (identity2.isPair(it2)) {
|
258424
|
-
if (it2.key ===
|
258424
|
+
if (it2.key === key3 || it2.key === k5)
|
258425
258425
|
return it2;
|
258426
258426
|
if (identity2.isScalar(it2.key) && it2.key.value === k5)
|
258427
258427
|
return it2;
|
@@ -258441,20 +258441,20 @@ var require_YAMLMap = __commonJS((exports) => {
|
|
258441
258441
|
static from(schema, obj, ctx) {
|
258442
258442
|
const { keepUndefined, replacer } = ctx;
|
258443
258443
|
const map3 = new this(schema);
|
258444
|
-
const add = (
|
258444
|
+
const add = (key3, value4) => {
|
258445
258445
|
if (typeof replacer === "function")
|
258446
|
-
value4 = replacer.call(obj,
|
258447
|
-
else if (Array.isArray(replacer) && !replacer.includes(
|
258446
|
+
value4 = replacer.call(obj, key3, value4);
|
258447
|
+
else if (Array.isArray(replacer) && !replacer.includes(key3))
|
258448
258448
|
return;
|
258449
258449
|
if (value4 !== undefined || keepUndefined)
|
258450
|
-
map3.items.push(Pair.createPair(
|
258450
|
+
map3.items.push(Pair.createPair(key3, value4, ctx));
|
258451
258451
|
};
|
258452
258452
|
if (obj instanceof Map) {
|
258453
|
-
for (const [
|
258454
|
-
add(
|
258453
|
+
for (const [key3, value4] of obj)
|
258454
|
+
add(key3, value4);
|
258455
258455
|
} else if (obj && typeof obj === "object") {
|
258456
|
-
for (const
|
258457
|
-
add(
|
258456
|
+
for (const key3 of Object.keys(obj))
|
258457
|
+
add(key3, obj[key3]);
|
258458
258458
|
}
|
258459
258459
|
if (typeof schema.sortMapEntries === "function") {
|
258460
258460
|
map3.items.sort(schema.sortMapEntries);
|
@@ -258488,23 +258488,23 @@ var require_YAMLMap = __commonJS((exports) => {
|
|
258488
258488
|
this.items.push(_pair);
|
258489
258489
|
}
|
258490
258490
|
}
|
258491
|
-
delete(
|
258492
|
-
const it2 = findPair(this.items,
|
258491
|
+
delete(key3) {
|
258492
|
+
const it2 = findPair(this.items, key3);
|
258493
258493
|
if (!it2)
|
258494
258494
|
return false;
|
258495
258495
|
const del = this.items.splice(this.items.indexOf(it2), 1);
|
258496
258496
|
return del.length > 0;
|
258497
258497
|
}
|
258498
|
-
get(
|
258499
|
-
const it2 = findPair(this.items,
|
258498
|
+
get(key3, keepScalar) {
|
258499
|
+
const it2 = findPair(this.items, key3);
|
258500
258500
|
const node = it2?.value;
|
258501
258501
|
return (!keepScalar && identity2.isScalar(node) ? node.value : node) ?? undefined;
|
258502
258502
|
}
|
258503
|
-
has(
|
258504
|
-
return !!findPair(this.items,
|
258503
|
+
has(key3) {
|
258504
|
+
return !!findPair(this.items, key3);
|
258505
258505
|
}
|
258506
|
-
set(
|
258507
|
-
this.add(new Pair.Pair(
|
258506
|
+
set(key3, value4) {
|
258507
|
+
this.add(new Pair.Pair(key3, value4), true);
|
258508
258508
|
}
|
258509
258509
|
toJSON(_5, ctx, Type) {
|
258510
258510
|
const map3 = Type ? new Type : ctx?.mapAsMap ? new Map : {};
|
@@ -258575,28 +258575,28 @@ var require_YAMLSeq = __commonJS((exports) => {
|
|
258575
258575
|
add(value4) {
|
258576
258576
|
this.items.push(value4);
|
258577
258577
|
}
|
258578
|
-
delete(
|
258579
|
-
const idx = asItemIndex(
|
258578
|
+
delete(key3) {
|
258579
|
+
const idx = asItemIndex(key3);
|
258580
258580
|
if (typeof idx !== "number")
|
258581
258581
|
return false;
|
258582
258582
|
const del = this.items.splice(idx, 1);
|
258583
258583
|
return del.length > 0;
|
258584
258584
|
}
|
258585
|
-
get(
|
258586
|
-
const idx = asItemIndex(
|
258585
|
+
get(key3, keepScalar) {
|
258586
|
+
const idx = asItemIndex(key3);
|
258587
258587
|
if (typeof idx !== "number")
|
258588
258588
|
return;
|
258589
258589
|
const it2 = this.items[idx];
|
258590
258590
|
return !keepScalar && identity2.isScalar(it2) ? it2.value : it2;
|
258591
258591
|
}
|
258592
|
-
has(
|
258593
|
-
const idx = asItemIndex(
|
258592
|
+
has(key3) {
|
258593
|
+
const idx = asItemIndex(key3);
|
258594
258594
|
return typeof idx === "number" && idx < this.items.length;
|
258595
258595
|
}
|
258596
|
-
set(
|
258597
|
-
const idx = asItemIndex(
|
258596
|
+
set(key3, value4) {
|
258597
|
+
const idx = asItemIndex(key3);
|
258598
258598
|
if (typeof idx !== "number")
|
258599
|
-
throw new Error(`Expected a valid index, not ${
|
258599
|
+
throw new Error(`Expected a valid index, not ${key3}.`);
|
258600
258600
|
const prev = this.items[idx];
|
258601
258601
|
if (identity2.isScalar(prev) && Scalar.isScalarValue(value4))
|
258602
258602
|
prev.value = value4;
|
@@ -258630,8 +258630,8 @@ var require_YAMLSeq = __commonJS((exports) => {
|
|
258630
258630
|
let i6 = 0;
|
258631
258631
|
for (let it2 of obj) {
|
258632
258632
|
if (typeof replacer === "function") {
|
258633
|
-
const
|
258634
|
-
it2 = replacer.call(obj,
|
258633
|
+
const key3 = obj instanceof Set ? it2 : String(i6++);
|
258634
|
+
it2 = replacer.call(obj, key3, it2);
|
258635
258635
|
}
|
258636
258636
|
seq.items.push(createNode.createNode(it2, undefined, ctx));
|
258637
258637
|
}
|
@@ -258639,8 +258639,8 @@ var require_YAMLSeq = __commonJS((exports) => {
|
|
258639
258639
|
return seq;
|
258640
258640
|
}
|
258641
258641
|
}
|
258642
|
-
function asItemIndex(
|
258643
|
-
let idx = identity2.isScalar(
|
258642
|
+
function asItemIndex(key3) {
|
258643
|
+
let idx = identity2.isScalar(key3) ? key3.value : key3;
|
258644
258644
|
if (idx && typeof idx === "string")
|
258645
258645
|
idx = Number(idx);
|
258646
258646
|
return typeof idx === "number" && Number.isInteger(idx) && idx >= 0 ? idx : null;
|
@@ -259012,25 +259012,25 @@ ${cn.comment}` : item.comment;
|
|
259012
259012
|
for (let it2 of iterable) {
|
259013
259013
|
if (typeof replacer === "function")
|
259014
259014
|
it2 = replacer.call(iterable, String(i6++), it2);
|
259015
|
-
let
|
259015
|
+
let key3, value4;
|
259016
259016
|
if (Array.isArray(it2)) {
|
259017
259017
|
if (it2.length === 2) {
|
259018
|
-
|
259018
|
+
key3 = it2[0];
|
259019
259019
|
value4 = it2[1];
|
259020
259020
|
} else
|
259021
259021
|
throw new TypeError(`Expected [key, value] tuple: ${it2}`);
|
259022
259022
|
} else if (it2 && it2 instanceof Object) {
|
259023
259023
|
const keys = Object.keys(it2);
|
259024
259024
|
if (keys.length === 1) {
|
259025
|
-
|
259026
|
-
value4 = it2[
|
259025
|
+
key3 = keys[0];
|
259026
|
+
value4 = it2[key3];
|
259027
259027
|
} else {
|
259028
259028
|
throw new TypeError(`Expected tuple with one key, not ${keys.length} keys`);
|
259029
259029
|
}
|
259030
259030
|
} else {
|
259031
|
-
|
259031
|
+
key3 = it2;
|
259032
259032
|
}
|
259033
|
-
pairs2.items.push(Pair.createPair(
|
259033
|
+
pairs2.items.push(Pair.createPair(key3, value4, ctx));
|
259034
259034
|
}
|
259035
259035
|
return pairs2;
|
259036
259036
|
}
|
@@ -259071,16 +259071,16 @@ var require_omap = __commonJS((exports) => {
|
|
259071
259071
|
if (ctx?.onCreate)
|
259072
259072
|
ctx.onCreate(map3);
|
259073
259073
|
for (const pair of this.items) {
|
259074
|
-
let
|
259074
|
+
let key3, value4;
|
259075
259075
|
if (identity2.isPair(pair)) {
|
259076
|
-
|
259077
|
-
value4 = toJS.toJS(pair.value,
|
259076
|
+
key3 = toJS.toJS(pair.key, "", ctx);
|
259077
|
+
value4 = toJS.toJS(pair.value, key3, ctx);
|
259078
259078
|
} else {
|
259079
|
-
|
259079
|
+
key3 = toJS.toJS(pair, "", ctx);
|
259080
259080
|
}
|
259081
|
-
if (map3.has(
|
259081
|
+
if (map3.has(key3))
|
259082
259082
|
throw new Error("Ordered maps must not include duplicate keys");
|
259083
|
-
map3.set(
|
259083
|
+
map3.set(key3, value4);
|
259084
259084
|
}
|
259085
259085
|
return map3;
|
259086
259086
|
}
|
@@ -259101,12 +259101,12 @@ var require_omap = __commonJS((exports) => {
|
|
259101
259101
|
resolve(seq, onError) {
|
259102
259102
|
const pairs$1 = pairs.resolvePairs(seq, onError);
|
259103
259103
|
const seenKeys = [];
|
259104
|
-
for (const { key:
|
259105
|
-
if (identity2.isScalar(
|
259106
|
-
if (seenKeys.includes(
|
259107
|
-
onError(`Ordered maps must not include duplicate keys: ${
|
259104
|
+
for (const { key: key3 } of pairs$1.items) {
|
259105
|
+
if (identity2.isScalar(key3)) {
|
259106
|
+
if (seenKeys.includes(key3.value)) {
|
259107
|
+
onError(`Ordered maps must not include duplicate keys: ${key3.value}`);
|
259108
259108
|
} else {
|
259109
|
-
seenKeys.push(
|
259109
|
+
seenKeys.push(key3.value);
|
259110
259110
|
}
|
259111
259111
|
}
|
259112
259112
|
}
|
@@ -259280,30 +259280,30 @@ var require_set = __commonJS((exports) => {
|
|
259280
259280
|
super(schema);
|
259281
259281
|
this.tag = YAMLSet.tag;
|
259282
259282
|
}
|
259283
|
-
add(
|
259283
|
+
add(key3) {
|
259284
259284
|
let pair;
|
259285
|
-
if (identity2.isPair(
|
259286
|
-
pair =
|
259287
|
-
else if (
|
259288
|
-
pair = new Pair.Pair(
|
259285
|
+
if (identity2.isPair(key3))
|
259286
|
+
pair = key3;
|
259287
|
+
else if (key3 && typeof key3 === "object" && "key" in key3 && "value" in key3 && key3.value === null)
|
259288
|
+
pair = new Pair.Pair(key3.key, null);
|
259289
259289
|
else
|
259290
|
-
pair = new Pair.Pair(
|
259290
|
+
pair = new Pair.Pair(key3, null);
|
259291
259291
|
const prev = YAMLMap.findPair(this.items, pair.key);
|
259292
259292
|
if (!prev)
|
259293
259293
|
this.items.push(pair);
|
259294
259294
|
}
|
259295
|
-
get(
|
259296
|
-
const pair = YAMLMap.findPair(this.items,
|
259295
|
+
get(key3, keepPair) {
|
259296
|
+
const pair = YAMLMap.findPair(this.items, key3);
|
259297
259297
|
return !keepPair && identity2.isPair(pair) ? identity2.isScalar(pair.key) ? pair.key.value : pair.key : pair;
|
259298
259298
|
}
|
259299
|
-
set(
|
259299
|
+
set(key3, value4) {
|
259300
259300
|
if (typeof value4 !== "boolean")
|
259301
259301
|
throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof value4}`);
|
259302
|
-
const prev = YAMLMap.findPair(this.items,
|
259302
|
+
const prev = YAMLMap.findPair(this.items, key3);
|
259303
259303
|
if (prev && !value4) {
|
259304
259304
|
this.items.splice(this.items.indexOf(prev), 1);
|
259305
259305
|
} else if (!prev && value4) {
|
259306
|
-
this.items.push(new Pair.Pair(
|
259306
|
+
this.items.push(new Pair.Pair(key3));
|
259307
259307
|
}
|
259308
259308
|
}
|
259309
259309
|
toJSON(_5, ctx) {
|
@@ -259538,7 +259538,7 @@ var require_tags = __commonJS((exports) => {
|
|
259538
259538
|
if (Array.isArray(customTags))
|
259539
259539
|
tags = [];
|
259540
259540
|
else {
|
259541
|
-
const keys = Array.from(schemas.keys()).filter((
|
259541
|
+
const keys = Array.from(schemas.keys()).filter((key3) => key3 !== "yaml11").map((key3) => JSON.stringify(key3)).join(", ");
|
259542
259542
|
throw new Error(`Unknown schema "${schemaName}"; use one of ${keys} or define customTags array`);
|
259543
259543
|
}
|
259544
259544
|
}
|
@@ -259554,7 +259554,7 @@ var require_tags = __commonJS((exports) => {
|
|
259554
259554
|
const tagObj = typeof tag === "string" ? tagsByName[tag] : tag;
|
259555
259555
|
if (!tagObj) {
|
259556
259556
|
const tagName = JSON.stringify(tag);
|
259557
|
-
const keys = Object.keys(tagsByName).map((
|
259557
|
+
const keys = Object.keys(tagsByName).map((key3) => JSON.stringify(key3)).join(", ");
|
259558
259558
|
throw new Error(`Unknown custom tag ${tagName}; use one of ${keys}`);
|
259559
259559
|
}
|
259560
259560
|
if (!tags2.includes(tagObj))
|
@@ -259789,13 +259789,13 @@ var require_Document = __commonJS((exports) => {
|
|
259789
259789
|
setAnchors();
|
259790
259790
|
return node;
|
259791
259791
|
}
|
259792
|
-
createPair(
|
259793
|
-
const k5 = this.createNode(
|
259792
|
+
createPair(key3, value4, options = {}) {
|
259793
|
+
const k5 = this.createNode(key3, null, options);
|
259794
259794
|
const v7 = this.createNode(value4, null, options);
|
259795
259795
|
return new Pair.Pair(k5, v7);
|
259796
259796
|
}
|
259797
|
-
delete(
|
259798
|
-
return assertCollection(this.contents) ? this.contents.delete(
|
259797
|
+
delete(key3) {
|
259798
|
+
return assertCollection(this.contents) ? this.contents.delete(key3) : false;
|
259799
259799
|
}
|
259800
259800
|
deleteIn(path5) {
|
259801
259801
|
if (Collection.isEmptyPath(path5)) {
|
@@ -259806,27 +259806,27 @@ var require_Document = __commonJS((exports) => {
|
|
259806
259806
|
}
|
259807
259807
|
return assertCollection(this.contents) ? this.contents.deleteIn(path5) : false;
|
259808
259808
|
}
|
259809
|
-
get(
|
259810
|
-
return identity2.isCollection(this.contents) ? this.contents.get(
|
259809
|
+
get(key3, keepScalar) {
|
259810
|
+
return identity2.isCollection(this.contents) ? this.contents.get(key3, keepScalar) : undefined;
|
259811
259811
|
}
|
259812
259812
|
getIn(path5, keepScalar) {
|
259813
259813
|
if (Collection.isEmptyPath(path5))
|
259814
259814
|
return !keepScalar && identity2.isScalar(this.contents) ? this.contents.value : this.contents;
|
259815
259815
|
return identity2.isCollection(this.contents) ? this.contents.getIn(path5, keepScalar) : undefined;
|
259816
259816
|
}
|
259817
|
-
has(
|
259818
|
-
return identity2.isCollection(this.contents) ? this.contents.has(
|
259817
|
+
has(key3) {
|
259818
|
+
return identity2.isCollection(this.contents) ? this.contents.has(key3) : false;
|
259819
259819
|
}
|
259820
259820
|
hasIn(path5) {
|
259821
259821
|
if (Collection.isEmptyPath(path5))
|
259822
259822
|
return this.contents !== undefined;
|
259823
259823
|
return identity2.isCollection(this.contents) ? this.contents.hasIn(path5) : false;
|
259824
259824
|
}
|
259825
|
-
set(
|
259825
|
+
set(key3, value4) {
|
259826
259826
|
if (this.contents == null) {
|
259827
|
-
this.contents = Collection.collectionFromPath(this.schema, [
|
259827
|
+
this.contents = Collection.collectionFromPath(this.schema, [key3], value4);
|
259828
259828
|
} else if (assertCollection(this.contents)) {
|
259829
|
-
this.contents.set(
|
259829
|
+
this.contents.set(key3, value4);
|
259830
259830
|
}
|
259831
259831
|
}
|
259832
259832
|
setIn(path5, value4) {
|
@@ -260110,25 +260110,25 @@ var require_resolve_props = __commonJS((exports) => {
|
|
260110
260110
|
|
260111
260111
|
// ../../node_modules/yaml/dist/compose/util-contains-newline.js
|
260112
260112
|
var require_util_contains_newline = __commonJS((exports) => {
|
260113
|
-
function containsNewline(
|
260114
|
-
if (!
|
260113
|
+
function containsNewline(key3) {
|
260114
|
+
if (!key3)
|
260115
260115
|
return null;
|
260116
|
-
switch (
|
260116
|
+
switch (key3.type) {
|
260117
260117
|
case "alias":
|
260118
260118
|
case "scalar":
|
260119
260119
|
case "double-quoted-scalar":
|
260120
260120
|
case "single-quoted-scalar":
|
260121
|
-
if (
|
260121
|
+
if (key3.source.includes(`
|
260122
260122
|
`))
|
260123
260123
|
return true;
|
260124
|
-
if (
|
260125
|
-
for (const st2 of
|
260124
|
+
if (key3.end) {
|
260125
|
+
for (const st2 of key3.end)
|
260126
260126
|
if (st2.type === "newline")
|
260127
260127
|
return true;
|
260128
260128
|
}
|
260129
260129
|
return false;
|
260130
260130
|
case "flow-collection":
|
260131
|
-
for (const it2 of
|
260131
|
+
for (const it2 of key3.items) {
|
260132
260132
|
for (const st2 of it2.start)
|
260133
260133
|
if (st2.type === "newline")
|
260134
260134
|
return true;
|
@@ -260193,10 +260193,10 @@ var require_resolve_block_map = __commonJS((exports) => {
|
|
260193
260193
|
let offset = bm.offset;
|
260194
260194
|
let commentEnd = null;
|
260195
260195
|
for (const collItem of bm.items) {
|
260196
|
-
const { start: start3, key:
|
260196
|
+
const { start: start3, key: key3, sep: sep3, value: value4 } = collItem;
|
260197
260197
|
const keyProps = resolveProps.resolveProps(start3, {
|
260198
260198
|
indicator: "explicit-key-ind",
|
260199
|
-
next:
|
260199
|
+
next: key3 ?? sep3?.[0],
|
260200
260200
|
offset,
|
260201
260201
|
onError,
|
260202
260202
|
parentIndent: bm.indent,
|
@@ -260204,10 +260204,10 @@ var require_resolve_block_map = __commonJS((exports) => {
|
|
260204
260204
|
});
|
260205
260205
|
const implicitKey = !keyProps.found;
|
260206
260206
|
if (implicitKey) {
|
260207
|
-
if (
|
260208
|
-
if (
|
260207
|
+
if (key3) {
|
260208
|
+
if (key3.type === "block-seq")
|
260209
260209
|
onError(offset, "BLOCK_AS_IMPLICIT_KEY", "A block sequence may not be used as an implicit map key");
|
260210
|
-
else if ("indent" in
|
260210
|
+
else if ("indent" in key3 && key3.indent !== bm.indent)
|
260211
260211
|
onError(offset, "BAD_INDENT", startColMsg);
|
260212
260212
|
}
|
260213
260213
|
if (!keyProps.anchor && !keyProps.tag && !sep3) {
|
@@ -260221,17 +260221,17 @@ var require_resolve_block_map = __commonJS((exports) => {
|
|
260221
260221
|
}
|
260222
260222
|
continue;
|
260223
260223
|
}
|
260224
|
-
if (keyProps.newlineAfterProp || utilContainsNewline.containsNewline(
|
260225
|
-
onError(
|
260224
|
+
if (keyProps.newlineAfterProp || utilContainsNewline.containsNewline(key3)) {
|
260225
|
+
onError(key3 ?? start3[start3.length - 1], "MULTILINE_IMPLICIT_KEY", "Implicit keys need to be on a single line");
|
260226
260226
|
}
|
260227
260227
|
} else if (keyProps.found?.indent !== bm.indent) {
|
260228
260228
|
onError(offset, "BAD_INDENT", startColMsg);
|
260229
260229
|
}
|
260230
260230
|
ctx.atKey = true;
|
260231
260231
|
const keyStart = keyProps.end;
|
260232
|
-
const keyNode =
|
260232
|
+
const keyNode = key3 ? composeNode(ctx, key3, keyProps, onError) : composeEmptyNode(ctx, keyStart, start3, null, keyProps, onError);
|
260233
260233
|
if (ctx.schema.compat)
|
260234
|
-
utilFlowIndentCheck.flowIndentCheck(bm.indent,
|
260234
|
+
utilFlowIndentCheck.flowIndentCheck(bm.indent, key3, onError);
|
260235
260235
|
ctx.atKey = false;
|
260236
260236
|
if (utilMapIncludes.mapIncludes(ctx, map3.items, keyNode))
|
260237
260237
|
onError(keyStart, "DUPLICATE_KEY", "Map keys must be unique");
|
@@ -260241,7 +260241,7 @@ var require_resolve_block_map = __commonJS((exports) => {
|
|
260241
260241
|
offset: keyNode.range[2],
|
260242
260242
|
onError,
|
260243
260243
|
parentIndent: bm.indent,
|
260244
|
-
startOnNewline: !
|
260244
|
+
startOnNewline: !key3 || key3.type === "block-scalar"
|
260245
260245
|
});
|
260246
260246
|
offset = valueProps.end;
|
260247
260247
|
if (valueProps.found) {
|
@@ -260397,11 +260397,11 @@ var require_resolve_flow_collection = __commonJS((exports) => {
|
|
260397
260397
|
let offset = fc.offset + fc.start.source.length;
|
260398
260398
|
for (let i6 = 0;i6 < fc.items.length; ++i6) {
|
260399
260399
|
const collItem = fc.items[i6];
|
260400
|
-
const { start: start3, key:
|
260400
|
+
const { start: start3, key: key3, sep: sep3, value: value4 } = collItem;
|
260401
260401
|
const props = resolveProps.resolveProps(start3, {
|
260402
260402
|
flow: fcName,
|
260403
260403
|
indicator: "explicit-key-ind",
|
260404
|
-
next:
|
260404
|
+
next: key3 ?? sep3?.[0],
|
260405
260405
|
offset,
|
260406
260406
|
onError,
|
260407
260407
|
parentIndent: fc.indent,
|
@@ -260423,8 +260423,8 @@ var require_resolve_flow_collection = __commonJS((exports) => {
|
|
260423
260423
|
offset = props.end;
|
260424
260424
|
continue;
|
260425
260425
|
}
|
260426
|
-
if (!isMap && ctx.options.strict && utilContainsNewline.containsNewline(
|
260427
|
-
onError(
|
260426
|
+
if (!isMap && ctx.options.strict && utilContainsNewline.containsNewline(key3))
|
260427
|
+
onError(key3, "MULTILINE_IMPLICIT_KEY", "Implicit keys of flow sequence pairs need to be on a single line");
|
260428
260428
|
}
|
260429
260429
|
if (i6 === 0) {
|
260430
260430
|
if (props.comma)
|
@@ -260469,8 +260469,8 @@ var require_resolve_flow_collection = __commonJS((exports) => {
|
|
260469
260469
|
} else {
|
260470
260470
|
ctx.atKey = true;
|
260471
260471
|
const keyStart = props.end;
|
260472
|
-
const keyNode =
|
260473
|
-
if (isBlock(
|
260472
|
+
const keyNode = key3 ? composeNode(ctx, key3, props, onError) : composeEmptyNode(ctx, keyStart, start3, null, props, onError);
|
260473
|
+
if (isBlock(key3))
|
260474
260474
|
onError(keyNode.range, "BLOCK_IN_FLOW", blockMsg);
|
260475
260475
|
ctx.atKey = false;
|
260476
260476
|
const valueProps = resolveProps.resolveProps(sep3 ?? [], {
|
@@ -261282,7 +261282,7 @@ var require_composer = __commonJS((exports) => {
|
|
261282
261282
|
var node_process = __require("node:process");
|
261283
261283
|
var directives4 = require_directives2();
|
261284
261284
|
var Document = require_Document();
|
261285
|
-
var
|
261285
|
+
var errors3 = require_errors3();
|
261286
261286
|
var identity2 = require_identity();
|
261287
261287
|
var composeDoc = require_compose_doc();
|
261288
261288
|
var resolveEnd = require_resolve_end();
|
@@ -261333,9 +261333,9 @@ var require_composer = __commonJS((exports) => {
|
|
261333
261333
|
this.onError = (source, code2, message, warning) => {
|
261334
261334
|
const pos = getErrorPos(source);
|
261335
261335
|
if (warning)
|
261336
|
-
this.warnings.push(new
|
261336
|
+
this.warnings.push(new errors3.YAMLWarning(pos, code2, message));
|
261337
261337
|
else
|
261338
|
-
this.errors.push(new
|
261338
|
+
this.errors.push(new errors3.YAMLParseError(pos, code2, message));
|
261339
261339
|
};
|
261340
261340
|
this.directives = new directives4.Directives({ version: options.version || "1.2" });
|
261341
261341
|
this.options = options;
|
@@ -261419,7 +261419,7 @@ ${cb}` : comment;
|
|
261419
261419
|
break;
|
261420
261420
|
case "error": {
|
261421
261421
|
const msg = token.source ? `${token.message}: ${JSON.stringify(token.source)}` : token.message;
|
261422
|
-
const error5 = new
|
261422
|
+
const error5 = new errors3.YAMLParseError(getErrorPos(token), "UNEXPECTED_TOKEN", msg);
|
261423
261423
|
if (this.atDirectives || !this.doc)
|
261424
261424
|
this.errors.push(error5);
|
261425
261425
|
else
|
@@ -261429,7 +261429,7 @@ ${cb}` : comment;
|
|
261429
261429
|
case "doc-end": {
|
261430
261430
|
if (!this.doc) {
|
261431
261431
|
const msg = "Unexpected doc-end without preceding document";
|
261432
|
-
this.errors.push(new
|
261432
|
+
this.errors.push(new errors3.YAMLParseError(getErrorPos(token), "UNEXPECTED_TOKEN", msg));
|
261433
261433
|
break;
|
261434
261434
|
}
|
261435
261435
|
this.doc.directives.docEnd = true;
|
@@ -261444,7 +261444,7 @@ ${end.comment}` : end.comment;
|
|
261444
261444
|
break;
|
261445
261445
|
}
|
261446
261446
|
default:
|
261447
|
-
this.errors.push(new
|
261447
|
+
this.errors.push(new errors3.YAMLParseError(getErrorPos(token), "UNEXPECTED_TOKEN", `Unsupported token ${token.type}`));
|
261448
261448
|
}
|
261449
261449
|
}
|
261450
261450
|
*end(forceDoc = false, endOffset = -1) {
|
@@ -261470,7 +261470,7 @@ ${end.comment}` : end.comment;
|
|
261470
261470
|
var require_cst_scalar = __commonJS((exports) => {
|
261471
261471
|
var resolveBlockScalar = require_resolve_block_scalar();
|
261472
261472
|
var resolveFlowScalar = require_resolve_flow_scalar();
|
261473
|
-
var
|
261473
|
+
var errors3 = require_errors3();
|
261474
261474
|
var stringifyString = require_stringifyString();
|
261475
261475
|
function resolveAsScalar(token, strict = true, onError) {
|
261476
261476
|
if (token) {
|
@@ -261479,7 +261479,7 @@ var require_cst_scalar = __commonJS((exports) => {
|
|
261479
261479
|
if (onError)
|
261480
261480
|
onError(offset, code2, message);
|
261481
261481
|
else
|
261482
|
-
throw new
|
261482
|
+
throw new errors3.YAMLParseError([offset, offset + 1], code2, message);
|
261483
261483
|
};
|
261484
261484
|
switch (token.type) {
|
261485
261485
|
case "scalar":
|
@@ -261593,9 +261593,9 @@ var require_cst_scalar = __commonJS((exports) => {
|
|
261593
261593
|
if (!addEndtoBlockProps(props, "end" in token ? token.end : undefined))
|
261594
261594
|
props.push({ type: "newline", offset: -1, indent: indent2, source: `
|
261595
261595
|
` });
|
261596
|
-
for (const
|
261597
|
-
if (
|
261598
|
-
delete token[
|
261596
|
+
for (const key3 of Object.keys(token))
|
261597
|
+
if (key3 !== "type" && key3 !== "offset")
|
261598
|
+
delete token[key3];
|
261599
261599
|
Object.assign(token, { type: "block-scalar", indent: indent2, props, source: body });
|
261600
261600
|
}
|
261601
261601
|
}
|
@@ -261644,9 +261644,9 @@ var require_cst_scalar = __commonJS((exports) => {
|
|
261644
261644
|
default: {
|
261645
261645
|
const indent2 = "indent" in token ? token.indent : -1;
|
261646
261646
|
const end = "end" in token && Array.isArray(token.end) ? token.end.filter((st2) => st2.type === "space" || st2.type === "comment" || st2.type === "newline") : [];
|
261647
|
-
for (const
|
261648
|
-
if (
|
261649
|
-
delete token[
|
261647
|
+
for (const key3 of Object.keys(token))
|
261648
|
+
if (key3 !== "type" && key3 !== "offset")
|
261649
|
+
delete token[key3];
|
261650
261650
|
Object.assign(token, { type: type4, indent: indent2, source, end });
|
261651
261651
|
}
|
261652
261652
|
}
|
@@ -261698,12 +261698,12 @@ var require_cst_stringify = __commonJS((exports) => {
|
|
261698
261698
|
}
|
261699
261699
|
}
|
261700
261700
|
}
|
261701
|
-
function stringifyItem({ start: start3, key:
|
261701
|
+
function stringifyItem({ start: start3, key: key3, sep: sep3, value: value4 }) {
|
261702
261702
|
let res = "";
|
261703
261703
|
for (const st2 of start3)
|
261704
261704
|
res += st2.source;
|
261705
|
-
if (
|
261706
|
-
res += stringifyToken(
|
261705
|
+
if (key3)
|
261706
|
+
res += stringifyToken(key3);
|
261707
261707
|
if (sep3)
|
261708
261708
|
for (const st2 of sep3)
|
261709
261709
|
res += st2.source;
|
@@ -263000,7 +263000,7 @@ var require_parser2 = __commonJS((exports) => {
|
|
263000
263000
|
});
|
263001
263001
|
} else if (isFlowToken(it2.key) && !includesToken(it2.sep, "newline")) {
|
263002
263002
|
const start4 = getFirstKeyStartProps(it2.start);
|
263003
|
-
const
|
263003
|
+
const key3 = it2.key;
|
263004
263004
|
const sep3 = it2.sep;
|
263005
263005
|
sep3.push(this.sourceToken);
|
263006
263006
|
delete it2.key;
|
@@ -263009,7 +263009,7 @@ var require_parser2 = __commonJS((exports) => {
|
|
263009
263009
|
type: "block-map",
|
263010
263010
|
offset: this.offset,
|
263011
263011
|
indent: this.indent,
|
263012
|
-
items: [{ start: start4, key:
|
263012
|
+
items: [{ start: start4, key: key3, sep: sep3 }]
|
263013
263013
|
});
|
263014
263014
|
} else if (start3.length > 0) {
|
263015
263015
|
it2.sep = it2.sep.concat(start3, this.sourceToken);
|
@@ -263332,7 +263332,7 @@ var require_parser2 = __commonJS((exports) => {
|
|
263332
263332
|
var require_public_api = __commonJS((exports) => {
|
263333
263333
|
var composer = require_composer();
|
263334
263334
|
var Document = require_Document();
|
263335
|
-
var
|
263335
|
+
var errors3 = require_errors3();
|
263336
263336
|
var log = require_log();
|
263337
263337
|
var identity2 = require_identity();
|
263338
263338
|
var lineCounter = require_line_counter();
|
@@ -263349,8 +263349,8 @@ var require_public_api = __commonJS((exports) => {
|
|
263349
263349
|
const docs = Array.from(composer$1.compose(parser$1.parse(source)));
|
263350
263350
|
if (prettyErrors && lineCounter2)
|
263351
263351
|
for (const doc of docs) {
|
263352
|
-
doc.errors.forEach(
|
263353
|
-
doc.warnings.forEach(
|
263352
|
+
doc.errors.forEach(errors3.prettifyError(source, lineCounter2));
|
263353
|
+
doc.warnings.forEach(errors3.prettifyError(source, lineCounter2));
|
263354
263354
|
}
|
263355
263355
|
if (docs.length > 0)
|
263356
263356
|
return docs;
|
@@ -263365,13 +263365,13 @@ var require_public_api = __commonJS((exports) => {
|
|
263365
263365
|
if (!doc)
|
263366
263366
|
doc = _doc;
|
263367
263367
|
else if (doc.options.logLevel !== "silent") {
|
263368
|
-
doc.errors.push(new
|
263368
|
+
doc.errors.push(new errors3.YAMLParseError(_doc.range.slice(0, 2), "MULTIPLE_DOCS", "Source contains multiple documents; please use YAML.parseAllDocuments()"));
|
263369
263369
|
break;
|
263370
263370
|
}
|
263371
263371
|
}
|
263372
263372
|
if (prettyErrors && lineCounter2) {
|
263373
|
-
doc.errors.forEach(
|
263374
|
-
doc.warnings.forEach(
|
263373
|
+
doc.errors.forEach(errors3.prettifyError(source, lineCounter2));
|
263374
|
+
doc.warnings.forEach(errors3.prettifyError(source, lineCounter2));
|
263375
263375
|
}
|
263376
263376
|
return doc;
|
263377
263377
|
}
|
@@ -274459,7 +274459,7 @@ function pruneCurrentEnv(currentEnv, env2) {
|
|
274459
274459
|
var package_default = {
|
274460
274460
|
name: "@settlemint/sdk-cli",
|
274461
274461
|
description: "Command-line interface for SettleMint SDK, providing development tools and project management capabilities",
|
274462
|
-
version: "1.1.3-
|
274462
|
+
version: "1.1.3-prae38e267",
|
274463
274463
|
type: "module",
|
274464
274464
|
private: false,
|
274465
274465
|
license: "FSL-1.1-MIT",
|
@@ -274503,12 +274503,12 @@ var package_default = {
|
|
274503
274503
|
},
|
274504
274504
|
devDependencies: {
|
274505
274505
|
"@commander-js/extra-typings": "13.1.0",
|
274506
|
-
"@inquirer/confirm": "5.1.
|
274506
|
+
"@inquirer/confirm": "5.1.4",
|
274507
274507
|
"@inquirer/input": "4.1.4",
|
274508
|
-
"@inquirer/password": "4.0.
|
274508
|
+
"@inquirer/password": "4.0.8",
|
274509
274509
|
"@inquirer/select": "4.0.7",
|
274510
|
-
"@settlemint/sdk-js": "1.1.3-
|
274511
|
-
"@settlemint/sdk-utils": "1.1.3-
|
274510
|
+
"@settlemint/sdk-js": "1.1.3-prae38e267",
|
274511
|
+
"@settlemint/sdk-utils": "1.1.3-prae38e267",
|
274512
274512
|
"@types/node": "22.13.0",
|
274513
274513
|
"@types/semver": "7.5.8",
|
274514
274514
|
"@types/which": "3.0.4",
|
@@ -274598,6 +274598,10 @@ var {
|
|
274598
274598
|
} = import__.default;
|
274599
274599
|
|
274600
274600
|
// ../../node_modules/@inquirer/core/dist/esm/lib/key.js
|
274601
|
+
var isUpKey = (key) => key.name === "up" || key.name === "k" || key.ctrl && key.name === "p";
|
274602
|
+
var isDownKey = (key) => key.name === "down" || key.name === "j" || key.ctrl && key.name === "n";
|
274603
|
+
var isBackspaceKey = (key) => key.name === "backspace";
|
274604
|
+
var isNumberKey = (key) => "123456789".includes(key.name);
|
274601
274605
|
var isEnterKey = (key) => key.name === "enter" || key.name === "return";
|
274602
274606
|
// ../../node_modules/@inquirer/core/dist/esm/lib/errors.js
|
274603
274607
|
class AbortPromptError extends Error {
|
@@ -275132,11 +275136,22 @@ function usePrefix({ status = "idle", theme }) {
|
|
275132
275136
|
const iconName = status === "loading" ? "idle" : status;
|
275133
275137
|
return typeof prefix === "string" ? prefix : prefix[iconName] ?? prefix["idle"];
|
275134
275138
|
}
|
275139
|
+
// ../../node_modules/@inquirer/core/dist/esm/lib/use-memo.js
|
275140
|
+
function useMemo(fn, dependencies) {
|
275141
|
+
return withPointer((pointer) => {
|
275142
|
+
const prev = pointer.get();
|
275143
|
+
if (!prev || prev.dependencies.length !== dependencies.length || prev.dependencies.some((dep, i) => dep !== dependencies[i])) {
|
275144
|
+
const value = fn();
|
275145
|
+
pointer.set({ value, dependencies });
|
275146
|
+
return value;
|
275147
|
+
}
|
275148
|
+
return prev.value;
|
275149
|
+
});
|
275150
|
+
}
|
275135
275151
|
// ../../node_modules/@inquirer/core/dist/esm/lib/use-ref.js
|
275136
275152
|
function useRef(val) {
|
275137
275153
|
return useState({ current: val })[0];
|
275138
275154
|
}
|
275139
|
-
|
275140
275155
|
// ../../node_modules/@inquirer/core/dist/esm/lib/use-keypress.js
|
275141
275156
|
function useKeypress(userHandler) {
|
275142
275157
|
const signal = useRef(userHandler);
|
@@ -275168,6 +275183,95 @@ function readlineWidth() {
|
|
275168
275183
|
return import_cli_width.default({ defaultWidth: 80, output: readline().output });
|
275169
275184
|
}
|
275170
275185
|
|
275186
|
+
// ../../node_modules/@inquirer/core/dist/esm/lib/pagination/lines.js
|
275187
|
+
function split(content, width) {
|
275188
|
+
return breakLines(content, width).split(`
|
275189
|
+
`);
|
275190
|
+
}
|
275191
|
+
function rotate(count, items) {
|
275192
|
+
const max = items.length;
|
275193
|
+
const offset = (count % max + max) % max;
|
275194
|
+
return [...items.slice(offset), ...items.slice(0, offset)];
|
275195
|
+
}
|
275196
|
+
function lines({ items, width, renderItem, active, position: requested, pageSize }) {
|
275197
|
+
const layouts = items.map((item, index) => ({
|
275198
|
+
item,
|
275199
|
+
index,
|
275200
|
+
isActive: index === active
|
275201
|
+
}));
|
275202
|
+
const layoutsInPage = rotate(active - requested, layouts).slice(0, pageSize);
|
275203
|
+
const renderItemAt = (index) => layoutsInPage[index] == null ? [] : split(renderItem(layoutsInPage[index]), width);
|
275204
|
+
const pageBuffer = Array.from({ length: pageSize });
|
275205
|
+
const activeItem = renderItemAt(requested).slice(0, pageSize);
|
275206
|
+
const position = requested + activeItem.length <= pageSize ? requested : pageSize - activeItem.length;
|
275207
|
+
pageBuffer.splice(position, activeItem.length, ...activeItem);
|
275208
|
+
let bufferPointer = position + activeItem.length;
|
275209
|
+
let layoutPointer = requested + 1;
|
275210
|
+
while (bufferPointer < pageSize && layoutPointer < layoutsInPage.length) {
|
275211
|
+
for (const line of renderItemAt(layoutPointer)) {
|
275212
|
+
pageBuffer[bufferPointer++] = line;
|
275213
|
+
if (bufferPointer >= pageSize)
|
275214
|
+
break;
|
275215
|
+
}
|
275216
|
+
layoutPointer++;
|
275217
|
+
}
|
275218
|
+
bufferPointer = position - 1;
|
275219
|
+
layoutPointer = requested - 1;
|
275220
|
+
while (bufferPointer >= 0 && layoutPointer >= 0) {
|
275221
|
+
for (const line of renderItemAt(layoutPointer).reverse()) {
|
275222
|
+
pageBuffer[bufferPointer--] = line;
|
275223
|
+
if (bufferPointer < 0)
|
275224
|
+
break;
|
275225
|
+
}
|
275226
|
+
layoutPointer--;
|
275227
|
+
}
|
275228
|
+
return pageBuffer.filter((line) => typeof line === "string");
|
275229
|
+
}
|
275230
|
+
|
275231
|
+
// ../../node_modules/@inquirer/core/dist/esm/lib/pagination/position.js
|
275232
|
+
function finite({ active, pageSize, total }) {
|
275233
|
+
const middle = Math.floor(pageSize / 2);
|
275234
|
+
if (total <= pageSize || active < middle)
|
275235
|
+
return active;
|
275236
|
+
if (active >= total - middle)
|
275237
|
+
return active + pageSize - total;
|
275238
|
+
return middle;
|
275239
|
+
}
|
275240
|
+
function infinite({ active, lastActive, total, pageSize, pointer }) {
|
275241
|
+
if (total <= pageSize)
|
275242
|
+
return active;
|
275243
|
+
if (lastActive < active && active - lastActive < pageSize) {
|
275244
|
+
return Math.min(Math.floor(pageSize / 2), pointer + active - lastActive);
|
275245
|
+
}
|
275246
|
+
return pointer;
|
275247
|
+
}
|
275248
|
+
|
275249
|
+
// ../../node_modules/@inquirer/core/dist/esm/lib/pagination/use-pagination.js
|
275250
|
+
function usePagination({ items, active, renderItem, pageSize, loop = true }) {
|
275251
|
+
const state = useRef({ position: 0, lastActive: 0 });
|
275252
|
+
const position = loop ? infinite({
|
275253
|
+
active,
|
275254
|
+
lastActive: state.current.lastActive,
|
275255
|
+
total: items.length,
|
275256
|
+
pageSize,
|
275257
|
+
pointer: state.current.position
|
275258
|
+
}) : finite({
|
275259
|
+
active,
|
275260
|
+
total: items.length,
|
275261
|
+
pageSize
|
275262
|
+
});
|
275263
|
+
state.current.position = position;
|
275264
|
+
state.current.lastActive = active;
|
275265
|
+
return lines({
|
275266
|
+
items,
|
275267
|
+
width: readlineWidth(),
|
275268
|
+
renderItem,
|
275269
|
+
active,
|
275270
|
+
position,
|
275271
|
+
pageSize
|
275272
|
+
}).join(`
|
275273
|
+
`);
|
275274
|
+
}
|
275171
275275
|
// ../../node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
|
275172
275276
|
var import_mute_stream = __toESM(require_lib(), 1);
|
275173
275277
|
import * as readline2 from "node:readline";
|
@@ -275553,6 +275657,20 @@ function createPrompt(view) {
|
|
275553
275657
|
};
|
275554
275658
|
return prompt;
|
275555
275659
|
}
|
275660
|
+
// ../../node_modules/@inquirer/core/dist/esm/lib/Separator.js
|
275661
|
+
var import_yoctocolors_cjs2 = __toESM(require_yoctocolors_cjs(), 1);
|
275662
|
+
class Separator {
|
275663
|
+
separator = import_yoctocolors_cjs2.default.dim(Array.from({ length: 15 }).join(esm_default.line));
|
275664
|
+
type = "separator";
|
275665
|
+
constructor(separator) {
|
275666
|
+
if (separator) {
|
275667
|
+
this.separator = separator;
|
275668
|
+
}
|
275669
|
+
}
|
275670
|
+
static isSeparator(choice) {
|
275671
|
+
return Boolean(choice && typeof choice === "object" && "type" in choice && choice.type === "separator");
|
275672
|
+
}
|
275673
|
+
}
|
275556
275674
|
// ../utils/dist/terminal.mjs
|
275557
275675
|
import { spawn } from "node:child_process";
|
275558
275676
|
var import_console_table_printer2 = __toESM(require_dist2(), 1);
|
@@ -279559,586 +279677,14 @@ async function codegenTsconfig(env2, thegraphSubgraphNames) {
|
|
279559
279677
|
};
|
279560
279678
|
}
|
279561
279679
|
|
279562
|
-
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/key.js
|
279563
|
-
var isUpKey = (key2) => key2.name === "up" || key2.name === "k" || key2.ctrl && key2.name === "p";
|
279564
|
-
var isDownKey = (key2) => key2.name === "down" || key2.name === "j" || key2.ctrl && key2.name === "n";
|
279565
|
-
var isBackspaceKey = (key2) => key2.name === "backspace";
|
279566
|
-
var isNumberKey = (key2) => "123456789".includes(key2.name);
|
279567
|
-
var isEnterKey2 = (key2) => key2.name === "enter" || key2.name === "return";
|
279568
|
-
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/errors.js
|
279569
|
-
class AbortPromptError2 extends Error {
|
279570
|
-
name = "AbortPromptError";
|
279571
|
-
message = "Prompt was aborted";
|
279572
|
-
constructor(options) {
|
279573
|
-
super();
|
279574
|
-
this.cause = options?.cause;
|
279575
|
-
}
|
279576
|
-
}
|
279577
|
-
|
279578
|
-
class CancelPromptError2 extends Error {
|
279579
|
-
name = "CancelPromptError";
|
279580
|
-
message = "Prompt was canceled";
|
279581
|
-
}
|
279582
|
-
|
279583
|
-
class ExitPromptError2 extends Error {
|
279584
|
-
name = "ExitPromptError";
|
279585
|
-
}
|
279586
|
-
|
279587
|
-
class HookError2 extends Error {
|
279588
|
-
name = "HookError";
|
279589
|
-
}
|
279590
|
-
|
279591
|
-
class ValidationError2 extends Error {
|
279592
|
-
name = "ValidationError";
|
279593
|
-
}
|
279594
|
-
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/use-prefix.js
|
279595
|
-
import { AsyncResource as AsyncResource5 } from "node:async_hooks";
|
279596
|
-
|
279597
|
-
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/hook-engine.js
|
279598
|
-
import { AsyncLocalStorage as AsyncLocalStorage2, AsyncResource as AsyncResource4 } from "node:async_hooks";
|
279599
|
-
var hookStorage2 = new AsyncLocalStorage2;
|
279600
|
-
function createStore2(rl) {
|
279601
|
-
const store = {
|
279602
|
-
rl,
|
279603
|
-
hooks: [],
|
279604
|
-
hooksCleanup: [],
|
279605
|
-
hooksEffect: [],
|
279606
|
-
index: 0,
|
279607
|
-
handleChange() {
|
279608
|
-
}
|
279609
|
-
};
|
279610
|
-
return store;
|
279611
|
-
}
|
279612
|
-
function withHooks2(rl, cb) {
|
279613
|
-
const store = createStore2(rl);
|
279614
|
-
return hookStorage2.run(store, () => {
|
279615
|
-
function cycle(render) {
|
279616
|
-
store.handleChange = () => {
|
279617
|
-
store.index = 0;
|
279618
|
-
render();
|
279619
|
-
};
|
279620
|
-
store.handleChange();
|
279621
|
-
}
|
279622
|
-
return cb(cycle);
|
279623
|
-
});
|
279624
|
-
}
|
279625
|
-
function getStore2() {
|
279626
|
-
const store = hookStorage2.getStore();
|
279627
|
-
if (!store) {
|
279628
|
-
throw new HookError2("[Inquirer] Hook functions can only be called from within a prompt");
|
279629
|
-
}
|
279630
|
-
return store;
|
279631
|
-
}
|
279632
|
-
function readline3() {
|
279633
|
-
return getStore2().rl;
|
279634
|
-
}
|
279635
|
-
function withUpdates2(fn) {
|
279636
|
-
const wrapped = (...args) => {
|
279637
|
-
const store = getStore2();
|
279638
|
-
let shouldUpdate = false;
|
279639
|
-
const oldHandleChange = store.handleChange;
|
279640
|
-
store.handleChange = () => {
|
279641
|
-
shouldUpdate = true;
|
279642
|
-
};
|
279643
|
-
const returnValue = fn(...args);
|
279644
|
-
if (shouldUpdate) {
|
279645
|
-
oldHandleChange();
|
279646
|
-
}
|
279647
|
-
store.handleChange = oldHandleChange;
|
279648
|
-
return returnValue;
|
279649
|
-
};
|
279650
|
-
return AsyncResource4.bind(wrapped);
|
279651
|
-
}
|
279652
|
-
function withPointer2(cb) {
|
279653
|
-
const store = getStore2();
|
279654
|
-
const { index } = store;
|
279655
|
-
const pointer = {
|
279656
|
-
get() {
|
279657
|
-
return store.hooks[index];
|
279658
|
-
},
|
279659
|
-
set(value4) {
|
279660
|
-
store.hooks[index] = value4;
|
279661
|
-
},
|
279662
|
-
initialized: index in store.hooks
|
279663
|
-
};
|
279664
|
-
const returnValue = cb(pointer);
|
279665
|
-
store.index++;
|
279666
|
-
return returnValue;
|
279667
|
-
}
|
279668
|
-
function handleChange2() {
|
279669
|
-
getStore2().handleChange();
|
279670
|
-
}
|
279671
|
-
var effectScheduler2 = {
|
279672
|
-
queue(cb) {
|
279673
|
-
const store = getStore2();
|
279674
|
-
const { index } = store;
|
279675
|
-
store.hooksEffect.push(() => {
|
279676
|
-
store.hooksCleanup[index]?.();
|
279677
|
-
const cleanFn = cb(readline3());
|
279678
|
-
if (cleanFn != null && typeof cleanFn !== "function") {
|
279679
|
-
throw new ValidationError2("useEffect return value must be a cleanup function or nothing.");
|
279680
|
-
}
|
279681
|
-
store.hooksCleanup[index] = cleanFn;
|
279682
|
-
});
|
279683
|
-
},
|
279684
|
-
run() {
|
279685
|
-
const store = getStore2();
|
279686
|
-
withUpdates2(() => {
|
279687
|
-
store.hooksEffect.forEach((effect) => {
|
279688
|
-
effect();
|
279689
|
-
});
|
279690
|
-
store.hooksEffect.length = 0;
|
279691
|
-
})();
|
279692
|
-
},
|
279693
|
-
clearAll() {
|
279694
|
-
const store = getStore2();
|
279695
|
-
store.hooksCleanup.forEach((cleanFn) => {
|
279696
|
-
cleanFn?.();
|
279697
|
-
});
|
279698
|
-
store.hooksEffect.length = 0;
|
279699
|
-
store.hooksCleanup.length = 0;
|
279700
|
-
}
|
279701
|
-
};
|
279702
|
-
|
279703
|
-
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/use-state.js
|
279704
|
-
function useState2(defaultValue) {
|
279705
|
-
return withPointer2((pointer) => {
|
279706
|
-
const setFn = (newValue) => {
|
279707
|
-
if (pointer.get() !== newValue) {
|
279708
|
-
pointer.set(newValue);
|
279709
|
-
handleChange2();
|
279710
|
-
}
|
279711
|
-
};
|
279712
|
-
if (pointer.initialized) {
|
279713
|
-
return [pointer.get(), setFn];
|
279714
|
-
}
|
279715
|
-
const value4 = typeof defaultValue === "function" ? defaultValue() : defaultValue;
|
279716
|
-
pointer.set(value4);
|
279717
|
-
return [value4, setFn];
|
279718
|
-
});
|
279719
|
-
}
|
279720
|
-
|
279721
|
-
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/use-effect.js
|
279722
|
-
function useEffect2(cb, depArray) {
|
279723
|
-
withPointer2((pointer) => {
|
279724
|
-
const oldDeps = pointer.get();
|
279725
|
-
const hasChanged = !Array.isArray(oldDeps) || depArray.some((dep, i6) => !Object.is(dep, oldDeps[i6]));
|
279726
|
-
if (hasChanged) {
|
279727
|
-
effectScheduler2.queue(cb);
|
279728
|
-
}
|
279729
|
-
pointer.set(depArray);
|
279730
|
-
});
|
279731
|
-
}
|
279732
|
-
|
279733
|
-
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/theme.js
|
279734
|
-
var import_yoctocolors_cjs2 = __toESM(require_yoctocolors_cjs(), 1);
|
279735
|
-
var defaultTheme2 = {
|
279736
|
-
prefix: {
|
279737
|
-
idle: import_yoctocolors_cjs2.default.blue("?"),
|
279738
|
-
done: import_yoctocolors_cjs2.default.green(esm_default.tick)
|
279739
|
-
},
|
279740
|
-
spinner: {
|
279741
|
-
interval: 80,
|
279742
|
-
frames: ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"].map((frame) => import_yoctocolors_cjs2.default.yellow(frame))
|
279743
|
-
},
|
279744
|
-
style: {
|
279745
|
-
answer: import_yoctocolors_cjs2.default.cyan,
|
279746
|
-
message: import_yoctocolors_cjs2.default.bold,
|
279747
|
-
error: (text2) => import_yoctocolors_cjs2.default.red(`> ${text2}`),
|
279748
|
-
defaultAnswer: (text2) => import_yoctocolors_cjs2.default.dim(`(${text2})`),
|
279749
|
-
help: import_yoctocolors_cjs2.default.dim,
|
279750
|
-
highlight: import_yoctocolors_cjs2.default.cyan,
|
279751
|
-
key: (text2) => import_yoctocolors_cjs2.default.cyan(import_yoctocolors_cjs2.default.bold(`<${text2}>`))
|
279752
|
-
}
|
279753
|
-
};
|
279754
|
-
|
279755
|
-
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/make-theme.js
|
279756
|
-
function isPlainObject3(value4) {
|
279757
|
-
if (typeof value4 !== "object" || value4 === null)
|
279758
|
-
return false;
|
279759
|
-
let proto = value4;
|
279760
|
-
while (Object.getPrototypeOf(proto) !== null) {
|
279761
|
-
proto = Object.getPrototypeOf(proto);
|
279762
|
-
}
|
279763
|
-
return Object.getPrototypeOf(value4) === proto;
|
279764
|
-
}
|
279765
|
-
function deepMerge3(...objects) {
|
279766
|
-
const output = {};
|
279767
|
-
for (const obj of objects) {
|
279768
|
-
for (const [key2, value4] of Object.entries(obj)) {
|
279769
|
-
const prevValue = output[key2];
|
279770
|
-
output[key2] = isPlainObject3(prevValue) && isPlainObject3(value4) ? deepMerge3(prevValue, value4) : value4;
|
279771
|
-
}
|
279772
|
-
}
|
279773
|
-
return output;
|
279774
|
-
}
|
279775
|
-
function makeTheme2(...themes) {
|
279776
|
-
const themesToMerge = [
|
279777
|
-
defaultTheme2,
|
279778
|
-
...themes.filter((theme) => theme != null)
|
279779
|
-
];
|
279780
|
-
return deepMerge3(...themesToMerge);
|
279781
|
-
}
|
279782
|
-
|
279783
|
-
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/use-prefix.js
|
279784
|
-
function usePrefix2({ status = "idle", theme }) {
|
279785
|
-
const [showLoader, setShowLoader] = useState2(false);
|
279786
|
-
const [tick, setTick] = useState2(0);
|
279787
|
-
const { prefix, spinner: spinner2 } = makeTheme2(theme);
|
279788
|
-
useEffect2(() => {
|
279789
|
-
if (status === "loading") {
|
279790
|
-
let tickInterval;
|
279791
|
-
let inc = -1;
|
279792
|
-
const delayTimeout = setTimeout(AsyncResource5.bind(() => {
|
279793
|
-
setShowLoader(true);
|
279794
|
-
tickInterval = setInterval(AsyncResource5.bind(() => {
|
279795
|
-
inc = inc + 1;
|
279796
|
-
setTick(inc % spinner2.frames.length);
|
279797
|
-
}), spinner2.interval);
|
279798
|
-
}), 300);
|
279799
|
-
return () => {
|
279800
|
-
clearTimeout(delayTimeout);
|
279801
|
-
clearInterval(tickInterval);
|
279802
|
-
};
|
279803
|
-
} else {
|
279804
|
-
setShowLoader(false);
|
279805
|
-
}
|
279806
|
-
}, [status]);
|
279807
|
-
if (showLoader) {
|
279808
|
-
return spinner2.frames[tick];
|
279809
|
-
}
|
279810
|
-
const iconName = status === "loading" ? "idle" : status;
|
279811
|
-
return typeof prefix === "string" ? prefix : prefix[iconName] ?? prefix["idle"];
|
279812
|
-
}
|
279813
|
-
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/use-memo.js
|
279814
|
-
function useMemo(fn, dependencies) {
|
279815
|
-
return withPointer2((pointer) => {
|
279816
|
-
const prev = pointer.get();
|
279817
|
-
if (!prev || prev.dependencies.length !== dependencies.length || prev.dependencies.some((dep, i6) => dep !== dependencies[i6])) {
|
279818
|
-
const value4 = fn();
|
279819
|
-
pointer.set({ value: value4, dependencies });
|
279820
|
-
return value4;
|
279821
|
-
}
|
279822
|
-
return prev.value;
|
279823
|
-
});
|
279824
|
-
}
|
279825
|
-
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/use-ref.js
|
279826
|
-
function useRef2(val) {
|
279827
|
-
return useState2({ current: val })[0];
|
279828
|
-
}
|
279829
|
-
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/use-keypress.js
|
279830
|
-
function useKeypress2(userHandler) {
|
279831
|
-
const signal = useRef2(userHandler);
|
279832
|
-
signal.current = userHandler;
|
279833
|
-
useEffect2((rl) => {
|
279834
|
-
let ignore = false;
|
279835
|
-
const handler = withUpdates2((_input, event) => {
|
279836
|
-
if (ignore)
|
279837
|
-
return;
|
279838
|
-
signal.current(event, rl);
|
279839
|
-
});
|
279840
|
-
rl.input.on("keypress", handler);
|
279841
|
-
return () => {
|
279842
|
-
ignore = true;
|
279843
|
-
rl.input.removeListener("keypress", handler);
|
279844
|
-
};
|
279845
|
-
}, []);
|
279846
|
-
}
|
279847
|
-
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/utils.js
|
279848
|
-
var import_cli_width2 = __toESM(require_cli_width(), 1);
|
279849
|
-
var import_wrap_ansi2 = __toESM(require_wrap_ansi(), 1);
|
279850
|
-
function breakLines2(content, width) {
|
279851
|
-
return content.split(`
|
279852
|
-
`).flatMap((line) => import_wrap_ansi2.default(line, width, { trim: false, hard: true }).split(`
|
279853
|
-
`).map((str) => str.trimEnd())).join(`
|
279854
|
-
`);
|
279855
|
-
}
|
279856
|
-
function readlineWidth2() {
|
279857
|
-
return import_cli_width2.default({ defaultWidth: 80, output: readline3().output });
|
279858
|
-
}
|
279859
|
-
|
279860
|
-
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/pagination/lines.js
|
279861
|
-
function split2(content, width) {
|
279862
|
-
return breakLines2(content, width).split(`
|
279863
|
-
`);
|
279864
|
-
}
|
279865
|
-
function rotate(count, items) {
|
279866
|
-
const max = items.length;
|
279867
|
-
const offset = (count % max + max) % max;
|
279868
|
-
return [...items.slice(offset), ...items.slice(0, offset)];
|
279869
|
-
}
|
279870
|
-
function lines({ items, width, renderItem, active, position: requested, pageSize }) {
|
279871
|
-
const layouts = items.map((item, index) => ({
|
279872
|
-
item,
|
279873
|
-
index,
|
279874
|
-
isActive: index === active
|
279875
|
-
}));
|
279876
|
-
const layoutsInPage = rotate(active - requested, layouts).slice(0, pageSize);
|
279877
|
-
const renderItemAt = (index) => layoutsInPage[index] == null ? [] : split2(renderItem(layoutsInPage[index]), width);
|
279878
|
-
const pageBuffer = Array.from({ length: pageSize });
|
279879
|
-
const activeItem = renderItemAt(requested).slice(0, pageSize);
|
279880
|
-
const position = requested + activeItem.length <= pageSize ? requested : pageSize - activeItem.length;
|
279881
|
-
pageBuffer.splice(position, activeItem.length, ...activeItem);
|
279882
|
-
let bufferPointer = position + activeItem.length;
|
279883
|
-
let layoutPointer = requested + 1;
|
279884
|
-
while (bufferPointer < pageSize && layoutPointer < layoutsInPage.length) {
|
279885
|
-
for (const line of renderItemAt(layoutPointer)) {
|
279886
|
-
pageBuffer[bufferPointer++] = line;
|
279887
|
-
if (bufferPointer >= pageSize)
|
279888
|
-
break;
|
279889
|
-
}
|
279890
|
-
layoutPointer++;
|
279891
|
-
}
|
279892
|
-
bufferPointer = position - 1;
|
279893
|
-
layoutPointer = requested - 1;
|
279894
|
-
while (bufferPointer >= 0 && layoutPointer >= 0) {
|
279895
|
-
for (const line of renderItemAt(layoutPointer).reverse()) {
|
279896
|
-
pageBuffer[bufferPointer--] = line;
|
279897
|
-
if (bufferPointer < 0)
|
279898
|
-
break;
|
279899
|
-
}
|
279900
|
-
layoutPointer--;
|
279901
|
-
}
|
279902
|
-
return pageBuffer.filter((line) => typeof line === "string");
|
279903
|
-
}
|
279904
|
-
|
279905
|
-
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/pagination/position.js
|
279906
|
-
function finite({ active, pageSize, total }) {
|
279907
|
-
const middle = Math.floor(pageSize / 2);
|
279908
|
-
if (total <= pageSize || active < middle)
|
279909
|
-
return active;
|
279910
|
-
if (active >= total - middle)
|
279911
|
-
return active + pageSize - total;
|
279912
|
-
return middle;
|
279913
|
-
}
|
279914
|
-
function infinite({ active, lastActive, total, pageSize, pointer }) {
|
279915
|
-
if (total <= pageSize)
|
279916
|
-
return active;
|
279917
|
-
if (lastActive < active && active - lastActive < pageSize) {
|
279918
|
-
return Math.min(Math.floor(pageSize / 2), pointer + active - lastActive);
|
279919
|
-
}
|
279920
|
-
return pointer;
|
279921
|
-
}
|
279922
|
-
|
279923
|
-
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/pagination/use-pagination.js
|
279924
|
-
function usePagination({ items, active, renderItem, pageSize, loop = true }) {
|
279925
|
-
const state = useRef2({ position: 0, lastActive: 0 });
|
279926
|
-
const position = loop ? infinite({
|
279927
|
-
active,
|
279928
|
-
lastActive: state.current.lastActive,
|
279929
|
-
total: items.length,
|
279930
|
-
pageSize,
|
279931
|
-
pointer: state.current.position
|
279932
|
-
}) : finite({
|
279933
|
-
active,
|
279934
|
-
total: items.length,
|
279935
|
-
pageSize
|
279936
|
-
});
|
279937
|
-
state.current.position = position;
|
279938
|
-
state.current.lastActive = active;
|
279939
|
-
return lines({
|
279940
|
-
items,
|
279941
|
-
width: readlineWidth2(),
|
279942
|
-
renderItem,
|
279943
|
-
active,
|
279944
|
-
position,
|
279945
|
-
pageSize
|
279946
|
-
}).join(`
|
279947
|
-
`);
|
279948
|
-
}
|
279949
|
-
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
|
279950
|
-
var import_mute_stream2 = __toESM(require_lib(), 1);
|
279951
|
-
import * as readline4 from "node:readline";
|
279952
|
-
import { AsyncResource as AsyncResource6 } from "node:async_hooks";
|
279953
|
-
|
279954
|
-
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/screen-manager.js
|
279955
|
-
var import_ansi_escapes2 = __toESM(require_ansi_escapes(), 1);
|
279956
|
-
import { stripVTControlCharacters as stripVTControlCharacters3 } from "node:util";
|
279957
|
-
var height2 = (content) => content.split(`
|
279958
|
-
`).length;
|
279959
|
-
var lastLine2 = (content) => content.split(`
|
279960
|
-
`).pop() ?? "";
|
279961
|
-
function cursorDown2(n6) {
|
279962
|
-
return n6 > 0 ? import_ansi_escapes2.default.cursorDown(n6) : "";
|
279963
|
-
}
|
279964
|
-
|
279965
|
-
class ScreenManager2 {
|
279966
|
-
rl;
|
279967
|
-
height = 0;
|
279968
|
-
extraLinesUnderPrompt = 0;
|
279969
|
-
cursorPos;
|
279970
|
-
constructor(rl) {
|
279971
|
-
this.rl = rl;
|
279972
|
-
this.rl = rl;
|
279973
|
-
this.cursorPos = rl.getCursorPos();
|
279974
|
-
}
|
279975
|
-
write(content) {
|
279976
|
-
this.rl.output.unmute();
|
279977
|
-
this.rl.output.write(content);
|
279978
|
-
this.rl.output.mute();
|
279979
|
-
}
|
279980
|
-
render(content, bottomContent = "") {
|
279981
|
-
const promptLine = lastLine2(content);
|
279982
|
-
const rawPromptLine = stripVTControlCharacters3(promptLine);
|
279983
|
-
let prompt = rawPromptLine;
|
279984
|
-
if (this.rl.line.length > 0) {
|
279985
|
-
prompt = prompt.slice(0, -this.rl.line.length);
|
279986
|
-
}
|
279987
|
-
this.rl.setPrompt(prompt);
|
279988
|
-
this.cursorPos = this.rl.getCursorPos();
|
279989
|
-
const width = readlineWidth2();
|
279990
|
-
content = breakLines2(content, width);
|
279991
|
-
bottomContent = breakLines2(bottomContent, width);
|
279992
|
-
if (rawPromptLine.length % width === 0) {
|
279993
|
-
content += `
|
279994
|
-
`;
|
279995
|
-
}
|
279996
|
-
let output = content + (bottomContent ? `
|
279997
|
-
` + bottomContent : "");
|
279998
|
-
const promptLineUpDiff = Math.floor(rawPromptLine.length / width) - this.cursorPos.rows;
|
279999
|
-
const bottomContentHeight = promptLineUpDiff + (bottomContent ? height2(bottomContent) : 0);
|
280000
|
-
if (bottomContentHeight > 0)
|
280001
|
-
output += import_ansi_escapes2.default.cursorUp(bottomContentHeight);
|
280002
|
-
output += import_ansi_escapes2.default.cursorTo(this.cursorPos.cols);
|
280003
|
-
this.write(cursorDown2(this.extraLinesUnderPrompt) + import_ansi_escapes2.default.eraseLines(this.height) + output);
|
280004
|
-
this.extraLinesUnderPrompt = bottomContentHeight;
|
280005
|
-
this.height = height2(output);
|
280006
|
-
}
|
280007
|
-
checkCursorPos() {
|
280008
|
-
const cursorPos = this.rl.getCursorPos();
|
280009
|
-
if (cursorPos.cols !== this.cursorPos.cols) {
|
280010
|
-
this.write(import_ansi_escapes2.default.cursorTo(cursorPos.cols));
|
280011
|
-
this.cursorPos = cursorPos;
|
280012
|
-
}
|
280013
|
-
}
|
280014
|
-
done({ clearContent }) {
|
280015
|
-
this.rl.setPrompt("");
|
280016
|
-
let output = cursorDown2(this.extraLinesUnderPrompt);
|
280017
|
-
output += clearContent ? import_ansi_escapes2.default.eraseLines(this.height) : `
|
280018
|
-
`;
|
280019
|
-
output += import_ansi_escapes2.default.cursorShow;
|
280020
|
-
this.write(output);
|
280021
|
-
this.rl.close();
|
280022
|
-
}
|
280023
|
-
}
|
280024
|
-
|
280025
|
-
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/promise-polyfill.js
|
280026
|
-
class PromisePolyfill2 extends Promise {
|
280027
|
-
static withResolver() {
|
280028
|
-
let resolve5;
|
280029
|
-
let reject;
|
280030
|
-
const promise = new Promise((res, rej) => {
|
280031
|
-
resolve5 = res;
|
280032
|
-
reject = rej;
|
280033
|
-
});
|
280034
|
-
return { promise, resolve: resolve5, reject };
|
280035
|
-
}
|
280036
|
-
}
|
280037
|
-
|
280038
|
-
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
|
280039
|
-
function getCallSites2() {
|
280040
|
-
const _prepareStackTrace = Error.prepareStackTrace;
|
280041
|
-
try {
|
280042
|
-
let result = [];
|
280043
|
-
Error.prepareStackTrace = (_5, callSites) => {
|
280044
|
-
const callSitesWithoutCurrent = callSites.slice(1);
|
280045
|
-
result = callSitesWithoutCurrent;
|
280046
|
-
return callSitesWithoutCurrent;
|
280047
|
-
};
|
280048
|
-
new Error().stack;
|
280049
|
-
return result;
|
280050
|
-
} finally {
|
280051
|
-
Error.prepareStackTrace = _prepareStackTrace;
|
280052
|
-
}
|
280053
|
-
}
|
280054
|
-
function createPrompt2(view) {
|
280055
|
-
const callSites = getCallSites2();
|
280056
|
-
const callerFilename = callSites[1]?.getFileName?.();
|
280057
|
-
const prompt = (config3, context = {}) => {
|
280058
|
-
const { input = process.stdin, signal } = context;
|
280059
|
-
const cleanups = new Set;
|
280060
|
-
const output = new import_mute_stream2.default;
|
280061
|
-
output.pipe(context.output ?? process.stdout);
|
280062
|
-
const rl = readline4.createInterface({
|
280063
|
-
terminal: true,
|
280064
|
-
input,
|
280065
|
-
output
|
280066
|
-
});
|
280067
|
-
const screen = new ScreenManager2(rl);
|
280068
|
-
const { promise, resolve: resolve5, reject } = PromisePolyfill2.withResolver();
|
280069
|
-
const cancel3 = () => reject(new CancelPromptError2);
|
280070
|
-
if (signal) {
|
280071
|
-
const abort = () => reject(new AbortPromptError2({ cause: signal.reason }));
|
280072
|
-
if (signal.aborted) {
|
280073
|
-
abort();
|
280074
|
-
return Object.assign(promise, { cancel: cancel3 });
|
280075
|
-
}
|
280076
|
-
signal.addEventListener("abort", abort);
|
280077
|
-
cleanups.add(() => signal.removeEventListener("abort", abort));
|
280078
|
-
}
|
280079
|
-
cleanups.add(onExit((code2, signal2) => {
|
280080
|
-
reject(new ExitPromptError2(`User force closed the prompt with ${code2} ${signal2}`));
|
280081
|
-
}));
|
280082
|
-
const checkCursorPos = () => screen.checkCursorPos();
|
280083
|
-
rl.input.on("keypress", checkCursorPos);
|
280084
|
-
cleanups.add(() => rl.input.removeListener("keypress", checkCursorPos));
|
280085
|
-
return withHooks2(rl, (cycle) => {
|
280086
|
-
const hooksCleanup = AsyncResource6.bind(() => effectScheduler2.clearAll());
|
280087
|
-
rl.on("close", hooksCleanup);
|
280088
|
-
cleanups.add(() => rl.removeListener("close", hooksCleanup));
|
280089
|
-
cycle(() => {
|
280090
|
-
try {
|
280091
|
-
const nextView = view(config3, (value4) => {
|
280092
|
-
setImmediate(() => resolve5(value4));
|
280093
|
-
});
|
280094
|
-
if (nextView === undefined) {
|
280095
|
-
throw new Error(`Prompt functions must return a string.
|
280096
|
-
at ${callerFilename}`);
|
280097
|
-
}
|
280098
|
-
const [content, bottomContent] = typeof nextView === "string" ? [nextView] : nextView;
|
280099
|
-
screen.render(content, bottomContent);
|
280100
|
-
effectScheduler2.run();
|
280101
|
-
} catch (error5) {
|
280102
|
-
reject(error5);
|
280103
|
-
}
|
280104
|
-
});
|
280105
|
-
return Object.assign(promise.then((answer) => {
|
280106
|
-
effectScheduler2.clearAll();
|
280107
|
-
return answer;
|
280108
|
-
}, (error5) => {
|
280109
|
-
effectScheduler2.clearAll();
|
280110
|
-
throw error5;
|
280111
|
-
}).finally(() => {
|
280112
|
-
cleanups.forEach((cleanup) => cleanup());
|
280113
|
-
screen.done({ clearContent: Boolean(context.clearPromptOnDone) });
|
280114
|
-
output.end();
|
280115
|
-
}).then(() => promise), { cancel: cancel3 });
|
280116
|
-
});
|
280117
|
-
};
|
280118
|
-
return prompt;
|
280119
|
-
}
|
280120
|
-
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/Separator.js
|
280121
|
-
var import_yoctocolors_cjs3 = __toESM(require_yoctocolors_cjs(), 1);
|
280122
|
-
class Separator {
|
280123
|
-
separator = import_yoctocolors_cjs3.default.dim(Array.from({ length: 15 }).join(esm_default.line));
|
280124
|
-
type = "separator";
|
280125
|
-
constructor(separator) {
|
280126
|
-
if (separator) {
|
280127
|
-
this.separator = separator;
|
280128
|
-
}
|
280129
|
-
}
|
280130
|
-
static isSeparator(choice) {
|
280131
|
-
return Boolean(choice && typeof choice === "object" && "type" in choice && choice.type === "separator");
|
280132
|
-
}
|
280133
|
-
}
|
280134
279680
|
// ../../node_modules/@inquirer/select/dist/esm/index.js
|
280135
|
-
var
|
280136
|
-
var
|
279681
|
+
var import_yoctocolors_cjs3 = __toESM(require_yoctocolors_cjs(), 1);
|
279682
|
+
var import_ansi_escapes2 = __toESM(require_ansi_escapes(), 1);
|
280137
279683
|
var selectTheme = {
|
280138
279684
|
icon: { cursor: esm_default.pointer },
|
280139
279685
|
style: {
|
280140
|
-
disabled: (text2) =>
|
280141
|
-
description: (text2) =>
|
279686
|
+
disabled: (text2) => import_yoctocolors_cjs3.default.dim(`- ${text2}`),
|
279687
|
+
description: (text2) => import_yoctocolors_cjs3.default.cyan(text2)
|
280142
279688
|
},
|
280143
279689
|
helpMode: "auto"
|
280144
279690
|
};
|
@@ -280167,19 +279713,19 @@ function normalizeChoices(choices) {
|
|
280167
279713
|
};
|
280168
279714
|
});
|
280169
279715
|
}
|
280170
|
-
var esm_default2 =
|
279716
|
+
var esm_default2 = createPrompt((config3, done) => {
|
280171
279717
|
const { loop = true, pageSize = 7 } = config3;
|
280172
|
-
const firstRender =
|
280173
|
-
const theme =
|
280174
|
-
const [status, setStatus] =
|
280175
|
-
const prefix =
|
280176
|
-
const searchTimeoutRef =
|
279718
|
+
const firstRender = useRef(true);
|
279719
|
+
const theme = makeTheme(selectTheme, config3.theme);
|
279720
|
+
const [status, setStatus] = useState("idle");
|
279721
|
+
const prefix = usePrefix({ status, theme });
|
279722
|
+
const searchTimeoutRef = useRef();
|
280177
279723
|
const items = useMemo(() => normalizeChoices(config3.choices), [config3.choices]);
|
280178
279724
|
const bounds = useMemo(() => {
|
280179
279725
|
const first = items.findIndex(isSelectable);
|
280180
279726
|
const last = items.findLastIndex(isSelectable);
|
280181
279727
|
if (first === -1) {
|
280182
|
-
throw new
|
279728
|
+
throw new ValidationError("[select prompt] No selectable choices. All choices are disabled.");
|
280183
279729
|
}
|
280184
279730
|
return { first, last };
|
280185
279731
|
}, [items]);
|
@@ -280188,31 +279734,31 @@ var esm_default2 = createPrompt2((config3, done) => {
|
|
280188
279734
|
return -1;
|
280189
279735
|
return items.findIndex((item) => isSelectable(item) && item.value === config3.default);
|
280190
279736
|
}, [config3.default, items]);
|
280191
|
-
const [active, setActive] =
|
279737
|
+
const [active, setActive] = useState(defaultItemIndex === -1 ? bounds.first : defaultItemIndex);
|
280192
279738
|
const selectedChoice = items[active];
|
280193
|
-
|
279739
|
+
useKeypress((key2, rl) => {
|
280194
279740
|
clearTimeout(searchTimeoutRef.current);
|
280195
|
-
if (
|
279741
|
+
if (isEnterKey(key2)) {
|
280196
279742
|
setStatus("done");
|
280197
279743
|
done(selectedChoice.value);
|
280198
|
-
} else if (isUpKey(
|
279744
|
+
} else if (isUpKey(key2) || isDownKey(key2)) {
|
280199
279745
|
rl.clearLine(0);
|
280200
|
-
if (loop || isUpKey(
|
280201
|
-
const offset = isUpKey(
|
279746
|
+
if (loop || isUpKey(key2) && active !== bounds.first || isDownKey(key2) && active !== bounds.last) {
|
279747
|
+
const offset = isUpKey(key2) ? -1 : 1;
|
280202
279748
|
let next = active;
|
280203
279749
|
do {
|
280204
279750
|
next = (next + offset + items.length) % items.length;
|
280205
279751
|
} while (!isSelectable(items[next]));
|
280206
279752
|
setActive(next);
|
280207
279753
|
}
|
280208
|
-
} else if (isNumberKey(
|
279754
|
+
} else if (isNumberKey(key2)) {
|
280209
279755
|
rl.clearLine(0);
|
280210
|
-
const position = Number(
|
279756
|
+
const position = Number(key2.name) - 1;
|
280211
279757
|
const item = items[position];
|
280212
279758
|
if (item != null && isSelectable(item)) {
|
280213
279759
|
setActive(position);
|
280214
279760
|
}
|
280215
|
-
} else if (isBackspaceKey(
|
279761
|
+
} else if (isBackspaceKey(key2)) {
|
280216
279762
|
rl.clearLine(0);
|
280217
279763
|
} else {
|
280218
279764
|
const searchTerm = rl.line.toLowerCase();
|
@@ -280229,7 +279775,7 @@ var esm_default2 = createPrompt2((config3, done) => {
|
|
280229
279775
|
}, 700);
|
280230
279776
|
}
|
280231
279777
|
});
|
280232
|
-
|
279778
|
+
useEffect(() => () => {
|
280233
279779
|
clearTimeout(searchTimeoutRef.current);
|
280234
279780
|
}, []);
|
280235
279781
|
const message = theme.style.message(config3.message, status);
|
@@ -280268,7 +279814,7 @@ ${theme.style.help("(Use arrow keys to reveal more choices)")}`;
|
|
280268
279814
|
const choiceDescription = selectedChoice.description ? `
|
280269
279815
|
${theme.style.description(selectedChoice.description)}` : ``;
|
280270
279816
|
return `${[prefix, message, helpTipTop].filter(Boolean).join(" ")}
|
280271
|
-
${page}${helpTipBottom}${choiceDescription}${
|
279817
|
+
${page}${helpTipBottom}${choiceDescription}${import_ansi_escapes2.default.cursorHide}`;
|
280272
279818
|
});
|
280273
279819
|
|
280274
279820
|
// src/prompts/smart-contract-set/subgraph.prompt.ts
|
@@ -280608,13 +280154,13 @@ var esm_default3 = createPrompt((config3, done) => {
|
|
280608
280154
|
const [value4, setValue] = useState("");
|
280609
280155
|
const theme = makeTheme(config3.theme);
|
280610
280156
|
const prefix = usePrefix({ status, theme });
|
280611
|
-
useKeypress((
|
280612
|
-
if (isEnterKey(
|
280157
|
+
useKeypress((key2, rl) => {
|
280158
|
+
if (isEnterKey(key2)) {
|
280613
280159
|
const answer = getBooleanValue(value4, config3.default);
|
280614
280160
|
setValue(transformer(answer));
|
280615
280161
|
setStatus("done");
|
280616
280162
|
done(answer);
|
280617
|
-
} else if (
|
280163
|
+
} else if (key2.name === "tab") {
|
280618
280164
|
const answer = boolToString(!getBooleanValue(value4, config3.default));
|
280619
280165
|
rl.clearLine(0);
|
280620
280166
|
rl.write(answer);
|
@@ -280634,478 +280180,23 @@ var esm_default3 = createPrompt((config3, done) => {
|
|
280634
280180
|
return `${prefix} ${message}${defaultValue} ${formattedValue}`;
|
280635
280181
|
});
|
280636
280182
|
|
280637
|
-
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/key.js
|
280638
|
-
var isBackspaceKey2 = (key3) => key3.name === "backspace";
|
280639
|
-
var isEnterKey3 = (key3) => key3.name === "enter" || key3.name === "return";
|
280640
|
-
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/errors.js
|
280641
|
-
class AbortPromptError3 extends Error {
|
280642
|
-
name = "AbortPromptError";
|
280643
|
-
message = "Prompt was aborted";
|
280644
|
-
constructor(options) {
|
280645
|
-
super();
|
280646
|
-
this.cause = options?.cause;
|
280647
|
-
}
|
280648
|
-
}
|
280649
|
-
|
280650
|
-
class CancelPromptError3 extends Error {
|
280651
|
-
name = "CancelPromptError";
|
280652
|
-
message = "Prompt was canceled";
|
280653
|
-
}
|
280654
|
-
|
280655
|
-
class ExitPromptError3 extends Error {
|
280656
|
-
name = "ExitPromptError";
|
280657
|
-
}
|
280658
|
-
|
280659
|
-
class HookError3 extends Error {
|
280660
|
-
name = "HookError";
|
280661
|
-
}
|
280662
|
-
|
280663
|
-
class ValidationError3 extends Error {
|
280664
|
-
name = "ValidationError";
|
280665
|
-
}
|
280666
|
-
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/use-prefix.js
|
280667
|
-
import { AsyncResource as AsyncResource8 } from "node:async_hooks";
|
280668
|
-
|
280669
|
-
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/hook-engine.js
|
280670
|
-
import { AsyncLocalStorage as AsyncLocalStorage3, AsyncResource as AsyncResource7 } from "node:async_hooks";
|
280671
|
-
var hookStorage3 = new AsyncLocalStorage3;
|
280672
|
-
function createStore3(rl) {
|
280673
|
-
const store = {
|
280674
|
-
rl,
|
280675
|
-
hooks: [],
|
280676
|
-
hooksCleanup: [],
|
280677
|
-
hooksEffect: [],
|
280678
|
-
index: 0,
|
280679
|
-
handleChange() {
|
280680
|
-
}
|
280681
|
-
};
|
280682
|
-
return store;
|
280683
|
-
}
|
280684
|
-
function withHooks3(rl, cb) {
|
280685
|
-
const store = createStore3(rl);
|
280686
|
-
return hookStorage3.run(store, () => {
|
280687
|
-
function cycle(render) {
|
280688
|
-
store.handleChange = () => {
|
280689
|
-
store.index = 0;
|
280690
|
-
render();
|
280691
|
-
};
|
280692
|
-
store.handleChange();
|
280693
|
-
}
|
280694
|
-
return cb(cycle);
|
280695
|
-
});
|
280696
|
-
}
|
280697
|
-
function getStore3() {
|
280698
|
-
const store = hookStorage3.getStore();
|
280699
|
-
if (!store) {
|
280700
|
-
throw new HookError3("[Inquirer] Hook functions can only be called from within a prompt");
|
280701
|
-
}
|
280702
|
-
return store;
|
280703
|
-
}
|
280704
|
-
function readline5() {
|
280705
|
-
return getStore3().rl;
|
280706
|
-
}
|
280707
|
-
function withUpdates3(fn) {
|
280708
|
-
const wrapped = (...args) => {
|
280709
|
-
const store = getStore3();
|
280710
|
-
let shouldUpdate = false;
|
280711
|
-
const oldHandleChange = store.handleChange;
|
280712
|
-
store.handleChange = () => {
|
280713
|
-
shouldUpdate = true;
|
280714
|
-
};
|
280715
|
-
const returnValue = fn(...args);
|
280716
|
-
if (shouldUpdate) {
|
280717
|
-
oldHandleChange();
|
280718
|
-
}
|
280719
|
-
store.handleChange = oldHandleChange;
|
280720
|
-
return returnValue;
|
280721
|
-
};
|
280722
|
-
return AsyncResource7.bind(wrapped);
|
280723
|
-
}
|
280724
|
-
function withPointer3(cb) {
|
280725
|
-
const store = getStore3();
|
280726
|
-
const { index } = store;
|
280727
|
-
const pointer = {
|
280728
|
-
get() {
|
280729
|
-
return store.hooks[index];
|
280730
|
-
},
|
280731
|
-
set(value4) {
|
280732
|
-
store.hooks[index] = value4;
|
280733
|
-
},
|
280734
|
-
initialized: index in store.hooks
|
280735
|
-
};
|
280736
|
-
const returnValue = cb(pointer);
|
280737
|
-
store.index++;
|
280738
|
-
return returnValue;
|
280739
|
-
}
|
280740
|
-
function handleChange3() {
|
280741
|
-
getStore3().handleChange();
|
280742
|
-
}
|
280743
|
-
var effectScheduler3 = {
|
280744
|
-
queue(cb) {
|
280745
|
-
const store = getStore3();
|
280746
|
-
const { index } = store;
|
280747
|
-
store.hooksEffect.push(() => {
|
280748
|
-
store.hooksCleanup[index]?.();
|
280749
|
-
const cleanFn = cb(readline5());
|
280750
|
-
if (cleanFn != null && typeof cleanFn !== "function") {
|
280751
|
-
throw new ValidationError3("useEffect return value must be a cleanup function or nothing.");
|
280752
|
-
}
|
280753
|
-
store.hooksCleanup[index] = cleanFn;
|
280754
|
-
});
|
280755
|
-
},
|
280756
|
-
run() {
|
280757
|
-
const store = getStore3();
|
280758
|
-
withUpdates3(() => {
|
280759
|
-
store.hooksEffect.forEach((effect) => {
|
280760
|
-
effect();
|
280761
|
-
});
|
280762
|
-
store.hooksEffect.length = 0;
|
280763
|
-
})();
|
280764
|
-
},
|
280765
|
-
clearAll() {
|
280766
|
-
const store = getStore3();
|
280767
|
-
store.hooksCleanup.forEach((cleanFn) => {
|
280768
|
-
cleanFn?.();
|
280769
|
-
});
|
280770
|
-
store.hooksEffect.length = 0;
|
280771
|
-
store.hooksCleanup.length = 0;
|
280772
|
-
}
|
280773
|
-
};
|
280774
|
-
|
280775
|
-
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/use-state.js
|
280776
|
-
function useState3(defaultValue) {
|
280777
|
-
return withPointer3((pointer) => {
|
280778
|
-
const setFn = (newValue) => {
|
280779
|
-
if (pointer.get() !== newValue) {
|
280780
|
-
pointer.set(newValue);
|
280781
|
-
handleChange3();
|
280782
|
-
}
|
280783
|
-
};
|
280784
|
-
if (pointer.initialized) {
|
280785
|
-
return [pointer.get(), setFn];
|
280786
|
-
}
|
280787
|
-
const value4 = typeof defaultValue === "function" ? defaultValue() : defaultValue;
|
280788
|
-
pointer.set(value4);
|
280789
|
-
return [value4, setFn];
|
280790
|
-
});
|
280791
|
-
}
|
280792
|
-
|
280793
|
-
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/use-effect.js
|
280794
|
-
function useEffect3(cb, depArray) {
|
280795
|
-
withPointer3((pointer) => {
|
280796
|
-
const oldDeps = pointer.get();
|
280797
|
-
const hasChanged = !Array.isArray(oldDeps) || depArray.some((dep, i6) => !Object.is(dep, oldDeps[i6]));
|
280798
|
-
if (hasChanged) {
|
280799
|
-
effectScheduler3.queue(cb);
|
280800
|
-
}
|
280801
|
-
pointer.set(depArray);
|
280802
|
-
});
|
280803
|
-
}
|
280804
|
-
|
280805
|
-
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/theme.js
|
280806
|
-
var import_yoctocolors_cjs5 = __toESM(require_yoctocolors_cjs(), 1);
|
280807
|
-
var defaultTheme3 = {
|
280808
|
-
prefix: {
|
280809
|
-
idle: import_yoctocolors_cjs5.default.blue("?"),
|
280810
|
-
done: import_yoctocolors_cjs5.default.green(esm_default.tick)
|
280811
|
-
},
|
280812
|
-
spinner: {
|
280813
|
-
interval: 80,
|
280814
|
-
frames: ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"].map((frame) => import_yoctocolors_cjs5.default.yellow(frame))
|
280815
|
-
},
|
280816
|
-
style: {
|
280817
|
-
answer: import_yoctocolors_cjs5.default.cyan,
|
280818
|
-
message: import_yoctocolors_cjs5.default.bold,
|
280819
|
-
error: (text2) => import_yoctocolors_cjs5.default.red(`> ${text2}`),
|
280820
|
-
defaultAnswer: (text2) => import_yoctocolors_cjs5.default.dim(`(${text2})`),
|
280821
|
-
help: import_yoctocolors_cjs5.default.dim,
|
280822
|
-
highlight: import_yoctocolors_cjs5.default.cyan,
|
280823
|
-
key: (text2) => import_yoctocolors_cjs5.default.cyan(import_yoctocolors_cjs5.default.bold(`<${text2}>`))
|
280824
|
-
}
|
280825
|
-
};
|
280826
|
-
|
280827
|
-
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/make-theme.js
|
280828
|
-
function isPlainObject4(value4) {
|
280829
|
-
if (typeof value4 !== "object" || value4 === null)
|
280830
|
-
return false;
|
280831
|
-
let proto = value4;
|
280832
|
-
while (Object.getPrototypeOf(proto) !== null) {
|
280833
|
-
proto = Object.getPrototypeOf(proto);
|
280834
|
-
}
|
280835
|
-
return Object.getPrototypeOf(value4) === proto;
|
280836
|
-
}
|
280837
|
-
function deepMerge4(...objects) {
|
280838
|
-
const output = {};
|
280839
|
-
for (const obj of objects) {
|
280840
|
-
for (const [key3, value4] of Object.entries(obj)) {
|
280841
|
-
const prevValue = output[key3];
|
280842
|
-
output[key3] = isPlainObject4(prevValue) && isPlainObject4(value4) ? deepMerge4(prevValue, value4) : value4;
|
280843
|
-
}
|
280844
|
-
}
|
280845
|
-
return output;
|
280846
|
-
}
|
280847
|
-
function makeTheme3(...themes) {
|
280848
|
-
const themesToMerge = [
|
280849
|
-
defaultTheme3,
|
280850
|
-
...themes.filter((theme) => theme != null)
|
280851
|
-
];
|
280852
|
-
return deepMerge4(...themesToMerge);
|
280853
|
-
}
|
280854
|
-
|
280855
|
-
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/use-prefix.js
|
280856
|
-
function usePrefix3({ status = "idle", theme }) {
|
280857
|
-
const [showLoader, setShowLoader] = useState3(false);
|
280858
|
-
const [tick, setTick] = useState3(0);
|
280859
|
-
const { prefix, spinner: spinner2 } = makeTheme3(theme);
|
280860
|
-
useEffect3(() => {
|
280861
|
-
if (status === "loading") {
|
280862
|
-
let tickInterval;
|
280863
|
-
let inc = -1;
|
280864
|
-
const delayTimeout = setTimeout(AsyncResource8.bind(() => {
|
280865
|
-
setShowLoader(true);
|
280866
|
-
tickInterval = setInterval(AsyncResource8.bind(() => {
|
280867
|
-
inc = inc + 1;
|
280868
|
-
setTick(inc % spinner2.frames.length);
|
280869
|
-
}), spinner2.interval);
|
280870
|
-
}), 300);
|
280871
|
-
return () => {
|
280872
|
-
clearTimeout(delayTimeout);
|
280873
|
-
clearInterval(tickInterval);
|
280874
|
-
};
|
280875
|
-
} else {
|
280876
|
-
setShowLoader(false);
|
280877
|
-
}
|
280878
|
-
}, [status]);
|
280879
|
-
if (showLoader) {
|
280880
|
-
return spinner2.frames[tick];
|
280881
|
-
}
|
280882
|
-
const iconName = status === "loading" ? "idle" : status;
|
280883
|
-
return typeof prefix === "string" ? prefix : prefix[iconName] ?? prefix["idle"];
|
280884
|
-
}
|
280885
|
-
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/use-ref.js
|
280886
|
-
function useRef3(val) {
|
280887
|
-
return useState3({ current: val })[0];
|
280888
|
-
}
|
280889
|
-
|
280890
|
-
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/use-keypress.js
|
280891
|
-
function useKeypress3(userHandler) {
|
280892
|
-
const signal = useRef3(userHandler);
|
280893
|
-
signal.current = userHandler;
|
280894
|
-
useEffect3((rl) => {
|
280895
|
-
let ignore = false;
|
280896
|
-
const handler = withUpdates3((_input, event) => {
|
280897
|
-
if (ignore)
|
280898
|
-
return;
|
280899
|
-
signal.current(event, rl);
|
280900
|
-
});
|
280901
|
-
rl.input.on("keypress", handler);
|
280902
|
-
return () => {
|
280903
|
-
ignore = true;
|
280904
|
-
rl.input.removeListener("keypress", handler);
|
280905
|
-
};
|
280906
|
-
}, []);
|
280907
|
-
}
|
280908
|
-
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/utils.js
|
280909
|
-
var import_cli_width3 = __toESM(require_cli_width(), 1);
|
280910
|
-
var import_wrap_ansi3 = __toESM(require_wrap_ansi(), 1);
|
280911
|
-
function breakLines3(content, width) {
|
280912
|
-
return content.split(`
|
280913
|
-
`).flatMap((line) => import_wrap_ansi3.default(line, width, { trim: false, hard: true }).split(`
|
280914
|
-
`).map((str) => str.trimEnd())).join(`
|
280915
|
-
`);
|
280916
|
-
}
|
280917
|
-
function readlineWidth3() {
|
280918
|
-
return import_cli_width3.default({ defaultWidth: 80, output: readline5().output });
|
280919
|
-
}
|
280920
|
-
|
280921
|
-
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
|
280922
|
-
var import_mute_stream3 = __toESM(require_lib(), 1);
|
280923
|
-
import * as readline6 from "node:readline";
|
280924
|
-
import { AsyncResource as AsyncResource9 } from "node:async_hooks";
|
280925
|
-
|
280926
|
-
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/screen-manager.js
|
280927
|
-
var import_ansi_escapes4 = __toESM(require_ansi_escapes(), 1);
|
280928
|
-
import { stripVTControlCharacters as stripVTControlCharacters4 } from "node:util";
|
280929
|
-
var height3 = (content) => content.split(`
|
280930
|
-
`).length;
|
280931
|
-
var lastLine3 = (content) => content.split(`
|
280932
|
-
`).pop() ?? "";
|
280933
|
-
function cursorDown3(n6) {
|
280934
|
-
return n6 > 0 ? import_ansi_escapes4.default.cursorDown(n6) : "";
|
280935
|
-
}
|
280936
|
-
|
280937
|
-
class ScreenManager3 {
|
280938
|
-
rl;
|
280939
|
-
height = 0;
|
280940
|
-
extraLinesUnderPrompt = 0;
|
280941
|
-
cursorPos;
|
280942
|
-
constructor(rl) {
|
280943
|
-
this.rl = rl;
|
280944
|
-
this.rl = rl;
|
280945
|
-
this.cursorPos = rl.getCursorPos();
|
280946
|
-
}
|
280947
|
-
write(content) {
|
280948
|
-
this.rl.output.unmute();
|
280949
|
-
this.rl.output.write(content);
|
280950
|
-
this.rl.output.mute();
|
280951
|
-
}
|
280952
|
-
render(content, bottomContent = "") {
|
280953
|
-
const promptLine = lastLine3(content);
|
280954
|
-
const rawPromptLine = stripVTControlCharacters4(promptLine);
|
280955
|
-
let prompt = rawPromptLine;
|
280956
|
-
if (this.rl.line.length > 0) {
|
280957
|
-
prompt = prompt.slice(0, -this.rl.line.length);
|
280958
|
-
}
|
280959
|
-
this.rl.setPrompt(prompt);
|
280960
|
-
this.cursorPos = this.rl.getCursorPos();
|
280961
|
-
const width = readlineWidth3();
|
280962
|
-
content = breakLines3(content, width);
|
280963
|
-
bottomContent = breakLines3(bottomContent, width);
|
280964
|
-
if (rawPromptLine.length % width === 0) {
|
280965
|
-
content += `
|
280966
|
-
`;
|
280967
|
-
}
|
280968
|
-
let output = content + (bottomContent ? `
|
280969
|
-
` + bottomContent : "");
|
280970
|
-
const promptLineUpDiff = Math.floor(rawPromptLine.length / width) - this.cursorPos.rows;
|
280971
|
-
const bottomContentHeight = promptLineUpDiff + (bottomContent ? height3(bottomContent) : 0);
|
280972
|
-
if (bottomContentHeight > 0)
|
280973
|
-
output += import_ansi_escapes4.default.cursorUp(bottomContentHeight);
|
280974
|
-
output += import_ansi_escapes4.default.cursorTo(this.cursorPos.cols);
|
280975
|
-
this.write(cursorDown3(this.extraLinesUnderPrompt) + import_ansi_escapes4.default.eraseLines(this.height) + output);
|
280976
|
-
this.extraLinesUnderPrompt = bottomContentHeight;
|
280977
|
-
this.height = height3(output);
|
280978
|
-
}
|
280979
|
-
checkCursorPos() {
|
280980
|
-
const cursorPos = this.rl.getCursorPos();
|
280981
|
-
if (cursorPos.cols !== this.cursorPos.cols) {
|
280982
|
-
this.write(import_ansi_escapes4.default.cursorTo(cursorPos.cols));
|
280983
|
-
this.cursorPos = cursorPos;
|
280984
|
-
}
|
280985
|
-
}
|
280986
|
-
done({ clearContent }) {
|
280987
|
-
this.rl.setPrompt("");
|
280988
|
-
let output = cursorDown3(this.extraLinesUnderPrompt);
|
280989
|
-
output += clearContent ? import_ansi_escapes4.default.eraseLines(this.height) : `
|
280990
|
-
`;
|
280991
|
-
output += import_ansi_escapes4.default.cursorShow;
|
280992
|
-
this.write(output);
|
280993
|
-
this.rl.close();
|
280994
|
-
}
|
280995
|
-
}
|
280996
|
-
|
280997
|
-
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/promise-polyfill.js
|
280998
|
-
class PromisePolyfill3 extends Promise {
|
280999
|
-
static withResolver() {
|
281000
|
-
let resolve6;
|
281001
|
-
let reject;
|
281002
|
-
const promise = new Promise((res, rej) => {
|
281003
|
-
resolve6 = res;
|
281004
|
-
reject = rej;
|
281005
|
-
});
|
281006
|
-
return { promise, resolve: resolve6, reject };
|
281007
|
-
}
|
281008
|
-
}
|
281009
|
-
|
281010
|
-
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
|
281011
|
-
function getCallSites3() {
|
281012
|
-
const _prepareStackTrace = Error.prepareStackTrace;
|
281013
|
-
try {
|
281014
|
-
let result = [];
|
281015
|
-
Error.prepareStackTrace = (_5, callSites) => {
|
281016
|
-
const callSitesWithoutCurrent = callSites.slice(1);
|
281017
|
-
result = callSitesWithoutCurrent;
|
281018
|
-
return callSitesWithoutCurrent;
|
281019
|
-
};
|
281020
|
-
new Error().stack;
|
281021
|
-
return result;
|
281022
|
-
} finally {
|
281023
|
-
Error.prepareStackTrace = _prepareStackTrace;
|
281024
|
-
}
|
281025
|
-
}
|
281026
|
-
function createPrompt3(view) {
|
281027
|
-
const callSites = getCallSites3();
|
281028
|
-
const callerFilename = callSites[1]?.getFileName?.();
|
281029
|
-
const prompt = (config3, context = {}) => {
|
281030
|
-
const { input = process.stdin, signal } = context;
|
281031
|
-
const cleanups = new Set;
|
281032
|
-
const output = new import_mute_stream3.default;
|
281033
|
-
output.pipe(context.output ?? process.stdout);
|
281034
|
-
const rl = readline6.createInterface({
|
281035
|
-
terminal: true,
|
281036
|
-
input,
|
281037
|
-
output
|
281038
|
-
});
|
281039
|
-
const screen = new ScreenManager3(rl);
|
281040
|
-
const { promise, resolve: resolve6, reject } = PromisePolyfill3.withResolver();
|
281041
|
-
const cancel3 = () => reject(new CancelPromptError3);
|
281042
|
-
if (signal) {
|
281043
|
-
const abort = () => reject(new AbortPromptError3({ cause: signal.reason }));
|
281044
|
-
if (signal.aborted) {
|
281045
|
-
abort();
|
281046
|
-
return Object.assign(promise, { cancel: cancel3 });
|
281047
|
-
}
|
281048
|
-
signal.addEventListener("abort", abort);
|
281049
|
-
cleanups.add(() => signal.removeEventListener("abort", abort));
|
281050
|
-
}
|
281051
|
-
cleanups.add(onExit((code2, signal2) => {
|
281052
|
-
reject(new ExitPromptError3(`User force closed the prompt with ${code2} ${signal2}`));
|
281053
|
-
}));
|
281054
|
-
const checkCursorPos = () => screen.checkCursorPos();
|
281055
|
-
rl.input.on("keypress", checkCursorPos);
|
281056
|
-
cleanups.add(() => rl.input.removeListener("keypress", checkCursorPos));
|
281057
|
-
return withHooks3(rl, (cycle) => {
|
281058
|
-
const hooksCleanup = AsyncResource9.bind(() => effectScheduler3.clearAll());
|
281059
|
-
rl.on("close", hooksCleanup);
|
281060
|
-
cleanups.add(() => rl.removeListener("close", hooksCleanup));
|
281061
|
-
cycle(() => {
|
281062
|
-
try {
|
281063
|
-
const nextView = view(config3, (value4) => {
|
281064
|
-
setImmediate(() => resolve6(value4));
|
281065
|
-
});
|
281066
|
-
if (nextView === undefined) {
|
281067
|
-
throw new Error(`Prompt functions must return a string.
|
281068
|
-
at ${callerFilename}`);
|
281069
|
-
}
|
281070
|
-
const [content, bottomContent] = typeof nextView === "string" ? [nextView] : nextView;
|
281071
|
-
screen.render(content, bottomContent);
|
281072
|
-
effectScheduler3.run();
|
281073
|
-
} catch (error5) {
|
281074
|
-
reject(error5);
|
281075
|
-
}
|
281076
|
-
});
|
281077
|
-
return Object.assign(promise.then((answer) => {
|
281078
|
-
effectScheduler3.clearAll();
|
281079
|
-
return answer;
|
281080
|
-
}, (error5) => {
|
281081
|
-
effectScheduler3.clearAll();
|
281082
|
-
throw error5;
|
281083
|
-
}).finally(() => {
|
281084
|
-
cleanups.forEach((cleanup) => cleanup());
|
281085
|
-
screen.done({ clearContent: Boolean(context.clearPromptOnDone) });
|
281086
|
-
output.end();
|
281087
|
-
}).then(() => promise), { cancel: cancel3 });
|
281088
|
-
});
|
281089
|
-
};
|
281090
|
-
return prompt;
|
281091
|
-
}
|
281092
280183
|
// ../../node_modules/@inquirer/input/dist/esm/index.js
|
281093
280184
|
var inputTheme = {
|
281094
280185
|
validationFailureMode: "keep"
|
281095
280186
|
};
|
281096
|
-
var esm_default4 =
|
280187
|
+
var esm_default4 = createPrompt((config3, done) => {
|
281097
280188
|
const { required, validate: validate3 = () => true } = config3;
|
281098
|
-
const theme =
|
281099
|
-
const [status, setStatus] =
|
281100
|
-
const [defaultValue = "", setDefaultValue] =
|
281101
|
-
const [errorMsg, setError] =
|
281102
|
-
const [value4, setValue] =
|
281103
|
-
const prefix =
|
281104
|
-
|
280189
|
+
const theme = makeTheme(inputTheme, config3.theme);
|
280190
|
+
const [status, setStatus] = useState("idle");
|
280191
|
+
const [defaultValue = "", setDefaultValue] = useState(config3.default);
|
280192
|
+
const [errorMsg, setError] = useState();
|
280193
|
+
const [value4, setValue] = useState("");
|
280194
|
+
const prefix = usePrefix({ status, theme });
|
280195
|
+
useKeypress(async (key2, rl) => {
|
281105
280196
|
if (status !== "idle") {
|
281106
280197
|
return;
|
281107
280198
|
}
|
281108
|
-
if (
|
280199
|
+
if (isEnterKey(key2)) {
|
281109
280200
|
const answer = value4 || defaultValue;
|
281110
280201
|
setStatus("loading");
|
281111
280202
|
const isValid2 = required && !answer ? "You must provide a value" : await validate3(answer);
|
@@ -281122,9 +280213,9 @@ var esm_default4 = createPrompt3((config3, done) => {
|
|
281122
280213
|
setError(isValid2 || "You must provide a valid value");
|
281123
280214
|
setStatus("idle");
|
281124
280215
|
}
|
281125
|
-
} else if (
|
280216
|
+
} else if (isBackspaceKey(key2) && !value4) {
|
281126
280217
|
setDefaultValue(undefined);
|
281127
|
-
} else if (
|
280218
|
+
} else if (key2.name === "tab" && !value4) {
|
281128
280219
|
setDefaultValue(undefined);
|
281129
280220
|
rl.clearLine(0);
|
281130
280221
|
rl.write(defaultValue);
|
@@ -281156,9 +280247,9 @@ var esm_default4 = createPrompt3((config3, done) => {
|
|
281156
280247
|
});
|
281157
280248
|
|
281158
280249
|
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/key.js
|
281159
|
-
var
|
280250
|
+
var isEnterKey2 = (key2) => key2.name === "enter" || key2.name === "return";
|
281160
280251
|
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/errors.js
|
281161
|
-
class
|
280252
|
+
class AbortPromptError2 extends Error {
|
281162
280253
|
name = "AbortPromptError";
|
281163
280254
|
message = "Prompt was aborted";
|
281164
280255
|
constructor(options) {
|
@@ -281167,29 +280258,29 @@ class AbortPromptError4 extends Error {
|
|
281167
280258
|
}
|
281168
280259
|
}
|
281169
280260
|
|
281170
|
-
class
|
280261
|
+
class CancelPromptError2 extends Error {
|
281171
280262
|
name = "CancelPromptError";
|
281172
280263
|
message = "Prompt was canceled";
|
281173
280264
|
}
|
281174
280265
|
|
281175
|
-
class
|
280266
|
+
class ExitPromptError2 extends Error {
|
281176
280267
|
name = "ExitPromptError";
|
281177
280268
|
}
|
281178
280269
|
|
281179
|
-
class
|
280270
|
+
class HookError2 extends Error {
|
281180
280271
|
name = "HookError";
|
281181
280272
|
}
|
281182
280273
|
|
281183
|
-
class
|
280274
|
+
class ValidationError2 extends Error {
|
281184
280275
|
name = "ValidationError";
|
281185
280276
|
}
|
281186
280277
|
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/use-prefix.js
|
281187
|
-
import { AsyncResource as
|
280278
|
+
import { AsyncResource as AsyncResource5 } from "node:async_hooks";
|
281188
280279
|
|
281189
280280
|
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/hook-engine.js
|
281190
|
-
import { AsyncLocalStorage as
|
281191
|
-
var
|
281192
|
-
function
|
280281
|
+
import { AsyncLocalStorage as AsyncLocalStorage2, AsyncResource as AsyncResource4 } from "node:async_hooks";
|
280282
|
+
var hookStorage2 = new AsyncLocalStorage2;
|
280283
|
+
function createStore2(rl) {
|
281193
280284
|
const store = {
|
281194
280285
|
rl,
|
281195
280286
|
hooks: [],
|
@@ -281201,9 +280292,9 @@ function createStore4(rl) {
|
|
281201
280292
|
};
|
281202
280293
|
return store;
|
281203
280294
|
}
|
281204
|
-
function
|
281205
|
-
const store =
|
281206
|
-
return
|
280295
|
+
function withHooks2(rl, cb) {
|
280296
|
+
const store = createStore2(rl);
|
280297
|
+
return hookStorage2.run(store, () => {
|
281207
280298
|
function cycle(render) {
|
281208
280299
|
store.handleChange = () => {
|
281209
280300
|
store.index = 0;
|
@@ -281214,19 +280305,19 @@ function withHooks4(rl, cb) {
|
|
281214
280305
|
return cb(cycle);
|
281215
280306
|
});
|
281216
280307
|
}
|
281217
|
-
function
|
281218
|
-
const store =
|
280308
|
+
function getStore2() {
|
280309
|
+
const store = hookStorage2.getStore();
|
281219
280310
|
if (!store) {
|
281220
|
-
throw new
|
280311
|
+
throw new HookError2("[Inquirer] Hook functions can only be called from within a prompt");
|
281221
280312
|
}
|
281222
280313
|
return store;
|
281223
280314
|
}
|
281224
|
-
function
|
281225
|
-
return
|
280315
|
+
function readline3() {
|
280316
|
+
return getStore2().rl;
|
281226
280317
|
}
|
281227
|
-
function
|
280318
|
+
function withUpdates2(fn) {
|
281228
280319
|
const wrapped = (...args) => {
|
281229
|
-
const store =
|
280320
|
+
const store = getStore2();
|
281230
280321
|
let shouldUpdate = false;
|
281231
280322
|
const oldHandleChange = store.handleChange;
|
281232
280323
|
store.handleChange = () => {
|
@@ -281239,10 +280330,10 @@ function withUpdates4(fn) {
|
|
281239
280330
|
store.handleChange = oldHandleChange;
|
281240
280331
|
return returnValue;
|
281241
280332
|
};
|
281242
|
-
return
|
280333
|
+
return AsyncResource4.bind(wrapped);
|
281243
280334
|
}
|
281244
|
-
function
|
281245
|
-
const store =
|
280335
|
+
function withPointer2(cb) {
|
280336
|
+
const store = getStore2();
|
281246
280337
|
const { index } = store;
|
281247
280338
|
const pointer = {
|
281248
280339
|
get() {
|
@@ -281257,25 +280348,25 @@ function withPointer4(cb) {
|
|
281257
280348
|
store.index++;
|
281258
280349
|
return returnValue;
|
281259
280350
|
}
|
281260
|
-
function
|
281261
|
-
|
280351
|
+
function handleChange2() {
|
280352
|
+
getStore2().handleChange();
|
281262
280353
|
}
|
281263
|
-
var
|
280354
|
+
var effectScheduler2 = {
|
281264
280355
|
queue(cb) {
|
281265
|
-
const store =
|
280356
|
+
const store = getStore2();
|
281266
280357
|
const { index } = store;
|
281267
280358
|
store.hooksEffect.push(() => {
|
281268
280359
|
store.hooksCleanup[index]?.();
|
281269
|
-
const cleanFn = cb(
|
280360
|
+
const cleanFn = cb(readline3());
|
281270
280361
|
if (cleanFn != null && typeof cleanFn !== "function") {
|
281271
|
-
throw new
|
280362
|
+
throw new ValidationError2("useEffect return value must be a cleanup function or nothing.");
|
281272
280363
|
}
|
281273
280364
|
store.hooksCleanup[index] = cleanFn;
|
281274
280365
|
});
|
281275
280366
|
},
|
281276
280367
|
run() {
|
281277
|
-
const store =
|
281278
|
-
|
280368
|
+
const store = getStore2();
|
280369
|
+
withUpdates2(() => {
|
281279
280370
|
store.hooksEffect.forEach((effect) => {
|
281280
280371
|
effect();
|
281281
280372
|
});
|
@@ -281283,7 +280374,7 @@ var effectScheduler4 = {
|
|
281283
280374
|
})();
|
281284
280375
|
},
|
281285
280376
|
clearAll() {
|
281286
|
-
const store =
|
280377
|
+
const store = getStore2();
|
281287
280378
|
store.hooksCleanup.forEach((cleanFn) => {
|
281288
280379
|
cleanFn?.();
|
281289
280380
|
});
|
@@ -281293,12 +280384,12 @@ var effectScheduler4 = {
|
|
281293
280384
|
};
|
281294
280385
|
|
281295
280386
|
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/use-state.js
|
281296
|
-
function
|
281297
|
-
return
|
280387
|
+
function useState2(defaultValue) {
|
280388
|
+
return withPointer2((pointer) => {
|
281298
280389
|
const setFn = (newValue) => {
|
281299
280390
|
if (pointer.get() !== newValue) {
|
281300
280391
|
pointer.set(newValue);
|
281301
|
-
|
280392
|
+
handleChange2();
|
281302
280393
|
}
|
281303
280394
|
};
|
281304
280395
|
if (pointer.initialized) {
|
@@ -281311,41 +280402,41 @@ function useState4(defaultValue) {
|
|
281311
280402
|
}
|
281312
280403
|
|
281313
280404
|
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/use-effect.js
|
281314
|
-
function
|
281315
|
-
|
280405
|
+
function useEffect2(cb, depArray) {
|
280406
|
+
withPointer2((pointer) => {
|
281316
280407
|
const oldDeps = pointer.get();
|
281317
280408
|
const hasChanged = !Array.isArray(oldDeps) || depArray.some((dep, i6) => !Object.is(dep, oldDeps[i6]));
|
281318
280409
|
if (hasChanged) {
|
281319
|
-
|
280410
|
+
effectScheduler2.queue(cb);
|
281320
280411
|
}
|
281321
280412
|
pointer.set(depArray);
|
281322
280413
|
});
|
281323
280414
|
}
|
281324
280415
|
|
281325
280416
|
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/theme.js
|
281326
|
-
var
|
281327
|
-
var
|
280417
|
+
var import_yoctocolors_cjs4 = __toESM(require_yoctocolors_cjs(), 1);
|
280418
|
+
var defaultTheme2 = {
|
281328
280419
|
prefix: {
|
281329
|
-
idle:
|
281330
|
-
done:
|
280420
|
+
idle: import_yoctocolors_cjs4.default.blue("?"),
|
280421
|
+
done: import_yoctocolors_cjs4.default.green(esm_default.tick)
|
281331
280422
|
},
|
281332
280423
|
spinner: {
|
281333
280424
|
interval: 80,
|
281334
|
-
frames: ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"].map((frame) =>
|
280425
|
+
frames: ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"].map((frame) => import_yoctocolors_cjs4.default.yellow(frame))
|
281335
280426
|
},
|
281336
280427
|
style: {
|
281337
|
-
answer:
|
281338
|
-
message:
|
281339
|
-
error: (text2) =>
|
281340
|
-
defaultAnswer: (text2) =>
|
281341
|
-
help:
|
281342
|
-
highlight:
|
281343
|
-
key: (text2) =>
|
280428
|
+
answer: import_yoctocolors_cjs4.default.cyan,
|
280429
|
+
message: import_yoctocolors_cjs4.default.bold,
|
280430
|
+
error: (text2) => import_yoctocolors_cjs4.default.red(`> ${text2}`),
|
280431
|
+
defaultAnswer: (text2) => import_yoctocolors_cjs4.default.dim(`(${text2})`),
|
280432
|
+
help: import_yoctocolors_cjs4.default.dim,
|
280433
|
+
highlight: import_yoctocolors_cjs4.default.cyan,
|
280434
|
+
key: (text2) => import_yoctocolors_cjs4.default.cyan(import_yoctocolors_cjs4.default.bold(`<${text2}>`))
|
281344
280435
|
}
|
281345
280436
|
};
|
281346
280437
|
|
281347
280438
|
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/make-theme.js
|
281348
|
-
function
|
280439
|
+
function isPlainObject3(value4) {
|
281349
280440
|
if (typeof value4 !== "object" || value4 === null)
|
281350
280441
|
return false;
|
281351
280442
|
let proto = value4;
|
@@ -281354,36 +280445,36 @@ function isPlainObject5(value4) {
|
|
281354
280445
|
}
|
281355
280446
|
return Object.getPrototypeOf(value4) === proto;
|
281356
280447
|
}
|
281357
|
-
function
|
280448
|
+
function deepMerge3(...objects) {
|
281358
280449
|
const output = {};
|
281359
280450
|
for (const obj of objects) {
|
281360
|
-
for (const [
|
281361
|
-
const prevValue = output[
|
281362
|
-
output[
|
280451
|
+
for (const [key2, value4] of Object.entries(obj)) {
|
280452
|
+
const prevValue = output[key2];
|
280453
|
+
output[key2] = isPlainObject3(prevValue) && isPlainObject3(value4) ? deepMerge3(prevValue, value4) : value4;
|
281363
280454
|
}
|
281364
280455
|
}
|
281365
280456
|
return output;
|
281366
280457
|
}
|
281367
|
-
function
|
280458
|
+
function makeTheme2(...themes) {
|
281368
280459
|
const themesToMerge = [
|
281369
|
-
|
280460
|
+
defaultTheme2,
|
281370
280461
|
...themes.filter((theme) => theme != null)
|
281371
280462
|
];
|
281372
|
-
return
|
280463
|
+
return deepMerge3(...themesToMerge);
|
281373
280464
|
}
|
281374
280465
|
|
281375
280466
|
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/use-prefix.js
|
281376
|
-
function
|
281377
|
-
const [showLoader, setShowLoader] =
|
281378
|
-
const [tick, setTick] =
|
281379
|
-
const { prefix, spinner: spinner2 } =
|
281380
|
-
|
280467
|
+
function usePrefix2({ status = "idle", theme }) {
|
280468
|
+
const [showLoader, setShowLoader] = useState2(false);
|
280469
|
+
const [tick, setTick] = useState2(0);
|
280470
|
+
const { prefix, spinner: spinner2 } = makeTheme2(theme);
|
280471
|
+
useEffect2(() => {
|
281381
280472
|
if (status === "loading") {
|
281382
280473
|
let tickInterval;
|
281383
280474
|
let inc = -1;
|
281384
|
-
const delayTimeout = setTimeout(
|
280475
|
+
const delayTimeout = setTimeout(AsyncResource5.bind(() => {
|
281385
280476
|
setShowLoader(true);
|
281386
|
-
tickInterval = setInterval(
|
280477
|
+
tickInterval = setInterval(AsyncResource5.bind(() => {
|
281387
280478
|
inc = inc + 1;
|
281388
280479
|
setTick(inc % spinner2.frames.length);
|
281389
280480
|
}), spinner2.interval);
|
@@ -281403,17 +280494,17 @@ function usePrefix4({ status = "idle", theme }) {
|
|
281403
280494
|
return typeof prefix === "string" ? prefix : prefix[iconName] ?? prefix["idle"];
|
281404
280495
|
}
|
281405
280496
|
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/use-ref.js
|
281406
|
-
function
|
281407
|
-
return
|
280497
|
+
function useRef2(val) {
|
280498
|
+
return useState2({ current: val })[0];
|
281408
280499
|
}
|
281409
280500
|
|
281410
280501
|
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/use-keypress.js
|
281411
|
-
function
|
281412
|
-
const signal =
|
280502
|
+
function useKeypress2(userHandler) {
|
280503
|
+
const signal = useRef2(userHandler);
|
281413
280504
|
signal.current = userHandler;
|
281414
|
-
|
280505
|
+
useEffect2((rl) => {
|
281415
280506
|
let ignore = false;
|
281416
|
-
const handler =
|
280507
|
+
const handler = withUpdates2((_input, event) => {
|
281417
280508
|
if (ignore)
|
281418
280509
|
return;
|
281419
280510
|
signal.current(event, rl);
|
@@ -281426,35 +280517,35 @@ function useKeypress4(userHandler) {
|
|
281426
280517
|
}, []);
|
281427
280518
|
}
|
281428
280519
|
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/utils.js
|
281429
|
-
var
|
281430
|
-
var
|
281431
|
-
function
|
280520
|
+
var import_cli_width2 = __toESM(require_cli_width(), 1);
|
280521
|
+
var import_wrap_ansi2 = __toESM(require_wrap_ansi(), 1);
|
280522
|
+
function breakLines2(content, width) {
|
281432
280523
|
return content.split(`
|
281433
|
-
`).flatMap((line) =>
|
280524
|
+
`).flatMap((line) => import_wrap_ansi2.default(line, width, { trim: false, hard: true }).split(`
|
281434
280525
|
`).map((str) => str.trimEnd())).join(`
|
281435
280526
|
`);
|
281436
280527
|
}
|
281437
|
-
function
|
281438
|
-
return
|
280528
|
+
function readlineWidth2() {
|
280529
|
+
return import_cli_width2.default({ defaultWidth: 80, output: readline3().output });
|
281439
280530
|
}
|
281440
280531
|
|
281441
280532
|
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
|
281442
|
-
var
|
281443
|
-
import * as
|
281444
|
-
import { AsyncResource as
|
280533
|
+
var import_mute_stream2 = __toESM(require_lib(), 1);
|
280534
|
+
import * as readline4 from "node:readline";
|
280535
|
+
import { AsyncResource as AsyncResource6 } from "node:async_hooks";
|
281445
280536
|
|
281446
280537
|
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/screen-manager.js
|
281447
|
-
var
|
281448
|
-
import { stripVTControlCharacters as
|
281449
|
-
var
|
280538
|
+
var import_ansi_escapes3 = __toESM(require_ansi_escapes(), 1);
|
280539
|
+
import { stripVTControlCharacters as stripVTControlCharacters3 } from "node:util";
|
280540
|
+
var height2 = (content) => content.split(`
|
281450
280541
|
`).length;
|
281451
|
-
var
|
280542
|
+
var lastLine2 = (content) => content.split(`
|
281452
280543
|
`).pop() ?? "";
|
281453
|
-
function
|
281454
|
-
return n6 > 0 ?
|
280544
|
+
function cursorDown2(n6) {
|
280545
|
+
return n6 > 0 ? import_ansi_escapes3.default.cursorDown(n6) : "";
|
281455
280546
|
}
|
281456
280547
|
|
281457
|
-
class
|
280548
|
+
class ScreenManager2 {
|
281458
280549
|
rl;
|
281459
280550
|
height = 0;
|
281460
280551
|
extraLinesUnderPrompt = 0;
|
@@ -281470,17 +280561,17 @@ class ScreenManager4 {
|
|
281470
280561
|
this.rl.output.mute();
|
281471
280562
|
}
|
281472
280563
|
render(content, bottomContent = "") {
|
281473
|
-
const promptLine =
|
281474
|
-
const rawPromptLine =
|
280564
|
+
const promptLine = lastLine2(content);
|
280565
|
+
const rawPromptLine = stripVTControlCharacters3(promptLine);
|
281475
280566
|
let prompt = rawPromptLine;
|
281476
280567
|
if (this.rl.line.length > 0) {
|
281477
280568
|
prompt = prompt.slice(0, -this.rl.line.length);
|
281478
280569
|
}
|
281479
280570
|
this.rl.setPrompt(prompt);
|
281480
280571
|
this.cursorPos = this.rl.getCursorPos();
|
281481
|
-
const width =
|
281482
|
-
content =
|
281483
|
-
bottomContent =
|
280572
|
+
const width = readlineWidth2();
|
280573
|
+
content = breakLines2(content, width);
|
280574
|
+
bottomContent = breakLines2(bottomContent, width);
|
281484
280575
|
if (rawPromptLine.length % width === 0) {
|
281485
280576
|
content += `
|
281486
280577
|
`;
|
@@ -281488,34 +280579,34 @@ class ScreenManager4 {
|
|
281488
280579
|
let output = content + (bottomContent ? `
|
281489
280580
|
` + bottomContent : "");
|
281490
280581
|
const promptLineUpDiff = Math.floor(rawPromptLine.length / width) - this.cursorPos.rows;
|
281491
|
-
const bottomContentHeight = promptLineUpDiff + (bottomContent ?
|
280582
|
+
const bottomContentHeight = promptLineUpDiff + (bottomContent ? height2(bottomContent) : 0);
|
281492
280583
|
if (bottomContentHeight > 0)
|
281493
|
-
output +=
|
281494
|
-
output +=
|
281495
|
-
this.write(
|
280584
|
+
output += import_ansi_escapes3.default.cursorUp(bottomContentHeight);
|
280585
|
+
output += import_ansi_escapes3.default.cursorTo(this.cursorPos.cols);
|
280586
|
+
this.write(cursorDown2(this.extraLinesUnderPrompt) + import_ansi_escapes3.default.eraseLines(this.height) + output);
|
281496
280587
|
this.extraLinesUnderPrompt = bottomContentHeight;
|
281497
|
-
this.height =
|
280588
|
+
this.height = height2(output);
|
281498
280589
|
}
|
281499
280590
|
checkCursorPos() {
|
281500
280591
|
const cursorPos = this.rl.getCursorPos();
|
281501
280592
|
if (cursorPos.cols !== this.cursorPos.cols) {
|
281502
|
-
this.write(
|
280593
|
+
this.write(import_ansi_escapes3.default.cursorTo(cursorPos.cols));
|
281503
280594
|
this.cursorPos = cursorPos;
|
281504
280595
|
}
|
281505
280596
|
}
|
281506
280597
|
done({ clearContent }) {
|
281507
280598
|
this.rl.setPrompt("");
|
281508
|
-
let output =
|
281509
|
-
output += clearContent ?
|
280599
|
+
let output = cursorDown2(this.extraLinesUnderPrompt);
|
280600
|
+
output += clearContent ? import_ansi_escapes3.default.eraseLines(this.height) : `
|
281510
280601
|
`;
|
281511
|
-
output +=
|
280602
|
+
output += import_ansi_escapes3.default.cursorShow;
|
281512
280603
|
this.write(output);
|
281513
280604
|
this.rl.close();
|
281514
280605
|
}
|
281515
280606
|
}
|
281516
280607
|
|
281517
280608
|
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/promise-polyfill.js
|
281518
|
-
class
|
280609
|
+
class PromisePolyfill2 extends Promise {
|
281519
280610
|
static withResolver() {
|
281520
280611
|
let resolve6;
|
281521
280612
|
let reject;
|
@@ -281528,7 +280619,7 @@ class PromisePolyfill4 extends Promise {
|
|
281528
280619
|
}
|
281529
280620
|
|
281530
280621
|
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
|
281531
|
-
function
|
280622
|
+
function getCallSites2() {
|
281532
280623
|
const _prepareStackTrace = Error.prepareStackTrace;
|
281533
280624
|
try {
|
281534
280625
|
let result = [];
|
@@ -281543,24 +280634,24 @@ function getCallSites4() {
|
|
281543
280634
|
Error.prepareStackTrace = _prepareStackTrace;
|
281544
280635
|
}
|
281545
280636
|
}
|
281546
|
-
function
|
281547
|
-
const callSites =
|
280637
|
+
function createPrompt2(view) {
|
280638
|
+
const callSites = getCallSites2();
|
281548
280639
|
const callerFilename = callSites[1]?.getFileName?.();
|
281549
280640
|
const prompt = (config3, context = {}) => {
|
281550
280641
|
const { input = process.stdin, signal } = context;
|
281551
280642
|
const cleanups = new Set;
|
281552
|
-
const output = new
|
280643
|
+
const output = new import_mute_stream2.default;
|
281553
280644
|
output.pipe(context.output ?? process.stdout);
|
281554
|
-
const rl =
|
280645
|
+
const rl = readline4.createInterface({
|
281555
280646
|
terminal: true,
|
281556
280647
|
input,
|
281557
280648
|
output
|
281558
280649
|
});
|
281559
|
-
const screen = new
|
281560
|
-
const { promise, resolve: resolve6, reject } =
|
281561
|
-
const cancel3 = () => reject(new
|
280650
|
+
const screen = new ScreenManager2(rl);
|
280651
|
+
const { promise, resolve: resolve6, reject } = PromisePolyfill2.withResolver();
|
280652
|
+
const cancel3 = () => reject(new CancelPromptError2);
|
281562
280653
|
if (signal) {
|
281563
|
-
const abort = () => reject(new
|
280654
|
+
const abort = () => reject(new AbortPromptError2({ cause: signal.reason }));
|
281564
280655
|
if (signal.aborted) {
|
281565
280656
|
abort();
|
281566
280657
|
return Object.assign(promise, { cancel: cancel3 });
|
@@ -281569,13 +280660,13 @@ function createPrompt4(view) {
|
|
281569
280660
|
cleanups.add(() => signal.removeEventListener("abort", abort));
|
281570
280661
|
}
|
281571
280662
|
cleanups.add(onExit((code2, signal2) => {
|
281572
|
-
reject(new
|
280663
|
+
reject(new ExitPromptError2(`User force closed the prompt with ${code2} ${signal2}`));
|
281573
280664
|
}));
|
281574
280665
|
const checkCursorPos = () => screen.checkCursorPos();
|
281575
280666
|
rl.input.on("keypress", checkCursorPos);
|
281576
280667
|
cleanups.add(() => rl.input.removeListener("keypress", checkCursorPos));
|
281577
|
-
return
|
281578
|
-
const hooksCleanup =
|
280668
|
+
return withHooks2(rl, (cycle) => {
|
280669
|
+
const hooksCleanup = AsyncResource6.bind(() => effectScheduler2.clearAll());
|
281579
280670
|
rl.on("close", hooksCleanup);
|
281580
280671
|
cleanups.add(() => rl.removeListener("close", hooksCleanup));
|
281581
280672
|
cycle(() => {
|
@@ -281589,16 +280680,16 @@ function createPrompt4(view) {
|
|
281589
280680
|
}
|
281590
280681
|
const [content, bottomContent] = typeof nextView === "string" ? [nextView] : nextView;
|
281591
280682
|
screen.render(content, bottomContent);
|
281592
|
-
|
280683
|
+
effectScheduler2.run();
|
281593
280684
|
} catch (error5) {
|
281594
280685
|
reject(error5);
|
281595
280686
|
}
|
281596
280687
|
});
|
281597
280688
|
return Object.assign(promise.then((answer) => {
|
281598
|
-
|
280689
|
+
effectScheduler2.clearAll();
|
281599
280690
|
return answer;
|
281600
280691
|
}, (error5) => {
|
281601
|
-
|
280692
|
+
effectScheduler2.clearAll();
|
281602
280693
|
throw error5;
|
281603
280694
|
}).finally(() => {
|
281604
280695
|
cleanups.forEach((cleanup) => cleanup());
|
@@ -281610,19 +280701,19 @@ function createPrompt4(view) {
|
|
281610
280701
|
return prompt;
|
281611
280702
|
}
|
281612
280703
|
// ../../node_modules/@inquirer/password/dist/esm/index.js
|
281613
|
-
var
|
281614
|
-
var esm_default5 =
|
280704
|
+
var import_ansi_escapes4 = __toESM(require_ansi_escapes(), 1);
|
280705
|
+
var esm_default5 = createPrompt2((config3, done) => {
|
281615
280706
|
const { validate: validate3 = () => true } = config3;
|
281616
|
-
const theme =
|
281617
|
-
const [status, setStatus] =
|
281618
|
-
const [errorMsg, setError] =
|
281619
|
-
const [value4, setValue] =
|
281620
|
-
const prefix =
|
281621
|
-
|
280707
|
+
const theme = makeTheme2(config3.theme);
|
280708
|
+
const [status, setStatus] = useState2("idle");
|
280709
|
+
const [errorMsg, setError] = useState2();
|
280710
|
+
const [value4, setValue] = useState2("");
|
280711
|
+
const prefix = usePrefix2({ status, theme });
|
280712
|
+
useKeypress2(async (key3, rl) => {
|
281622
280713
|
if (status !== "idle") {
|
281623
280714
|
return;
|
281624
280715
|
}
|
281625
|
-
if (
|
280716
|
+
if (isEnterKey2(key3)) {
|
281626
280717
|
const answer = value4;
|
281627
280718
|
setStatus("loading");
|
281628
280719
|
const isValid2 = await validate3(answer);
|
@@ -281647,7 +280738,7 @@ var esm_default5 = createPrompt4((config3, done) => {
|
|
281647
280738
|
const maskChar = typeof config3.mask === "string" ? config3.mask : "*";
|
281648
280739
|
formattedValue = maskChar.repeat(value4.length);
|
281649
280740
|
} else if (status !== "done") {
|
281650
|
-
helpTip = `${theme.style.help("[input is masked]")}${
|
280741
|
+
helpTip = `${theme.style.help("[input is masked]")}${import_ansi_escapes4.default.cursorHide}`;
|
281651
280742
|
}
|
281652
280743
|
if (status === "done") {
|
281653
280744
|
formattedValue = theme.style.answer(formattedValue);
|
@@ -282719,7 +281810,7 @@ var basename2 = function(p6, extension) {
|
|
282719
281810
|
return extension && lastSegment.endsWith(extension) ? lastSegment.slice(0, -extension.length) : lastSegment;
|
282720
281811
|
};
|
282721
281812
|
// ../../node_modules/defu/dist/defu.mjs
|
282722
|
-
function
|
281813
|
+
function isPlainObject4(value4) {
|
282723
281814
|
if (value4 === null || typeof value4 !== "object") {
|
282724
281815
|
return false;
|
282725
281816
|
}
|
@@ -282736,27 +281827,27 @@ function isPlainObject6(value4) {
|
|
282736
281827
|
return true;
|
282737
281828
|
}
|
282738
281829
|
function _defu(baseObject, defaults2, namespace = ".", merger) {
|
282739
|
-
if (!
|
281830
|
+
if (!isPlainObject4(defaults2)) {
|
282740
281831
|
return _defu(baseObject, {}, namespace, merger);
|
282741
281832
|
}
|
282742
281833
|
const object = Object.assign({}, defaults2);
|
282743
|
-
for (const
|
282744
|
-
if (
|
281834
|
+
for (const key3 in baseObject) {
|
281835
|
+
if (key3 === "__proto__" || key3 === "constructor") {
|
282745
281836
|
continue;
|
282746
281837
|
}
|
282747
|
-
const value4 = baseObject[
|
281838
|
+
const value4 = baseObject[key3];
|
282748
281839
|
if (value4 === null || value4 === undefined) {
|
282749
281840
|
continue;
|
282750
281841
|
}
|
282751
|
-
if (merger && merger(object,
|
281842
|
+
if (merger && merger(object, key3, value4, namespace)) {
|
282752
281843
|
continue;
|
282753
281844
|
}
|
282754
|
-
if (Array.isArray(value4) && Array.isArray(object[
|
282755
|
-
object[
|
282756
|
-
} else if (
|
282757
|
-
object[
|
281845
|
+
if (Array.isArray(value4) && Array.isArray(object[key3])) {
|
281846
|
+
object[key3] = [...value4, ...object[key3]];
|
281847
|
+
} else if (isPlainObject4(value4) && isPlainObject4(object[key3])) {
|
281848
|
+
object[key3] = _defu(value4, object[key3], (namespace ? `${namespace}.` : "") + key3.toString(), merger);
|
282758
281849
|
} else {
|
282759
|
-
object[
|
281850
|
+
object[key3] = value4;
|
282760
281851
|
}
|
282761
281852
|
}
|
282762
281853
|
return object;
|
@@ -282765,15 +281856,15 @@ function createDefu(merger) {
|
|
282765
281856
|
return (...arguments_4) => arguments_4.reduce((p6, c3) => _defu(p6, c3, "", merger), {});
|
282766
281857
|
}
|
282767
281858
|
var defu = createDefu();
|
282768
|
-
var defuFn = createDefu((object,
|
282769
|
-
if (object[
|
282770
|
-
object[
|
281859
|
+
var defuFn = createDefu((object, key3, currentValue) => {
|
281860
|
+
if (object[key3] !== undefined && typeof currentValue === "function") {
|
281861
|
+
object[key3] = currentValue(object[key3]);
|
282771
281862
|
return true;
|
282772
281863
|
}
|
282773
281864
|
});
|
282774
|
-
var defuArrayFn = createDefu((object,
|
282775
|
-
if (Array.isArray(object[
|
282776
|
-
object[
|
281865
|
+
var defuArrayFn = createDefu((object, key3, currentValue) => {
|
281866
|
+
if (Array.isArray(object[key3]) && typeof currentValue === "function") {
|
281867
|
+
object[key3] = currentValue(object[key3]);
|
282777
281868
|
return true;
|
282778
281869
|
}
|
282779
281870
|
});
|
@@ -283035,11 +282126,11 @@ function cacheDirectory() {
|
|
283035
282126
|
}
|
283036
282127
|
function normalizeHeaders(headers = {}) {
|
283037
282128
|
const normalized = {};
|
283038
|
-
for (const [
|
282129
|
+
for (const [key3, value4] of Object.entries(headers)) {
|
283039
282130
|
if (!value4) {
|
283040
282131
|
continue;
|
283041
282132
|
}
|
283042
|
-
normalized[
|
282133
|
+
normalized[key3.toLowerCase()] = value4;
|
283043
282134
|
}
|
283044
282135
|
return normalized;
|
283045
282136
|
}
|
@@ -285221,7 +284312,7 @@ function jsonOutput(data) {
|
|
285221
284312
|
var composer = require_composer();
|
285222
284313
|
var Document = require_Document();
|
285223
284314
|
var Schema = require_Schema();
|
285224
|
-
var
|
284315
|
+
var errors3 = require_errors3();
|
285225
284316
|
var Alias = require_Alias();
|
285226
284317
|
var identity2 = require_identity();
|
285227
284318
|
var Pair = require_Pair();
|
@@ -285237,9 +284328,9 @@ var visit2 = require_visit();
|
|
285237
284328
|
var $Composer = composer.Composer;
|
285238
284329
|
var $Document = Document.Document;
|
285239
284330
|
var $Schema = Schema.Schema;
|
285240
|
-
var $YAMLError =
|
285241
|
-
var $YAMLParseError =
|
285242
|
-
var $YAMLWarning =
|
284331
|
+
var $YAMLError = errors3.YAMLError;
|
284332
|
+
var $YAMLParseError = errors3.YAMLParseError;
|
284333
|
+
var $YAMLWarning = errors3.YAMLWarning;
|
285243
284334
|
var $Alias = Alias.Alias;
|
285244
284335
|
var $isAlias = identity2.isAlias;
|
285245
284336
|
var $isCollection = identity2.isCollection;
|
@@ -285585,7 +284676,7 @@ async function getServicesAndMapResults({
|
|
285585
284676
|
const application = await settlemint.application.read(applicationUniqueName);
|
285586
284677
|
const services = await servicesSpinner(settlemint, applicationUniqueName, types2);
|
285587
284678
|
const results = (types2 ?? SERVICE_TYPES).filter((serviceType) => !types2 || types2.includes(serviceType)).map((serviceType) => {
|
285588
|
-
const [_5, labels] = Object.entries(LABELS_MAP).find(([
|
284679
|
+
const [_5, labels] = Object.entries(LABELS_MAP).find(([key3, value4]) => value4.command === serviceType) ?? [
|
285589
284680
|
null,
|
285590
284681
|
{ plural: serviceType }
|
285591
284682
|
];
|
@@ -285813,11 +284904,11 @@ function createCommand4() {
|
|
285813
284904
|
|
285814
284905
|
// src/utils/commands/passthrough-options.ts
|
285815
284906
|
function mapPassthroughOptions(options, command) {
|
285816
|
-
const optionArgs = Object.entries(options).map(([
|
284907
|
+
const optionArgs = Object.entries(options).map(([key3, value4]) => {
|
285817
284908
|
if (value4 === true) {
|
285818
|
-
return `--${
|
284909
|
+
return `--${key3}`;
|
285819
284910
|
}
|
285820
|
-
return `--${
|
284911
|
+
return `--${key3}=${value4}`;
|
285821
284912
|
});
|
285822
284913
|
return [...optionArgs, ...command.args];
|
285823
284914
|
}
|
@@ -286741,4 +285832,4 @@ async function sdkCliCommand(argv = process.argv) {
|
|
286741
285832
|
// src/cli.ts
|
286742
285833
|
sdkCliCommand();
|
286743
285834
|
|
286744
|
-
//# debugId=
|
285835
|
+
//# debugId=57ECE5FE40C5397F64756E2164756E21
|