@settlemint/sdk-cli 1.1.7 → 1.1.8-main086af5b3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/cli.js +1376 -467
- package/dist/cli.js.map +37 -9
- package/package.json +5 -5
package/dist/cli.js
CHANGED
@@ -14374,8 +14374,8 @@ var require_printLocation = __commonJS((exports) => {
|
|
14374
14374
|
const columnNum = sourceLocation.column + columnOffset;
|
14375
14375
|
const locationStr = `${source.name}:${lineNum}:${columnNum}
|
14376
14376
|
`;
|
14377
|
-
const
|
14378
|
-
const locationLine =
|
14377
|
+
const 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") {
|
@@ -67383,9 +67383,9 @@ ${lanes.join(`
|
|
67383
67383
|
return node.kind === 183 || node.kind === 233;
|
67384
67384
|
}
|
67385
67385
|
var MAX_SMI_X86 = 1073741823;
|
67386
|
-
function guessIndentation(
|
67386
|
+
function guessIndentation(lines) {
|
67387
67387
|
let indentation = MAX_SMI_X86;
|
67388
|
-
for (const line of
|
67388
|
+
for (const line of lines) {
|
67389
67389
|
if (!line.length) {
|
67390
67390
|
continue;
|
67391
67391
|
}
|
@@ -155723,8 +155723,8 @@ ${lanes.join(`
|
|
155723
155723
|
if (node.comment) {
|
155724
155724
|
const text = getTextOfJSDocComment(node.comment);
|
155725
155725
|
if (text) {
|
155726
|
-
const
|
155727
|
-
for (const line of
|
155726
|
+
const lines = text.split(/\r\n?|\n/);
|
155727
|
+
for (const line of lines) {
|
155728
155728
|
writeLine();
|
155729
155729
|
writeSpace();
|
155730
155730
|
writePunctuation("*");
|
@@ -156368,9 +156368,9 @@ ${lanes.join(`
|
|
156368
156368
|
if (getEmitFlags(parentNode) & 1) {
|
156369
156369
|
writeSpace();
|
156370
156370
|
} else if (preserveSourceNewlines) {
|
156371
|
-
const
|
156372
|
-
if (
|
156373
|
-
writeLine(
|
156371
|
+
const lines = getLinesBetweenNodes(parentNode, prevChildNode, nextChildNode);
|
156372
|
+
if (lines) {
|
156373
|
+
writeLine(lines);
|
156374
156374
|
} else {
|
156375
156375
|
writeSpace();
|
156376
156376
|
}
|
@@ -156379,9 +156379,9 @@ ${lanes.join(`
|
|
156379
156379
|
}
|
156380
156380
|
}
|
156381
156381
|
function writeLines(text) {
|
156382
|
-
const
|
156383
|
-
const indentation = guessIndentation(
|
156384
|
-
for (const lineText of
|
156382
|
+
const lines = text.split(/\r\n?|\n/);
|
156383
|
+
const indentation = guessIndentation(lines);
|
156384
|
+
for (const lineText of lines) {
|
156385
156385
|
const line = indentation ? lineText.slice(indentation) : lineText;
|
156386
156386
|
if (line.length) {
|
156387
156387
|
writeLine();
|
@@ -156479,11 +156479,11 @@ ${lanes.join(`
|
|
156479
156479
|
}
|
156480
156480
|
function getEffectiveLines(getLineDifference) {
|
156481
156481
|
Debug.assert(!!preserveSourceNewlines);
|
156482
|
-
const
|
156483
|
-
if (
|
156482
|
+
const lines = getLineDifference(true);
|
156483
|
+
if (lines === 0) {
|
156484
156484
|
return getLineDifference(false);
|
156485
156485
|
}
|
156486
|
-
return
|
156486
|
+
return lines;
|
156487
156487
|
}
|
156488
156488
|
function writeLineSeparatorsAndIndentBefore(node, parent2) {
|
156489
156489
|
const leadingNewlines = preserveSourceNewlines && getLeadingLineTerminatorCount(parent2, node, 0);
|
@@ -166741,7 +166741,7 @@ ${lanes.join(`
|
|
166741
166741
|
function generateOptionOutput(sys2, option, rightAlignOfLeft, leftAlignOfRight) {
|
166742
166742
|
var _a;
|
166743
166743
|
const text = [];
|
166744
|
-
const
|
166744
|
+
const colors2 = createColors(sys2);
|
166745
166745
|
const name = getDisplayNameTextOfOption(option);
|
166746
166746
|
const valueCandidates = getValueCandidate(option);
|
166747
166747
|
const defaultValueDescription = typeof option.defaultValueDescription === "object" ? getDiagnosticText(option.defaultValueDescription) : formatDefaultValue(option.defaultValueDescription, option.type === "list" || option.type === "listOrElement" ? option.element.type : option.type);
|
@@ -166762,7 +166762,7 @@ ${lanes.join(`
|
|
166762
166762
|
}
|
166763
166763
|
text.push(sys2.newLine);
|
166764
166764
|
} else {
|
166765
|
-
text.push(
|
166765
|
+
text.push(colors2.blue(name), sys2.newLine);
|
166766
166766
|
if (option.description) {
|
166767
166767
|
const description3 = getDiagnosticText(option.description);
|
166768
166768
|
text.push(description3);
|
@@ -166807,7 +166807,7 @@ ${lanes.join(`
|
|
166807
166807
|
if (isFirstLine) {
|
166808
166808
|
curLeft = left.padStart(rightAlignOfLeft2);
|
166809
166809
|
curLeft = curLeft.padEnd(leftAlignOfRight2);
|
166810
|
-
curLeft = colorLeft ?
|
166810
|
+
curLeft = colorLeft ? colors2.blue(curLeft) : curLeft;
|
166811
166811
|
} else {
|
166812
166812
|
curLeft = "".padStart(leftAlignOfRight2);
|
166813
166813
|
}
|
@@ -166876,15 +166876,15 @@ ${lanes.join(`
|
|
166876
166876
|
}
|
166877
166877
|
const rightAlignOfLeftPart = maxLength2 + 2;
|
166878
166878
|
const leftAlignOfRightPart = rightAlignOfLeftPart + 2;
|
166879
|
-
let
|
166879
|
+
let lines = [];
|
166880
166880
|
for (const option of optionsList) {
|
166881
166881
|
const tmp = generateOptionOutput(sys2, option, rightAlignOfLeftPart, leftAlignOfRightPart);
|
166882
|
-
|
166882
|
+
lines = [...lines, ...tmp];
|
166883
166883
|
}
|
166884
|
-
if (
|
166885
|
-
|
166884
|
+
if (lines[lines.length - 2] !== sys2.newLine) {
|
166885
|
+
lines.push(sys2.newLine);
|
166886
166886
|
}
|
166887
|
-
return
|
166887
|
+
return lines;
|
166888
166888
|
}
|
166889
166889
|
function generateSectionOptionsOutput(sys2, sectionName, options, subCategory, beforeOptionsDescription, afterOptionsDescription) {
|
166890
166890
|
let res = [];
|
@@ -166919,9 +166919,9 @@ ${lanes.join(`
|
|
166919
166919
|
return res;
|
166920
166920
|
}
|
166921
166921
|
function printEasyHelp(sys2, simpleOptions) {
|
166922
|
-
const
|
166922
|
+
const colors2 = createColors(sys2);
|
166923
166923
|
let output = [...getHeader(sys2, `${getDiagnosticText(Diagnostics.tsc_Colon_The_TypeScript_Compiler)} - ${getDiagnosticText(Diagnostics.Version_0, version)}`)];
|
166924
|
-
output.push(
|
166924
|
+
output.push(colors2.bold(getDiagnosticText(Diagnostics.COMMON_COMMANDS)) + sys2.newLine + sys2.newLine);
|
166925
166925
|
example("tsc", Diagnostics.Compiles_the_current_project_tsconfig_json_in_the_working_directory);
|
166926
166926
|
example("tsc app.ts util.ts", Diagnostics.Ignoring_tsconfig_json_compiles_the_specified_files_with_default_compiler_options);
|
166927
166927
|
example("tsc -b", Diagnostics.Build_a_composite_project_in_the_working_directory);
|
@@ -166942,7 +166942,7 @@ ${lanes.join(`
|
|
166942
166942
|
function example(ex, desc) {
|
166943
166943
|
const examples = typeof ex === "string" ? [ex] : ex;
|
166944
166944
|
for (const example2 of examples) {
|
166945
|
-
output.push(" " +
|
166945
|
+
output.push(" " + colors2.blue(example2) + sys2.newLine);
|
166946
166946
|
}
|
166947
166947
|
output.push(" " + getDiagnosticText(desc) + sys2.newLine + sys2.newLine);
|
166948
166948
|
}
|
@@ -166965,12 +166965,12 @@ ${lanes.join(`
|
|
166965
166965
|
}
|
166966
166966
|
function getHeader(sys2, message) {
|
166967
166967
|
var _a;
|
166968
|
-
const
|
166968
|
+
const colors2 = createColors(sys2);
|
166969
166969
|
const header = [];
|
166970
166970
|
const terminalWidth = ((_a = sys2.getWidthOfTerminal) == null ? undefined : _a.call(sys2)) ?? 0;
|
166971
166971
|
const tsIconLength = 5;
|
166972
|
-
const tsIconFirstLine =
|
166973
|
-
const tsIconSecondLine =
|
166972
|
+
const tsIconFirstLine = colors2.blueBackground("".padStart(tsIconLength));
|
166973
|
+
const tsIconSecondLine = colors2.blueBackground(colors2.brightWhite("TS ".padStart(tsIconLength)));
|
166974
166974
|
if (terminalWidth >= message.length + tsIconLength) {
|
166975
166975
|
const rightAlign = terminalWidth > 120 ? 120 : terminalWidth;
|
166976
166976
|
const leftAlign = rightAlign - tsIconLength;
|
@@ -218660,9 +218660,9 @@ ${e3.message}`;
|
|
218660
218660
|
insertedText = this.initialText + this.trailingText;
|
218661
218661
|
}
|
218662
218662
|
const lm = LineIndex.linesFromText(insertedText);
|
218663
|
-
const
|
218664
|
-
if (
|
218665
|
-
|
218663
|
+
const lines = lm.lines;
|
218664
|
+
if (lines.length > 1 && lines[lines.length - 1] === "") {
|
218665
|
+
lines.pop();
|
218666
218666
|
}
|
218667
218667
|
let branchParent;
|
218668
218668
|
let lastZeroCount;
|
@@ -218681,13 +218681,13 @@ ${e3.message}`;
|
|
218681
218681
|
branchParent.remove(lastZeroCount);
|
218682
218682
|
}
|
218683
218683
|
const leafNode = this.startPath[this.startPath.length - 1];
|
218684
|
-
if (
|
218685
|
-
leafNode.text =
|
218686
|
-
if (
|
218687
|
-
let insertedNodes = new Array(
|
218684
|
+
if (lines.length > 0) {
|
218685
|
+
leafNode.text = lines[0];
|
218686
|
+
if (lines.length > 1) {
|
218687
|
+
let insertedNodes = new Array(lines.length - 1);
|
218688
218688
|
let startNode2 = leafNode;
|
218689
|
-
for (let i2 = 1;i2 <
|
218690
|
-
insertedNodes[i2 - 1] = new LineLeaf(
|
218689
|
+
for (let i2 = 1;i2 < lines.length; i2++) {
|
218690
|
+
insertedNodes[i2 - 1] = new LineLeaf(lines[i2]);
|
218691
218691
|
}
|
218692
218692
|
let pathIndex = this.startPath.length - 2;
|
218693
218693
|
while (pathIndex >= 0) {
|
@@ -218957,11 +218957,11 @@ ${e3.message}`;
|
|
218957
218957
|
return { absolutePosition: this.root.charCount(), lineText: undefined };
|
218958
218958
|
}
|
218959
218959
|
}
|
218960
|
-
load(
|
218961
|
-
if (
|
218960
|
+
load(lines) {
|
218961
|
+
if (lines.length > 0) {
|
218962
218962
|
const leaves = [];
|
218963
|
-
for (let i2 = 0;i2 <
|
218964
|
-
leaves[i2] = new LineLeaf(
|
218963
|
+
for (let i2 = 0;i2 < lines.length; i2++) {
|
218964
|
+
leaves[i2] = new LineLeaf(lines[i2]);
|
218965
218965
|
}
|
218966
218966
|
this.root = _LineIndex.buildTreeFromBottom(leaves);
|
218967
218967
|
} else {
|
@@ -219064,18 +219064,18 @@ ${e3.message}`;
|
|
219064
219064
|
if (lineMap.length === 0) {
|
219065
219065
|
return { lines: [], lineMap };
|
219066
219066
|
}
|
219067
|
-
const
|
219067
|
+
const lines = new Array(lineMap.length);
|
219068
219068
|
const lc = lineMap.length - 1;
|
219069
219069
|
for (let lmi = 0;lmi < lc; lmi++) {
|
219070
|
-
|
219070
|
+
lines[lmi] = text.substring(lineMap[lmi], lineMap[lmi + 1]);
|
219071
219071
|
}
|
219072
219072
|
const endText = text.substring(lineMap[lc]);
|
219073
219073
|
if (endText.length > 0) {
|
219074
|
-
|
219074
|
+
lines[lc] = endText;
|
219075
219075
|
} else {
|
219076
|
-
|
219076
|
+
lines.pop();
|
219077
219077
|
}
|
219078
|
-
return { lines
|
219078
|
+
return { lines, lineMap };
|
219079
219079
|
}
|
219080
219080
|
};
|
219081
219081
|
var LineNode = class _LineNode {
|
@@ -220155,7 +220155,7 @@ async function* streamBody(e4) {
|
|
220155
220155
|
}
|
220156
220156
|
}
|
220157
220157
|
}
|
220158
|
-
async function*
|
220158
|
+
async function* split(e4, r3) {
|
220159
220159
|
var a4 = "";
|
220160
220160
|
var n3;
|
220161
220161
|
for await (var t4 of e4) {
|
@@ -220189,7 +220189,7 @@ function makeFetchSource(e4, r3, a4) {
|
|
220189
220189
|
var n5 = "--" + (a6 ? a6[1] : "-");
|
220190
220190
|
var t5 = true;
|
220191
220191
|
var i4;
|
220192
|
-
for await (var o4 of
|
220192
|
+
for await (var o4 of split(streamBody(r5), `\r
|
220193
220193
|
` + n5)) {
|
220194
220194
|
if (t5) {
|
220195
220195
|
t5 = false;
|
@@ -220222,7 +220222,7 @@ function makeFetchSource(e4, r3, a4) {
|
|
220222
220222
|
} else if (/text\/event-stream/i.test(o3)) {
|
220223
220223
|
s3 = async function* parseEventStream(e6) {
|
220224
220224
|
var r5;
|
220225
|
-
for await (var a6 of
|
220225
|
+
for await (var a6 of split(streamBody(e6), `
|
220226
220226
|
|
220227
220227
|
`)) {
|
220228
220228
|
var n5 = a6.match(S);
|
@@ -241161,8 +241161,8 @@ var require_mkdir = __commonJS((exports, module) => {
|
|
241161
241161
|
return "CwdError";
|
241162
241162
|
}
|
241163
241163
|
}
|
241164
|
-
var cGet = (cache,
|
241165
|
-
var cSet = (cache,
|
241164
|
+
var cGet = (cache, key4) => cache.get(normPath(key4));
|
241165
|
+
var cSet = (cache, key4, val) => cache.set(normPath(key4), val);
|
241166
241166
|
var checkCwd = (dir, cb) => {
|
241167
241167
|
fs4.stat(dir, (er2, st2) => {
|
241168
241168
|
if (er2 || !st2.isDirectory()) {
|
@@ -241533,8 +241533,8 @@ var require_unpack = __commonJS((exports, module) => {
|
|
241533
241533
|
}
|
241534
241534
|
};
|
241535
241535
|
var dropCache = (cache) => {
|
241536
|
-
for (const
|
241537
|
-
cache.delete(
|
241536
|
+
for (const key4 of cache.keys()) {
|
241537
|
+
cache.delete(key4);
|
241538
241538
|
}
|
241539
241539
|
};
|
241540
241540
|
|
@@ -246331,8 +246331,8 @@ var require_lib13 = __commonJS((exports, module) => {
|
|
246331
246331
|
function fetch2(input, options) {
|
246332
246332
|
return nodeFetch.fetch(input, options);
|
246333
246333
|
}
|
246334
|
-
for (const
|
246335
|
-
fetch2[
|
246334
|
+
for (const key4 in nodeFetch) {
|
246335
|
+
fetch2[key4] = nodeFetch[key4];
|
246336
246336
|
}
|
246337
246337
|
module.exports = fetch2;
|
246338
246338
|
});
|
@@ -246425,11 +246425,11 @@ var require_proxy = __commonJS((exports) => {
|
|
246425
246425
|
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;
|
246426
246426
|
}
|
246427
246427
|
e10(requireSymbols$4, "requireSymbols$4");
|
246428
|
-
var
|
246428
|
+
var errors4;
|
246429
246429
|
var hasRequiredErrors;
|
246430
246430
|
function requireErrors() {
|
246431
246431
|
if (hasRequiredErrors)
|
246432
|
-
return
|
246432
|
+
return errors4;
|
246433
246433
|
hasRequiredErrors = 1;
|
246434
246434
|
|
246435
246435
|
class A5 extends Error {
|
@@ -246638,7 +246638,7 @@ var require_proxy = __commonJS((exports) => {
|
|
246638
246638
|
super(i6, { cause: k5, ...F3 ?? {} }), this.name = "SecureProxyConnectionError", this.message = i6 || "Secure Proxy Connection failed", this.code = "UND_ERR_PRX_TLS", this.cause = k5;
|
246639
246639
|
}
|
246640
246640
|
}
|
246641
|
-
return
|
246641
|
+
return errors4 = { 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 }, errors4;
|
246642
246642
|
}
|
246643
246643
|
e10(requireErrors, "requireErrors");
|
246644
246644
|
var constants$4;
|
@@ -256611,11 +256611,11 @@ var require_visit = __commonJS((exports) => {
|
|
256611
256611
|
visit2.BREAK = BREAK;
|
256612
256612
|
visit2.SKIP = SKIP;
|
256613
256613
|
visit2.REMOVE = REMOVE;
|
256614
|
-
function visit_(
|
256615
|
-
const ctrl = callVisitor(
|
256614
|
+
function visit_(key4, node, visitor, path6) {
|
256615
|
+
const ctrl = callVisitor(key4, node, visitor, path6);
|
256616
256616
|
if (identity2.isNode(ctrl) || identity2.isPair(ctrl)) {
|
256617
|
-
replaceNode(
|
256618
|
-
return visit_(
|
256617
|
+
replaceNode(key4, path6, ctrl);
|
256618
|
+
return visit_(key4, ctrl, visitor, path6);
|
256619
256619
|
}
|
256620
256620
|
if (typeof ctrl !== "symbol") {
|
256621
256621
|
if (identity2.isCollection(node)) {
|
@@ -256659,11 +256659,11 @@ var require_visit = __commonJS((exports) => {
|
|
256659
256659
|
visitAsync.BREAK = BREAK;
|
256660
256660
|
visitAsync.SKIP = SKIP;
|
256661
256661
|
visitAsync.REMOVE = REMOVE;
|
256662
|
-
async function visitAsync_(
|
256663
|
-
const ctrl = await callVisitor(
|
256662
|
+
async function visitAsync_(key4, node, visitor, path6) {
|
256663
|
+
const ctrl = await callVisitor(key4, node, visitor, path6);
|
256664
256664
|
if (identity2.isNode(ctrl) || identity2.isPair(ctrl)) {
|
256665
|
-
replaceNode(
|
256666
|
-
return visitAsync_(
|
256665
|
+
replaceNode(key4, path6, ctrl);
|
256666
|
+
return visitAsync_(key4, ctrl, visitor, path6);
|
256667
256667
|
}
|
256668
256668
|
if (typeof ctrl !== "symbol") {
|
256669
256669
|
if (identity2.isCollection(node)) {
|
@@ -256713,27 +256713,27 @@ var require_visit = __commonJS((exports) => {
|
|
256713
256713
|
}
|
256714
256714
|
return visitor;
|
256715
256715
|
}
|
256716
|
-
function callVisitor(
|
256716
|
+
function callVisitor(key4, node, visitor, path6) {
|
256717
256717
|
if (typeof visitor === "function")
|
256718
|
-
return visitor(
|
256718
|
+
return visitor(key4, node, path6);
|
256719
256719
|
if (identity2.isMap(node))
|
256720
|
-
return visitor.Map?.(
|
256720
|
+
return visitor.Map?.(key4, node, path6);
|
256721
256721
|
if (identity2.isSeq(node))
|
256722
|
-
return visitor.Seq?.(
|
256722
|
+
return visitor.Seq?.(key4, node, path6);
|
256723
256723
|
if (identity2.isPair(node))
|
256724
|
-
return visitor.Pair?.(
|
256724
|
+
return visitor.Pair?.(key4, node, path6);
|
256725
256725
|
if (identity2.isScalar(node))
|
256726
|
-
return visitor.Scalar?.(
|
256726
|
+
return visitor.Scalar?.(key4, node, path6);
|
256727
256727
|
if (identity2.isAlias(node))
|
256728
|
-
return visitor.Alias?.(
|
256728
|
+
return visitor.Alias?.(key4, node, path6);
|
256729
256729
|
return;
|
256730
256730
|
}
|
256731
|
-
function replaceNode(
|
256731
|
+
function replaceNode(key4, path6, node) {
|
256732
256732
|
const parent = path6[path6.length - 1];
|
256733
256733
|
if (identity2.isCollection(parent)) {
|
256734
|
-
parent.items[
|
256734
|
+
parent.items[key4] = node;
|
256735
256735
|
} else if (identity2.isPair(parent)) {
|
256736
|
-
if (
|
256736
|
+
if (key4 === "key")
|
256737
256737
|
parent.key = node;
|
256738
256738
|
else
|
256739
256739
|
parent.value = node;
|
@@ -256965,7 +256965,7 @@ var require_anchors = __commonJS((exports) => {
|
|
256965
256965
|
|
256966
256966
|
// ../../node_modules/yaml/dist/doc/applyReviver.js
|
256967
256967
|
var require_applyReviver = __commonJS((exports) => {
|
256968
|
-
function applyReviver(reviver, obj,
|
256968
|
+
function applyReviver(reviver, obj, key4, val) {
|
256969
256969
|
if (val && typeof val === "object") {
|
256970
256970
|
if (Array.isArray(val)) {
|
256971
256971
|
for (let i6 = 0, len = val.length;i6 < len; ++i6) {
|
@@ -257005,7 +257005,7 @@ var require_applyReviver = __commonJS((exports) => {
|
|
257005
257005
|
}
|
257006
257006
|
}
|
257007
257007
|
}
|
257008
|
-
return reviver.call(obj,
|
257008
|
+
return reviver.call(obj, key4, val);
|
257009
257009
|
}
|
257010
257010
|
exports.applyReviver = applyReviver;
|
257011
257011
|
});
|
@@ -257323,29 +257323,29 @@ var require_Collection = __commonJS((exports) => {
|
|
257323
257323
|
if (isEmptyPath(path6))
|
257324
257324
|
this.add(value4);
|
257325
257325
|
else {
|
257326
|
-
const [
|
257327
|
-
const node = this.get(
|
257326
|
+
const [key4, ...rest] = path6;
|
257327
|
+
const node = this.get(key4, true);
|
257328
257328
|
if (identity2.isCollection(node))
|
257329
257329
|
node.addIn(rest, value4);
|
257330
257330
|
else if (node === undefined && this.schema)
|
257331
|
-
this.set(
|
257331
|
+
this.set(key4, collectionFromPath(this.schema, rest, value4));
|
257332
257332
|
else
|
257333
|
-
throw new Error(`Expected YAML collection at ${
|
257333
|
+
throw new Error(`Expected YAML collection at ${key4}. Remaining path: ${rest}`);
|
257334
257334
|
}
|
257335
257335
|
}
|
257336
257336
|
deleteIn(path6) {
|
257337
|
-
const [
|
257337
|
+
const [key4, ...rest] = path6;
|
257338
257338
|
if (rest.length === 0)
|
257339
|
-
return this.delete(
|
257340
|
-
const node = this.get(
|
257339
|
+
return this.delete(key4);
|
257340
|
+
const node = this.get(key4, true);
|
257341
257341
|
if (identity2.isCollection(node))
|
257342
257342
|
return node.deleteIn(rest);
|
257343
257343
|
else
|
257344
|
-
throw new Error(`Expected YAML collection at ${
|
257344
|
+
throw new Error(`Expected YAML collection at ${key4}. Remaining path: ${rest}`);
|
257345
257345
|
}
|
257346
257346
|
getIn(path6, keepScalar) {
|
257347
|
-
const [
|
257348
|
-
const node = this.get(
|
257347
|
+
const [key4, ...rest] = path6;
|
257348
|
+
const node = this.get(key4, true);
|
257349
257349
|
if (rest.length === 0)
|
257350
257350
|
return !keepScalar && identity2.isScalar(node) ? node.value : node;
|
257351
257351
|
else
|
@@ -257360,24 +257360,24 @@ var require_Collection = __commonJS((exports) => {
|
|
257360
257360
|
});
|
257361
257361
|
}
|
257362
257362
|
hasIn(path6) {
|
257363
|
-
const [
|
257363
|
+
const [key4, ...rest] = path6;
|
257364
257364
|
if (rest.length === 0)
|
257365
|
-
return this.has(
|
257366
|
-
const node = this.get(
|
257365
|
+
return this.has(key4);
|
257366
|
+
const node = this.get(key4, true);
|
257367
257367
|
return identity2.isCollection(node) ? node.hasIn(rest) : false;
|
257368
257368
|
}
|
257369
257369
|
setIn(path6, value4) {
|
257370
|
-
const [
|
257370
|
+
const [key4, ...rest] = path6;
|
257371
257371
|
if (rest.length === 0) {
|
257372
|
-
this.set(
|
257372
|
+
this.set(key4, value4);
|
257373
257373
|
} else {
|
257374
|
-
const node = this.get(
|
257374
|
+
const node = this.get(key4, true);
|
257375
257375
|
if (identity2.isCollection(node))
|
257376
257376
|
node.setIn(rest, value4);
|
257377
257377
|
else if (node === undefined && this.schema)
|
257378
|
-
this.set(
|
257378
|
+
this.set(key4, collectionFromPath(this.schema, rest, value4));
|
257379
257379
|
else
|
257380
|
-
throw new Error(`Expected YAML collection at ${
|
257380
|
+
throw new Error(`Expected YAML collection at ${key4}. Remaining path: ${rest}`);
|
257381
257381
|
}
|
257382
257382
|
}
|
257383
257383
|
}
|
@@ -257965,19 +257965,19 @@ var require_stringifyPair = __commonJS((exports) => {
|
|
257965
257965
|
var Scalar = require_Scalar();
|
257966
257966
|
var stringify3 = require_stringify();
|
257967
257967
|
var stringifyComment = require_stringifyComment();
|
257968
|
-
function stringifyPair2({ key:
|
257968
|
+
function stringifyPair2({ key: key4, value: value4 }, ctx, onComment, onChompKeep) {
|
257969
257969
|
const { allNullValues, doc, indent: indent2, indentStep, options: { commentString, indentSeq, simpleKeys } } = ctx;
|
257970
|
-
let keyComment = identity2.isNode(
|
257970
|
+
let keyComment = identity2.isNode(key4) && key4.comment || null;
|
257971
257971
|
if (simpleKeys) {
|
257972
257972
|
if (keyComment) {
|
257973
257973
|
throw new Error("With simple keys, key nodes cannot have comments");
|
257974
257974
|
}
|
257975
|
-
if (identity2.isCollection(
|
257975
|
+
if (identity2.isCollection(key4) || !identity2.isNode(key4) && typeof key4 === "object") {
|
257976
257976
|
const msg = "With simple keys, collection cannot be used as a key value";
|
257977
257977
|
throw new Error(msg);
|
257978
257978
|
}
|
257979
257979
|
}
|
257980
|
-
let explicitKey = !simpleKeys && (!
|
257980
|
+
let explicitKey = !simpleKeys && (!key4 || keyComment && value4 == null && !ctx.inFlow || identity2.isCollection(key4) || (identity2.isScalar(key4) ? key4.type === Scalar.Scalar.BLOCK_FOLDED || key4.type === Scalar.Scalar.BLOCK_LITERAL : typeof key4 === "object"));
|
257981
257981
|
ctx = Object.assign({}, ctx, {
|
257982
257982
|
allNullValues: false,
|
257983
257983
|
implicitKey: !explicitKey && (simpleKeys || !allNullValues),
|
@@ -257985,7 +257985,7 @@ var require_stringifyPair = __commonJS((exports) => {
|
|
257985
257985
|
});
|
257986
257986
|
let keyCommentDone = false;
|
257987
257987
|
let chompKeep = false;
|
257988
|
-
let str = stringify3.stringify(
|
257988
|
+
let str = stringify3.stringify(key4, ctx, () => keyCommentDone = true, () => chompKeep = true);
|
257989
257989
|
if (!explicitKey && !ctx.inFlow && str.length > 1024) {
|
257990
257990
|
if (simpleKeys)
|
257991
257991
|
throw new Error("With simple keys, single line scalar must not span more than 1024 characters");
|
@@ -258129,7 +258129,7 @@ var require_merge = __commonJS((exports) => {
|
|
258129
258129
|
}),
|
258130
258130
|
stringify: () => MERGE_KEY
|
258131
258131
|
};
|
258132
|
-
var isMergeKey = (ctx,
|
258132
|
+
var isMergeKey = (ctx, key4) => (merge3.identify(key4) || identity2.isScalar(key4) && (!key4.type || key4.type === Scalar.Scalar.PLAIN) && merge3.identify(key4.value)) && ctx?.doc.schema.tags.some((tag) => tag.tag === merge3.tag && tag.default);
|
258133
258133
|
function addMergeToJSMap(ctx, map3, value4) {
|
258134
258134
|
value4 = ctx && identity2.isAlias(value4) ? value4.resolve(ctx.doc) : value4;
|
258135
258135
|
if (identity2.isSeq(value4))
|
@@ -258146,14 +258146,14 @@ var require_merge = __commonJS((exports) => {
|
|
258146
258146
|
if (!identity2.isMap(source))
|
258147
258147
|
throw new Error("Merge sources must be maps or map aliases");
|
258148
258148
|
const srcMap = source.toJSON(null, ctx, Map);
|
258149
|
-
for (const [
|
258149
|
+
for (const [key4, value5] of srcMap) {
|
258150
258150
|
if (map3 instanceof Map) {
|
258151
|
-
if (!map3.has(
|
258152
|
-
map3.set(
|
258151
|
+
if (!map3.has(key4))
|
258152
|
+
map3.set(key4, value5);
|
258153
258153
|
} else if (map3 instanceof Set) {
|
258154
|
-
map3.add(
|
258155
|
-
} else if (!Object.prototype.hasOwnProperty.call(map3,
|
258156
|
-
Object.defineProperty(map3,
|
258154
|
+
map3.add(key4);
|
258155
|
+
} else if (!Object.prototype.hasOwnProperty.call(map3, key4)) {
|
258156
|
+
Object.defineProperty(map3, key4, {
|
258157
258157
|
value: value5,
|
258158
258158
|
writable: true,
|
258159
258159
|
enumerable: true,
|
@@ -258175,19 +258175,19 @@ var require_addPairToJSMap = __commonJS((exports) => {
|
|
258175
258175
|
var stringify3 = require_stringify();
|
258176
258176
|
var identity2 = require_identity();
|
258177
258177
|
var toJS = require_toJS();
|
258178
|
-
function addPairToJSMap(ctx, map3, { key:
|
258179
|
-
if (identity2.isNode(
|
258180
|
-
|
258181
|
-
else if (merge3.isMergeKey(ctx,
|
258178
|
+
function addPairToJSMap(ctx, map3, { key: key4, value: value4 }) {
|
258179
|
+
if (identity2.isNode(key4) && key4.addToJSMap)
|
258180
|
+
key4.addToJSMap(ctx, map3, value4);
|
258181
|
+
else if (merge3.isMergeKey(ctx, key4))
|
258182
258182
|
merge3.addMergeToJSMap(ctx, map3, value4);
|
258183
258183
|
else {
|
258184
|
-
const jsKey = toJS.toJS(
|
258184
|
+
const jsKey = toJS.toJS(key4, "", ctx);
|
258185
258185
|
if (map3 instanceof Map) {
|
258186
258186
|
map3.set(jsKey, toJS.toJS(value4, jsKey, ctx));
|
258187
258187
|
} else if (map3 instanceof Set) {
|
258188
258188
|
map3.add(jsKey);
|
258189
258189
|
} else {
|
258190
|
-
const stringKey = stringifyKey(
|
258190
|
+
const stringKey = stringifyKey(key4, jsKey, ctx);
|
258191
258191
|
const jsValue = toJS.toJS(value4, stringKey, ctx);
|
258192
258192
|
if (stringKey in map3)
|
258193
258193
|
Object.defineProperty(map3, stringKey, {
|
@@ -258202,19 +258202,19 @@ var require_addPairToJSMap = __commonJS((exports) => {
|
|
258202
258202
|
}
|
258203
258203
|
return map3;
|
258204
258204
|
}
|
258205
|
-
function stringifyKey(
|
258205
|
+
function stringifyKey(key4, jsKey, ctx) {
|
258206
258206
|
if (jsKey === null)
|
258207
258207
|
return "";
|
258208
258208
|
if (typeof jsKey !== "object")
|
258209
258209
|
return String(jsKey);
|
258210
|
-
if (identity2.isNode(
|
258210
|
+
if (identity2.isNode(key4) && ctx?.doc) {
|
258211
258211
|
const strCtx = stringify3.createStringifyContext(ctx.doc, {});
|
258212
258212
|
strCtx.anchors = new Set;
|
258213
258213
|
for (const node of ctx.anchors.keys())
|
258214
258214
|
strCtx.anchors.add(node.anchor);
|
258215
258215
|
strCtx.inFlow = true;
|
258216
258216
|
strCtx.inStringifyKey = true;
|
258217
|
-
const strKey =
|
258217
|
+
const strKey = key4.toString(strCtx);
|
258218
258218
|
if (!ctx.mapKeyWarned) {
|
258219
258219
|
let jsonStr = JSON.stringify(strKey);
|
258220
258220
|
if (jsonStr.length > 40)
|
@@ -258235,25 +258235,25 @@ var require_Pair = __commonJS((exports) => {
|
|
258235
258235
|
var stringifyPair2 = require_stringifyPair();
|
258236
258236
|
var addPairToJSMap = require_addPairToJSMap();
|
258237
258237
|
var identity2 = require_identity();
|
258238
|
-
function createPair(
|
258239
|
-
const k5 = createNode.createNode(
|
258238
|
+
function createPair(key4, value4, ctx) {
|
258239
|
+
const k5 = createNode.createNode(key4, undefined, ctx);
|
258240
258240
|
const v7 = createNode.createNode(value4, undefined, ctx);
|
258241
258241
|
return new Pair(k5, v7);
|
258242
258242
|
}
|
258243
258243
|
|
258244
258244
|
class Pair {
|
258245
|
-
constructor(
|
258245
|
+
constructor(key4, value4 = null) {
|
258246
258246
|
Object.defineProperty(this, identity2.NODE_TYPE, { value: identity2.PAIR });
|
258247
|
-
this.key =
|
258247
|
+
this.key = key4;
|
258248
258248
|
this.value = value4;
|
258249
258249
|
}
|
258250
258250
|
clone(schema) {
|
258251
|
-
let { key:
|
258252
|
-
if (identity2.isNode(
|
258253
|
-
|
258251
|
+
let { key: key4, value: value4 } = this;
|
258252
|
+
if (identity2.isNode(key4))
|
258253
|
+
key4 = key4.clone(schema);
|
258254
258254
|
if (identity2.isNode(value4))
|
258255
258255
|
value4 = value4.clone(schema);
|
258256
|
-
return new Pair(
|
258256
|
+
return new Pair(key4, value4);
|
258257
258257
|
}
|
258258
258258
|
toJSON(_5, ctx) {
|
258259
258259
|
const pair = ctx?.mapAsMap ? new Map : {};
|
@@ -258420,11 +258420,11 @@ var require_YAMLMap = __commonJS((exports) => {
|
|
258420
258420
|
var identity2 = require_identity();
|
258421
258421
|
var Pair = require_Pair();
|
258422
258422
|
var Scalar = require_Scalar();
|
258423
|
-
function findPair(items,
|
258424
|
-
const k5 = identity2.isScalar(
|
258423
|
+
function findPair(items, key4) {
|
258424
|
+
const k5 = identity2.isScalar(key4) ? key4.value : key4;
|
258425
258425
|
for (const it2 of items) {
|
258426
258426
|
if (identity2.isPair(it2)) {
|
258427
|
-
if (it2.key ===
|
258427
|
+
if (it2.key === key4 || it2.key === k5)
|
258428
258428
|
return it2;
|
258429
258429
|
if (identity2.isScalar(it2.key) && it2.key.value === k5)
|
258430
258430
|
return it2;
|
@@ -258444,20 +258444,20 @@ var require_YAMLMap = __commonJS((exports) => {
|
|
258444
258444
|
static from(schema, obj, ctx) {
|
258445
258445
|
const { keepUndefined, replacer } = ctx;
|
258446
258446
|
const map3 = new this(schema);
|
258447
|
-
const add = (
|
258447
|
+
const add = (key4, value4) => {
|
258448
258448
|
if (typeof replacer === "function")
|
258449
|
-
value4 = replacer.call(obj,
|
258450
|
-
else if (Array.isArray(replacer) && !replacer.includes(
|
258449
|
+
value4 = replacer.call(obj, key4, value4);
|
258450
|
+
else if (Array.isArray(replacer) && !replacer.includes(key4))
|
258451
258451
|
return;
|
258452
258452
|
if (value4 !== undefined || keepUndefined)
|
258453
|
-
map3.items.push(Pair.createPair(
|
258453
|
+
map3.items.push(Pair.createPair(key4, value4, ctx));
|
258454
258454
|
};
|
258455
258455
|
if (obj instanceof Map) {
|
258456
|
-
for (const [
|
258457
|
-
add(
|
258456
|
+
for (const [key4, value4] of obj)
|
258457
|
+
add(key4, value4);
|
258458
258458
|
} else if (obj && typeof obj === "object") {
|
258459
|
-
for (const
|
258460
|
-
add(
|
258459
|
+
for (const key4 of Object.keys(obj))
|
258460
|
+
add(key4, obj[key4]);
|
258461
258461
|
}
|
258462
258462
|
if (typeof schema.sortMapEntries === "function") {
|
258463
258463
|
map3.items.sort(schema.sortMapEntries);
|
@@ -258491,23 +258491,23 @@ var require_YAMLMap = __commonJS((exports) => {
|
|
258491
258491
|
this.items.push(_pair);
|
258492
258492
|
}
|
258493
258493
|
}
|
258494
|
-
delete(
|
258495
|
-
const it2 = findPair(this.items,
|
258494
|
+
delete(key4) {
|
258495
|
+
const it2 = findPair(this.items, key4);
|
258496
258496
|
if (!it2)
|
258497
258497
|
return false;
|
258498
258498
|
const del = this.items.splice(this.items.indexOf(it2), 1);
|
258499
258499
|
return del.length > 0;
|
258500
258500
|
}
|
258501
|
-
get(
|
258502
|
-
const it2 = findPair(this.items,
|
258501
|
+
get(key4, keepScalar) {
|
258502
|
+
const it2 = findPair(this.items, key4);
|
258503
258503
|
const node = it2?.value;
|
258504
258504
|
return (!keepScalar && identity2.isScalar(node) ? node.value : node) ?? undefined;
|
258505
258505
|
}
|
258506
|
-
has(
|
258507
|
-
return !!findPair(this.items,
|
258506
|
+
has(key4) {
|
258507
|
+
return !!findPair(this.items, key4);
|
258508
258508
|
}
|
258509
|
-
set(
|
258510
|
-
this.add(new Pair.Pair(
|
258509
|
+
set(key4, value4) {
|
258510
|
+
this.add(new Pair.Pair(key4, value4), true);
|
258511
258511
|
}
|
258512
258512
|
toJSON(_5, ctx, Type) {
|
258513
258513
|
const map3 = Type ? new Type : ctx?.mapAsMap ? new Map : {};
|
@@ -258578,28 +258578,28 @@ var require_YAMLSeq = __commonJS((exports) => {
|
|
258578
258578
|
add(value4) {
|
258579
258579
|
this.items.push(value4);
|
258580
258580
|
}
|
258581
|
-
delete(
|
258582
|
-
const idx = asItemIndex(
|
258581
|
+
delete(key4) {
|
258582
|
+
const idx = asItemIndex(key4);
|
258583
258583
|
if (typeof idx !== "number")
|
258584
258584
|
return false;
|
258585
258585
|
const del = this.items.splice(idx, 1);
|
258586
258586
|
return del.length > 0;
|
258587
258587
|
}
|
258588
|
-
get(
|
258589
|
-
const idx = asItemIndex(
|
258588
|
+
get(key4, keepScalar) {
|
258589
|
+
const idx = asItemIndex(key4);
|
258590
258590
|
if (typeof idx !== "number")
|
258591
258591
|
return;
|
258592
258592
|
const it2 = this.items[idx];
|
258593
258593
|
return !keepScalar && identity2.isScalar(it2) ? it2.value : it2;
|
258594
258594
|
}
|
258595
|
-
has(
|
258596
|
-
const idx = asItemIndex(
|
258595
|
+
has(key4) {
|
258596
|
+
const idx = asItemIndex(key4);
|
258597
258597
|
return typeof idx === "number" && idx < this.items.length;
|
258598
258598
|
}
|
258599
|
-
set(
|
258600
|
-
const idx = asItemIndex(
|
258599
|
+
set(key4, value4) {
|
258600
|
+
const idx = asItemIndex(key4);
|
258601
258601
|
if (typeof idx !== "number")
|
258602
|
-
throw new Error(`Expected a valid index, not ${
|
258602
|
+
throw new Error(`Expected a valid index, not ${key4}.`);
|
258603
258603
|
const prev = this.items[idx];
|
258604
258604
|
if (identity2.isScalar(prev) && Scalar.isScalarValue(value4))
|
258605
258605
|
prev.value = value4;
|
@@ -258633,8 +258633,8 @@ var require_YAMLSeq = __commonJS((exports) => {
|
|
258633
258633
|
let i6 = 0;
|
258634
258634
|
for (let it2 of obj) {
|
258635
258635
|
if (typeof replacer === "function") {
|
258636
|
-
const
|
258637
|
-
it2 = replacer.call(obj,
|
258636
|
+
const key4 = obj instanceof Set ? it2 : String(i6++);
|
258637
|
+
it2 = replacer.call(obj, key4, it2);
|
258638
258638
|
}
|
258639
258639
|
seq.items.push(createNode.createNode(it2, undefined, ctx));
|
258640
258640
|
}
|
@@ -258642,8 +258642,8 @@ var require_YAMLSeq = __commonJS((exports) => {
|
|
258642
258642
|
return seq;
|
258643
258643
|
}
|
258644
258644
|
}
|
258645
|
-
function asItemIndex(
|
258646
|
-
let idx = identity2.isScalar(
|
258645
|
+
function asItemIndex(key4) {
|
258646
|
+
let idx = identity2.isScalar(key4) ? key4.value : key4;
|
258647
258647
|
if (idx && typeof idx === "string")
|
258648
258648
|
idx = Number(idx);
|
258649
258649
|
return typeof idx === "number" && Number.isInteger(idx) && idx >= 0 ? idx : null;
|
@@ -259015,25 +259015,25 @@ ${cn.comment}` : item.comment;
|
|
259015
259015
|
for (let it2 of iterable) {
|
259016
259016
|
if (typeof replacer === "function")
|
259017
259017
|
it2 = replacer.call(iterable, String(i6++), it2);
|
259018
|
-
let
|
259018
|
+
let key4, value4;
|
259019
259019
|
if (Array.isArray(it2)) {
|
259020
259020
|
if (it2.length === 2) {
|
259021
|
-
|
259021
|
+
key4 = it2[0];
|
259022
259022
|
value4 = it2[1];
|
259023
259023
|
} else
|
259024
259024
|
throw new TypeError(`Expected [key, value] tuple: ${it2}`);
|
259025
259025
|
} else if (it2 && it2 instanceof Object) {
|
259026
259026
|
const keys = Object.keys(it2);
|
259027
259027
|
if (keys.length === 1) {
|
259028
|
-
|
259029
|
-
value4 = it2[
|
259028
|
+
key4 = keys[0];
|
259029
|
+
value4 = it2[key4];
|
259030
259030
|
} else {
|
259031
259031
|
throw new TypeError(`Expected tuple with one key, not ${keys.length} keys`);
|
259032
259032
|
}
|
259033
259033
|
} else {
|
259034
|
-
|
259034
|
+
key4 = it2;
|
259035
259035
|
}
|
259036
|
-
pairs2.items.push(Pair.createPair(
|
259036
|
+
pairs2.items.push(Pair.createPair(key4, value4, ctx));
|
259037
259037
|
}
|
259038
259038
|
return pairs2;
|
259039
259039
|
}
|
@@ -259074,16 +259074,16 @@ var require_omap = __commonJS((exports) => {
|
|
259074
259074
|
if (ctx?.onCreate)
|
259075
259075
|
ctx.onCreate(map3);
|
259076
259076
|
for (const pair of this.items) {
|
259077
|
-
let
|
259077
|
+
let key4, value4;
|
259078
259078
|
if (identity2.isPair(pair)) {
|
259079
|
-
|
259080
|
-
value4 = toJS.toJS(pair.value,
|
259079
|
+
key4 = toJS.toJS(pair.key, "", ctx);
|
259080
|
+
value4 = toJS.toJS(pair.value, key4, ctx);
|
259081
259081
|
} else {
|
259082
|
-
|
259082
|
+
key4 = toJS.toJS(pair, "", ctx);
|
259083
259083
|
}
|
259084
|
-
if (map3.has(
|
259084
|
+
if (map3.has(key4))
|
259085
259085
|
throw new Error("Ordered maps must not include duplicate keys");
|
259086
|
-
map3.set(
|
259086
|
+
map3.set(key4, value4);
|
259087
259087
|
}
|
259088
259088
|
return map3;
|
259089
259089
|
}
|
@@ -259104,12 +259104,12 @@ var require_omap = __commonJS((exports) => {
|
|
259104
259104
|
resolve(seq, onError) {
|
259105
259105
|
const pairs$1 = pairs.resolvePairs(seq, onError);
|
259106
259106
|
const seenKeys = [];
|
259107
|
-
for (const { key:
|
259108
|
-
if (identity2.isScalar(
|
259109
|
-
if (seenKeys.includes(
|
259110
|
-
onError(`Ordered maps must not include duplicate keys: ${
|
259107
|
+
for (const { key: key4 } of pairs$1.items) {
|
259108
|
+
if (identity2.isScalar(key4)) {
|
259109
|
+
if (seenKeys.includes(key4.value)) {
|
259110
|
+
onError(`Ordered maps must not include duplicate keys: ${key4.value}`);
|
259111
259111
|
} else {
|
259112
|
-
seenKeys.push(
|
259112
|
+
seenKeys.push(key4.value);
|
259113
259113
|
}
|
259114
259114
|
}
|
259115
259115
|
}
|
@@ -259283,30 +259283,30 @@ var require_set = __commonJS((exports) => {
|
|
259283
259283
|
super(schema);
|
259284
259284
|
this.tag = YAMLSet.tag;
|
259285
259285
|
}
|
259286
|
-
add(
|
259286
|
+
add(key4) {
|
259287
259287
|
let pair;
|
259288
|
-
if (identity2.isPair(
|
259289
|
-
pair =
|
259290
|
-
else if (
|
259291
|
-
pair = new Pair.Pair(
|
259288
|
+
if (identity2.isPair(key4))
|
259289
|
+
pair = key4;
|
259290
|
+
else if (key4 && typeof key4 === "object" && "key" in key4 && "value" in key4 && key4.value === null)
|
259291
|
+
pair = new Pair.Pair(key4.key, null);
|
259292
259292
|
else
|
259293
|
-
pair = new Pair.Pair(
|
259293
|
+
pair = new Pair.Pair(key4, null);
|
259294
259294
|
const prev = YAMLMap.findPair(this.items, pair.key);
|
259295
259295
|
if (!prev)
|
259296
259296
|
this.items.push(pair);
|
259297
259297
|
}
|
259298
|
-
get(
|
259299
|
-
const pair = YAMLMap.findPair(this.items,
|
259298
|
+
get(key4, keepPair) {
|
259299
|
+
const pair = YAMLMap.findPair(this.items, key4);
|
259300
259300
|
return !keepPair && identity2.isPair(pair) ? identity2.isScalar(pair.key) ? pair.key.value : pair.key : pair;
|
259301
259301
|
}
|
259302
|
-
set(
|
259302
|
+
set(key4, value4) {
|
259303
259303
|
if (typeof value4 !== "boolean")
|
259304
259304
|
throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof value4}`);
|
259305
|
-
const prev = YAMLMap.findPair(this.items,
|
259305
|
+
const prev = YAMLMap.findPair(this.items, key4);
|
259306
259306
|
if (prev && !value4) {
|
259307
259307
|
this.items.splice(this.items.indexOf(prev), 1);
|
259308
259308
|
} else if (!prev && value4) {
|
259309
|
-
this.items.push(new Pair.Pair(
|
259309
|
+
this.items.push(new Pair.Pair(key4));
|
259310
259310
|
}
|
259311
259311
|
}
|
259312
259312
|
toJSON(_5, ctx) {
|
@@ -259541,7 +259541,7 @@ var require_tags = __commonJS((exports) => {
|
|
259541
259541
|
if (Array.isArray(customTags))
|
259542
259542
|
tags = [];
|
259543
259543
|
else {
|
259544
|
-
const keys = Array.from(schemas.keys()).filter((
|
259544
|
+
const keys = Array.from(schemas.keys()).filter((key4) => key4 !== "yaml11").map((key4) => JSON.stringify(key4)).join(", ");
|
259545
259545
|
throw new Error(`Unknown schema "${schemaName}"; use one of ${keys} or define customTags array`);
|
259546
259546
|
}
|
259547
259547
|
}
|
@@ -259557,7 +259557,7 @@ var require_tags = __commonJS((exports) => {
|
|
259557
259557
|
const tagObj = typeof tag === "string" ? tagsByName[tag] : tag;
|
259558
259558
|
if (!tagObj) {
|
259559
259559
|
const tagName = JSON.stringify(tag);
|
259560
|
-
const keys = Object.keys(tagsByName).map((
|
259560
|
+
const keys = Object.keys(tagsByName).map((key4) => JSON.stringify(key4)).join(", ");
|
259561
259561
|
throw new Error(`Unknown custom tag ${tagName}; use one of ${keys}`);
|
259562
259562
|
}
|
259563
259563
|
if (!tags2.includes(tagObj))
|
@@ -259792,13 +259792,13 @@ var require_Document = __commonJS((exports) => {
|
|
259792
259792
|
setAnchors();
|
259793
259793
|
return node;
|
259794
259794
|
}
|
259795
|
-
createPair(
|
259796
|
-
const k5 = this.createNode(
|
259795
|
+
createPair(key4, value4, options = {}) {
|
259796
|
+
const k5 = this.createNode(key4, null, options);
|
259797
259797
|
const v7 = this.createNode(value4, null, options);
|
259798
259798
|
return new Pair.Pair(k5, v7);
|
259799
259799
|
}
|
259800
|
-
delete(
|
259801
|
-
return assertCollection(this.contents) ? this.contents.delete(
|
259800
|
+
delete(key4) {
|
259801
|
+
return assertCollection(this.contents) ? this.contents.delete(key4) : false;
|
259802
259802
|
}
|
259803
259803
|
deleteIn(path6) {
|
259804
259804
|
if (Collection.isEmptyPath(path6)) {
|
@@ -259809,27 +259809,27 @@ var require_Document = __commonJS((exports) => {
|
|
259809
259809
|
}
|
259810
259810
|
return assertCollection(this.contents) ? this.contents.deleteIn(path6) : false;
|
259811
259811
|
}
|
259812
|
-
get(
|
259813
|
-
return identity2.isCollection(this.contents) ? this.contents.get(
|
259812
|
+
get(key4, keepScalar) {
|
259813
|
+
return identity2.isCollection(this.contents) ? this.contents.get(key4, keepScalar) : undefined;
|
259814
259814
|
}
|
259815
259815
|
getIn(path6, keepScalar) {
|
259816
259816
|
if (Collection.isEmptyPath(path6))
|
259817
259817
|
return !keepScalar && identity2.isScalar(this.contents) ? this.contents.value : this.contents;
|
259818
259818
|
return identity2.isCollection(this.contents) ? this.contents.getIn(path6, keepScalar) : undefined;
|
259819
259819
|
}
|
259820
|
-
has(
|
259821
|
-
return identity2.isCollection(this.contents) ? this.contents.has(
|
259820
|
+
has(key4) {
|
259821
|
+
return identity2.isCollection(this.contents) ? this.contents.has(key4) : false;
|
259822
259822
|
}
|
259823
259823
|
hasIn(path6) {
|
259824
259824
|
if (Collection.isEmptyPath(path6))
|
259825
259825
|
return this.contents !== undefined;
|
259826
259826
|
return identity2.isCollection(this.contents) ? this.contents.hasIn(path6) : false;
|
259827
259827
|
}
|
259828
|
-
set(
|
259828
|
+
set(key4, value4) {
|
259829
259829
|
if (this.contents == null) {
|
259830
|
-
this.contents = Collection.collectionFromPath(this.schema, [
|
259830
|
+
this.contents = Collection.collectionFromPath(this.schema, [key4], value4);
|
259831
259831
|
} else if (assertCollection(this.contents)) {
|
259832
|
-
this.contents.set(
|
259832
|
+
this.contents.set(key4, value4);
|
259833
259833
|
}
|
259834
259834
|
}
|
259835
259835
|
setIn(path6, value4) {
|
@@ -260113,25 +260113,25 @@ var require_resolve_props = __commonJS((exports) => {
|
|
260113
260113
|
|
260114
260114
|
// ../../node_modules/yaml/dist/compose/util-contains-newline.js
|
260115
260115
|
var require_util_contains_newline = __commonJS((exports) => {
|
260116
|
-
function containsNewline(
|
260117
|
-
if (!
|
260116
|
+
function containsNewline(key4) {
|
260117
|
+
if (!key4)
|
260118
260118
|
return null;
|
260119
|
-
switch (
|
260119
|
+
switch (key4.type) {
|
260120
260120
|
case "alias":
|
260121
260121
|
case "scalar":
|
260122
260122
|
case "double-quoted-scalar":
|
260123
260123
|
case "single-quoted-scalar":
|
260124
|
-
if (
|
260124
|
+
if (key4.source.includes(`
|
260125
260125
|
`))
|
260126
260126
|
return true;
|
260127
|
-
if (
|
260128
|
-
for (const st2 of
|
260127
|
+
if (key4.end) {
|
260128
|
+
for (const st2 of key4.end)
|
260129
260129
|
if (st2.type === "newline")
|
260130
260130
|
return true;
|
260131
260131
|
}
|
260132
260132
|
return false;
|
260133
260133
|
case "flow-collection":
|
260134
|
-
for (const it2 of
|
260134
|
+
for (const it2 of key4.items) {
|
260135
260135
|
for (const st2 of it2.start)
|
260136
260136
|
if (st2.type === "newline")
|
260137
260137
|
return true;
|
@@ -260196,10 +260196,10 @@ var require_resolve_block_map = __commonJS((exports) => {
|
|
260196
260196
|
let offset = bm.offset;
|
260197
260197
|
let commentEnd = null;
|
260198
260198
|
for (const collItem of bm.items) {
|
260199
|
-
const { start: start3, key:
|
260199
|
+
const { start: start3, key: key4, sep: sep3, value: value4 } = collItem;
|
260200
260200
|
const keyProps = resolveProps.resolveProps(start3, {
|
260201
260201
|
indicator: "explicit-key-ind",
|
260202
|
-
next:
|
260202
|
+
next: key4 ?? sep3?.[0],
|
260203
260203
|
offset,
|
260204
260204
|
onError,
|
260205
260205
|
parentIndent: bm.indent,
|
@@ -260207,10 +260207,10 @@ var require_resolve_block_map = __commonJS((exports) => {
|
|
260207
260207
|
});
|
260208
260208
|
const implicitKey = !keyProps.found;
|
260209
260209
|
if (implicitKey) {
|
260210
|
-
if (
|
260211
|
-
if (
|
260210
|
+
if (key4) {
|
260211
|
+
if (key4.type === "block-seq")
|
260212
260212
|
onError(offset, "BLOCK_AS_IMPLICIT_KEY", "A block sequence may not be used as an implicit map key");
|
260213
|
-
else if ("indent" in
|
260213
|
+
else if ("indent" in key4 && key4.indent !== bm.indent)
|
260214
260214
|
onError(offset, "BAD_INDENT", startColMsg);
|
260215
260215
|
}
|
260216
260216
|
if (!keyProps.anchor && !keyProps.tag && !sep3) {
|
@@ -260224,17 +260224,17 @@ var require_resolve_block_map = __commonJS((exports) => {
|
|
260224
260224
|
}
|
260225
260225
|
continue;
|
260226
260226
|
}
|
260227
|
-
if (keyProps.newlineAfterProp || utilContainsNewline.containsNewline(
|
260228
|
-
onError(
|
260227
|
+
if (keyProps.newlineAfterProp || utilContainsNewline.containsNewline(key4)) {
|
260228
|
+
onError(key4 ?? start3[start3.length - 1], "MULTILINE_IMPLICIT_KEY", "Implicit keys need to be on a single line");
|
260229
260229
|
}
|
260230
260230
|
} else if (keyProps.found?.indent !== bm.indent) {
|
260231
260231
|
onError(offset, "BAD_INDENT", startColMsg);
|
260232
260232
|
}
|
260233
260233
|
ctx.atKey = true;
|
260234
260234
|
const keyStart = keyProps.end;
|
260235
|
-
const keyNode =
|
260235
|
+
const keyNode = key4 ? composeNode(ctx, key4, keyProps, onError) : composeEmptyNode(ctx, keyStart, start3, null, keyProps, onError);
|
260236
260236
|
if (ctx.schema.compat)
|
260237
|
-
utilFlowIndentCheck.flowIndentCheck(bm.indent,
|
260237
|
+
utilFlowIndentCheck.flowIndentCheck(bm.indent, key4, onError);
|
260238
260238
|
ctx.atKey = false;
|
260239
260239
|
if (utilMapIncludes.mapIncludes(ctx, map3.items, keyNode))
|
260240
260240
|
onError(keyStart, "DUPLICATE_KEY", "Map keys must be unique");
|
@@ -260244,7 +260244,7 @@ var require_resolve_block_map = __commonJS((exports) => {
|
|
260244
260244
|
offset: keyNode.range[2],
|
260245
260245
|
onError,
|
260246
260246
|
parentIndent: bm.indent,
|
260247
|
-
startOnNewline: !
|
260247
|
+
startOnNewline: !key4 || key4.type === "block-scalar"
|
260248
260248
|
});
|
260249
260249
|
offset = valueProps.end;
|
260250
260250
|
if (valueProps.found) {
|
@@ -260400,11 +260400,11 @@ var require_resolve_flow_collection = __commonJS((exports) => {
|
|
260400
260400
|
let offset = fc.offset + fc.start.source.length;
|
260401
260401
|
for (let i6 = 0;i6 < fc.items.length; ++i6) {
|
260402
260402
|
const collItem = fc.items[i6];
|
260403
|
-
const { start: start3, key:
|
260403
|
+
const { start: start3, key: key4, sep: sep3, value: value4 } = collItem;
|
260404
260404
|
const props = resolveProps.resolveProps(start3, {
|
260405
260405
|
flow: fcName,
|
260406
260406
|
indicator: "explicit-key-ind",
|
260407
|
-
next:
|
260407
|
+
next: key4 ?? sep3?.[0],
|
260408
260408
|
offset,
|
260409
260409
|
onError,
|
260410
260410
|
parentIndent: fc.indent,
|
@@ -260426,8 +260426,8 @@ var require_resolve_flow_collection = __commonJS((exports) => {
|
|
260426
260426
|
offset = props.end;
|
260427
260427
|
continue;
|
260428
260428
|
}
|
260429
|
-
if (!isMap && ctx.options.strict && utilContainsNewline.containsNewline(
|
260430
|
-
onError(
|
260429
|
+
if (!isMap && ctx.options.strict && utilContainsNewline.containsNewline(key4))
|
260430
|
+
onError(key4, "MULTILINE_IMPLICIT_KEY", "Implicit keys of flow sequence pairs need to be on a single line");
|
260431
260431
|
}
|
260432
260432
|
if (i6 === 0) {
|
260433
260433
|
if (props.comma)
|
@@ -260472,8 +260472,8 @@ var require_resolve_flow_collection = __commonJS((exports) => {
|
|
260472
260472
|
} else {
|
260473
260473
|
ctx.atKey = true;
|
260474
260474
|
const keyStart = props.end;
|
260475
|
-
const keyNode =
|
260476
|
-
if (isBlock(
|
260475
|
+
const keyNode = key4 ? composeNode(ctx, key4, props, onError) : composeEmptyNode(ctx, keyStart, start3, null, props, onError);
|
260476
|
+
if (isBlock(key4))
|
260477
260477
|
onError(keyNode.range, "BLOCK_IN_FLOW", blockMsg);
|
260478
260478
|
ctx.atKey = false;
|
260479
260479
|
const valueProps = resolveProps.resolveProps(sep3 ?? [], {
|
@@ -261285,7 +261285,7 @@ var require_composer = __commonJS((exports) => {
|
|
261285
261285
|
var node_process = __require("node:process");
|
261286
261286
|
var directives4 = require_directives2();
|
261287
261287
|
var Document = require_Document();
|
261288
|
-
var
|
261288
|
+
var errors4 = require_errors3();
|
261289
261289
|
var identity2 = require_identity();
|
261290
261290
|
var composeDoc = require_compose_doc();
|
261291
261291
|
var resolveEnd = require_resolve_end();
|
@@ -261336,9 +261336,9 @@ var require_composer = __commonJS((exports) => {
|
|
261336
261336
|
this.onError = (source, code2, message, warning) => {
|
261337
261337
|
const pos = getErrorPos(source);
|
261338
261338
|
if (warning)
|
261339
|
-
this.warnings.push(new
|
261339
|
+
this.warnings.push(new errors4.YAMLWarning(pos, code2, message));
|
261340
261340
|
else
|
261341
|
-
this.errors.push(new
|
261341
|
+
this.errors.push(new errors4.YAMLParseError(pos, code2, message));
|
261342
261342
|
};
|
261343
261343
|
this.directives = new directives4.Directives({ version: options.version || "1.2" });
|
261344
261344
|
this.options = options;
|
@@ -261422,7 +261422,7 @@ ${cb}` : comment;
|
|
261422
261422
|
break;
|
261423
261423
|
case "error": {
|
261424
261424
|
const msg = token.source ? `${token.message}: ${JSON.stringify(token.source)}` : token.message;
|
261425
|
-
const error5 = new
|
261425
|
+
const error5 = new errors4.YAMLParseError(getErrorPos(token), "UNEXPECTED_TOKEN", msg);
|
261426
261426
|
if (this.atDirectives || !this.doc)
|
261427
261427
|
this.errors.push(error5);
|
261428
261428
|
else
|
@@ -261432,7 +261432,7 @@ ${cb}` : comment;
|
|
261432
261432
|
case "doc-end": {
|
261433
261433
|
if (!this.doc) {
|
261434
261434
|
const msg = "Unexpected doc-end without preceding document";
|
261435
|
-
this.errors.push(new
|
261435
|
+
this.errors.push(new errors4.YAMLParseError(getErrorPos(token), "UNEXPECTED_TOKEN", msg));
|
261436
261436
|
break;
|
261437
261437
|
}
|
261438
261438
|
this.doc.directives.docEnd = true;
|
@@ -261447,7 +261447,7 @@ ${end.comment}` : end.comment;
|
|
261447
261447
|
break;
|
261448
261448
|
}
|
261449
261449
|
default:
|
261450
|
-
this.errors.push(new
|
261450
|
+
this.errors.push(new errors4.YAMLParseError(getErrorPos(token), "UNEXPECTED_TOKEN", `Unsupported token ${token.type}`));
|
261451
261451
|
}
|
261452
261452
|
}
|
261453
261453
|
*end(forceDoc = false, endOffset = -1) {
|
@@ -261473,7 +261473,7 @@ ${end.comment}` : end.comment;
|
|
261473
261473
|
var require_cst_scalar = __commonJS((exports) => {
|
261474
261474
|
var resolveBlockScalar = require_resolve_block_scalar();
|
261475
261475
|
var resolveFlowScalar = require_resolve_flow_scalar();
|
261476
|
-
var
|
261476
|
+
var errors4 = require_errors3();
|
261477
261477
|
var stringifyString = require_stringifyString();
|
261478
261478
|
function resolveAsScalar(token, strict = true, onError) {
|
261479
261479
|
if (token) {
|
@@ -261482,7 +261482,7 @@ var require_cst_scalar = __commonJS((exports) => {
|
|
261482
261482
|
if (onError)
|
261483
261483
|
onError(offset, code2, message);
|
261484
261484
|
else
|
261485
|
-
throw new
|
261485
|
+
throw new errors4.YAMLParseError([offset, offset + 1], code2, message);
|
261486
261486
|
};
|
261487
261487
|
switch (token.type) {
|
261488
261488
|
case "scalar":
|
@@ -261596,9 +261596,9 @@ var require_cst_scalar = __commonJS((exports) => {
|
|
261596
261596
|
if (!addEndtoBlockProps(props, "end" in token ? token.end : undefined))
|
261597
261597
|
props.push({ type: "newline", offset: -1, indent: indent2, source: `
|
261598
261598
|
` });
|
261599
|
-
for (const
|
261600
|
-
if (
|
261601
|
-
delete token[
|
261599
|
+
for (const key4 of Object.keys(token))
|
261600
|
+
if (key4 !== "type" && key4 !== "offset")
|
261601
|
+
delete token[key4];
|
261602
261602
|
Object.assign(token, { type: "block-scalar", indent: indent2, props, source: body });
|
261603
261603
|
}
|
261604
261604
|
}
|
@@ -261647,9 +261647,9 @@ var require_cst_scalar = __commonJS((exports) => {
|
|
261647
261647
|
default: {
|
261648
261648
|
const indent2 = "indent" in token ? token.indent : -1;
|
261649
261649
|
const end = "end" in token && Array.isArray(token.end) ? token.end.filter((st2) => st2.type === "space" || st2.type === "comment" || st2.type === "newline") : [];
|
261650
|
-
for (const
|
261651
|
-
if (
|
261652
|
-
delete token[
|
261650
|
+
for (const key4 of Object.keys(token))
|
261651
|
+
if (key4 !== "type" && key4 !== "offset")
|
261652
|
+
delete token[key4];
|
261653
261653
|
Object.assign(token, { type: type4, indent: indent2, source, end });
|
261654
261654
|
}
|
261655
261655
|
}
|
@@ -261701,12 +261701,12 @@ var require_cst_stringify = __commonJS((exports) => {
|
|
261701
261701
|
}
|
261702
261702
|
}
|
261703
261703
|
}
|
261704
|
-
function stringifyItem({ start: start3, key:
|
261704
|
+
function stringifyItem({ start: start3, key: key4, sep: sep3, value: value4 }) {
|
261705
261705
|
let res = "";
|
261706
261706
|
for (const st2 of start3)
|
261707
261707
|
res += st2.source;
|
261708
|
-
if (
|
261709
|
-
res += stringifyToken(
|
261708
|
+
if (key4)
|
261709
|
+
res += stringifyToken(key4);
|
261710
261710
|
if (sep3)
|
261711
261711
|
for (const st2 of sep3)
|
261712
261712
|
res += st2.source;
|
@@ -263003,7 +263003,7 @@ var require_parser2 = __commonJS((exports) => {
|
|
263003
263003
|
});
|
263004
263004
|
} else if (isFlowToken(it2.key) && !includesToken(it2.sep, "newline")) {
|
263005
263005
|
const start4 = getFirstKeyStartProps(it2.start);
|
263006
|
-
const
|
263006
|
+
const key4 = it2.key;
|
263007
263007
|
const sep3 = it2.sep;
|
263008
263008
|
sep3.push(this.sourceToken);
|
263009
263009
|
delete it2.key;
|
@@ -263012,7 +263012,7 @@ var require_parser2 = __commonJS((exports) => {
|
|
263012
263012
|
type: "block-map",
|
263013
263013
|
offset: this.offset,
|
263014
263014
|
indent: this.indent,
|
263015
|
-
items: [{ start: start4, key:
|
263015
|
+
items: [{ start: start4, key: key4, sep: sep3 }]
|
263016
263016
|
});
|
263017
263017
|
} else if (start3.length > 0) {
|
263018
263018
|
it2.sep = it2.sep.concat(start3, this.sourceToken);
|
@@ -263335,7 +263335,7 @@ var require_parser2 = __commonJS((exports) => {
|
|
263335
263335
|
var require_public_api = __commonJS((exports) => {
|
263336
263336
|
var composer = require_composer();
|
263337
263337
|
var Document = require_Document();
|
263338
|
-
var
|
263338
|
+
var errors4 = require_errors3();
|
263339
263339
|
var log = require_log();
|
263340
263340
|
var identity2 = require_identity();
|
263341
263341
|
var lineCounter = require_line_counter();
|
@@ -263352,8 +263352,8 @@ var require_public_api = __commonJS((exports) => {
|
|
263352
263352
|
const docs = Array.from(composer$1.compose(parser$1.parse(source)));
|
263353
263353
|
if (prettyErrors && lineCounter2)
|
263354
263354
|
for (const doc of docs) {
|
263355
|
-
doc.errors.forEach(
|
263356
|
-
doc.warnings.forEach(
|
263355
|
+
doc.errors.forEach(errors4.prettifyError(source, lineCounter2));
|
263356
|
+
doc.warnings.forEach(errors4.prettifyError(source, lineCounter2));
|
263357
263357
|
}
|
263358
263358
|
if (docs.length > 0)
|
263359
263359
|
return docs;
|
@@ -263368,13 +263368,13 @@ var require_public_api = __commonJS((exports) => {
|
|
263368
263368
|
if (!doc)
|
263369
263369
|
doc = _doc;
|
263370
263370
|
else if (doc.options.logLevel !== "silent") {
|
263371
|
-
doc.errors.push(new
|
263371
|
+
doc.errors.push(new errors4.YAMLParseError(_doc.range.slice(0, 2), "MULTIPLE_DOCS", "Source contains multiple documents; please use YAML.parseAllDocuments()"));
|
263372
263372
|
break;
|
263373
263373
|
}
|
263374
263374
|
}
|
263375
263375
|
if (prettyErrors && lineCounter2) {
|
263376
|
-
doc.errors.forEach(
|
263377
|
-
doc.warnings.forEach(
|
263376
|
+
doc.errors.forEach(errors4.prettifyError(source, lineCounter2));
|
263377
|
+
doc.warnings.forEach(errors4.prettifyError(source, lineCounter2));
|
263378
263378
|
}
|
263379
263379
|
return doc;
|
263380
263380
|
}
|
@@ -274462,7 +274462,7 @@ function pruneCurrentEnv(currentEnv, env2) {
|
|
274462
274462
|
var package_default = {
|
274463
274463
|
name: "@settlemint/sdk-cli",
|
274464
274464
|
description: "Command-line interface for SettleMint SDK, providing development tools and project management capabilities",
|
274465
|
-
version: "1.1.
|
274465
|
+
version: "1.1.8-main086af5b3",
|
274466
274466
|
type: "module",
|
274467
274467
|
private: false,
|
274468
274468
|
license: "FSL-1.1-MIT",
|
@@ -274506,12 +274506,12 @@ var package_default = {
|
|
274506
274506
|
},
|
274507
274507
|
devDependencies: {
|
274508
274508
|
"@commander-js/extra-typings": "13.1.0",
|
274509
|
-
"@inquirer/confirm": "5.1.
|
274509
|
+
"@inquirer/confirm": "5.1.6",
|
274510
274510
|
"@inquirer/input": "4.1.5",
|
274511
|
-
"@inquirer/password": "4.0.
|
274511
|
+
"@inquirer/password": "4.0.9",
|
274512
274512
|
"@inquirer/select": "4.0.8",
|
274513
|
-
"@settlemint/sdk-js": "1.1.
|
274514
|
-
"@settlemint/sdk-utils": "1.1.
|
274513
|
+
"@settlemint/sdk-js": "1.1.8-main086af5b3",
|
274514
|
+
"@settlemint/sdk-utils": "1.1.8-main086af5b3",
|
274515
274515
|
"@types/node": "22.13.4",
|
274516
274516
|
"@types/semver": "7.5.8",
|
274517
274517
|
"@types/which": "3.0.4",
|
@@ -274601,10 +274601,6 @@ var {
|
|
274601
274601
|
} = import__.default;
|
274602
274602
|
|
274603
274603
|
// ../../node_modules/@inquirer/core/dist/esm/lib/key.js
|
274604
|
-
var isUpKey = (key) => key.name === "up" || key.name === "k" || key.ctrl && key.name === "p";
|
274605
|
-
var isDownKey = (key) => key.name === "down" || key.name === "j" || key.ctrl && key.name === "n";
|
274606
|
-
var isBackspaceKey = (key) => key.name === "backspace";
|
274607
|
-
var isNumberKey = (key) => "123456789".includes(key.name);
|
274608
274604
|
var isEnterKey = (key) => key.name === "enter" || key.name === "return";
|
274609
274605
|
// ../../node_modules/@inquirer/core/dist/esm/lib/errors.js
|
274610
274606
|
class AbortPromptError extends Error {
|
@@ -275139,22 +275135,11 @@ function usePrefix({ status = "idle", theme }) {
|
|
275139
275135
|
const iconName = status === "loading" ? "idle" : status;
|
275140
275136
|
return typeof prefix === "string" ? prefix : prefix[iconName] ?? prefix["idle"];
|
275141
275137
|
}
|
275142
|
-
// ../../node_modules/@inquirer/core/dist/esm/lib/use-memo.js
|
275143
|
-
function useMemo(fn, dependencies) {
|
275144
|
-
return withPointer((pointer) => {
|
275145
|
-
const prev = pointer.get();
|
275146
|
-
if (!prev || prev.dependencies.length !== dependencies.length || prev.dependencies.some((dep, i) => dep !== dependencies[i])) {
|
275147
|
-
const value = fn();
|
275148
|
-
pointer.set({ value, dependencies });
|
275149
|
-
return value;
|
275150
|
-
}
|
275151
|
-
return prev.value;
|
275152
|
-
});
|
275153
|
-
}
|
275154
275138
|
// ../../node_modules/@inquirer/core/dist/esm/lib/use-ref.js
|
275155
275139
|
function useRef(val) {
|
275156
275140
|
return useState({ current: val })[0];
|
275157
275141
|
}
|
275142
|
+
|
275158
275143
|
// ../../node_modules/@inquirer/core/dist/esm/lib/use-keypress.js
|
275159
275144
|
function useKeypress(userHandler) {
|
275160
275145
|
const signal = useRef(userHandler);
|
@@ -275186,95 +275171,6 @@ function readlineWidth() {
|
|
275186
275171
|
return import_cli_width.default({ defaultWidth: 80, output: readline().output });
|
275187
275172
|
}
|
275188
275173
|
|
275189
|
-
// ../../node_modules/@inquirer/core/dist/esm/lib/pagination/lines.js
|
275190
|
-
function split(content, width) {
|
275191
|
-
return breakLines(content, width).split(`
|
275192
|
-
`);
|
275193
|
-
}
|
275194
|
-
function rotate(count, items) {
|
275195
|
-
const max = items.length;
|
275196
|
-
const offset = (count % max + max) % max;
|
275197
|
-
return [...items.slice(offset), ...items.slice(0, offset)];
|
275198
|
-
}
|
275199
|
-
function lines({ items, width, renderItem, active, position: requested, pageSize }) {
|
275200
|
-
const layouts = items.map((item, index) => ({
|
275201
|
-
item,
|
275202
|
-
index,
|
275203
|
-
isActive: index === active
|
275204
|
-
}));
|
275205
|
-
const layoutsInPage = rotate(active - requested, layouts).slice(0, pageSize);
|
275206
|
-
const renderItemAt = (index) => layoutsInPage[index] == null ? [] : split(renderItem(layoutsInPage[index]), width);
|
275207
|
-
const pageBuffer = Array.from({ length: pageSize });
|
275208
|
-
const activeItem = renderItemAt(requested).slice(0, pageSize);
|
275209
|
-
const position = requested + activeItem.length <= pageSize ? requested : pageSize - activeItem.length;
|
275210
|
-
pageBuffer.splice(position, activeItem.length, ...activeItem);
|
275211
|
-
let bufferPointer = position + activeItem.length;
|
275212
|
-
let layoutPointer = requested + 1;
|
275213
|
-
while (bufferPointer < pageSize && layoutPointer < layoutsInPage.length) {
|
275214
|
-
for (const line of renderItemAt(layoutPointer)) {
|
275215
|
-
pageBuffer[bufferPointer++] = line;
|
275216
|
-
if (bufferPointer >= pageSize)
|
275217
|
-
break;
|
275218
|
-
}
|
275219
|
-
layoutPointer++;
|
275220
|
-
}
|
275221
|
-
bufferPointer = position - 1;
|
275222
|
-
layoutPointer = requested - 1;
|
275223
|
-
while (bufferPointer >= 0 && layoutPointer >= 0) {
|
275224
|
-
for (const line of renderItemAt(layoutPointer).reverse()) {
|
275225
|
-
pageBuffer[bufferPointer--] = line;
|
275226
|
-
if (bufferPointer < 0)
|
275227
|
-
break;
|
275228
|
-
}
|
275229
|
-
layoutPointer--;
|
275230
|
-
}
|
275231
|
-
return pageBuffer.filter((line) => typeof line === "string");
|
275232
|
-
}
|
275233
|
-
|
275234
|
-
// ../../node_modules/@inquirer/core/dist/esm/lib/pagination/position.js
|
275235
|
-
function finite({ active, pageSize, total }) {
|
275236
|
-
const middle = Math.floor(pageSize / 2);
|
275237
|
-
if (total <= pageSize || active < middle)
|
275238
|
-
return active;
|
275239
|
-
if (active >= total - middle)
|
275240
|
-
return active + pageSize - total;
|
275241
|
-
return middle;
|
275242
|
-
}
|
275243
|
-
function infinite({ active, lastActive, total, pageSize, pointer }) {
|
275244
|
-
if (total <= pageSize)
|
275245
|
-
return active;
|
275246
|
-
if (lastActive < active && active - lastActive < pageSize) {
|
275247
|
-
return Math.min(Math.floor(pageSize / 2), pointer + active - lastActive);
|
275248
|
-
}
|
275249
|
-
return pointer;
|
275250
|
-
}
|
275251
|
-
|
275252
|
-
// ../../node_modules/@inquirer/core/dist/esm/lib/pagination/use-pagination.js
|
275253
|
-
function usePagination({ items, active, renderItem, pageSize, loop = true }) {
|
275254
|
-
const state = useRef({ position: 0, lastActive: 0 });
|
275255
|
-
const position = loop ? infinite({
|
275256
|
-
active,
|
275257
|
-
lastActive: state.current.lastActive,
|
275258
|
-
total: items.length,
|
275259
|
-
pageSize,
|
275260
|
-
pointer: state.current.position
|
275261
|
-
}) : finite({
|
275262
|
-
active,
|
275263
|
-
total: items.length,
|
275264
|
-
pageSize
|
275265
|
-
});
|
275266
|
-
state.current.position = position;
|
275267
|
-
state.current.lastActive = active;
|
275268
|
-
return lines({
|
275269
|
-
items,
|
275270
|
-
width: readlineWidth(),
|
275271
|
-
renderItem,
|
275272
|
-
active,
|
275273
|
-
position,
|
275274
|
-
pageSize
|
275275
|
-
}).join(`
|
275276
|
-
`);
|
275277
|
-
}
|
275278
275174
|
// ../../node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
|
275279
275175
|
var import_mute_stream = __toESM(require_lib(), 1);
|
275280
275176
|
import * as readline2 from "node:readline";
|
@@ -275660,20 +275556,6 @@ function createPrompt(view) {
|
|
275660
275556
|
};
|
275661
275557
|
return prompt;
|
275662
275558
|
}
|
275663
|
-
// ../../node_modules/@inquirer/core/dist/esm/lib/Separator.js
|
275664
|
-
var import_yoctocolors_cjs2 = __toESM(require_yoctocolors_cjs(), 1);
|
275665
|
-
class Separator {
|
275666
|
-
separator = import_yoctocolors_cjs2.default.dim(Array.from({ length: 15 }).join(esm_default.line));
|
275667
|
-
type = "separator";
|
275668
|
-
constructor(separator) {
|
275669
|
-
if (separator) {
|
275670
|
-
this.separator = separator;
|
275671
|
-
}
|
275672
|
-
}
|
275673
|
-
static isSeparator(choice) {
|
275674
|
-
return Boolean(choice && typeof choice === "object" && "type" in choice && choice.type === "separator");
|
275675
|
-
}
|
275676
|
-
}
|
275677
275559
|
// ../utils/dist/terminal.mjs
|
275678
275560
|
import { spawn } from "node:child_process";
|
275679
275561
|
var import_console_table_printer2 = __toESM(require_dist2(), 1);
|
@@ -279834,14 +279716,586 @@ async function codegenTsconfig(env2, thegraphSubgraphNames) {
|
|
279834
279716
|
};
|
279835
279717
|
}
|
279836
279718
|
|
279837
|
-
// ../../node_modules/@inquirer/select/dist/esm/
|
279838
|
-
var
|
279719
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/key.js
|
279720
|
+
var isUpKey = (key2) => key2.name === "up" || key2.name === "k" || key2.ctrl && key2.name === "p";
|
279721
|
+
var isDownKey = (key2) => key2.name === "down" || key2.name === "j" || key2.ctrl && key2.name === "n";
|
279722
|
+
var isBackspaceKey = (key2) => key2.name === "backspace";
|
279723
|
+
var isNumberKey = (key2) => "123456789".includes(key2.name);
|
279724
|
+
var isEnterKey2 = (key2) => key2.name === "enter" || key2.name === "return";
|
279725
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/errors.js
|
279726
|
+
class AbortPromptError2 extends Error {
|
279727
|
+
name = "AbortPromptError";
|
279728
|
+
message = "Prompt was aborted";
|
279729
|
+
constructor(options) {
|
279730
|
+
super();
|
279731
|
+
this.cause = options?.cause;
|
279732
|
+
}
|
279733
|
+
}
|
279734
|
+
|
279735
|
+
class CancelPromptError2 extends Error {
|
279736
|
+
name = "CancelPromptError";
|
279737
|
+
message = "Prompt was canceled";
|
279738
|
+
}
|
279739
|
+
|
279740
|
+
class ExitPromptError2 extends Error {
|
279741
|
+
name = "ExitPromptError";
|
279742
|
+
}
|
279743
|
+
|
279744
|
+
class HookError2 extends Error {
|
279745
|
+
name = "HookError";
|
279746
|
+
}
|
279747
|
+
|
279748
|
+
class ValidationError2 extends Error {
|
279749
|
+
name = "ValidationError";
|
279750
|
+
}
|
279751
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/use-prefix.js
|
279752
|
+
import { AsyncResource as AsyncResource5 } from "node:async_hooks";
|
279753
|
+
|
279754
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/hook-engine.js
|
279755
|
+
import { AsyncLocalStorage as AsyncLocalStorage2, AsyncResource as AsyncResource4 } from "node:async_hooks";
|
279756
|
+
var hookStorage2 = new AsyncLocalStorage2;
|
279757
|
+
function createStore2(rl) {
|
279758
|
+
const store = {
|
279759
|
+
rl,
|
279760
|
+
hooks: [],
|
279761
|
+
hooksCleanup: [],
|
279762
|
+
hooksEffect: [],
|
279763
|
+
index: 0,
|
279764
|
+
handleChange() {
|
279765
|
+
}
|
279766
|
+
};
|
279767
|
+
return store;
|
279768
|
+
}
|
279769
|
+
function withHooks2(rl, cb) {
|
279770
|
+
const store = createStore2(rl);
|
279771
|
+
return hookStorage2.run(store, () => {
|
279772
|
+
function cycle(render) {
|
279773
|
+
store.handleChange = () => {
|
279774
|
+
store.index = 0;
|
279775
|
+
render();
|
279776
|
+
};
|
279777
|
+
store.handleChange();
|
279778
|
+
}
|
279779
|
+
return cb(cycle);
|
279780
|
+
});
|
279781
|
+
}
|
279782
|
+
function getStore2() {
|
279783
|
+
const store = hookStorage2.getStore();
|
279784
|
+
if (!store) {
|
279785
|
+
throw new HookError2("[Inquirer] Hook functions can only be called from within a prompt");
|
279786
|
+
}
|
279787
|
+
return store;
|
279788
|
+
}
|
279789
|
+
function readline3() {
|
279790
|
+
return getStore2().rl;
|
279791
|
+
}
|
279792
|
+
function withUpdates2(fn) {
|
279793
|
+
const wrapped = (...args) => {
|
279794
|
+
const store = getStore2();
|
279795
|
+
let shouldUpdate = false;
|
279796
|
+
const oldHandleChange = store.handleChange;
|
279797
|
+
store.handleChange = () => {
|
279798
|
+
shouldUpdate = true;
|
279799
|
+
};
|
279800
|
+
const returnValue = fn(...args);
|
279801
|
+
if (shouldUpdate) {
|
279802
|
+
oldHandleChange();
|
279803
|
+
}
|
279804
|
+
store.handleChange = oldHandleChange;
|
279805
|
+
return returnValue;
|
279806
|
+
};
|
279807
|
+
return AsyncResource4.bind(wrapped);
|
279808
|
+
}
|
279809
|
+
function withPointer2(cb) {
|
279810
|
+
const store = getStore2();
|
279811
|
+
const { index } = store;
|
279812
|
+
const pointer = {
|
279813
|
+
get() {
|
279814
|
+
return store.hooks[index];
|
279815
|
+
},
|
279816
|
+
set(value4) {
|
279817
|
+
store.hooks[index] = value4;
|
279818
|
+
},
|
279819
|
+
initialized: index in store.hooks
|
279820
|
+
};
|
279821
|
+
const returnValue = cb(pointer);
|
279822
|
+
store.index++;
|
279823
|
+
return returnValue;
|
279824
|
+
}
|
279825
|
+
function handleChange2() {
|
279826
|
+
getStore2().handleChange();
|
279827
|
+
}
|
279828
|
+
var effectScheduler2 = {
|
279829
|
+
queue(cb) {
|
279830
|
+
const store = getStore2();
|
279831
|
+
const { index } = store;
|
279832
|
+
store.hooksEffect.push(() => {
|
279833
|
+
store.hooksCleanup[index]?.();
|
279834
|
+
const cleanFn = cb(readline3());
|
279835
|
+
if (cleanFn != null && typeof cleanFn !== "function") {
|
279836
|
+
throw new ValidationError2("useEffect return value must be a cleanup function or nothing.");
|
279837
|
+
}
|
279838
|
+
store.hooksCleanup[index] = cleanFn;
|
279839
|
+
});
|
279840
|
+
},
|
279841
|
+
run() {
|
279842
|
+
const store = getStore2();
|
279843
|
+
withUpdates2(() => {
|
279844
|
+
store.hooksEffect.forEach((effect) => {
|
279845
|
+
effect();
|
279846
|
+
});
|
279847
|
+
store.hooksEffect.length = 0;
|
279848
|
+
})();
|
279849
|
+
},
|
279850
|
+
clearAll() {
|
279851
|
+
const store = getStore2();
|
279852
|
+
store.hooksCleanup.forEach((cleanFn) => {
|
279853
|
+
cleanFn?.();
|
279854
|
+
});
|
279855
|
+
store.hooksEffect.length = 0;
|
279856
|
+
store.hooksCleanup.length = 0;
|
279857
|
+
}
|
279858
|
+
};
|
279859
|
+
|
279860
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/use-state.js
|
279861
|
+
function useState2(defaultValue) {
|
279862
|
+
return withPointer2((pointer) => {
|
279863
|
+
const setFn = (newValue) => {
|
279864
|
+
if (pointer.get() !== newValue) {
|
279865
|
+
pointer.set(newValue);
|
279866
|
+
handleChange2();
|
279867
|
+
}
|
279868
|
+
};
|
279869
|
+
if (pointer.initialized) {
|
279870
|
+
return [pointer.get(), setFn];
|
279871
|
+
}
|
279872
|
+
const value4 = typeof defaultValue === "function" ? defaultValue() : defaultValue;
|
279873
|
+
pointer.set(value4);
|
279874
|
+
return [value4, setFn];
|
279875
|
+
});
|
279876
|
+
}
|
279877
|
+
|
279878
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/use-effect.js
|
279879
|
+
function useEffect2(cb, depArray) {
|
279880
|
+
withPointer2((pointer) => {
|
279881
|
+
const oldDeps = pointer.get();
|
279882
|
+
const hasChanged = !Array.isArray(oldDeps) || depArray.some((dep, i6) => !Object.is(dep, oldDeps[i6]));
|
279883
|
+
if (hasChanged) {
|
279884
|
+
effectScheduler2.queue(cb);
|
279885
|
+
}
|
279886
|
+
pointer.set(depArray);
|
279887
|
+
});
|
279888
|
+
}
|
279889
|
+
|
279890
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/theme.js
|
279891
|
+
var import_yoctocolors_cjs2 = __toESM(require_yoctocolors_cjs(), 1);
|
279892
|
+
var defaultTheme2 = {
|
279893
|
+
prefix: {
|
279894
|
+
idle: import_yoctocolors_cjs2.default.blue("?"),
|
279895
|
+
done: import_yoctocolors_cjs2.default.green(esm_default.tick)
|
279896
|
+
},
|
279897
|
+
spinner: {
|
279898
|
+
interval: 80,
|
279899
|
+
frames: ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"].map((frame) => import_yoctocolors_cjs2.default.yellow(frame))
|
279900
|
+
},
|
279901
|
+
style: {
|
279902
|
+
answer: import_yoctocolors_cjs2.default.cyan,
|
279903
|
+
message: import_yoctocolors_cjs2.default.bold,
|
279904
|
+
error: (text2) => import_yoctocolors_cjs2.default.red(`> ${text2}`),
|
279905
|
+
defaultAnswer: (text2) => import_yoctocolors_cjs2.default.dim(`(${text2})`),
|
279906
|
+
help: import_yoctocolors_cjs2.default.dim,
|
279907
|
+
highlight: import_yoctocolors_cjs2.default.cyan,
|
279908
|
+
key: (text2) => import_yoctocolors_cjs2.default.cyan(import_yoctocolors_cjs2.default.bold(`<${text2}>`))
|
279909
|
+
}
|
279910
|
+
};
|
279911
|
+
|
279912
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/make-theme.js
|
279913
|
+
function isPlainObject3(value4) {
|
279914
|
+
if (typeof value4 !== "object" || value4 === null)
|
279915
|
+
return false;
|
279916
|
+
let proto = value4;
|
279917
|
+
while (Object.getPrototypeOf(proto) !== null) {
|
279918
|
+
proto = Object.getPrototypeOf(proto);
|
279919
|
+
}
|
279920
|
+
return Object.getPrototypeOf(value4) === proto;
|
279921
|
+
}
|
279922
|
+
function deepMerge3(...objects) {
|
279923
|
+
const output = {};
|
279924
|
+
for (const obj of objects) {
|
279925
|
+
for (const [key2, value4] of Object.entries(obj)) {
|
279926
|
+
const prevValue = output[key2];
|
279927
|
+
output[key2] = isPlainObject3(prevValue) && isPlainObject3(value4) ? deepMerge3(prevValue, value4) : value4;
|
279928
|
+
}
|
279929
|
+
}
|
279930
|
+
return output;
|
279931
|
+
}
|
279932
|
+
function makeTheme2(...themes) {
|
279933
|
+
const themesToMerge = [
|
279934
|
+
defaultTheme2,
|
279935
|
+
...themes.filter((theme) => theme != null)
|
279936
|
+
];
|
279937
|
+
return deepMerge3(...themesToMerge);
|
279938
|
+
}
|
279939
|
+
|
279940
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/use-prefix.js
|
279941
|
+
function usePrefix2({ status = "idle", theme }) {
|
279942
|
+
const [showLoader, setShowLoader] = useState2(false);
|
279943
|
+
const [tick, setTick] = useState2(0);
|
279944
|
+
const { prefix, spinner: spinner2 } = makeTheme2(theme);
|
279945
|
+
useEffect2(() => {
|
279946
|
+
if (status === "loading") {
|
279947
|
+
let tickInterval;
|
279948
|
+
let inc = -1;
|
279949
|
+
const delayTimeout = setTimeout(AsyncResource5.bind(() => {
|
279950
|
+
setShowLoader(true);
|
279951
|
+
tickInterval = setInterval(AsyncResource5.bind(() => {
|
279952
|
+
inc = inc + 1;
|
279953
|
+
setTick(inc % spinner2.frames.length);
|
279954
|
+
}), spinner2.interval);
|
279955
|
+
}), 300);
|
279956
|
+
return () => {
|
279957
|
+
clearTimeout(delayTimeout);
|
279958
|
+
clearInterval(tickInterval);
|
279959
|
+
};
|
279960
|
+
} else {
|
279961
|
+
setShowLoader(false);
|
279962
|
+
}
|
279963
|
+
}, [status]);
|
279964
|
+
if (showLoader) {
|
279965
|
+
return spinner2.frames[tick];
|
279966
|
+
}
|
279967
|
+
const iconName = status === "loading" ? "idle" : status;
|
279968
|
+
return typeof prefix === "string" ? prefix : prefix[iconName] ?? prefix["idle"];
|
279969
|
+
}
|
279970
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/use-memo.js
|
279971
|
+
function useMemo(fn, dependencies) {
|
279972
|
+
return withPointer2((pointer) => {
|
279973
|
+
const prev = pointer.get();
|
279974
|
+
if (!prev || prev.dependencies.length !== dependencies.length || prev.dependencies.some((dep, i6) => dep !== dependencies[i6])) {
|
279975
|
+
const value4 = fn();
|
279976
|
+
pointer.set({ value: value4, dependencies });
|
279977
|
+
return value4;
|
279978
|
+
}
|
279979
|
+
return prev.value;
|
279980
|
+
});
|
279981
|
+
}
|
279982
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/use-ref.js
|
279983
|
+
function useRef2(val) {
|
279984
|
+
return useState2({ current: val })[0];
|
279985
|
+
}
|
279986
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/use-keypress.js
|
279987
|
+
function useKeypress2(userHandler) {
|
279988
|
+
const signal = useRef2(userHandler);
|
279989
|
+
signal.current = userHandler;
|
279990
|
+
useEffect2((rl) => {
|
279991
|
+
let ignore = false;
|
279992
|
+
const handler = withUpdates2((_input, event) => {
|
279993
|
+
if (ignore)
|
279994
|
+
return;
|
279995
|
+
signal.current(event, rl);
|
279996
|
+
});
|
279997
|
+
rl.input.on("keypress", handler);
|
279998
|
+
return () => {
|
279999
|
+
ignore = true;
|
280000
|
+
rl.input.removeListener("keypress", handler);
|
280001
|
+
};
|
280002
|
+
}, []);
|
280003
|
+
}
|
280004
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/utils.js
|
280005
|
+
var import_cli_width2 = __toESM(require_cli_width(), 1);
|
280006
|
+
var import_wrap_ansi2 = __toESM(require_wrap_ansi(), 1);
|
280007
|
+
function breakLines2(content, width) {
|
280008
|
+
return content.split(`
|
280009
|
+
`).flatMap((line) => import_wrap_ansi2.default(line, width, { trim: false, hard: true }).split(`
|
280010
|
+
`).map((str) => str.trimEnd())).join(`
|
280011
|
+
`);
|
280012
|
+
}
|
280013
|
+
function readlineWidth2() {
|
280014
|
+
return import_cli_width2.default({ defaultWidth: 80, output: readline3().output });
|
280015
|
+
}
|
280016
|
+
|
280017
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/pagination/lines.js
|
280018
|
+
function split2(content, width) {
|
280019
|
+
return breakLines2(content, width).split(`
|
280020
|
+
`);
|
280021
|
+
}
|
280022
|
+
function rotate(count, items) {
|
280023
|
+
const max = items.length;
|
280024
|
+
const offset = (count % max + max) % max;
|
280025
|
+
return [...items.slice(offset), ...items.slice(0, offset)];
|
280026
|
+
}
|
280027
|
+
function lines({ items, width, renderItem, active, position: requested, pageSize }) {
|
280028
|
+
const layouts = items.map((item, index) => ({
|
280029
|
+
item,
|
280030
|
+
index,
|
280031
|
+
isActive: index === active
|
280032
|
+
}));
|
280033
|
+
const layoutsInPage = rotate(active - requested, layouts).slice(0, pageSize);
|
280034
|
+
const renderItemAt = (index) => layoutsInPage[index] == null ? [] : split2(renderItem(layoutsInPage[index]), width);
|
280035
|
+
const pageBuffer = Array.from({ length: pageSize });
|
280036
|
+
const activeItem = renderItemAt(requested).slice(0, pageSize);
|
280037
|
+
const position = requested + activeItem.length <= pageSize ? requested : pageSize - activeItem.length;
|
280038
|
+
pageBuffer.splice(position, activeItem.length, ...activeItem);
|
280039
|
+
let bufferPointer = position + activeItem.length;
|
280040
|
+
let layoutPointer = requested + 1;
|
280041
|
+
while (bufferPointer < pageSize && layoutPointer < layoutsInPage.length) {
|
280042
|
+
for (const line of renderItemAt(layoutPointer)) {
|
280043
|
+
pageBuffer[bufferPointer++] = line;
|
280044
|
+
if (bufferPointer >= pageSize)
|
280045
|
+
break;
|
280046
|
+
}
|
280047
|
+
layoutPointer++;
|
280048
|
+
}
|
280049
|
+
bufferPointer = position - 1;
|
280050
|
+
layoutPointer = requested - 1;
|
280051
|
+
while (bufferPointer >= 0 && layoutPointer >= 0) {
|
280052
|
+
for (const line of renderItemAt(layoutPointer).reverse()) {
|
280053
|
+
pageBuffer[bufferPointer--] = line;
|
280054
|
+
if (bufferPointer < 0)
|
280055
|
+
break;
|
280056
|
+
}
|
280057
|
+
layoutPointer--;
|
280058
|
+
}
|
280059
|
+
return pageBuffer.filter((line) => typeof line === "string");
|
280060
|
+
}
|
280061
|
+
|
280062
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/pagination/position.js
|
280063
|
+
function finite({ active, pageSize, total }) {
|
280064
|
+
const middle = Math.floor(pageSize / 2);
|
280065
|
+
if (total <= pageSize || active < middle)
|
280066
|
+
return active;
|
280067
|
+
if (active >= total - middle)
|
280068
|
+
return active + pageSize - total;
|
280069
|
+
return middle;
|
280070
|
+
}
|
280071
|
+
function infinite({ active, lastActive, total, pageSize, pointer }) {
|
280072
|
+
if (total <= pageSize)
|
280073
|
+
return active;
|
280074
|
+
if (lastActive < active && active - lastActive < pageSize) {
|
280075
|
+
return Math.min(Math.floor(pageSize / 2), pointer + active - lastActive);
|
280076
|
+
}
|
280077
|
+
return pointer;
|
280078
|
+
}
|
280079
|
+
|
280080
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/pagination/use-pagination.js
|
280081
|
+
function usePagination({ items, active, renderItem, pageSize, loop = true }) {
|
280082
|
+
const state = useRef2({ position: 0, lastActive: 0 });
|
280083
|
+
const position = loop ? infinite({
|
280084
|
+
active,
|
280085
|
+
lastActive: state.current.lastActive,
|
280086
|
+
total: items.length,
|
280087
|
+
pageSize,
|
280088
|
+
pointer: state.current.position
|
280089
|
+
}) : finite({
|
280090
|
+
active,
|
280091
|
+
total: items.length,
|
280092
|
+
pageSize
|
280093
|
+
});
|
280094
|
+
state.current.position = position;
|
280095
|
+
state.current.lastActive = active;
|
280096
|
+
return lines({
|
280097
|
+
items,
|
280098
|
+
width: readlineWidth2(),
|
280099
|
+
renderItem,
|
280100
|
+
active,
|
280101
|
+
position,
|
280102
|
+
pageSize
|
280103
|
+
}).join(`
|
280104
|
+
`);
|
280105
|
+
}
|
280106
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
|
280107
|
+
var import_mute_stream2 = __toESM(require_lib(), 1);
|
280108
|
+
import * as readline4 from "node:readline";
|
280109
|
+
import { AsyncResource as AsyncResource6 } from "node:async_hooks";
|
280110
|
+
|
280111
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/screen-manager.js
|
279839
280112
|
var import_ansi_escapes2 = __toESM(require_ansi_escapes(), 1);
|
280113
|
+
import { stripVTControlCharacters as stripVTControlCharacters3 } from "node:util";
|
280114
|
+
var height2 = (content) => content.split(`
|
280115
|
+
`).length;
|
280116
|
+
var lastLine2 = (content) => content.split(`
|
280117
|
+
`).pop() ?? "";
|
280118
|
+
function cursorDown2(n6) {
|
280119
|
+
return n6 > 0 ? import_ansi_escapes2.default.cursorDown(n6) : "";
|
280120
|
+
}
|
280121
|
+
|
280122
|
+
class ScreenManager2 {
|
280123
|
+
rl;
|
280124
|
+
height = 0;
|
280125
|
+
extraLinesUnderPrompt = 0;
|
280126
|
+
cursorPos;
|
280127
|
+
constructor(rl) {
|
280128
|
+
this.rl = rl;
|
280129
|
+
this.rl = rl;
|
280130
|
+
this.cursorPos = rl.getCursorPos();
|
280131
|
+
}
|
280132
|
+
write(content) {
|
280133
|
+
this.rl.output.unmute();
|
280134
|
+
this.rl.output.write(content);
|
280135
|
+
this.rl.output.mute();
|
280136
|
+
}
|
280137
|
+
render(content, bottomContent = "") {
|
280138
|
+
const promptLine = lastLine2(content);
|
280139
|
+
const rawPromptLine = stripVTControlCharacters3(promptLine);
|
280140
|
+
let prompt = rawPromptLine;
|
280141
|
+
if (this.rl.line.length > 0) {
|
280142
|
+
prompt = prompt.slice(0, -this.rl.line.length);
|
280143
|
+
}
|
280144
|
+
this.rl.setPrompt(prompt);
|
280145
|
+
this.cursorPos = this.rl.getCursorPos();
|
280146
|
+
const width = readlineWidth2();
|
280147
|
+
content = breakLines2(content, width);
|
280148
|
+
bottomContent = breakLines2(bottomContent, width);
|
280149
|
+
if (rawPromptLine.length % width === 0) {
|
280150
|
+
content += `
|
280151
|
+
`;
|
280152
|
+
}
|
280153
|
+
let output = content + (bottomContent ? `
|
280154
|
+
` + bottomContent : "");
|
280155
|
+
const promptLineUpDiff = Math.floor(rawPromptLine.length / width) - this.cursorPos.rows;
|
280156
|
+
const bottomContentHeight = promptLineUpDiff + (bottomContent ? height2(bottomContent) : 0);
|
280157
|
+
if (bottomContentHeight > 0)
|
280158
|
+
output += import_ansi_escapes2.default.cursorUp(bottomContentHeight);
|
280159
|
+
output += import_ansi_escapes2.default.cursorTo(this.cursorPos.cols);
|
280160
|
+
this.write(cursorDown2(this.extraLinesUnderPrompt) + import_ansi_escapes2.default.eraseLines(this.height) + output);
|
280161
|
+
this.extraLinesUnderPrompt = bottomContentHeight;
|
280162
|
+
this.height = height2(output);
|
280163
|
+
}
|
280164
|
+
checkCursorPos() {
|
280165
|
+
const cursorPos = this.rl.getCursorPos();
|
280166
|
+
if (cursorPos.cols !== this.cursorPos.cols) {
|
280167
|
+
this.write(import_ansi_escapes2.default.cursorTo(cursorPos.cols));
|
280168
|
+
this.cursorPos = cursorPos;
|
280169
|
+
}
|
280170
|
+
}
|
280171
|
+
done({ clearContent }) {
|
280172
|
+
this.rl.setPrompt("");
|
280173
|
+
let output = cursorDown2(this.extraLinesUnderPrompt);
|
280174
|
+
output += clearContent ? import_ansi_escapes2.default.eraseLines(this.height) : `
|
280175
|
+
`;
|
280176
|
+
output += import_ansi_escapes2.default.cursorShow;
|
280177
|
+
this.write(output);
|
280178
|
+
this.rl.close();
|
280179
|
+
}
|
280180
|
+
}
|
280181
|
+
|
280182
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/promise-polyfill.js
|
280183
|
+
class PromisePolyfill2 extends Promise {
|
280184
|
+
static withResolver() {
|
280185
|
+
let resolve5;
|
280186
|
+
let reject;
|
280187
|
+
const promise = new Promise((res, rej) => {
|
280188
|
+
resolve5 = res;
|
280189
|
+
reject = rej;
|
280190
|
+
});
|
280191
|
+
return { promise, resolve: resolve5, reject };
|
280192
|
+
}
|
280193
|
+
}
|
280194
|
+
|
280195
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
|
280196
|
+
function getCallSites2() {
|
280197
|
+
const _prepareStackTrace = Error.prepareStackTrace;
|
280198
|
+
try {
|
280199
|
+
let result = [];
|
280200
|
+
Error.prepareStackTrace = (_5, callSites) => {
|
280201
|
+
const callSitesWithoutCurrent = callSites.slice(1);
|
280202
|
+
result = callSitesWithoutCurrent;
|
280203
|
+
return callSitesWithoutCurrent;
|
280204
|
+
};
|
280205
|
+
new Error().stack;
|
280206
|
+
return result;
|
280207
|
+
} finally {
|
280208
|
+
Error.prepareStackTrace = _prepareStackTrace;
|
280209
|
+
}
|
280210
|
+
}
|
280211
|
+
function createPrompt2(view) {
|
280212
|
+
const callSites = getCallSites2();
|
280213
|
+
const callerFilename = callSites[1]?.getFileName?.();
|
280214
|
+
const prompt = (config3, context = {}) => {
|
280215
|
+
const { input = process.stdin, signal } = context;
|
280216
|
+
const cleanups = new Set;
|
280217
|
+
const output = new import_mute_stream2.default;
|
280218
|
+
output.pipe(context.output ?? process.stdout);
|
280219
|
+
const rl = readline4.createInterface({
|
280220
|
+
terminal: true,
|
280221
|
+
input,
|
280222
|
+
output
|
280223
|
+
});
|
280224
|
+
const screen = new ScreenManager2(rl);
|
280225
|
+
const { promise, resolve: resolve5, reject } = PromisePolyfill2.withResolver();
|
280226
|
+
const cancel3 = () => reject(new CancelPromptError2);
|
280227
|
+
if (signal) {
|
280228
|
+
const abort = () => reject(new AbortPromptError2({ cause: signal.reason }));
|
280229
|
+
if (signal.aborted) {
|
280230
|
+
abort();
|
280231
|
+
return Object.assign(promise, { cancel: cancel3 });
|
280232
|
+
}
|
280233
|
+
signal.addEventListener("abort", abort);
|
280234
|
+
cleanups.add(() => signal.removeEventListener("abort", abort));
|
280235
|
+
}
|
280236
|
+
cleanups.add(onExit((code2, signal2) => {
|
280237
|
+
reject(new ExitPromptError2(`User force closed the prompt with ${code2} ${signal2}`));
|
280238
|
+
}));
|
280239
|
+
const checkCursorPos = () => screen.checkCursorPos();
|
280240
|
+
rl.input.on("keypress", checkCursorPos);
|
280241
|
+
cleanups.add(() => rl.input.removeListener("keypress", checkCursorPos));
|
280242
|
+
return withHooks2(rl, (cycle) => {
|
280243
|
+
const hooksCleanup = AsyncResource6.bind(() => effectScheduler2.clearAll());
|
280244
|
+
rl.on("close", hooksCleanup);
|
280245
|
+
cleanups.add(() => rl.removeListener("close", hooksCleanup));
|
280246
|
+
cycle(() => {
|
280247
|
+
try {
|
280248
|
+
const nextView = view(config3, (value4) => {
|
280249
|
+
setImmediate(() => resolve5(value4));
|
280250
|
+
});
|
280251
|
+
if (nextView === undefined) {
|
280252
|
+
throw new Error(`Prompt functions must return a string.
|
280253
|
+
at ${callerFilename}`);
|
280254
|
+
}
|
280255
|
+
const [content, bottomContent] = typeof nextView === "string" ? [nextView] : nextView;
|
280256
|
+
screen.render(content, bottomContent);
|
280257
|
+
effectScheduler2.run();
|
280258
|
+
} catch (error5) {
|
280259
|
+
reject(error5);
|
280260
|
+
}
|
280261
|
+
});
|
280262
|
+
return Object.assign(promise.then((answer) => {
|
280263
|
+
effectScheduler2.clearAll();
|
280264
|
+
return answer;
|
280265
|
+
}, (error5) => {
|
280266
|
+
effectScheduler2.clearAll();
|
280267
|
+
throw error5;
|
280268
|
+
}).finally(() => {
|
280269
|
+
cleanups.forEach((cleanup) => cleanup());
|
280270
|
+
screen.done({ clearContent: Boolean(context.clearPromptOnDone) });
|
280271
|
+
output.end();
|
280272
|
+
}).then(() => promise), { cancel: cancel3 });
|
280273
|
+
});
|
280274
|
+
};
|
280275
|
+
return prompt;
|
280276
|
+
}
|
280277
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/Separator.js
|
280278
|
+
var import_yoctocolors_cjs3 = __toESM(require_yoctocolors_cjs(), 1);
|
280279
|
+
class Separator {
|
280280
|
+
separator = import_yoctocolors_cjs3.default.dim(Array.from({ length: 15 }).join(esm_default.line));
|
280281
|
+
type = "separator";
|
280282
|
+
constructor(separator) {
|
280283
|
+
if (separator) {
|
280284
|
+
this.separator = separator;
|
280285
|
+
}
|
280286
|
+
}
|
280287
|
+
static isSeparator(choice) {
|
280288
|
+
return Boolean(choice && typeof choice === "object" && "type" in choice && choice.type === "separator");
|
280289
|
+
}
|
280290
|
+
}
|
280291
|
+
// ../../node_modules/@inquirer/select/dist/esm/index.js
|
280292
|
+
var import_yoctocolors_cjs4 = __toESM(require_yoctocolors_cjs(), 1);
|
280293
|
+
var import_ansi_escapes3 = __toESM(require_ansi_escapes(), 1);
|
279840
280294
|
var selectTheme = {
|
279841
280295
|
icon: { cursor: esm_default.pointer },
|
279842
280296
|
style: {
|
279843
|
-
disabled: (text2) =>
|
279844
|
-
description: (text2) =>
|
280297
|
+
disabled: (text2) => import_yoctocolors_cjs4.default.dim(`- ${text2}`),
|
280298
|
+
description: (text2) => import_yoctocolors_cjs4.default.cyan(text2)
|
279845
280299
|
},
|
279846
280300
|
helpMode: "auto"
|
279847
280301
|
};
|
@@ -279870,19 +280324,19 @@ function normalizeChoices(choices) {
|
|
279870
280324
|
};
|
279871
280325
|
});
|
279872
280326
|
}
|
279873
|
-
var esm_default2 =
|
280327
|
+
var esm_default2 = createPrompt2((config3, done) => {
|
279874
280328
|
const { loop = true, pageSize = 7 } = config3;
|
279875
|
-
const firstRender =
|
279876
|
-
const theme =
|
279877
|
-
const [status, setStatus] =
|
279878
|
-
const prefix =
|
279879
|
-
const searchTimeoutRef =
|
280329
|
+
const firstRender = useRef2(true);
|
280330
|
+
const theme = makeTheme2(selectTheme, config3.theme);
|
280331
|
+
const [status, setStatus] = useState2("idle");
|
280332
|
+
const prefix = usePrefix2({ status, theme });
|
280333
|
+
const searchTimeoutRef = useRef2();
|
279880
280334
|
const items = useMemo(() => normalizeChoices(config3.choices), [config3.choices]);
|
279881
280335
|
const bounds = useMemo(() => {
|
279882
280336
|
const first = items.findIndex(isSelectable);
|
279883
280337
|
const last = items.findLastIndex(isSelectable);
|
279884
280338
|
if (first === -1) {
|
279885
|
-
throw new
|
280339
|
+
throw new ValidationError2("[select prompt] No selectable choices. All choices are disabled.");
|
279886
280340
|
}
|
279887
280341
|
return { first, last };
|
279888
280342
|
}, [items]);
|
@@ -279891,31 +280345,31 @@ var esm_default2 = createPrompt((config3, done) => {
|
|
279891
280345
|
return -1;
|
279892
280346
|
return items.findIndex((item) => isSelectable(item) && item.value === config3.default);
|
279893
280347
|
}, [config3.default, items]);
|
279894
|
-
const [active, setActive] =
|
280348
|
+
const [active, setActive] = useState2(defaultItemIndex === -1 ? bounds.first : defaultItemIndex);
|
279895
280349
|
const selectedChoice = items[active];
|
279896
|
-
|
280350
|
+
useKeypress2((key3, rl) => {
|
279897
280351
|
clearTimeout(searchTimeoutRef.current);
|
279898
|
-
if (
|
280352
|
+
if (isEnterKey2(key3)) {
|
279899
280353
|
setStatus("done");
|
279900
280354
|
done(selectedChoice.value);
|
279901
|
-
} else if (isUpKey(
|
280355
|
+
} else if (isUpKey(key3) || isDownKey(key3)) {
|
279902
280356
|
rl.clearLine(0);
|
279903
|
-
if (loop || isUpKey(
|
279904
|
-
const offset = isUpKey(
|
280357
|
+
if (loop || isUpKey(key3) && active !== bounds.first || isDownKey(key3) && active !== bounds.last) {
|
280358
|
+
const offset = isUpKey(key3) ? -1 : 1;
|
279905
280359
|
let next = active;
|
279906
280360
|
do {
|
279907
280361
|
next = (next + offset + items.length) % items.length;
|
279908
280362
|
} while (!isSelectable(items[next]));
|
279909
280363
|
setActive(next);
|
279910
280364
|
}
|
279911
|
-
} else if (isNumberKey(
|
280365
|
+
} else if (isNumberKey(key3)) {
|
279912
280366
|
rl.clearLine(0);
|
279913
|
-
const position = Number(
|
280367
|
+
const position = Number(key3.name) - 1;
|
279914
280368
|
const item = items[position];
|
279915
280369
|
if (item != null && isSelectable(item)) {
|
279916
280370
|
setActive(position);
|
279917
280371
|
}
|
279918
|
-
} else if (isBackspaceKey(
|
280372
|
+
} else if (isBackspaceKey(key3)) {
|
279919
280373
|
rl.clearLine(0);
|
279920
280374
|
} else {
|
279921
280375
|
const searchTerm = rl.line.toLowerCase();
|
@@ -279932,7 +280386,7 @@ var esm_default2 = createPrompt((config3, done) => {
|
|
279932
280386
|
}, 700);
|
279933
280387
|
}
|
279934
280388
|
});
|
279935
|
-
|
280389
|
+
useEffect2(() => () => {
|
279936
280390
|
clearTimeout(searchTimeoutRef.current);
|
279937
280391
|
}, []);
|
279938
280392
|
const message = theme.style.message(config3.message, status);
|
@@ -279971,7 +280425,7 @@ ${theme.style.help("(Use arrow keys to reveal more choices)")}`;
|
|
279971
280425
|
const choiceDescription = selectedChoice.description ? `
|
279972
280426
|
${theme.style.description(selectedChoice.description)}` : ``;
|
279973
280427
|
return `${[prefix, message, helpTipTop].filter(Boolean).join(" ")}
|
279974
|
-
${page}${helpTipBottom}${choiceDescription}${
|
280428
|
+
${page}${helpTipBottom}${choiceDescription}${import_ansi_escapes3.default.cursorHide}`;
|
279975
280429
|
});
|
279976
280430
|
|
279977
280431
|
// src/prompts/smart-contract-set/subgraph.prompt.ts
|
@@ -280311,13 +280765,13 @@ var esm_default3 = createPrompt((config3, done) => {
|
|
280311
280765
|
const [value4, setValue] = useState("");
|
280312
280766
|
const theme = makeTheme(config3.theme);
|
280313
280767
|
const prefix = usePrefix({ status, theme });
|
280314
|
-
useKeypress((
|
280315
|
-
if (isEnterKey(
|
280768
|
+
useKeypress((key3, rl) => {
|
280769
|
+
if (isEnterKey(key3)) {
|
280316
280770
|
const answer = getBooleanValue(value4, config3.default);
|
280317
280771
|
setValue(transformer(answer));
|
280318
280772
|
setStatus("done");
|
280319
280773
|
done(answer);
|
280320
|
-
} else if (
|
280774
|
+
} else if (key3.name === "tab") {
|
280321
280775
|
const answer = boolToString(!getBooleanValue(value4, config3.default));
|
280322
280776
|
rl.clearLine(0);
|
280323
280777
|
rl.write(answer);
|
@@ -280337,23 +280791,478 @@ var esm_default3 = createPrompt((config3, done) => {
|
|
280337
280791
|
return `${prefix} ${message}${defaultValue} ${formattedValue}`;
|
280338
280792
|
});
|
280339
280793
|
|
280794
|
+
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/key.js
|
280795
|
+
var isBackspaceKey2 = (key3) => key3.name === "backspace";
|
280796
|
+
var isEnterKey3 = (key3) => key3.name === "enter" || key3.name === "return";
|
280797
|
+
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/errors.js
|
280798
|
+
class AbortPromptError3 extends Error {
|
280799
|
+
name = "AbortPromptError";
|
280800
|
+
message = "Prompt was aborted";
|
280801
|
+
constructor(options) {
|
280802
|
+
super();
|
280803
|
+
this.cause = options?.cause;
|
280804
|
+
}
|
280805
|
+
}
|
280806
|
+
|
280807
|
+
class CancelPromptError3 extends Error {
|
280808
|
+
name = "CancelPromptError";
|
280809
|
+
message = "Prompt was canceled";
|
280810
|
+
}
|
280811
|
+
|
280812
|
+
class ExitPromptError3 extends Error {
|
280813
|
+
name = "ExitPromptError";
|
280814
|
+
}
|
280815
|
+
|
280816
|
+
class HookError3 extends Error {
|
280817
|
+
name = "HookError";
|
280818
|
+
}
|
280819
|
+
|
280820
|
+
class ValidationError3 extends Error {
|
280821
|
+
name = "ValidationError";
|
280822
|
+
}
|
280823
|
+
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/use-prefix.js
|
280824
|
+
import { AsyncResource as AsyncResource8 } from "node:async_hooks";
|
280825
|
+
|
280826
|
+
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/hook-engine.js
|
280827
|
+
import { AsyncLocalStorage as AsyncLocalStorage3, AsyncResource as AsyncResource7 } from "node:async_hooks";
|
280828
|
+
var hookStorage3 = new AsyncLocalStorage3;
|
280829
|
+
function createStore3(rl) {
|
280830
|
+
const store = {
|
280831
|
+
rl,
|
280832
|
+
hooks: [],
|
280833
|
+
hooksCleanup: [],
|
280834
|
+
hooksEffect: [],
|
280835
|
+
index: 0,
|
280836
|
+
handleChange() {
|
280837
|
+
}
|
280838
|
+
};
|
280839
|
+
return store;
|
280840
|
+
}
|
280841
|
+
function withHooks3(rl, cb) {
|
280842
|
+
const store = createStore3(rl);
|
280843
|
+
return hookStorage3.run(store, () => {
|
280844
|
+
function cycle(render) {
|
280845
|
+
store.handleChange = () => {
|
280846
|
+
store.index = 0;
|
280847
|
+
render();
|
280848
|
+
};
|
280849
|
+
store.handleChange();
|
280850
|
+
}
|
280851
|
+
return cb(cycle);
|
280852
|
+
});
|
280853
|
+
}
|
280854
|
+
function getStore3() {
|
280855
|
+
const store = hookStorage3.getStore();
|
280856
|
+
if (!store) {
|
280857
|
+
throw new HookError3("[Inquirer] Hook functions can only be called from within a prompt");
|
280858
|
+
}
|
280859
|
+
return store;
|
280860
|
+
}
|
280861
|
+
function readline5() {
|
280862
|
+
return getStore3().rl;
|
280863
|
+
}
|
280864
|
+
function withUpdates3(fn) {
|
280865
|
+
const wrapped = (...args) => {
|
280866
|
+
const store = getStore3();
|
280867
|
+
let shouldUpdate = false;
|
280868
|
+
const oldHandleChange = store.handleChange;
|
280869
|
+
store.handleChange = () => {
|
280870
|
+
shouldUpdate = true;
|
280871
|
+
};
|
280872
|
+
const returnValue = fn(...args);
|
280873
|
+
if (shouldUpdate) {
|
280874
|
+
oldHandleChange();
|
280875
|
+
}
|
280876
|
+
store.handleChange = oldHandleChange;
|
280877
|
+
return returnValue;
|
280878
|
+
};
|
280879
|
+
return AsyncResource7.bind(wrapped);
|
280880
|
+
}
|
280881
|
+
function withPointer3(cb) {
|
280882
|
+
const store = getStore3();
|
280883
|
+
const { index } = store;
|
280884
|
+
const pointer = {
|
280885
|
+
get() {
|
280886
|
+
return store.hooks[index];
|
280887
|
+
},
|
280888
|
+
set(value4) {
|
280889
|
+
store.hooks[index] = value4;
|
280890
|
+
},
|
280891
|
+
initialized: index in store.hooks
|
280892
|
+
};
|
280893
|
+
const returnValue = cb(pointer);
|
280894
|
+
store.index++;
|
280895
|
+
return returnValue;
|
280896
|
+
}
|
280897
|
+
function handleChange3() {
|
280898
|
+
getStore3().handleChange();
|
280899
|
+
}
|
280900
|
+
var effectScheduler3 = {
|
280901
|
+
queue(cb) {
|
280902
|
+
const store = getStore3();
|
280903
|
+
const { index } = store;
|
280904
|
+
store.hooksEffect.push(() => {
|
280905
|
+
store.hooksCleanup[index]?.();
|
280906
|
+
const cleanFn = cb(readline5());
|
280907
|
+
if (cleanFn != null && typeof cleanFn !== "function") {
|
280908
|
+
throw new ValidationError3("useEffect return value must be a cleanup function or nothing.");
|
280909
|
+
}
|
280910
|
+
store.hooksCleanup[index] = cleanFn;
|
280911
|
+
});
|
280912
|
+
},
|
280913
|
+
run() {
|
280914
|
+
const store = getStore3();
|
280915
|
+
withUpdates3(() => {
|
280916
|
+
store.hooksEffect.forEach((effect) => {
|
280917
|
+
effect();
|
280918
|
+
});
|
280919
|
+
store.hooksEffect.length = 0;
|
280920
|
+
})();
|
280921
|
+
},
|
280922
|
+
clearAll() {
|
280923
|
+
const store = getStore3();
|
280924
|
+
store.hooksCleanup.forEach((cleanFn) => {
|
280925
|
+
cleanFn?.();
|
280926
|
+
});
|
280927
|
+
store.hooksEffect.length = 0;
|
280928
|
+
store.hooksCleanup.length = 0;
|
280929
|
+
}
|
280930
|
+
};
|
280931
|
+
|
280932
|
+
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/use-state.js
|
280933
|
+
function useState3(defaultValue) {
|
280934
|
+
return withPointer3((pointer) => {
|
280935
|
+
const setFn = (newValue) => {
|
280936
|
+
if (pointer.get() !== newValue) {
|
280937
|
+
pointer.set(newValue);
|
280938
|
+
handleChange3();
|
280939
|
+
}
|
280940
|
+
};
|
280941
|
+
if (pointer.initialized) {
|
280942
|
+
return [pointer.get(), setFn];
|
280943
|
+
}
|
280944
|
+
const value4 = typeof defaultValue === "function" ? defaultValue() : defaultValue;
|
280945
|
+
pointer.set(value4);
|
280946
|
+
return [value4, setFn];
|
280947
|
+
});
|
280948
|
+
}
|
280949
|
+
|
280950
|
+
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/use-effect.js
|
280951
|
+
function useEffect3(cb, depArray) {
|
280952
|
+
withPointer3((pointer) => {
|
280953
|
+
const oldDeps = pointer.get();
|
280954
|
+
const hasChanged = !Array.isArray(oldDeps) || depArray.some((dep, i6) => !Object.is(dep, oldDeps[i6]));
|
280955
|
+
if (hasChanged) {
|
280956
|
+
effectScheduler3.queue(cb);
|
280957
|
+
}
|
280958
|
+
pointer.set(depArray);
|
280959
|
+
});
|
280960
|
+
}
|
280961
|
+
|
280962
|
+
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/theme.js
|
280963
|
+
var import_yoctocolors_cjs5 = __toESM(require_yoctocolors_cjs(), 1);
|
280964
|
+
var defaultTheme3 = {
|
280965
|
+
prefix: {
|
280966
|
+
idle: import_yoctocolors_cjs5.default.blue("?"),
|
280967
|
+
done: import_yoctocolors_cjs5.default.green(esm_default.tick)
|
280968
|
+
},
|
280969
|
+
spinner: {
|
280970
|
+
interval: 80,
|
280971
|
+
frames: ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"].map((frame) => import_yoctocolors_cjs5.default.yellow(frame))
|
280972
|
+
},
|
280973
|
+
style: {
|
280974
|
+
answer: import_yoctocolors_cjs5.default.cyan,
|
280975
|
+
message: import_yoctocolors_cjs5.default.bold,
|
280976
|
+
error: (text2) => import_yoctocolors_cjs5.default.red(`> ${text2}`),
|
280977
|
+
defaultAnswer: (text2) => import_yoctocolors_cjs5.default.dim(`(${text2})`),
|
280978
|
+
help: import_yoctocolors_cjs5.default.dim,
|
280979
|
+
highlight: import_yoctocolors_cjs5.default.cyan,
|
280980
|
+
key: (text2) => import_yoctocolors_cjs5.default.cyan(import_yoctocolors_cjs5.default.bold(`<${text2}>`))
|
280981
|
+
}
|
280982
|
+
};
|
280983
|
+
|
280984
|
+
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/make-theme.js
|
280985
|
+
function isPlainObject4(value4) {
|
280986
|
+
if (typeof value4 !== "object" || value4 === null)
|
280987
|
+
return false;
|
280988
|
+
let proto = value4;
|
280989
|
+
while (Object.getPrototypeOf(proto) !== null) {
|
280990
|
+
proto = Object.getPrototypeOf(proto);
|
280991
|
+
}
|
280992
|
+
return Object.getPrototypeOf(value4) === proto;
|
280993
|
+
}
|
280994
|
+
function deepMerge4(...objects) {
|
280995
|
+
const output = {};
|
280996
|
+
for (const obj of objects) {
|
280997
|
+
for (const [key3, value4] of Object.entries(obj)) {
|
280998
|
+
const prevValue = output[key3];
|
280999
|
+
output[key3] = isPlainObject4(prevValue) && isPlainObject4(value4) ? deepMerge4(prevValue, value4) : value4;
|
281000
|
+
}
|
281001
|
+
}
|
281002
|
+
return output;
|
281003
|
+
}
|
281004
|
+
function makeTheme3(...themes) {
|
281005
|
+
const themesToMerge = [
|
281006
|
+
defaultTheme3,
|
281007
|
+
...themes.filter((theme) => theme != null)
|
281008
|
+
];
|
281009
|
+
return deepMerge4(...themesToMerge);
|
281010
|
+
}
|
281011
|
+
|
281012
|
+
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/use-prefix.js
|
281013
|
+
function usePrefix3({ status = "idle", theme }) {
|
281014
|
+
const [showLoader, setShowLoader] = useState3(false);
|
281015
|
+
const [tick, setTick] = useState3(0);
|
281016
|
+
const { prefix, spinner: spinner2 } = makeTheme3(theme);
|
281017
|
+
useEffect3(() => {
|
281018
|
+
if (status === "loading") {
|
281019
|
+
let tickInterval;
|
281020
|
+
let inc = -1;
|
281021
|
+
const delayTimeout = setTimeout(AsyncResource8.bind(() => {
|
281022
|
+
setShowLoader(true);
|
281023
|
+
tickInterval = setInterval(AsyncResource8.bind(() => {
|
281024
|
+
inc = inc + 1;
|
281025
|
+
setTick(inc % spinner2.frames.length);
|
281026
|
+
}), spinner2.interval);
|
281027
|
+
}), 300);
|
281028
|
+
return () => {
|
281029
|
+
clearTimeout(delayTimeout);
|
281030
|
+
clearInterval(tickInterval);
|
281031
|
+
};
|
281032
|
+
} else {
|
281033
|
+
setShowLoader(false);
|
281034
|
+
}
|
281035
|
+
}, [status]);
|
281036
|
+
if (showLoader) {
|
281037
|
+
return spinner2.frames[tick];
|
281038
|
+
}
|
281039
|
+
const iconName = status === "loading" ? "idle" : status;
|
281040
|
+
return typeof prefix === "string" ? prefix : prefix[iconName] ?? prefix["idle"];
|
281041
|
+
}
|
281042
|
+
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/use-ref.js
|
281043
|
+
function useRef3(val) {
|
281044
|
+
return useState3({ current: val })[0];
|
281045
|
+
}
|
281046
|
+
|
281047
|
+
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/use-keypress.js
|
281048
|
+
function useKeypress3(userHandler) {
|
281049
|
+
const signal = useRef3(userHandler);
|
281050
|
+
signal.current = userHandler;
|
281051
|
+
useEffect3((rl) => {
|
281052
|
+
let ignore = false;
|
281053
|
+
const handler = withUpdates3((_input, event) => {
|
281054
|
+
if (ignore)
|
281055
|
+
return;
|
281056
|
+
signal.current(event, rl);
|
281057
|
+
});
|
281058
|
+
rl.input.on("keypress", handler);
|
281059
|
+
return () => {
|
281060
|
+
ignore = true;
|
281061
|
+
rl.input.removeListener("keypress", handler);
|
281062
|
+
};
|
281063
|
+
}, []);
|
281064
|
+
}
|
281065
|
+
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/utils.js
|
281066
|
+
var import_cli_width3 = __toESM(require_cli_width(), 1);
|
281067
|
+
var import_wrap_ansi3 = __toESM(require_wrap_ansi(), 1);
|
281068
|
+
function breakLines3(content, width) {
|
281069
|
+
return content.split(`
|
281070
|
+
`).flatMap((line) => import_wrap_ansi3.default(line, width, { trim: false, hard: true }).split(`
|
281071
|
+
`).map((str) => str.trimEnd())).join(`
|
281072
|
+
`);
|
281073
|
+
}
|
281074
|
+
function readlineWidth3() {
|
281075
|
+
return import_cli_width3.default({ defaultWidth: 80, output: readline5().output });
|
281076
|
+
}
|
281077
|
+
|
281078
|
+
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
|
281079
|
+
var import_mute_stream3 = __toESM(require_lib(), 1);
|
281080
|
+
import * as readline6 from "node:readline";
|
281081
|
+
import { AsyncResource as AsyncResource9 } from "node:async_hooks";
|
281082
|
+
|
281083
|
+
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/screen-manager.js
|
281084
|
+
var import_ansi_escapes4 = __toESM(require_ansi_escapes(), 1);
|
281085
|
+
import { stripVTControlCharacters as stripVTControlCharacters4 } from "node:util";
|
281086
|
+
var height3 = (content) => content.split(`
|
281087
|
+
`).length;
|
281088
|
+
var lastLine3 = (content) => content.split(`
|
281089
|
+
`).pop() ?? "";
|
281090
|
+
function cursorDown3(n6) {
|
281091
|
+
return n6 > 0 ? import_ansi_escapes4.default.cursorDown(n6) : "";
|
281092
|
+
}
|
281093
|
+
|
281094
|
+
class ScreenManager3 {
|
281095
|
+
rl;
|
281096
|
+
height = 0;
|
281097
|
+
extraLinesUnderPrompt = 0;
|
281098
|
+
cursorPos;
|
281099
|
+
constructor(rl) {
|
281100
|
+
this.rl = rl;
|
281101
|
+
this.rl = rl;
|
281102
|
+
this.cursorPos = rl.getCursorPos();
|
281103
|
+
}
|
281104
|
+
write(content) {
|
281105
|
+
this.rl.output.unmute();
|
281106
|
+
this.rl.output.write(content);
|
281107
|
+
this.rl.output.mute();
|
281108
|
+
}
|
281109
|
+
render(content, bottomContent = "") {
|
281110
|
+
const promptLine = lastLine3(content);
|
281111
|
+
const rawPromptLine = stripVTControlCharacters4(promptLine);
|
281112
|
+
let prompt = rawPromptLine;
|
281113
|
+
if (this.rl.line.length > 0) {
|
281114
|
+
prompt = prompt.slice(0, -this.rl.line.length);
|
281115
|
+
}
|
281116
|
+
this.rl.setPrompt(prompt);
|
281117
|
+
this.cursorPos = this.rl.getCursorPos();
|
281118
|
+
const width = readlineWidth3();
|
281119
|
+
content = breakLines3(content, width);
|
281120
|
+
bottomContent = breakLines3(bottomContent, width);
|
281121
|
+
if (rawPromptLine.length % width === 0) {
|
281122
|
+
content += `
|
281123
|
+
`;
|
281124
|
+
}
|
281125
|
+
let output = content + (bottomContent ? `
|
281126
|
+
` + bottomContent : "");
|
281127
|
+
const promptLineUpDiff = Math.floor(rawPromptLine.length / width) - this.cursorPos.rows;
|
281128
|
+
const bottomContentHeight = promptLineUpDiff + (bottomContent ? height3(bottomContent) : 0);
|
281129
|
+
if (bottomContentHeight > 0)
|
281130
|
+
output += import_ansi_escapes4.default.cursorUp(bottomContentHeight);
|
281131
|
+
output += import_ansi_escapes4.default.cursorTo(this.cursorPos.cols);
|
281132
|
+
this.write(cursorDown3(this.extraLinesUnderPrompt) + import_ansi_escapes4.default.eraseLines(this.height) + output);
|
281133
|
+
this.extraLinesUnderPrompt = bottomContentHeight;
|
281134
|
+
this.height = height3(output);
|
281135
|
+
}
|
281136
|
+
checkCursorPos() {
|
281137
|
+
const cursorPos = this.rl.getCursorPos();
|
281138
|
+
if (cursorPos.cols !== this.cursorPos.cols) {
|
281139
|
+
this.write(import_ansi_escapes4.default.cursorTo(cursorPos.cols));
|
281140
|
+
this.cursorPos = cursorPos;
|
281141
|
+
}
|
281142
|
+
}
|
281143
|
+
done({ clearContent }) {
|
281144
|
+
this.rl.setPrompt("");
|
281145
|
+
let output = cursorDown3(this.extraLinesUnderPrompt);
|
281146
|
+
output += clearContent ? import_ansi_escapes4.default.eraseLines(this.height) : `
|
281147
|
+
`;
|
281148
|
+
output += import_ansi_escapes4.default.cursorShow;
|
281149
|
+
this.write(output);
|
281150
|
+
this.rl.close();
|
281151
|
+
}
|
281152
|
+
}
|
281153
|
+
|
281154
|
+
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/promise-polyfill.js
|
281155
|
+
class PromisePolyfill3 extends Promise {
|
281156
|
+
static withResolver() {
|
281157
|
+
let resolve6;
|
281158
|
+
let reject;
|
281159
|
+
const promise = new Promise((res, rej) => {
|
281160
|
+
resolve6 = res;
|
281161
|
+
reject = rej;
|
281162
|
+
});
|
281163
|
+
return { promise, resolve: resolve6, reject };
|
281164
|
+
}
|
281165
|
+
}
|
281166
|
+
|
281167
|
+
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
|
281168
|
+
function getCallSites3() {
|
281169
|
+
const _prepareStackTrace = Error.prepareStackTrace;
|
281170
|
+
try {
|
281171
|
+
let result = [];
|
281172
|
+
Error.prepareStackTrace = (_5, callSites) => {
|
281173
|
+
const callSitesWithoutCurrent = callSites.slice(1);
|
281174
|
+
result = callSitesWithoutCurrent;
|
281175
|
+
return callSitesWithoutCurrent;
|
281176
|
+
};
|
281177
|
+
new Error().stack;
|
281178
|
+
return result;
|
281179
|
+
} finally {
|
281180
|
+
Error.prepareStackTrace = _prepareStackTrace;
|
281181
|
+
}
|
281182
|
+
}
|
281183
|
+
function createPrompt3(view) {
|
281184
|
+
const callSites = getCallSites3();
|
281185
|
+
const callerFilename = callSites[1]?.getFileName?.();
|
281186
|
+
const prompt = (config3, context = {}) => {
|
281187
|
+
const { input = process.stdin, signal } = context;
|
281188
|
+
const cleanups = new Set;
|
281189
|
+
const output = new import_mute_stream3.default;
|
281190
|
+
output.pipe(context.output ?? process.stdout);
|
281191
|
+
const rl = readline6.createInterface({
|
281192
|
+
terminal: true,
|
281193
|
+
input,
|
281194
|
+
output
|
281195
|
+
});
|
281196
|
+
const screen = new ScreenManager3(rl);
|
281197
|
+
const { promise, resolve: resolve6, reject } = PromisePolyfill3.withResolver();
|
281198
|
+
const cancel3 = () => reject(new CancelPromptError3);
|
281199
|
+
if (signal) {
|
281200
|
+
const abort = () => reject(new AbortPromptError3({ cause: signal.reason }));
|
281201
|
+
if (signal.aborted) {
|
281202
|
+
abort();
|
281203
|
+
return Object.assign(promise, { cancel: cancel3 });
|
281204
|
+
}
|
281205
|
+
signal.addEventListener("abort", abort);
|
281206
|
+
cleanups.add(() => signal.removeEventListener("abort", abort));
|
281207
|
+
}
|
281208
|
+
cleanups.add(onExit((code2, signal2) => {
|
281209
|
+
reject(new ExitPromptError3(`User force closed the prompt with ${code2} ${signal2}`));
|
281210
|
+
}));
|
281211
|
+
const checkCursorPos = () => screen.checkCursorPos();
|
281212
|
+
rl.input.on("keypress", checkCursorPos);
|
281213
|
+
cleanups.add(() => rl.input.removeListener("keypress", checkCursorPos));
|
281214
|
+
return withHooks3(rl, (cycle) => {
|
281215
|
+
const hooksCleanup = AsyncResource9.bind(() => effectScheduler3.clearAll());
|
281216
|
+
rl.on("close", hooksCleanup);
|
281217
|
+
cleanups.add(() => rl.removeListener("close", hooksCleanup));
|
281218
|
+
cycle(() => {
|
281219
|
+
try {
|
281220
|
+
const nextView = view(config3, (value4) => {
|
281221
|
+
setImmediate(() => resolve6(value4));
|
281222
|
+
});
|
281223
|
+
if (nextView === undefined) {
|
281224
|
+
throw new Error(`Prompt functions must return a string.
|
281225
|
+
at ${callerFilename}`);
|
281226
|
+
}
|
281227
|
+
const [content, bottomContent] = typeof nextView === "string" ? [nextView] : nextView;
|
281228
|
+
screen.render(content, bottomContent);
|
281229
|
+
effectScheduler3.run();
|
281230
|
+
} catch (error5) {
|
281231
|
+
reject(error5);
|
281232
|
+
}
|
281233
|
+
});
|
281234
|
+
return Object.assign(promise.then((answer) => {
|
281235
|
+
effectScheduler3.clearAll();
|
281236
|
+
return answer;
|
281237
|
+
}, (error5) => {
|
281238
|
+
effectScheduler3.clearAll();
|
281239
|
+
throw error5;
|
281240
|
+
}).finally(() => {
|
281241
|
+
cleanups.forEach((cleanup) => cleanup());
|
281242
|
+
screen.done({ clearContent: Boolean(context.clearPromptOnDone) });
|
281243
|
+
output.end();
|
281244
|
+
}).then(() => promise), { cancel: cancel3 });
|
281245
|
+
});
|
281246
|
+
};
|
281247
|
+
return prompt;
|
281248
|
+
}
|
280340
281249
|
// ../../node_modules/@inquirer/input/dist/esm/index.js
|
280341
281250
|
var inputTheme = {
|
280342
281251
|
validationFailureMode: "keep"
|
280343
281252
|
};
|
280344
|
-
var esm_default4 =
|
281253
|
+
var esm_default4 = createPrompt3((config3, done) => {
|
280345
281254
|
const { required, validate: validate3 = () => true } = config3;
|
280346
|
-
const theme =
|
280347
|
-
const [status, setStatus] =
|
280348
|
-
const [defaultValue = "", setDefaultValue] =
|
280349
|
-
const [errorMsg, setError] =
|
280350
|
-
const [value4, setValue] =
|
280351
|
-
const prefix =
|
280352
|
-
|
281255
|
+
const theme = makeTheme3(inputTheme, config3.theme);
|
281256
|
+
const [status, setStatus] = useState3("idle");
|
281257
|
+
const [defaultValue = "", setDefaultValue] = useState3(config3.default);
|
281258
|
+
const [errorMsg, setError] = useState3();
|
281259
|
+
const [value4, setValue] = useState3("");
|
281260
|
+
const prefix = usePrefix3({ status, theme });
|
281261
|
+
useKeypress3(async (key4, rl) => {
|
280353
281262
|
if (status !== "idle") {
|
280354
281263
|
return;
|
280355
281264
|
}
|
280356
|
-
if (
|
281265
|
+
if (isEnterKey3(key4)) {
|
280357
281266
|
const answer = value4 || defaultValue;
|
280358
281267
|
setStatus("loading");
|
280359
281268
|
const isValid2 = required && !answer ? "You must provide a value" : await validate3(answer);
|
@@ -280370,9 +281279,9 @@ var esm_default4 = createPrompt((config3, done) => {
|
|
280370
281279
|
setError(isValid2 || "You must provide a valid value");
|
280371
281280
|
setStatus("idle");
|
280372
281281
|
}
|
280373
|
-
} else if (
|
281282
|
+
} else if (isBackspaceKey2(key4) && !value4) {
|
280374
281283
|
setDefaultValue(undefined);
|
280375
|
-
} else if (
|
281284
|
+
} else if (key4.name === "tab" && !value4) {
|
280376
281285
|
setDefaultValue(undefined);
|
280377
281286
|
rl.clearLine(0);
|
280378
281287
|
rl.write(defaultValue);
|
@@ -280404,7 +281313,7 @@ var esm_default4 = createPrompt((config3, done) => {
|
|
280404
281313
|
});
|
280405
281314
|
|
280406
281315
|
// ../../node_modules/@inquirer/password/dist/esm/index.js
|
280407
|
-
var
|
281316
|
+
var import_ansi_escapes5 = __toESM(require_ansi_escapes(), 1);
|
280408
281317
|
var esm_default5 = createPrompt((config3, done) => {
|
280409
281318
|
const { validate: validate3 = () => true } = config3;
|
280410
281319
|
const theme = makeTheme(config3.theme);
|
@@ -280412,11 +281321,11 @@ var esm_default5 = createPrompt((config3, done) => {
|
|
280412
281321
|
const [errorMsg, setError] = useState();
|
280413
281322
|
const [value4, setValue] = useState("");
|
280414
281323
|
const prefix = usePrefix({ status, theme });
|
280415
|
-
useKeypress(async (
|
281324
|
+
useKeypress(async (key4, rl) => {
|
280416
281325
|
if (status !== "idle") {
|
280417
281326
|
return;
|
280418
281327
|
}
|
280419
|
-
if (isEnterKey(
|
281328
|
+
if (isEnterKey(key4)) {
|
280420
281329
|
const answer = value4;
|
280421
281330
|
setStatus("loading");
|
280422
281331
|
const isValid2 = await validate3(answer);
|
@@ -280441,7 +281350,7 @@ var esm_default5 = createPrompt((config3, done) => {
|
|
280441
281350
|
const maskChar = typeof config3.mask === "string" ? config3.mask : "*";
|
280442
281351
|
formattedValue = maskChar.repeat(value4.length);
|
280443
281352
|
} else if (status !== "done") {
|
280444
|
-
helpTip = `${theme.style.help("[input is masked]")}${
|
281353
|
+
helpTip = `${theme.style.help("[input is masked]")}${import_ansi_escapes5.default.cursorHide}`;
|
280445
281354
|
}
|
280446
281355
|
if (status === "done") {
|
280447
281356
|
formattedValue = theme.style.answer(formattedValue);
|
@@ -281513,7 +282422,7 @@ var basename2 = function(p6, extension) {
|
|
281513
282422
|
return extension && lastSegment.endsWith(extension) ? lastSegment.slice(0, -extension.length) : lastSegment;
|
281514
282423
|
};
|
281515
282424
|
// ../../node_modules/defu/dist/defu.mjs
|
281516
|
-
function
|
282425
|
+
function isPlainObject5(value4) {
|
281517
282426
|
if (value4 === null || typeof value4 !== "object") {
|
281518
282427
|
return false;
|
281519
282428
|
}
|
@@ -281530,27 +282439,27 @@ function isPlainObject3(value4) {
|
|
281530
282439
|
return true;
|
281531
282440
|
}
|
281532
282441
|
function _defu(baseObject, defaults2, namespace = ".", merger) {
|
281533
|
-
if (!
|
282442
|
+
if (!isPlainObject5(defaults2)) {
|
281534
282443
|
return _defu(baseObject, {}, namespace, merger);
|
281535
282444
|
}
|
281536
282445
|
const object = Object.assign({}, defaults2);
|
281537
|
-
for (const
|
281538
|
-
if (
|
282446
|
+
for (const key4 in baseObject) {
|
282447
|
+
if (key4 === "__proto__" || key4 === "constructor") {
|
281539
282448
|
continue;
|
281540
282449
|
}
|
281541
|
-
const value4 = baseObject[
|
282450
|
+
const value4 = baseObject[key4];
|
281542
282451
|
if (value4 === null || value4 === undefined) {
|
281543
282452
|
continue;
|
281544
282453
|
}
|
281545
|
-
if (merger && merger(object,
|
282454
|
+
if (merger && merger(object, key4, value4, namespace)) {
|
281546
282455
|
continue;
|
281547
282456
|
}
|
281548
|
-
if (Array.isArray(value4) && Array.isArray(object[
|
281549
|
-
object[
|
281550
|
-
} else if (
|
281551
|
-
object[
|
282457
|
+
if (Array.isArray(value4) && Array.isArray(object[key4])) {
|
282458
|
+
object[key4] = [...value4, ...object[key4]];
|
282459
|
+
} else if (isPlainObject5(value4) && isPlainObject5(object[key4])) {
|
282460
|
+
object[key4] = _defu(value4, object[key4], (namespace ? `${namespace}.` : "") + key4.toString(), merger);
|
281552
282461
|
} else {
|
281553
|
-
object[
|
282462
|
+
object[key4] = value4;
|
281554
282463
|
}
|
281555
282464
|
}
|
281556
282465
|
return object;
|
@@ -281559,15 +282468,15 @@ function createDefu(merger) {
|
|
281559
282468
|
return (...arguments_4) => arguments_4.reduce((p6, c3) => _defu(p6, c3, "", merger), {});
|
281560
282469
|
}
|
281561
282470
|
var defu = createDefu();
|
281562
|
-
var defuFn = createDefu((object,
|
281563
|
-
if (object[
|
281564
|
-
object[
|
282471
|
+
var defuFn = createDefu((object, key4, currentValue) => {
|
282472
|
+
if (object[key4] !== undefined && typeof currentValue === "function") {
|
282473
|
+
object[key4] = currentValue(object[key4]);
|
281565
282474
|
return true;
|
281566
282475
|
}
|
281567
282476
|
});
|
281568
|
-
var defuArrayFn = createDefu((object,
|
281569
|
-
if (Array.isArray(object[
|
281570
|
-
object[
|
282477
|
+
var defuArrayFn = createDefu((object, key4, currentValue) => {
|
282478
|
+
if (Array.isArray(object[key4]) && typeof currentValue === "function") {
|
282479
|
+
object[key4] = currentValue(object[key4]);
|
281571
282480
|
return true;
|
281572
282481
|
}
|
281573
282482
|
});
|
@@ -281829,11 +282738,11 @@ function cacheDirectory() {
|
|
281829
282738
|
}
|
281830
282739
|
function normalizeHeaders(headers = {}) {
|
281831
282740
|
const normalized = {};
|
281832
|
-
for (const [
|
282741
|
+
for (const [key4, value4] of Object.entries(headers)) {
|
281833
282742
|
if (!value4) {
|
281834
282743
|
continue;
|
281835
282744
|
}
|
281836
|
-
normalized[
|
282745
|
+
normalized[key4.toLowerCase()] = value4;
|
281837
282746
|
}
|
281838
282747
|
return normalized;
|
281839
282748
|
}
|
@@ -284066,7 +284975,7 @@ function jsonOutput(data) {
|
|
284066
284975
|
var composer = require_composer();
|
284067
284976
|
var Document = require_Document();
|
284068
284977
|
var Schema = require_Schema();
|
284069
|
-
var
|
284978
|
+
var errors4 = require_errors3();
|
284070
284979
|
var Alias = require_Alias();
|
284071
284980
|
var identity2 = require_identity();
|
284072
284981
|
var Pair = require_Pair();
|
@@ -284082,9 +284991,9 @@ var visit2 = require_visit();
|
|
284082
284991
|
var $Composer = composer.Composer;
|
284083
284992
|
var $Document = Document.Document;
|
284084
284993
|
var $Schema = Schema.Schema;
|
284085
|
-
var $YAMLError =
|
284086
|
-
var $YAMLParseError =
|
284087
|
-
var $YAMLWarning =
|
284994
|
+
var $YAMLError = errors4.YAMLError;
|
284995
|
+
var $YAMLParseError = errors4.YAMLParseError;
|
284996
|
+
var $YAMLWarning = errors4.YAMLWarning;
|
284088
284997
|
var $Alias = Alias.Alias;
|
284089
284998
|
var $isAlias = identity2.isAlias;
|
284090
284999
|
var $isCollection = identity2.isCollection;
|
@@ -284430,7 +285339,7 @@ async function getServicesAndMapResults({
|
|
284430
285339
|
const application = await settlemint.application.read(applicationUniqueName);
|
284431
285340
|
const services = await servicesSpinner(settlemint, applicationUniqueName, types2);
|
284432
285341
|
const results = (types2 ?? SERVICE_TYPES).filter((serviceType) => !types2 || types2.includes(serviceType)).map((serviceType) => {
|
284433
|
-
const [_5, labels] = Object.entries(LABELS_MAP).find(([
|
285342
|
+
const [_5, labels] = Object.entries(LABELS_MAP).find(([key4, value4]) => value4.command === serviceType) ?? [
|
284434
285343
|
null,
|
284435
285344
|
{ plural: serviceType }
|
284436
285345
|
];
|
@@ -284658,11 +285567,11 @@ function createCommand4() {
|
|
284658
285567
|
|
284659
285568
|
// src/utils/commands/passthrough-options.ts
|
284660
285569
|
function mapPassthroughOptions(options, command) {
|
284661
|
-
const optionArgs = Object.entries(options).map(([
|
285570
|
+
const optionArgs = Object.entries(options).map(([key4, value4]) => {
|
284662
285571
|
if (value4 === true) {
|
284663
|
-
return `--${
|
285572
|
+
return `--${key4}`;
|
284664
285573
|
}
|
284665
|
-
return `--${
|
285574
|
+
return `--${key4}=${value4}`;
|
284666
285575
|
});
|
284667
285576
|
return [...optionArgs, ...command.args];
|
284668
285577
|
}
|
@@ -285461,7 +286370,7 @@ function subgraphDeployCommand() {
|
|
285461
286370
|
"--node",
|
285462
286371
|
middlewareAdminUrl,
|
285463
286372
|
"--ipfs",
|
285464
|
-
"https://ipfs.
|
286373
|
+
"https://ipfs.console.settlemint.com",
|
285465
286374
|
graphName,
|
285466
286375
|
subgraphYamlFile
|
285467
286376
|
]);
|
@@ -285673,4 +286582,4 @@ async function sdkCliCommand(argv = process.argv) {
|
|
285673
286582
|
// src/cli.ts
|
285674
286583
|
sdkCliCommand();
|
285675
286584
|
|
285676
|
-
//# debugId=
|
286585
|
+
//# debugId=186FE508DFA19CE964756E2164756E21
|