@settlemint/sdk-cli 2.0.0-prae2ddec7 → 2.0.0-prd098b9b4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +471 -1377
- package/dist/cli.js.map +28 -56
- package/package.json +5 -5
package/dist/cli.js
CHANGED
@@ -14515,8 +14515,8 @@ var require_printLocation = __commonJS((exports) => {
|
|
14515
14515
|
const columnNum = sourceLocation.column + columnOffset;
|
14516
14516
|
const locationStr = `${source.name}:${lineNum}:${columnNum}
|
14517
14517
|
`;
|
14518
|
-
const
|
14519
|
-
const locationLine =
|
14518
|
+
const lines2 = body.split(/\r\n|[\n\r]/g);
|
14519
|
+
const locationLine = lines2[lineIndex];
|
14520
14520
|
if (locationLine.length > 120) {
|
14521
14521
|
const subLineIndex = Math.floor(columnNum / 80);
|
14522
14522
|
const subLineColumnNum = columnNum % 80;
|
@@ -14532,14 +14532,14 @@ var require_printLocation = __commonJS((exports) => {
|
|
14532
14532
|
]);
|
14533
14533
|
}
|
14534
14534
|
return locationStr + printPrefixedLines([
|
14535
|
-
[`${lineNum - 1} |`,
|
14535
|
+
[`${lineNum - 1} |`, lines2[lineIndex - 1]],
|
14536
14536
|
[`${lineNum} |`, locationLine],
|
14537
14537
|
["|", "^".padStart(columnNum)],
|
14538
|
-
[`${lineNum + 1} |`,
|
14538
|
+
[`${lineNum + 1} |`, lines2[lineIndex + 1]]
|
14539
14539
|
]);
|
14540
14540
|
}
|
14541
|
-
function printPrefixedLines(
|
14542
|
-
const existingLines =
|
14541
|
+
function printPrefixedLines(lines2) {
|
14542
|
+
const existingLines = lines2.filter(([_, line]) => line !== undefined);
|
14543
14543
|
const padLen = Math.max(...existingLines.map(([prefix]) => prefix.length));
|
14544
14544
|
return existingLines.map(([prefix, line]) => prefix.padStart(padLen) + (line ? " " + line : "")).join(`
|
14545
14545
|
`);
|
@@ -14952,14 +14952,14 @@ var require_blockString = __commonJS((exports) => {
|
|
14952
14952
|
exports.isPrintableAsBlockString = isPrintableAsBlockString;
|
14953
14953
|
exports.printBlockString = printBlockString;
|
14954
14954
|
var _characterClasses = require_characterClasses();
|
14955
|
-
function dedentBlockStringLines(
|
14955
|
+
function dedentBlockStringLines(lines2) {
|
14956
14956
|
var _firstNonEmptyLine2;
|
14957
14957
|
let commonIndent = Number.MAX_SAFE_INTEGER;
|
14958
14958
|
let firstNonEmptyLine = null;
|
14959
14959
|
let lastNonEmptyLine = -1;
|
14960
|
-
for (let i = 0;i <
|
14960
|
+
for (let i = 0;i < lines2.length; ++i) {
|
14961
14961
|
var _firstNonEmptyLine;
|
14962
|
-
const line =
|
14962
|
+
const line = lines2[i];
|
14963
14963
|
const indent = leadingWhitespace(line);
|
14964
14964
|
if (indent === line.length) {
|
14965
14965
|
continue;
|
@@ -14970,7 +14970,7 @@ var require_blockString = __commonJS((exports) => {
|
|
14970
14970
|
commonIndent = indent;
|
14971
14971
|
}
|
14972
14972
|
}
|
14973
|
-
return
|
14973
|
+
return lines2.map((line, i) => i === 0 ? line : line.slice(commonIndent)).slice((_firstNonEmptyLine2 = firstNonEmptyLine) !== null && _firstNonEmptyLine2 !== undefined ? _firstNonEmptyLine2 : 0, lastNonEmptyLine + 1);
|
14974
14974
|
}
|
14975
14975
|
function leadingWhitespace(str) {
|
14976
14976
|
let i = 0;
|
@@ -15032,9 +15032,9 @@ var require_blockString = __commonJS((exports) => {
|
|
15032
15032
|
}
|
15033
15033
|
function printBlockString(value, options) {
|
15034
15034
|
const escapedValue = value.replace(/"""/g, '\\"""');
|
15035
|
-
const
|
15036
|
-
const isSingleLine =
|
15037
|
-
const forceLeadingNewLine =
|
15035
|
+
const lines2 = escapedValue.split(/\r\n|[\n\r]/g);
|
15036
|
+
const isSingleLine = lines2.length === 1;
|
15037
|
+
const forceLeadingNewLine = lines2.length > 1 && lines2.slice(1).every((line) => line.length === 0 || (0, _characterClasses.isWhiteSpace)(line.charCodeAt(0)));
|
15038
15038
|
const hasTrailingTripleQuotes = escapedValue.endsWith('\\"""');
|
15039
15039
|
const hasTrailingQuote = value.endsWith('"') && !hasTrailingTripleQuotes;
|
15040
15040
|
const hasTrailingSlash = value.endsWith("\\");
|
@@ -34075,9 +34075,9 @@ var require_commonjs4 = __commonJS((exports) => {
|
|
34075
34075
|
this.#resolveCache = new ResolveCache2;
|
34076
34076
|
this.#resolvePosixCache = new ResolveCache2;
|
34077
34077
|
this.#children = new ChildrenCache2(childrenCacheSize);
|
34078
|
-
const
|
34079
|
-
if (
|
34080
|
-
|
34078
|
+
const split2 = cwdPath.substring(this.rootPath.length).split(sep2);
|
34079
|
+
if (split2.length === 1 && !split2[0]) {
|
34080
|
+
split2.pop();
|
34081
34081
|
}
|
34082
34082
|
if (nocase === undefined) {
|
34083
34083
|
throw new TypeError("must provide nocase setting to PathScurryBase ctor");
|
@@ -34086,11 +34086,11 @@ var require_commonjs4 = __commonJS((exports) => {
|
|
34086
34086
|
this.root = this.newRoot(this.#fs);
|
34087
34087
|
this.roots[this.rootPath] = this.root;
|
34088
34088
|
let prev = this.root;
|
34089
|
-
let len =
|
34089
|
+
let len = split2.length - 1;
|
34090
34090
|
const joinSep = pathImpl.sep;
|
34091
34091
|
let abs = this.rootPath;
|
34092
34092
|
let sawFirst = false;
|
34093
|
-
for (const part of
|
34093
|
+
for (const part of split2) {
|
34094
34094
|
const l2 = len--;
|
34095
34095
|
prev = prev.child(part, {
|
34096
34096
|
relative: new Array(l2).fill("..").join(joinSep),
|
@@ -36541,9 +36541,9 @@ var require_ini = __commonJS((exports, module) => {
|
|
36541
36541
|
let p = out;
|
36542
36542
|
let section = null;
|
36543
36543
|
const re = /^\[([^\]]*)\]\s*$|^([^=]+)(=(.*))?$/i;
|
36544
|
-
const
|
36544
|
+
const lines2 = str.split(/[\r\n]+/g);
|
36545
36545
|
const duplicates = {};
|
36546
|
-
for (const line of
|
36546
|
+
for (const line of lines2) {
|
36547
36547
|
if (!line || line.match(/^\s*[;#]/) || line.match(/^\s*$/)) {
|
36548
36548
|
continue;
|
36549
36549
|
}
|
@@ -38096,7 +38096,7 @@ var require_semver2 = __commonJS((exports, module) => {
|
|
38096
38096
|
// ../../node_modules/@npmcli/git/lib/lines-to-revs.js
|
38097
38097
|
var require_lines_to_revs = __commonJS((exports, module) => {
|
38098
38098
|
var semver = require_semver2();
|
38099
|
-
module.exports = (
|
38099
|
+
module.exports = (lines2) => finish(lines2.reduce(linesToRevsReducer, {
|
38100
38100
|
versions: {},
|
38101
38101
|
"dist-tags": {},
|
38102
38102
|
refs: {},
|
@@ -38157,12 +38157,12 @@ var require_lines_to_revs = __commonJS((exports, module) => {
|
|
38157
38157
|
return "other";
|
38158
38158
|
};
|
38159
38159
|
var lineToRevDoc = (line) => {
|
38160
|
-
const
|
38161
|
-
if (
|
38160
|
+
const split2 = line.trim().split(/\s+/, 2);
|
38161
|
+
if (split2.length < 2) {
|
38162
38162
|
return null;
|
38163
38163
|
}
|
38164
|
-
const sha =
|
38165
|
-
const rawRef =
|
38164
|
+
const sha = split2[0].trim();
|
38165
|
+
const rawRef = split2[1].trim();
|
38166
38166
|
const type2 = refType(rawRef);
|
38167
38167
|
if (type2 === "tag") {
|
38168
38168
|
const ref = rawRef.slice("refs/tags/".length);
|
@@ -40723,17 +40723,17 @@ var require_normalize_data = __commonJS((exports, module) => {
|
|
40723
40723
|
};
|
40724
40724
|
var isEmail = (str) => str.includes("@") && str.indexOf("@") < str.lastIndexOf(".");
|
40725
40725
|
function extractDescription(description) {
|
40726
|
-
const
|
40726
|
+
const lines2 = description.trim().split(`
|
40727
40727
|
`);
|
40728
40728
|
let start = 0;
|
40729
|
-
while (
|
40729
|
+
while (lines2[start]?.trim().match(/^(#|$)/)) {
|
40730
40730
|
start++;
|
40731
40731
|
}
|
40732
40732
|
let end = start + 1;
|
40733
|
-
while (end <
|
40733
|
+
while (end < lines2.length && lines2[end].trim()) {
|
40734
40734
|
end++;
|
40735
40735
|
}
|
40736
|
-
return
|
40736
|
+
return lines2.slice(start, end).join(" ").trim();
|
40737
40737
|
}
|
40738
40738
|
function stringifyPerson(person) {
|
40739
40739
|
if (typeof person !== "string") {
|
@@ -59430,9 +59430,9 @@ ${lanes.join(`
|
|
59430
59430
|
return node.kind === 183 || node.kind === 233;
|
59431
59431
|
}
|
59432
59432
|
var MAX_SMI_X86 = 1073741823;
|
59433
|
-
function guessIndentation(
|
59433
|
+
function guessIndentation(lines2) {
|
59434
59434
|
let indentation = MAX_SMI_X86;
|
59435
|
-
for (const line of
|
59435
|
+
for (const line of lines2) {
|
59436
59436
|
if (!line.length) {
|
59437
59437
|
continue;
|
59438
59438
|
}
|
@@ -147983,8 +147983,8 @@ ${lanes.join(`
|
|
147983
147983
|
if (node.comment) {
|
147984
147984
|
const text = getTextOfJSDocComment(node.comment);
|
147985
147985
|
if (text) {
|
147986
|
-
const
|
147987
|
-
for (const line of
|
147986
|
+
const lines2 = text.split(/\r\n?|\n/);
|
147987
|
+
for (const line of lines2) {
|
147988
147988
|
writeLine();
|
147989
147989
|
writeSpace();
|
147990
147990
|
writePunctuation("*");
|
@@ -148628,9 +148628,9 @@ ${lanes.join(`
|
|
148628
148628
|
if (getEmitFlags(parentNode) & 1) {
|
148629
148629
|
writeSpace();
|
148630
148630
|
} else if (preserveSourceNewlines) {
|
148631
|
-
const
|
148632
|
-
if (
|
148633
|
-
writeLine(
|
148631
|
+
const lines2 = getLinesBetweenNodes(parentNode, prevChildNode, nextChildNode);
|
148632
|
+
if (lines2) {
|
148633
|
+
writeLine(lines2);
|
148634
148634
|
} else {
|
148635
148635
|
writeSpace();
|
148636
148636
|
}
|
@@ -148639,9 +148639,9 @@ ${lanes.join(`
|
|
148639
148639
|
}
|
148640
148640
|
}
|
148641
148641
|
function writeLines(text) {
|
148642
|
-
const
|
148643
|
-
const indentation = guessIndentation(
|
148644
|
-
for (const lineText of
|
148642
|
+
const lines2 = text.split(/\r\n?|\n/);
|
148643
|
+
const indentation = guessIndentation(lines2);
|
148644
|
+
for (const lineText of lines2) {
|
148645
148645
|
const line = indentation ? lineText.slice(indentation) : lineText;
|
148646
148646
|
if (line.length) {
|
148647
148647
|
writeLine();
|
@@ -148739,11 +148739,11 @@ ${lanes.join(`
|
|
148739
148739
|
}
|
148740
148740
|
function getEffectiveLines(getLineDifference) {
|
148741
148741
|
Debug.assert(!!preserveSourceNewlines);
|
148742
|
-
const
|
148743
|
-
if (
|
148742
|
+
const lines2 = getLineDifference(true);
|
148743
|
+
if (lines2 === 0) {
|
148744
148744
|
return getLineDifference(false);
|
148745
148745
|
}
|
148746
|
-
return
|
148746
|
+
return lines2;
|
148747
148747
|
}
|
148748
148748
|
function writeLineSeparatorsAndIndentBefore(node, parent2) {
|
148749
148749
|
const leadingNewlines = preserveSourceNewlines && getLeadingLineTerminatorCount(parent2, node, 0);
|
@@ -159029,7 +159029,7 @@ ${lanes.join(`
|
|
159029
159029
|
function generateOptionOutput(sys2, option, rightAlignOfLeft, leftAlignOfRight) {
|
159030
159030
|
var _a;
|
159031
159031
|
const text = [];
|
159032
|
-
const
|
159032
|
+
const colors3 = createColors(sys2);
|
159033
159033
|
const name2 = getDisplayNameTextOfOption(option);
|
159034
159034
|
const valueCandidates = getValueCandidate(option);
|
159035
159035
|
const defaultValueDescription = typeof option.defaultValueDescription === "object" ? getDiagnosticText(option.defaultValueDescription) : formatDefaultValue(option.defaultValueDescription, option.type === "list" || option.type === "listOrElement" ? option.element.type : option.type);
|
@@ -159050,7 +159050,7 @@ ${lanes.join(`
|
|
159050
159050
|
}
|
159051
159051
|
text.push(sys2.newLine);
|
159052
159052
|
} else {
|
159053
|
-
text.push(
|
159053
|
+
text.push(colors3.blue(name2), sys2.newLine);
|
159054
159054
|
if (option.description) {
|
159055
159055
|
const description3 = getDiagnosticText(option.description);
|
159056
159056
|
text.push(description3);
|
@@ -159095,7 +159095,7 @@ ${lanes.join(`
|
|
159095
159095
|
if (isFirstLine) {
|
159096
159096
|
curLeft = left.padStart(rightAlignOfLeft2);
|
159097
159097
|
curLeft = curLeft.padEnd(leftAlignOfRight2);
|
159098
|
-
curLeft = colorLeft ?
|
159098
|
+
curLeft = colorLeft ? colors3.blue(curLeft) : curLeft;
|
159099
159099
|
} else {
|
159100
159100
|
curLeft = "".padStart(leftAlignOfRight2);
|
159101
159101
|
}
|
@@ -159164,15 +159164,15 @@ ${lanes.join(`
|
|
159164
159164
|
}
|
159165
159165
|
const rightAlignOfLeftPart = maxLength2 + 2;
|
159166
159166
|
const leftAlignOfRightPart = rightAlignOfLeftPart + 2;
|
159167
|
-
let
|
159167
|
+
let lines2 = [];
|
159168
159168
|
for (const option of optionsList) {
|
159169
159169
|
const tmp = generateOptionOutput(sys2, option, rightAlignOfLeftPart, leftAlignOfRightPart);
|
159170
|
-
|
159170
|
+
lines2 = [...lines2, ...tmp];
|
159171
159171
|
}
|
159172
|
-
if (
|
159173
|
-
|
159172
|
+
if (lines2[lines2.length - 2] !== sys2.newLine) {
|
159173
|
+
lines2.push(sys2.newLine);
|
159174
159174
|
}
|
159175
|
-
return
|
159175
|
+
return lines2;
|
159176
159176
|
}
|
159177
159177
|
function generateSectionOptionsOutput(sys2, sectionName, options, subCategory, beforeOptionsDescription, afterOptionsDescription) {
|
159178
159178
|
let res = [];
|
@@ -159207,9 +159207,9 @@ ${lanes.join(`
|
|
159207
159207
|
return res;
|
159208
159208
|
}
|
159209
159209
|
function printEasyHelp(sys2, simpleOptions) {
|
159210
|
-
const
|
159210
|
+
const colors3 = createColors(sys2);
|
159211
159211
|
let output = [...getHeader(sys2, `${getDiagnosticText(Diagnostics.tsc_Colon_The_TypeScript_Compiler)} - ${getDiagnosticText(Diagnostics.Version_0, version)}`)];
|
159212
|
-
output.push(
|
159212
|
+
output.push(colors3.bold(getDiagnosticText(Diagnostics.COMMON_COMMANDS)) + sys2.newLine + sys2.newLine);
|
159213
159213
|
example("tsc", Diagnostics.Compiles_the_current_project_tsconfig_json_in_the_working_directory);
|
159214
159214
|
example("tsc app.ts util.ts", Diagnostics.Ignoring_tsconfig_json_compiles_the_specified_files_with_default_compiler_options);
|
159215
159215
|
example("tsc -b", Diagnostics.Build_a_composite_project_in_the_working_directory);
|
@@ -159230,7 +159230,7 @@ ${lanes.join(`
|
|
159230
159230
|
function example(ex, desc) {
|
159231
159231
|
const examples = typeof ex === "string" ? [ex] : ex;
|
159232
159232
|
for (const example2 of examples) {
|
159233
|
-
output.push(" " +
|
159233
|
+
output.push(" " + colors3.blue(example2) + sys2.newLine);
|
159234
159234
|
}
|
159235
159235
|
output.push(" " + getDiagnosticText(desc) + sys2.newLine + sys2.newLine);
|
159236
159236
|
}
|
@@ -159253,12 +159253,12 @@ ${lanes.join(`
|
|
159253
159253
|
}
|
159254
159254
|
function getHeader(sys2, message) {
|
159255
159255
|
var _a;
|
159256
|
-
const
|
159256
|
+
const colors3 = createColors(sys2);
|
159257
159257
|
const header = [];
|
159258
159258
|
const terminalWidth = ((_a = sys2.getWidthOfTerminal) == null ? undefined : _a.call(sys2)) ?? 0;
|
159259
159259
|
const tsIconLength = 5;
|
159260
|
-
const tsIconFirstLine =
|
159261
|
-
const tsIconSecondLine =
|
159260
|
+
const tsIconFirstLine = colors3.blueBackground("".padStart(tsIconLength));
|
159261
|
+
const tsIconSecondLine = colors3.blueBackground(colors3.brightWhite("TS ".padStart(tsIconLength)));
|
159262
159262
|
if (terminalWidth >= message.length + tsIconLength) {
|
159263
159263
|
const rightAlign = terminalWidth > 120 ? 120 : terminalWidth;
|
159264
159264
|
const leftAlign = rightAlign - tsIconLength;
|
@@ -210964,9 +210964,9 @@ Additional information: BADCLIENT: Bad error code, ${badCode} not found in range
|
|
210964
210964
|
insertedText = this.initialText + this.trailingText;
|
210965
210965
|
}
|
210966
210966
|
const lm = LineIndex.linesFromText(insertedText);
|
210967
|
-
const
|
210968
|
-
if (
|
210969
|
-
|
210967
|
+
const lines2 = lm.lines;
|
210968
|
+
if (lines2.length > 1 && lines2[lines2.length - 1] === "") {
|
210969
|
+
lines2.pop();
|
210970
210970
|
}
|
210971
210971
|
let branchParent;
|
210972
210972
|
let lastZeroCount;
|
@@ -210985,13 +210985,13 @@ Additional information: BADCLIENT: Bad error code, ${badCode} not found in range
|
|
210985
210985
|
branchParent.remove(lastZeroCount);
|
210986
210986
|
}
|
210987
210987
|
const leafNode = this.startPath[this.startPath.length - 1];
|
210988
|
-
if (
|
210989
|
-
leafNode.text =
|
210990
|
-
if (
|
210991
|
-
let insertedNodes = new Array(
|
210988
|
+
if (lines2.length > 0) {
|
210989
|
+
leafNode.text = lines2[0];
|
210990
|
+
if (lines2.length > 1) {
|
210991
|
+
let insertedNodes = new Array(lines2.length - 1);
|
210992
210992
|
let startNode2 = leafNode;
|
210993
|
-
for (let i2 = 1;i2 <
|
210994
|
-
insertedNodes[i2 - 1] = new LineLeaf(
|
210993
|
+
for (let i2 = 1;i2 < lines2.length; i2++) {
|
210994
|
+
insertedNodes[i2 - 1] = new LineLeaf(lines2[i2]);
|
210995
210995
|
}
|
210996
210996
|
let pathIndex = this.startPath.length - 2;
|
210997
210997
|
while (pathIndex >= 0) {
|
@@ -211261,11 +211261,11 @@ Additional information: BADCLIENT: Bad error code, ${badCode} not found in range
|
|
211261
211261
|
return { absolutePosition: this.root.charCount(), lineText: undefined };
|
211262
211262
|
}
|
211263
211263
|
}
|
211264
|
-
load(
|
211265
|
-
if (
|
211264
|
+
load(lines2) {
|
211265
|
+
if (lines2.length > 0) {
|
211266
211266
|
const leaves = [];
|
211267
|
-
for (let i2 = 0;i2 <
|
211268
|
-
leaves[i2] = new LineLeaf(
|
211267
|
+
for (let i2 = 0;i2 < lines2.length; i2++) {
|
211268
|
+
leaves[i2] = new LineLeaf(lines2[i2]);
|
211269
211269
|
}
|
211270
211270
|
this.root = _LineIndex.buildTreeFromBottom(leaves);
|
211271
211271
|
} else {
|
@@ -211368,18 +211368,18 @@ Additional information: BADCLIENT: Bad error code, ${badCode} not found in range
|
|
211368
211368
|
if (lineMap.length === 0) {
|
211369
211369
|
return { lines: [], lineMap };
|
211370
211370
|
}
|
211371
|
-
const
|
211371
|
+
const lines2 = new Array(lineMap.length);
|
211372
211372
|
const lc = lineMap.length - 1;
|
211373
211373
|
for (let lmi = 0;lmi < lc; lmi++) {
|
211374
|
-
|
211374
|
+
lines2[lmi] = text.substring(lineMap[lmi], lineMap[lmi + 1]);
|
211375
211375
|
}
|
211376
211376
|
const endText = text.substring(lineMap[lc]);
|
211377
211377
|
if (endText.length > 0) {
|
211378
|
-
|
211378
|
+
lines2[lc] = endText;
|
211379
211379
|
} else {
|
211380
|
-
|
211380
|
+
lines2.pop();
|
211381
211381
|
}
|
211382
|
-
return { lines, lineMap };
|
211382
|
+
return { lines: lines2, lineMap };
|
211383
211383
|
}
|
211384
211384
|
};
|
211385
211385
|
var LineNode = class _LineNode {
|
@@ -212450,7 +212450,7 @@ async function* streamBody(e4) {
|
|
212450
212450
|
}
|
212451
212451
|
}
|
212452
212452
|
}
|
212453
|
-
async function*
|
212453
|
+
async function* split2(e4, r3) {
|
212454
212454
|
var a4 = "";
|
212455
212455
|
var n3;
|
212456
212456
|
for await (var t4 of e4) {
|
@@ -212484,7 +212484,7 @@ function makeFetchSource(e4, r3, a4) {
|
|
212484
212484
|
var n5 = "--" + (a6 ? a6[1] : "-");
|
212485
212485
|
var t5 = true;
|
212486
212486
|
var i4;
|
212487
|
-
for await (var o4 of
|
212487
|
+
for await (var o4 of split2(streamBody(r5), `\r
|
212488
212488
|
` + n5)) {
|
212489
212489
|
if (t5) {
|
212490
212490
|
t5 = false;
|
@@ -212517,7 +212517,7 @@ function makeFetchSource(e4, r3, a4) {
|
|
212517
212517
|
} else if (/text\/event-stream/i.test(o3)) {
|
212518
212518
|
s2 = async function* parseEventStream(e6) {
|
212519
212519
|
var r5;
|
212520
|
-
for await (var a6 of
|
212520
|
+
for await (var a6 of split2(streamBody(e6), `
|
212521
212521
|
|
212522
212522
|
`)) {
|
212523
212523
|
var n5 = a6.match(S);
|
@@ -232122,8 +232122,8 @@ var require_lib13 = __commonJS((exports, module) => {
|
|
232122
232122
|
function fetch2(input, options) {
|
232123
232123
|
return nodeFetch.fetch(input, options);
|
232124
232124
|
}
|
232125
|
-
for (const
|
232126
|
-
fetch2[
|
232125
|
+
for (const key3 in nodeFetch) {
|
232126
|
+
fetch2[key3] = nodeFetch[key3];
|
232127
232127
|
}
|
232128
232128
|
module.exports = fetch2;
|
232129
232129
|
});
|
@@ -232216,11 +232216,11 @@ var require_proxy = __commonJS((exports) => {
|
|
232216
232216
|
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;
|
232217
232217
|
}
|
232218
232218
|
e10(requireSymbols$4, "requireSymbols$4");
|
232219
|
-
var
|
232219
|
+
var errors3;
|
232220
232220
|
var hasRequiredErrors;
|
232221
232221
|
function requireErrors() {
|
232222
232222
|
if (hasRequiredErrors)
|
232223
|
-
return
|
232223
|
+
return errors3;
|
232224
232224
|
hasRequiredErrors = 1;
|
232225
232225
|
|
232226
232226
|
class A5 extends Error {
|
@@ -232429,7 +232429,7 @@ var require_proxy = __commonJS((exports) => {
|
|
232429
232429
|
super(i6, { cause: k5, ...F3 ?? {} }), this.name = "SecureProxyConnectionError", this.message = i6 || "Secure Proxy Connection failed", this.code = "UND_ERR_PRX_TLS", this.cause = k5;
|
232430
232430
|
}
|
232431
232431
|
}
|
232432
|
-
return
|
232432
|
+
return errors3 = { AbortError: Q4, HTTPParserError: Y4, UndiciError: A5, HeadersTimeoutError: c3, HeadersOverflowError: E6, BodyTimeoutError: t8, RequestContentLengthMismatchError: r6, ConnectTimeoutError: p6, ResponseStatusCodeError: B4, InvalidArgumentError: f5, InvalidReturnValueError: l3, RequestAbortedError: u6, ClientDestroyedError: a7, ClientClosedError: g5, InformationalError: n6, SocketError: d6, NotSupportedError: N7, ResponseContentLengthMismatchError: o8, BalancedPoolMissingUpstreamError: M5, ResponseExceededMaxSizeError: J4, RequestRetryError: V5, ResponseError: H4, SecureProxyConnectionError: h8 }, errors3;
|
232433
232433
|
}
|
232434
232434
|
e10(requireErrors, "requireErrors");
|
232435
232435
|
var constants$4;
|
@@ -242380,11 +242380,11 @@ var require_visit = __commonJS((exports) => {
|
|
242380
242380
|
visit2.BREAK = BREAK;
|
242381
242381
|
visit2.SKIP = SKIP;
|
242382
242382
|
visit2.REMOVE = REMOVE;
|
242383
|
-
function visit_(
|
242384
|
-
const ctrl = callVisitor(
|
242383
|
+
function visit_(key3, node, visitor, path6) {
|
242384
|
+
const ctrl = callVisitor(key3, node, visitor, path6);
|
242385
242385
|
if (identity2.isNode(ctrl) || identity2.isPair(ctrl)) {
|
242386
|
-
replaceNode(
|
242387
|
-
return visit_(
|
242386
|
+
replaceNode(key3, path6, ctrl);
|
242387
|
+
return visit_(key3, ctrl, visitor, path6);
|
242388
242388
|
}
|
242389
242389
|
if (typeof ctrl !== "symbol") {
|
242390
242390
|
if (identity2.isCollection(node)) {
|
@@ -242428,11 +242428,11 @@ var require_visit = __commonJS((exports) => {
|
|
242428
242428
|
visitAsync.BREAK = BREAK;
|
242429
242429
|
visitAsync.SKIP = SKIP;
|
242430
242430
|
visitAsync.REMOVE = REMOVE;
|
242431
|
-
async function visitAsync_(
|
242432
|
-
const ctrl = await callVisitor(
|
242431
|
+
async function visitAsync_(key3, node, visitor, path6) {
|
242432
|
+
const ctrl = await callVisitor(key3, node, visitor, path6);
|
242433
242433
|
if (identity2.isNode(ctrl) || identity2.isPair(ctrl)) {
|
242434
|
-
replaceNode(
|
242435
|
-
return visitAsync_(
|
242434
|
+
replaceNode(key3, path6, ctrl);
|
242435
|
+
return visitAsync_(key3, ctrl, visitor, path6);
|
242436
242436
|
}
|
242437
242437
|
if (typeof ctrl !== "symbol") {
|
242438
242438
|
if (identity2.isCollection(node)) {
|
@@ -242482,27 +242482,27 @@ var require_visit = __commonJS((exports) => {
|
|
242482
242482
|
}
|
242483
242483
|
return visitor;
|
242484
242484
|
}
|
242485
|
-
function callVisitor(
|
242485
|
+
function callVisitor(key3, node, visitor, path6) {
|
242486
242486
|
if (typeof visitor === "function")
|
242487
|
-
return visitor(
|
242487
|
+
return visitor(key3, node, path6);
|
242488
242488
|
if (identity2.isMap(node))
|
242489
|
-
return visitor.Map?.(
|
242489
|
+
return visitor.Map?.(key3, node, path6);
|
242490
242490
|
if (identity2.isSeq(node))
|
242491
|
-
return visitor.Seq?.(
|
242491
|
+
return visitor.Seq?.(key3, node, path6);
|
242492
242492
|
if (identity2.isPair(node))
|
242493
|
-
return visitor.Pair?.(
|
242493
|
+
return visitor.Pair?.(key3, node, path6);
|
242494
242494
|
if (identity2.isScalar(node))
|
242495
|
-
return visitor.Scalar?.(
|
242495
|
+
return visitor.Scalar?.(key3, node, path6);
|
242496
242496
|
if (identity2.isAlias(node))
|
242497
|
-
return visitor.Alias?.(
|
242497
|
+
return visitor.Alias?.(key3, node, path6);
|
242498
242498
|
return;
|
242499
242499
|
}
|
242500
|
-
function replaceNode(
|
242500
|
+
function replaceNode(key3, path6, node) {
|
242501
242501
|
const parent = path6[path6.length - 1];
|
242502
242502
|
if (identity2.isCollection(parent)) {
|
242503
|
-
parent.items[
|
242503
|
+
parent.items[key3] = node;
|
242504
242504
|
} else if (identity2.isPair(parent)) {
|
242505
|
-
if (
|
242505
|
+
if (key3 === "key")
|
242506
242506
|
parent.key = node;
|
242507
242507
|
else
|
242508
242508
|
parent.value = node;
|
@@ -242734,7 +242734,7 @@ var require_anchors = __commonJS((exports) => {
|
|
242734
242734
|
|
242735
242735
|
// ../../node_modules/yaml/dist/doc/applyReviver.js
|
242736
242736
|
var require_applyReviver = __commonJS((exports) => {
|
242737
|
-
function applyReviver(reviver, obj,
|
242737
|
+
function applyReviver(reviver, obj, key3, val) {
|
242738
242738
|
if (val && typeof val === "object") {
|
242739
242739
|
if (Array.isArray(val)) {
|
242740
242740
|
for (let i7 = 0, len = val.length;i7 < len; ++i7) {
|
@@ -242774,7 +242774,7 @@ var require_applyReviver = __commonJS((exports) => {
|
|
242774
242774
|
}
|
242775
242775
|
}
|
242776
242776
|
}
|
242777
|
-
return reviver.call(obj,
|
242777
|
+
return reviver.call(obj, key3, val);
|
242778
242778
|
}
|
242779
242779
|
exports.applyReviver = applyReviver;
|
242780
242780
|
});
|
@@ -243092,29 +243092,29 @@ var require_Collection = __commonJS((exports) => {
|
|
243092
243092
|
if (isEmptyPath(path6))
|
243093
243093
|
this.add(value4);
|
243094
243094
|
else {
|
243095
|
-
const [
|
243096
|
-
const node = this.get(
|
243095
|
+
const [key3, ...rest] = path6;
|
243096
|
+
const node = this.get(key3, true);
|
243097
243097
|
if (identity2.isCollection(node))
|
243098
243098
|
node.addIn(rest, value4);
|
243099
243099
|
else if (node === undefined && this.schema)
|
243100
|
-
this.set(
|
243100
|
+
this.set(key3, collectionFromPath(this.schema, rest, value4));
|
243101
243101
|
else
|
243102
|
-
throw new Error(`Expected YAML collection at ${
|
243102
|
+
throw new Error(`Expected YAML collection at ${key3}. Remaining path: ${rest}`);
|
243103
243103
|
}
|
243104
243104
|
}
|
243105
243105
|
deleteIn(path6) {
|
243106
|
-
const [
|
243106
|
+
const [key3, ...rest] = path6;
|
243107
243107
|
if (rest.length === 0)
|
243108
|
-
return this.delete(
|
243109
|
-
const node = this.get(
|
243108
|
+
return this.delete(key3);
|
243109
|
+
const node = this.get(key3, true);
|
243110
243110
|
if (identity2.isCollection(node))
|
243111
243111
|
return node.deleteIn(rest);
|
243112
243112
|
else
|
243113
|
-
throw new Error(`Expected YAML collection at ${
|
243113
|
+
throw new Error(`Expected YAML collection at ${key3}. Remaining path: ${rest}`);
|
243114
243114
|
}
|
243115
243115
|
getIn(path6, keepScalar) {
|
243116
|
-
const [
|
243117
|
-
const node = this.get(
|
243116
|
+
const [key3, ...rest] = path6;
|
243117
|
+
const node = this.get(key3, true);
|
243118
243118
|
if (rest.length === 0)
|
243119
243119
|
return !keepScalar && identity2.isScalar(node) ? node.value : node;
|
243120
243120
|
else
|
@@ -243129,24 +243129,24 @@ var require_Collection = __commonJS((exports) => {
|
|
243129
243129
|
});
|
243130
243130
|
}
|
243131
243131
|
hasIn(path6) {
|
243132
|
-
const [
|
243132
|
+
const [key3, ...rest] = path6;
|
243133
243133
|
if (rest.length === 0)
|
243134
|
-
return this.has(
|
243135
|
-
const node = this.get(
|
243134
|
+
return this.has(key3);
|
243135
|
+
const node = this.get(key3, true);
|
243136
243136
|
return identity2.isCollection(node) ? node.hasIn(rest) : false;
|
243137
243137
|
}
|
243138
243138
|
setIn(path6, value4) {
|
243139
|
-
const [
|
243139
|
+
const [key3, ...rest] = path6;
|
243140
243140
|
if (rest.length === 0) {
|
243141
|
-
this.set(
|
243141
|
+
this.set(key3, value4);
|
243142
243142
|
} else {
|
243143
|
-
const node = this.get(
|
243143
|
+
const node = this.get(key3, true);
|
243144
243144
|
if (identity2.isCollection(node))
|
243145
243145
|
node.setIn(rest, value4);
|
243146
243146
|
else if (node === undefined && this.schema)
|
243147
|
-
this.set(
|
243147
|
+
this.set(key3, collectionFromPath(this.schema, rest, value4));
|
243148
243148
|
else
|
243149
|
-
throw new Error(`Expected YAML collection at ${
|
243149
|
+
throw new Error(`Expected YAML collection at ${key3}. Remaining path: ${rest}`);
|
243150
243150
|
}
|
243151
243151
|
}
|
243152
243152
|
}
|
@@ -243734,19 +243734,19 @@ var require_stringifyPair = __commonJS((exports) => {
|
|
243734
243734
|
var Scalar = require_Scalar();
|
243735
243735
|
var stringify3 = require_stringify();
|
243736
243736
|
var stringifyComment = require_stringifyComment();
|
243737
|
-
function stringifyPair2({ key:
|
243737
|
+
function stringifyPair2({ key: key3, value: value4 }, ctx, onComment, onChompKeep) {
|
243738
243738
|
const { allNullValues, doc, indent: indent2, indentStep, options: { commentString, indentSeq, simpleKeys } } = ctx;
|
243739
|
-
let keyComment = identity2.isNode(
|
243739
|
+
let keyComment = identity2.isNode(key3) && key3.comment || null;
|
243740
243740
|
if (simpleKeys) {
|
243741
243741
|
if (keyComment) {
|
243742
243742
|
throw new Error("With simple keys, key nodes cannot have comments");
|
243743
243743
|
}
|
243744
|
-
if (identity2.isCollection(
|
243744
|
+
if (identity2.isCollection(key3) || !identity2.isNode(key3) && typeof key3 === "object") {
|
243745
243745
|
const msg = "With simple keys, collection cannot be used as a key value";
|
243746
243746
|
throw new Error(msg);
|
243747
243747
|
}
|
243748
243748
|
}
|
243749
|
-
let explicitKey = !simpleKeys && (!
|
243749
|
+
let explicitKey = !simpleKeys && (!key3 || keyComment && value4 == null && !ctx.inFlow || identity2.isCollection(key3) || (identity2.isScalar(key3) ? key3.type === Scalar.Scalar.BLOCK_FOLDED || key3.type === Scalar.Scalar.BLOCK_LITERAL : typeof key3 === "object"));
|
243750
243750
|
ctx = Object.assign({}, ctx, {
|
243751
243751
|
allNullValues: false,
|
243752
243752
|
implicitKey: !explicitKey && (simpleKeys || !allNullValues),
|
@@ -243754,7 +243754,7 @@ var require_stringifyPair = __commonJS((exports) => {
|
|
243754
243754
|
});
|
243755
243755
|
let keyCommentDone = false;
|
243756
243756
|
let chompKeep = false;
|
243757
|
-
let str = stringify3.stringify(
|
243757
|
+
let str = stringify3.stringify(key3, ctx, () => keyCommentDone = true, () => chompKeep = true);
|
243758
243758
|
if (!explicitKey && !ctx.inFlow && str.length > 1024) {
|
243759
243759
|
if (simpleKeys)
|
243760
243760
|
throw new Error("With simple keys, single line scalar must not span more than 1024 characters");
|
@@ -243898,7 +243898,7 @@ var require_merge = __commonJS((exports) => {
|
|
243898
243898
|
}),
|
243899
243899
|
stringify: () => MERGE_KEY
|
243900
243900
|
};
|
243901
|
-
var isMergeKey = (ctx,
|
243901
|
+
var isMergeKey = (ctx, key3) => (merge3.identify(key3) || identity2.isScalar(key3) && (!key3.type || key3.type === Scalar.Scalar.PLAIN) && merge3.identify(key3.value)) && ctx?.doc.schema.tags.some((tag) => tag.tag === merge3.tag && tag.default);
|
243902
243902
|
function addMergeToJSMap(ctx, map3, value4) {
|
243903
243903
|
value4 = ctx && identity2.isAlias(value4) ? value4.resolve(ctx.doc) : value4;
|
243904
243904
|
if (identity2.isSeq(value4))
|
@@ -243915,14 +243915,14 @@ var require_merge = __commonJS((exports) => {
|
|
243915
243915
|
if (!identity2.isMap(source))
|
243916
243916
|
throw new Error("Merge sources must be maps or map aliases");
|
243917
243917
|
const srcMap = source.toJSON(null, ctx, Map);
|
243918
|
-
for (const [
|
243918
|
+
for (const [key3, value5] of srcMap) {
|
243919
243919
|
if (map3 instanceof Map) {
|
243920
|
-
if (!map3.has(
|
243921
|
-
map3.set(
|
243920
|
+
if (!map3.has(key3))
|
243921
|
+
map3.set(key3, value5);
|
243922
243922
|
} else if (map3 instanceof Set) {
|
243923
|
-
map3.add(
|
243924
|
-
} else if (!Object.prototype.hasOwnProperty.call(map3,
|
243925
|
-
Object.defineProperty(map3,
|
243923
|
+
map3.add(key3);
|
243924
|
+
} else if (!Object.prototype.hasOwnProperty.call(map3, key3)) {
|
243925
|
+
Object.defineProperty(map3, key3, {
|
243926
243926
|
value: value5,
|
243927
243927
|
writable: true,
|
243928
243928
|
enumerable: true,
|
@@ -243944,19 +243944,19 @@ var require_addPairToJSMap = __commonJS((exports) => {
|
|
243944
243944
|
var stringify3 = require_stringify();
|
243945
243945
|
var identity2 = require_identity();
|
243946
243946
|
var toJS = require_toJS();
|
243947
|
-
function addPairToJSMap(ctx, map3, { key:
|
243948
|
-
if (identity2.isNode(
|
243949
|
-
|
243950
|
-
else if (merge3.isMergeKey(ctx,
|
243947
|
+
function addPairToJSMap(ctx, map3, { key: key3, value: value4 }) {
|
243948
|
+
if (identity2.isNode(key3) && key3.addToJSMap)
|
243949
|
+
key3.addToJSMap(ctx, map3, value4);
|
243950
|
+
else if (merge3.isMergeKey(ctx, key3))
|
243951
243951
|
merge3.addMergeToJSMap(ctx, map3, value4);
|
243952
243952
|
else {
|
243953
|
-
const jsKey = toJS.toJS(
|
243953
|
+
const jsKey = toJS.toJS(key3, "", ctx);
|
243954
243954
|
if (map3 instanceof Map) {
|
243955
243955
|
map3.set(jsKey, toJS.toJS(value4, jsKey, ctx));
|
243956
243956
|
} else if (map3 instanceof Set) {
|
243957
243957
|
map3.add(jsKey);
|
243958
243958
|
} else {
|
243959
|
-
const stringKey = stringifyKey(
|
243959
|
+
const stringKey = stringifyKey(key3, jsKey, ctx);
|
243960
243960
|
const jsValue = toJS.toJS(value4, stringKey, ctx);
|
243961
243961
|
if (stringKey in map3)
|
243962
243962
|
Object.defineProperty(map3, stringKey, {
|
@@ -243971,19 +243971,19 @@ var require_addPairToJSMap = __commonJS((exports) => {
|
|
243971
243971
|
}
|
243972
243972
|
return map3;
|
243973
243973
|
}
|
243974
|
-
function stringifyKey(
|
243974
|
+
function stringifyKey(key3, jsKey, ctx) {
|
243975
243975
|
if (jsKey === null)
|
243976
243976
|
return "";
|
243977
243977
|
if (typeof jsKey !== "object")
|
243978
243978
|
return String(jsKey);
|
243979
|
-
if (identity2.isNode(
|
243979
|
+
if (identity2.isNode(key3) && ctx?.doc) {
|
243980
243980
|
const strCtx = stringify3.createStringifyContext(ctx.doc, {});
|
243981
243981
|
strCtx.anchors = new Set;
|
243982
243982
|
for (const node of ctx.anchors.keys())
|
243983
243983
|
strCtx.anchors.add(node.anchor);
|
243984
243984
|
strCtx.inFlow = true;
|
243985
243985
|
strCtx.inStringifyKey = true;
|
243986
|
-
const strKey =
|
243986
|
+
const strKey = key3.toString(strCtx);
|
243987
243987
|
if (!ctx.mapKeyWarned) {
|
243988
243988
|
let jsonStr = JSON.stringify(strKey);
|
243989
243989
|
if (jsonStr.length > 40)
|
@@ -244004,25 +244004,25 @@ var require_Pair = __commonJS((exports) => {
|
|
244004
244004
|
var stringifyPair2 = require_stringifyPair();
|
244005
244005
|
var addPairToJSMap = require_addPairToJSMap();
|
244006
244006
|
var identity2 = require_identity();
|
244007
|
-
function createPair(
|
244008
|
-
const k6 = createNode.createNode(
|
244007
|
+
function createPair(key3, value4, ctx) {
|
244008
|
+
const k6 = createNode.createNode(key3, undefined, ctx);
|
244009
244009
|
const v7 = createNode.createNode(value4, undefined, ctx);
|
244010
244010
|
return new Pair(k6, v7);
|
244011
244011
|
}
|
244012
244012
|
|
244013
244013
|
class Pair {
|
244014
|
-
constructor(
|
244014
|
+
constructor(key3, value4 = null) {
|
244015
244015
|
Object.defineProperty(this, identity2.NODE_TYPE, { value: identity2.PAIR });
|
244016
|
-
this.key =
|
244016
|
+
this.key = key3;
|
244017
244017
|
this.value = value4;
|
244018
244018
|
}
|
244019
244019
|
clone(schema) {
|
244020
|
-
let { key:
|
244021
|
-
if (identity2.isNode(
|
244022
|
-
|
244020
|
+
let { key: key3, value: value4 } = this;
|
244021
|
+
if (identity2.isNode(key3))
|
244022
|
+
key3 = key3.clone(schema);
|
244023
244023
|
if (identity2.isNode(value4))
|
244024
244024
|
value4 = value4.clone(schema);
|
244025
|
-
return new Pair(
|
244025
|
+
return new Pair(key3, value4);
|
244026
244026
|
}
|
244027
244027
|
toJSON(_6, ctx) {
|
244028
244028
|
const pair = ctx?.mapAsMap ? new Map : {};
|
@@ -244189,11 +244189,11 @@ var require_YAMLMap = __commonJS((exports) => {
|
|
244189
244189
|
var identity2 = require_identity();
|
244190
244190
|
var Pair = require_Pair();
|
244191
244191
|
var Scalar = require_Scalar();
|
244192
|
-
function findPair(items,
|
244193
|
-
const k6 = identity2.isScalar(
|
244192
|
+
function findPair(items, key3) {
|
244193
|
+
const k6 = identity2.isScalar(key3) ? key3.value : key3;
|
244194
244194
|
for (const it2 of items) {
|
244195
244195
|
if (identity2.isPair(it2)) {
|
244196
|
-
if (it2.key ===
|
244196
|
+
if (it2.key === key3 || it2.key === k6)
|
244197
244197
|
return it2;
|
244198
244198
|
if (identity2.isScalar(it2.key) && it2.key.value === k6)
|
244199
244199
|
return it2;
|
@@ -244213,20 +244213,20 @@ var require_YAMLMap = __commonJS((exports) => {
|
|
244213
244213
|
static from(schema, obj, ctx) {
|
244214
244214
|
const { keepUndefined, replacer } = ctx;
|
244215
244215
|
const map3 = new this(schema);
|
244216
|
-
const add = (
|
244216
|
+
const add = (key3, value4) => {
|
244217
244217
|
if (typeof replacer === "function")
|
244218
|
-
value4 = replacer.call(obj,
|
244219
|
-
else if (Array.isArray(replacer) && !replacer.includes(
|
244218
|
+
value4 = replacer.call(obj, key3, value4);
|
244219
|
+
else if (Array.isArray(replacer) && !replacer.includes(key3))
|
244220
244220
|
return;
|
244221
244221
|
if (value4 !== undefined || keepUndefined)
|
244222
|
-
map3.items.push(Pair.createPair(
|
244222
|
+
map3.items.push(Pair.createPair(key3, value4, ctx));
|
244223
244223
|
};
|
244224
244224
|
if (obj instanceof Map) {
|
244225
|
-
for (const [
|
244226
|
-
add(
|
244225
|
+
for (const [key3, value4] of obj)
|
244226
|
+
add(key3, value4);
|
244227
244227
|
} else if (obj && typeof obj === "object") {
|
244228
|
-
for (const
|
244229
|
-
add(
|
244228
|
+
for (const key3 of Object.keys(obj))
|
244229
|
+
add(key3, obj[key3]);
|
244230
244230
|
}
|
244231
244231
|
if (typeof schema.sortMapEntries === "function") {
|
244232
244232
|
map3.items.sort(schema.sortMapEntries);
|
@@ -244260,23 +244260,23 @@ var require_YAMLMap = __commonJS((exports) => {
|
|
244260
244260
|
this.items.push(_pair);
|
244261
244261
|
}
|
244262
244262
|
}
|
244263
|
-
delete(
|
244264
|
-
const it2 = findPair(this.items,
|
244263
|
+
delete(key3) {
|
244264
|
+
const it2 = findPair(this.items, key3);
|
244265
244265
|
if (!it2)
|
244266
244266
|
return false;
|
244267
244267
|
const del = this.items.splice(this.items.indexOf(it2), 1);
|
244268
244268
|
return del.length > 0;
|
244269
244269
|
}
|
244270
|
-
get(
|
244271
|
-
const it2 = findPair(this.items,
|
244270
|
+
get(key3, keepScalar) {
|
244271
|
+
const it2 = findPair(this.items, key3);
|
244272
244272
|
const node = it2?.value;
|
244273
244273
|
return (!keepScalar && identity2.isScalar(node) ? node.value : node) ?? undefined;
|
244274
244274
|
}
|
244275
|
-
has(
|
244276
|
-
return !!findPair(this.items,
|
244275
|
+
has(key3) {
|
244276
|
+
return !!findPair(this.items, key3);
|
244277
244277
|
}
|
244278
|
-
set(
|
244279
|
-
this.add(new Pair.Pair(
|
244278
|
+
set(key3, value4) {
|
244279
|
+
this.add(new Pair.Pair(key3, value4), true);
|
244280
244280
|
}
|
244281
244281
|
toJSON(_6, ctx, Type) {
|
244282
244282
|
const map3 = Type ? new Type : ctx?.mapAsMap ? new Map : {};
|
@@ -244347,28 +244347,28 @@ var require_YAMLSeq = __commonJS((exports) => {
|
|
244347
244347
|
add(value4) {
|
244348
244348
|
this.items.push(value4);
|
244349
244349
|
}
|
244350
|
-
delete(
|
244351
|
-
const idx = asItemIndex(
|
244350
|
+
delete(key3) {
|
244351
|
+
const idx = asItemIndex(key3);
|
244352
244352
|
if (typeof idx !== "number")
|
244353
244353
|
return false;
|
244354
244354
|
const del = this.items.splice(idx, 1);
|
244355
244355
|
return del.length > 0;
|
244356
244356
|
}
|
244357
|
-
get(
|
244358
|
-
const idx = asItemIndex(
|
244357
|
+
get(key3, keepScalar) {
|
244358
|
+
const idx = asItemIndex(key3);
|
244359
244359
|
if (typeof idx !== "number")
|
244360
244360
|
return;
|
244361
244361
|
const it2 = this.items[idx];
|
244362
244362
|
return !keepScalar && identity2.isScalar(it2) ? it2.value : it2;
|
244363
244363
|
}
|
244364
|
-
has(
|
244365
|
-
const idx = asItemIndex(
|
244364
|
+
has(key3) {
|
244365
|
+
const idx = asItemIndex(key3);
|
244366
244366
|
return typeof idx === "number" && idx < this.items.length;
|
244367
244367
|
}
|
244368
|
-
set(
|
244369
|
-
const idx = asItemIndex(
|
244368
|
+
set(key3, value4) {
|
244369
|
+
const idx = asItemIndex(key3);
|
244370
244370
|
if (typeof idx !== "number")
|
244371
|
-
throw new Error(`Expected a valid index, not ${
|
244371
|
+
throw new Error(`Expected a valid index, not ${key3}.`);
|
244372
244372
|
const prev = this.items[idx];
|
244373
244373
|
if (identity2.isScalar(prev) && Scalar.isScalarValue(value4))
|
244374
244374
|
prev.value = value4;
|
@@ -244402,8 +244402,8 @@ var require_YAMLSeq = __commonJS((exports) => {
|
|
244402
244402
|
let i7 = 0;
|
244403
244403
|
for (let it2 of obj) {
|
244404
244404
|
if (typeof replacer === "function") {
|
244405
|
-
const
|
244406
|
-
it2 = replacer.call(obj,
|
244405
|
+
const key3 = obj instanceof Set ? it2 : String(i7++);
|
244406
|
+
it2 = replacer.call(obj, key3, it2);
|
244407
244407
|
}
|
244408
244408
|
seq.items.push(createNode.createNode(it2, undefined, ctx));
|
244409
244409
|
}
|
@@ -244411,8 +244411,8 @@ var require_YAMLSeq = __commonJS((exports) => {
|
|
244411
244411
|
return seq;
|
244412
244412
|
}
|
244413
244413
|
}
|
244414
|
-
function asItemIndex(
|
244415
|
-
let idx = identity2.isScalar(
|
244414
|
+
function asItemIndex(key3) {
|
244415
|
+
let idx = identity2.isScalar(key3) ? key3.value : key3;
|
244416
244416
|
if (idx && typeof idx === "string")
|
244417
244417
|
idx = Number(idx);
|
244418
244418
|
return typeof idx === "number" && Number.isInteger(idx) && idx >= 0 ? idx : null;
|
@@ -244786,25 +244786,25 @@ ${cn.comment}` : item.comment;
|
|
244786
244786
|
for (let it2 of iterable) {
|
244787
244787
|
if (typeof replacer === "function")
|
244788
244788
|
it2 = replacer.call(iterable, String(i7++), it2);
|
244789
|
-
let
|
244789
|
+
let key3, value4;
|
244790
244790
|
if (Array.isArray(it2)) {
|
244791
244791
|
if (it2.length === 2) {
|
244792
|
-
|
244792
|
+
key3 = it2[0];
|
244793
244793
|
value4 = it2[1];
|
244794
244794
|
} else
|
244795
244795
|
throw new TypeError(`Expected [key, value] tuple: ${it2}`);
|
244796
244796
|
} else if (it2 && it2 instanceof Object) {
|
244797
244797
|
const keys = Object.keys(it2);
|
244798
244798
|
if (keys.length === 1) {
|
244799
|
-
|
244800
|
-
value4 = it2[
|
244799
|
+
key3 = keys[0];
|
244800
|
+
value4 = it2[key3];
|
244801
244801
|
} else {
|
244802
244802
|
throw new TypeError(`Expected tuple with one key, not ${keys.length} keys`);
|
244803
244803
|
}
|
244804
244804
|
} else {
|
244805
|
-
|
244805
|
+
key3 = it2;
|
244806
244806
|
}
|
244807
|
-
pairs2.items.push(Pair.createPair(
|
244807
|
+
pairs2.items.push(Pair.createPair(key3, value4, ctx));
|
244808
244808
|
}
|
244809
244809
|
return pairs2;
|
244810
244810
|
}
|
@@ -244845,16 +244845,16 @@ var require_omap = __commonJS((exports) => {
|
|
244845
244845
|
if (ctx?.onCreate)
|
244846
244846
|
ctx.onCreate(map3);
|
244847
244847
|
for (const pair of this.items) {
|
244848
|
-
let
|
244848
|
+
let key3, value4;
|
244849
244849
|
if (identity2.isPair(pair)) {
|
244850
|
-
|
244851
|
-
value4 = toJS.toJS(pair.value,
|
244850
|
+
key3 = toJS.toJS(pair.key, "", ctx);
|
244851
|
+
value4 = toJS.toJS(pair.value, key3, ctx);
|
244852
244852
|
} else {
|
244853
|
-
|
244853
|
+
key3 = toJS.toJS(pair, "", ctx);
|
244854
244854
|
}
|
244855
|
-
if (map3.has(
|
244855
|
+
if (map3.has(key3))
|
244856
244856
|
throw new Error("Ordered maps must not include duplicate keys");
|
244857
|
-
map3.set(
|
244857
|
+
map3.set(key3, value4);
|
244858
244858
|
}
|
244859
244859
|
return map3;
|
244860
244860
|
}
|
@@ -244875,12 +244875,12 @@ var require_omap = __commonJS((exports) => {
|
|
244875
244875
|
resolve(seq, onError) {
|
244876
244876
|
const pairs$1 = pairs.resolvePairs(seq, onError);
|
244877
244877
|
const seenKeys = [];
|
244878
|
-
for (const { key:
|
244879
|
-
if (identity2.isScalar(
|
244880
|
-
if (seenKeys.includes(
|
244881
|
-
onError(`Ordered maps must not include duplicate keys: ${
|
244878
|
+
for (const { key: key3 } of pairs$1.items) {
|
244879
|
+
if (identity2.isScalar(key3)) {
|
244880
|
+
if (seenKeys.includes(key3.value)) {
|
244881
|
+
onError(`Ordered maps must not include duplicate keys: ${key3.value}`);
|
244882
244882
|
} else {
|
244883
|
-
seenKeys.push(
|
244883
|
+
seenKeys.push(key3.value);
|
244884
244884
|
}
|
244885
244885
|
}
|
244886
244886
|
}
|
@@ -245054,30 +245054,30 @@ var require_set = __commonJS((exports) => {
|
|
245054
245054
|
super(schema);
|
245055
245055
|
this.tag = YAMLSet.tag;
|
245056
245056
|
}
|
245057
|
-
add(
|
245057
|
+
add(key3) {
|
245058
245058
|
let pair;
|
245059
|
-
if (identity2.isPair(
|
245060
|
-
pair =
|
245061
|
-
else if (
|
245062
|
-
pair = new Pair.Pair(
|
245059
|
+
if (identity2.isPair(key3))
|
245060
|
+
pair = key3;
|
245061
|
+
else if (key3 && typeof key3 === "object" && "key" in key3 && "value" in key3 && key3.value === null)
|
245062
|
+
pair = new Pair.Pair(key3.key, null);
|
245063
245063
|
else
|
245064
|
-
pair = new Pair.Pair(
|
245064
|
+
pair = new Pair.Pair(key3, null);
|
245065
245065
|
const prev = YAMLMap.findPair(this.items, pair.key);
|
245066
245066
|
if (!prev)
|
245067
245067
|
this.items.push(pair);
|
245068
245068
|
}
|
245069
|
-
get(
|
245070
|
-
const pair = YAMLMap.findPair(this.items,
|
245069
|
+
get(key3, keepPair) {
|
245070
|
+
const pair = YAMLMap.findPair(this.items, key3);
|
245071
245071
|
return !keepPair && identity2.isPair(pair) ? identity2.isScalar(pair.key) ? pair.key.value : pair.key : pair;
|
245072
245072
|
}
|
245073
|
-
set(
|
245073
|
+
set(key3, value4) {
|
245074
245074
|
if (typeof value4 !== "boolean")
|
245075
245075
|
throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof value4}`);
|
245076
|
-
const prev = YAMLMap.findPair(this.items,
|
245076
|
+
const prev = YAMLMap.findPair(this.items, key3);
|
245077
245077
|
if (prev && !value4) {
|
245078
245078
|
this.items.splice(this.items.indexOf(prev), 1);
|
245079
245079
|
} else if (!prev && value4) {
|
245080
|
-
this.items.push(new Pair.Pair(
|
245080
|
+
this.items.push(new Pair.Pair(key3));
|
245081
245081
|
}
|
245082
245082
|
}
|
245083
245083
|
toJSON(_6, ctx) {
|
@@ -245312,7 +245312,7 @@ var require_tags = __commonJS((exports) => {
|
|
245312
245312
|
if (Array.isArray(customTags))
|
245313
245313
|
tags = [];
|
245314
245314
|
else {
|
245315
|
-
const keys = Array.from(schemas.keys()).filter((
|
245315
|
+
const keys = Array.from(schemas.keys()).filter((key3) => key3 !== "yaml11").map((key3) => JSON.stringify(key3)).join(", ");
|
245316
245316
|
throw new Error(`Unknown schema "${schemaName}"; use one of ${keys} or define customTags array`);
|
245317
245317
|
}
|
245318
245318
|
}
|
@@ -245328,7 +245328,7 @@ var require_tags = __commonJS((exports) => {
|
|
245328
245328
|
const tagObj = typeof tag === "string" ? tagsByName[tag] : tag;
|
245329
245329
|
if (!tagObj) {
|
245330
245330
|
const tagName = JSON.stringify(tag);
|
245331
|
-
const keys = Object.keys(tagsByName).map((
|
245331
|
+
const keys = Object.keys(tagsByName).map((key3) => JSON.stringify(key3)).join(", ");
|
245332
245332
|
throw new Error(`Unknown custom tag ${tagName}; use one of ${keys}`);
|
245333
245333
|
}
|
245334
245334
|
if (!tags2.includes(tagObj))
|
@@ -245563,13 +245563,13 @@ var require_Document = __commonJS((exports) => {
|
|
245563
245563
|
setAnchors();
|
245564
245564
|
return node;
|
245565
245565
|
}
|
245566
|
-
createPair(
|
245567
|
-
const k6 = this.createNode(
|
245566
|
+
createPair(key3, value4, options = {}) {
|
245567
|
+
const k6 = this.createNode(key3, null, options);
|
245568
245568
|
const v7 = this.createNode(value4, null, options);
|
245569
245569
|
return new Pair.Pair(k6, v7);
|
245570
245570
|
}
|
245571
|
-
delete(
|
245572
|
-
return assertCollection(this.contents) ? this.contents.delete(
|
245571
|
+
delete(key3) {
|
245572
|
+
return assertCollection(this.contents) ? this.contents.delete(key3) : false;
|
245573
245573
|
}
|
245574
245574
|
deleteIn(path6) {
|
245575
245575
|
if (Collection.isEmptyPath(path6)) {
|
@@ -245580,27 +245580,27 @@ var require_Document = __commonJS((exports) => {
|
|
245580
245580
|
}
|
245581
245581
|
return assertCollection(this.contents) ? this.contents.deleteIn(path6) : false;
|
245582
245582
|
}
|
245583
|
-
get(
|
245584
|
-
return identity2.isCollection(this.contents) ? this.contents.get(
|
245583
|
+
get(key3, keepScalar) {
|
245584
|
+
return identity2.isCollection(this.contents) ? this.contents.get(key3, keepScalar) : undefined;
|
245585
245585
|
}
|
245586
245586
|
getIn(path6, keepScalar) {
|
245587
245587
|
if (Collection.isEmptyPath(path6))
|
245588
245588
|
return !keepScalar && identity2.isScalar(this.contents) ? this.contents.value : this.contents;
|
245589
245589
|
return identity2.isCollection(this.contents) ? this.contents.getIn(path6, keepScalar) : undefined;
|
245590
245590
|
}
|
245591
|
-
has(
|
245592
|
-
return identity2.isCollection(this.contents) ? this.contents.has(
|
245591
|
+
has(key3) {
|
245592
|
+
return identity2.isCollection(this.contents) ? this.contents.has(key3) : false;
|
245593
245593
|
}
|
245594
245594
|
hasIn(path6) {
|
245595
245595
|
if (Collection.isEmptyPath(path6))
|
245596
245596
|
return this.contents !== undefined;
|
245597
245597
|
return identity2.isCollection(this.contents) ? this.contents.hasIn(path6) : false;
|
245598
245598
|
}
|
245599
|
-
set(
|
245599
|
+
set(key3, value4) {
|
245600
245600
|
if (this.contents == null) {
|
245601
|
-
this.contents = Collection.collectionFromPath(this.schema, [
|
245601
|
+
this.contents = Collection.collectionFromPath(this.schema, [key3], value4);
|
245602
245602
|
} else if (assertCollection(this.contents)) {
|
245603
|
-
this.contents.set(
|
245603
|
+
this.contents.set(key3, value4);
|
245604
245604
|
}
|
245605
245605
|
}
|
245606
245606
|
setIn(path6, value4) {
|
@@ -245884,25 +245884,25 @@ var require_resolve_props = __commonJS((exports) => {
|
|
245884
245884
|
|
245885
245885
|
// ../../node_modules/yaml/dist/compose/util-contains-newline.js
|
245886
245886
|
var require_util_contains_newline = __commonJS((exports) => {
|
245887
|
-
function containsNewline(
|
245888
|
-
if (!
|
245887
|
+
function containsNewline(key3) {
|
245888
|
+
if (!key3)
|
245889
245889
|
return null;
|
245890
|
-
switch (
|
245890
|
+
switch (key3.type) {
|
245891
245891
|
case "alias":
|
245892
245892
|
case "scalar":
|
245893
245893
|
case "double-quoted-scalar":
|
245894
245894
|
case "single-quoted-scalar":
|
245895
|
-
if (
|
245895
|
+
if (key3.source.includes(`
|
245896
245896
|
`))
|
245897
245897
|
return true;
|
245898
|
-
if (
|
245899
|
-
for (const st2 of
|
245898
|
+
if (key3.end) {
|
245899
|
+
for (const st2 of key3.end)
|
245900
245900
|
if (st2.type === "newline")
|
245901
245901
|
return true;
|
245902
245902
|
}
|
245903
245903
|
return false;
|
245904
245904
|
case "flow-collection":
|
245905
|
-
for (const it2 of
|
245905
|
+
for (const it2 of key3.items) {
|
245906
245906
|
for (const st2 of it2.start)
|
245907
245907
|
if (st2.type === "newline")
|
245908
245908
|
return true;
|
@@ -245967,10 +245967,10 @@ var require_resolve_block_map = __commonJS((exports) => {
|
|
245967
245967
|
let offset = bm.offset;
|
245968
245968
|
let commentEnd = null;
|
245969
245969
|
for (const collItem of bm.items) {
|
245970
|
-
const { start: start3, key:
|
245970
|
+
const { start: start3, key: key3, sep: sep3, value: value4 } = collItem;
|
245971
245971
|
const keyProps = resolveProps.resolveProps(start3, {
|
245972
245972
|
indicator: "explicit-key-ind",
|
245973
|
-
next:
|
245973
|
+
next: key3 ?? sep3?.[0],
|
245974
245974
|
offset,
|
245975
245975
|
onError,
|
245976
245976
|
parentIndent: bm.indent,
|
@@ -245978,10 +245978,10 @@ var require_resolve_block_map = __commonJS((exports) => {
|
|
245978
245978
|
});
|
245979
245979
|
const implicitKey = !keyProps.found;
|
245980
245980
|
if (implicitKey) {
|
245981
|
-
if (
|
245982
|
-
if (
|
245981
|
+
if (key3) {
|
245982
|
+
if (key3.type === "block-seq")
|
245983
245983
|
onError(offset, "BLOCK_AS_IMPLICIT_KEY", "A block sequence may not be used as an implicit map key");
|
245984
|
-
else if ("indent" in
|
245984
|
+
else if ("indent" in key3 && key3.indent !== bm.indent)
|
245985
245985
|
onError(offset, "BAD_INDENT", startColMsg);
|
245986
245986
|
}
|
245987
245987
|
if (!keyProps.anchor && !keyProps.tag && !sep3) {
|
@@ -245995,17 +245995,17 @@ var require_resolve_block_map = __commonJS((exports) => {
|
|
245995
245995
|
}
|
245996
245996
|
continue;
|
245997
245997
|
}
|
245998
|
-
if (keyProps.newlineAfterProp || utilContainsNewline.containsNewline(
|
245999
|
-
onError(
|
245998
|
+
if (keyProps.newlineAfterProp || utilContainsNewline.containsNewline(key3)) {
|
245999
|
+
onError(key3 ?? start3[start3.length - 1], "MULTILINE_IMPLICIT_KEY", "Implicit keys need to be on a single line");
|
246000
246000
|
}
|
246001
246001
|
} else if (keyProps.found?.indent !== bm.indent) {
|
246002
246002
|
onError(offset, "BAD_INDENT", startColMsg);
|
246003
246003
|
}
|
246004
246004
|
ctx.atKey = true;
|
246005
246005
|
const keyStart = keyProps.end;
|
246006
|
-
const keyNode =
|
246006
|
+
const keyNode = key3 ? composeNode(ctx, key3, keyProps, onError) : composeEmptyNode(ctx, keyStart, start3, null, keyProps, onError);
|
246007
246007
|
if (ctx.schema.compat)
|
246008
|
-
utilFlowIndentCheck.flowIndentCheck(bm.indent,
|
246008
|
+
utilFlowIndentCheck.flowIndentCheck(bm.indent, key3, onError);
|
246009
246009
|
ctx.atKey = false;
|
246010
246010
|
if (utilMapIncludes.mapIncludes(ctx, map3.items, keyNode))
|
246011
246011
|
onError(keyStart, "DUPLICATE_KEY", "Map keys must be unique");
|
@@ -246015,7 +246015,7 @@ var require_resolve_block_map = __commonJS((exports) => {
|
|
246015
246015
|
offset: keyNode.range[2],
|
246016
246016
|
onError,
|
246017
246017
|
parentIndent: bm.indent,
|
246018
|
-
startOnNewline: !
|
246018
|
+
startOnNewline: !key3 || key3.type === "block-scalar"
|
246019
246019
|
});
|
246020
246020
|
offset = valueProps.end;
|
246021
246021
|
if (valueProps.found) {
|
@@ -246171,11 +246171,11 @@ var require_resolve_flow_collection = __commonJS((exports) => {
|
|
246171
246171
|
let offset = fc.offset + fc.start.source.length;
|
246172
246172
|
for (let i7 = 0;i7 < fc.items.length; ++i7) {
|
246173
246173
|
const collItem = fc.items[i7];
|
246174
|
-
const { start: start3, key:
|
246174
|
+
const { start: start3, key: key3, sep: sep3, value: value4 } = collItem;
|
246175
246175
|
const props = resolveProps.resolveProps(start3, {
|
246176
246176
|
flow: fcName,
|
246177
246177
|
indicator: "explicit-key-ind",
|
246178
|
-
next:
|
246178
|
+
next: key3 ?? sep3?.[0],
|
246179
246179
|
offset,
|
246180
246180
|
onError,
|
246181
246181
|
parentIndent: fc.indent,
|
@@ -246197,8 +246197,8 @@ var require_resolve_flow_collection = __commonJS((exports) => {
|
|
246197
246197
|
offset = props.end;
|
246198
246198
|
continue;
|
246199
246199
|
}
|
246200
|
-
if (!isMap && ctx.options.strict && utilContainsNewline.containsNewline(
|
246201
|
-
onError(
|
246200
|
+
if (!isMap && ctx.options.strict && utilContainsNewline.containsNewline(key3))
|
246201
|
+
onError(key3, "MULTILINE_IMPLICIT_KEY", "Implicit keys of flow sequence pairs need to be on a single line");
|
246202
246202
|
}
|
246203
246203
|
if (i7 === 0) {
|
246204
246204
|
if (props.comma)
|
@@ -246243,8 +246243,8 @@ var require_resolve_flow_collection = __commonJS((exports) => {
|
|
246243
246243
|
} else {
|
246244
246244
|
ctx.atKey = true;
|
246245
246245
|
const keyStart = props.end;
|
246246
|
-
const keyNode =
|
246247
|
-
if (isBlock(
|
246246
|
+
const keyNode = key3 ? composeNode(ctx, key3, props, onError) : composeEmptyNode(ctx, keyStart, start3, null, props, onError);
|
246247
|
+
if (isBlock(key3))
|
246248
246248
|
onError(keyNode.range, "BLOCK_IN_FLOW", blockMsg);
|
246249
246249
|
ctx.atKey = false;
|
246250
246250
|
const valueProps = resolveProps.resolveProps(sep3 ?? [], {
|
@@ -247056,7 +247056,7 @@ var require_composer = __commonJS((exports) => {
|
|
247056
247056
|
var node_process = __require("node:process");
|
247057
247057
|
var directives4 = require_directives2();
|
247058
247058
|
var Document = require_Document();
|
247059
|
-
var
|
247059
|
+
var errors3 = require_errors3();
|
247060
247060
|
var identity2 = require_identity();
|
247061
247061
|
var composeDoc = require_compose_doc();
|
247062
247062
|
var resolveEnd = require_resolve_end();
|
@@ -247107,9 +247107,9 @@ var require_composer = __commonJS((exports) => {
|
|
247107
247107
|
this.onError = (source, code2, message, warning) => {
|
247108
247108
|
const pos = getErrorPos(source);
|
247109
247109
|
if (warning)
|
247110
|
-
this.warnings.push(new
|
247110
|
+
this.warnings.push(new errors3.YAMLWarning(pos, code2, message));
|
247111
247111
|
else
|
247112
|
-
this.errors.push(new
|
247112
|
+
this.errors.push(new errors3.YAMLParseError(pos, code2, message));
|
247113
247113
|
};
|
247114
247114
|
this.directives = new directives4.Directives({ version: options.version || "1.2" });
|
247115
247115
|
this.options = options;
|
@@ -247193,7 +247193,7 @@ ${cb}` : comment;
|
|
247193
247193
|
break;
|
247194
247194
|
case "error": {
|
247195
247195
|
const msg = token.source ? `${token.message}: ${JSON.stringify(token.source)}` : token.message;
|
247196
|
-
const error5 = new
|
247196
|
+
const error5 = new errors3.YAMLParseError(getErrorPos(token), "UNEXPECTED_TOKEN", msg);
|
247197
247197
|
if (this.atDirectives || !this.doc)
|
247198
247198
|
this.errors.push(error5);
|
247199
247199
|
else
|
@@ -247203,7 +247203,7 @@ ${cb}` : comment;
|
|
247203
247203
|
case "doc-end": {
|
247204
247204
|
if (!this.doc) {
|
247205
247205
|
const msg = "Unexpected doc-end without preceding document";
|
247206
|
-
this.errors.push(new
|
247206
|
+
this.errors.push(new errors3.YAMLParseError(getErrorPos(token), "UNEXPECTED_TOKEN", msg));
|
247207
247207
|
break;
|
247208
247208
|
}
|
247209
247209
|
this.doc.directives.docEnd = true;
|
@@ -247218,7 +247218,7 @@ ${end.comment}` : end.comment;
|
|
247218
247218
|
break;
|
247219
247219
|
}
|
247220
247220
|
default:
|
247221
|
-
this.errors.push(new
|
247221
|
+
this.errors.push(new errors3.YAMLParseError(getErrorPos(token), "UNEXPECTED_TOKEN", `Unsupported token ${token.type}`));
|
247222
247222
|
}
|
247223
247223
|
}
|
247224
247224
|
*end(forceDoc = false, endOffset = -1) {
|
@@ -247244,7 +247244,7 @@ ${end.comment}` : end.comment;
|
|
247244
247244
|
var require_cst_scalar = __commonJS((exports) => {
|
247245
247245
|
var resolveBlockScalar = require_resolve_block_scalar();
|
247246
247246
|
var resolveFlowScalar = require_resolve_flow_scalar();
|
247247
|
-
var
|
247247
|
+
var errors3 = require_errors3();
|
247248
247248
|
var stringifyString = require_stringifyString();
|
247249
247249
|
function resolveAsScalar(token, strict = true, onError) {
|
247250
247250
|
if (token) {
|
@@ -247253,7 +247253,7 @@ var require_cst_scalar = __commonJS((exports) => {
|
|
247253
247253
|
if (onError)
|
247254
247254
|
onError(offset, code2, message);
|
247255
247255
|
else
|
247256
|
-
throw new
|
247256
|
+
throw new errors3.YAMLParseError([offset, offset + 1], code2, message);
|
247257
247257
|
};
|
247258
247258
|
switch (token.type) {
|
247259
247259
|
case "scalar":
|
@@ -247367,9 +247367,9 @@ var require_cst_scalar = __commonJS((exports) => {
|
|
247367
247367
|
if (!addEndtoBlockProps(props, "end" in token ? token.end : undefined))
|
247368
247368
|
props.push({ type: "newline", offset: -1, indent: indent2, source: `
|
247369
247369
|
` });
|
247370
|
-
for (const
|
247371
|
-
if (
|
247372
|
-
delete token[
|
247370
|
+
for (const key3 of Object.keys(token))
|
247371
|
+
if (key3 !== "type" && key3 !== "offset")
|
247372
|
+
delete token[key3];
|
247373
247373
|
Object.assign(token, { type: "block-scalar", indent: indent2, props, source: body });
|
247374
247374
|
}
|
247375
247375
|
}
|
@@ -247418,9 +247418,9 @@ var require_cst_scalar = __commonJS((exports) => {
|
|
247418
247418
|
default: {
|
247419
247419
|
const indent2 = "indent" in token ? token.indent : -1;
|
247420
247420
|
const end = "end" in token && Array.isArray(token.end) ? token.end.filter((st2) => st2.type === "space" || st2.type === "comment" || st2.type === "newline") : [];
|
247421
|
-
for (const
|
247422
|
-
if (
|
247423
|
-
delete token[
|
247421
|
+
for (const key3 of Object.keys(token))
|
247422
|
+
if (key3 !== "type" && key3 !== "offset")
|
247423
|
+
delete token[key3];
|
247424
247424
|
Object.assign(token, { type: type4, indent: indent2, source, end });
|
247425
247425
|
}
|
247426
247426
|
}
|
@@ -247472,12 +247472,12 @@ var require_cst_stringify = __commonJS((exports) => {
|
|
247472
247472
|
}
|
247473
247473
|
}
|
247474
247474
|
}
|
247475
|
-
function stringifyItem({ start: start3, key:
|
247475
|
+
function stringifyItem({ start: start3, key: key3, sep: sep3, value: value4 }) {
|
247476
247476
|
let res = "";
|
247477
247477
|
for (const st2 of start3)
|
247478
247478
|
res += st2.source;
|
247479
|
-
if (
|
247480
|
-
res += stringifyToken(
|
247479
|
+
if (key3)
|
247480
|
+
res += stringifyToken(key3);
|
247481
247481
|
if (sep3)
|
247482
247482
|
for (const st2 of sep3)
|
247483
247483
|
res += st2.source;
|
@@ -248773,7 +248773,7 @@ var require_parser2 = __commonJS((exports) => {
|
|
248773
248773
|
});
|
248774
248774
|
} else if (isFlowToken(it2.key) && !includesToken(it2.sep, "newline")) {
|
248775
248775
|
const start4 = getFirstKeyStartProps(it2.start);
|
248776
|
-
const
|
248776
|
+
const key3 = it2.key;
|
248777
248777
|
const sep3 = it2.sep;
|
248778
248778
|
sep3.push(this.sourceToken);
|
248779
248779
|
delete it2.key;
|
@@ -248782,7 +248782,7 @@ var require_parser2 = __commonJS((exports) => {
|
|
248782
248782
|
type: "block-map",
|
248783
248783
|
offset: this.offset,
|
248784
248784
|
indent: this.indent,
|
248785
|
-
items: [{ start: start4, key:
|
248785
|
+
items: [{ start: start4, key: key3, sep: sep3 }]
|
248786
248786
|
});
|
248787
248787
|
} else if (start3.length > 0) {
|
248788
248788
|
it2.sep = it2.sep.concat(start3, this.sourceToken);
|
@@ -249115,7 +249115,7 @@ var require_parser2 = __commonJS((exports) => {
|
|
249115
249115
|
var require_public_api = __commonJS((exports) => {
|
249116
249116
|
var composer = require_composer();
|
249117
249117
|
var Document = require_Document();
|
249118
|
-
var
|
249118
|
+
var errors3 = require_errors3();
|
249119
249119
|
var log = require_log();
|
249120
249120
|
var identity2 = require_identity();
|
249121
249121
|
var lineCounter = require_line_counter();
|
@@ -249132,8 +249132,8 @@ var require_public_api = __commonJS((exports) => {
|
|
249132
249132
|
const docs = Array.from(composer$1.compose(parser$1.parse(source)));
|
249133
249133
|
if (prettyErrors && lineCounter2)
|
249134
249134
|
for (const doc of docs) {
|
249135
|
-
doc.errors.forEach(
|
249136
|
-
doc.warnings.forEach(
|
249135
|
+
doc.errors.forEach(errors3.prettifyError(source, lineCounter2));
|
249136
|
+
doc.warnings.forEach(errors3.prettifyError(source, lineCounter2));
|
249137
249137
|
}
|
249138
249138
|
if (docs.length > 0)
|
249139
249139
|
return docs;
|
@@ -249148,13 +249148,13 @@ var require_public_api = __commonJS((exports) => {
|
|
249148
249148
|
if (!doc)
|
249149
249149
|
doc = _doc;
|
249150
249150
|
else if (doc.options.logLevel !== "silent") {
|
249151
|
-
doc.errors.push(new
|
249151
|
+
doc.errors.push(new errors3.YAMLParseError(_doc.range.slice(0, 2), "MULTIPLE_DOCS", "Source contains multiple documents; please use YAML.parseAllDocuments()"));
|
249152
249152
|
break;
|
249153
249153
|
}
|
249154
249154
|
}
|
249155
249155
|
if (prettyErrors && lineCounter2) {
|
249156
|
-
doc.errors.forEach(
|
249157
|
-
doc.warnings.forEach(
|
249156
|
+
doc.errors.forEach(errors3.prettifyError(source, lineCounter2));
|
249157
|
+
doc.warnings.forEach(errors3.prettifyError(source, lineCounter2));
|
249158
249158
|
}
|
249159
249159
|
return doc;
|
249160
249160
|
}
|
@@ -259536,7 +259536,7 @@ function pruneCurrentEnv(currentEnv, env2) {
|
|
259536
259536
|
var package_default = {
|
259537
259537
|
name: "@settlemint/sdk-cli",
|
259538
259538
|
description: "Command-line interface for SettleMint SDK, providing development tools and project management capabilities",
|
259539
|
-
version: "2.0.0-
|
259539
|
+
version: "2.0.0-prd098b9b4",
|
259540
259540
|
type: "module",
|
259541
259541
|
private: false,
|
259542
259542
|
license: "FSL-1.1-MIT",
|
@@ -259579,12 +259579,12 @@ var package_default = {
|
|
259579
259579
|
devDependencies: {
|
259580
259580
|
"@commander-js/extra-typings": "11.1.0",
|
259581
259581
|
commander: "11.1.0",
|
259582
|
-
"@inquirer/confirm": "5.1.
|
259583
|
-
"@inquirer/input": "4.1.
|
259582
|
+
"@inquirer/confirm": "5.1.8",
|
259583
|
+
"@inquirer/input": "4.1.9",
|
259584
259584
|
"@inquirer/password": "4.0.11",
|
259585
259585
|
"@inquirer/select": "4.1.0",
|
259586
|
-
"@settlemint/sdk-js": "2.0.0-
|
259587
|
-
"@settlemint/sdk-utils": "2.0.0-
|
259586
|
+
"@settlemint/sdk-js": "2.0.0-prd098b9b4",
|
259587
|
+
"@settlemint/sdk-utils": "2.0.0-prd098b9b4",
|
259588
259588
|
"@types/node": "22.14.0",
|
259589
259589
|
"@types/semver": "7.7.0",
|
259590
259590
|
"@types/which": "3.0.4",
|
@@ -259673,6 +259673,10 @@ var {
|
|
259673
259673
|
} = import__.default;
|
259674
259674
|
|
259675
259675
|
// ../../node_modules/@inquirer/core/dist/esm/lib/key.js
|
259676
|
+
var isUpKey = (key) => key.name === "up" || key.name === "k" || key.ctrl && key.name === "p";
|
259677
|
+
var isDownKey = (key) => key.name === "down" || key.name === "j" || key.ctrl && key.name === "n";
|
259678
|
+
var isBackspaceKey = (key) => key.name === "backspace";
|
259679
|
+
var isNumberKey = (key) => "1234567890".includes(key.name);
|
259676
259680
|
var isEnterKey = (key) => key.name === "enter" || key.name === "return";
|
259677
259681
|
// ../../node_modules/@inquirer/core/dist/esm/lib/errors.js
|
259678
259682
|
class AbortPromptError extends Error {
|
@@ -260206,11 +260210,22 @@ function usePrefix({ status = "idle", theme }) {
|
|
260206
260210
|
const iconName = status === "loading" ? "idle" : status;
|
260207
260211
|
return typeof prefix === "string" ? prefix : prefix[iconName] ?? prefix["idle"];
|
260208
260212
|
}
|
260213
|
+
// ../../node_modules/@inquirer/core/dist/esm/lib/use-memo.js
|
260214
|
+
function useMemo(fn, dependencies) {
|
260215
|
+
return withPointer((pointer) => {
|
260216
|
+
const prev = pointer.get();
|
260217
|
+
if (!prev || prev.dependencies.length !== dependencies.length || prev.dependencies.some((dep, i) => dep !== dependencies[i])) {
|
260218
|
+
const value = fn();
|
260219
|
+
pointer.set({ value, dependencies });
|
260220
|
+
return value;
|
260221
|
+
}
|
260222
|
+
return prev.value;
|
260223
|
+
});
|
260224
|
+
}
|
260209
260225
|
// ../../node_modules/@inquirer/core/dist/esm/lib/use-ref.js
|
260210
260226
|
function useRef(val) {
|
260211
260227
|
return useState({ current: val })[0];
|
260212
260228
|
}
|
260213
|
-
|
260214
260229
|
// ../../node_modules/@inquirer/core/dist/esm/lib/use-keypress.js
|
260215
260230
|
function useKeypress(userHandler) {
|
260216
260231
|
const signal = useRef(userHandler);
|
@@ -260242,6 +260257,95 @@ function readlineWidth() {
|
|
260242
260257
|
return import_cli_width.default({ defaultWidth: 80, output: readline().output });
|
260243
260258
|
}
|
260244
260259
|
|
260260
|
+
// ../../node_modules/@inquirer/core/dist/esm/lib/pagination/lines.js
|
260261
|
+
function split(content, width) {
|
260262
|
+
return breakLines(content, width).split(`
|
260263
|
+
`);
|
260264
|
+
}
|
260265
|
+
function rotate(count, items) {
|
260266
|
+
const max = items.length;
|
260267
|
+
const offset = (count % max + max) % max;
|
260268
|
+
return [...items.slice(offset), ...items.slice(0, offset)];
|
260269
|
+
}
|
260270
|
+
function lines({ items, width, renderItem, active, position: requested, pageSize }) {
|
260271
|
+
const layouts = items.map((item, index) => ({
|
260272
|
+
item,
|
260273
|
+
index,
|
260274
|
+
isActive: index === active
|
260275
|
+
}));
|
260276
|
+
const layoutsInPage = rotate(active - requested, layouts).slice(0, pageSize);
|
260277
|
+
const renderItemAt = (index) => layoutsInPage[index] == null ? [] : split(renderItem(layoutsInPage[index]), width);
|
260278
|
+
const pageBuffer = Array.from({ length: pageSize });
|
260279
|
+
const activeItem = renderItemAt(requested).slice(0, pageSize);
|
260280
|
+
const position = requested + activeItem.length <= pageSize ? requested : pageSize - activeItem.length;
|
260281
|
+
pageBuffer.splice(position, activeItem.length, ...activeItem);
|
260282
|
+
let bufferPointer = position + activeItem.length;
|
260283
|
+
let layoutPointer = requested + 1;
|
260284
|
+
while (bufferPointer < pageSize && layoutPointer < layoutsInPage.length) {
|
260285
|
+
for (const line of renderItemAt(layoutPointer)) {
|
260286
|
+
pageBuffer[bufferPointer++] = line;
|
260287
|
+
if (bufferPointer >= pageSize)
|
260288
|
+
break;
|
260289
|
+
}
|
260290
|
+
layoutPointer++;
|
260291
|
+
}
|
260292
|
+
bufferPointer = position - 1;
|
260293
|
+
layoutPointer = requested - 1;
|
260294
|
+
while (bufferPointer >= 0 && layoutPointer >= 0) {
|
260295
|
+
for (const line of renderItemAt(layoutPointer).reverse()) {
|
260296
|
+
pageBuffer[bufferPointer--] = line;
|
260297
|
+
if (bufferPointer < 0)
|
260298
|
+
break;
|
260299
|
+
}
|
260300
|
+
layoutPointer--;
|
260301
|
+
}
|
260302
|
+
return pageBuffer.filter((line) => typeof line === "string");
|
260303
|
+
}
|
260304
|
+
|
260305
|
+
// ../../node_modules/@inquirer/core/dist/esm/lib/pagination/position.js
|
260306
|
+
function finite({ active, pageSize, total }) {
|
260307
|
+
const middle = Math.floor(pageSize / 2);
|
260308
|
+
if (total <= pageSize || active < middle)
|
260309
|
+
return active;
|
260310
|
+
if (active >= total - middle)
|
260311
|
+
return active + pageSize - total;
|
260312
|
+
return middle;
|
260313
|
+
}
|
260314
|
+
function infinite({ active, lastActive, total, pageSize, pointer }) {
|
260315
|
+
if (total <= pageSize)
|
260316
|
+
return active;
|
260317
|
+
if (lastActive < active && active - lastActive < pageSize) {
|
260318
|
+
return Math.min(Math.floor(pageSize / 2), pointer + active - lastActive);
|
260319
|
+
}
|
260320
|
+
return pointer;
|
260321
|
+
}
|
260322
|
+
|
260323
|
+
// ../../node_modules/@inquirer/core/dist/esm/lib/pagination/use-pagination.js
|
260324
|
+
function usePagination({ items, active, renderItem, pageSize, loop = true }) {
|
260325
|
+
const state = useRef({ position: 0, lastActive: 0 });
|
260326
|
+
const position = loop ? infinite({
|
260327
|
+
active,
|
260328
|
+
lastActive: state.current.lastActive,
|
260329
|
+
total: items.length,
|
260330
|
+
pageSize,
|
260331
|
+
pointer: state.current.position
|
260332
|
+
}) : finite({
|
260333
|
+
active,
|
260334
|
+
total: items.length,
|
260335
|
+
pageSize
|
260336
|
+
});
|
260337
|
+
state.current.position = position;
|
260338
|
+
state.current.lastActive = active;
|
260339
|
+
return lines({
|
260340
|
+
items,
|
260341
|
+
width: readlineWidth(),
|
260342
|
+
renderItem,
|
260343
|
+
active,
|
260344
|
+
position,
|
260345
|
+
pageSize
|
260346
|
+
}).join(`
|
260347
|
+
`);
|
260348
|
+
}
|
260245
260349
|
// ../../node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
|
260246
260350
|
var import_mute_stream = __toESM(require_lib(), 1);
|
260247
260351
|
import * as readline2 from "node:readline";
|
@@ -260595,7 +260699,7 @@ function createPrompt(view) {
|
|
260595
260699
|
setImmediate(() => resolve(value));
|
260596
260700
|
});
|
260597
260701
|
if (nextView === undefined) {
|
260598
|
-
const callerFilename = callSites[1]?.getFileName();
|
260702
|
+
const callerFilename = callSites[1]?.getFileName?.();
|
260599
260703
|
throw new Error(`Prompt functions must return a string.
|
260600
260704
|
at ${callerFilename}`);
|
260601
260705
|
}
|
@@ -260621,6 +260725,20 @@ function createPrompt(view) {
|
|
260621
260725
|
};
|
260622
260726
|
return prompt;
|
260623
260727
|
}
|
260728
|
+
// ../../node_modules/@inquirer/core/dist/esm/lib/Separator.js
|
260729
|
+
var import_yoctocolors_cjs2 = __toESM(require_yoctocolors_cjs(), 1);
|
260730
|
+
class Separator {
|
260731
|
+
separator = import_yoctocolors_cjs2.default.dim(Array.from({ length: 15 }).join(esm_default.line));
|
260732
|
+
type = "separator";
|
260733
|
+
constructor(separator) {
|
260734
|
+
if (separator) {
|
260735
|
+
this.separator = separator;
|
260736
|
+
}
|
260737
|
+
}
|
260738
|
+
static isSeparator(choice) {
|
260739
|
+
return Boolean(choice && typeof choice === "object" && "type" in choice && choice.type === "separator");
|
260740
|
+
}
|
260741
|
+
}
|
260624
260742
|
// ../utils/dist/terminal.mjs
|
260625
260743
|
import { spawn } from "node:child_process";
|
260626
260744
|
var import_console_table_printer2 = __toESM(require_dist2(), 1);
|
@@ -265478,7 +265596,7 @@ function sanitizeName(value4, length = 35) {
|
|
265478
265596
|
}
|
265479
265597
|
|
265480
265598
|
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/key.js
|
265481
|
-
var
|
265599
|
+
var isBackspaceKey2 = (key2) => key2.name === "backspace";
|
265482
265600
|
var isEnterKey2 = (key2) => key2.name === "enter" || key2.name === "return";
|
265483
265601
|
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/errors.js
|
265484
265602
|
class AbortPromptError2 extends Error {
|
@@ -265645,24 +265763,24 @@ function useEffect2(cb, depArray) {
|
|
265645
265763
|
}
|
265646
265764
|
|
265647
265765
|
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/theme.js
|
265648
|
-
var
|
265766
|
+
var import_yoctocolors_cjs3 = __toESM(require_yoctocolors_cjs(), 1);
|
265649
265767
|
var defaultTheme2 = {
|
265650
265768
|
prefix: {
|
265651
|
-
idle:
|
265652
|
-
done:
|
265769
|
+
idle: import_yoctocolors_cjs3.default.blue("?"),
|
265770
|
+
done: import_yoctocolors_cjs3.default.green(esm_default.tick)
|
265653
265771
|
},
|
265654
265772
|
spinner: {
|
265655
265773
|
interval: 80,
|
265656
|
-
frames: ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"].map((frame) =>
|
265774
|
+
frames: ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"].map((frame) => import_yoctocolors_cjs3.default.yellow(frame))
|
265657
265775
|
},
|
265658
265776
|
style: {
|
265659
|
-
answer:
|
265660
|
-
message:
|
265661
|
-
error: (text2) =>
|
265662
|
-
defaultAnswer: (text2) =>
|
265663
|
-
help:
|
265664
|
-
highlight:
|
265665
|
-
key: (text2) =>
|
265777
|
+
answer: import_yoctocolors_cjs3.default.cyan,
|
265778
|
+
message: import_yoctocolors_cjs3.default.bold,
|
265779
|
+
error: (text2) => import_yoctocolors_cjs3.default.red(`> ${text2}`),
|
265780
|
+
defaultAnswer: (text2) => import_yoctocolors_cjs3.default.dim(`(${text2})`),
|
265781
|
+
help: import_yoctocolors_cjs3.default.dim,
|
265782
|
+
highlight: import_yoctocolors_cjs3.default.cyan,
|
265783
|
+
key: (text2) => import_yoctocolors_cjs3.default.cyan(import_yoctocolors_cjs3.default.bold(`<${text2}>`))
|
265666
265784
|
}
|
265667
265785
|
};
|
265668
265786
|
|
@@ -265905,7 +266023,7 @@ function createPrompt2(view) {
|
|
265905
266023
|
setImmediate(() => resolve5(value4));
|
265906
266024
|
});
|
265907
266025
|
if (nextView === undefined) {
|
265908
|
-
const callerFilename = callSites[1]?.getFileName
|
266026
|
+
const callerFilename = callSites[1]?.getFileName();
|
265909
266027
|
throw new Error(`Prompt functions must return a string.
|
265910
266028
|
at ${callerFilename}`);
|
265911
266029
|
}
|
@@ -265964,7 +266082,7 @@ var esm_default2 = createPrompt2((config3, done) => {
|
|
265964
266082
|
setError(isValid2 || "You must provide a valid value");
|
265965
266083
|
setStatus("idle");
|
265966
266084
|
}
|
265967
|
-
} else if (
|
266085
|
+
} else if (isBackspaceKey2(key3) && !value4) {
|
265968
266086
|
setDefaultValue(undefined);
|
265969
266087
|
} else if (key3.name === "tab" && !value4) {
|
265970
266088
|
setDefaultValue(undefined);
|
@@ -266015,585 +266133,14 @@ async function subgraphNamePrompt({
|
|
266015
266133
|
return sanitizeName(subgraphName);
|
266016
266134
|
}
|
266017
266135
|
|
266018
|
-
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/key.js
|
266019
|
-
var isUpKey = (key3) => key3.name === "up" || key3.name === "k" || key3.ctrl && key3.name === "p";
|
266020
|
-
var isDownKey = (key3) => key3.name === "down" || key3.name === "j" || key3.ctrl && key3.name === "n";
|
266021
|
-
var isBackspaceKey2 = (key3) => key3.name === "backspace";
|
266022
|
-
var isNumberKey = (key3) => "1234567890".includes(key3.name);
|
266023
|
-
var isEnterKey3 = (key3) => key3.name === "enter" || key3.name === "return";
|
266024
|
-
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/errors.js
|
266025
|
-
class AbortPromptError3 extends Error {
|
266026
|
-
name = "AbortPromptError";
|
266027
|
-
message = "Prompt was aborted";
|
266028
|
-
constructor(options) {
|
266029
|
-
super();
|
266030
|
-
this.cause = options?.cause;
|
266031
|
-
}
|
266032
|
-
}
|
266033
|
-
|
266034
|
-
class CancelPromptError3 extends Error {
|
266035
|
-
name = "CancelPromptError";
|
266036
|
-
message = "Prompt was canceled";
|
266037
|
-
}
|
266038
|
-
|
266039
|
-
class ExitPromptError3 extends Error {
|
266040
|
-
name = "ExitPromptError";
|
266041
|
-
}
|
266042
|
-
|
266043
|
-
class HookError3 extends Error {
|
266044
|
-
name = "HookError";
|
266045
|
-
}
|
266046
|
-
|
266047
|
-
class ValidationError3 extends Error {
|
266048
|
-
name = "ValidationError";
|
266049
|
-
}
|
266050
|
-
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/use-prefix.js
|
266051
|
-
import { AsyncResource as AsyncResource8 } from "node:async_hooks";
|
266052
|
-
|
266053
|
-
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/hook-engine.js
|
266054
|
-
import { AsyncLocalStorage as AsyncLocalStorage3, AsyncResource as AsyncResource7 } from "node:async_hooks";
|
266055
|
-
var hookStorage3 = new AsyncLocalStorage3;
|
266056
|
-
function createStore3(rl) {
|
266057
|
-
const store = {
|
266058
|
-
rl,
|
266059
|
-
hooks: [],
|
266060
|
-
hooksCleanup: [],
|
266061
|
-
hooksEffect: [],
|
266062
|
-
index: 0,
|
266063
|
-
handleChange() {}
|
266064
|
-
};
|
266065
|
-
return store;
|
266066
|
-
}
|
266067
|
-
function withHooks3(rl, cb) {
|
266068
|
-
const store = createStore3(rl);
|
266069
|
-
return hookStorage3.run(store, () => {
|
266070
|
-
function cycle(render) {
|
266071
|
-
store.handleChange = () => {
|
266072
|
-
store.index = 0;
|
266073
|
-
render();
|
266074
|
-
};
|
266075
|
-
store.handleChange();
|
266076
|
-
}
|
266077
|
-
return cb(cycle);
|
266078
|
-
});
|
266079
|
-
}
|
266080
|
-
function getStore3() {
|
266081
|
-
const store = hookStorage3.getStore();
|
266082
|
-
if (!store) {
|
266083
|
-
throw new HookError3("[Inquirer] Hook functions can only be called from within a prompt");
|
266084
|
-
}
|
266085
|
-
return store;
|
266086
|
-
}
|
266087
|
-
function readline5() {
|
266088
|
-
return getStore3().rl;
|
266089
|
-
}
|
266090
|
-
function withUpdates3(fn) {
|
266091
|
-
const wrapped = (...args) => {
|
266092
|
-
const store = getStore3();
|
266093
|
-
let shouldUpdate = false;
|
266094
|
-
const oldHandleChange = store.handleChange;
|
266095
|
-
store.handleChange = () => {
|
266096
|
-
shouldUpdate = true;
|
266097
|
-
};
|
266098
|
-
const returnValue = fn(...args);
|
266099
|
-
if (shouldUpdate) {
|
266100
|
-
oldHandleChange();
|
266101
|
-
}
|
266102
|
-
store.handleChange = oldHandleChange;
|
266103
|
-
return returnValue;
|
266104
|
-
};
|
266105
|
-
return AsyncResource7.bind(wrapped);
|
266106
|
-
}
|
266107
|
-
function withPointer3(cb) {
|
266108
|
-
const store = getStore3();
|
266109
|
-
const { index } = store;
|
266110
|
-
const pointer = {
|
266111
|
-
get() {
|
266112
|
-
return store.hooks[index];
|
266113
|
-
},
|
266114
|
-
set(value4) {
|
266115
|
-
store.hooks[index] = value4;
|
266116
|
-
},
|
266117
|
-
initialized: index in store.hooks
|
266118
|
-
};
|
266119
|
-
const returnValue = cb(pointer);
|
266120
|
-
store.index++;
|
266121
|
-
return returnValue;
|
266122
|
-
}
|
266123
|
-
function handleChange3() {
|
266124
|
-
getStore3().handleChange();
|
266125
|
-
}
|
266126
|
-
var effectScheduler3 = {
|
266127
|
-
queue(cb) {
|
266128
|
-
const store = getStore3();
|
266129
|
-
const { index } = store;
|
266130
|
-
store.hooksEffect.push(() => {
|
266131
|
-
store.hooksCleanup[index]?.();
|
266132
|
-
const cleanFn = cb(readline5());
|
266133
|
-
if (cleanFn != null && typeof cleanFn !== "function") {
|
266134
|
-
throw new ValidationError3("useEffect return value must be a cleanup function or nothing.");
|
266135
|
-
}
|
266136
|
-
store.hooksCleanup[index] = cleanFn;
|
266137
|
-
});
|
266138
|
-
},
|
266139
|
-
run() {
|
266140
|
-
const store = getStore3();
|
266141
|
-
withUpdates3(() => {
|
266142
|
-
store.hooksEffect.forEach((effect) => {
|
266143
|
-
effect();
|
266144
|
-
});
|
266145
|
-
store.hooksEffect.length = 0;
|
266146
|
-
})();
|
266147
|
-
},
|
266148
|
-
clearAll() {
|
266149
|
-
const store = getStore3();
|
266150
|
-
store.hooksCleanup.forEach((cleanFn) => {
|
266151
|
-
cleanFn?.();
|
266152
|
-
});
|
266153
|
-
store.hooksEffect.length = 0;
|
266154
|
-
store.hooksCleanup.length = 0;
|
266155
|
-
}
|
266156
|
-
};
|
266157
|
-
|
266158
|
-
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/use-state.js
|
266159
|
-
function useState3(defaultValue) {
|
266160
|
-
return withPointer3((pointer) => {
|
266161
|
-
const setFn = (newValue) => {
|
266162
|
-
if (pointer.get() !== newValue) {
|
266163
|
-
pointer.set(newValue);
|
266164
|
-
handleChange3();
|
266165
|
-
}
|
266166
|
-
};
|
266167
|
-
if (pointer.initialized) {
|
266168
|
-
return [pointer.get(), setFn];
|
266169
|
-
}
|
266170
|
-
const value4 = typeof defaultValue === "function" ? defaultValue() : defaultValue;
|
266171
|
-
pointer.set(value4);
|
266172
|
-
return [value4, setFn];
|
266173
|
-
});
|
266174
|
-
}
|
266175
|
-
|
266176
|
-
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/use-effect.js
|
266177
|
-
function useEffect3(cb, depArray) {
|
266178
|
-
withPointer3((pointer) => {
|
266179
|
-
const oldDeps = pointer.get();
|
266180
|
-
const hasChanged = !Array.isArray(oldDeps) || depArray.some((dep, i6) => !Object.is(dep, oldDeps[i6]));
|
266181
|
-
if (hasChanged) {
|
266182
|
-
effectScheduler3.queue(cb);
|
266183
|
-
}
|
266184
|
-
pointer.set(depArray);
|
266185
|
-
});
|
266186
|
-
}
|
266187
|
-
|
266188
|
-
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/theme.js
|
266189
|
-
var import_yoctocolors_cjs3 = __toESM(require_yoctocolors_cjs(), 1);
|
266190
|
-
var defaultTheme3 = {
|
266191
|
-
prefix: {
|
266192
|
-
idle: import_yoctocolors_cjs3.default.blue("?"),
|
266193
|
-
done: import_yoctocolors_cjs3.default.green(esm_default.tick)
|
266194
|
-
},
|
266195
|
-
spinner: {
|
266196
|
-
interval: 80,
|
266197
|
-
frames: ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"].map((frame) => import_yoctocolors_cjs3.default.yellow(frame))
|
266198
|
-
},
|
266199
|
-
style: {
|
266200
|
-
answer: import_yoctocolors_cjs3.default.cyan,
|
266201
|
-
message: import_yoctocolors_cjs3.default.bold,
|
266202
|
-
error: (text2) => import_yoctocolors_cjs3.default.red(`> ${text2}`),
|
266203
|
-
defaultAnswer: (text2) => import_yoctocolors_cjs3.default.dim(`(${text2})`),
|
266204
|
-
help: import_yoctocolors_cjs3.default.dim,
|
266205
|
-
highlight: import_yoctocolors_cjs3.default.cyan,
|
266206
|
-
key: (text2) => import_yoctocolors_cjs3.default.cyan(import_yoctocolors_cjs3.default.bold(`<${text2}>`))
|
266207
|
-
}
|
266208
|
-
};
|
266209
|
-
|
266210
|
-
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/make-theme.js
|
266211
|
-
function isPlainObject4(value4) {
|
266212
|
-
if (typeof value4 !== "object" || value4 === null)
|
266213
|
-
return false;
|
266214
|
-
let proto = value4;
|
266215
|
-
while (Object.getPrototypeOf(proto) !== null) {
|
266216
|
-
proto = Object.getPrototypeOf(proto);
|
266217
|
-
}
|
266218
|
-
return Object.getPrototypeOf(value4) === proto;
|
266219
|
-
}
|
266220
|
-
function deepMerge4(...objects) {
|
266221
|
-
const output = {};
|
266222
|
-
for (const obj of objects) {
|
266223
|
-
for (const [key3, value4] of Object.entries(obj)) {
|
266224
|
-
const prevValue = output[key3];
|
266225
|
-
output[key3] = isPlainObject4(prevValue) && isPlainObject4(value4) ? deepMerge4(prevValue, value4) : value4;
|
266226
|
-
}
|
266227
|
-
}
|
266228
|
-
return output;
|
266229
|
-
}
|
266230
|
-
function makeTheme3(...themes) {
|
266231
|
-
const themesToMerge = [
|
266232
|
-
defaultTheme3,
|
266233
|
-
...themes.filter((theme) => theme != null)
|
266234
|
-
];
|
266235
|
-
return deepMerge4(...themesToMerge);
|
266236
|
-
}
|
266237
|
-
|
266238
|
-
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/use-prefix.js
|
266239
|
-
function usePrefix3({ status = "idle", theme }) {
|
266240
|
-
const [showLoader, setShowLoader] = useState3(false);
|
266241
|
-
const [tick, setTick] = useState3(0);
|
266242
|
-
const { prefix, spinner: spinner2 } = makeTheme3(theme);
|
266243
|
-
useEffect3(() => {
|
266244
|
-
if (status === "loading") {
|
266245
|
-
let tickInterval;
|
266246
|
-
let inc = -1;
|
266247
|
-
const delayTimeout = setTimeout(AsyncResource8.bind(() => {
|
266248
|
-
setShowLoader(true);
|
266249
|
-
tickInterval = setInterval(AsyncResource8.bind(() => {
|
266250
|
-
inc = inc + 1;
|
266251
|
-
setTick(inc % spinner2.frames.length);
|
266252
|
-
}), spinner2.interval);
|
266253
|
-
}), 300);
|
266254
|
-
return () => {
|
266255
|
-
clearTimeout(delayTimeout);
|
266256
|
-
clearInterval(tickInterval);
|
266257
|
-
};
|
266258
|
-
} else {
|
266259
|
-
setShowLoader(false);
|
266260
|
-
}
|
266261
|
-
}, [status]);
|
266262
|
-
if (showLoader) {
|
266263
|
-
return spinner2.frames[tick];
|
266264
|
-
}
|
266265
|
-
const iconName = status === "loading" ? "idle" : status;
|
266266
|
-
return typeof prefix === "string" ? prefix : prefix[iconName] ?? prefix["idle"];
|
266267
|
-
}
|
266268
|
-
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/use-memo.js
|
266269
|
-
function useMemo(fn, dependencies) {
|
266270
|
-
return withPointer3((pointer) => {
|
266271
|
-
const prev = pointer.get();
|
266272
|
-
if (!prev || prev.dependencies.length !== dependencies.length || prev.dependencies.some((dep, i6) => dep !== dependencies[i6])) {
|
266273
|
-
const value4 = fn();
|
266274
|
-
pointer.set({ value: value4, dependencies });
|
266275
|
-
return value4;
|
266276
|
-
}
|
266277
|
-
return prev.value;
|
266278
|
-
});
|
266279
|
-
}
|
266280
|
-
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/use-ref.js
|
266281
|
-
function useRef3(val) {
|
266282
|
-
return useState3({ current: val })[0];
|
266283
|
-
}
|
266284
|
-
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/use-keypress.js
|
266285
|
-
function useKeypress3(userHandler) {
|
266286
|
-
const signal = useRef3(userHandler);
|
266287
|
-
signal.current = userHandler;
|
266288
|
-
useEffect3((rl) => {
|
266289
|
-
let ignore = false;
|
266290
|
-
const handler = withUpdates3((_input, event) => {
|
266291
|
-
if (ignore)
|
266292
|
-
return;
|
266293
|
-
signal.current(event, rl);
|
266294
|
-
});
|
266295
|
-
rl.input.on("keypress", handler);
|
266296
|
-
return () => {
|
266297
|
-
ignore = true;
|
266298
|
-
rl.input.removeListener("keypress", handler);
|
266299
|
-
};
|
266300
|
-
}, []);
|
266301
|
-
}
|
266302
|
-
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/utils.js
|
266303
|
-
var import_cli_width3 = __toESM(require_cli_width(), 1);
|
266304
|
-
var import_wrap_ansi3 = __toESM(require_wrap_ansi(), 1);
|
266305
|
-
function breakLines3(content, width) {
|
266306
|
-
return content.split(`
|
266307
|
-
`).flatMap((line) => import_wrap_ansi3.default(line, width, { trim: false, hard: true }).split(`
|
266308
|
-
`).map((str) => str.trimEnd())).join(`
|
266309
|
-
`);
|
266310
|
-
}
|
266311
|
-
function readlineWidth3() {
|
266312
|
-
return import_cli_width3.default({ defaultWidth: 80, output: readline5().output });
|
266313
|
-
}
|
266314
|
-
|
266315
|
-
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/pagination/lines.js
|
266316
|
-
function split2(content, width) {
|
266317
|
-
return breakLines3(content, width).split(`
|
266318
|
-
`);
|
266319
|
-
}
|
266320
|
-
function rotate(count, items) {
|
266321
|
-
const max = items.length;
|
266322
|
-
const offset = (count % max + max) % max;
|
266323
|
-
return [...items.slice(offset), ...items.slice(0, offset)];
|
266324
|
-
}
|
266325
|
-
function lines({ items, width, renderItem, active, position: requested, pageSize }) {
|
266326
|
-
const layouts = items.map((item, index) => ({
|
266327
|
-
item,
|
266328
|
-
index,
|
266329
|
-
isActive: index === active
|
266330
|
-
}));
|
266331
|
-
const layoutsInPage = rotate(active - requested, layouts).slice(0, pageSize);
|
266332
|
-
const renderItemAt = (index) => layoutsInPage[index] == null ? [] : split2(renderItem(layoutsInPage[index]), width);
|
266333
|
-
const pageBuffer = Array.from({ length: pageSize });
|
266334
|
-
const activeItem = renderItemAt(requested).slice(0, pageSize);
|
266335
|
-
const position = requested + activeItem.length <= pageSize ? requested : pageSize - activeItem.length;
|
266336
|
-
pageBuffer.splice(position, activeItem.length, ...activeItem);
|
266337
|
-
let bufferPointer = position + activeItem.length;
|
266338
|
-
let layoutPointer = requested + 1;
|
266339
|
-
while (bufferPointer < pageSize && layoutPointer < layoutsInPage.length) {
|
266340
|
-
for (const line of renderItemAt(layoutPointer)) {
|
266341
|
-
pageBuffer[bufferPointer++] = line;
|
266342
|
-
if (bufferPointer >= pageSize)
|
266343
|
-
break;
|
266344
|
-
}
|
266345
|
-
layoutPointer++;
|
266346
|
-
}
|
266347
|
-
bufferPointer = position - 1;
|
266348
|
-
layoutPointer = requested - 1;
|
266349
|
-
while (bufferPointer >= 0 && layoutPointer >= 0) {
|
266350
|
-
for (const line of renderItemAt(layoutPointer).reverse()) {
|
266351
|
-
pageBuffer[bufferPointer--] = line;
|
266352
|
-
if (bufferPointer < 0)
|
266353
|
-
break;
|
266354
|
-
}
|
266355
|
-
layoutPointer--;
|
266356
|
-
}
|
266357
|
-
return pageBuffer.filter((line) => typeof line === "string");
|
266358
|
-
}
|
266359
|
-
|
266360
|
-
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/pagination/position.js
|
266361
|
-
function finite({ active, pageSize, total }) {
|
266362
|
-
const middle = Math.floor(pageSize / 2);
|
266363
|
-
if (total <= pageSize || active < middle)
|
266364
|
-
return active;
|
266365
|
-
if (active >= total - middle)
|
266366
|
-
return active + pageSize - total;
|
266367
|
-
return middle;
|
266368
|
-
}
|
266369
|
-
function infinite({ active, lastActive, total, pageSize, pointer }) {
|
266370
|
-
if (total <= pageSize)
|
266371
|
-
return active;
|
266372
|
-
if (lastActive < active && active - lastActive < pageSize) {
|
266373
|
-
return Math.min(Math.floor(pageSize / 2), pointer + active - lastActive);
|
266374
|
-
}
|
266375
|
-
return pointer;
|
266376
|
-
}
|
266377
|
-
|
266378
|
-
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/pagination/use-pagination.js
|
266379
|
-
function usePagination({ items, active, renderItem, pageSize, loop = true }) {
|
266380
|
-
const state = useRef3({ position: 0, lastActive: 0 });
|
266381
|
-
const position = loop ? infinite({
|
266382
|
-
active,
|
266383
|
-
lastActive: state.current.lastActive,
|
266384
|
-
total: items.length,
|
266385
|
-
pageSize,
|
266386
|
-
pointer: state.current.position
|
266387
|
-
}) : finite({
|
266388
|
-
active,
|
266389
|
-
total: items.length,
|
266390
|
-
pageSize
|
266391
|
-
});
|
266392
|
-
state.current.position = position;
|
266393
|
-
state.current.lastActive = active;
|
266394
|
-
return lines({
|
266395
|
-
items,
|
266396
|
-
width: readlineWidth3(),
|
266397
|
-
renderItem,
|
266398
|
-
active,
|
266399
|
-
position,
|
266400
|
-
pageSize
|
266401
|
-
}).join(`
|
266402
|
-
`);
|
266403
|
-
}
|
266404
|
-
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
|
266405
|
-
var import_mute_stream3 = __toESM(require_lib(), 1);
|
266406
|
-
import * as readline6 from "node:readline";
|
266407
|
-
import { AsyncResource as AsyncResource9 } from "node:async_hooks";
|
266408
|
-
|
266409
|
-
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/screen-manager.js
|
266410
|
-
var import_ansi_escapes3 = __toESM(require_ansi_escapes(), 1);
|
266411
|
-
import { stripVTControlCharacters as stripVTControlCharacters4 } from "node:util";
|
266412
|
-
var height3 = (content) => content.split(`
|
266413
|
-
`).length;
|
266414
|
-
var lastLine3 = (content) => content.split(`
|
266415
|
-
`).pop() ?? "";
|
266416
|
-
function cursorDown3(n6) {
|
266417
|
-
return n6 > 0 ? import_ansi_escapes3.default.cursorDown(n6) : "";
|
266418
|
-
}
|
266419
|
-
|
266420
|
-
class ScreenManager3 {
|
266421
|
-
height = 0;
|
266422
|
-
extraLinesUnderPrompt = 0;
|
266423
|
-
cursorPos;
|
266424
|
-
rl;
|
266425
|
-
constructor(rl) {
|
266426
|
-
this.rl = rl;
|
266427
|
-
this.cursorPos = rl.getCursorPos();
|
266428
|
-
}
|
266429
|
-
write(content) {
|
266430
|
-
this.rl.output.unmute();
|
266431
|
-
this.rl.output.write(content);
|
266432
|
-
this.rl.output.mute();
|
266433
|
-
}
|
266434
|
-
render(content, bottomContent = "") {
|
266435
|
-
const promptLine = lastLine3(content);
|
266436
|
-
const rawPromptLine = stripVTControlCharacters4(promptLine);
|
266437
|
-
let prompt = rawPromptLine;
|
266438
|
-
if (this.rl.line.length > 0) {
|
266439
|
-
prompt = prompt.slice(0, -this.rl.line.length);
|
266440
|
-
}
|
266441
|
-
this.rl.setPrompt(prompt);
|
266442
|
-
this.cursorPos = this.rl.getCursorPos();
|
266443
|
-
const width = readlineWidth3();
|
266444
|
-
content = breakLines3(content, width);
|
266445
|
-
bottomContent = breakLines3(bottomContent, width);
|
266446
|
-
if (rawPromptLine.length % width === 0) {
|
266447
|
-
content += `
|
266448
|
-
`;
|
266449
|
-
}
|
266450
|
-
let output = content + (bottomContent ? `
|
266451
|
-
` + bottomContent : "");
|
266452
|
-
const promptLineUpDiff = Math.floor(rawPromptLine.length / width) - this.cursorPos.rows;
|
266453
|
-
const bottomContentHeight = promptLineUpDiff + (bottomContent ? height3(bottomContent) : 0);
|
266454
|
-
if (bottomContentHeight > 0)
|
266455
|
-
output += import_ansi_escapes3.default.cursorUp(bottomContentHeight);
|
266456
|
-
output += import_ansi_escapes3.default.cursorTo(this.cursorPos.cols);
|
266457
|
-
this.write(cursorDown3(this.extraLinesUnderPrompt) + import_ansi_escapes3.default.eraseLines(this.height) + output);
|
266458
|
-
this.extraLinesUnderPrompt = bottomContentHeight;
|
266459
|
-
this.height = height3(output);
|
266460
|
-
}
|
266461
|
-
checkCursorPos() {
|
266462
|
-
const cursorPos = this.rl.getCursorPos();
|
266463
|
-
if (cursorPos.cols !== this.cursorPos.cols) {
|
266464
|
-
this.write(import_ansi_escapes3.default.cursorTo(cursorPos.cols));
|
266465
|
-
this.cursorPos = cursorPos;
|
266466
|
-
}
|
266467
|
-
}
|
266468
|
-
done({ clearContent }) {
|
266469
|
-
this.rl.setPrompt("");
|
266470
|
-
let output = cursorDown3(this.extraLinesUnderPrompt);
|
266471
|
-
output += clearContent ? import_ansi_escapes3.default.eraseLines(this.height) : `
|
266472
|
-
`;
|
266473
|
-
output += import_ansi_escapes3.default.cursorShow;
|
266474
|
-
this.write(output);
|
266475
|
-
this.rl.close();
|
266476
|
-
}
|
266477
|
-
}
|
266478
|
-
|
266479
|
-
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/promise-polyfill.js
|
266480
|
-
class PromisePolyfill3 extends Promise {
|
266481
|
-
static withResolver() {
|
266482
|
-
let resolve5;
|
266483
|
-
let reject;
|
266484
|
-
const promise = new Promise((res, rej) => {
|
266485
|
-
resolve5 = res;
|
266486
|
-
reject = rej;
|
266487
|
-
});
|
266488
|
-
return { promise, resolve: resolve5, reject };
|
266489
|
-
}
|
266490
|
-
}
|
266491
|
-
|
266492
|
-
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
|
266493
|
-
function getCallSites3() {
|
266494
|
-
const _prepareStackTrace = Error.prepareStackTrace;
|
266495
|
-
let result = [];
|
266496
|
-
try {
|
266497
|
-
Error.prepareStackTrace = (_5, callSites) => {
|
266498
|
-
const callSitesWithoutCurrent = callSites.slice(1);
|
266499
|
-
result = callSitesWithoutCurrent;
|
266500
|
-
return callSitesWithoutCurrent;
|
266501
|
-
};
|
266502
|
-
new Error().stack;
|
266503
|
-
} catch {
|
266504
|
-
return result;
|
266505
|
-
}
|
266506
|
-
Error.prepareStackTrace = _prepareStackTrace;
|
266507
|
-
return result;
|
266508
|
-
}
|
266509
|
-
function createPrompt3(view) {
|
266510
|
-
const callSites = getCallSites3();
|
266511
|
-
const prompt = (config3, context = {}) => {
|
266512
|
-
const { input = process.stdin, signal } = context;
|
266513
|
-
const cleanups = new Set;
|
266514
|
-
const output = new import_mute_stream3.default;
|
266515
|
-
output.pipe(context.output ?? process.stdout);
|
266516
|
-
const rl = readline6.createInterface({
|
266517
|
-
terminal: true,
|
266518
|
-
input,
|
266519
|
-
output
|
266520
|
-
});
|
266521
|
-
const screen = new ScreenManager3(rl);
|
266522
|
-
const { promise, resolve: resolve5, reject } = PromisePolyfill3.withResolver();
|
266523
|
-
const cancel3 = () => reject(new CancelPromptError3);
|
266524
|
-
if (signal) {
|
266525
|
-
const abort = () => reject(new AbortPromptError3({ cause: signal.reason }));
|
266526
|
-
if (signal.aborted) {
|
266527
|
-
abort();
|
266528
|
-
return Object.assign(promise, { cancel: cancel3 });
|
266529
|
-
}
|
266530
|
-
signal.addEventListener("abort", abort);
|
266531
|
-
cleanups.add(() => signal.removeEventListener("abort", abort));
|
266532
|
-
}
|
266533
|
-
cleanups.add(onExit((code2, signal2) => {
|
266534
|
-
reject(new ExitPromptError3(`User force closed the prompt with ${code2} ${signal2}`));
|
266535
|
-
}));
|
266536
|
-
const checkCursorPos = () => screen.checkCursorPos();
|
266537
|
-
rl.input.on("keypress", checkCursorPos);
|
266538
|
-
cleanups.add(() => rl.input.removeListener("keypress", checkCursorPos));
|
266539
|
-
return withHooks3(rl, (cycle) => {
|
266540
|
-
const hooksCleanup = AsyncResource9.bind(() => effectScheduler3.clearAll());
|
266541
|
-
rl.on("close", hooksCleanup);
|
266542
|
-
cleanups.add(() => rl.removeListener("close", hooksCleanup));
|
266543
|
-
cycle(() => {
|
266544
|
-
try {
|
266545
|
-
const nextView = view(config3, (value4) => {
|
266546
|
-
setImmediate(() => resolve5(value4));
|
266547
|
-
});
|
266548
|
-
if (nextView === undefined) {
|
266549
|
-
const callerFilename = callSites[1]?.getFileName?.();
|
266550
|
-
throw new Error(`Prompt functions must return a string.
|
266551
|
-
at ${callerFilename}`);
|
266552
|
-
}
|
266553
|
-
const [content, bottomContent] = typeof nextView === "string" ? [nextView] : nextView;
|
266554
|
-
screen.render(content, bottomContent);
|
266555
|
-
effectScheduler3.run();
|
266556
|
-
} catch (error5) {
|
266557
|
-
reject(error5);
|
266558
|
-
}
|
266559
|
-
});
|
266560
|
-
return Object.assign(promise.then((answer) => {
|
266561
|
-
effectScheduler3.clearAll();
|
266562
|
-
return answer;
|
266563
|
-
}, (error5) => {
|
266564
|
-
effectScheduler3.clearAll();
|
266565
|
-
throw error5;
|
266566
|
-
}).finally(() => {
|
266567
|
-
cleanups.forEach((cleanup) => cleanup());
|
266568
|
-
screen.done({ clearContent: Boolean(context.clearPromptOnDone) });
|
266569
|
-
output.end();
|
266570
|
-
}).then(() => promise), { cancel: cancel3 });
|
266571
|
-
});
|
266572
|
-
};
|
266573
|
-
return prompt;
|
266574
|
-
}
|
266575
|
-
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/Separator.js
|
266576
|
-
var import_yoctocolors_cjs4 = __toESM(require_yoctocolors_cjs(), 1);
|
266577
|
-
class Separator {
|
266578
|
-
separator = import_yoctocolors_cjs4.default.dim(Array.from({ length: 15 }).join(esm_default.line));
|
266579
|
-
type = "separator";
|
266580
|
-
constructor(separator) {
|
266581
|
-
if (separator) {
|
266582
|
-
this.separator = separator;
|
266583
|
-
}
|
266584
|
-
}
|
266585
|
-
static isSeparator(choice) {
|
266586
|
-
return Boolean(choice && typeof choice === "object" && "type" in choice && choice.type === "separator");
|
266587
|
-
}
|
266588
|
-
}
|
266589
266136
|
// ../../node_modules/@inquirer/select/dist/esm/index.js
|
266590
|
-
var
|
266591
|
-
var
|
266137
|
+
var import_yoctocolors_cjs4 = __toESM(require_yoctocolors_cjs(), 1);
|
266138
|
+
var import_ansi_escapes3 = __toESM(require_ansi_escapes(), 1);
|
266592
266139
|
var selectTheme = {
|
266593
266140
|
icon: { cursor: esm_default.pointer },
|
266594
266141
|
style: {
|
266595
|
-
disabled: (text2) =>
|
266596
|
-
description: (text2) =>
|
266142
|
+
disabled: (text2) => import_yoctocolors_cjs4.default.dim(`- ${text2}`),
|
266143
|
+
description: (text2) => import_yoctocolors_cjs4.default.cyan(text2)
|
266597
266144
|
},
|
266598
266145
|
helpMode: "auto",
|
266599
266146
|
indexMode: "hidden"
|
@@ -266623,19 +266170,19 @@ function normalizeChoices(choices) {
|
|
266623
266170
|
};
|
266624
266171
|
});
|
266625
266172
|
}
|
266626
|
-
var esm_default3 =
|
266173
|
+
var esm_default3 = createPrompt((config3, done) => {
|
266627
266174
|
const { loop = true, pageSize = 7 } = config3;
|
266628
|
-
const firstRender =
|
266629
|
-
const theme =
|
266630
|
-
const [status, setStatus] =
|
266631
|
-
const prefix =
|
266632
|
-
const searchTimeoutRef =
|
266175
|
+
const firstRender = useRef(true);
|
266176
|
+
const theme = makeTheme(selectTheme, config3.theme);
|
266177
|
+
const [status, setStatus] = useState("idle");
|
266178
|
+
const prefix = usePrefix({ status, theme });
|
266179
|
+
const searchTimeoutRef = useRef();
|
266633
266180
|
const items = useMemo(() => normalizeChoices(config3.choices), [config3.choices]);
|
266634
266181
|
const bounds = useMemo(() => {
|
266635
266182
|
const first = items.findIndex(isSelectable);
|
266636
266183
|
const last = items.findLastIndex(isSelectable);
|
266637
266184
|
if (first === -1) {
|
266638
|
-
throw new
|
266185
|
+
throw new ValidationError("[select prompt] No selectable choices. All choices are disabled.");
|
266639
266186
|
}
|
266640
266187
|
return { first, last };
|
266641
266188
|
}, [items]);
|
@@ -266644,24 +266191,24 @@ var esm_default3 = createPrompt3((config3, done) => {
|
|
266644
266191
|
return -1;
|
266645
266192
|
return items.findIndex((item) => isSelectable(item) && item.value === config3.default);
|
266646
266193
|
}, [config3.default, items]);
|
266647
|
-
const [active, setActive] =
|
266194
|
+
const [active, setActive] = useState(defaultItemIndex === -1 ? bounds.first : defaultItemIndex);
|
266648
266195
|
const selectedChoice = items[active];
|
266649
|
-
|
266196
|
+
useKeypress((key3, rl) => {
|
266650
266197
|
clearTimeout(searchTimeoutRef.current);
|
266651
|
-
if (
|
266198
|
+
if (isEnterKey(key3)) {
|
266652
266199
|
setStatus("done");
|
266653
266200
|
done(selectedChoice.value);
|
266654
|
-
} else if (isUpKey(
|
266201
|
+
} else if (isUpKey(key3) || isDownKey(key3)) {
|
266655
266202
|
rl.clearLine(0);
|
266656
|
-
if (loop || isUpKey(
|
266657
|
-
const offset = isUpKey(
|
266203
|
+
if (loop || isUpKey(key3) && active !== bounds.first || isDownKey(key3) && active !== bounds.last) {
|
266204
|
+
const offset = isUpKey(key3) ? -1 : 1;
|
266658
266205
|
let next = active;
|
266659
266206
|
do {
|
266660
266207
|
next = (next + offset + items.length) % items.length;
|
266661
266208
|
} while (!isSelectable(items[next]));
|
266662
266209
|
setActive(next);
|
266663
266210
|
}
|
266664
|
-
} else if (isNumberKey(
|
266211
|
+
} else if (isNumberKey(key3) && !Number.isNaN(Number(rl.line))) {
|
266665
266212
|
const position = Number(rl.line) - 1;
|
266666
266213
|
const item = items[position];
|
266667
266214
|
if (item != null && isSelectable(item)) {
|
@@ -266670,7 +266217,7 @@ var esm_default3 = createPrompt3((config3, done) => {
|
|
266670
266217
|
searchTimeoutRef.current = setTimeout(() => {
|
266671
266218
|
rl.clearLine(0);
|
266672
266219
|
}, 700);
|
266673
|
-
} else if (
|
266220
|
+
} else if (isBackspaceKey(key3)) {
|
266674
266221
|
rl.clearLine(0);
|
266675
266222
|
} else {
|
266676
266223
|
const searchTerm = rl.line.toLowerCase();
|
@@ -266687,7 +266234,7 @@ var esm_default3 = createPrompt3((config3, done) => {
|
|
266687
266234
|
}, 700);
|
266688
266235
|
}
|
266689
266236
|
});
|
266690
|
-
|
266237
|
+
useEffect(() => () => {
|
266691
266238
|
clearTimeout(searchTimeoutRef.current);
|
266692
266239
|
}, []);
|
266693
266240
|
const message = theme.style.message(config3.message, status);
|
@@ -266727,7 +266274,7 @@ ${theme.style.help("(Use arrow keys to reveal more choices)")}`;
|
|
266727
266274
|
const choiceDescription = selectedChoice.description ? `
|
266728
266275
|
${theme.style.description(selectedChoice.description)}` : ``;
|
266729
266276
|
return `${[prefix, message, helpTipTop].filter(Boolean).join(" ")}
|
266730
|
-
${page}${helpTipBottom}${choiceDescription}${
|
266277
|
+
${page}${helpTipBottom}${choiceDescription}${import_ansi_escapes3.default.cursorHide}`;
|
266731
266278
|
});
|
266732
266279
|
|
266733
266280
|
// src/prompts/smart-contract-set/subgraph.prompt.ts
|
@@ -267123,13 +266670,13 @@ var esm_default4 = createPrompt((config3, done) => {
|
|
267123
266670
|
const [value4, setValue] = useState("");
|
267124
266671
|
const theme = makeTheme(config3.theme);
|
267125
266672
|
const prefix = usePrefix({ status, theme });
|
267126
|
-
useKeypress((
|
267127
|
-
if (isEnterKey(
|
266673
|
+
useKeypress((key3, rl) => {
|
266674
|
+
if (isEnterKey(key3)) {
|
267128
266675
|
const answer = getBooleanValue(value4, config3.default);
|
267129
266676
|
setValue(transformer(answer));
|
267130
266677
|
setStatus("done");
|
267131
266678
|
done(answer);
|
267132
|
-
} else if (
|
266679
|
+
} else if (key3.name === "tab") {
|
267133
266680
|
const answer = boolToString(!getBooleanValue(value4, config3.default));
|
267134
266681
|
rl.clearLine(0);
|
267135
266682
|
rl.write(answer);
|
@@ -267149,473 +266696,20 @@ var esm_default4 = createPrompt((config3, done) => {
|
|
267149
266696
|
return `${prefix} ${message}${defaultValue} ${formattedValue}`;
|
267150
266697
|
});
|
267151
266698
|
|
267152
|
-
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/key.js
|
267153
|
-
var isEnterKey4 = (key4) => key4.name === "enter" || key4.name === "return";
|
267154
|
-
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/errors.js
|
267155
|
-
class AbortPromptError4 extends Error {
|
267156
|
-
name = "AbortPromptError";
|
267157
|
-
message = "Prompt was aborted";
|
267158
|
-
constructor(options) {
|
267159
|
-
super();
|
267160
|
-
this.cause = options?.cause;
|
267161
|
-
}
|
267162
|
-
}
|
267163
|
-
|
267164
|
-
class CancelPromptError4 extends Error {
|
267165
|
-
name = "CancelPromptError";
|
267166
|
-
message = "Prompt was canceled";
|
267167
|
-
}
|
267168
|
-
|
267169
|
-
class ExitPromptError4 extends Error {
|
267170
|
-
name = "ExitPromptError";
|
267171
|
-
}
|
267172
|
-
|
267173
|
-
class HookError4 extends Error {
|
267174
|
-
name = "HookError";
|
267175
|
-
}
|
267176
|
-
|
267177
|
-
class ValidationError4 extends Error {
|
267178
|
-
name = "ValidationError";
|
267179
|
-
}
|
267180
|
-
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/use-prefix.js
|
267181
|
-
import { AsyncResource as AsyncResource11 } from "node:async_hooks";
|
267182
|
-
|
267183
|
-
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/hook-engine.js
|
267184
|
-
import { AsyncLocalStorage as AsyncLocalStorage4, AsyncResource as AsyncResource10 } from "node:async_hooks";
|
267185
|
-
var hookStorage4 = new AsyncLocalStorage4;
|
267186
|
-
function createStore4(rl) {
|
267187
|
-
const store = {
|
267188
|
-
rl,
|
267189
|
-
hooks: [],
|
267190
|
-
hooksCleanup: [],
|
267191
|
-
hooksEffect: [],
|
267192
|
-
index: 0,
|
267193
|
-
handleChange() {}
|
267194
|
-
};
|
267195
|
-
return store;
|
267196
|
-
}
|
267197
|
-
function withHooks4(rl, cb) {
|
267198
|
-
const store = createStore4(rl);
|
267199
|
-
return hookStorage4.run(store, () => {
|
267200
|
-
function cycle(render) {
|
267201
|
-
store.handleChange = () => {
|
267202
|
-
store.index = 0;
|
267203
|
-
render();
|
267204
|
-
};
|
267205
|
-
store.handleChange();
|
267206
|
-
}
|
267207
|
-
return cb(cycle);
|
267208
|
-
});
|
267209
|
-
}
|
267210
|
-
function getStore4() {
|
267211
|
-
const store = hookStorage4.getStore();
|
267212
|
-
if (!store) {
|
267213
|
-
throw new HookError4("[Inquirer] Hook functions can only be called from within a prompt");
|
267214
|
-
}
|
267215
|
-
return store;
|
267216
|
-
}
|
267217
|
-
function readline7() {
|
267218
|
-
return getStore4().rl;
|
267219
|
-
}
|
267220
|
-
function withUpdates4(fn) {
|
267221
|
-
const wrapped = (...args) => {
|
267222
|
-
const store = getStore4();
|
267223
|
-
let shouldUpdate = false;
|
267224
|
-
const oldHandleChange = store.handleChange;
|
267225
|
-
store.handleChange = () => {
|
267226
|
-
shouldUpdate = true;
|
267227
|
-
};
|
267228
|
-
const returnValue = fn(...args);
|
267229
|
-
if (shouldUpdate) {
|
267230
|
-
oldHandleChange();
|
267231
|
-
}
|
267232
|
-
store.handleChange = oldHandleChange;
|
267233
|
-
return returnValue;
|
267234
|
-
};
|
267235
|
-
return AsyncResource10.bind(wrapped);
|
267236
|
-
}
|
267237
|
-
function withPointer4(cb) {
|
267238
|
-
const store = getStore4();
|
267239
|
-
const { index } = store;
|
267240
|
-
const pointer = {
|
267241
|
-
get() {
|
267242
|
-
return store.hooks[index];
|
267243
|
-
},
|
267244
|
-
set(value4) {
|
267245
|
-
store.hooks[index] = value4;
|
267246
|
-
},
|
267247
|
-
initialized: index in store.hooks
|
267248
|
-
};
|
267249
|
-
const returnValue = cb(pointer);
|
267250
|
-
store.index++;
|
267251
|
-
return returnValue;
|
267252
|
-
}
|
267253
|
-
function handleChange4() {
|
267254
|
-
getStore4().handleChange();
|
267255
|
-
}
|
267256
|
-
var effectScheduler4 = {
|
267257
|
-
queue(cb) {
|
267258
|
-
const store = getStore4();
|
267259
|
-
const { index } = store;
|
267260
|
-
store.hooksEffect.push(() => {
|
267261
|
-
store.hooksCleanup[index]?.();
|
267262
|
-
const cleanFn = cb(readline7());
|
267263
|
-
if (cleanFn != null && typeof cleanFn !== "function") {
|
267264
|
-
throw new ValidationError4("useEffect return value must be a cleanup function or nothing.");
|
267265
|
-
}
|
267266
|
-
store.hooksCleanup[index] = cleanFn;
|
267267
|
-
});
|
267268
|
-
},
|
267269
|
-
run() {
|
267270
|
-
const store = getStore4();
|
267271
|
-
withUpdates4(() => {
|
267272
|
-
store.hooksEffect.forEach((effect) => {
|
267273
|
-
effect();
|
267274
|
-
});
|
267275
|
-
store.hooksEffect.length = 0;
|
267276
|
-
})();
|
267277
|
-
},
|
267278
|
-
clearAll() {
|
267279
|
-
const store = getStore4();
|
267280
|
-
store.hooksCleanup.forEach((cleanFn) => {
|
267281
|
-
cleanFn?.();
|
267282
|
-
});
|
267283
|
-
store.hooksEffect.length = 0;
|
267284
|
-
store.hooksCleanup.length = 0;
|
267285
|
-
}
|
267286
|
-
};
|
267287
|
-
|
267288
|
-
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/use-state.js
|
267289
|
-
function useState4(defaultValue) {
|
267290
|
-
return withPointer4((pointer) => {
|
267291
|
-
const setFn = (newValue) => {
|
267292
|
-
if (pointer.get() !== newValue) {
|
267293
|
-
pointer.set(newValue);
|
267294
|
-
handleChange4();
|
267295
|
-
}
|
267296
|
-
};
|
267297
|
-
if (pointer.initialized) {
|
267298
|
-
return [pointer.get(), setFn];
|
267299
|
-
}
|
267300
|
-
const value4 = typeof defaultValue === "function" ? defaultValue() : defaultValue;
|
267301
|
-
pointer.set(value4);
|
267302
|
-
return [value4, setFn];
|
267303
|
-
});
|
267304
|
-
}
|
267305
|
-
|
267306
|
-
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/use-effect.js
|
267307
|
-
function useEffect4(cb, depArray) {
|
267308
|
-
withPointer4((pointer) => {
|
267309
|
-
const oldDeps = pointer.get();
|
267310
|
-
const hasChanged = !Array.isArray(oldDeps) || depArray.some((dep, i6) => !Object.is(dep, oldDeps[i6]));
|
267311
|
-
if (hasChanged) {
|
267312
|
-
effectScheduler4.queue(cb);
|
267313
|
-
}
|
267314
|
-
pointer.set(depArray);
|
267315
|
-
});
|
267316
|
-
}
|
267317
|
-
|
267318
|
-
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/theme.js
|
267319
|
-
var import_yoctocolors_cjs6 = __toESM(require_yoctocolors_cjs(), 1);
|
267320
|
-
var defaultTheme4 = {
|
267321
|
-
prefix: {
|
267322
|
-
idle: import_yoctocolors_cjs6.default.blue("?"),
|
267323
|
-
done: import_yoctocolors_cjs6.default.green(esm_default.tick)
|
267324
|
-
},
|
267325
|
-
spinner: {
|
267326
|
-
interval: 80,
|
267327
|
-
frames: ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"].map((frame) => import_yoctocolors_cjs6.default.yellow(frame))
|
267328
|
-
},
|
267329
|
-
style: {
|
267330
|
-
answer: import_yoctocolors_cjs6.default.cyan,
|
267331
|
-
message: import_yoctocolors_cjs6.default.bold,
|
267332
|
-
error: (text2) => import_yoctocolors_cjs6.default.red(`> ${text2}`),
|
267333
|
-
defaultAnswer: (text2) => import_yoctocolors_cjs6.default.dim(`(${text2})`),
|
267334
|
-
help: import_yoctocolors_cjs6.default.dim,
|
267335
|
-
highlight: import_yoctocolors_cjs6.default.cyan,
|
267336
|
-
key: (text2) => import_yoctocolors_cjs6.default.cyan(import_yoctocolors_cjs6.default.bold(`<${text2}>`))
|
267337
|
-
}
|
267338
|
-
};
|
267339
|
-
|
267340
|
-
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/make-theme.js
|
267341
|
-
function isPlainObject5(value4) {
|
267342
|
-
if (typeof value4 !== "object" || value4 === null)
|
267343
|
-
return false;
|
267344
|
-
let proto = value4;
|
267345
|
-
while (Object.getPrototypeOf(proto) !== null) {
|
267346
|
-
proto = Object.getPrototypeOf(proto);
|
267347
|
-
}
|
267348
|
-
return Object.getPrototypeOf(value4) === proto;
|
267349
|
-
}
|
267350
|
-
function deepMerge5(...objects) {
|
267351
|
-
const output = {};
|
267352
|
-
for (const obj of objects) {
|
267353
|
-
for (const [key4, value4] of Object.entries(obj)) {
|
267354
|
-
const prevValue = output[key4];
|
267355
|
-
output[key4] = isPlainObject5(prevValue) && isPlainObject5(value4) ? deepMerge5(prevValue, value4) : value4;
|
267356
|
-
}
|
267357
|
-
}
|
267358
|
-
return output;
|
267359
|
-
}
|
267360
|
-
function makeTheme4(...themes) {
|
267361
|
-
const themesToMerge = [
|
267362
|
-
defaultTheme4,
|
267363
|
-
...themes.filter((theme) => theme != null)
|
267364
|
-
];
|
267365
|
-
return deepMerge5(...themesToMerge);
|
267366
|
-
}
|
267367
|
-
|
267368
|
-
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/use-prefix.js
|
267369
|
-
function usePrefix4({ status = "idle", theme }) {
|
267370
|
-
const [showLoader, setShowLoader] = useState4(false);
|
267371
|
-
const [tick, setTick] = useState4(0);
|
267372
|
-
const { prefix, spinner: spinner2 } = makeTheme4(theme);
|
267373
|
-
useEffect4(() => {
|
267374
|
-
if (status === "loading") {
|
267375
|
-
let tickInterval;
|
267376
|
-
let inc = -1;
|
267377
|
-
const delayTimeout = setTimeout(AsyncResource11.bind(() => {
|
267378
|
-
setShowLoader(true);
|
267379
|
-
tickInterval = setInterval(AsyncResource11.bind(() => {
|
267380
|
-
inc = inc + 1;
|
267381
|
-
setTick(inc % spinner2.frames.length);
|
267382
|
-
}), spinner2.interval);
|
267383
|
-
}), 300);
|
267384
|
-
return () => {
|
267385
|
-
clearTimeout(delayTimeout);
|
267386
|
-
clearInterval(tickInterval);
|
267387
|
-
};
|
267388
|
-
} else {
|
267389
|
-
setShowLoader(false);
|
267390
|
-
}
|
267391
|
-
}, [status]);
|
267392
|
-
if (showLoader) {
|
267393
|
-
return spinner2.frames[tick];
|
267394
|
-
}
|
267395
|
-
const iconName = status === "loading" ? "idle" : status;
|
267396
|
-
return typeof prefix === "string" ? prefix : prefix[iconName] ?? prefix["idle"];
|
267397
|
-
}
|
267398
|
-
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/use-ref.js
|
267399
|
-
function useRef4(val) {
|
267400
|
-
return useState4({ current: val })[0];
|
267401
|
-
}
|
267402
|
-
|
267403
|
-
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/use-keypress.js
|
267404
|
-
function useKeypress4(userHandler) {
|
267405
|
-
const signal = useRef4(userHandler);
|
267406
|
-
signal.current = userHandler;
|
267407
|
-
useEffect4((rl) => {
|
267408
|
-
let ignore = false;
|
267409
|
-
const handler = withUpdates4((_input, event) => {
|
267410
|
-
if (ignore)
|
267411
|
-
return;
|
267412
|
-
signal.current(event, rl);
|
267413
|
-
});
|
267414
|
-
rl.input.on("keypress", handler);
|
267415
|
-
return () => {
|
267416
|
-
ignore = true;
|
267417
|
-
rl.input.removeListener("keypress", handler);
|
267418
|
-
};
|
267419
|
-
}, []);
|
267420
|
-
}
|
267421
|
-
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/utils.js
|
267422
|
-
var import_cli_width4 = __toESM(require_cli_width(), 1);
|
267423
|
-
var import_wrap_ansi4 = __toESM(require_wrap_ansi(), 1);
|
267424
|
-
function breakLines4(content, width) {
|
267425
|
-
return content.split(`
|
267426
|
-
`).flatMap((line) => import_wrap_ansi4.default(line, width, { trim: false, hard: true }).split(`
|
267427
|
-
`).map((str) => str.trimEnd())).join(`
|
267428
|
-
`);
|
267429
|
-
}
|
267430
|
-
function readlineWidth4() {
|
267431
|
-
return import_cli_width4.default({ defaultWidth: 80, output: readline7().output });
|
267432
|
-
}
|
267433
|
-
|
267434
|
-
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
|
267435
|
-
var import_mute_stream4 = __toESM(require_lib(), 1);
|
267436
|
-
import * as readline8 from "node:readline";
|
267437
|
-
import { AsyncResource as AsyncResource12 } from "node:async_hooks";
|
267438
|
-
|
267439
|
-
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/screen-manager.js
|
267440
|
-
var import_ansi_escapes5 = __toESM(require_ansi_escapes(), 1);
|
267441
|
-
import { stripVTControlCharacters as stripVTControlCharacters5 } from "node:util";
|
267442
|
-
var height4 = (content) => content.split(`
|
267443
|
-
`).length;
|
267444
|
-
var lastLine4 = (content) => content.split(`
|
267445
|
-
`).pop() ?? "";
|
267446
|
-
function cursorDown4(n6) {
|
267447
|
-
return n6 > 0 ? import_ansi_escapes5.default.cursorDown(n6) : "";
|
267448
|
-
}
|
267449
|
-
|
267450
|
-
class ScreenManager4 {
|
267451
|
-
height = 0;
|
267452
|
-
extraLinesUnderPrompt = 0;
|
267453
|
-
cursorPos;
|
267454
|
-
rl;
|
267455
|
-
constructor(rl) {
|
267456
|
-
this.rl = rl;
|
267457
|
-
this.cursorPos = rl.getCursorPos();
|
267458
|
-
}
|
267459
|
-
write(content) {
|
267460
|
-
this.rl.output.unmute();
|
267461
|
-
this.rl.output.write(content);
|
267462
|
-
this.rl.output.mute();
|
267463
|
-
}
|
267464
|
-
render(content, bottomContent = "") {
|
267465
|
-
const promptLine = lastLine4(content);
|
267466
|
-
const rawPromptLine = stripVTControlCharacters5(promptLine);
|
267467
|
-
let prompt = rawPromptLine;
|
267468
|
-
if (this.rl.line.length > 0) {
|
267469
|
-
prompt = prompt.slice(0, -this.rl.line.length);
|
267470
|
-
}
|
267471
|
-
this.rl.setPrompt(prompt);
|
267472
|
-
this.cursorPos = this.rl.getCursorPos();
|
267473
|
-
const width = readlineWidth4();
|
267474
|
-
content = breakLines4(content, width);
|
267475
|
-
bottomContent = breakLines4(bottomContent, width);
|
267476
|
-
if (rawPromptLine.length % width === 0) {
|
267477
|
-
content += `
|
267478
|
-
`;
|
267479
|
-
}
|
267480
|
-
let output = content + (bottomContent ? `
|
267481
|
-
` + bottomContent : "");
|
267482
|
-
const promptLineUpDiff = Math.floor(rawPromptLine.length / width) - this.cursorPos.rows;
|
267483
|
-
const bottomContentHeight = promptLineUpDiff + (bottomContent ? height4(bottomContent) : 0);
|
267484
|
-
if (bottomContentHeight > 0)
|
267485
|
-
output += import_ansi_escapes5.default.cursorUp(bottomContentHeight);
|
267486
|
-
output += import_ansi_escapes5.default.cursorTo(this.cursorPos.cols);
|
267487
|
-
this.write(cursorDown4(this.extraLinesUnderPrompt) + import_ansi_escapes5.default.eraseLines(this.height) + output);
|
267488
|
-
this.extraLinesUnderPrompt = bottomContentHeight;
|
267489
|
-
this.height = height4(output);
|
267490
|
-
}
|
267491
|
-
checkCursorPos() {
|
267492
|
-
const cursorPos = this.rl.getCursorPos();
|
267493
|
-
if (cursorPos.cols !== this.cursorPos.cols) {
|
267494
|
-
this.write(import_ansi_escapes5.default.cursorTo(cursorPos.cols));
|
267495
|
-
this.cursorPos = cursorPos;
|
267496
|
-
}
|
267497
|
-
}
|
267498
|
-
done({ clearContent }) {
|
267499
|
-
this.rl.setPrompt("");
|
267500
|
-
let output = cursorDown4(this.extraLinesUnderPrompt);
|
267501
|
-
output += clearContent ? import_ansi_escapes5.default.eraseLines(this.height) : `
|
267502
|
-
`;
|
267503
|
-
output += import_ansi_escapes5.default.cursorShow;
|
267504
|
-
this.write(output);
|
267505
|
-
this.rl.close();
|
267506
|
-
}
|
267507
|
-
}
|
267508
|
-
|
267509
|
-
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/promise-polyfill.js
|
267510
|
-
class PromisePolyfill4 extends Promise {
|
267511
|
-
static withResolver() {
|
267512
|
-
let resolve6;
|
267513
|
-
let reject;
|
267514
|
-
const promise = new Promise((res, rej) => {
|
267515
|
-
resolve6 = res;
|
267516
|
-
reject = rej;
|
267517
|
-
});
|
267518
|
-
return { promise, resolve: resolve6, reject };
|
267519
|
-
}
|
267520
|
-
}
|
267521
|
-
|
267522
|
-
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
|
267523
|
-
function getCallSites4() {
|
267524
|
-
const _prepareStackTrace = Error.prepareStackTrace;
|
267525
|
-
let result = [];
|
267526
|
-
try {
|
267527
|
-
Error.prepareStackTrace = (_5, callSites) => {
|
267528
|
-
const callSitesWithoutCurrent = callSites.slice(1);
|
267529
|
-
result = callSitesWithoutCurrent;
|
267530
|
-
return callSitesWithoutCurrent;
|
267531
|
-
};
|
267532
|
-
new Error().stack;
|
267533
|
-
} catch {
|
267534
|
-
return result;
|
267535
|
-
}
|
267536
|
-
Error.prepareStackTrace = _prepareStackTrace;
|
267537
|
-
return result;
|
267538
|
-
}
|
267539
|
-
function createPrompt4(view) {
|
267540
|
-
const callSites = getCallSites4();
|
267541
|
-
const prompt = (config3, context = {}) => {
|
267542
|
-
const { input = process.stdin, signal } = context;
|
267543
|
-
const cleanups = new Set;
|
267544
|
-
const output = new import_mute_stream4.default;
|
267545
|
-
output.pipe(context.output ?? process.stdout);
|
267546
|
-
const rl = readline8.createInterface({
|
267547
|
-
terminal: true,
|
267548
|
-
input,
|
267549
|
-
output
|
267550
|
-
});
|
267551
|
-
const screen = new ScreenManager4(rl);
|
267552
|
-
const { promise, resolve: resolve6, reject } = PromisePolyfill4.withResolver();
|
267553
|
-
const cancel3 = () => reject(new CancelPromptError4);
|
267554
|
-
if (signal) {
|
267555
|
-
const abort = () => reject(new AbortPromptError4({ cause: signal.reason }));
|
267556
|
-
if (signal.aborted) {
|
267557
|
-
abort();
|
267558
|
-
return Object.assign(promise, { cancel: cancel3 });
|
267559
|
-
}
|
267560
|
-
signal.addEventListener("abort", abort);
|
267561
|
-
cleanups.add(() => signal.removeEventListener("abort", abort));
|
267562
|
-
}
|
267563
|
-
cleanups.add(onExit((code2, signal2) => {
|
267564
|
-
reject(new ExitPromptError4(`User force closed the prompt with ${code2} ${signal2}`));
|
267565
|
-
}));
|
267566
|
-
const checkCursorPos = () => screen.checkCursorPos();
|
267567
|
-
rl.input.on("keypress", checkCursorPos);
|
267568
|
-
cleanups.add(() => rl.input.removeListener("keypress", checkCursorPos));
|
267569
|
-
return withHooks4(rl, (cycle) => {
|
267570
|
-
const hooksCleanup = AsyncResource12.bind(() => effectScheduler4.clearAll());
|
267571
|
-
rl.on("close", hooksCleanup);
|
267572
|
-
cleanups.add(() => rl.removeListener("close", hooksCleanup));
|
267573
|
-
cycle(() => {
|
267574
|
-
try {
|
267575
|
-
const nextView = view(config3, (value4) => {
|
267576
|
-
setImmediate(() => resolve6(value4));
|
267577
|
-
});
|
267578
|
-
if (nextView === undefined) {
|
267579
|
-
const callerFilename = callSites[1]?.getFileName?.();
|
267580
|
-
throw new Error(`Prompt functions must return a string.
|
267581
|
-
at ${callerFilename}`);
|
267582
|
-
}
|
267583
|
-
const [content, bottomContent] = typeof nextView === "string" ? [nextView] : nextView;
|
267584
|
-
screen.render(content, bottomContent);
|
267585
|
-
effectScheduler4.run();
|
267586
|
-
} catch (error5) {
|
267587
|
-
reject(error5);
|
267588
|
-
}
|
267589
|
-
});
|
267590
|
-
return Object.assign(promise.then((answer) => {
|
267591
|
-
effectScheduler4.clearAll();
|
267592
|
-
return answer;
|
267593
|
-
}, (error5) => {
|
267594
|
-
effectScheduler4.clearAll();
|
267595
|
-
throw error5;
|
267596
|
-
}).finally(() => {
|
267597
|
-
cleanups.forEach((cleanup) => cleanup());
|
267598
|
-
screen.done({ clearContent: Boolean(context.clearPromptOnDone) });
|
267599
|
-
output.end();
|
267600
|
-
}).then(() => promise), { cancel: cancel3 });
|
267601
|
-
});
|
267602
|
-
};
|
267603
|
-
return prompt;
|
267604
|
-
}
|
267605
266699
|
// ../../node_modules/@inquirer/password/dist/esm/index.js
|
267606
|
-
var
|
267607
|
-
var esm_default5 =
|
266700
|
+
var import_ansi_escapes4 = __toESM(require_ansi_escapes(), 1);
|
266701
|
+
var esm_default5 = createPrompt((config3, done) => {
|
267608
266702
|
const { validate: validate3 = () => true } = config3;
|
267609
|
-
const theme =
|
267610
|
-
const [status, setStatus] =
|
267611
|
-
const [errorMsg, setError] =
|
267612
|
-
const [value4, setValue] =
|
267613
|
-
const prefix =
|
267614
|
-
|
266703
|
+
const theme = makeTheme(config3.theme);
|
266704
|
+
const [status, setStatus] = useState("idle");
|
266705
|
+
const [errorMsg, setError] = useState();
|
266706
|
+
const [value4, setValue] = useState("");
|
266707
|
+
const prefix = usePrefix({ status, theme });
|
266708
|
+
useKeypress(async (key3, rl) => {
|
267615
266709
|
if (status !== "idle") {
|
267616
266710
|
return;
|
267617
266711
|
}
|
267618
|
-
if (
|
266712
|
+
if (isEnterKey(key3)) {
|
267619
266713
|
const answer = value4;
|
267620
266714
|
setStatus("loading");
|
267621
266715
|
const isValid2 = await validate3(answer);
|
@@ -267640,7 +266734,7 @@ var esm_default5 = createPrompt4((config3, done) => {
|
|
267640
266734
|
const maskChar = typeof config3.mask === "string" ? config3.mask : "*";
|
267641
266735
|
formattedValue = maskChar.repeat(value4.length);
|
267642
266736
|
} else if (status !== "done") {
|
267643
|
-
helpTip = `${theme.style.help("[input is masked]")}${
|
266737
|
+
helpTip = `${theme.style.help("[input is masked]")}${import_ansi_escapes4.default.cursorHide}`;
|
267644
266738
|
}
|
267645
266739
|
if (status === "done") {
|
267646
266740
|
formattedValue = theme.style.answer(formattedValue);
|
@@ -268731,7 +267825,7 @@ var basename2 = function(p6, extension) {
|
|
268731
267825
|
return extension && lastSegment.endsWith(extension) ? lastSegment.slice(0, -extension.length) : lastSegment;
|
268732
267826
|
};
|
268733
267827
|
// ../../node_modules/defu/dist/defu.mjs
|
268734
|
-
function
|
267828
|
+
function isPlainObject4(value4) {
|
268735
267829
|
if (value4 === null || typeof value4 !== "object") {
|
268736
267830
|
return false;
|
268737
267831
|
}
|
@@ -268748,27 +267842,27 @@ function isPlainObject6(value4) {
|
|
268748
267842
|
return true;
|
268749
267843
|
}
|
268750
267844
|
function _defu(baseObject, defaults2, namespace = ".", merger) {
|
268751
|
-
if (!
|
267845
|
+
if (!isPlainObject4(defaults2)) {
|
268752
267846
|
return _defu(baseObject, {}, namespace, merger);
|
268753
267847
|
}
|
268754
267848
|
const object = Object.assign({}, defaults2);
|
268755
|
-
for (const
|
268756
|
-
if (
|
267849
|
+
for (const key3 in baseObject) {
|
267850
|
+
if (key3 === "__proto__" || key3 === "constructor") {
|
268757
267851
|
continue;
|
268758
267852
|
}
|
268759
|
-
const value4 = baseObject[
|
267853
|
+
const value4 = baseObject[key3];
|
268760
267854
|
if (value4 === null || value4 === undefined) {
|
268761
267855
|
continue;
|
268762
267856
|
}
|
268763
|
-
if (merger && merger(object,
|
267857
|
+
if (merger && merger(object, key3, value4, namespace)) {
|
268764
267858
|
continue;
|
268765
267859
|
}
|
268766
|
-
if (Array.isArray(value4) && Array.isArray(object[
|
268767
|
-
object[
|
268768
|
-
} else if (
|
268769
|
-
object[
|
267860
|
+
if (Array.isArray(value4) && Array.isArray(object[key3])) {
|
267861
|
+
object[key3] = [...value4, ...object[key3]];
|
267862
|
+
} else if (isPlainObject4(value4) && isPlainObject4(object[key3])) {
|
267863
|
+
object[key3] = _defu(value4, object[key3], (namespace ? `${namespace}.` : "") + key3.toString(), merger);
|
268770
267864
|
} else {
|
268771
|
-
object[
|
267865
|
+
object[key3] = value4;
|
268772
267866
|
}
|
268773
267867
|
}
|
268774
267868
|
return object;
|
@@ -268777,15 +267871,15 @@ function createDefu(merger) {
|
|
268777
267871
|
return (...arguments_4) => arguments_4.reduce((p6, c3) => _defu(p6, c3, "", merger), {});
|
268778
267872
|
}
|
268779
267873
|
var defu = createDefu();
|
268780
|
-
var defuFn = createDefu((object,
|
268781
|
-
if (object[
|
268782
|
-
object[
|
267874
|
+
var defuFn = createDefu((object, key3, currentValue) => {
|
267875
|
+
if (object[key3] !== undefined && typeof currentValue === "function") {
|
267876
|
+
object[key3] = currentValue(object[key3]);
|
268783
267877
|
return true;
|
268784
267878
|
}
|
268785
267879
|
});
|
268786
|
-
var defuArrayFn = createDefu((object,
|
268787
|
-
if (Array.isArray(object[
|
268788
|
-
object[
|
267880
|
+
var defuArrayFn = createDefu((object, key3, currentValue) => {
|
267881
|
+
if (Array.isArray(object[key3]) && typeof currentValue === "function") {
|
267882
|
+
object[key3] = currentValue(object[key3]);
|
268789
267883
|
return true;
|
268790
267884
|
}
|
268791
267885
|
});
|
@@ -271482,11 +270576,11 @@ function cacheDirectory() {
|
|
271482
270576
|
}
|
271483
270577
|
function normalizeHeaders(headers = {}) {
|
271484
270578
|
const normalized = {};
|
271485
|
-
for (const [
|
270579
|
+
for (const [key3, value4] of Object.entries(headers)) {
|
271486
270580
|
if (!value4) {
|
271487
270581
|
continue;
|
271488
270582
|
}
|
271489
|
-
normalized[
|
270583
|
+
normalized[key3.toLowerCase()] = value4;
|
271490
270584
|
}
|
271491
270585
|
return normalized;
|
271492
270586
|
}
|
@@ -273849,7 +272943,7 @@ function jsonOutput(data) {
|
|
273849
272943
|
var composer = require_composer();
|
273850
272944
|
var Document = require_Document();
|
273851
272945
|
var Schema = require_Schema();
|
273852
|
-
var
|
272946
|
+
var errors3 = require_errors3();
|
273853
272947
|
var Alias = require_Alias();
|
273854
272948
|
var identity2 = require_identity();
|
273855
272949
|
var Pair = require_Pair();
|
@@ -273865,9 +272959,9 @@ var visit2 = require_visit();
|
|
273865
272959
|
var $Composer = composer.Composer;
|
273866
272960
|
var $Document = Document.Document;
|
273867
272961
|
var $Schema = Schema.Schema;
|
273868
|
-
var $YAMLError =
|
273869
|
-
var $YAMLParseError =
|
273870
|
-
var $YAMLWarning =
|
272962
|
+
var $YAMLError = errors3.YAMLError;
|
272963
|
+
var $YAMLParseError = errors3.YAMLParseError;
|
272964
|
+
var $YAMLWarning = errors3.YAMLWarning;
|
273871
272965
|
var $Alias = Alias.Alias;
|
273872
272966
|
var $isAlias = identity2.isAlias;
|
273873
272967
|
var $isCollection = identity2.isCollection;
|
@@ -274215,7 +273309,7 @@ async function getServicesAndMapResults({
|
|
274215
273309
|
const application = await settlemint.application.read(applicationUniqueName);
|
274216
273310
|
const services = await servicesSpinner(settlemint, applicationUniqueName, types2);
|
274217
273311
|
const results = (types2 ?? SERVICE_TYPES).filter((serviceType) => !types2 || types2.includes(serviceType)).map((serviceType) => {
|
274218
|
-
const [_6, labels] = Object.entries(LABELS_MAP).find(([
|
273312
|
+
const [_6, labels] = Object.entries(LABELS_MAP).find(([key3, value4]) => value4.command === serviceType) ?? [
|
274219
273313
|
null,
|
274220
273314
|
{ plural: serviceType }
|
274221
273315
|
];
|
@@ -274443,11 +273537,11 @@ function createCommand4() {
|
|
274443
273537
|
|
274444
273538
|
// src/utils/commands/passthrough-options.ts
|
274445
273539
|
function mapPassthroughOptions(options, command) {
|
274446
|
-
const optionArgs = Object.entries(options).map(([
|
273540
|
+
const optionArgs = Object.entries(options).map(([key3, value4]) => {
|
274447
273541
|
if (value4 === true) {
|
274448
|
-
return `--${
|
273542
|
+
return `--${key3}`;
|
274449
273543
|
}
|
274450
|
-
return `--${
|
273544
|
+
return `--${key3}=${value4}`;
|
274451
273545
|
});
|
274452
273546
|
return [...optionArgs, ...command.args];
|
274453
273547
|
}
|
@@ -275462,4 +274556,4 @@ async function sdkCliCommand(argv = process.argv) {
|
|
275462
274556
|
// src/cli.ts
|
275463
274557
|
sdkCliCommand();
|
275464
274558
|
|
275465
|
-
//# debugId=
|
274559
|
+
//# debugId=AD7B868368255F0964756E2164756E21
|