@settlemint/sdk-cli 1.1.3-pr8e572b89 → 1.1.3-pra26dc90a
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 +1836 -473
- package/dist/cli.js.map +50 -8
- package/package.json +6 -6
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 lines = body.split(/\r\n|[\n\r]/g);
|
14378
|
+
const locationLine = lines[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} |`, lines[lineIndex - 1]],
|
14395
14395
|
[`${lineNum} |`, locationLine],
|
14396
14396
|
["|", "^".padStart(columnNum)],
|
14397
|
-
[`${lineNum + 1} |`,
|
14397
|
+
[`${lineNum + 1} |`, lines[lineIndex + 1]]
|
14398
14398
|
]);
|
14399
14399
|
}
|
14400
|
-
function printPrefixedLines(
|
14401
|
-
const existingLines =
|
14400
|
+
function printPrefixedLines(lines) {
|
14401
|
+
const existingLines = lines.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(lines) {
|
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 < lines.length; ++i) {
|
14820
14820
|
var _firstNonEmptyLine;
|
14821
|
-
const line =
|
14821
|
+
const line = lines[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 lines.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 lines = escapedValue.split(/\r\n|[\n\r]/g);
|
14895
|
+
const isSingleLine = lines.length === 1;
|
14896
|
+
const forceLeadingNewLine = lines.length > 1 && lines.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 split = cwdPath.substring(this.rootPath.length).split(sep2);
|
34010
|
+
if (split.length === 1 && !split[0]) {
|
34011
|
+
split.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 = split.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 split) {
|
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 lines = str.split(/[\r\n]+/g);
|
37190
37190
|
const duplicates = {};
|
37191
|
-
for (const line of
|
37191
|
+
for (const line of lines) {
|
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 = (lines) => finish(lines.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 split = line.trim().split(/\s+/, 2);
|
39238
|
+
if (split.length < 2) {
|
39239
39239
|
return null;
|
39240
39240
|
}
|
39241
|
-
const sha =
|
39242
|
-
const rawRef =
|
39241
|
+
const sha = split[0].trim();
|
39242
|
+
const rawRef = split[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 lines = description.trim().split(`
|
46998
46998
|
`);
|
46999
46999
|
let start = 0;
|
47000
|
-
while (
|
47000
|
+
while (lines[start]?.trim().match(/^(#|$)/)) {
|
47001
47001
|
start++;
|
47002
47002
|
}
|
47003
47003
|
let end = start + 1;
|
47004
|
-
while (end <
|
47004
|
+
while (end < lines.length && lines[end].trim()) {
|
47005
47005
|
end++;
|
47006
47006
|
}
|
47007
|
-
return
|
47007
|
+
return lines.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(lines) {
|
67384
67384
|
let indentation = MAX_SMI_X86;
|
67385
|
-
for (const line of
|
67385
|
+
for (const line of lines) {
|
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 lines = text.split(/\r\n?|\n/);
|
155724
|
+
for (const line of lines) {
|
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 lines = getLinesBetweenNodes(parentNode, prevChildNode, nextChildNode);
|
156369
|
+
if (lines) {
|
156370
|
+
writeLine(lines);
|
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 lines = text.split(/\r\n?|\n/);
|
156380
|
+
const indentation = guessIndentation(lines);
|
156381
|
+
for (const lineText of lines) {
|
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 lines = getLineDifference(true);
|
156480
|
+
if (lines === 0) {
|
156481
156481
|
return getLineDifference(false);
|
156482
156482
|
}
|
156483
|
-
return
|
156483
|
+
return lines;
|
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 colors2 = 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(colors2.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 ? colors2.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 lines = [];
|
166877
166877
|
for (const option of optionsList) {
|
166878
166878
|
const tmp = generateOptionOutput(sys2, option, rightAlignOfLeftPart, leftAlignOfRightPart);
|
166879
|
-
|
166879
|
+
lines = [...lines, ...tmp];
|
166880
166880
|
}
|
166881
|
-
if (
|
166882
|
-
|
166881
|
+
if (lines[lines.length - 2] !== sys2.newLine) {
|
166882
|
+
lines.push(sys2.newLine);
|
166883
166883
|
}
|
166884
|
-
return
|
166884
|
+
return lines;
|
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 colors2 = 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(colors2.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(" " + colors2.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 colors2 = 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 = colors2.blueBackground("".padStart(tsIconLength));
|
166970
|
+
const tsIconSecondLine = colors2.blueBackground(colors2.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 lines = lm.lines;
|
218661
|
+
if (lines.length > 1 && lines[lines.length - 1] === "") {
|
218662
|
+
lines.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 (lines.length > 0) {
|
218682
|
+
leafNode.text = lines[0];
|
218683
|
+
if (lines.length > 1) {
|
218684
|
+
let insertedNodes = new Array(lines.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 < lines.length; i2++) {
|
218687
|
+
insertedNodes[i2 - 1] = new LineLeaf(lines[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(lines) {
|
218958
|
+
if (lines.length > 0) {
|
218959
218959
|
const leaves = [];
|
218960
|
-
for (let i2 = 0;i2 <
|
218961
|
-
leaves[i2] = new LineLeaf(
|
218960
|
+
for (let i2 = 0;i2 < lines.length; i2++) {
|
218961
|
+
leaves[i2] = new LineLeaf(lines[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 lines = new Array(lineMap.length);
|
219065
219065
|
const lc = lineMap.length - 1;
|
219066
219066
|
for (let lmi = 0;lmi < lc; lmi++) {
|
219067
|
-
|
219067
|
+
lines[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
|
+
lines[lc] = endText;
|
219072
219072
|
} else {
|
219073
|
-
|
219073
|
+
lines.pop();
|
219074
219074
|
}
|
219075
|
-
return { lines
|
219075
|
+
return { lines, 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* split(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 split(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 split(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, key5) => cache.get(normPath(key5));
|
241162
|
+
var cSet = (cache, key5, val) => cache.set(normPath(key5), 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 key5 of cache.keys()) {
|
241534
|
+
cache.delete(key5);
|
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 key5 in nodeFetch) {
|
246332
|
+
fetch2[key5] = nodeFetch[key5];
|
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 errors5;
|
246426
246426
|
var hasRequiredErrors;
|
246427
246427
|
function requireErrors() {
|
246428
246428
|
if (hasRequiredErrors)
|
246429
|
-
return
|
246429
|
+
return errors5;
|
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 errors5 = { 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 }, errors5;
|
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_(key5, node, visitor, path5) {
|
256612
|
+
const ctrl = callVisitor(key5, node, visitor, path5);
|
256613
256613
|
if (identity2.isNode(ctrl) || identity2.isPair(ctrl)) {
|
256614
|
-
replaceNode(
|
256615
|
-
return visit_(
|
256614
|
+
replaceNode(key5, path5, ctrl);
|
256615
|
+
return visit_(key5, 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_(key5, node, visitor, path5) {
|
256660
|
+
const ctrl = await callVisitor(key5, node, visitor, path5);
|
256661
256661
|
if (identity2.isNode(ctrl) || identity2.isPair(ctrl)) {
|
256662
|
-
replaceNode(
|
256663
|
-
return visitAsync_(
|
256662
|
+
replaceNode(key5, path5, ctrl);
|
256663
|
+
return visitAsync_(key5, 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(key5, node, visitor, path5) {
|
256714
256714
|
if (typeof visitor === "function")
|
256715
|
-
return visitor(
|
256715
|
+
return visitor(key5, node, path5);
|
256716
256716
|
if (identity2.isMap(node))
|
256717
|
-
return visitor.Map?.(
|
256717
|
+
return visitor.Map?.(key5, node, path5);
|
256718
256718
|
if (identity2.isSeq(node))
|
256719
|
-
return visitor.Seq?.(
|
256719
|
+
return visitor.Seq?.(key5, node, path5);
|
256720
256720
|
if (identity2.isPair(node))
|
256721
|
-
return visitor.Pair?.(
|
256721
|
+
return visitor.Pair?.(key5, node, path5);
|
256722
256722
|
if (identity2.isScalar(node))
|
256723
|
-
return visitor.Scalar?.(
|
256723
|
+
return visitor.Scalar?.(key5, node, path5);
|
256724
256724
|
if (identity2.isAlias(node))
|
256725
|
-
return visitor.Alias?.(
|
256725
|
+
return visitor.Alias?.(key5, node, path5);
|
256726
256726
|
return;
|
256727
256727
|
}
|
256728
|
-
function replaceNode(
|
256728
|
+
function replaceNode(key5, path5, node) {
|
256729
256729
|
const parent = path5[path5.length - 1];
|
256730
256730
|
if (identity2.isCollection(parent)) {
|
256731
|
-
parent.items[
|
256731
|
+
parent.items[key5] = node;
|
256732
256732
|
} else if (identity2.isPair(parent)) {
|
256733
|
-
if (
|
256733
|
+
if (key5 === "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, key5, 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, key5, 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 [key5, ...rest] = path5;
|
257324
|
+
const node = this.get(key5, 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(key5, collectionFromPath(this.schema, rest, value4));
|
257329
257329
|
else
|
257330
|
-
throw new Error(`Expected YAML collection at ${
|
257330
|
+
throw new Error(`Expected YAML collection at ${key5}. Remaining path: ${rest}`);
|
257331
257331
|
}
|
257332
257332
|
}
|
257333
257333
|
deleteIn(path5) {
|
257334
|
-
const [
|
257334
|
+
const [key5, ...rest] = path5;
|
257335
257335
|
if (rest.length === 0)
|
257336
|
-
return this.delete(
|
257337
|
-
const node = this.get(
|
257336
|
+
return this.delete(key5);
|
257337
|
+
const node = this.get(key5, 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 ${key5}. Remaining path: ${rest}`);
|
257342
257342
|
}
|
257343
257343
|
getIn(path5, keepScalar) {
|
257344
|
-
const [
|
257345
|
-
const node = this.get(
|
257344
|
+
const [key5, ...rest] = path5;
|
257345
|
+
const node = this.get(key5, 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 [key5, ...rest] = path5;
|
257361
257361
|
if (rest.length === 0)
|
257362
|
-
return this.has(
|
257363
|
-
const node = this.get(
|
257362
|
+
return this.has(key5);
|
257363
|
+
const node = this.get(key5, true);
|
257364
257364
|
return identity2.isCollection(node) ? node.hasIn(rest) : false;
|
257365
257365
|
}
|
257366
257366
|
setIn(path5, value4) {
|
257367
|
-
const [
|
257367
|
+
const [key5, ...rest] = path5;
|
257368
257368
|
if (rest.length === 0) {
|
257369
|
-
this.set(
|
257369
|
+
this.set(key5, value4);
|
257370
257370
|
} else {
|
257371
|
-
const node = this.get(
|
257371
|
+
const node = this.get(key5, 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(key5, collectionFromPath(this.schema, rest, value4));
|
257376
257376
|
else
|
257377
|
-
throw new Error(`Expected YAML collection at ${
|
257377
|
+
throw new Error(`Expected YAML collection at ${key5}. 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: key5, 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(key5) && key5.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(key5) || !identity2.isNode(key5) && typeof key5 === "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 && (!key5 || keyComment && value4 == null && !ctx.inFlow || identity2.isCollection(key5) || (identity2.isScalar(key5) ? key5.type === Scalar.Scalar.BLOCK_FOLDED || key5.type === Scalar.Scalar.BLOCK_LITERAL : typeof key5 === "object"));
|
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(key5, 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, key5) => (merge3.identify(key5) || identity2.isScalar(key5) && (!key5.type || key5.type === Scalar.Scalar.PLAIN) && merge3.identify(key5.value)) && ctx?.doc.schema.tags.some((tag) => tag.tag === merge3.tag && tag.default);
|
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 [key5, value5] of srcMap) {
|
258147
258147
|
if (map3 instanceof Map) {
|
258148
|
-
if (!map3.has(
|
258149
|
-
map3.set(
|
258148
|
+
if (!map3.has(key5))
|
258149
|
+
map3.set(key5, 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(key5);
|
258152
|
+
} else if (!Object.prototype.hasOwnProperty.call(map3, key5)) {
|
258153
|
+
Object.defineProperty(map3, key5, {
|
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: key5, value: value4 }) {
|
258176
|
+
if (identity2.isNode(key5) && key5.addToJSMap)
|
258177
|
+
key5.addToJSMap(ctx, map3, value4);
|
258178
|
+
else if (merge3.isMergeKey(ctx, key5))
|
258179
258179
|
merge3.addMergeToJSMap(ctx, map3, value4);
|
258180
258180
|
else {
|
258181
|
-
const jsKey = toJS.toJS(
|
258181
|
+
const jsKey = toJS.toJS(key5, "", 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(key5, 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(key5, 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(key5) && 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 = key5.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(key5, value4, ctx) {
|
258236
|
+
const k5 = createNode.createNode(key5, 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(key5, value4 = null) {
|
258243
258243
|
Object.defineProperty(this, identity2.NODE_TYPE, { value: identity2.PAIR });
|
258244
|
-
this.key =
|
258244
|
+
this.key = key5;
|
258245
258245
|
this.value = value4;
|
258246
258246
|
}
|
258247
258247
|
clone(schema) {
|
258248
|
-
let { key:
|
258249
|
-
if (identity2.isNode(
|
258250
|
-
|
258248
|
+
let { key: key5, value: value4 } = this;
|
258249
|
+
if (identity2.isNode(key5))
|
258250
|
+
key5 = key5.clone(schema);
|
258251
258251
|
if (identity2.isNode(value4))
|
258252
258252
|
value4 = value4.clone(schema);
|
258253
|
-
return new Pair(
|
258253
|
+
return new Pair(key5, 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, key5) {
|
258421
|
+
const k5 = identity2.isScalar(key5) ? key5.value : key5;
|
258422
258422
|
for (const it2 of items) {
|
258423
258423
|
if (identity2.isPair(it2)) {
|
258424
|
-
if (it2.key ===
|
258424
|
+
if (it2.key === key5 || 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 = (key5, 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, key5, value4);
|
258447
|
+
else if (Array.isArray(replacer) && !replacer.includes(key5))
|
258448
258448
|
return;
|
258449
258449
|
if (value4 !== undefined || keepUndefined)
|
258450
|
-
map3.items.push(Pair.createPair(
|
258450
|
+
map3.items.push(Pair.createPair(key5, value4, ctx));
|
258451
258451
|
};
|
258452
258452
|
if (obj instanceof Map) {
|
258453
|
-
for (const [
|
258454
|
-
add(
|
258453
|
+
for (const [key5, value4] of obj)
|
258454
|
+
add(key5, value4);
|
258455
258455
|
} else if (obj && typeof obj === "object") {
|
258456
|
-
for (const
|
258457
|
-
add(
|
258456
|
+
for (const key5 of Object.keys(obj))
|
258457
|
+
add(key5, obj[key5]);
|
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(key5) {
|
258492
|
+
const it2 = findPair(this.items, key5);
|
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(key5, keepScalar) {
|
258499
|
+
const it2 = findPair(this.items, key5);
|
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(key5) {
|
258504
|
+
return !!findPair(this.items, key5);
|
258505
258505
|
}
|
258506
|
-
set(
|
258507
|
-
this.add(new Pair.Pair(
|
258506
|
+
set(key5, value4) {
|
258507
|
+
this.add(new Pair.Pair(key5, 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(key5) {
|
258579
|
+
const idx = asItemIndex(key5);
|
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(key5, keepScalar) {
|
258586
|
+
const idx = asItemIndex(key5);
|
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(key5) {
|
258593
|
+
const idx = asItemIndex(key5);
|
258594
258594
|
return typeof idx === "number" && idx < this.items.length;
|
258595
258595
|
}
|
258596
|
-
set(
|
258597
|
-
const idx = asItemIndex(
|
258596
|
+
set(key5, value4) {
|
258597
|
+
const idx = asItemIndex(key5);
|
258598
258598
|
if (typeof idx !== "number")
|
258599
|
-
throw new Error(`Expected a valid index, not ${
|
258599
|
+
throw new Error(`Expected a valid index, not ${key5}.`);
|
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 key5 = obj instanceof Set ? it2 : String(i6++);
|
258634
|
+
it2 = replacer.call(obj, key5, 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(key5) {
|
258643
|
+
let idx = identity2.isScalar(key5) ? key5.value : key5;
|
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 key5, value4;
|
259016
259016
|
if (Array.isArray(it2)) {
|
259017
259017
|
if (it2.length === 2) {
|
259018
|
-
|
259018
|
+
key5 = 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
|
+
key5 = keys[0];
|
259026
|
+
value4 = it2[key5];
|
259027
259027
|
} else {
|
259028
259028
|
throw new TypeError(`Expected tuple with one key, not ${keys.length} keys`);
|
259029
259029
|
}
|
259030
259030
|
} else {
|
259031
|
-
|
259031
|
+
key5 = it2;
|
259032
259032
|
}
|
259033
|
-
pairs2.items.push(Pair.createPair(
|
259033
|
+
pairs2.items.push(Pair.createPair(key5, 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 key5, value4;
|
259075
259075
|
if (identity2.isPair(pair)) {
|
259076
|
-
|
259077
|
-
value4 = toJS.toJS(pair.value,
|
259076
|
+
key5 = toJS.toJS(pair.key, "", ctx);
|
259077
|
+
value4 = toJS.toJS(pair.value, key5, ctx);
|
259078
259078
|
} else {
|
259079
|
-
|
259079
|
+
key5 = toJS.toJS(pair, "", ctx);
|
259080
259080
|
}
|
259081
|
-
if (map3.has(
|
259081
|
+
if (map3.has(key5))
|
259082
259082
|
throw new Error("Ordered maps must not include duplicate keys");
|
259083
|
-
map3.set(
|
259083
|
+
map3.set(key5, 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: key5 } of pairs$1.items) {
|
259105
|
+
if (identity2.isScalar(key5)) {
|
259106
|
+
if (seenKeys.includes(key5.value)) {
|
259107
|
+
onError(`Ordered maps must not include duplicate keys: ${key5.value}`);
|
259108
259108
|
} else {
|
259109
|
-
seenKeys.push(
|
259109
|
+
seenKeys.push(key5.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(key5) {
|
259284
259284
|
let pair;
|
259285
|
-
if (identity2.isPair(
|
259286
|
-
pair =
|
259287
|
-
else if (
|
259288
|
-
pair = new Pair.Pair(
|
259285
|
+
if (identity2.isPair(key5))
|
259286
|
+
pair = key5;
|
259287
|
+
else if (key5 && typeof key5 === "object" && "key" in key5 && "value" in key5 && key5.value === null)
|
259288
|
+
pair = new Pair.Pair(key5.key, null);
|
259289
259289
|
else
|
259290
|
-
pair = new Pair.Pair(
|
259290
|
+
pair = new Pair.Pair(key5, 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(key5, keepPair) {
|
259296
|
+
const pair = YAMLMap.findPair(this.items, key5);
|
259297
259297
|
return !keepPair && identity2.isPair(pair) ? identity2.isScalar(pair.key) ? pair.key.value : pair.key : pair;
|
259298
259298
|
}
|
259299
|
-
set(
|
259299
|
+
set(key5, 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, key5);
|
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(key5));
|
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((key5) => key5 !== "yaml11").map((key5) => JSON.stringify(key5)).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((key5) => JSON.stringify(key5)).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(key5, value4, options = {}) {
|
259793
|
+
const k5 = this.createNode(key5, 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(key5) {
|
259798
|
+
return assertCollection(this.contents) ? this.contents.delete(key5) : 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(key5, keepScalar) {
|
259810
|
+
return identity2.isCollection(this.contents) ? this.contents.get(key5, 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(key5) {
|
259818
|
+
return identity2.isCollection(this.contents) ? this.contents.has(key5) : 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(key5, value4) {
|
259826
259826
|
if (this.contents == null) {
|
259827
|
-
this.contents = Collection.collectionFromPath(this.schema, [
|
259827
|
+
this.contents = Collection.collectionFromPath(this.schema, [key5], value4);
|
259828
259828
|
} else if (assertCollection(this.contents)) {
|
259829
|
-
this.contents.set(
|
259829
|
+
this.contents.set(key5, 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(key5) {
|
260114
|
+
if (!key5)
|
260115
260115
|
return null;
|
260116
|
-
switch (
|
260116
|
+
switch (key5.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 (key5.source.includes(`
|
260122
260122
|
`))
|
260123
260123
|
return true;
|
260124
|
-
if (
|
260125
|
-
for (const st2 of
|
260124
|
+
if (key5.end) {
|
260125
|
+
for (const st2 of key5.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 key5.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: key5, sep: sep3, value: value4 } = collItem;
|
260197
260197
|
const keyProps = resolveProps.resolveProps(start3, {
|
260198
260198
|
indicator: "explicit-key-ind",
|
260199
|
-
next:
|
260199
|
+
next: key5 ?? 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 (key5) {
|
260208
|
+
if (key5.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 key5 && key5.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(key5)) {
|
260225
|
+
onError(key5 ?? 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 = key5 ? composeNode(ctx, key5, 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, key5, 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: !key5 || key5.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: key5, 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: key5 ?? 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(key5))
|
260427
|
+
onError(key5, "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 = key5 ? composeNode(ctx, key5, props, onError) : composeEmptyNode(ctx, keyStart, start3, null, props, onError);
|
260473
|
+
if (isBlock(key5))
|
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 errors5 = 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 errors5.YAMLWarning(pos, code2, message));
|
261337
261337
|
else
|
261338
|
-
this.errors.push(new
|
261338
|
+
this.errors.push(new errors5.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 errors5.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 errors5.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 errors5.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 errors5 = 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 errors5.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 key5 of Object.keys(token))
|
261597
|
+
if (key5 !== "type" && key5 !== "offset")
|
261598
|
+
delete token[key5];
|
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 key5 of Object.keys(token))
|
261648
|
+
if (key5 !== "type" && key5 !== "offset")
|
261649
|
+
delete token[key5];
|
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: key5, 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 (key5)
|
261706
|
+
res += stringifyToken(key5);
|
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 key5 = 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: key5, 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 errors5 = 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(errors5.prettifyError(source, lineCounter2));
|
263353
|
+
doc.warnings.forEach(errors5.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 errors5.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(errors5.prettifyError(source, lineCounter2));
|
263374
|
+
doc.warnings.forEach(errors5.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-pra26dc90a",
|
274463
274463
|
type: "module",
|
274464
274464
|
private: false,
|
274465
274465
|
license: "FSL-1.1-MIT",
|
@@ -274504,11 +274504,11 @@ var package_default = {
|
|
274504
274504
|
devDependencies: {
|
274505
274505
|
"@commander-js/extra-typings": "13.1.0",
|
274506
274506
|
"@inquirer/confirm": "5.1.5",
|
274507
|
-
"@inquirer/input": "4.1.
|
274508
|
-
"@inquirer/password": "4.0.
|
274509
|
-
"@inquirer/select": "4.0.
|
274510
|
-
"@settlemint/sdk-js": "1.1.3-
|
274511
|
-
"@settlemint/sdk-utils": "1.1.3-
|
274507
|
+
"@inquirer/input": "4.1.4",
|
274508
|
+
"@inquirer/password": "4.0.7",
|
274509
|
+
"@inquirer/select": "4.0.7",
|
274510
|
+
"@settlemint/sdk-js": "1.1.3-pra26dc90a",
|
274511
|
+
"@settlemint/sdk-utils": "1.1.3-pra26dc90a",
|
274512
274512
|
"@types/node": "22.13.0",
|
274513
274513
|
"@types/semver": "7.5.8",
|
274514
274514
|
"@types/which": "3.0.4",
|
@@ -274598,10 +274598,6 @@ 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);
|
274605
274601
|
var isEnterKey = (key) => key.name === "enter" || key.name === "return";
|
274606
274602
|
// ../../node_modules/@inquirer/core/dist/esm/lib/errors.js
|
274607
274603
|
class AbortPromptError extends Error {
|
@@ -275136,22 +275132,11 @@ function usePrefix({ status = "idle", theme }) {
|
|
275136
275132
|
const iconName = status === "loading" ? "idle" : status;
|
275137
275133
|
return typeof prefix === "string" ? prefix : prefix[iconName] ?? prefix["idle"];
|
275138
275134
|
}
|
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
|
-
}
|
275151
275135
|
// ../../node_modules/@inquirer/core/dist/esm/lib/use-ref.js
|
275152
275136
|
function useRef(val) {
|
275153
275137
|
return useState({ current: val })[0];
|
275154
275138
|
}
|
275139
|
+
|
275155
275140
|
// ../../node_modules/@inquirer/core/dist/esm/lib/use-keypress.js
|
275156
275141
|
function useKeypress(userHandler) {
|
275157
275142
|
const signal = useRef(userHandler);
|
@@ -275183,95 +275168,6 @@ function readlineWidth() {
|
|
275183
275168
|
return import_cli_width.default({ defaultWidth: 80, output: readline().output });
|
275184
275169
|
}
|
275185
275170
|
|
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
|
-
}
|
275275
275171
|
// ../../node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
|
275276
275172
|
var import_mute_stream = __toESM(require_lib(), 1);
|
275277
275173
|
import * as readline2 from "node:readline";
|
@@ -275657,20 +275553,6 @@ function createPrompt(view) {
|
|
275657
275553
|
};
|
275658
275554
|
return prompt;
|
275659
275555
|
}
|
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
|
-
}
|
275674
275556
|
// ../utils/dist/terminal.mjs
|
275675
275557
|
import { spawn } from "node:child_process";
|
275676
275558
|
var import_console_table_printer2 = __toESM(require_dist2(), 1);
|
@@ -279677,14 +279559,586 @@ async function codegenTsconfig(env2, thegraphSubgraphNames) {
|
|
279677
279559
|
};
|
279678
279560
|
}
|
279679
279561
|
|
279680
|
-
// ../../node_modules/@inquirer/select/dist/esm/
|
279681
|
-
var
|
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
|
279682
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
|
+
// ../../node_modules/@inquirer/select/dist/esm/index.js
|
280135
|
+
var import_yoctocolors_cjs4 = __toESM(require_yoctocolors_cjs(), 1);
|
280136
|
+
var import_ansi_escapes3 = __toESM(require_ansi_escapes(), 1);
|
279683
280137
|
var selectTheme = {
|
279684
280138
|
icon: { cursor: esm_default.pointer },
|
279685
280139
|
style: {
|
279686
|
-
disabled: (text2) =>
|
279687
|
-
description: (text2) =>
|
280140
|
+
disabled: (text2) => import_yoctocolors_cjs4.default.dim(`- ${text2}`),
|
280141
|
+
description: (text2) => import_yoctocolors_cjs4.default.cyan(text2)
|
279688
280142
|
},
|
279689
280143
|
helpMode: "auto"
|
279690
280144
|
};
|
@@ -279713,19 +280167,19 @@ function normalizeChoices(choices) {
|
|
279713
280167
|
};
|
279714
280168
|
});
|
279715
280169
|
}
|
279716
|
-
var esm_default2 =
|
280170
|
+
var esm_default2 = createPrompt2((config3, done) => {
|
279717
280171
|
const { loop = true, pageSize = 7 } = config3;
|
279718
|
-
const firstRender =
|
279719
|
-
const theme =
|
279720
|
-
const [status, setStatus] =
|
279721
|
-
const prefix =
|
279722
|
-
const searchTimeoutRef =
|
280172
|
+
const firstRender = useRef2(true);
|
280173
|
+
const theme = makeTheme2(selectTheme, config3.theme);
|
280174
|
+
const [status, setStatus] = useState2("idle");
|
280175
|
+
const prefix = usePrefix2({ status, theme });
|
280176
|
+
const searchTimeoutRef = useRef2();
|
279723
280177
|
const items = useMemo(() => normalizeChoices(config3.choices), [config3.choices]);
|
279724
280178
|
const bounds = useMemo(() => {
|
279725
280179
|
const first = items.findIndex(isSelectable);
|
279726
280180
|
const last = items.findLastIndex(isSelectable);
|
279727
280181
|
if (first === -1) {
|
279728
|
-
throw new
|
280182
|
+
throw new ValidationError2("[select prompt] No selectable choices. All choices are disabled.");
|
279729
280183
|
}
|
279730
280184
|
return { first, last };
|
279731
280185
|
}, [items]);
|
@@ -279734,31 +280188,31 @@ var esm_default2 = createPrompt((config3, done) => {
|
|
279734
280188
|
return -1;
|
279735
280189
|
return items.findIndex((item) => isSelectable(item) && item.value === config3.default);
|
279736
280190
|
}, [config3.default, items]);
|
279737
|
-
const [active, setActive] =
|
280191
|
+
const [active, setActive] = useState2(defaultItemIndex === -1 ? bounds.first : defaultItemIndex);
|
279738
280192
|
const selectedChoice = items[active];
|
279739
|
-
|
280193
|
+
useKeypress2((key3, rl) => {
|
279740
280194
|
clearTimeout(searchTimeoutRef.current);
|
279741
|
-
if (
|
280195
|
+
if (isEnterKey2(key3)) {
|
279742
280196
|
setStatus("done");
|
279743
280197
|
done(selectedChoice.value);
|
279744
|
-
} else if (isUpKey(
|
280198
|
+
} else if (isUpKey(key3) || isDownKey(key3)) {
|
279745
280199
|
rl.clearLine(0);
|
279746
|
-
if (loop || isUpKey(
|
279747
|
-
const offset = isUpKey(
|
280200
|
+
if (loop || isUpKey(key3) && active !== bounds.first || isDownKey(key3) && active !== bounds.last) {
|
280201
|
+
const offset = isUpKey(key3) ? -1 : 1;
|
279748
280202
|
let next = active;
|
279749
280203
|
do {
|
279750
280204
|
next = (next + offset + items.length) % items.length;
|
279751
280205
|
} while (!isSelectable(items[next]));
|
279752
280206
|
setActive(next);
|
279753
280207
|
}
|
279754
|
-
} else if (isNumberKey(
|
280208
|
+
} else if (isNumberKey(key3)) {
|
279755
280209
|
rl.clearLine(0);
|
279756
|
-
const position = Number(
|
280210
|
+
const position = Number(key3.name) - 1;
|
279757
280211
|
const item = items[position];
|
279758
280212
|
if (item != null && isSelectable(item)) {
|
279759
280213
|
setActive(position);
|
279760
280214
|
}
|
279761
|
-
} else if (isBackspaceKey(
|
280215
|
+
} else if (isBackspaceKey(key3)) {
|
279762
280216
|
rl.clearLine(0);
|
279763
280217
|
} else {
|
279764
280218
|
const searchTerm = rl.line.toLowerCase();
|
@@ -279775,7 +280229,7 @@ var esm_default2 = createPrompt((config3, done) => {
|
|
279775
280229
|
}, 700);
|
279776
280230
|
}
|
279777
280231
|
});
|
279778
|
-
|
280232
|
+
useEffect2(() => () => {
|
279779
280233
|
clearTimeout(searchTimeoutRef.current);
|
279780
280234
|
}, []);
|
279781
280235
|
const message = theme.style.message(config3.message, status);
|
@@ -279814,7 +280268,7 @@ ${theme.style.help("(Use arrow keys to reveal more choices)")}`;
|
|
279814
280268
|
const choiceDescription = selectedChoice.description ? `
|
279815
280269
|
${theme.style.description(selectedChoice.description)}` : ``;
|
279816
280270
|
return `${[prefix, message, helpTipTop].filter(Boolean).join(" ")}
|
279817
|
-
${page}${helpTipBottom}${choiceDescription}${
|
280271
|
+
${page}${helpTipBottom}${choiceDescription}${import_ansi_escapes3.default.cursorHide}`;
|
279818
280272
|
});
|
279819
280273
|
|
279820
280274
|
// src/prompts/smart-contract-set/subgraph.prompt.ts
|
@@ -280154,13 +280608,13 @@ var esm_default3 = createPrompt((config3, done) => {
|
|
280154
280608
|
const [value4, setValue] = useState("");
|
280155
280609
|
const theme = makeTheme(config3.theme);
|
280156
280610
|
const prefix = usePrefix({ status, theme });
|
280157
|
-
useKeypress((
|
280158
|
-
if (isEnterKey(
|
280611
|
+
useKeypress((key3, rl) => {
|
280612
|
+
if (isEnterKey(key3)) {
|
280159
280613
|
const answer = getBooleanValue(value4, config3.default);
|
280160
280614
|
setValue(transformer(answer));
|
280161
280615
|
setStatus("done");
|
280162
280616
|
done(answer);
|
280163
|
-
} else if (
|
280617
|
+
} else if (key3.name === "tab") {
|
280164
280618
|
const answer = boolToString(!getBooleanValue(value4, config3.default));
|
280165
280619
|
rl.clearLine(0);
|
280166
280620
|
rl.write(answer);
|
@@ -280180,23 +280634,478 @@ var esm_default3 = createPrompt((config3, done) => {
|
|
280180
280634
|
return `${prefix} ${message}${defaultValue} ${formattedValue}`;
|
280181
280635
|
});
|
280182
280636
|
|
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
|
+
}
|
280183
281092
|
// ../../node_modules/@inquirer/input/dist/esm/index.js
|
280184
281093
|
var inputTheme = {
|
280185
281094
|
validationFailureMode: "keep"
|
280186
281095
|
};
|
280187
|
-
var esm_default4 =
|
281096
|
+
var esm_default4 = createPrompt3((config3, done) => {
|
280188
281097
|
const { required, validate: validate3 = () => true } = config3;
|
280189
|
-
const theme =
|
280190
|
-
const [status, setStatus] =
|
280191
|
-
const [defaultValue = "", setDefaultValue] =
|
280192
|
-
const [errorMsg, setError] =
|
280193
|
-
const [value4, setValue] =
|
280194
|
-
const prefix =
|
280195
|
-
|
281098
|
+
const theme = makeTheme3(inputTheme, config3.theme);
|
281099
|
+
const [status, setStatus] = useState3("idle");
|
281100
|
+
const [defaultValue = "", setDefaultValue] = useState3(config3.default);
|
281101
|
+
const [errorMsg, setError] = useState3();
|
281102
|
+
const [value4, setValue] = useState3("");
|
281103
|
+
const prefix = usePrefix3({ status, theme });
|
281104
|
+
useKeypress3(async (key4, rl) => {
|
280196
281105
|
if (status !== "idle") {
|
280197
281106
|
return;
|
280198
281107
|
}
|
280199
|
-
if (
|
281108
|
+
if (isEnterKey3(key4)) {
|
280200
281109
|
const answer = value4 || defaultValue;
|
280201
281110
|
setStatus("loading");
|
280202
281111
|
const isValid2 = required && !answer ? "You must provide a value" : await validate3(answer);
|
@@ -280213,9 +281122,9 @@ var esm_default4 = createPrompt((config3, done) => {
|
|
280213
281122
|
setError(isValid2 || "You must provide a valid value");
|
280214
281123
|
setStatus("idle");
|
280215
281124
|
}
|
280216
|
-
} else if (
|
281125
|
+
} else if (isBackspaceKey2(key4) && !value4) {
|
280217
281126
|
setDefaultValue(undefined);
|
280218
|
-
} else if (
|
281127
|
+
} else if (key4.name === "tab" && !value4) {
|
280219
281128
|
setDefaultValue(undefined);
|
280220
281129
|
rl.clearLine(0);
|
280221
281130
|
rl.write(defaultValue);
|
@@ -280246,20 +281155,474 @@ var esm_default4 = createPrompt((config3, done) => {
|
|
280246
281155
|
];
|
280247
281156
|
});
|
280248
281157
|
|
281158
|
+
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/key.js
|
281159
|
+
var isEnterKey4 = (key4) => key4.name === "enter" || key4.name === "return";
|
281160
|
+
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/errors.js
|
281161
|
+
class AbortPromptError4 extends Error {
|
281162
|
+
name = "AbortPromptError";
|
281163
|
+
message = "Prompt was aborted";
|
281164
|
+
constructor(options) {
|
281165
|
+
super();
|
281166
|
+
this.cause = options?.cause;
|
281167
|
+
}
|
281168
|
+
}
|
281169
|
+
|
281170
|
+
class CancelPromptError4 extends Error {
|
281171
|
+
name = "CancelPromptError";
|
281172
|
+
message = "Prompt was canceled";
|
281173
|
+
}
|
281174
|
+
|
281175
|
+
class ExitPromptError4 extends Error {
|
281176
|
+
name = "ExitPromptError";
|
281177
|
+
}
|
281178
|
+
|
281179
|
+
class HookError4 extends Error {
|
281180
|
+
name = "HookError";
|
281181
|
+
}
|
281182
|
+
|
281183
|
+
class ValidationError4 extends Error {
|
281184
|
+
name = "ValidationError";
|
281185
|
+
}
|
281186
|
+
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/use-prefix.js
|
281187
|
+
import { AsyncResource as AsyncResource11 } from "node:async_hooks";
|
281188
|
+
|
281189
|
+
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/hook-engine.js
|
281190
|
+
import { AsyncLocalStorage as AsyncLocalStorage4, AsyncResource as AsyncResource10 } from "node:async_hooks";
|
281191
|
+
var hookStorage4 = new AsyncLocalStorage4;
|
281192
|
+
function createStore4(rl) {
|
281193
|
+
const store = {
|
281194
|
+
rl,
|
281195
|
+
hooks: [],
|
281196
|
+
hooksCleanup: [],
|
281197
|
+
hooksEffect: [],
|
281198
|
+
index: 0,
|
281199
|
+
handleChange() {
|
281200
|
+
}
|
281201
|
+
};
|
281202
|
+
return store;
|
281203
|
+
}
|
281204
|
+
function withHooks4(rl, cb) {
|
281205
|
+
const store = createStore4(rl);
|
281206
|
+
return hookStorage4.run(store, () => {
|
281207
|
+
function cycle(render) {
|
281208
|
+
store.handleChange = () => {
|
281209
|
+
store.index = 0;
|
281210
|
+
render();
|
281211
|
+
};
|
281212
|
+
store.handleChange();
|
281213
|
+
}
|
281214
|
+
return cb(cycle);
|
281215
|
+
});
|
281216
|
+
}
|
281217
|
+
function getStore4() {
|
281218
|
+
const store = hookStorage4.getStore();
|
281219
|
+
if (!store) {
|
281220
|
+
throw new HookError4("[Inquirer] Hook functions can only be called from within a prompt");
|
281221
|
+
}
|
281222
|
+
return store;
|
281223
|
+
}
|
281224
|
+
function readline7() {
|
281225
|
+
return getStore4().rl;
|
281226
|
+
}
|
281227
|
+
function withUpdates4(fn) {
|
281228
|
+
const wrapped = (...args) => {
|
281229
|
+
const store = getStore4();
|
281230
|
+
let shouldUpdate = false;
|
281231
|
+
const oldHandleChange = store.handleChange;
|
281232
|
+
store.handleChange = () => {
|
281233
|
+
shouldUpdate = true;
|
281234
|
+
};
|
281235
|
+
const returnValue = fn(...args);
|
281236
|
+
if (shouldUpdate) {
|
281237
|
+
oldHandleChange();
|
281238
|
+
}
|
281239
|
+
store.handleChange = oldHandleChange;
|
281240
|
+
return returnValue;
|
281241
|
+
};
|
281242
|
+
return AsyncResource10.bind(wrapped);
|
281243
|
+
}
|
281244
|
+
function withPointer4(cb) {
|
281245
|
+
const store = getStore4();
|
281246
|
+
const { index } = store;
|
281247
|
+
const pointer = {
|
281248
|
+
get() {
|
281249
|
+
return store.hooks[index];
|
281250
|
+
},
|
281251
|
+
set(value4) {
|
281252
|
+
store.hooks[index] = value4;
|
281253
|
+
},
|
281254
|
+
initialized: index in store.hooks
|
281255
|
+
};
|
281256
|
+
const returnValue = cb(pointer);
|
281257
|
+
store.index++;
|
281258
|
+
return returnValue;
|
281259
|
+
}
|
281260
|
+
function handleChange4() {
|
281261
|
+
getStore4().handleChange();
|
281262
|
+
}
|
281263
|
+
var effectScheduler4 = {
|
281264
|
+
queue(cb) {
|
281265
|
+
const store = getStore4();
|
281266
|
+
const { index } = store;
|
281267
|
+
store.hooksEffect.push(() => {
|
281268
|
+
store.hooksCleanup[index]?.();
|
281269
|
+
const cleanFn = cb(readline7());
|
281270
|
+
if (cleanFn != null && typeof cleanFn !== "function") {
|
281271
|
+
throw new ValidationError4("useEffect return value must be a cleanup function or nothing.");
|
281272
|
+
}
|
281273
|
+
store.hooksCleanup[index] = cleanFn;
|
281274
|
+
});
|
281275
|
+
},
|
281276
|
+
run() {
|
281277
|
+
const store = getStore4();
|
281278
|
+
withUpdates4(() => {
|
281279
|
+
store.hooksEffect.forEach((effect) => {
|
281280
|
+
effect();
|
281281
|
+
});
|
281282
|
+
store.hooksEffect.length = 0;
|
281283
|
+
})();
|
281284
|
+
},
|
281285
|
+
clearAll() {
|
281286
|
+
const store = getStore4();
|
281287
|
+
store.hooksCleanup.forEach((cleanFn) => {
|
281288
|
+
cleanFn?.();
|
281289
|
+
});
|
281290
|
+
store.hooksEffect.length = 0;
|
281291
|
+
store.hooksCleanup.length = 0;
|
281292
|
+
}
|
281293
|
+
};
|
281294
|
+
|
281295
|
+
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/use-state.js
|
281296
|
+
function useState4(defaultValue) {
|
281297
|
+
return withPointer4((pointer) => {
|
281298
|
+
const setFn = (newValue) => {
|
281299
|
+
if (pointer.get() !== newValue) {
|
281300
|
+
pointer.set(newValue);
|
281301
|
+
handleChange4();
|
281302
|
+
}
|
281303
|
+
};
|
281304
|
+
if (pointer.initialized) {
|
281305
|
+
return [pointer.get(), setFn];
|
281306
|
+
}
|
281307
|
+
const value4 = typeof defaultValue === "function" ? defaultValue() : defaultValue;
|
281308
|
+
pointer.set(value4);
|
281309
|
+
return [value4, setFn];
|
281310
|
+
});
|
281311
|
+
}
|
281312
|
+
|
281313
|
+
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/use-effect.js
|
281314
|
+
function useEffect4(cb, depArray) {
|
281315
|
+
withPointer4((pointer) => {
|
281316
|
+
const oldDeps = pointer.get();
|
281317
|
+
const hasChanged = !Array.isArray(oldDeps) || depArray.some((dep, i6) => !Object.is(dep, oldDeps[i6]));
|
281318
|
+
if (hasChanged) {
|
281319
|
+
effectScheduler4.queue(cb);
|
281320
|
+
}
|
281321
|
+
pointer.set(depArray);
|
281322
|
+
});
|
281323
|
+
}
|
281324
|
+
|
281325
|
+
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/theme.js
|
281326
|
+
var import_yoctocolors_cjs6 = __toESM(require_yoctocolors_cjs(), 1);
|
281327
|
+
var defaultTheme4 = {
|
281328
|
+
prefix: {
|
281329
|
+
idle: import_yoctocolors_cjs6.default.blue("?"),
|
281330
|
+
done: import_yoctocolors_cjs6.default.green(esm_default.tick)
|
281331
|
+
},
|
281332
|
+
spinner: {
|
281333
|
+
interval: 80,
|
281334
|
+
frames: ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"].map((frame) => import_yoctocolors_cjs6.default.yellow(frame))
|
281335
|
+
},
|
281336
|
+
style: {
|
281337
|
+
answer: import_yoctocolors_cjs6.default.cyan,
|
281338
|
+
message: import_yoctocolors_cjs6.default.bold,
|
281339
|
+
error: (text2) => import_yoctocolors_cjs6.default.red(`> ${text2}`),
|
281340
|
+
defaultAnswer: (text2) => import_yoctocolors_cjs6.default.dim(`(${text2})`),
|
281341
|
+
help: import_yoctocolors_cjs6.default.dim,
|
281342
|
+
highlight: import_yoctocolors_cjs6.default.cyan,
|
281343
|
+
key: (text2) => import_yoctocolors_cjs6.default.cyan(import_yoctocolors_cjs6.default.bold(`<${text2}>`))
|
281344
|
+
}
|
281345
|
+
};
|
281346
|
+
|
281347
|
+
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/make-theme.js
|
281348
|
+
function isPlainObject5(value4) {
|
281349
|
+
if (typeof value4 !== "object" || value4 === null)
|
281350
|
+
return false;
|
281351
|
+
let proto = value4;
|
281352
|
+
while (Object.getPrototypeOf(proto) !== null) {
|
281353
|
+
proto = Object.getPrototypeOf(proto);
|
281354
|
+
}
|
281355
|
+
return Object.getPrototypeOf(value4) === proto;
|
281356
|
+
}
|
281357
|
+
function deepMerge5(...objects) {
|
281358
|
+
const output = {};
|
281359
|
+
for (const obj of objects) {
|
281360
|
+
for (const [key4, value4] of Object.entries(obj)) {
|
281361
|
+
const prevValue = output[key4];
|
281362
|
+
output[key4] = isPlainObject5(prevValue) && isPlainObject5(value4) ? deepMerge5(prevValue, value4) : value4;
|
281363
|
+
}
|
281364
|
+
}
|
281365
|
+
return output;
|
281366
|
+
}
|
281367
|
+
function makeTheme4(...themes) {
|
281368
|
+
const themesToMerge = [
|
281369
|
+
defaultTheme4,
|
281370
|
+
...themes.filter((theme) => theme != null)
|
281371
|
+
];
|
281372
|
+
return deepMerge5(...themesToMerge);
|
281373
|
+
}
|
281374
|
+
|
281375
|
+
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/use-prefix.js
|
281376
|
+
function usePrefix4({ status = "idle", theme }) {
|
281377
|
+
const [showLoader, setShowLoader] = useState4(false);
|
281378
|
+
const [tick, setTick] = useState4(0);
|
281379
|
+
const { prefix, spinner: spinner2 } = makeTheme4(theme);
|
281380
|
+
useEffect4(() => {
|
281381
|
+
if (status === "loading") {
|
281382
|
+
let tickInterval;
|
281383
|
+
let inc = -1;
|
281384
|
+
const delayTimeout = setTimeout(AsyncResource11.bind(() => {
|
281385
|
+
setShowLoader(true);
|
281386
|
+
tickInterval = setInterval(AsyncResource11.bind(() => {
|
281387
|
+
inc = inc + 1;
|
281388
|
+
setTick(inc % spinner2.frames.length);
|
281389
|
+
}), spinner2.interval);
|
281390
|
+
}), 300);
|
281391
|
+
return () => {
|
281392
|
+
clearTimeout(delayTimeout);
|
281393
|
+
clearInterval(tickInterval);
|
281394
|
+
};
|
281395
|
+
} else {
|
281396
|
+
setShowLoader(false);
|
281397
|
+
}
|
281398
|
+
}, [status]);
|
281399
|
+
if (showLoader) {
|
281400
|
+
return spinner2.frames[tick];
|
281401
|
+
}
|
281402
|
+
const iconName = status === "loading" ? "idle" : status;
|
281403
|
+
return typeof prefix === "string" ? prefix : prefix[iconName] ?? prefix["idle"];
|
281404
|
+
}
|
281405
|
+
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/use-ref.js
|
281406
|
+
function useRef4(val) {
|
281407
|
+
return useState4({ current: val })[0];
|
281408
|
+
}
|
281409
|
+
|
281410
|
+
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/use-keypress.js
|
281411
|
+
function useKeypress4(userHandler) {
|
281412
|
+
const signal = useRef4(userHandler);
|
281413
|
+
signal.current = userHandler;
|
281414
|
+
useEffect4((rl) => {
|
281415
|
+
let ignore = false;
|
281416
|
+
const handler = withUpdates4((_input, event) => {
|
281417
|
+
if (ignore)
|
281418
|
+
return;
|
281419
|
+
signal.current(event, rl);
|
281420
|
+
});
|
281421
|
+
rl.input.on("keypress", handler);
|
281422
|
+
return () => {
|
281423
|
+
ignore = true;
|
281424
|
+
rl.input.removeListener("keypress", handler);
|
281425
|
+
};
|
281426
|
+
}, []);
|
281427
|
+
}
|
281428
|
+
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/utils.js
|
281429
|
+
var import_cli_width4 = __toESM(require_cli_width(), 1);
|
281430
|
+
var import_wrap_ansi4 = __toESM(require_wrap_ansi(), 1);
|
281431
|
+
function breakLines4(content, width) {
|
281432
|
+
return content.split(`
|
281433
|
+
`).flatMap((line) => import_wrap_ansi4.default(line, width, { trim: false, hard: true }).split(`
|
281434
|
+
`).map((str) => str.trimEnd())).join(`
|
281435
|
+
`);
|
281436
|
+
}
|
281437
|
+
function readlineWidth4() {
|
281438
|
+
return import_cli_width4.default({ defaultWidth: 80, output: readline7().output });
|
281439
|
+
}
|
281440
|
+
|
281441
|
+
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
|
281442
|
+
var import_mute_stream4 = __toESM(require_lib(), 1);
|
281443
|
+
import * as readline8 from "node:readline";
|
281444
|
+
import { AsyncResource as AsyncResource12 } from "node:async_hooks";
|
281445
|
+
|
281446
|
+
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/screen-manager.js
|
281447
|
+
var import_ansi_escapes5 = __toESM(require_ansi_escapes(), 1);
|
281448
|
+
import { stripVTControlCharacters as stripVTControlCharacters5 } from "node:util";
|
281449
|
+
var height4 = (content) => content.split(`
|
281450
|
+
`).length;
|
281451
|
+
var lastLine4 = (content) => content.split(`
|
281452
|
+
`).pop() ?? "";
|
281453
|
+
function cursorDown4(n6) {
|
281454
|
+
return n6 > 0 ? import_ansi_escapes5.default.cursorDown(n6) : "";
|
281455
|
+
}
|
281456
|
+
|
281457
|
+
class ScreenManager4 {
|
281458
|
+
rl;
|
281459
|
+
height = 0;
|
281460
|
+
extraLinesUnderPrompt = 0;
|
281461
|
+
cursorPos;
|
281462
|
+
constructor(rl) {
|
281463
|
+
this.rl = rl;
|
281464
|
+
this.rl = rl;
|
281465
|
+
this.cursorPos = rl.getCursorPos();
|
281466
|
+
}
|
281467
|
+
write(content) {
|
281468
|
+
this.rl.output.unmute();
|
281469
|
+
this.rl.output.write(content);
|
281470
|
+
this.rl.output.mute();
|
281471
|
+
}
|
281472
|
+
render(content, bottomContent = "") {
|
281473
|
+
const promptLine = lastLine4(content);
|
281474
|
+
const rawPromptLine = stripVTControlCharacters5(promptLine);
|
281475
|
+
let prompt = rawPromptLine;
|
281476
|
+
if (this.rl.line.length > 0) {
|
281477
|
+
prompt = prompt.slice(0, -this.rl.line.length);
|
281478
|
+
}
|
281479
|
+
this.rl.setPrompt(prompt);
|
281480
|
+
this.cursorPos = this.rl.getCursorPos();
|
281481
|
+
const width = readlineWidth4();
|
281482
|
+
content = breakLines4(content, width);
|
281483
|
+
bottomContent = breakLines4(bottomContent, width);
|
281484
|
+
if (rawPromptLine.length % width === 0) {
|
281485
|
+
content += `
|
281486
|
+
`;
|
281487
|
+
}
|
281488
|
+
let output = content + (bottomContent ? `
|
281489
|
+
` + bottomContent : "");
|
281490
|
+
const promptLineUpDiff = Math.floor(rawPromptLine.length / width) - this.cursorPos.rows;
|
281491
|
+
const bottomContentHeight = promptLineUpDiff + (bottomContent ? height4(bottomContent) : 0);
|
281492
|
+
if (bottomContentHeight > 0)
|
281493
|
+
output += import_ansi_escapes5.default.cursorUp(bottomContentHeight);
|
281494
|
+
output += import_ansi_escapes5.default.cursorTo(this.cursorPos.cols);
|
281495
|
+
this.write(cursorDown4(this.extraLinesUnderPrompt) + import_ansi_escapes5.default.eraseLines(this.height) + output);
|
281496
|
+
this.extraLinesUnderPrompt = bottomContentHeight;
|
281497
|
+
this.height = height4(output);
|
281498
|
+
}
|
281499
|
+
checkCursorPos() {
|
281500
|
+
const cursorPos = this.rl.getCursorPos();
|
281501
|
+
if (cursorPos.cols !== this.cursorPos.cols) {
|
281502
|
+
this.write(import_ansi_escapes5.default.cursorTo(cursorPos.cols));
|
281503
|
+
this.cursorPos = cursorPos;
|
281504
|
+
}
|
281505
|
+
}
|
281506
|
+
done({ clearContent }) {
|
281507
|
+
this.rl.setPrompt("");
|
281508
|
+
let output = cursorDown4(this.extraLinesUnderPrompt);
|
281509
|
+
output += clearContent ? import_ansi_escapes5.default.eraseLines(this.height) : `
|
281510
|
+
`;
|
281511
|
+
output += import_ansi_escapes5.default.cursorShow;
|
281512
|
+
this.write(output);
|
281513
|
+
this.rl.close();
|
281514
|
+
}
|
281515
|
+
}
|
281516
|
+
|
281517
|
+
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/promise-polyfill.js
|
281518
|
+
class PromisePolyfill4 extends Promise {
|
281519
|
+
static withResolver() {
|
281520
|
+
let resolve6;
|
281521
|
+
let reject;
|
281522
|
+
const promise = new Promise((res, rej) => {
|
281523
|
+
resolve6 = res;
|
281524
|
+
reject = rej;
|
281525
|
+
});
|
281526
|
+
return { promise, resolve: resolve6, reject };
|
281527
|
+
}
|
281528
|
+
}
|
281529
|
+
|
281530
|
+
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
|
281531
|
+
function getCallSites4() {
|
281532
|
+
const _prepareStackTrace = Error.prepareStackTrace;
|
281533
|
+
try {
|
281534
|
+
let result = [];
|
281535
|
+
Error.prepareStackTrace = (_5, callSites) => {
|
281536
|
+
const callSitesWithoutCurrent = callSites.slice(1);
|
281537
|
+
result = callSitesWithoutCurrent;
|
281538
|
+
return callSitesWithoutCurrent;
|
281539
|
+
};
|
281540
|
+
new Error().stack;
|
281541
|
+
return result;
|
281542
|
+
} finally {
|
281543
|
+
Error.prepareStackTrace = _prepareStackTrace;
|
281544
|
+
}
|
281545
|
+
}
|
281546
|
+
function createPrompt4(view) {
|
281547
|
+
const callSites = getCallSites4();
|
281548
|
+
const callerFilename = callSites[1]?.getFileName?.();
|
281549
|
+
const prompt = (config3, context = {}) => {
|
281550
|
+
const { input = process.stdin, signal } = context;
|
281551
|
+
const cleanups = new Set;
|
281552
|
+
const output = new import_mute_stream4.default;
|
281553
|
+
output.pipe(context.output ?? process.stdout);
|
281554
|
+
const rl = readline8.createInterface({
|
281555
|
+
terminal: true,
|
281556
|
+
input,
|
281557
|
+
output
|
281558
|
+
});
|
281559
|
+
const screen = new ScreenManager4(rl);
|
281560
|
+
const { promise, resolve: resolve6, reject } = PromisePolyfill4.withResolver();
|
281561
|
+
const cancel3 = () => reject(new CancelPromptError4);
|
281562
|
+
if (signal) {
|
281563
|
+
const abort = () => reject(new AbortPromptError4({ cause: signal.reason }));
|
281564
|
+
if (signal.aborted) {
|
281565
|
+
abort();
|
281566
|
+
return Object.assign(promise, { cancel: cancel3 });
|
281567
|
+
}
|
281568
|
+
signal.addEventListener("abort", abort);
|
281569
|
+
cleanups.add(() => signal.removeEventListener("abort", abort));
|
281570
|
+
}
|
281571
|
+
cleanups.add(onExit((code2, signal2) => {
|
281572
|
+
reject(new ExitPromptError4(`User force closed the prompt with ${code2} ${signal2}`));
|
281573
|
+
}));
|
281574
|
+
const checkCursorPos = () => screen.checkCursorPos();
|
281575
|
+
rl.input.on("keypress", checkCursorPos);
|
281576
|
+
cleanups.add(() => rl.input.removeListener("keypress", checkCursorPos));
|
281577
|
+
return withHooks4(rl, (cycle) => {
|
281578
|
+
const hooksCleanup = AsyncResource12.bind(() => effectScheduler4.clearAll());
|
281579
|
+
rl.on("close", hooksCleanup);
|
281580
|
+
cleanups.add(() => rl.removeListener("close", hooksCleanup));
|
281581
|
+
cycle(() => {
|
281582
|
+
try {
|
281583
|
+
const nextView = view(config3, (value4) => {
|
281584
|
+
setImmediate(() => resolve6(value4));
|
281585
|
+
});
|
281586
|
+
if (nextView === undefined) {
|
281587
|
+
throw new Error(`Prompt functions must return a string.
|
281588
|
+
at ${callerFilename}`);
|
281589
|
+
}
|
281590
|
+
const [content, bottomContent] = typeof nextView === "string" ? [nextView] : nextView;
|
281591
|
+
screen.render(content, bottomContent);
|
281592
|
+
effectScheduler4.run();
|
281593
|
+
} catch (error5) {
|
281594
|
+
reject(error5);
|
281595
|
+
}
|
281596
|
+
});
|
281597
|
+
return Object.assign(promise.then((answer) => {
|
281598
|
+
effectScheduler4.clearAll();
|
281599
|
+
return answer;
|
281600
|
+
}, (error5) => {
|
281601
|
+
effectScheduler4.clearAll();
|
281602
|
+
throw error5;
|
281603
|
+
}).finally(() => {
|
281604
|
+
cleanups.forEach((cleanup) => cleanup());
|
281605
|
+
screen.done({ clearContent: Boolean(context.clearPromptOnDone) });
|
281606
|
+
output.end();
|
281607
|
+
}).then(() => promise), { cancel: cancel3 });
|
281608
|
+
});
|
281609
|
+
};
|
281610
|
+
return prompt;
|
281611
|
+
}
|
280249
281612
|
// ../../node_modules/@inquirer/password/dist/esm/index.js
|
280250
|
-
var
|
280251
|
-
var esm_default5 =
|
281613
|
+
var import_ansi_escapes6 = __toESM(require_ansi_escapes(), 1);
|
281614
|
+
var esm_default5 = createPrompt4((config3, done) => {
|
280252
281615
|
const { validate: validate3 = () => true } = config3;
|
280253
|
-
const theme =
|
280254
|
-
const [status, setStatus] =
|
280255
|
-
const [errorMsg, setError] =
|
280256
|
-
const [value4, setValue] =
|
280257
|
-
const prefix =
|
280258
|
-
|
281616
|
+
const theme = makeTheme4(config3.theme);
|
281617
|
+
const [status, setStatus] = useState4("idle");
|
281618
|
+
const [errorMsg, setError] = useState4();
|
281619
|
+
const [value4, setValue] = useState4("");
|
281620
|
+
const prefix = usePrefix4({ status, theme });
|
281621
|
+
useKeypress4(async (key5, rl) => {
|
280259
281622
|
if (status !== "idle") {
|
280260
281623
|
return;
|
280261
281624
|
}
|
280262
|
-
if (
|
281625
|
+
if (isEnterKey4(key5)) {
|
280263
281626
|
const answer = value4;
|
280264
281627
|
setStatus("loading");
|
280265
281628
|
const isValid2 = await validate3(answer);
|
@@ -280284,7 +281647,7 @@ var esm_default5 = createPrompt((config3, done) => {
|
|
280284
281647
|
const maskChar = typeof config3.mask === "string" ? config3.mask : "*";
|
280285
281648
|
formattedValue = maskChar.repeat(value4.length);
|
280286
281649
|
} else if (status !== "done") {
|
280287
|
-
helpTip = `${theme.style.help("[input is masked]")}${
|
281650
|
+
helpTip = `${theme.style.help("[input is masked]")}${import_ansi_escapes6.default.cursorHide}`;
|
280288
281651
|
}
|
280289
281652
|
if (status === "done") {
|
280290
281653
|
formattedValue = theme.style.answer(formattedValue);
|
@@ -281356,7 +282719,7 @@ var basename2 = function(p6, extension) {
|
|
281356
282719
|
return extension && lastSegment.endsWith(extension) ? lastSegment.slice(0, -extension.length) : lastSegment;
|
281357
282720
|
};
|
281358
282721
|
// ../../node_modules/defu/dist/defu.mjs
|
281359
|
-
function
|
282722
|
+
function isPlainObject6(value4) {
|
281360
282723
|
if (value4 === null || typeof value4 !== "object") {
|
281361
282724
|
return false;
|
281362
282725
|
}
|
@@ -281373,27 +282736,27 @@ function isPlainObject3(value4) {
|
|
281373
282736
|
return true;
|
281374
282737
|
}
|
281375
282738
|
function _defu(baseObject, defaults2, namespace = ".", merger) {
|
281376
|
-
if (!
|
282739
|
+
if (!isPlainObject6(defaults2)) {
|
281377
282740
|
return _defu(baseObject, {}, namespace, merger);
|
281378
282741
|
}
|
281379
282742
|
const object = Object.assign({}, defaults2);
|
281380
|
-
for (const
|
281381
|
-
if (
|
282743
|
+
for (const key5 in baseObject) {
|
282744
|
+
if (key5 === "__proto__" || key5 === "constructor") {
|
281382
282745
|
continue;
|
281383
282746
|
}
|
281384
|
-
const value4 = baseObject[
|
282747
|
+
const value4 = baseObject[key5];
|
281385
282748
|
if (value4 === null || value4 === undefined) {
|
281386
282749
|
continue;
|
281387
282750
|
}
|
281388
|
-
if (merger && merger(object,
|
282751
|
+
if (merger && merger(object, key5, value4, namespace)) {
|
281389
282752
|
continue;
|
281390
282753
|
}
|
281391
|
-
if (Array.isArray(value4) && Array.isArray(object[
|
281392
|
-
object[
|
281393
|
-
} else if (
|
281394
|
-
object[
|
282754
|
+
if (Array.isArray(value4) && Array.isArray(object[key5])) {
|
282755
|
+
object[key5] = [...value4, ...object[key5]];
|
282756
|
+
} else if (isPlainObject6(value4) && isPlainObject6(object[key5])) {
|
282757
|
+
object[key5] = _defu(value4, object[key5], (namespace ? `${namespace}.` : "") + key5.toString(), merger);
|
281395
282758
|
} else {
|
281396
|
-
object[
|
282759
|
+
object[key5] = value4;
|
281397
282760
|
}
|
281398
282761
|
}
|
281399
282762
|
return object;
|
@@ -281402,15 +282765,15 @@ function createDefu(merger) {
|
|
281402
282765
|
return (...arguments_4) => arguments_4.reduce((p6, c3) => _defu(p6, c3, "", merger), {});
|
281403
282766
|
}
|
281404
282767
|
var defu = createDefu();
|
281405
|
-
var defuFn = createDefu((object,
|
281406
|
-
if (object[
|
281407
|
-
object[
|
282768
|
+
var defuFn = createDefu((object, key5, currentValue) => {
|
282769
|
+
if (object[key5] !== undefined && typeof currentValue === "function") {
|
282770
|
+
object[key5] = currentValue(object[key5]);
|
281408
282771
|
return true;
|
281409
282772
|
}
|
281410
282773
|
});
|
281411
|
-
var defuArrayFn = createDefu((object,
|
281412
|
-
if (Array.isArray(object[
|
281413
|
-
object[
|
282774
|
+
var defuArrayFn = createDefu((object, key5, currentValue) => {
|
282775
|
+
if (Array.isArray(object[key5]) && typeof currentValue === "function") {
|
282776
|
+
object[key5] = currentValue(object[key5]);
|
281414
282777
|
return true;
|
281415
282778
|
}
|
281416
282779
|
});
|
@@ -281672,11 +283035,11 @@ function cacheDirectory() {
|
|
281672
283035
|
}
|
281673
283036
|
function normalizeHeaders(headers = {}) {
|
281674
283037
|
const normalized = {};
|
281675
|
-
for (const [
|
283038
|
+
for (const [key5, value4] of Object.entries(headers)) {
|
281676
283039
|
if (!value4) {
|
281677
283040
|
continue;
|
281678
283041
|
}
|
281679
|
-
normalized[
|
283042
|
+
normalized[key5.toLowerCase()] = value4;
|
281680
283043
|
}
|
281681
283044
|
return normalized;
|
281682
283045
|
}
|
@@ -283858,7 +285221,7 @@ function jsonOutput(data) {
|
|
283858
285221
|
var composer = require_composer();
|
283859
285222
|
var Document = require_Document();
|
283860
285223
|
var Schema = require_Schema();
|
283861
|
-
var
|
285224
|
+
var errors5 = require_errors3();
|
283862
285225
|
var Alias = require_Alias();
|
283863
285226
|
var identity2 = require_identity();
|
283864
285227
|
var Pair = require_Pair();
|
@@ -283874,9 +285237,9 @@ var visit2 = require_visit();
|
|
283874
285237
|
var $Composer = composer.Composer;
|
283875
285238
|
var $Document = Document.Document;
|
283876
285239
|
var $Schema = Schema.Schema;
|
283877
|
-
var $YAMLError =
|
283878
|
-
var $YAMLParseError =
|
283879
|
-
var $YAMLWarning =
|
285240
|
+
var $YAMLError = errors5.YAMLError;
|
285241
|
+
var $YAMLParseError = errors5.YAMLParseError;
|
285242
|
+
var $YAMLWarning = errors5.YAMLWarning;
|
283880
285243
|
var $Alias = Alias.Alias;
|
283881
285244
|
var $isAlias = identity2.isAlias;
|
283882
285245
|
var $isCollection = identity2.isCollection;
|
@@ -284222,7 +285585,7 @@ async function getServicesAndMapResults({
|
|
284222
285585
|
const application = await settlemint.application.read(applicationUniqueName);
|
284223
285586
|
const services = await servicesSpinner(settlemint, applicationUniqueName, types2);
|
284224
285587
|
const results = (types2 ?? SERVICE_TYPES).filter((serviceType) => !types2 || types2.includes(serviceType)).map((serviceType) => {
|
284225
|
-
const [_5, labels] = Object.entries(LABELS_MAP).find(([
|
285588
|
+
const [_5, labels] = Object.entries(LABELS_MAP).find(([key5, value4]) => value4.command === serviceType) ?? [
|
284226
285589
|
null,
|
284227
285590
|
{ plural: serviceType }
|
284228
285591
|
];
|
@@ -284450,11 +285813,11 @@ function createCommand4() {
|
|
284450
285813
|
|
284451
285814
|
// src/utils/commands/passthrough-options.ts
|
284452
285815
|
function mapPassthroughOptions(options, command) {
|
284453
|
-
const optionArgs = Object.entries(options).map(([
|
285816
|
+
const optionArgs = Object.entries(options).map(([key5, value4]) => {
|
284454
285817
|
if (value4 === true) {
|
284455
|
-
return `--${
|
285818
|
+
return `--${key5}`;
|
284456
285819
|
}
|
284457
|
-
return `--${
|
285820
|
+
return `--${key5}=${value4}`;
|
284458
285821
|
});
|
284459
285822
|
return [...optionArgs, ...command.args];
|
284460
285823
|
}
|
@@ -285378,4 +286741,4 @@ async function sdkCliCommand(argv = process.argv) {
|
|
285378
286741
|
// src/cli.ts
|
285379
286742
|
sdkCliCommand();
|
285380
286743
|
|
285381
|
-
//# debugId=
|
286744
|
+
//# debugId=C06D0DD93148AAE964756E2164756E21
|