@settlemint/sdk-cli 2.3.2-pra7a634aa → 2.3.2-prb1129dad
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 +2390 -610
- package/dist/cli.js.map +55 -12
- package/package.json +4 -4
package/dist/cli.js
CHANGED
@@ -14935,8 +14935,8 @@ var require_printLocation = __commonJS((exports) => {
|
|
14935
14935
|
const columnNum = sourceLocation.column + columnOffset;
|
14936
14936
|
const locationStr = `${source.name}:${lineNum}:${columnNum}
|
14937
14937
|
`;
|
14938
|
-
const
|
14939
|
-
const locationLine =
|
14938
|
+
const lines = body.split(/\r\n|[\n\r]/g);
|
14939
|
+
const locationLine = lines[lineIndex];
|
14940
14940
|
if (locationLine.length > 120) {
|
14941
14941
|
const subLineIndex = Math.floor(columnNum / 80);
|
14942
14942
|
const subLineColumnNum = columnNum % 80;
|
@@ -14952,14 +14952,14 @@ var require_printLocation = __commonJS((exports) => {
|
|
14952
14952
|
]);
|
14953
14953
|
}
|
14954
14954
|
return locationStr + printPrefixedLines([
|
14955
|
-
[`${lineNum - 1} |`,
|
14955
|
+
[`${lineNum - 1} |`, lines[lineIndex - 1]],
|
14956
14956
|
[`${lineNum} |`, locationLine],
|
14957
14957
|
["|", "^".padStart(columnNum)],
|
14958
|
-
[`${lineNum + 1} |`,
|
14958
|
+
[`${lineNum + 1} |`, lines[lineIndex + 1]]
|
14959
14959
|
]);
|
14960
14960
|
}
|
14961
|
-
function printPrefixedLines(
|
14962
|
-
const existingLines =
|
14961
|
+
function printPrefixedLines(lines) {
|
14962
|
+
const existingLines = lines.filter(([_, line]) => line !== undefined);
|
14963
14963
|
const padLen = Math.max(...existingLines.map(([prefix]) => prefix.length));
|
14964
14964
|
return existingLines.map(([prefix, line]) => prefix.padStart(padLen) + (line ? " " + line : "")).join(`
|
14965
14965
|
`);
|
@@ -15372,14 +15372,14 @@ var require_blockString = __commonJS((exports) => {
|
|
15372
15372
|
exports.isPrintableAsBlockString = isPrintableAsBlockString;
|
15373
15373
|
exports.printBlockString = printBlockString;
|
15374
15374
|
var _characterClasses = require_characterClasses();
|
15375
|
-
function dedentBlockStringLines(
|
15375
|
+
function dedentBlockStringLines(lines) {
|
15376
15376
|
var _firstNonEmptyLine2;
|
15377
15377
|
let commonIndent = Number.MAX_SAFE_INTEGER;
|
15378
15378
|
let firstNonEmptyLine = null;
|
15379
15379
|
let lastNonEmptyLine = -1;
|
15380
|
-
for (let i = 0;i <
|
15380
|
+
for (let i = 0;i < lines.length; ++i) {
|
15381
15381
|
var _firstNonEmptyLine;
|
15382
|
-
const line =
|
15382
|
+
const line = lines[i];
|
15383
15383
|
const indent = leadingWhitespace(line);
|
15384
15384
|
if (indent === line.length) {
|
15385
15385
|
continue;
|
@@ -15390,7 +15390,7 @@ var require_blockString = __commonJS((exports) => {
|
|
15390
15390
|
commonIndent = indent;
|
15391
15391
|
}
|
15392
15392
|
}
|
15393
|
-
return
|
15393
|
+
return lines.map((line, i) => i === 0 ? line : line.slice(commonIndent)).slice((_firstNonEmptyLine2 = firstNonEmptyLine) !== null && _firstNonEmptyLine2 !== undefined ? _firstNonEmptyLine2 : 0, lastNonEmptyLine + 1);
|
15394
15394
|
}
|
15395
15395
|
function leadingWhitespace(str) {
|
15396
15396
|
let i = 0;
|
@@ -15452,9 +15452,9 @@ var require_blockString = __commonJS((exports) => {
|
|
15452
15452
|
}
|
15453
15453
|
function printBlockString(value, options) {
|
15454
15454
|
const escapedValue = value.replace(/"""/g, '\\"""');
|
15455
|
-
const
|
15456
|
-
const isSingleLine =
|
15457
|
-
const forceLeadingNewLine =
|
15455
|
+
const lines = escapedValue.split(/\r\n|[\n\r]/g);
|
15456
|
+
const isSingleLine = lines.length === 1;
|
15457
|
+
const forceLeadingNewLine = lines.length > 1 && lines.slice(1).every((line) => line.length === 0 || (0, _characterClasses.isWhiteSpace)(line.charCodeAt(0)));
|
15458
15458
|
const hasTrailingTripleQuotes = escapedValue.endsWith('\\"""');
|
15459
15459
|
const hasTrailingQuote = value.endsWith('"') && !hasTrailingTripleQuotes;
|
15460
15460
|
const hasTrailingSlash = value.endsWith("\\");
|
@@ -35649,9 +35649,9 @@ var require_commonjs5 = __commonJS((exports) => {
|
|
35649
35649
|
this.#resolveCache = new ResolveCache2;
|
35650
35650
|
this.#resolvePosixCache = new ResolveCache2;
|
35651
35651
|
this.#children = new ChildrenCache2(childrenCacheSize);
|
35652
|
-
const
|
35653
|
-
if (
|
35654
|
-
|
35652
|
+
const split = cwdPath.substring(this.rootPath.length).split(sep2);
|
35653
|
+
if (split.length === 1 && !split[0]) {
|
35654
|
+
split.pop();
|
35655
35655
|
}
|
35656
35656
|
if (nocase === undefined) {
|
35657
35657
|
throw new TypeError("must provide nocase setting to PathScurryBase ctor");
|
@@ -35660,11 +35660,11 @@ var require_commonjs5 = __commonJS((exports) => {
|
|
35660
35660
|
this.root = this.newRoot(this.#fs);
|
35661
35661
|
this.roots[this.rootPath] = this.root;
|
35662
35662
|
let prev = this.root;
|
35663
|
-
let len =
|
35663
|
+
let len = split.length - 1;
|
35664
35664
|
const joinSep = pathImpl.sep;
|
35665
35665
|
let abs = this.rootPath;
|
35666
35666
|
let sawFirst = false;
|
35667
|
-
for (const part of
|
35667
|
+
for (const part of split) {
|
35668
35668
|
const l2 = len--;
|
35669
35669
|
prev = prev.child(part, {
|
35670
35670
|
relative: new Array(l2).fill("..").join(joinSep),
|
@@ -38115,9 +38115,9 @@ var require_ini = __commonJS((exports, module) => {
|
|
38115
38115
|
let p = out;
|
38116
38116
|
let section = null;
|
38117
38117
|
const re = /^\[([^\]]*)\]\s*$|^([^=]+)(=(.*))?$/i;
|
38118
|
-
const
|
38118
|
+
const lines = str.split(/[\r\n]+/g);
|
38119
38119
|
const duplicates = {};
|
38120
|
-
for (const line of
|
38120
|
+
for (const line of lines) {
|
38121
38121
|
if (!line || line.match(/^\s*[;#]/) || line.match(/^\s*$/)) {
|
38122
38122
|
continue;
|
38123
38123
|
}
|
@@ -40785,7 +40785,7 @@ var require_semver2 = __commonJS((exports, module) => {
|
|
40785
40785
|
// ../../node_modules/@npmcli/git/lib/lines-to-revs.js
|
40786
40786
|
var require_lines_to_revs = __commonJS((exports, module) => {
|
40787
40787
|
var semver = require_semver2();
|
40788
|
-
module.exports = (
|
40788
|
+
module.exports = (lines) => finish(lines.reduce(linesToRevsReducer, {
|
40789
40789
|
versions: {},
|
40790
40790
|
"dist-tags": {},
|
40791
40791
|
refs: {},
|
@@ -40846,12 +40846,12 @@ var require_lines_to_revs = __commonJS((exports, module) => {
|
|
40846
40846
|
return "other";
|
40847
40847
|
};
|
40848
40848
|
var lineToRevDoc = (line) => {
|
40849
|
-
const
|
40850
|
-
if (
|
40849
|
+
const split = line.trim().split(/\s+/, 2);
|
40850
|
+
if (split.length < 2) {
|
40851
40851
|
return null;
|
40852
40852
|
}
|
40853
|
-
const sha =
|
40854
|
-
const rawRef =
|
40853
|
+
const sha = split[0].trim();
|
40854
|
+
const rawRef = split[1].trim();
|
40855
40855
|
const type2 = refType(rawRef);
|
40856
40856
|
if (type2 === "tag") {
|
40857
40857
|
const ref = rawRef.slice("refs/tags/".length);
|
@@ -43412,17 +43412,17 @@ var require_normalize_data = __commonJS((exports, module) => {
|
|
43412
43412
|
};
|
43413
43413
|
var isEmail = (str) => str.includes("@") && str.indexOf("@") < str.lastIndexOf(".");
|
43414
43414
|
function extractDescription(description) {
|
43415
|
-
const
|
43415
|
+
const lines = description.trim().split(`
|
43416
43416
|
`);
|
43417
43417
|
let start = 0;
|
43418
|
-
while (
|
43418
|
+
while (lines[start]?.trim().match(/^(#|$)/)) {
|
43419
43419
|
start++;
|
43420
43420
|
}
|
43421
43421
|
let end = start + 1;
|
43422
|
-
while (end <
|
43422
|
+
while (end < lines.length && lines[end].trim()) {
|
43423
43423
|
end++;
|
43424
43424
|
}
|
43425
|
-
return
|
43425
|
+
return lines.slice(start, end).join(" ").trim();
|
43426
43426
|
}
|
43427
43427
|
function stringifyPerson(person) {
|
43428
43428
|
if (typeof person !== "string") {
|
@@ -54139,8 +54139,8 @@ ${lanes.join(`
|
|
54139
54139
|
function sysLog(s) {
|
54140
54140
|
return curSysLog(s);
|
54141
54141
|
}
|
54142
|
-
function setSysLog(
|
54143
|
-
curSysLog =
|
54142
|
+
function setSysLog(logger3) {
|
54143
|
+
curSysLog = logger3;
|
54144
54144
|
}
|
54145
54145
|
function createDirectoryWatcherSupportingRecursive({
|
54146
54146
|
watchDirectory,
|
@@ -62119,9 +62119,9 @@ ${lanes.join(`
|
|
62119
62119
|
return node.kind === 183 || node.kind === 233;
|
62120
62120
|
}
|
62121
62121
|
var MAX_SMI_X86 = 1073741823;
|
62122
|
-
function guessIndentation(
|
62122
|
+
function guessIndentation(lines) {
|
62123
62123
|
let indentation = MAX_SMI_X86;
|
62124
|
-
for (const line of
|
62124
|
+
for (const line of lines) {
|
62125
62125
|
if (!line.length) {
|
62126
62126
|
continue;
|
62127
62127
|
}
|
@@ -150679,8 +150679,8 @@ ${lanes.join(`
|
|
150679
150679
|
if (node.comment) {
|
150680
150680
|
const text = getTextOfJSDocComment(node.comment);
|
150681
150681
|
if (text) {
|
150682
|
-
const
|
150683
|
-
for (const line of
|
150682
|
+
const lines = text.split(/\r\n?|\n/);
|
150683
|
+
for (const line of lines) {
|
150684
150684
|
writeLine();
|
150685
150685
|
writeSpace();
|
150686
150686
|
writePunctuation("*");
|
@@ -151324,9 +151324,9 @@ ${lanes.join(`
|
|
151324
151324
|
if (getEmitFlags(parentNode) & 1) {
|
151325
151325
|
writeSpace();
|
151326
151326
|
} else if (preserveSourceNewlines) {
|
151327
|
-
const
|
151328
|
-
if (
|
151329
|
-
writeLine(
|
151327
|
+
const lines = getLinesBetweenNodes(parentNode, prevChildNode, nextChildNode);
|
151328
|
+
if (lines) {
|
151329
|
+
writeLine(lines);
|
151330
151330
|
} else {
|
151331
151331
|
writeSpace();
|
151332
151332
|
}
|
@@ -151335,9 +151335,9 @@ ${lanes.join(`
|
|
151335
151335
|
}
|
151336
151336
|
}
|
151337
151337
|
function writeLines(text) {
|
151338
|
-
const
|
151339
|
-
const indentation = guessIndentation(
|
151340
|
-
for (const lineText of
|
151338
|
+
const lines = text.split(/\r\n?|\n/);
|
151339
|
+
const indentation = guessIndentation(lines);
|
151340
|
+
for (const lineText of lines) {
|
151341
151341
|
const line = indentation ? lineText.slice(indentation) : lineText;
|
151342
151342
|
if (line.length) {
|
151343
151343
|
writeLine();
|
@@ -151435,11 +151435,11 @@ ${lanes.join(`
|
|
151435
151435
|
}
|
151436
151436
|
function getEffectiveLines(getLineDifference) {
|
151437
151437
|
Debug.assert(!!preserveSourceNewlines);
|
151438
|
-
const
|
151439
|
-
if (
|
151438
|
+
const lines = getLineDifference(true);
|
151439
|
+
if (lines === 0) {
|
151440
151440
|
return getLineDifference(false);
|
151441
151441
|
}
|
151442
|
-
return
|
151442
|
+
return lines;
|
151443
151443
|
}
|
151444
151444
|
function writeLineSeparatorsAndIndentBefore(node, parent2) {
|
151445
151445
|
const leadingNewlines = preserveSourceNewlines && getLeadingLineTerminatorCount(parent2, node, 0);
|
@@ -161725,7 +161725,7 @@ ${lanes.join(`
|
|
161725
161725
|
function generateOptionOutput(sys2, option, rightAlignOfLeft, leftAlignOfRight) {
|
161726
161726
|
var _a;
|
161727
161727
|
const text = [];
|
161728
|
-
const
|
161728
|
+
const colors2 = createColors(sys2);
|
161729
161729
|
const name2 = getDisplayNameTextOfOption(option);
|
161730
161730
|
const valueCandidates = getValueCandidate(option);
|
161731
161731
|
const defaultValueDescription = typeof option.defaultValueDescription === "object" ? getDiagnosticText(option.defaultValueDescription) : formatDefaultValue(option.defaultValueDescription, option.type === "list" || option.type === "listOrElement" ? option.element.type : option.type);
|
@@ -161746,7 +161746,7 @@ ${lanes.join(`
|
|
161746
161746
|
}
|
161747
161747
|
text.push(sys2.newLine);
|
161748
161748
|
} else {
|
161749
|
-
text.push(
|
161749
|
+
text.push(colors2.blue(name2), sys2.newLine);
|
161750
161750
|
if (option.description) {
|
161751
161751
|
const description3 = getDiagnosticText(option.description);
|
161752
161752
|
text.push(description3);
|
@@ -161791,7 +161791,7 @@ ${lanes.join(`
|
|
161791
161791
|
if (isFirstLine) {
|
161792
161792
|
curLeft = left.padStart(rightAlignOfLeft2);
|
161793
161793
|
curLeft = curLeft.padEnd(leftAlignOfRight2);
|
161794
|
-
curLeft = colorLeft ?
|
161794
|
+
curLeft = colorLeft ? colors2.blue(curLeft) : curLeft;
|
161795
161795
|
} else {
|
161796
161796
|
curLeft = "".padStart(leftAlignOfRight2);
|
161797
161797
|
}
|
@@ -161860,15 +161860,15 @@ ${lanes.join(`
|
|
161860
161860
|
}
|
161861
161861
|
const rightAlignOfLeftPart = maxLength2 + 2;
|
161862
161862
|
const leftAlignOfRightPart = rightAlignOfLeftPart + 2;
|
161863
|
-
let
|
161863
|
+
let lines = [];
|
161864
161864
|
for (const option of optionsList) {
|
161865
161865
|
const tmp = generateOptionOutput(sys2, option, rightAlignOfLeftPart, leftAlignOfRightPart);
|
161866
|
-
|
161866
|
+
lines = [...lines, ...tmp];
|
161867
161867
|
}
|
161868
|
-
if (
|
161869
|
-
|
161868
|
+
if (lines[lines.length - 2] !== sys2.newLine) {
|
161869
|
+
lines.push(sys2.newLine);
|
161870
161870
|
}
|
161871
|
-
return
|
161871
|
+
return lines;
|
161872
161872
|
}
|
161873
161873
|
function generateSectionOptionsOutput(sys2, sectionName, options, subCategory, beforeOptionsDescription, afterOptionsDescription) {
|
161874
161874
|
let res = [];
|
@@ -161903,9 +161903,9 @@ ${lanes.join(`
|
|
161903
161903
|
return res;
|
161904
161904
|
}
|
161905
161905
|
function printEasyHelp(sys2, simpleOptions) {
|
161906
|
-
const
|
161906
|
+
const colors2 = createColors(sys2);
|
161907
161907
|
let output = [...getHeader(sys2, `${getDiagnosticText(Diagnostics.tsc_Colon_The_TypeScript_Compiler)} - ${getDiagnosticText(Diagnostics.Version_0, version2)}`)];
|
161908
|
-
output.push(
|
161908
|
+
output.push(colors2.bold(getDiagnosticText(Diagnostics.COMMON_COMMANDS)) + sys2.newLine + sys2.newLine);
|
161909
161909
|
example("tsc", Diagnostics.Compiles_the_current_project_tsconfig_json_in_the_working_directory);
|
161910
161910
|
example("tsc app.ts util.ts", Diagnostics.Ignoring_tsconfig_json_compiles_the_specified_files_with_default_compiler_options);
|
161911
161911
|
example("tsc -b", Diagnostics.Build_a_composite_project_in_the_working_directory);
|
@@ -161926,7 +161926,7 @@ ${lanes.join(`
|
|
161926
161926
|
function example(ex, desc) {
|
161927
161927
|
const examples = typeof ex === "string" ? [ex] : ex;
|
161928
161928
|
for (const example2 of examples) {
|
161929
|
-
output.push(" " +
|
161929
|
+
output.push(" " + colors2.blue(example2) + sys2.newLine);
|
161930
161930
|
}
|
161931
161931
|
output.push(" " + getDiagnosticText(desc) + sys2.newLine + sys2.newLine);
|
161932
161932
|
}
|
@@ -161949,12 +161949,12 @@ ${lanes.join(`
|
|
161949
161949
|
}
|
161950
161950
|
function getHeader(sys2, message) {
|
161951
161951
|
var _a;
|
161952
|
-
const
|
161952
|
+
const colors2 = createColors(sys2);
|
161953
161953
|
const header = [];
|
161954
161954
|
const terminalWidth = ((_a = sys2.getWidthOfTerminal) == null ? undefined : _a.call(sys2)) ?? 0;
|
161955
161955
|
const tsIconLength = 5;
|
161956
|
-
const tsIconFirstLine =
|
161957
|
-
const tsIconSecondLine =
|
161956
|
+
const tsIconFirstLine = colors2.blueBackground("".padStart(tsIconLength));
|
161957
|
+
const tsIconSecondLine = colors2.blueBackground(colors2.brightWhite("TS ".padStart(tsIconLength)));
|
161958
161958
|
if (terminalWidth >= message.length + tsIconLength) {
|
161959
161959
|
const rightAlign = terminalWidth > 120 ? 120 : terminalWidth;
|
161960
161960
|
const leftAlign = rightAlign - tsIconLength;
|
@@ -204833,10 +204833,10 @@ ${options.prefix}` : `
|
|
204833
204833
|
return [];
|
204834
204834
|
}
|
204835
204835
|
var ThrottledOperations = class _ThrottledOperations {
|
204836
|
-
constructor(host,
|
204836
|
+
constructor(host, logger3) {
|
204837
204837
|
this.host = host;
|
204838
204838
|
this.pendingTimeouts = /* @__PURE__ */ new Map;
|
204839
|
-
this.logger =
|
204839
|
+
this.logger = logger3.hasLevel(3) ? logger3 : undefined;
|
204840
204840
|
}
|
204841
204841
|
schedule(operationId, delay, cb) {
|
204842
204842
|
const pendingTimeout = this.pendingTimeouts.get(operationId);
|
@@ -204864,10 +204864,10 @@ ${options.prefix}` : `
|
|
204864
204864
|
}
|
204865
204865
|
};
|
204866
204866
|
var GcTimer = class _GcTimer {
|
204867
|
-
constructor(host, delay,
|
204867
|
+
constructor(host, delay, logger3) {
|
204868
204868
|
this.host = host;
|
204869
204869
|
this.delay = delay;
|
204870
|
-
this.logger =
|
204870
|
+
this.logger = logger3;
|
204871
204871
|
}
|
204872
204872
|
scheduleCollect() {
|
204873
204873
|
if (!this.host.gc || this.timerId !== undefined) {
|
@@ -210796,11 +210796,11 @@ Dynamic files must always be opened with service's current directory or service
|
|
210796
210796
|
return edits.every((edit) => textSpanEnd(edit.span) < pos);
|
210797
210797
|
}
|
210798
210798
|
var CommandNames = CommandTypes;
|
210799
|
-
function formatMessage2(msg,
|
210800
|
-
const verboseLogging =
|
210799
|
+
function formatMessage2(msg, logger3, byteLength, newLine) {
|
210800
|
+
const verboseLogging = logger3.hasLevel(3);
|
210801
210801
|
const json2 = JSON.stringify(msg);
|
210802
210802
|
if (verboseLogging) {
|
210803
|
-
|
210803
|
+
logger3.info(`${msg.type}:${stringifyIndented(msg)}`);
|
210804
210804
|
}
|
210805
210805
|
const len = byteLength(json2, "utf8");
|
210806
210806
|
return `Content-Length: ${1 + len}\r
|
@@ -210927,10 +210927,10 @@ ${json2}${newLine}`;
|
|
210927
210927
|
const info = infos && firstOrUndefined(infos);
|
210928
210928
|
return info && !info.isLocal ? { fileName: info.fileName, pos: info.textSpan.start } : undefined;
|
210929
210929
|
}
|
210930
|
-
function getReferencesWorker(projects, defaultProject, initialLocation, useCaseSensitiveFileNames2,
|
210930
|
+
function getReferencesWorker(projects, defaultProject, initialLocation, useCaseSensitiveFileNames2, logger3) {
|
210931
210931
|
var _a, _b;
|
210932
210932
|
const perProjectResults = getPerProjectReferences(projects, defaultProject, initialLocation, getDefinitionLocation(defaultProject, initialLocation, false), mapDefinitionInProject, (project, position) => {
|
210933
|
-
|
210933
|
+
logger3.info(`Finding references to ${position.fileName} position ${position.pos} in project ${project.getProjectName()}`);
|
210934
210934
|
return project.getLanguageService().findReferences(position.fileName, position.pos);
|
210935
210935
|
}, (referencedSymbol, cb) => {
|
210936
210936
|
cb(documentSpanLocation(referencedSymbol.definition));
|
@@ -213660,9 +213660,9 @@ Additional information: BADCLIENT: Bad error code, ${badCode} not found in range
|
|
213660
213660
|
insertedText = this.initialText + this.trailingText;
|
213661
213661
|
}
|
213662
213662
|
const lm = LineIndex.linesFromText(insertedText);
|
213663
|
-
const
|
213664
|
-
if (
|
213665
|
-
|
213663
|
+
const lines = lm.lines;
|
213664
|
+
if (lines.length > 1 && lines[lines.length - 1] === "") {
|
213665
|
+
lines.pop();
|
213666
213666
|
}
|
213667
213667
|
let branchParent;
|
213668
213668
|
let lastZeroCount;
|
@@ -213681,13 +213681,13 @@ Additional information: BADCLIENT: Bad error code, ${badCode} not found in range
|
|
213681
213681
|
branchParent.remove(lastZeroCount);
|
213682
213682
|
}
|
213683
213683
|
const leafNode = this.startPath[this.startPath.length - 1];
|
213684
|
-
if (
|
213685
|
-
leafNode.text =
|
213686
|
-
if (
|
213687
|
-
let insertedNodes = new Array(
|
213684
|
+
if (lines.length > 0) {
|
213685
|
+
leafNode.text = lines[0];
|
213686
|
+
if (lines.length > 1) {
|
213687
|
+
let insertedNodes = new Array(lines.length - 1);
|
213688
213688
|
let startNode2 = leafNode;
|
213689
|
-
for (let i2 = 1;i2 <
|
213690
|
-
insertedNodes[i2 - 1] = new LineLeaf(
|
213689
|
+
for (let i2 = 1;i2 < lines.length; i2++) {
|
213690
|
+
insertedNodes[i2 - 1] = new LineLeaf(lines[i2]);
|
213691
213691
|
}
|
213692
213692
|
let pathIndex = this.startPath.length - 2;
|
213693
213693
|
while (pathIndex >= 0) {
|
@@ -213957,11 +213957,11 @@ Additional information: BADCLIENT: Bad error code, ${badCode} not found in range
|
|
213957
213957
|
return { absolutePosition: this.root.charCount(), lineText: undefined };
|
213958
213958
|
}
|
213959
213959
|
}
|
213960
|
-
load(
|
213961
|
-
if (
|
213960
|
+
load(lines) {
|
213961
|
+
if (lines.length > 0) {
|
213962
213962
|
const leaves = [];
|
213963
|
-
for (let i2 = 0;i2 <
|
213964
|
-
leaves[i2] = new LineLeaf(
|
213963
|
+
for (let i2 = 0;i2 < lines.length; i2++) {
|
213964
|
+
leaves[i2] = new LineLeaf(lines[i2]);
|
213965
213965
|
}
|
213966
213966
|
this.root = _LineIndex.buildTreeFromBottom(leaves);
|
213967
213967
|
} else {
|
@@ -214064,18 +214064,18 @@ Additional information: BADCLIENT: Bad error code, ${badCode} not found in range
|
|
214064
214064
|
if (lineMap.length === 0) {
|
214065
214065
|
return { lines: [], lineMap };
|
214066
214066
|
}
|
214067
|
-
const
|
214067
|
+
const lines = new Array(lineMap.length);
|
214068
214068
|
const lc = lineMap.length - 1;
|
214069
214069
|
for (let lmi = 0;lmi < lc; lmi++) {
|
214070
|
-
|
214070
|
+
lines[lmi] = text.substring(lineMap[lmi], lineMap[lmi + 1]);
|
214071
214071
|
}
|
214072
214072
|
const endText = text.substring(lineMap[lc]);
|
214073
214073
|
if (endText.length > 0) {
|
214074
|
-
|
214074
|
+
lines[lc] = endText;
|
214075
214075
|
} else {
|
214076
|
-
|
214076
|
+
lines.pop();
|
214077
214077
|
}
|
214078
|
-
return { lines
|
214078
|
+
return { lines, lineMap };
|
214079
214079
|
}
|
214080
214080
|
};
|
214081
214081
|
var LineNode = class _LineNode {
|
@@ -214310,9 +214310,9 @@ Additional information: BADCLIENT: Bad error code, ${badCode} not found in range
|
|
214310
214310
|
}
|
214311
214311
|
};
|
214312
214312
|
var _TypingsInstallerAdapter = class _TypingsInstallerAdapter2 {
|
214313
|
-
constructor(telemetryEnabled,
|
214313
|
+
constructor(telemetryEnabled, logger3, host, globalTypingsCacheLocation, event, maxActiveRequestCount) {
|
214314
214314
|
this.telemetryEnabled = telemetryEnabled;
|
214315
|
-
this.logger =
|
214315
|
+
this.logger = logger3;
|
214316
214316
|
this.host = host;
|
214317
214317
|
this.globalTypingsCacheLocation = globalTypingsCacheLocation;
|
214318
214318
|
this.event = event;
|
@@ -215146,7 +215146,7 @@ async function* streamBody(e4) {
|
|
215146
215146
|
}
|
215147
215147
|
}
|
215148
215148
|
}
|
215149
|
-
async function*
|
215149
|
+
async function* split(e4, r3) {
|
215150
215150
|
var a4 = "";
|
215151
215151
|
var n3;
|
215152
215152
|
for await (var t4 of e4) {
|
@@ -215180,7 +215180,7 @@ function makeFetchSource(e4, r3, a4) {
|
|
215180
215180
|
var n5 = "--" + (a6 ? a6[1] : "-");
|
215181
215181
|
var t5 = true;
|
215182
215182
|
var i4;
|
215183
|
-
for await (var o4 of
|
215183
|
+
for await (var o4 of split(streamBody(r5), `\r
|
215184
215184
|
` + n5)) {
|
215185
215185
|
if (t5) {
|
215186
215186
|
t5 = false;
|
@@ -215213,7 +215213,7 @@ function makeFetchSource(e4, r3, a4) {
|
|
215213
215213
|
} else if (/text\/event-stream/i.test(o3)) {
|
215214
215214
|
s2 = async function* parseEventStream(e6) {
|
215215
215215
|
var r5;
|
215216
|
-
for await (var a6 of
|
215216
|
+
for await (var a6 of split(streamBody(e6), `
|
215217
215217
|
|
215218
215218
|
`)) {
|
215219
215219
|
var n5 = a6.match(S);
|
@@ -232786,16 +232786,16 @@ var init_lru = __esm(() => {
|
|
232786
232786
|
});
|
232787
232787
|
this.maxSize = size2;
|
232788
232788
|
}
|
232789
|
-
get(
|
232790
|
-
const value4 = super.get(
|
232791
|
-
if (super.has(
|
232792
|
-
this.delete(
|
232793
|
-
super.set(
|
232789
|
+
get(key4) {
|
232790
|
+
const value4 = super.get(key4);
|
232791
|
+
if (super.has(key4) && value4 !== undefined) {
|
232792
|
+
this.delete(key4);
|
232793
|
+
super.set(key4, value4);
|
232794
232794
|
}
|
232795
232795
|
return value4;
|
232796
232796
|
}
|
232797
|
-
set(
|
232798
|
-
super.set(
|
232797
|
+
set(key4, value4) {
|
232798
|
+
super.set(key4, value4);
|
232799
232799
|
if (this.maxSize && this.size > this.maxSize) {
|
232800
232800
|
const firstKey = this.keys().next().value;
|
232801
232801
|
if (firstKey)
|
@@ -233837,9 +233837,9 @@ var init_decodeErrorResult = __esm(() => {
|
|
233837
233837
|
});
|
233838
233838
|
|
233839
233839
|
// ../../node_modules/viem/_esm/utils/stringify.js
|
233840
|
-
var stringify3 = (value4, replacer, space) => JSON.stringify(value4, (
|
233840
|
+
var stringify3 = (value4, replacer, space) => JSON.stringify(value4, (key4, value_) => {
|
233841
233841
|
const value5 = typeof value_ === "bigint" ? value_.toString() : value_;
|
233842
|
-
return typeof replacer === "function" ? replacer(
|
233842
|
+
return typeof replacer === "function" ? replacer(key4, value5) : value5;
|
233843
233843
|
}, space);
|
233844
233844
|
|
233845
233845
|
// ../../node_modules/viem/_esm/utils/abi/formatAbiItemWithArgs.js
|
@@ -233953,13 +233953,13 @@ var init_stateOverride = __esm(() => {
|
|
233953
233953
|
|
233954
233954
|
// ../../node_modules/viem/_esm/errors/transaction.js
|
233955
233955
|
function prettyPrint(args) {
|
233956
|
-
const entries = Object.entries(args).map(([
|
233956
|
+
const entries = Object.entries(args).map(([key4, value4]) => {
|
233957
233957
|
if (value4 === undefined || value4 === false)
|
233958
233958
|
return null;
|
233959
|
-
return [
|
233959
|
+
return [key4, value4];
|
233960
233960
|
}).filter(Boolean);
|
233961
|
-
const maxLength = entries.reduce((acc, [
|
233962
|
-
return entries.map(([
|
233961
|
+
const maxLength = entries.reduce((acc, [key4]) => Math.max(acc, key4.length), 0);
|
233962
|
+
return entries.map(([key4, value4]) => ` ${`${key4}:`.padEnd(maxLength + 1)} ${value4}`).join(`
|
233963
233963
|
`);
|
233964
233964
|
}
|
233965
233965
|
var FeeConflictError, InvalidSerializableTransactionError, TransactionNotFoundError, TransactionReceiptNotFoundError, WaitForTransactionReceiptTimeoutError;
|
@@ -235067,7 +235067,7 @@ var init_sha2 = __esm(() => {
|
|
235067
235067
|
});
|
235068
235068
|
|
235069
235069
|
// ../../node_modules/@noble/hashes/esm/hmac.js
|
235070
|
-
var HMAC, hmac = (hash2,
|
235070
|
+
var HMAC, hmac = (hash2, key4, message) => new HMAC(hash2, key4).update(message).digest();
|
235071
235071
|
var init_hmac = __esm(() => {
|
235072
235072
|
init__assert();
|
235073
235073
|
init_utils2();
|
@@ -235077,7 +235077,7 @@ var init_hmac = __esm(() => {
|
|
235077
235077
|
this.finished = false;
|
235078
235078
|
this.destroyed = false;
|
235079
235079
|
ahash(hash2);
|
235080
|
-
const
|
235080
|
+
const key4 = toBytes2(_key);
|
235081
235081
|
this.iHash = hash2.create();
|
235082
235082
|
if (typeof this.iHash.update !== "function")
|
235083
235083
|
throw new Error("Expected instance of class which extends utils.Hash");
|
@@ -235085,7 +235085,7 @@ var init_hmac = __esm(() => {
|
|
235085
235085
|
this.outputLen = this.iHash.outputLen;
|
235086
235086
|
const blockLen = this.blockLen;
|
235087
235087
|
const pad2 = new Uint8Array(blockLen);
|
235088
|
-
pad2.set(
|
235088
|
+
pad2.set(key4.length > blockLen ? hash2.create().update(key4).digest() : key4);
|
235089
235089
|
for (let i6 = 0;i6 < pad2.length; i6++)
|
235090
235090
|
pad2[i6] ^= 54;
|
235091
235091
|
this.iHash.update(pad2);
|
@@ -235132,7 +235132,7 @@ var init_hmac = __esm(() => {
|
|
235132
235132
|
this.iHash.destroy();
|
235133
235133
|
}
|
235134
235134
|
};
|
235135
|
-
hmac.create = (hash2,
|
235135
|
+
hmac.create = (hash2, key4) => new HMAC(hash2, key4);
|
235136
235136
|
});
|
235137
235137
|
|
235138
235138
|
// ../../node_modules/@noble/curves/esm/abstract/utils.js
|
@@ -235591,13 +235591,13 @@ function getMinHashLength(fieldOrder) {
|
|
235591
235591
|
const length = getFieldBytesLength(fieldOrder);
|
235592
235592
|
return length + Math.ceil(length / 2);
|
235593
235593
|
}
|
235594
|
-
function mapHashToField(
|
235595
|
-
const len =
|
235594
|
+
function mapHashToField(key4, fieldOrder, isLE2 = false) {
|
235595
|
+
const len = key4.length;
|
235596
235596
|
const fieldLen = getFieldBytesLength(fieldOrder);
|
235597
235597
|
const minLen = getMinHashLength(fieldOrder);
|
235598
235598
|
if (len < 16 || len < minLen || len > 1024)
|
235599
235599
|
throw new Error("expected " + minLen + "-1024 bytes of input, got " + len);
|
235600
|
-
const num = isLE2 ? bytesToNumberLE(
|
235600
|
+
const num = isLE2 ? bytesToNumberLE(key4) : bytesToNumberBE(key4);
|
235601
235601
|
const reduced = mod(num, fieldOrder - _1n3) + _1n3;
|
235602
235602
|
return isLE2 ? numberToBytesLE(reduced, fieldLen) : numberToBytesBE(reduced, fieldLen);
|
235603
235603
|
}
|
@@ -235893,20 +235893,20 @@ function weierstrassPoints(opts) {
|
|
235893
235893
|
function isWithinCurveOrder(num) {
|
235894
235894
|
return inRange(num, _1n5, CURVE.n);
|
235895
235895
|
}
|
235896
|
-
function normPrivateKeyToScalar(
|
235896
|
+
function normPrivateKeyToScalar(key4) {
|
235897
235897
|
const { allowedPrivateKeyLengths: lengths, nByteLength, wrapPrivateKey, n: N6 } = CURVE;
|
235898
|
-
if (lengths && typeof
|
235899
|
-
if (isBytes2(
|
235900
|
-
|
235901
|
-
if (typeof
|
235898
|
+
if (lengths && typeof key4 !== "bigint") {
|
235899
|
+
if (isBytes2(key4))
|
235900
|
+
key4 = bytesToHex2(key4);
|
235901
|
+
if (typeof key4 !== "string" || !lengths.includes(key4.length))
|
235902
235902
|
throw new Error("invalid private key");
|
235903
|
-
|
235903
|
+
key4 = key4.padStart(nByteLength * 2, "0");
|
235904
235904
|
}
|
235905
235905
|
let num;
|
235906
235906
|
try {
|
235907
|
-
num = typeof
|
235907
|
+
num = typeof key4 === "bigint" ? key4 : bytesToNumberBE(ensureBytes("private key", key4, nByteLength));
|
235908
235908
|
} catch (error39) {
|
235909
|
-
throw new Error("invalid private key, expected hex or " + nByteLength + " bytes, got " + typeof
|
235909
|
+
throw new Error("invalid private key, expected hex or " + nByteLength + " bytes, got " + typeof key4);
|
235910
235910
|
}
|
235911
235911
|
if (wrapPrivateKey)
|
235912
235912
|
num = mod(num, N6);
|
@@ -236737,7 +236737,7 @@ var init_weierstrass = __esm(() => {
|
|
236737
236737
|
function getHash(hash2) {
|
236738
236738
|
return {
|
236739
236739
|
hash: hash2,
|
236740
|
-
hmac: (
|
236740
|
+
hmac: (key4, ...msgs) => hmac(hash2, key4, concatBytes(...msgs)),
|
236741
236741
|
randomBytes
|
236742
236742
|
};
|
236743
236743
|
}
|
@@ -237358,11 +237358,11 @@ function extract2(value_, { format: format2 }) {
|
|
237358
237358
|
const value4 = {};
|
237359
237359
|
function extract_(formatted2) {
|
237360
237360
|
const keys = Object.keys(formatted2);
|
237361
|
-
for (const
|
237362
|
-
if (
|
237363
|
-
value4[
|
237364
|
-
if (formatted2[
|
237365
|
-
extract_(formatted2[
|
237361
|
+
for (const key4 of keys) {
|
237362
|
+
if (key4 in value_)
|
237363
|
+
value4[key4] = value_[key4];
|
237364
|
+
if (formatted2[key4] && typeof formatted2[key4] === "object" && !Array.isArray(formatted2[key4]))
|
237365
|
+
extract_(formatted2[key4]);
|
237366
237366
|
}
|
237367
237367
|
}
|
237368
237368
|
const formatted = format2(value_ || {});
|
@@ -237764,9 +237764,9 @@ var init_Errors = __esm(() => {
|
|
237764
237764
|
|
237765
237765
|
// ../../node_modules/ox/_esm/core/Json.js
|
237766
237766
|
function stringify4(value4, replacer, space) {
|
237767
|
-
return JSON.stringify(value4, (
|
237767
|
+
return JSON.stringify(value4, (key4, value5) => {
|
237768
237768
|
if (typeof replacer === "function")
|
237769
|
-
return replacer(
|
237769
|
+
return replacer(key4, value5);
|
237770
237770
|
if (typeof value5 === "bigint")
|
237771
237771
|
return value5.toString() + bigIntSuffix;
|
237772
237772
|
return value5;
|
@@ -239188,11 +239188,11 @@ var require_visit = __commonJS((exports) => {
|
|
239188
239188
|
visit2.BREAK = BREAK;
|
239189
239189
|
visit2.SKIP = SKIP;
|
239190
239190
|
visit2.REMOVE = REMOVE;
|
239191
|
-
function visit_(
|
239192
|
-
const ctrl = callVisitor(
|
239191
|
+
function visit_(key5, node, visitor, path5) {
|
239192
|
+
const ctrl = callVisitor(key5, node, visitor, path5);
|
239193
239193
|
if (identity2.isNode(ctrl) || identity2.isPair(ctrl)) {
|
239194
|
-
replaceNode(
|
239195
|
-
return visit_(
|
239194
|
+
replaceNode(key5, path5, ctrl);
|
239195
|
+
return visit_(key5, ctrl, visitor, path5);
|
239196
239196
|
}
|
239197
239197
|
if (typeof ctrl !== "symbol") {
|
239198
239198
|
if (identity2.isCollection(node)) {
|
@@ -239236,11 +239236,11 @@ var require_visit = __commonJS((exports) => {
|
|
239236
239236
|
visitAsync.BREAK = BREAK;
|
239237
239237
|
visitAsync.SKIP = SKIP;
|
239238
239238
|
visitAsync.REMOVE = REMOVE;
|
239239
|
-
async function visitAsync_(
|
239240
|
-
const ctrl = await callVisitor(
|
239239
|
+
async function visitAsync_(key5, node, visitor, path5) {
|
239240
|
+
const ctrl = await callVisitor(key5, node, visitor, path5);
|
239241
239241
|
if (identity2.isNode(ctrl) || identity2.isPair(ctrl)) {
|
239242
|
-
replaceNode(
|
239243
|
-
return visitAsync_(
|
239242
|
+
replaceNode(key5, path5, ctrl);
|
239243
|
+
return visitAsync_(key5, ctrl, visitor, path5);
|
239244
239244
|
}
|
239245
239245
|
if (typeof ctrl !== "symbol") {
|
239246
239246
|
if (identity2.isCollection(node)) {
|
@@ -239290,27 +239290,27 @@ var require_visit = __commonJS((exports) => {
|
|
239290
239290
|
}
|
239291
239291
|
return visitor;
|
239292
239292
|
}
|
239293
|
-
function callVisitor(
|
239293
|
+
function callVisitor(key5, node, visitor, path5) {
|
239294
239294
|
if (typeof visitor === "function")
|
239295
|
-
return visitor(
|
239295
|
+
return visitor(key5, node, path5);
|
239296
239296
|
if (identity2.isMap(node))
|
239297
|
-
return visitor.Map?.(
|
239297
|
+
return visitor.Map?.(key5, node, path5);
|
239298
239298
|
if (identity2.isSeq(node))
|
239299
|
-
return visitor.Seq?.(
|
239299
|
+
return visitor.Seq?.(key5, node, path5);
|
239300
239300
|
if (identity2.isPair(node))
|
239301
|
-
return visitor.Pair?.(
|
239301
|
+
return visitor.Pair?.(key5, node, path5);
|
239302
239302
|
if (identity2.isScalar(node))
|
239303
|
-
return visitor.Scalar?.(
|
239303
|
+
return visitor.Scalar?.(key5, node, path5);
|
239304
239304
|
if (identity2.isAlias(node))
|
239305
|
-
return visitor.Alias?.(
|
239305
|
+
return visitor.Alias?.(key5, node, path5);
|
239306
239306
|
return;
|
239307
239307
|
}
|
239308
|
-
function replaceNode(
|
239308
|
+
function replaceNode(key5, path5, node) {
|
239309
239309
|
const parent = path5[path5.length - 1];
|
239310
239310
|
if (identity2.isCollection(parent)) {
|
239311
|
-
parent.items[
|
239311
|
+
parent.items[key5] = node;
|
239312
239312
|
} else if (identity2.isPair(parent)) {
|
239313
|
-
if (
|
239313
|
+
if (key5 === "key")
|
239314
239314
|
parent.key = node;
|
239315
239315
|
else
|
239316
239316
|
parent.value = node;
|
@@ -239541,7 +239541,7 @@ var require_anchors = __commonJS((exports) => {
|
|
239541
239541
|
|
239542
239542
|
// ../../node_modules/yaml/dist/doc/applyReviver.js
|
239543
239543
|
var require_applyReviver = __commonJS((exports) => {
|
239544
|
-
function applyReviver(reviver, obj,
|
239544
|
+
function applyReviver(reviver, obj, key5, val) {
|
239545
239545
|
if (val && typeof val === "object") {
|
239546
239546
|
if (Array.isArray(val)) {
|
239547
239547
|
for (let i7 = 0, len = val.length;i7 < len; ++i7) {
|
@@ -239581,7 +239581,7 @@ var require_applyReviver = __commonJS((exports) => {
|
|
239581
239581
|
}
|
239582
239582
|
}
|
239583
239583
|
}
|
239584
|
-
return reviver.call(obj,
|
239584
|
+
return reviver.call(obj, key5, val);
|
239585
239585
|
}
|
239586
239586
|
exports.applyReviver = applyReviver;
|
239587
239587
|
});
|
@@ -239910,29 +239910,29 @@ var require_Collection = __commonJS((exports) => {
|
|
239910
239910
|
if (isEmptyPath(path5))
|
239911
239911
|
this.add(value4);
|
239912
239912
|
else {
|
239913
|
-
const [
|
239914
|
-
const node = this.get(
|
239913
|
+
const [key5, ...rest] = path5;
|
239914
|
+
const node = this.get(key5, true);
|
239915
239915
|
if (identity2.isCollection(node))
|
239916
239916
|
node.addIn(rest, value4);
|
239917
239917
|
else if (node === undefined && this.schema)
|
239918
|
-
this.set(
|
239918
|
+
this.set(key5, collectionFromPath(this.schema, rest, value4));
|
239919
239919
|
else
|
239920
|
-
throw new Error(`Expected YAML collection at ${
|
239920
|
+
throw new Error(`Expected YAML collection at ${key5}. Remaining path: ${rest}`);
|
239921
239921
|
}
|
239922
239922
|
}
|
239923
239923
|
deleteIn(path5) {
|
239924
|
-
const [
|
239924
|
+
const [key5, ...rest] = path5;
|
239925
239925
|
if (rest.length === 0)
|
239926
|
-
return this.delete(
|
239927
|
-
const node = this.get(
|
239926
|
+
return this.delete(key5);
|
239927
|
+
const node = this.get(key5, true);
|
239928
239928
|
if (identity2.isCollection(node))
|
239929
239929
|
return node.deleteIn(rest);
|
239930
239930
|
else
|
239931
|
-
throw new Error(`Expected YAML collection at ${
|
239931
|
+
throw new Error(`Expected YAML collection at ${key5}. Remaining path: ${rest}`);
|
239932
239932
|
}
|
239933
239933
|
getIn(path5, keepScalar) {
|
239934
|
-
const [
|
239935
|
-
const node = this.get(
|
239934
|
+
const [key5, ...rest] = path5;
|
239935
|
+
const node = this.get(key5, true);
|
239936
239936
|
if (rest.length === 0)
|
239937
239937
|
return !keepScalar && identity2.isScalar(node) ? node.value : node;
|
239938
239938
|
else
|
@@ -239947,24 +239947,24 @@ var require_Collection = __commonJS((exports) => {
|
|
239947
239947
|
});
|
239948
239948
|
}
|
239949
239949
|
hasIn(path5) {
|
239950
|
-
const [
|
239950
|
+
const [key5, ...rest] = path5;
|
239951
239951
|
if (rest.length === 0)
|
239952
|
-
return this.has(
|
239953
|
-
const node = this.get(
|
239952
|
+
return this.has(key5);
|
239953
|
+
const node = this.get(key5, true);
|
239954
239954
|
return identity2.isCollection(node) ? node.hasIn(rest) : false;
|
239955
239955
|
}
|
239956
239956
|
setIn(path5, value4) {
|
239957
|
-
const [
|
239957
|
+
const [key5, ...rest] = path5;
|
239958
239958
|
if (rest.length === 0) {
|
239959
|
-
this.set(
|
239959
|
+
this.set(key5, value4);
|
239960
239960
|
} else {
|
239961
|
-
const node = this.get(
|
239961
|
+
const node = this.get(key5, true);
|
239962
239962
|
if (identity2.isCollection(node))
|
239963
239963
|
node.setIn(rest, value4);
|
239964
239964
|
else if (node === undefined && this.schema)
|
239965
|
-
this.set(
|
239965
|
+
this.set(key5, collectionFromPath(this.schema, rest, value4));
|
239966
239966
|
else
|
239967
|
-
throw new Error(`Expected YAML collection at ${
|
239967
|
+
throw new Error(`Expected YAML collection at ${key5}. Remaining path: ${rest}`);
|
239968
239968
|
}
|
239969
239969
|
}
|
239970
239970
|
}
|
@@ -240551,19 +240551,19 @@ var require_stringifyPair = __commonJS((exports) => {
|
|
240551
240551
|
var Scalar = require_Scalar();
|
240552
240552
|
var stringify5 = require_stringify();
|
240553
240553
|
var stringifyComment = require_stringifyComment();
|
240554
|
-
function stringifyPair2({ key:
|
240554
|
+
function stringifyPair2({ key: key5, value: value4 }, ctx, onComment, onChompKeep) {
|
240555
240555
|
const { allNullValues, doc: doc2, indent: indent2, indentStep, options: { commentString, indentSeq, simpleKeys } } = ctx;
|
240556
|
-
let keyComment = identity2.isNode(
|
240556
|
+
let keyComment = identity2.isNode(key5) && key5.comment || null;
|
240557
240557
|
if (simpleKeys) {
|
240558
240558
|
if (keyComment) {
|
240559
240559
|
throw new Error("With simple keys, key nodes cannot have comments");
|
240560
240560
|
}
|
240561
|
-
if (identity2.isCollection(
|
240561
|
+
if (identity2.isCollection(key5) || !identity2.isNode(key5) && typeof key5 === "object") {
|
240562
240562
|
const msg = "With simple keys, collection cannot be used as a key value";
|
240563
240563
|
throw new Error(msg);
|
240564
240564
|
}
|
240565
240565
|
}
|
240566
|
-
let explicitKey = !simpleKeys && (!
|
240566
|
+
let explicitKey = !simpleKeys && (!key5 || keyComment && value4 == null && !ctx.inFlow || identity2.isCollection(key5) || (identity2.isScalar(key5) ? key5.type === Scalar.Scalar.BLOCK_FOLDED || key5.type === Scalar.Scalar.BLOCK_LITERAL : typeof key5 === "object"));
|
240567
240567
|
ctx = Object.assign({}, ctx, {
|
240568
240568
|
allNullValues: false,
|
240569
240569
|
implicitKey: !explicitKey && (simpleKeys || !allNullValues),
|
@@ -240571,7 +240571,7 @@ var require_stringifyPair = __commonJS((exports) => {
|
|
240571
240571
|
});
|
240572
240572
|
let keyCommentDone = false;
|
240573
240573
|
let chompKeep = false;
|
240574
|
-
let str = stringify5.stringify(
|
240574
|
+
let str = stringify5.stringify(key5, ctx, () => keyCommentDone = true, () => chompKeep = true);
|
240575
240575
|
if (!explicitKey && !ctx.inFlow && str.length > 1024) {
|
240576
240576
|
if (simpleKeys)
|
240577
240577
|
throw new Error("With simple keys, single line scalar must not span more than 1024 characters");
|
@@ -240715,7 +240715,7 @@ var require_merge = __commonJS((exports) => {
|
|
240715
240715
|
}),
|
240716
240716
|
stringify: () => MERGE_KEY
|
240717
240717
|
};
|
240718
|
-
var isMergeKey = (ctx,
|
240718
|
+
var isMergeKey = (ctx, key5) => (merge4.identify(key5) || identity2.isScalar(key5) && (!key5.type || key5.type === Scalar.Scalar.PLAIN) && merge4.identify(key5.value)) && ctx?.doc.schema.tags.some((tag) => tag.tag === merge4.tag && tag.default);
|
240719
240719
|
function addMergeToJSMap(ctx, map4, value4) {
|
240720
240720
|
value4 = ctx && identity2.isAlias(value4) ? value4.resolve(ctx.doc) : value4;
|
240721
240721
|
if (identity2.isSeq(value4))
|
@@ -240732,14 +240732,14 @@ var require_merge = __commonJS((exports) => {
|
|
240732
240732
|
if (!identity2.isMap(source))
|
240733
240733
|
throw new Error("Merge sources must be maps or map aliases");
|
240734
240734
|
const srcMap = source.toJSON(null, ctx, Map);
|
240735
|
-
for (const [
|
240735
|
+
for (const [key5, value5] of srcMap) {
|
240736
240736
|
if (map4 instanceof Map) {
|
240737
|
-
if (!map4.has(
|
240738
|
-
map4.set(
|
240737
|
+
if (!map4.has(key5))
|
240738
|
+
map4.set(key5, value5);
|
240739
240739
|
} else if (map4 instanceof Set) {
|
240740
|
-
map4.add(
|
240741
|
-
} else if (!Object.prototype.hasOwnProperty.call(map4,
|
240742
|
-
Object.defineProperty(map4,
|
240740
|
+
map4.add(key5);
|
240741
|
+
} else if (!Object.prototype.hasOwnProperty.call(map4, key5)) {
|
240742
|
+
Object.defineProperty(map4, key5, {
|
240743
240743
|
value: value5,
|
240744
240744
|
writable: true,
|
240745
240745
|
enumerable: true,
|
@@ -240761,19 +240761,19 @@ var require_addPairToJSMap = __commonJS((exports) => {
|
|
240761
240761
|
var stringify5 = require_stringify();
|
240762
240762
|
var identity2 = require_identity();
|
240763
240763
|
var toJS = require_toJS();
|
240764
|
-
function addPairToJSMap(ctx, map4, { key:
|
240765
|
-
if (identity2.isNode(
|
240766
|
-
|
240767
|
-
else if (merge4.isMergeKey(ctx,
|
240764
|
+
function addPairToJSMap(ctx, map4, { key: key5, value: value4 }) {
|
240765
|
+
if (identity2.isNode(key5) && key5.addToJSMap)
|
240766
|
+
key5.addToJSMap(ctx, map4, value4);
|
240767
|
+
else if (merge4.isMergeKey(ctx, key5))
|
240768
240768
|
merge4.addMergeToJSMap(ctx, map4, value4);
|
240769
240769
|
else {
|
240770
|
-
const jsKey = toJS.toJS(
|
240770
|
+
const jsKey = toJS.toJS(key5, "", ctx);
|
240771
240771
|
if (map4 instanceof Map) {
|
240772
240772
|
map4.set(jsKey, toJS.toJS(value4, jsKey, ctx));
|
240773
240773
|
} else if (map4 instanceof Set) {
|
240774
240774
|
map4.add(jsKey);
|
240775
240775
|
} else {
|
240776
|
-
const stringKey = stringifyKey(
|
240776
|
+
const stringKey = stringifyKey(key5, jsKey, ctx);
|
240777
240777
|
const jsValue = toJS.toJS(value4, stringKey, ctx);
|
240778
240778
|
if (stringKey in map4)
|
240779
240779
|
Object.defineProperty(map4, stringKey, {
|
@@ -240788,19 +240788,19 @@ var require_addPairToJSMap = __commonJS((exports) => {
|
|
240788
240788
|
}
|
240789
240789
|
return map4;
|
240790
240790
|
}
|
240791
|
-
function stringifyKey(
|
240791
|
+
function stringifyKey(key5, jsKey, ctx) {
|
240792
240792
|
if (jsKey === null)
|
240793
240793
|
return "";
|
240794
240794
|
if (typeof jsKey !== "object")
|
240795
240795
|
return String(jsKey);
|
240796
|
-
if (identity2.isNode(
|
240796
|
+
if (identity2.isNode(key5) && ctx?.doc) {
|
240797
240797
|
const strCtx = stringify5.createStringifyContext(ctx.doc, {});
|
240798
240798
|
strCtx.anchors = new Set;
|
240799
240799
|
for (const node of ctx.anchors.keys())
|
240800
240800
|
strCtx.anchors.add(node.anchor);
|
240801
240801
|
strCtx.inFlow = true;
|
240802
240802
|
strCtx.inStringifyKey = true;
|
240803
|
-
const strKey =
|
240803
|
+
const strKey = key5.toString(strCtx);
|
240804
240804
|
if (!ctx.mapKeyWarned) {
|
240805
240805
|
let jsonStr = JSON.stringify(strKey);
|
240806
240806
|
if (jsonStr.length > 40)
|
@@ -240821,25 +240821,25 @@ var require_Pair = __commonJS((exports) => {
|
|
240821
240821
|
var stringifyPair2 = require_stringifyPair();
|
240822
240822
|
var addPairToJSMap = require_addPairToJSMap();
|
240823
240823
|
var identity2 = require_identity();
|
240824
|
-
function createPair(
|
240825
|
-
const k6 = createNode.createNode(
|
240824
|
+
function createPair(key5, value4, ctx) {
|
240825
|
+
const k6 = createNode.createNode(key5, undefined, ctx);
|
240826
240826
|
const v7 = createNode.createNode(value4, undefined, ctx);
|
240827
240827
|
return new Pair(k6, v7);
|
240828
240828
|
}
|
240829
240829
|
|
240830
240830
|
class Pair {
|
240831
|
-
constructor(
|
240831
|
+
constructor(key5, value4 = null) {
|
240832
240832
|
Object.defineProperty(this, identity2.NODE_TYPE, { value: identity2.PAIR });
|
240833
|
-
this.key =
|
240833
|
+
this.key = key5;
|
240834
240834
|
this.value = value4;
|
240835
240835
|
}
|
240836
240836
|
clone(schema) {
|
240837
|
-
let { key:
|
240838
|
-
if (identity2.isNode(
|
240839
|
-
|
240837
|
+
let { key: key5, value: value4 } = this;
|
240838
|
+
if (identity2.isNode(key5))
|
240839
|
+
key5 = key5.clone(schema);
|
240840
240840
|
if (identity2.isNode(value4))
|
240841
240841
|
value4 = value4.clone(schema);
|
240842
|
-
return new Pair(
|
240842
|
+
return new Pair(key5, value4);
|
240843
240843
|
}
|
240844
240844
|
toJSON(_6, ctx) {
|
240845
240845
|
const pair = ctx?.mapAsMap ? new Map : {};
|
@@ -241006,11 +241006,11 @@ var require_YAMLMap = __commonJS((exports) => {
|
|
241006
241006
|
var identity2 = require_identity();
|
241007
241007
|
var Pair = require_Pair();
|
241008
241008
|
var Scalar = require_Scalar();
|
241009
|
-
function findPair(items,
|
241010
|
-
const k6 = identity2.isScalar(
|
241009
|
+
function findPair(items, key5) {
|
241010
|
+
const k6 = identity2.isScalar(key5) ? key5.value : key5;
|
241011
241011
|
for (const it2 of items) {
|
241012
241012
|
if (identity2.isPair(it2)) {
|
241013
|
-
if (it2.key ===
|
241013
|
+
if (it2.key === key5 || it2.key === k6)
|
241014
241014
|
return it2;
|
241015
241015
|
if (identity2.isScalar(it2.key) && it2.key.value === k6)
|
241016
241016
|
return it2;
|
@@ -241030,20 +241030,20 @@ var require_YAMLMap = __commonJS((exports) => {
|
|
241030
241030
|
static from(schema, obj, ctx) {
|
241031
241031
|
const { keepUndefined, replacer } = ctx;
|
241032
241032
|
const map4 = new this(schema);
|
241033
|
-
const add = (
|
241033
|
+
const add = (key5, value4) => {
|
241034
241034
|
if (typeof replacer === "function")
|
241035
|
-
value4 = replacer.call(obj,
|
241036
|
-
else if (Array.isArray(replacer) && !replacer.includes(
|
241035
|
+
value4 = replacer.call(obj, key5, value4);
|
241036
|
+
else if (Array.isArray(replacer) && !replacer.includes(key5))
|
241037
241037
|
return;
|
241038
241038
|
if (value4 !== undefined || keepUndefined)
|
241039
|
-
map4.items.push(Pair.createPair(
|
241039
|
+
map4.items.push(Pair.createPair(key5, value4, ctx));
|
241040
241040
|
};
|
241041
241041
|
if (obj instanceof Map) {
|
241042
|
-
for (const [
|
241043
|
-
add(
|
241042
|
+
for (const [key5, value4] of obj)
|
241043
|
+
add(key5, value4);
|
241044
241044
|
} else if (obj && typeof obj === "object") {
|
241045
|
-
for (const
|
241046
|
-
add(
|
241045
|
+
for (const key5 of Object.keys(obj))
|
241046
|
+
add(key5, obj[key5]);
|
241047
241047
|
}
|
241048
241048
|
if (typeof schema.sortMapEntries === "function") {
|
241049
241049
|
map4.items.sort(schema.sortMapEntries);
|
@@ -241077,23 +241077,23 @@ var require_YAMLMap = __commonJS((exports) => {
|
|
241077
241077
|
this.items.push(_pair);
|
241078
241078
|
}
|
241079
241079
|
}
|
241080
|
-
delete(
|
241081
|
-
const it2 = findPair(this.items,
|
241080
|
+
delete(key5) {
|
241081
|
+
const it2 = findPair(this.items, key5);
|
241082
241082
|
if (!it2)
|
241083
241083
|
return false;
|
241084
241084
|
const del = this.items.splice(this.items.indexOf(it2), 1);
|
241085
241085
|
return del.length > 0;
|
241086
241086
|
}
|
241087
|
-
get(
|
241088
|
-
const it2 = findPair(this.items,
|
241087
|
+
get(key5, keepScalar) {
|
241088
|
+
const it2 = findPair(this.items, key5);
|
241089
241089
|
const node = it2?.value;
|
241090
241090
|
return (!keepScalar && identity2.isScalar(node) ? node.value : node) ?? undefined;
|
241091
241091
|
}
|
241092
|
-
has(
|
241093
|
-
return !!findPair(this.items,
|
241092
|
+
has(key5) {
|
241093
|
+
return !!findPair(this.items, key5);
|
241094
241094
|
}
|
241095
|
-
set(
|
241096
|
-
this.add(new Pair.Pair(
|
241095
|
+
set(key5, value4) {
|
241096
|
+
this.add(new Pair.Pair(key5, value4), true);
|
241097
241097
|
}
|
241098
241098
|
toJSON(_6, ctx, Type) {
|
241099
241099
|
const map4 = Type ? new Type : ctx?.mapAsMap ? new Map : {};
|
@@ -241164,28 +241164,28 @@ var require_YAMLSeq = __commonJS((exports) => {
|
|
241164
241164
|
add(value4) {
|
241165
241165
|
this.items.push(value4);
|
241166
241166
|
}
|
241167
|
-
delete(
|
241168
|
-
const idx = asItemIndex(
|
241167
|
+
delete(key5) {
|
241168
|
+
const idx = asItemIndex(key5);
|
241169
241169
|
if (typeof idx !== "number")
|
241170
241170
|
return false;
|
241171
241171
|
const del = this.items.splice(idx, 1);
|
241172
241172
|
return del.length > 0;
|
241173
241173
|
}
|
241174
|
-
get(
|
241175
|
-
const idx = asItemIndex(
|
241174
|
+
get(key5, keepScalar) {
|
241175
|
+
const idx = asItemIndex(key5);
|
241176
241176
|
if (typeof idx !== "number")
|
241177
241177
|
return;
|
241178
241178
|
const it2 = this.items[idx];
|
241179
241179
|
return !keepScalar && identity2.isScalar(it2) ? it2.value : it2;
|
241180
241180
|
}
|
241181
|
-
has(
|
241182
|
-
const idx = asItemIndex(
|
241181
|
+
has(key5) {
|
241182
|
+
const idx = asItemIndex(key5);
|
241183
241183
|
return typeof idx === "number" && idx < this.items.length;
|
241184
241184
|
}
|
241185
|
-
set(
|
241186
|
-
const idx = asItemIndex(
|
241185
|
+
set(key5, value4) {
|
241186
|
+
const idx = asItemIndex(key5);
|
241187
241187
|
if (typeof idx !== "number")
|
241188
|
-
throw new Error(`Expected a valid index, not ${
|
241188
|
+
throw new Error(`Expected a valid index, not ${key5}.`);
|
241189
241189
|
const prev = this.items[idx];
|
241190
241190
|
if (identity2.isScalar(prev) && Scalar.isScalarValue(value4))
|
241191
241191
|
prev.value = value4;
|
@@ -241219,8 +241219,8 @@ var require_YAMLSeq = __commonJS((exports) => {
|
|
241219
241219
|
let i7 = 0;
|
241220
241220
|
for (let it2 of obj) {
|
241221
241221
|
if (typeof replacer === "function") {
|
241222
|
-
const
|
241223
|
-
it2 = replacer.call(obj,
|
241222
|
+
const key5 = obj instanceof Set ? it2 : String(i7++);
|
241223
|
+
it2 = replacer.call(obj, key5, it2);
|
241224
241224
|
}
|
241225
241225
|
seq.items.push(createNode.createNode(it2, undefined, ctx));
|
241226
241226
|
}
|
@@ -241228,8 +241228,8 @@ var require_YAMLSeq = __commonJS((exports) => {
|
|
241228
241228
|
return seq;
|
241229
241229
|
}
|
241230
241230
|
}
|
241231
|
-
function asItemIndex(
|
241232
|
-
let idx = identity2.isScalar(
|
241231
|
+
function asItemIndex(key5) {
|
241232
|
+
let idx = identity2.isScalar(key5) ? key5.value : key5;
|
241233
241233
|
if (idx && typeof idx === "string")
|
241234
241234
|
idx = Number(idx);
|
241235
241235
|
return typeof idx === "number" && Number.isInteger(idx) && idx >= 0 ? idx : null;
|
@@ -241602,25 +241602,25 @@ ${cn.comment}` : item.comment;
|
|
241602
241602
|
for (let it2 of iterable) {
|
241603
241603
|
if (typeof replacer === "function")
|
241604
241604
|
it2 = replacer.call(iterable, String(i7++), it2);
|
241605
|
-
let
|
241605
|
+
let key5, value4;
|
241606
241606
|
if (Array.isArray(it2)) {
|
241607
241607
|
if (it2.length === 2) {
|
241608
|
-
|
241608
|
+
key5 = it2[0];
|
241609
241609
|
value4 = it2[1];
|
241610
241610
|
} else
|
241611
241611
|
throw new TypeError(`Expected [key, value] tuple: ${it2}`);
|
241612
241612
|
} else if (it2 && it2 instanceof Object) {
|
241613
241613
|
const keys = Object.keys(it2);
|
241614
241614
|
if (keys.length === 1) {
|
241615
|
-
|
241616
|
-
value4 = it2[
|
241615
|
+
key5 = keys[0];
|
241616
|
+
value4 = it2[key5];
|
241617
241617
|
} else {
|
241618
241618
|
throw new TypeError(`Expected tuple with one key, not ${keys.length} keys`);
|
241619
241619
|
}
|
241620
241620
|
} else {
|
241621
|
-
|
241621
|
+
key5 = it2;
|
241622
241622
|
}
|
241623
|
-
pairs2.items.push(Pair.createPair(
|
241623
|
+
pairs2.items.push(Pair.createPair(key5, value4, ctx));
|
241624
241624
|
}
|
241625
241625
|
return pairs2;
|
241626
241626
|
}
|
@@ -241661,16 +241661,16 @@ var require_omap = __commonJS((exports) => {
|
|
241661
241661
|
if (ctx?.onCreate)
|
241662
241662
|
ctx.onCreate(map4);
|
241663
241663
|
for (const pair of this.items) {
|
241664
|
-
let
|
241664
|
+
let key5, value4;
|
241665
241665
|
if (identity2.isPair(pair)) {
|
241666
|
-
|
241667
|
-
value4 = toJS.toJS(pair.value,
|
241666
|
+
key5 = toJS.toJS(pair.key, "", ctx);
|
241667
|
+
value4 = toJS.toJS(pair.value, key5, ctx);
|
241668
241668
|
} else {
|
241669
|
-
|
241669
|
+
key5 = toJS.toJS(pair, "", ctx);
|
241670
241670
|
}
|
241671
|
-
if (map4.has(
|
241671
|
+
if (map4.has(key5))
|
241672
241672
|
throw new Error("Ordered maps must not include duplicate keys");
|
241673
|
-
map4.set(
|
241673
|
+
map4.set(key5, value4);
|
241674
241674
|
}
|
241675
241675
|
return map4;
|
241676
241676
|
}
|
@@ -241691,12 +241691,12 @@ var require_omap = __commonJS((exports) => {
|
|
241691
241691
|
resolve(seq, onError) {
|
241692
241692
|
const pairs$1 = pairs.resolvePairs(seq, onError);
|
241693
241693
|
const seenKeys = [];
|
241694
|
-
for (const { key:
|
241695
|
-
if (identity2.isScalar(
|
241696
|
-
if (seenKeys.includes(
|
241697
|
-
onError(`Ordered maps must not include duplicate keys: ${
|
241694
|
+
for (const { key: key5 } of pairs$1.items) {
|
241695
|
+
if (identity2.isScalar(key5)) {
|
241696
|
+
if (seenKeys.includes(key5.value)) {
|
241697
|
+
onError(`Ordered maps must not include duplicate keys: ${key5.value}`);
|
241698
241698
|
} else {
|
241699
|
-
seenKeys.push(
|
241699
|
+
seenKeys.push(key5.value);
|
241700
241700
|
}
|
241701
241701
|
}
|
241702
241702
|
}
|
@@ -241870,30 +241870,30 @@ var require_set = __commonJS((exports) => {
|
|
241870
241870
|
super(schema);
|
241871
241871
|
this.tag = YAMLSet.tag;
|
241872
241872
|
}
|
241873
|
-
add(
|
241873
|
+
add(key5) {
|
241874
241874
|
let pair;
|
241875
|
-
if (identity2.isPair(
|
241876
|
-
pair =
|
241877
|
-
else if (
|
241878
|
-
pair = new Pair.Pair(
|
241875
|
+
if (identity2.isPair(key5))
|
241876
|
+
pair = key5;
|
241877
|
+
else if (key5 && typeof key5 === "object" && "key" in key5 && "value" in key5 && key5.value === null)
|
241878
|
+
pair = new Pair.Pair(key5.key, null);
|
241879
241879
|
else
|
241880
|
-
pair = new Pair.Pair(
|
241880
|
+
pair = new Pair.Pair(key5, null);
|
241881
241881
|
const prev = YAMLMap.findPair(this.items, pair.key);
|
241882
241882
|
if (!prev)
|
241883
241883
|
this.items.push(pair);
|
241884
241884
|
}
|
241885
|
-
get(
|
241886
|
-
const pair = YAMLMap.findPair(this.items,
|
241885
|
+
get(key5, keepPair) {
|
241886
|
+
const pair = YAMLMap.findPair(this.items, key5);
|
241887
241887
|
return !keepPair && identity2.isPair(pair) ? identity2.isScalar(pair.key) ? pair.key.value : pair.key : pair;
|
241888
241888
|
}
|
241889
|
-
set(
|
241889
|
+
set(key5, value4) {
|
241890
241890
|
if (typeof value4 !== "boolean")
|
241891
241891
|
throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof value4}`);
|
241892
|
-
const prev = YAMLMap.findPair(this.items,
|
241892
|
+
const prev = YAMLMap.findPair(this.items, key5);
|
241893
241893
|
if (prev && !value4) {
|
241894
241894
|
this.items.splice(this.items.indexOf(prev), 1);
|
241895
241895
|
} else if (!prev && value4) {
|
241896
|
-
this.items.push(new Pair.Pair(
|
241896
|
+
this.items.push(new Pair.Pair(key5));
|
241897
241897
|
}
|
241898
241898
|
}
|
241899
241899
|
toJSON(_6, ctx) {
|
@@ -242128,7 +242128,7 @@ var require_tags = __commonJS((exports) => {
|
|
242128
242128
|
if (Array.isArray(customTags))
|
242129
242129
|
tags = [];
|
242130
242130
|
else {
|
242131
|
-
const keys = Array.from(schemas3.keys()).filter((
|
242131
|
+
const keys = Array.from(schemas3.keys()).filter((key5) => key5 !== "yaml11").map((key5) => JSON.stringify(key5)).join(", ");
|
242132
242132
|
throw new Error(`Unknown schema "${schemaName}"; use one of ${keys} or define customTags array`);
|
242133
242133
|
}
|
242134
242134
|
}
|
@@ -242144,7 +242144,7 @@ var require_tags = __commonJS((exports) => {
|
|
242144
242144
|
const tagObj = typeof tag === "string" ? tagsByName[tag] : tag;
|
242145
242145
|
if (!tagObj) {
|
242146
242146
|
const tagName = JSON.stringify(tag);
|
242147
|
-
const keys = Object.keys(tagsByName).map((
|
242147
|
+
const keys = Object.keys(tagsByName).map((key5) => JSON.stringify(key5)).join(", ");
|
242148
242148
|
throw new Error(`Unknown custom tag ${tagName}; use one of ${keys}`);
|
242149
242149
|
}
|
242150
242150
|
if (!tags2.includes(tagObj))
|
@@ -242379,13 +242379,13 @@ var require_Document = __commonJS((exports) => {
|
|
242379
242379
|
setAnchors();
|
242380
242380
|
return node;
|
242381
242381
|
}
|
242382
|
-
createPair(
|
242383
|
-
const k6 = this.createNode(
|
242382
|
+
createPair(key5, value4, options = {}) {
|
242383
|
+
const k6 = this.createNode(key5, null, options);
|
242384
242384
|
const v7 = this.createNode(value4, null, options);
|
242385
242385
|
return new Pair.Pair(k6, v7);
|
242386
242386
|
}
|
242387
|
-
delete(
|
242388
|
-
return assertCollection(this.contents) ? this.contents.delete(
|
242387
|
+
delete(key5) {
|
242388
|
+
return assertCollection(this.contents) ? this.contents.delete(key5) : false;
|
242389
242389
|
}
|
242390
242390
|
deleteIn(path5) {
|
242391
242391
|
if (Collection.isEmptyPath(path5)) {
|
@@ -242396,27 +242396,27 @@ var require_Document = __commonJS((exports) => {
|
|
242396
242396
|
}
|
242397
242397
|
return assertCollection(this.contents) ? this.contents.deleteIn(path5) : false;
|
242398
242398
|
}
|
242399
|
-
get(
|
242400
|
-
return identity2.isCollection(this.contents) ? this.contents.get(
|
242399
|
+
get(key5, keepScalar) {
|
242400
|
+
return identity2.isCollection(this.contents) ? this.contents.get(key5, keepScalar) : undefined;
|
242401
242401
|
}
|
242402
242402
|
getIn(path5, keepScalar) {
|
242403
242403
|
if (Collection.isEmptyPath(path5))
|
242404
242404
|
return !keepScalar && identity2.isScalar(this.contents) ? this.contents.value : this.contents;
|
242405
242405
|
return identity2.isCollection(this.contents) ? this.contents.getIn(path5, keepScalar) : undefined;
|
242406
242406
|
}
|
242407
|
-
has(
|
242408
|
-
return identity2.isCollection(this.contents) ? this.contents.has(
|
242407
|
+
has(key5) {
|
242408
|
+
return identity2.isCollection(this.contents) ? this.contents.has(key5) : false;
|
242409
242409
|
}
|
242410
242410
|
hasIn(path5) {
|
242411
242411
|
if (Collection.isEmptyPath(path5))
|
242412
242412
|
return this.contents !== undefined;
|
242413
242413
|
return identity2.isCollection(this.contents) ? this.contents.hasIn(path5) : false;
|
242414
242414
|
}
|
242415
|
-
set(
|
242415
|
+
set(key5, value4) {
|
242416
242416
|
if (this.contents == null) {
|
242417
|
-
this.contents = Collection.collectionFromPath(this.schema, [
|
242417
|
+
this.contents = Collection.collectionFromPath(this.schema, [key5], value4);
|
242418
242418
|
} else if (assertCollection(this.contents)) {
|
242419
|
-
this.contents.set(
|
242419
|
+
this.contents.set(key5, value4);
|
242420
242420
|
}
|
242421
242421
|
}
|
242422
242422
|
setIn(path5, value4) {
|
@@ -242698,25 +242698,25 @@ var require_resolve_props = __commonJS((exports) => {
|
|
242698
242698
|
|
242699
242699
|
// ../../node_modules/yaml/dist/compose/util-contains-newline.js
|
242700
242700
|
var require_util_contains_newline = __commonJS((exports) => {
|
242701
|
-
function containsNewline(
|
242702
|
-
if (!
|
242701
|
+
function containsNewline(key5) {
|
242702
|
+
if (!key5)
|
242703
242703
|
return null;
|
242704
|
-
switch (
|
242704
|
+
switch (key5.type) {
|
242705
242705
|
case "alias":
|
242706
242706
|
case "scalar":
|
242707
242707
|
case "double-quoted-scalar":
|
242708
242708
|
case "single-quoted-scalar":
|
242709
|
-
if (
|
242709
|
+
if (key5.source.includes(`
|
242710
242710
|
`))
|
242711
242711
|
return true;
|
242712
|
-
if (
|
242713
|
-
for (const st2 of
|
242712
|
+
if (key5.end) {
|
242713
|
+
for (const st2 of key5.end)
|
242714
242714
|
if (st2.type === "newline")
|
242715
242715
|
return true;
|
242716
242716
|
}
|
242717
242717
|
return false;
|
242718
242718
|
case "flow-collection":
|
242719
|
-
for (const it2 of
|
242719
|
+
for (const it2 of key5.items) {
|
242720
242720
|
for (const st2 of it2.start)
|
242721
242721
|
if (st2.type === "newline")
|
242722
242722
|
return true;
|
@@ -242781,10 +242781,10 @@ var require_resolve_block_map = __commonJS((exports) => {
|
|
242781
242781
|
let offset = bm.offset;
|
242782
242782
|
let commentEnd = null;
|
242783
242783
|
for (const collItem of bm.items) {
|
242784
|
-
const { start: start3, key:
|
242784
|
+
const { start: start3, key: key5, sep: sep3, value: value4 } = collItem;
|
242785
242785
|
const keyProps = resolveProps.resolveProps(start3, {
|
242786
242786
|
indicator: "explicit-key-ind",
|
242787
|
-
next:
|
242787
|
+
next: key5 ?? sep3?.[0],
|
242788
242788
|
offset,
|
242789
242789
|
onError,
|
242790
242790
|
parentIndent: bm.indent,
|
@@ -242792,10 +242792,10 @@ var require_resolve_block_map = __commonJS((exports) => {
|
|
242792
242792
|
});
|
242793
242793
|
const implicitKey = !keyProps.found;
|
242794
242794
|
if (implicitKey) {
|
242795
|
-
if (
|
242796
|
-
if (
|
242795
|
+
if (key5) {
|
242796
|
+
if (key5.type === "block-seq")
|
242797
242797
|
onError(offset, "BLOCK_AS_IMPLICIT_KEY", "A block sequence may not be used as an implicit map key");
|
242798
|
-
else if ("indent" in
|
242798
|
+
else if ("indent" in key5 && key5.indent !== bm.indent)
|
242799
242799
|
onError(offset, "BAD_INDENT", startColMsg);
|
242800
242800
|
}
|
242801
242801
|
if (!keyProps.anchor && !keyProps.tag && !sep3) {
|
@@ -242809,17 +242809,17 @@ var require_resolve_block_map = __commonJS((exports) => {
|
|
242809
242809
|
}
|
242810
242810
|
continue;
|
242811
242811
|
}
|
242812
|
-
if (keyProps.newlineAfterProp || utilContainsNewline.containsNewline(
|
242813
|
-
onError(
|
242812
|
+
if (keyProps.newlineAfterProp || utilContainsNewline.containsNewline(key5)) {
|
242813
|
+
onError(key5 ?? start3[start3.length - 1], "MULTILINE_IMPLICIT_KEY", "Implicit keys need to be on a single line");
|
242814
242814
|
}
|
242815
242815
|
} else if (keyProps.found?.indent !== bm.indent) {
|
242816
242816
|
onError(offset, "BAD_INDENT", startColMsg);
|
242817
242817
|
}
|
242818
242818
|
ctx.atKey = true;
|
242819
242819
|
const keyStart = keyProps.end;
|
242820
|
-
const keyNode =
|
242820
|
+
const keyNode = key5 ? composeNode(ctx, key5, keyProps, onError) : composeEmptyNode(ctx, keyStart, start3, null, keyProps, onError);
|
242821
242821
|
if (ctx.schema.compat)
|
242822
|
-
utilFlowIndentCheck.flowIndentCheck(bm.indent,
|
242822
|
+
utilFlowIndentCheck.flowIndentCheck(bm.indent, key5, onError);
|
242823
242823
|
ctx.atKey = false;
|
242824
242824
|
if (utilMapIncludes.mapIncludes(ctx, map4.items, keyNode))
|
242825
242825
|
onError(keyStart, "DUPLICATE_KEY", "Map keys must be unique");
|
@@ -242829,7 +242829,7 @@ var require_resolve_block_map = __commonJS((exports) => {
|
|
242829
242829
|
offset: keyNode.range[2],
|
242830
242830
|
onError,
|
242831
242831
|
parentIndent: bm.indent,
|
242832
|
-
startOnNewline: !
|
242832
|
+
startOnNewline: !key5 || key5.type === "block-scalar"
|
242833
242833
|
});
|
242834
242834
|
offset = valueProps.end;
|
242835
242835
|
if (valueProps.found) {
|
@@ -242985,11 +242985,11 @@ var require_resolve_flow_collection = __commonJS((exports) => {
|
|
242985
242985
|
let offset = fc.offset + fc.start.source.length;
|
242986
242986
|
for (let i7 = 0;i7 < fc.items.length; ++i7) {
|
242987
242987
|
const collItem = fc.items[i7];
|
242988
|
-
const { start: start3, key:
|
242988
|
+
const { start: start3, key: key5, sep: sep3, value: value4 } = collItem;
|
242989
242989
|
const props = resolveProps.resolveProps(start3, {
|
242990
242990
|
flow: fcName,
|
242991
242991
|
indicator: "explicit-key-ind",
|
242992
|
-
next:
|
242992
|
+
next: key5 ?? sep3?.[0],
|
242993
242993
|
offset,
|
242994
242994
|
onError,
|
242995
242995
|
parentIndent: fc.indent,
|
@@ -243011,8 +243011,8 @@ var require_resolve_flow_collection = __commonJS((exports) => {
|
|
243011
243011
|
offset = props.end;
|
243012
243012
|
continue;
|
243013
243013
|
}
|
243014
|
-
if (!isMap && ctx.options.strict && utilContainsNewline.containsNewline(
|
243015
|
-
onError(
|
243014
|
+
if (!isMap && ctx.options.strict && utilContainsNewline.containsNewline(key5))
|
243015
|
+
onError(key5, "MULTILINE_IMPLICIT_KEY", "Implicit keys of flow sequence pairs need to be on a single line");
|
243016
243016
|
}
|
243017
243017
|
if (i7 === 0) {
|
243018
243018
|
if (props.comma)
|
@@ -243057,8 +243057,8 @@ var require_resolve_flow_collection = __commonJS((exports) => {
|
|
243057
243057
|
} else {
|
243058
243058
|
ctx.atKey = true;
|
243059
243059
|
const keyStart = props.end;
|
243060
|
-
const keyNode =
|
243061
|
-
if (isBlock(
|
243060
|
+
const keyNode = key5 ? composeNode(ctx, key5, props, onError) : composeEmptyNode(ctx, keyStart, start3, null, props, onError);
|
243061
|
+
if (isBlock(key5))
|
243062
243062
|
onError(keyNode.range, "BLOCK_IN_FLOW", blockMsg);
|
243063
243063
|
ctx.atKey = false;
|
243064
243064
|
const valueProps = resolveProps.resolveProps(sep3 ?? [], {
|
@@ -243869,7 +243869,7 @@ var require_composer = __commonJS((exports) => {
|
|
243869
243869
|
var node_process = __require("process");
|
243870
243870
|
var directives4 = require_directives2();
|
243871
243871
|
var Document = require_Document();
|
243872
|
-
var
|
243872
|
+
var errors7 = require_errors3();
|
243873
243873
|
var identity2 = require_identity();
|
243874
243874
|
var composeDoc = require_compose_doc();
|
243875
243875
|
var resolveEnd = require_resolve_end();
|
@@ -243920,9 +243920,9 @@ var require_composer = __commonJS((exports) => {
|
|
243920
243920
|
this.onError = (source, code2, message, warning) => {
|
243921
243921
|
const pos = getErrorPos(source);
|
243922
243922
|
if (warning)
|
243923
|
-
this.warnings.push(new
|
243923
|
+
this.warnings.push(new errors7.YAMLWarning(pos, code2, message));
|
243924
243924
|
else
|
243925
|
-
this.errors.push(new
|
243925
|
+
this.errors.push(new errors7.YAMLParseError(pos, code2, message));
|
243926
243926
|
};
|
243927
243927
|
this.directives = new directives4.Directives({ version: options.version || "1.2" });
|
243928
243928
|
this.options = options;
|
@@ -244006,7 +244006,7 @@ ${cb}` : comment;
|
|
244006
244006
|
break;
|
244007
244007
|
case "error": {
|
244008
244008
|
const msg = token.source ? `${token.message}: ${JSON.stringify(token.source)}` : token.message;
|
244009
|
-
const error39 = new
|
244009
|
+
const error39 = new errors7.YAMLParseError(getErrorPos(token), "UNEXPECTED_TOKEN", msg);
|
244010
244010
|
if (this.atDirectives || !this.doc)
|
244011
244011
|
this.errors.push(error39);
|
244012
244012
|
else
|
@@ -244016,7 +244016,7 @@ ${cb}` : comment;
|
|
244016
244016
|
case "doc-end": {
|
244017
244017
|
if (!this.doc) {
|
244018
244018
|
const msg = "Unexpected doc-end without preceding document";
|
244019
|
-
this.errors.push(new
|
244019
|
+
this.errors.push(new errors7.YAMLParseError(getErrorPos(token), "UNEXPECTED_TOKEN", msg));
|
244020
244020
|
break;
|
244021
244021
|
}
|
244022
244022
|
this.doc.directives.docEnd = true;
|
@@ -244031,7 +244031,7 @@ ${end.comment}` : end.comment;
|
|
244031
244031
|
break;
|
244032
244032
|
}
|
244033
244033
|
default:
|
244034
|
-
this.errors.push(new
|
244034
|
+
this.errors.push(new errors7.YAMLParseError(getErrorPos(token), "UNEXPECTED_TOKEN", `Unsupported token ${token.type}`));
|
244035
244035
|
}
|
244036
244036
|
}
|
244037
244037
|
*end(forceDoc = false, endOffset = -1) {
|
@@ -244057,7 +244057,7 @@ ${end.comment}` : end.comment;
|
|
244057
244057
|
var require_cst_scalar = __commonJS((exports) => {
|
244058
244058
|
var resolveBlockScalar = require_resolve_block_scalar();
|
244059
244059
|
var resolveFlowScalar = require_resolve_flow_scalar();
|
244060
|
-
var
|
244060
|
+
var errors7 = require_errors3();
|
244061
244061
|
var stringifyString = require_stringifyString();
|
244062
244062
|
function resolveAsScalar(token, strict = true, onError) {
|
244063
244063
|
if (token) {
|
@@ -244066,7 +244066,7 @@ var require_cst_scalar = __commonJS((exports) => {
|
|
244066
244066
|
if (onError)
|
244067
244067
|
onError(offset, code2, message);
|
244068
244068
|
else
|
244069
|
-
throw new
|
244069
|
+
throw new errors7.YAMLParseError([offset, offset + 1], code2, message);
|
244070
244070
|
};
|
244071
244071
|
switch (token.type) {
|
244072
244072
|
case "scalar":
|
@@ -244180,9 +244180,9 @@ var require_cst_scalar = __commonJS((exports) => {
|
|
244180
244180
|
if (!addEndtoBlockProps(props, "end" in token ? token.end : undefined))
|
244181
244181
|
props.push({ type: "newline", offset: -1, indent: indent2, source: `
|
244182
244182
|
` });
|
244183
|
-
for (const
|
244184
|
-
if (
|
244185
|
-
delete token[
|
244183
|
+
for (const key5 of Object.keys(token))
|
244184
|
+
if (key5 !== "type" && key5 !== "offset")
|
244185
|
+
delete token[key5];
|
244186
244186
|
Object.assign(token, { type: "block-scalar", indent: indent2, props, source: body });
|
244187
244187
|
}
|
244188
244188
|
}
|
@@ -244231,9 +244231,9 @@ var require_cst_scalar = __commonJS((exports) => {
|
|
244231
244231
|
default: {
|
244232
244232
|
const indent2 = "indent" in token ? token.indent : -1;
|
244233
244233
|
const end = "end" in token && Array.isArray(token.end) ? token.end.filter((st2) => st2.type === "space" || st2.type === "comment" || st2.type === "newline") : [];
|
244234
|
-
for (const
|
244235
|
-
if (
|
244236
|
-
delete token[
|
244234
|
+
for (const key5 of Object.keys(token))
|
244235
|
+
if (key5 !== "type" && key5 !== "offset")
|
244236
|
+
delete token[key5];
|
244237
244237
|
Object.assign(token, { type: type4, indent: indent2, source, end });
|
244238
244238
|
}
|
244239
244239
|
}
|
@@ -244285,12 +244285,12 @@ var require_cst_stringify = __commonJS((exports) => {
|
|
244285
244285
|
}
|
244286
244286
|
}
|
244287
244287
|
}
|
244288
|
-
function stringifyItem({ start: start3, key:
|
244288
|
+
function stringifyItem({ start: start3, key: key5, sep: sep3, value: value4 }) {
|
244289
244289
|
let res = "";
|
244290
244290
|
for (const st2 of start3)
|
244291
244291
|
res += st2.source;
|
244292
|
-
if (
|
244293
|
-
res += stringifyToken(
|
244292
|
+
if (key5)
|
244293
|
+
res += stringifyToken(key5);
|
244294
244294
|
if (sep3)
|
244295
244295
|
for (const st2 of sep3)
|
244296
244296
|
res += st2.source;
|
@@ -245586,7 +245586,7 @@ var require_parser2 = __commonJS((exports) => {
|
|
245586
245586
|
});
|
245587
245587
|
} else if (isFlowToken(it2.key) && !includesToken(it2.sep, "newline")) {
|
245588
245588
|
const start4 = getFirstKeyStartProps(it2.start);
|
245589
|
-
const
|
245589
|
+
const key5 = it2.key;
|
245590
245590
|
const sep3 = it2.sep;
|
245591
245591
|
sep3.push(this.sourceToken);
|
245592
245592
|
delete it2.key;
|
@@ -245595,7 +245595,7 @@ var require_parser2 = __commonJS((exports) => {
|
|
245595
245595
|
type: "block-map",
|
245596
245596
|
offset: this.offset,
|
245597
245597
|
indent: this.indent,
|
245598
|
-
items: [{ start: start4, key:
|
245598
|
+
items: [{ start: start4, key: key5, sep: sep3 }]
|
245599
245599
|
});
|
245600
245600
|
} else if (start3.length > 0) {
|
245601
245601
|
it2.sep = it2.sep.concat(start3, this.sourceToken);
|
@@ -245928,7 +245928,7 @@ var require_parser2 = __commonJS((exports) => {
|
|
245928
245928
|
var require_public_api = __commonJS((exports) => {
|
245929
245929
|
var composer = require_composer();
|
245930
245930
|
var Document = require_Document();
|
245931
|
-
var
|
245931
|
+
var errors7 = require_errors3();
|
245932
245932
|
var log = require_log();
|
245933
245933
|
var identity2 = require_identity();
|
245934
245934
|
var lineCounter = require_line_counter();
|
@@ -245945,8 +245945,8 @@ var require_public_api = __commonJS((exports) => {
|
|
245945
245945
|
const docs = Array.from(composer$1.compose(parser$1.parse(source)));
|
245946
245946
|
if (prettyErrors && lineCounter2)
|
245947
245947
|
for (const doc2 of docs) {
|
245948
|
-
doc2.errors.forEach(
|
245949
|
-
doc2.warnings.forEach(
|
245948
|
+
doc2.errors.forEach(errors7.prettifyError(source, lineCounter2));
|
245949
|
+
doc2.warnings.forEach(errors7.prettifyError(source, lineCounter2));
|
245950
245950
|
}
|
245951
245951
|
if (docs.length > 0)
|
245952
245952
|
return docs;
|
@@ -245961,13 +245961,13 @@ var require_public_api = __commonJS((exports) => {
|
|
245961
245961
|
if (!doc2)
|
245962
245962
|
doc2 = _doc;
|
245963
245963
|
else if (doc2.options.logLevel !== "silent") {
|
245964
|
-
doc2.errors.push(new
|
245964
|
+
doc2.errors.push(new errors7.YAMLParseError(_doc.range.slice(0, 2), "MULTIPLE_DOCS", "Source contains multiple documents; please use YAML.parseAllDocuments()"));
|
245965
245965
|
break;
|
245966
245966
|
}
|
245967
245967
|
}
|
245968
245968
|
if (prettyErrors && lineCounter2) {
|
245969
|
-
doc2.errors.forEach(
|
245970
|
-
doc2.warnings.forEach(
|
245969
|
+
doc2.errors.forEach(errors7.prettifyError(source, lineCounter2));
|
245970
|
+
doc2.warnings.forEach(errors7.prettifyError(source, lineCounter2));
|
245971
245971
|
}
|
245972
245972
|
return doc2;
|
245973
245973
|
}
|
@@ -262458,7 +262458,7 @@ function pruneCurrentEnv(currentEnv, env2) {
|
|
262458
262458
|
var package_default = {
|
262459
262459
|
name: "@settlemint/sdk-cli",
|
262460
262460
|
description: "Command-line interface for SettleMint SDK, providing development tools and project management capabilities",
|
262461
|
-
version: "2.3.2-
|
262461
|
+
version: "2.3.2-prb1129dad",
|
262462
262462
|
type: "module",
|
262463
262463
|
private: false,
|
262464
262464
|
license: "FSL-1.1-MIT",
|
@@ -262503,12 +262503,12 @@ var package_default = {
|
|
262503
262503
|
devDependencies: {
|
262504
262504
|
"@commander-js/extra-typings": "14.0.0",
|
262505
262505
|
commander: "14.0.0",
|
262506
|
-
"@inquirer/confirm": "5.1.
|
262506
|
+
"@inquirer/confirm": "5.1.11",
|
262507
262507
|
"@inquirer/input": "4.1.10",
|
262508
262508
|
"@inquirer/password": "4.0.13",
|
262509
262509
|
"@inquirer/select": "4.2.1",
|
262510
|
-
"@settlemint/sdk-js": "2.3.2-
|
262511
|
-
"@settlemint/sdk-utils": "2.3.2-
|
262510
|
+
"@settlemint/sdk-js": "2.3.2-prb1129dad",
|
262511
|
+
"@settlemint/sdk-utils": "2.3.2-prb1129dad",
|
262512
262512
|
"@types/node": "22.15.21",
|
262513
262513
|
"@types/semver": "7.7.0",
|
262514
262514
|
"@types/which": "3.0.4",
|
@@ -262598,10 +262598,6 @@ var {
|
|
262598
262598
|
} = import__.default;
|
262599
262599
|
|
262600
262600
|
// ../../node_modules/@inquirer/core/dist/esm/lib/key.js
|
262601
|
-
var isUpKey = (key) => key.name === "up" || key.name === "k" || key.ctrl && key.name === "p";
|
262602
|
-
var isDownKey = (key) => key.name === "down" || key.name === "j" || key.ctrl && key.name === "n";
|
262603
|
-
var isBackspaceKey = (key) => key.name === "backspace";
|
262604
|
-
var isNumberKey = (key) => "1234567890".includes(key.name);
|
262605
262601
|
var isEnterKey = (key) => key.name === "enter" || key.name === "return";
|
262606
262602
|
// ../../node_modules/@inquirer/core/dist/esm/lib/errors.js
|
262607
262603
|
class AbortPromptError extends Error {
|
@@ -262630,6 +262626,9 @@ class ValidationError extends Error {
|
|
262630
262626
|
name = "ValidationError";
|
262631
262627
|
}
|
262632
262628
|
// ../../node_modules/@inquirer/core/dist/esm/lib/use-prefix.js
|
262629
|
+
import { AsyncResource as AsyncResource3 } from "node:async_hooks";
|
262630
|
+
|
262631
|
+
// ../../node_modules/@inquirer/core/dist/esm/lib/use-state.js
|
262633
262632
|
import { AsyncResource as AsyncResource2 } from "node:async_hooks";
|
262634
262633
|
|
262635
262634
|
// ../../node_modules/@inquirer/core/dist/esm/lib/hook-engine.js
|
@@ -262740,18 +262739,18 @@ var effectScheduler = {
|
|
262740
262739
|
// ../../node_modules/@inquirer/core/dist/esm/lib/use-state.js
|
262741
262740
|
function useState(defaultValue) {
|
262742
262741
|
return withPointer((pointer) => {
|
262743
|
-
const
|
262742
|
+
const setState = AsyncResource2.bind(function setState(newValue) {
|
262744
262743
|
if (pointer.get() !== newValue) {
|
262745
262744
|
pointer.set(newValue);
|
262746
262745
|
handleChange();
|
262747
262746
|
}
|
262748
|
-
};
|
262747
|
+
});
|
262749
262748
|
if (pointer.initialized) {
|
262750
|
-
return [pointer.get(),
|
262749
|
+
return [pointer.get(), setState];
|
262751
262750
|
}
|
262752
262751
|
const value = typeof defaultValue === "function" ? defaultValue() : defaultValue;
|
262753
262752
|
pointer.set(value);
|
262754
|
-
return [value,
|
262753
|
+
return [value, setState];
|
262755
262754
|
});
|
262756
262755
|
}
|
262757
262756
|
|
@@ -262770,7 +262769,7 @@ function useEffect(cb, depArray) {
|
|
262770
262769
|
// ../../node_modules/@inquirer/core/dist/esm/lib/theme.js
|
262771
262770
|
var import_yoctocolors_cjs = __toESM(require_yoctocolors_cjs(), 1);
|
262772
262771
|
|
262773
|
-
// ../../node_modules/@inquirer/figures/dist/esm/index.js
|
262772
|
+
// ../../node_modules/@inquirer/core/node_modules/@inquirer/figures/dist/esm/index.js
|
262774
262773
|
import process4 from "node:process";
|
262775
262774
|
function isUnicodeSupported2() {
|
262776
262775
|
if (process4.platform !== "win32") {
|
@@ -263114,9 +263113,9 @@ function usePrefix({ status = "idle", theme }) {
|
|
263114
263113
|
if (status === "loading") {
|
263115
263114
|
let tickInterval;
|
263116
263115
|
let inc = -1;
|
263117
|
-
const delayTimeout = setTimeout(
|
263116
|
+
const delayTimeout = setTimeout(AsyncResource3.bind(() => {
|
263118
263117
|
setShowLoader(true);
|
263119
|
-
tickInterval = setInterval(
|
263118
|
+
tickInterval = setInterval(AsyncResource3.bind(() => {
|
263120
263119
|
inc = inc + 1;
|
263121
263120
|
setTick(inc % spinner.frames.length);
|
263122
263121
|
}), spinner.interval);
|
@@ -263135,22 +263134,11 @@ function usePrefix({ status = "idle", theme }) {
|
|
263135
263134
|
const iconName = status === "loading" ? "idle" : status;
|
263136
263135
|
return typeof prefix === "string" ? prefix : prefix[iconName] ?? prefix["idle"];
|
263137
263136
|
}
|
263138
|
-
// ../../node_modules/@inquirer/core/dist/esm/lib/use-memo.js
|
263139
|
-
function useMemo(fn, dependencies) {
|
263140
|
-
return withPointer((pointer) => {
|
263141
|
-
const prev = pointer.get();
|
263142
|
-
if (!prev || prev.dependencies.length !== dependencies.length || prev.dependencies.some((dep, i) => dep !== dependencies[i])) {
|
263143
|
-
const value = fn();
|
263144
|
-
pointer.set({ value, dependencies });
|
263145
|
-
return value;
|
263146
|
-
}
|
263147
|
-
return prev.value;
|
263148
|
-
});
|
263149
|
-
}
|
263150
263137
|
// ../../node_modules/@inquirer/core/dist/esm/lib/use-ref.js
|
263151
263138
|
function useRef(val) {
|
263152
263139
|
return useState({ current: val })[0];
|
263153
263140
|
}
|
263141
|
+
|
263154
263142
|
// ../../node_modules/@inquirer/core/dist/esm/lib/use-keypress.js
|
263155
263143
|
function useKeypress(userHandler) {
|
263156
263144
|
const signal = useRef(userHandler);
|
@@ -263182,99 +263170,10 @@ function readlineWidth() {
|
|
263182
263170
|
return import_cli_width.default({ defaultWidth: 80, output: readline().output });
|
263183
263171
|
}
|
263184
263172
|
|
263185
|
-
// ../../node_modules/@inquirer/core/dist/esm/lib/pagination/lines.js
|
263186
|
-
function split(content, width) {
|
263187
|
-
return breakLines(content, width).split(`
|
263188
|
-
`);
|
263189
|
-
}
|
263190
|
-
function rotate(count, items) {
|
263191
|
-
const max = items.length;
|
263192
|
-
const offset = (count % max + max) % max;
|
263193
|
-
return [...items.slice(offset), ...items.slice(0, offset)];
|
263194
|
-
}
|
263195
|
-
function lines({ items, width, renderItem, active, position: requested, pageSize }) {
|
263196
|
-
const layouts = items.map((item, index) => ({
|
263197
|
-
item,
|
263198
|
-
index,
|
263199
|
-
isActive: index === active
|
263200
|
-
}));
|
263201
|
-
const layoutsInPage = rotate(active - requested, layouts).slice(0, pageSize);
|
263202
|
-
const renderItemAt = (index) => layoutsInPage[index] == null ? [] : split(renderItem(layoutsInPage[index]), width);
|
263203
|
-
const pageBuffer = Array.from({ length: pageSize });
|
263204
|
-
const activeItem = renderItemAt(requested).slice(0, pageSize);
|
263205
|
-
const position = requested + activeItem.length <= pageSize ? requested : pageSize - activeItem.length;
|
263206
|
-
pageBuffer.splice(position, activeItem.length, ...activeItem);
|
263207
|
-
let bufferPointer = position + activeItem.length;
|
263208
|
-
let layoutPointer = requested + 1;
|
263209
|
-
while (bufferPointer < pageSize && layoutPointer < layoutsInPage.length) {
|
263210
|
-
for (const line of renderItemAt(layoutPointer)) {
|
263211
|
-
pageBuffer[bufferPointer++] = line;
|
263212
|
-
if (bufferPointer >= pageSize)
|
263213
|
-
break;
|
263214
|
-
}
|
263215
|
-
layoutPointer++;
|
263216
|
-
}
|
263217
|
-
bufferPointer = position - 1;
|
263218
|
-
layoutPointer = requested - 1;
|
263219
|
-
while (bufferPointer >= 0 && layoutPointer >= 0) {
|
263220
|
-
for (const line of renderItemAt(layoutPointer).reverse()) {
|
263221
|
-
pageBuffer[bufferPointer--] = line;
|
263222
|
-
if (bufferPointer < 0)
|
263223
|
-
break;
|
263224
|
-
}
|
263225
|
-
layoutPointer--;
|
263226
|
-
}
|
263227
|
-
return pageBuffer.filter((line) => typeof line === "string");
|
263228
|
-
}
|
263229
|
-
|
263230
|
-
// ../../node_modules/@inquirer/core/dist/esm/lib/pagination/position.js
|
263231
|
-
function finite({ active, pageSize, total }) {
|
263232
|
-
const middle = Math.floor(pageSize / 2);
|
263233
|
-
if (total <= pageSize || active < middle)
|
263234
|
-
return active;
|
263235
|
-
if (active >= total - middle)
|
263236
|
-
return active + pageSize - total;
|
263237
|
-
return middle;
|
263238
|
-
}
|
263239
|
-
function infinite({ active, lastActive, total, pageSize, pointer }) {
|
263240
|
-
if (total <= pageSize)
|
263241
|
-
return active;
|
263242
|
-
if (lastActive < active && active - lastActive < pageSize) {
|
263243
|
-
return Math.min(Math.floor(pageSize / 2), pointer + active - lastActive);
|
263244
|
-
}
|
263245
|
-
return pointer;
|
263246
|
-
}
|
263247
|
-
|
263248
|
-
// ../../node_modules/@inquirer/core/dist/esm/lib/pagination/use-pagination.js
|
263249
|
-
function usePagination({ items, active, renderItem, pageSize, loop = true }) {
|
263250
|
-
const state = useRef({ position: 0, lastActive: 0 });
|
263251
|
-
const position = loop ? infinite({
|
263252
|
-
active,
|
263253
|
-
lastActive: state.current.lastActive,
|
263254
|
-
total: items.length,
|
263255
|
-
pageSize,
|
263256
|
-
pointer: state.current.position
|
263257
|
-
}) : finite({
|
263258
|
-
active,
|
263259
|
-
total: items.length,
|
263260
|
-
pageSize
|
263261
|
-
});
|
263262
|
-
state.current.position = position;
|
263263
|
-
state.current.lastActive = active;
|
263264
|
-
return lines({
|
263265
|
-
items,
|
263266
|
-
width: readlineWidth(),
|
263267
|
-
renderItem,
|
263268
|
-
active,
|
263269
|
-
position,
|
263270
|
-
pageSize
|
263271
|
-
}).join(`
|
263272
|
-
`);
|
263273
|
-
}
|
263274
263173
|
// ../../node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
|
263275
263174
|
var import_mute_stream = __toESM(require_lib(), 1);
|
263276
263175
|
import * as readline2 from "node:readline";
|
263277
|
-
import { AsyncResource as
|
263176
|
+
import { AsyncResource as AsyncResource4 } from "node:async_hooks";
|
263278
263177
|
|
263279
263178
|
// ../../node_modules/signal-exit/dist/mjs/signals.js
|
263280
263179
|
var signals = [];
|
@@ -263618,7 +263517,7 @@ function createPrompt(view) {
|
|
263618
263517
|
rl.input.on("keypress", checkCursorPos);
|
263619
263518
|
cleanups.add(() => rl.input.removeListener("keypress", checkCursorPos));
|
263620
263519
|
return withHooks(rl, (cycle) => {
|
263621
|
-
const hooksCleanup =
|
263520
|
+
const hooksCleanup = AsyncResource4.bind(() => effectScheduler.clearAll());
|
263622
263521
|
rl.on("close", hooksCleanup);
|
263623
263522
|
cleanups.add(() => rl.removeListener("close", hooksCleanup));
|
263624
263523
|
cycle(() => {
|
@@ -263653,20 +263552,6 @@ function createPrompt(view) {
|
|
263653
263552
|
};
|
263654
263553
|
return prompt;
|
263655
263554
|
}
|
263656
|
-
// ../../node_modules/@inquirer/core/dist/esm/lib/Separator.js
|
263657
|
-
var import_yoctocolors_cjs2 = __toESM(require_yoctocolors_cjs(), 1);
|
263658
|
-
class Separator {
|
263659
|
-
separator = import_yoctocolors_cjs2.default.dim(Array.from({ length: 15 }).join(esm_default.line));
|
263660
|
-
type = "separator";
|
263661
|
-
constructor(separator) {
|
263662
|
-
if (separator) {
|
263663
|
-
this.separator = separator;
|
263664
|
-
}
|
263665
|
-
}
|
263666
|
-
static isSeparator(choice) {
|
263667
|
-
return Boolean(choice && typeof choice === "object" && "type" in choice && choice.type === "separator");
|
263668
|
-
}
|
263669
|
-
}
|
263670
263555
|
// ../utils/dist/terminal.mjs
|
263671
263556
|
import { spawn } from "child_process";
|
263672
263557
|
var import_console_table_printer2 = __toESM(require_dist2(), 1);
|
@@ -263841,24 +263726,84 @@ function table(title, data) {
|
|
263841
263726
|
}
|
263842
263727
|
|
263843
263728
|
// ../utils/dist/http.mjs
|
263729
|
+
var maskTokens3 = (output) => {
|
263730
|
+
return output.replace(/sm_(pat|aat|sat)_[0-9a-zA-Z]+/g, "***");
|
263731
|
+
};
|
263732
|
+
function createLogger(options = {}) {
|
263733
|
+
const { level = "warn", prefix = "" } = options;
|
263734
|
+
const logLevels = {
|
263735
|
+
debug: 0,
|
263736
|
+
info: 1,
|
263737
|
+
warn: 2,
|
263738
|
+
error: 3,
|
263739
|
+
none: 4
|
263740
|
+
};
|
263741
|
+
const currentLevelValue = logLevels[level];
|
263742
|
+
const formatArgs = (args) => {
|
263743
|
+
if (args.length === 0 || args.every((arg) => arg === undefined || arg === null)) {
|
263744
|
+
return "";
|
263745
|
+
}
|
263746
|
+
const formatted = args.map((arg) => {
|
263747
|
+
if (arg instanceof Error) {
|
263748
|
+
return `
|
263749
|
+
${arg.stack || arg.message}`;
|
263750
|
+
}
|
263751
|
+
if (typeof arg === "object" && arg !== null) {
|
263752
|
+
return `
|
263753
|
+
${JSON.stringify(arg, null, 2)}`;
|
263754
|
+
}
|
263755
|
+
return ` ${String(arg)}`;
|
263756
|
+
}).join("");
|
263757
|
+
return `, args:${formatted}`;
|
263758
|
+
};
|
263759
|
+
const shouldLog = (level2) => {
|
263760
|
+
return logLevels[level2] >= currentLevelValue;
|
263761
|
+
};
|
263762
|
+
return {
|
263763
|
+
debug: (message, ...args) => {
|
263764
|
+
if (shouldLog("debug")) {
|
263765
|
+
console.debug(`\x1B[32m${prefix}[DEBUG] ${maskTokens3(message)}${maskTokens3(formatArgs(args))}\x1B[0m`);
|
263766
|
+
}
|
263767
|
+
},
|
263768
|
+
info: (message, ...args) => {
|
263769
|
+
if (shouldLog("info")) {
|
263770
|
+
console.info(`\x1B[34m${prefix}[INFO] ${maskTokens3(message)}${maskTokens3(formatArgs(args))}\x1B[0m`);
|
263771
|
+
}
|
263772
|
+
},
|
263773
|
+
warn: (message, ...args) => {
|
263774
|
+
if (shouldLog("warn")) {
|
263775
|
+
console.warn(`\x1B[33m${prefix}[WARN] ${maskTokens3(message)}${maskTokens3(formatArgs(args))}\x1B[0m`);
|
263776
|
+
}
|
263777
|
+
},
|
263778
|
+
error: (message, ...args) => {
|
263779
|
+
if (shouldLog("error")) {
|
263780
|
+
console.error(`\x1B[31m${prefix}[ERROR] ${maskTokens3(message)}${maskTokens3(formatArgs(args))}\x1B[0m`);
|
263781
|
+
}
|
263782
|
+
}
|
263783
|
+
};
|
263784
|
+
}
|
263785
|
+
var logger = createLogger();
|
263844
263786
|
async function retryWhenFailed(fn, maxRetries = 5, initialSleepTime = 1000, stopOnError) {
|
263845
|
-
let
|
263846
|
-
|
263787
|
+
let retries = 0;
|
263788
|
+
const maxAttempts = maxRetries + 1;
|
263789
|
+
while (retries < maxAttempts) {
|
263847
263790
|
try {
|
263848
263791
|
return await fn();
|
263849
263792
|
} catch (e) {
|
263793
|
+
const error35 = e;
|
263850
263794
|
if (typeof stopOnError === "function") {
|
263851
|
-
const error35 = e;
|
263852
263795
|
if (stopOnError(error35)) {
|
263853
263796
|
throw error35;
|
263854
263797
|
}
|
263855
263798
|
}
|
263856
|
-
|
263857
|
-
if (attempt >= maxRetries) {
|
263799
|
+
if (retries >= maxRetries) {
|
263858
263800
|
throw e;
|
263859
263801
|
}
|
263860
|
-
const
|
263861
|
-
const
|
263802
|
+
const baseDelay = 2 ** retries * initialSleepTime;
|
263803
|
+
const jitterAmount = initialSleepTime * (Math.random() / 10);
|
263804
|
+
const delay = baseDelay + jitterAmount;
|
263805
|
+
retries += 1;
|
263806
|
+
logger.warn(`An error occurred ${error35.message}, retrying in ${delay.toFixed(0)}ms (retry ${retries} of ${maxRetries})...`);
|
263862
263807
|
await new Promise((resolve) => setTimeout(resolve, delay));
|
263863
263808
|
}
|
263864
263809
|
}
|
@@ -267053,14 +266998,14 @@ async function getPackageManagerExecutable(targetDir) {
|
|
267053
266998
|
function shouldPrint2() {
|
267054
266999
|
return process.env.SETTLEMINT_DISABLE_TERMINAL !== "true";
|
267055
267000
|
}
|
267056
|
-
var
|
267001
|
+
var maskTokens4 = (output) => {
|
267057
267002
|
return output.replace(/sm_(pat|aat|sat)_[0-9a-zA-Z]+/g, "***");
|
267058
267003
|
};
|
267059
267004
|
var note2 = (message, level = "info") => {
|
267060
267005
|
if (!shouldPrint2()) {
|
267061
267006
|
return;
|
267062
267007
|
}
|
267063
|
-
const maskedMessage =
|
267008
|
+
const maskedMessage = maskTokens4(message);
|
267064
267009
|
console.log("");
|
267065
267010
|
if (level === "warn") {
|
267066
267011
|
console.warn(yellowBright(maskedMessage));
|
@@ -267121,24 +267066,84 @@ function extractJsonObject(value2) {
|
|
267121
267066
|
}
|
267122
267067
|
return tryParseJson3(result[0]);
|
267123
267068
|
}
|
267069
|
+
var maskTokens5 = (output) => {
|
267070
|
+
return output.replace(/sm_(pat|aat|sat)_[0-9a-zA-Z]+/g, "***");
|
267071
|
+
};
|
267072
|
+
function createLogger2(options = {}) {
|
267073
|
+
const { level = "warn", prefix = "" } = options;
|
267074
|
+
const logLevels = {
|
267075
|
+
debug: 0,
|
267076
|
+
info: 1,
|
267077
|
+
warn: 2,
|
267078
|
+
error: 3,
|
267079
|
+
none: 4
|
267080
|
+
};
|
267081
|
+
const currentLevelValue = logLevels[level];
|
267082
|
+
const formatArgs = (args) => {
|
267083
|
+
if (args.length === 0 || args.every((arg) => arg === undefined || arg === null)) {
|
267084
|
+
return "";
|
267085
|
+
}
|
267086
|
+
const formatted = args.map((arg) => {
|
267087
|
+
if (arg instanceof Error) {
|
267088
|
+
return `
|
267089
|
+
${arg.stack || arg.message}`;
|
267090
|
+
}
|
267091
|
+
if (typeof arg === "object" && arg !== null) {
|
267092
|
+
return `
|
267093
|
+
${JSON.stringify(arg, null, 2)}`;
|
267094
|
+
}
|
267095
|
+
return ` ${String(arg)}`;
|
267096
|
+
}).join("");
|
267097
|
+
return `, args:${formatted}`;
|
267098
|
+
};
|
267099
|
+
const shouldLog = (level2) => {
|
267100
|
+
return logLevels[level2] >= currentLevelValue;
|
267101
|
+
};
|
267102
|
+
return {
|
267103
|
+
debug: (message, ...args) => {
|
267104
|
+
if (shouldLog("debug")) {
|
267105
|
+
console.debug(`\x1B[32m${prefix}[DEBUG] ${maskTokens5(message)}${maskTokens5(formatArgs(args))}\x1B[0m`);
|
267106
|
+
}
|
267107
|
+
},
|
267108
|
+
info: (message, ...args) => {
|
267109
|
+
if (shouldLog("info")) {
|
267110
|
+
console.info(`\x1B[34m${prefix}[INFO] ${maskTokens5(message)}${maskTokens5(formatArgs(args))}\x1B[0m`);
|
267111
|
+
}
|
267112
|
+
},
|
267113
|
+
warn: (message, ...args) => {
|
267114
|
+
if (shouldLog("warn")) {
|
267115
|
+
console.warn(`\x1B[33m${prefix}[WARN] ${maskTokens5(message)}${maskTokens5(formatArgs(args))}\x1B[0m`);
|
267116
|
+
}
|
267117
|
+
},
|
267118
|
+
error: (message, ...args) => {
|
267119
|
+
if (shouldLog("error")) {
|
267120
|
+
console.error(`\x1B[31m${prefix}[ERROR] ${maskTokens5(message)}${maskTokens5(formatArgs(args))}\x1B[0m`);
|
267121
|
+
}
|
267122
|
+
}
|
267123
|
+
};
|
267124
|
+
}
|
267125
|
+
var logger2 = createLogger2();
|
267124
267126
|
async function retryWhenFailed2(fn, maxRetries = 5, initialSleepTime = 1000, stopOnError) {
|
267125
|
-
let
|
267126
|
-
|
267127
|
+
let retries = 0;
|
267128
|
+
const maxAttempts = maxRetries + 1;
|
267129
|
+
while (retries < maxAttempts) {
|
267127
267130
|
try {
|
267128
267131
|
return await fn();
|
267129
267132
|
} catch (e3) {
|
267133
|
+
const error36 = e3;
|
267130
267134
|
if (typeof stopOnError === "function") {
|
267131
|
-
const error36 = e3;
|
267132
267135
|
if (stopOnError(error36)) {
|
267133
267136
|
throw error36;
|
267134
267137
|
}
|
267135
267138
|
}
|
267136
|
-
|
267137
|
-
if (attempt >= maxRetries) {
|
267139
|
+
if (retries >= maxRetries) {
|
267138
267140
|
throw e3;
|
267139
267141
|
}
|
267140
|
-
const
|
267141
|
-
const
|
267142
|
+
const baseDelay = 2 ** retries * initialSleepTime;
|
267143
|
+
const jitterAmount = initialSleepTime * (Math.random() / 10);
|
267144
|
+
const delay = baseDelay + jitterAmount;
|
267145
|
+
retries += 1;
|
267146
|
+
logger2.warn(`An error occurred ${error36.message}, retrying in ${delay.toFixed(0)}ms (retry ${retries} of ${maxRetries})...`);
|
267142
267147
|
await new Promise((resolve3) => setTimeout(resolve3, delay));
|
267143
267148
|
}
|
267144
267149
|
}
|
@@ -268675,23 +268680,768 @@ function sanitizeName(value4, length = 35) {
|
|
268675
268680
|
}).slice(0, length).replaceAll(/(^\d*)/g, "").replaceAll(/(-$)/g, "").replaceAll(/(^-)/g, "");
|
268676
268681
|
}
|
268677
268682
|
|
268683
|
+
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/key.js
|
268684
|
+
var isBackspaceKey = (key2) => key2.name === "backspace";
|
268685
|
+
var isEnterKey2 = (key2) => key2.name === "enter" || key2.name === "return";
|
268686
|
+
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/errors.js
|
268687
|
+
class AbortPromptError2 extends Error {
|
268688
|
+
name = "AbortPromptError";
|
268689
|
+
message = "Prompt was aborted";
|
268690
|
+
constructor(options) {
|
268691
|
+
super();
|
268692
|
+
this.cause = options?.cause;
|
268693
|
+
}
|
268694
|
+
}
|
268695
|
+
|
268696
|
+
class CancelPromptError2 extends Error {
|
268697
|
+
name = "CancelPromptError";
|
268698
|
+
message = "Prompt was canceled";
|
268699
|
+
}
|
268700
|
+
|
268701
|
+
class ExitPromptError2 extends Error {
|
268702
|
+
name = "ExitPromptError";
|
268703
|
+
}
|
268704
|
+
|
268705
|
+
class HookError2 extends Error {
|
268706
|
+
name = "HookError";
|
268707
|
+
}
|
268708
|
+
|
268709
|
+
class ValidationError2 extends Error {
|
268710
|
+
name = "ValidationError";
|
268711
|
+
}
|
268712
|
+
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/use-prefix.js
|
268713
|
+
import { AsyncResource as AsyncResource6 } from "node:async_hooks";
|
268714
|
+
|
268715
|
+
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/hook-engine.js
|
268716
|
+
import { AsyncLocalStorage as AsyncLocalStorage2, AsyncResource as AsyncResource5 } from "node:async_hooks";
|
268717
|
+
var hookStorage2 = new AsyncLocalStorage2;
|
268718
|
+
function createStore2(rl) {
|
268719
|
+
const store = {
|
268720
|
+
rl,
|
268721
|
+
hooks: [],
|
268722
|
+
hooksCleanup: [],
|
268723
|
+
hooksEffect: [],
|
268724
|
+
index: 0,
|
268725
|
+
handleChange() {}
|
268726
|
+
};
|
268727
|
+
return store;
|
268728
|
+
}
|
268729
|
+
function withHooks2(rl, cb) {
|
268730
|
+
const store = createStore2(rl);
|
268731
|
+
return hookStorage2.run(store, () => {
|
268732
|
+
function cycle(render) {
|
268733
|
+
store.handleChange = () => {
|
268734
|
+
store.index = 0;
|
268735
|
+
render();
|
268736
|
+
};
|
268737
|
+
store.handleChange();
|
268738
|
+
}
|
268739
|
+
return cb(cycle);
|
268740
|
+
});
|
268741
|
+
}
|
268742
|
+
function getStore2() {
|
268743
|
+
const store = hookStorage2.getStore();
|
268744
|
+
if (!store) {
|
268745
|
+
throw new HookError2("[Inquirer] Hook functions can only be called from within a prompt");
|
268746
|
+
}
|
268747
|
+
return store;
|
268748
|
+
}
|
268749
|
+
function readline3() {
|
268750
|
+
return getStore2().rl;
|
268751
|
+
}
|
268752
|
+
function withUpdates2(fn) {
|
268753
|
+
const wrapped = (...args) => {
|
268754
|
+
const store = getStore2();
|
268755
|
+
let shouldUpdate = false;
|
268756
|
+
const oldHandleChange = store.handleChange;
|
268757
|
+
store.handleChange = () => {
|
268758
|
+
shouldUpdate = true;
|
268759
|
+
};
|
268760
|
+
const returnValue = fn(...args);
|
268761
|
+
if (shouldUpdate) {
|
268762
|
+
oldHandleChange();
|
268763
|
+
}
|
268764
|
+
store.handleChange = oldHandleChange;
|
268765
|
+
return returnValue;
|
268766
|
+
};
|
268767
|
+
return AsyncResource5.bind(wrapped);
|
268768
|
+
}
|
268769
|
+
function withPointer2(cb) {
|
268770
|
+
const store = getStore2();
|
268771
|
+
const { index } = store;
|
268772
|
+
const pointer = {
|
268773
|
+
get() {
|
268774
|
+
return store.hooks[index];
|
268775
|
+
},
|
268776
|
+
set(value4) {
|
268777
|
+
store.hooks[index] = value4;
|
268778
|
+
},
|
268779
|
+
initialized: index in store.hooks
|
268780
|
+
};
|
268781
|
+
const returnValue = cb(pointer);
|
268782
|
+
store.index++;
|
268783
|
+
return returnValue;
|
268784
|
+
}
|
268785
|
+
function handleChange2() {
|
268786
|
+
getStore2().handleChange();
|
268787
|
+
}
|
268788
|
+
var effectScheduler2 = {
|
268789
|
+
queue(cb) {
|
268790
|
+
const store = getStore2();
|
268791
|
+
const { index } = store;
|
268792
|
+
store.hooksEffect.push(() => {
|
268793
|
+
store.hooksCleanup[index]?.();
|
268794
|
+
const cleanFn = cb(readline3());
|
268795
|
+
if (cleanFn != null && typeof cleanFn !== "function") {
|
268796
|
+
throw new ValidationError2("useEffect return value must be a cleanup function or nothing.");
|
268797
|
+
}
|
268798
|
+
store.hooksCleanup[index] = cleanFn;
|
268799
|
+
});
|
268800
|
+
},
|
268801
|
+
run() {
|
268802
|
+
const store = getStore2();
|
268803
|
+
withUpdates2(() => {
|
268804
|
+
store.hooksEffect.forEach((effect) => {
|
268805
|
+
effect();
|
268806
|
+
});
|
268807
|
+
store.hooksEffect.length = 0;
|
268808
|
+
})();
|
268809
|
+
},
|
268810
|
+
clearAll() {
|
268811
|
+
const store = getStore2();
|
268812
|
+
store.hooksCleanup.forEach((cleanFn) => {
|
268813
|
+
cleanFn?.();
|
268814
|
+
});
|
268815
|
+
store.hooksEffect.length = 0;
|
268816
|
+
store.hooksCleanup.length = 0;
|
268817
|
+
}
|
268818
|
+
};
|
268819
|
+
|
268820
|
+
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/use-state.js
|
268821
|
+
function useState2(defaultValue) {
|
268822
|
+
return withPointer2((pointer) => {
|
268823
|
+
const setFn = (newValue) => {
|
268824
|
+
if (pointer.get() !== newValue) {
|
268825
|
+
pointer.set(newValue);
|
268826
|
+
handleChange2();
|
268827
|
+
}
|
268828
|
+
};
|
268829
|
+
if (pointer.initialized) {
|
268830
|
+
return [pointer.get(), setFn];
|
268831
|
+
}
|
268832
|
+
const value4 = typeof defaultValue === "function" ? defaultValue() : defaultValue;
|
268833
|
+
pointer.set(value4);
|
268834
|
+
return [value4, setFn];
|
268835
|
+
});
|
268836
|
+
}
|
268837
|
+
|
268838
|
+
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/use-effect.js
|
268839
|
+
function useEffect2(cb, depArray) {
|
268840
|
+
withPointer2((pointer) => {
|
268841
|
+
const oldDeps = pointer.get();
|
268842
|
+
const hasChanged = !Array.isArray(oldDeps) || depArray.some((dep, i6) => !Object.is(dep, oldDeps[i6]));
|
268843
|
+
if (hasChanged) {
|
268844
|
+
effectScheduler2.queue(cb);
|
268845
|
+
}
|
268846
|
+
pointer.set(depArray);
|
268847
|
+
});
|
268848
|
+
}
|
268849
|
+
|
268850
|
+
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/theme.js
|
268851
|
+
var import_yoctocolors_cjs2 = __toESM(require_yoctocolors_cjs(), 1);
|
268852
|
+
|
268853
|
+
// ../../node_modules/@inquirer/figures/dist/esm/index.js
|
268854
|
+
import process8 from "node:process";
|
268855
|
+
function isUnicodeSupported3() {
|
268856
|
+
if (process8.platform !== "win32") {
|
268857
|
+
return process8.env["TERM"] !== "linux";
|
268858
|
+
}
|
268859
|
+
return Boolean(process8.env["WT_SESSION"]) || Boolean(process8.env["TERMINUS_SUBLIME"]) || process8.env["ConEmuTask"] === "{cmd::Cmder}" || process8.env["TERM_PROGRAM"] === "Terminus-Sublime" || process8.env["TERM_PROGRAM"] === "vscode" || process8.env["TERM"] === "xterm-256color" || process8.env["TERM"] === "alacritty" || process8.env["TERMINAL_EMULATOR"] === "JetBrains-JediTerm";
|
268860
|
+
}
|
268861
|
+
var common2 = {
|
268862
|
+
circleQuestionMark: "(?)",
|
268863
|
+
questionMarkPrefix: "(?)",
|
268864
|
+
square: "█",
|
268865
|
+
squareDarkShade: "▓",
|
268866
|
+
squareMediumShade: "▒",
|
268867
|
+
squareLightShade: "░",
|
268868
|
+
squareTop: "▀",
|
268869
|
+
squareBottom: "▄",
|
268870
|
+
squareLeft: "▌",
|
268871
|
+
squareRight: "▐",
|
268872
|
+
squareCenter: "■",
|
268873
|
+
bullet: "●",
|
268874
|
+
dot: "․",
|
268875
|
+
ellipsis: "…",
|
268876
|
+
pointerSmall: "›",
|
268877
|
+
triangleUp: "▲",
|
268878
|
+
triangleUpSmall: "▴",
|
268879
|
+
triangleDown: "▼",
|
268880
|
+
triangleDownSmall: "▾",
|
268881
|
+
triangleLeftSmall: "◂",
|
268882
|
+
triangleRightSmall: "▸",
|
268883
|
+
home: "⌂",
|
268884
|
+
heart: "♥",
|
268885
|
+
musicNote: "♪",
|
268886
|
+
musicNoteBeamed: "♫",
|
268887
|
+
arrowUp: "↑",
|
268888
|
+
arrowDown: "↓",
|
268889
|
+
arrowLeft: "←",
|
268890
|
+
arrowRight: "→",
|
268891
|
+
arrowLeftRight: "↔",
|
268892
|
+
arrowUpDown: "↕",
|
268893
|
+
almostEqual: "≈",
|
268894
|
+
notEqual: "≠",
|
268895
|
+
lessOrEqual: "≤",
|
268896
|
+
greaterOrEqual: "≥",
|
268897
|
+
identical: "≡",
|
268898
|
+
infinity: "∞",
|
268899
|
+
subscriptZero: "₀",
|
268900
|
+
subscriptOne: "₁",
|
268901
|
+
subscriptTwo: "₂",
|
268902
|
+
subscriptThree: "₃",
|
268903
|
+
subscriptFour: "₄",
|
268904
|
+
subscriptFive: "₅",
|
268905
|
+
subscriptSix: "₆",
|
268906
|
+
subscriptSeven: "₇",
|
268907
|
+
subscriptEight: "₈",
|
268908
|
+
subscriptNine: "₉",
|
268909
|
+
oneHalf: "½",
|
268910
|
+
oneThird: "⅓",
|
268911
|
+
oneQuarter: "¼",
|
268912
|
+
oneFifth: "⅕",
|
268913
|
+
oneSixth: "⅙",
|
268914
|
+
oneEighth: "⅛",
|
268915
|
+
twoThirds: "⅔",
|
268916
|
+
twoFifths: "⅖",
|
268917
|
+
threeQuarters: "¾",
|
268918
|
+
threeFifths: "⅗",
|
268919
|
+
threeEighths: "⅜",
|
268920
|
+
fourFifths: "⅘",
|
268921
|
+
fiveSixths: "⅚",
|
268922
|
+
fiveEighths: "⅝",
|
268923
|
+
sevenEighths: "⅞",
|
268924
|
+
line: "─",
|
268925
|
+
lineBold: "━",
|
268926
|
+
lineDouble: "═",
|
268927
|
+
lineDashed0: "┄",
|
268928
|
+
lineDashed1: "┅",
|
268929
|
+
lineDashed2: "┈",
|
268930
|
+
lineDashed3: "┉",
|
268931
|
+
lineDashed4: "╌",
|
268932
|
+
lineDashed5: "╍",
|
268933
|
+
lineDashed6: "╴",
|
268934
|
+
lineDashed7: "╶",
|
268935
|
+
lineDashed8: "╸",
|
268936
|
+
lineDashed9: "╺",
|
268937
|
+
lineDashed10: "╼",
|
268938
|
+
lineDashed11: "╾",
|
268939
|
+
lineDashed12: "−",
|
268940
|
+
lineDashed13: "–",
|
268941
|
+
lineDashed14: "‐",
|
268942
|
+
lineDashed15: "⁃",
|
268943
|
+
lineVertical: "│",
|
268944
|
+
lineVerticalBold: "┃",
|
268945
|
+
lineVerticalDouble: "║",
|
268946
|
+
lineVerticalDashed0: "┆",
|
268947
|
+
lineVerticalDashed1: "┇",
|
268948
|
+
lineVerticalDashed2: "┊",
|
268949
|
+
lineVerticalDashed3: "┋",
|
268950
|
+
lineVerticalDashed4: "╎",
|
268951
|
+
lineVerticalDashed5: "╏",
|
268952
|
+
lineVerticalDashed6: "╵",
|
268953
|
+
lineVerticalDashed7: "╷",
|
268954
|
+
lineVerticalDashed8: "╹",
|
268955
|
+
lineVerticalDashed9: "╻",
|
268956
|
+
lineVerticalDashed10: "╽",
|
268957
|
+
lineVerticalDashed11: "╿",
|
268958
|
+
lineDownLeft: "┐",
|
268959
|
+
lineDownLeftArc: "╮",
|
268960
|
+
lineDownBoldLeftBold: "┓",
|
268961
|
+
lineDownBoldLeft: "┒",
|
268962
|
+
lineDownLeftBold: "┑",
|
268963
|
+
lineDownDoubleLeftDouble: "╗",
|
268964
|
+
lineDownDoubleLeft: "╖",
|
268965
|
+
lineDownLeftDouble: "╕",
|
268966
|
+
lineDownRight: "┌",
|
268967
|
+
lineDownRightArc: "╭",
|
268968
|
+
lineDownBoldRightBold: "┏",
|
268969
|
+
lineDownBoldRight: "┎",
|
268970
|
+
lineDownRightBold: "┍",
|
268971
|
+
lineDownDoubleRightDouble: "╔",
|
268972
|
+
lineDownDoubleRight: "╓",
|
268973
|
+
lineDownRightDouble: "╒",
|
268974
|
+
lineUpLeft: "┘",
|
268975
|
+
lineUpLeftArc: "╯",
|
268976
|
+
lineUpBoldLeftBold: "┛",
|
268977
|
+
lineUpBoldLeft: "┚",
|
268978
|
+
lineUpLeftBold: "┙",
|
268979
|
+
lineUpDoubleLeftDouble: "╝",
|
268980
|
+
lineUpDoubleLeft: "╜",
|
268981
|
+
lineUpLeftDouble: "╛",
|
268982
|
+
lineUpRight: "└",
|
268983
|
+
lineUpRightArc: "╰",
|
268984
|
+
lineUpBoldRightBold: "┗",
|
268985
|
+
lineUpBoldRight: "┖",
|
268986
|
+
lineUpRightBold: "┕",
|
268987
|
+
lineUpDoubleRightDouble: "╚",
|
268988
|
+
lineUpDoubleRight: "╙",
|
268989
|
+
lineUpRightDouble: "╘",
|
268990
|
+
lineUpDownLeft: "┤",
|
268991
|
+
lineUpBoldDownBoldLeftBold: "┫",
|
268992
|
+
lineUpBoldDownBoldLeft: "┨",
|
268993
|
+
lineUpDownLeftBold: "┥",
|
268994
|
+
lineUpBoldDownLeftBold: "┩",
|
268995
|
+
lineUpDownBoldLeftBold: "┪",
|
268996
|
+
lineUpDownBoldLeft: "┧",
|
268997
|
+
lineUpBoldDownLeft: "┦",
|
268998
|
+
lineUpDoubleDownDoubleLeftDouble: "╣",
|
268999
|
+
lineUpDoubleDownDoubleLeft: "╢",
|
269000
|
+
lineUpDownLeftDouble: "╡",
|
269001
|
+
lineUpDownRight: "├",
|
269002
|
+
lineUpBoldDownBoldRightBold: "┣",
|
269003
|
+
lineUpBoldDownBoldRight: "┠",
|
269004
|
+
lineUpDownRightBold: "┝",
|
269005
|
+
lineUpBoldDownRightBold: "┡",
|
269006
|
+
lineUpDownBoldRightBold: "┢",
|
269007
|
+
lineUpDownBoldRight: "┟",
|
269008
|
+
lineUpBoldDownRight: "┞",
|
269009
|
+
lineUpDoubleDownDoubleRightDouble: "╠",
|
269010
|
+
lineUpDoubleDownDoubleRight: "╟",
|
269011
|
+
lineUpDownRightDouble: "╞",
|
269012
|
+
lineDownLeftRight: "┬",
|
269013
|
+
lineDownBoldLeftBoldRightBold: "┳",
|
269014
|
+
lineDownLeftBoldRightBold: "┯",
|
269015
|
+
lineDownBoldLeftRight: "┰",
|
269016
|
+
lineDownBoldLeftBoldRight: "┱",
|
269017
|
+
lineDownBoldLeftRightBold: "┲",
|
269018
|
+
lineDownLeftRightBold: "┮",
|
269019
|
+
lineDownLeftBoldRight: "┭",
|
269020
|
+
lineDownDoubleLeftDoubleRightDouble: "╦",
|
269021
|
+
lineDownDoubleLeftRight: "╥",
|
269022
|
+
lineDownLeftDoubleRightDouble: "╤",
|
269023
|
+
lineUpLeftRight: "┴",
|
269024
|
+
lineUpBoldLeftBoldRightBold: "┻",
|
269025
|
+
lineUpLeftBoldRightBold: "┷",
|
269026
|
+
lineUpBoldLeftRight: "┸",
|
269027
|
+
lineUpBoldLeftBoldRight: "┹",
|
269028
|
+
lineUpBoldLeftRightBold: "┺",
|
269029
|
+
lineUpLeftRightBold: "┶",
|
269030
|
+
lineUpLeftBoldRight: "┵",
|
269031
|
+
lineUpDoubleLeftDoubleRightDouble: "╩",
|
269032
|
+
lineUpDoubleLeftRight: "╨",
|
269033
|
+
lineUpLeftDoubleRightDouble: "╧",
|
269034
|
+
lineUpDownLeftRight: "┼",
|
269035
|
+
lineUpBoldDownBoldLeftBoldRightBold: "╋",
|
269036
|
+
lineUpDownBoldLeftBoldRightBold: "╈",
|
269037
|
+
lineUpBoldDownLeftBoldRightBold: "╇",
|
269038
|
+
lineUpBoldDownBoldLeftRightBold: "╊",
|
269039
|
+
lineUpBoldDownBoldLeftBoldRight: "╉",
|
269040
|
+
lineUpBoldDownLeftRight: "╀",
|
269041
|
+
lineUpDownBoldLeftRight: "╁",
|
269042
|
+
lineUpDownLeftBoldRight: "┽",
|
269043
|
+
lineUpDownLeftRightBold: "┾",
|
269044
|
+
lineUpBoldDownBoldLeftRight: "╂",
|
269045
|
+
lineUpDownLeftBoldRightBold: "┿",
|
269046
|
+
lineUpBoldDownLeftBoldRight: "╃",
|
269047
|
+
lineUpBoldDownLeftRightBold: "╄",
|
269048
|
+
lineUpDownBoldLeftBoldRight: "╅",
|
269049
|
+
lineUpDownBoldLeftRightBold: "╆",
|
269050
|
+
lineUpDoubleDownDoubleLeftDoubleRightDouble: "╬",
|
269051
|
+
lineUpDoubleDownDoubleLeftRight: "╫",
|
269052
|
+
lineUpDownLeftDoubleRightDouble: "╪",
|
269053
|
+
lineCross: "╳",
|
269054
|
+
lineBackslash: "╲",
|
269055
|
+
lineSlash: "╱"
|
269056
|
+
};
|
269057
|
+
var specialMainSymbols2 = {
|
269058
|
+
tick: "✔",
|
269059
|
+
info: "ℹ",
|
269060
|
+
warning: "⚠",
|
269061
|
+
cross: "✘",
|
269062
|
+
squareSmall: "◻",
|
269063
|
+
squareSmallFilled: "◼",
|
269064
|
+
circle: "◯",
|
269065
|
+
circleFilled: "◉",
|
269066
|
+
circleDotted: "◌",
|
269067
|
+
circleDouble: "◎",
|
269068
|
+
circleCircle: "ⓞ",
|
269069
|
+
circleCross: "ⓧ",
|
269070
|
+
circlePipe: "Ⓘ",
|
269071
|
+
radioOn: "◉",
|
269072
|
+
radioOff: "◯",
|
269073
|
+
checkboxOn: "☒",
|
269074
|
+
checkboxOff: "☐",
|
269075
|
+
checkboxCircleOn: "ⓧ",
|
269076
|
+
checkboxCircleOff: "Ⓘ",
|
269077
|
+
pointer: "❯",
|
269078
|
+
triangleUpOutline: "△",
|
269079
|
+
triangleLeft: "◀",
|
269080
|
+
triangleRight: "▶",
|
269081
|
+
lozenge: "◆",
|
269082
|
+
lozengeOutline: "◇",
|
269083
|
+
hamburger: "☰",
|
269084
|
+
smiley: "㋡",
|
269085
|
+
mustache: "෴",
|
269086
|
+
star: "★",
|
269087
|
+
play: "▶",
|
269088
|
+
nodejs: "⬢",
|
269089
|
+
oneSeventh: "⅐",
|
269090
|
+
oneNinth: "⅑",
|
269091
|
+
oneTenth: "⅒"
|
269092
|
+
};
|
269093
|
+
var specialFallbackSymbols2 = {
|
269094
|
+
tick: "√",
|
269095
|
+
info: "i",
|
269096
|
+
warning: "‼",
|
269097
|
+
cross: "×",
|
269098
|
+
squareSmall: "□",
|
269099
|
+
squareSmallFilled: "■",
|
269100
|
+
circle: "( )",
|
269101
|
+
circleFilled: "(*)",
|
269102
|
+
circleDotted: "( )",
|
269103
|
+
circleDouble: "( )",
|
269104
|
+
circleCircle: "(○)",
|
269105
|
+
circleCross: "(×)",
|
269106
|
+
circlePipe: "(│)",
|
269107
|
+
radioOn: "(*)",
|
269108
|
+
radioOff: "( )",
|
269109
|
+
checkboxOn: "[×]",
|
269110
|
+
checkboxOff: "[ ]",
|
269111
|
+
checkboxCircleOn: "(×)",
|
269112
|
+
checkboxCircleOff: "( )",
|
269113
|
+
pointer: ">",
|
269114
|
+
triangleUpOutline: "∆",
|
269115
|
+
triangleLeft: "◄",
|
269116
|
+
triangleRight: "►",
|
269117
|
+
lozenge: "♦",
|
269118
|
+
lozengeOutline: "◊",
|
269119
|
+
hamburger: "≡",
|
269120
|
+
smiley: "☺",
|
269121
|
+
mustache: "┌─┐",
|
269122
|
+
star: "✶",
|
269123
|
+
play: "►",
|
269124
|
+
nodejs: "♦",
|
269125
|
+
oneSeventh: "1/7",
|
269126
|
+
oneNinth: "1/9",
|
269127
|
+
oneTenth: "1/10"
|
269128
|
+
};
|
269129
|
+
var mainSymbols2 = { ...common2, ...specialMainSymbols2 };
|
269130
|
+
var fallbackSymbols2 = {
|
269131
|
+
...common2,
|
269132
|
+
...specialFallbackSymbols2
|
269133
|
+
};
|
269134
|
+
var shouldUseMain2 = isUnicodeSupported3();
|
269135
|
+
var figures2 = shouldUseMain2 ? mainSymbols2 : fallbackSymbols2;
|
269136
|
+
var esm_default2 = figures2;
|
269137
|
+
var replacements2 = Object.entries(specialMainSymbols2);
|
269138
|
+
|
269139
|
+
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/theme.js
|
269140
|
+
var defaultTheme2 = {
|
269141
|
+
prefix: {
|
269142
|
+
idle: import_yoctocolors_cjs2.default.blue("?"),
|
269143
|
+
done: import_yoctocolors_cjs2.default.green(esm_default2.tick)
|
269144
|
+
},
|
269145
|
+
spinner: {
|
269146
|
+
interval: 80,
|
269147
|
+
frames: ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"].map((frame) => import_yoctocolors_cjs2.default.yellow(frame))
|
269148
|
+
},
|
269149
|
+
style: {
|
269150
|
+
answer: import_yoctocolors_cjs2.default.cyan,
|
269151
|
+
message: import_yoctocolors_cjs2.default.bold,
|
269152
|
+
error: (text2) => import_yoctocolors_cjs2.default.red(`> ${text2}`),
|
269153
|
+
defaultAnswer: (text2) => import_yoctocolors_cjs2.default.dim(`(${text2})`),
|
269154
|
+
help: import_yoctocolors_cjs2.default.dim,
|
269155
|
+
highlight: import_yoctocolors_cjs2.default.cyan,
|
269156
|
+
key: (text2) => import_yoctocolors_cjs2.default.cyan(import_yoctocolors_cjs2.default.bold(`<${text2}>`))
|
269157
|
+
}
|
269158
|
+
};
|
269159
|
+
|
269160
|
+
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/make-theme.js
|
269161
|
+
function isPlainObject4(value4) {
|
269162
|
+
if (typeof value4 !== "object" || value4 === null)
|
269163
|
+
return false;
|
269164
|
+
let proto = value4;
|
269165
|
+
while (Object.getPrototypeOf(proto) !== null) {
|
269166
|
+
proto = Object.getPrototypeOf(proto);
|
269167
|
+
}
|
269168
|
+
return Object.getPrototypeOf(value4) === proto;
|
269169
|
+
}
|
269170
|
+
function deepMerge3(...objects) {
|
269171
|
+
const output = {};
|
269172
|
+
for (const obj of objects) {
|
269173
|
+
for (const [key2, value4] of Object.entries(obj)) {
|
269174
|
+
const prevValue = output[key2];
|
269175
|
+
output[key2] = isPlainObject4(prevValue) && isPlainObject4(value4) ? deepMerge3(prevValue, value4) : value4;
|
269176
|
+
}
|
269177
|
+
}
|
269178
|
+
return output;
|
269179
|
+
}
|
269180
|
+
function makeTheme2(...themes) {
|
269181
|
+
const themesToMerge = [
|
269182
|
+
defaultTheme2,
|
269183
|
+
...themes.filter((theme) => theme != null)
|
269184
|
+
];
|
269185
|
+
return deepMerge3(...themesToMerge);
|
269186
|
+
}
|
269187
|
+
|
269188
|
+
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/use-prefix.js
|
269189
|
+
function usePrefix2({ status = "idle", theme }) {
|
269190
|
+
const [showLoader, setShowLoader] = useState2(false);
|
269191
|
+
const [tick, setTick] = useState2(0);
|
269192
|
+
const { prefix, spinner: spinner2 } = makeTheme2(theme);
|
269193
|
+
useEffect2(() => {
|
269194
|
+
if (status === "loading") {
|
269195
|
+
let tickInterval;
|
269196
|
+
let inc = -1;
|
269197
|
+
const delayTimeout = setTimeout(AsyncResource6.bind(() => {
|
269198
|
+
setShowLoader(true);
|
269199
|
+
tickInterval = setInterval(AsyncResource6.bind(() => {
|
269200
|
+
inc = inc + 1;
|
269201
|
+
setTick(inc % spinner2.frames.length);
|
269202
|
+
}), spinner2.interval);
|
269203
|
+
}), 300);
|
269204
|
+
return () => {
|
269205
|
+
clearTimeout(delayTimeout);
|
269206
|
+
clearInterval(tickInterval);
|
269207
|
+
};
|
269208
|
+
} else {
|
269209
|
+
setShowLoader(false);
|
269210
|
+
}
|
269211
|
+
}, [status]);
|
269212
|
+
if (showLoader) {
|
269213
|
+
return spinner2.frames[tick];
|
269214
|
+
}
|
269215
|
+
const iconName = status === "loading" ? "idle" : status;
|
269216
|
+
return typeof prefix === "string" ? prefix : prefix[iconName] ?? prefix["idle"];
|
269217
|
+
}
|
269218
|
+
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/use-ref.js
|
269219
|
+
function useRef2(val) {
|
269220
|
+
return useState2({ current: val })[0];
|
269221
|
+
}
|
269222
|
+
|
269223
|
+
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/use-keypress.js
|
269224
|
+
function useKeypress2(userHandler) {
|
269225
|
+
const signal = useRef2(userHandler);
|
269226
|
+
signal.current = userHandler;
|
269227
|
+
useEffect2((rl) => {
|
269228
|
+
let ignore = false;
|
269229
|
+
const handler = withUpdates2((_input, event) => {
|
269230
|
+
if (ignore)
|
269231
|
+
return;
|
269232
|
+
signal.current(event, rl);
|
269233
|
+
});
|
269234
|
+
rl.input.on("keypress", handler);
|
269235
|
+
return () => {
|
269236
|
+
ignore = true;
|
269237
|
+
rl.input.removeListener("keypress", handler);
|
269238
|
+
};
|
269239
|
+
}, []);
|
269240
|
+
}
|
269241
|
+
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/utils.js
|
269242
|
+
var import_cli_width2 = __toESM(require_cli_width(), 1);
|
269243
|
+
var import_wrap_ansi2 = __toESM(require_wrap_ansi(), 1);
|
269244
|
+
function breakLines2(content, width) {
|
269245
|
+
return content.split(`
|
269246
|
+
`).flatMap((line) => import_wrap_ansi2.default(line, width, { trim: false, hard: true }).split(`
|
269247
|
+
`).map((str) => str.trimEnd())).join(`
|
269248
|
+
`);
|
269249
|
+
}
|
269250
|
+
function readlineWidth2() {
|
269251
|
+
return import_cli_width2.default({ defaultWidth: 80, output: readline3().output });
|
269252
|
+
}
|
269253
|
+
|
269254
|
+
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
|
269255
|
+
var import_mute_stream2 = __toESM(require_lib(), 1);
|
269256
|
+
import * as readline4 from "node:readline";
|
269257
|
+
import { AsyncResource as AsyncResource7 } from "node:async_hooks";
|
269258
|
+
|
269259
|
+
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/screen-manager.js
|
269260
|
+
var import_ansi_escapes2 = __toESM(require_ansi_escapes(), 1);
|
269261
|
+
import { stripVTControlCharacters as stripVTControlCharacters3 } from "node:util";
|
269262
|
+
var height2 = (content) => content.split(`
|
269263
|
+
`).length;
|
269264
|
+
var lastLine2 = (content) => content.split(`
|
269265
|
+
`).pop() ?? "";
|
269266
|
+
function cursorDown2(n6) {
|
269267
|
+
return n6 > 0 ? import_ansi_escapes2.default.cursorDown(n6) : "";
|
269268
|
+
}
|
269269
|
+
|
269270
|
+
class ScreenManager2 {
|
269271
|
+
height = 0;
|
269272
|
+
extraLinesUnderPrompt = 0;
|
269273
|
+
cursorPos;
|
269274
|
+
rl;
|
269275
|
+
constructor(rl) {
|
269276
|
+
this.rl = rl;
|
269277
|
+
this.cursorPos = rl.getCursorPos();
|
269278
|
+
}
|
269279
|
+
write(content) {
|
269280
|
+
this.rl.output.unmute();
|
269281
|
+
this.rl.output.write(content);
|
269282
|
+
this.rl.output.mute();
|
269283
|
+
}
|
269284
|
+
render(content, bottomContent = "") {
|
269285
|
+
const promptLine = lastLine2(content);
|
269286
|
+
const rawPromptLine = stripVTControlCharacters3(promptLine);
|
269287
|
+
let prompt = rawPromptLine;
|
269288
|
+
if (this.rl.line.length > 0) {
|
269289
|
+
prompt = prompt.slice(0, -this.rl.line.length);
|
269290
|
+
}
|
269291
|
+
this.rl.setPrompt(prompt);
|
269292
|
+
this.cursorPos = this.rl.getCursorPos();
|
269293
|
+
const width = readlineWidth2();
|
269294
|
+
content = breakLines2(content, width);
|
269295
|
+
bottomContent = breakLines2(bottomContent, width);
|
269296
|
+
if (rawPromptLine.length % width === 0) {
|
269297
|
+
content += `
|
269298
|
+
`;
|
269299
|
+
}
|
269300
|
+
let output = content + (bottomContent ? `
|
269301
|
+
` + bottomContent : "");
|
269302
|
+
const promptLineUpDiff = Math.floor(rawPromptLine.length / width) - this.cursorPos.rows;
|
269303
|
+
const bottomContentHeight = promptLineUpDiff + (bottomContent ? height2(bottomContent) : 0);
|
269304
|
+
if (bottomContentHeight > 0)
|
269305
|
+
output += import_ansi_escapes2.default.cursorUp(bottomContentHeight);
|
269306
|
+
output += import_ansi_escapes2.default.cursorTo(this.cursorPos.cols);
|
269307
|
+
this.write(cursorDown2(this.extraLinesUnderPrompt) + import_ansi_escapes2.default.eraseLines(this.height) + output);
|
269308
|
+
this.extraLinesUnderPrompt = bottomContentHeight;
|
269309
|
+
this.height = height2(output);
|
269310
|
+
}
|
269311
|
+
checkCursorPos() {
|
269312
|
+
const cursorPos = this.rl.getCursorPos();
|
269313
|
+
if (cursorPos.cols !== this.cursorPos.cols) {
|
269314
|
+
this.write(import_ansi_escapes2.default.cursorTo(cursorPos.cols));
|
269315
|
+
this.cursorPos = cursorPos;
|
269316
|
+
}
|
269317
|
+
}
|
269318
|
+
done({ clearContent }) {
|
269319
|
+
this.rl.setPrompt("");
|
269320
|
+
let output = cursorDown2(this.extraLinesUnderPrompt);
|
269321
|
+
output += clearContent ? import_ansi_escapes2.default.eraseLines(this.height) : `
|
269322
|
+
`;
|
269323
|
+
output += import_ansi_escapes2.default.cursorShow;
|
269324
|
+
this.write(output);
|
269325
|
+
this.rl.close();
|
269326
|
+
}
|
269327
|
+
}
|
269328
|
+
|
269329
|
+
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/promise-polyfill.js
|
269330
|
+
class PromisePolyfill2 extends Promise {
|
269331
|
+
static withResolver() {
|
269332
|
+
let resolve5;
|
269333
|
+
let reject;
|
269334
|
+
const promise2 = new Promise((res, rej) => {
|
269335
|
+
resolve5 = res;
|
269336
|
+
reject = rej;
|
269337
|
+
});
|
269338
|
+
return { promise: promise2, resolve: resolve5, reject };
|
269339
|
+
}
|
269340
|
+
}
|
269341
|
+
|
269342
|
+
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
|
269343
|
+
function getCallSites2() {
|
269344
|
+
const _prepareStackTrace = Error.prepareStackTrace;
|
269345
|
+
let result = [];
|
269346
|
+
try {
|
269347
|
+
Error.prepareStackTrace = (_5, callSites) => {
|
269348
|
+
const callSitesWithoutCurrent = callSites.slice(1);
|
269349
|
+
result = callSitesWithoutCurrent;
|
269350
|
+
return callSitesWithoutCurrent;
|
269351
|
+
};
|
269352
|
+
new Error().stack;
|
269353
|
+
} catch {
|
269354
|
+
return result;
|
269355
|
+
}
|
269356
|
+
Error.prepareStackTrace = _prepareStackTrace;
|
269357
|
+
return result;
|
269358
|
+
}
|
269359
|
+
function createPrompt2(view) {
|
269360
|
+
const callSites = getCallSites2();
|
269361
|
+
const prompt = (config3, context = {}) => {
|
269362
|
+
const { input = process.stdin, signal } = context;
|
269363
|
+
const cleanups = new Set;
|
269364
|
+
const output = new import_mute_stream2.default;
|
269365
|
+
output.pipe(context.output ?? process.stdout);
|
269366
|
+
const rl = readline4.createInterface({
|
269367
|
+
terminal: true,
|
269368
|
+
input,
|
269369
|
+
output
|
269370
|
+
});
|
269371
|
+
const screen = new ScreenManager2(rl);
|
269372
|
+
const { promise: promise2, resolve: resolve5, reject } = PromisePolyfill2.withResolver();
|
269373
|
+
const cancel3 = () => reject(new CancelPromptError2);
|
269374
|
+
if (signal) {
|
269375
|
+
const abort = () => reject(new AbortPromptError2({ cause: signal.reason }));
|
269376
|
+
if (signal.aborted) {
|
269377
|
+
abort();
|
269378
|
+
return Object.assign(promise2, { cancel: cancel3 });
|
269379
|
+
}
|
269380
|
+
signal.addEventListener("abort", abort);
|
269381
|
+
cleanups.add(() => signal.removeEventListener("abort", abort));
|
269382
|
+
}
|
269383
|
+
cleanups.add(onExit((code2, signal2) => {
|
269384
|
+
reject(new ExitPromptError2(`User force closed the prompt with ${code2} ${signal2}`));
|
269385
|
+
}));
|
269386
|
+
const sigint = () => reject(new ExitPromptError2(`User force closed the prompt with SIGINT`));
|
269387
|
+
rl.on("SIGINT", sigint);
|
269388
|
+
cleanups.add(() => rl.removeListener("SIGINT", sigint));
|
269389
|
+
const checkCursorPos = () => screen.checkCursorPos();
|
269390
|
+
rl.input.on("keypress", checkCursorPos);
|
269391
|
+
cleanups.add(() => rl.input.removeListener("keypress", checkCursorPos));
|
269392
|
+
return withHooks2(rl, (cycle) => {
|
269393
|
+
const hooksCleanup = AsyncResource7.bind(() => effectScheduler2.clearAll());
|
269394
|
+
rl.on("close", hooksCleanup);
|
269395
|
+
cleanups.add(() => rl.removeListener("close", hooksCleanup));
|
269396
|
+
cycle(() => {
|
269397
|
+
try {
|
269398
|
+
const nextView = view(config3, (value4) => {
|
269399
|
+
setImmediate(() => resolve5(value4));
|
269400
|
+
});
|
269401
|
+
if (nextView === undefined) {
|
269402
|
+
const callerFilename = callSites[1]?.getFileName();
|
269403
|
+
throw new Error(`Prompt functions must return a string.
|
269404
|
+
at ${callerFilename}`);
|
269405
|
+
}
|
269406
|
+
const [content, bottomContent] = typeof nextView === "string" ? [nextView] : nextView;
|
269407
|
+
screen.render(content, bottomContent);
|
269408
|
+
effectScheduler2.run();
|
269409
|
+
} catch (error39) {
|
269410
|
+
reject(error39);
|
269411
|
+
}
|
269412
|
+
});
|
269413
|
+
return Object.assign(promise2.then((answer) => {
|
269414
|
+
effectScheduler2.clearAll();
|
269415
|
+
return answer;
|
269416
|
+
}, (error39) => {
|
269417
|
+
effectScheduler2.clearAll();
|
269418
|
+
throw error39;
|
269419
|
+
}).finally(() => {
|
269420
|
+
cleanups.forEach((cleanup) => cleanup());
|
269421
|
+
screen.done({ clearContent: Boolean(context.clearPromptOnDone) });
|
269422
|
+
output.end();
|
269423
|
+
}).then(() => promise2), { cancel: cancel3 });
|
269424
|
+
});
|
269425
|
+
};
|
269426
|
+
return prompt;
|
269427
|
+
}
|
268678
269428
|
// ../../node_modules/@inquirer/input/dist/esm/index.js
|
268679
269429
|
var inputTheme = {
|
268680
269430
|
validationFailureMode: "keep"
|
268681
269431
|
};
|
268682
|
-
var
|
269432
|
+
var esm_default3 = createPrompt2((config3, done) => {
|
268683
269433
|
const { required: required2, validate: validate3 = () => true } = config3;
|
268684
|
-
const theme =
|
268685
|
-
const [status, setStatus] =
|
268686
|
-
const [defaultValue = "", setDefaultValue] =
|
268687
|
-
const [errorMsg, setError] =
|
268688
|
-
const [value4, setValue] =
|
268689
|
-
const prefix =
|
268690
|
-
|
269434
|
+
const theme = makeTheme2(inputTheme, config3.theme);
|
269435
|
+
const [status, setStatus] = useState2("idle");
|
269436
|
+
const [defaultValue = "", setDefaultValue] = useState2(config3.default);
|
269437
|
+
const [errorMsg, setError] = useState2();
|
269438
|
+
const [value4, setValue] = useState2("");
|
269439
|
+
const prefix = usePrefix2({ status, theme });
|
269440
|
+
useKeypress2(async (key3, rl) => {
|
268691
269441
|
if (status !== "idle") {
|
268692
269442
|
return;
|
268693
269443
|
}
|
268694
|
-
if (
|
269444
|
+
if (isEnterKey2(key3)) {
|
268695
269445
|
const answer = value4 || defaultValue;
|
268696
269446
|
setStatus("loading");
|
268697
269447
|
const isValid = required2 && !answer ? "You must provide a value" : await validate3(answer);
|
@@ -268708,9 +269458,9 @@ var esm_default2 = createPrompt((config3, done) => {
|
|
268708
269458
|
setError(isValid || "You must provide a valid value");
|
268709
269459
|
setStatus("idle");
|
268710
269460
|
}
|
268711
|
-
} else if (isBackspaceKey(
|
269461
|
+
} else if (isBackspaceKey(key3) && !value4) {
|
268712
269462
|
setDefaultValue(undefined);
|
268713
|
-
} else if (
|
269463
|
+
} else if (key3.name === "tab" && !value4) {
|
268714
269464
|
setDefaultValue(undefined);
|
268715
269465
|
rl.clearLine(0);
|
268716
269466
|
rl.write(defaultValue);
|
@@ -268751,7 +269501,7 @@ async function subgraphNamePrompt({
|
|
268751
269501
|
if (accept) {
|
268752
269502
|
return defaultSubgraphName ?? env2.SETTLEMINT_THEGRAPH_DEFAULT_SUBGRAPH;
|
268753
269503
|
}
|
268754
|
-
const subgraphName = await
|
269504
|
+
const subgraphName = await esm_default3({
|
268755
269505
|
message: "What is the name of your subgraph?",
|
268756
269506
|
default: defaultSubgraphName,
|
268757
269507
|
required: true
|
@@ -268759,14 +269509,588 @@ async function subgraphNamePrompt({
|
|
268759
269509
|
return sanitizeName(subgraphName);
|
268760
269510
|
}
|
268761
269511
|
|
268762
|
-
// ../../node_modules/@inquirer/select/dist/esm/
|
269512
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/key.js
|
269513
|
+
var isUpKey = (key3) => key3.name === "up" || key3.name === "k" || key3.ctrl && key3.name === "p";
|
269514
|
+
var isDownKey = (key3) => key3.name === "down" || key3.name === "j" || key3.ctrl && key3.name === "n";
|
269515
|
+
var isBackspaceKey2 = (key3) => key3.name === "backspace";
|
269516
|
+
var isNumberKey = (key3) => "1234567890".includes(key3.name);
|
269517
|
+
var isEnterKey3 = (key3) => key3.name === "enter" || key3.name === "return";
|
269518
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/errors.js
|
269519
|
+
class AbortPromptError3 extends Error {
|
269520
|
+
name = "AbortPromptError";
|
269521
|
+
message = "Prompt was aborted";
|
269522
|
+
constructor(options) {
|
269523
|
+
super();
|
269524
|
+
this.cause = options?.cause;
|
269525
|
+
}
|
269526
|
+
}
|
269527
|
+
|
269528
|
+
class CancelPromptError3 extends Error {
|
269529
|
+
name = "CancelPromptError";
|
269530
|
+
message = "Prompt was canceled";
|
269531
|
+
}
|
269532
|
+
|
269533
|
+
class ExitPromptError3 extends Error {
|
269534
|
+
name = "ExitPromptError";
|
269535
|
+
}
|
269536
|
+
|
269537
|
+
class HookError3 extends Error {
|
269538
|
+
name = "HookError";
|
269539
|
+
}
|
269540
|
+
|
269541
|
+
class ValidationError3 extends Error {
|
269542
|
+
name = "ValidationError";
|
269543
|
+
}
|
269544
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/use-prefix.js
|
269545
|
+
import { AsyncResource as AsyncResource9 } from "node:async_hooks";
|
269546
|
+
|
269547
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/hook-engine.js
|
269548
|
+
import { AsyncLocalStorage as AsyncLocalStorage3, AsyncResource as AsyncResource8 } from "node:async_hooks";
|
269549
|
+
var hookStorage3 = new AsyncLocalStorage3;
|
269550
|
+
function createStore3(rl) {
|
269551
|
+
const store = {
|
269552
|
+
rl,
|
269553
|
+
hooks: [],
|
269554
|
+
hooksCleanup: [],
|
269555
|
+
hooksEffect: [],
|
269556
|
+
index: 0,
|
269557
|
+
handleChange() {}
|
269558
|
+
};
|
269559
|
+
return store;
|
269560
|
+
}
|
269561
|
+
function withHooks3(rl, cb) {
|
269562
|
+
const store = createStore3(rl);
|
269563
|
+
return hookStorage3.run(store, () => {
|
269564
|
+
function cycle(render) {
|
269565
|
+
store.handleChange = () => {
|
269566
|
+
store.index = 0;
|
269567
|
+
render();
|
269568
|
+
};
|
269569
|
+
store.handleChange();
|
269570
|
+
}
|
269571
|
+
return cb(cycle);
|
269572
|
+
});
|
269573
|
+
}
|
269574
|
+
function getStore3() {
|
269575
|
+
const store = hookStorage3.getStore();
|
269576
|
+
if (!store) {
|
269577
|
+
throw new HookError3("[Inquirer] Hook functions can only be called from within a prompt");
|
269578
|
+
}
|
269579
|
+
return store;
|
269580
|
+
}
|
269581
|
+
function readline5() {
|
269582
|
+
return getStore3().rl;
|
269583
|
+
}
|
269584
|
+
function withUpdates3(fn) {
|
269585
|
+
const wrapped = (...args) => {
|
269586
|
+
const store = getStore3();
|
269587
|
+
let shouldUpdate = false;
|
269588
|
+
const oldHandleChange = store.handleChange;
|
269589
|
+
store.handleChange = () => {
|
269590
|
+
shouldUpdate = true;
|
269591
|
+
};
|
269592
|
+
const returnValue = fn(...args);
|
269593
|
+
if (shouldUpdate) {
|
269594
|
+
oldHandleChange();
|
269595
|
+
}
|
269596
|
+
store.handleChange = oldHandleChange;
|
269597
|
+
return returnValue;
|
269598
|
+
};
|
269599
|
+
return AsyncResource8.bind(wrapped);
|
269600
|
+
}
|
269601
|
+
function withPointer3(cb) {
|
269602
|
+
const store = getStore3();
|
269603
|
+
const { index } = store;
|
269604
|
+
const pointer = {
|
269605
|
+
get() {
|
269606
|
+
return store.hooks[index];
|
269607
|
+
},
|
269608
|
+
set(value4) {
|
269609
|
+
store.hooks[index] = value4;
|
269610
|
+
},
|
269611
|
+
initialized: index in store.hooks
|
269612
|
+
};
|
269613
|
+
const returnValue = cb(pointer);
|
269614
|
+
store.index++;
|
269615
|
+
return returnValue;
|
269616
|
+
}
|
269617
|
+
function handleChange3() {
|
269618
|
+
getStore3().handleChange();
|
269619
|
+
}
|
269620
|
+
var effectScheduler3 = {
|
269621
|
+
queue(cb) {
|
269622
|
+
const store = getStore3();
|
269623
|
+
const { index } = store;
|
269624
|
+
store.hooksEffect.push(() => {
|
269625
|
+
store.hooksCleanup[index]?.();
|
269626
|
+
const cleanFn = cb(readline5());
|
269627
|
+
if (cleanFn != null && typeof cleanFn !== "function") {
|
269628
|
+
throw new ValidationError3("useEffect return value must be a cleanup function or nothing.");
|
269629
|
+
}
|
269630
|
+
store.hooksCleanup[index] = cleanFn;
|
269631
|
+
});
|
269632
|
+
},
|
269633
|
+
run() {
|
269634
|
+
const store = getStore3();
|
269635
|
+
withUpdates3(() => {
|
269636
|
+
store.hooksEffect.forEach((effect) => {
|
269637
|
+
effect();
|
269638
|
+
});
|
269639
|
+
store.hooksEffect.length = 0;
|
269640
|
+
})();
|
269641
|
+
},
|
269642
|
+
clearAll() {
|
269643
|
+
const store = getStore3();
|
269644
|
+
store.hooksCleanup.forEach((cleanFn) => {
|
269645
|
+
cleanFn?.();
|
269646
|
+
});
|
269647
|
+
store.hooksEffect.length = 0;
|
269648
|
+
store.hooksCleanup.length = 0;
|
269649
|
+
}
|
269650
|
+
};
|
269651
|
+
|
269652
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/use-state.js
|
269653
|
+
function useState3(defaultValue) {
|
269654
|
+
return withPointer3((pointer) => {
|
269655
|
+
const setFn = (newValue) => {
|
269656
|
+
if (pointer.get() !== newValue) {
|
269657
|
+
pointer.set(newValue);
|
269658
|
+
handleChange3();
|
269659
|
+
}
|
269660
|
+
};
|
269661
|
+
if (pointer.initialized) {
|
269662
|
+
return [pointer.get(), setFn];
|
269663
|
+
}
|
269664
|
+
const value4 = typeof defaultValue === "function" ? defaultValue() : defaultValue;
|
269665
|
+
pointer.set(value4);
|
269666
|
+
return [value4, setFn];
|
269667
|
+
});
|
269668
|
+
}
|
269669
|
+
|
269670
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/use-effect.js
|
269671
|
+
function useEffect3(cb, depArray) {
|
269672
|
+
withPointer3((pointer) => {
|
269673
|
+
const oldDeps = pointer.get();
|
269674
|
+
const hasChanged = !Array.isArray(oldDeps) || depArray.some((dep, i6) => !Object.is(dep, oldDeps[i6]));
|
269675
|
+
if (hasChanged) {
|
269676
|
+
effectScheduler3.queue(cb);
|
269677
|
+
}
|
269678
|
+
pointer.set(depArray);
|
269679
|
+
});
|
269680
|
+
}
|
269681
|
+
|
269682
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/theme.js
|
268763
269683
|
var import_yoctocolors_cjs3 = __toESM(require_yoctocolors_cjs(), 1);
|
268764
|
-
var
|
269684
|
+
var defaultTheme3 = {
|
269685
|
+
prefix: {
|
269686
|
+
idle: import_yoctocolors_cjs3.default.blue("?"),
|
269687
|
+
done: import_yoctocolors_cjs3.default.green(esm_default2.tick)
|
269688
|
+
},
|
269689
|
+
spinner: {
|
269690
|
+
interval: 80,
|
269691
|
+
frames: ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"].map((frame) => import_yoctocolors_cjs3.default.yellow(frame))
|
269692
|
+
},
|
269693
|
+
style: {
|
269694
|
+
answer: import_yoctocolors_cjs3.default.cyan,
|
269695
|
+
message: import_yoctocolors_cjs3.default.bold,
|
269696
|
+
error: (text2) => import_yoctocolors_cjs3.default.red(`> ${text2}`),
|
269697
|
+
defaultAnswer: (text2) => import_yoctocolors_cjs3.default.dim(`(${text2})`),
|
269698
|
+
help: import_yoctocolors_cjs3.default.dim,
|
269699
|
+
highlight: import_yoctocolors_cjs3.default.cyan,
|
269700
|
+
key: (text2) => import_yoctocolors_cjs3.default.cyan(import_yoctocolors_cjs3.default.bold(`<${text2}>`))
|
269701
|
+
}
|
269702
|
+
};
|
269703
|
+
|
269704
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/make-theme.js
|
269705
|
+
function isPlainObject5(value4) {
|
269706
|
+
if (typeof value4 !== "object" || value4 === null)
|
269707
|
+
return false;
|
269708
|
+
let proto = value4;
|
269709
|
+
while (Object.getPrototypeOf(proto) !== null) {
|
269710
|
+
proto = Object.getPrototypeOf(proto);
|
269711
|
+
}
|
269712
|
+
return Object.getPrototypeOf(value4) === proto;
|
269713
|
+
}
|
269714
|
+
function deepMerge4(...objects) {
|
269715
|
+
const output = {};
|
269716
|
+
for (const obj of objects) {
|
269717
|
+
for (const [key3, value4] of Object.entries(obj)) {
|
269718
|
+
const prevValue = output[key3];
|
269719
|
+
output[key3] = isPlainObject5(prevValue) && isPlainObject5(value4) ? deepMerge4(prevValue, value4) : value4;
|
269720
|
+
}
|
269721
|
+
}
|
269722
|
+
return output;
|
269723
|
+
}
|
269724
|
+
function makeTheme3(...themes) {
|
269725
|
+
const themesToMerge = [
|
269726
|
+
defaultTheme3,
|
269727
|
+
...themes.filter((theme) => theme != null)
|
269728
|
+
];
|
269729
|
+
return deepMerge4(...themesToMerge);
|
269730
|
+
}
|
269731
|
+
|
269732
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/use-prefix.js
|
269733
|
+
function usePrefix3({ status = "idle", theme }) {
|
269734
|
+
const [showLoader, setShowLoader] = useState3(false);
|
269735
|
+
const [tick, setTick] = useState3(0);
|
269736
|
+
const { prefix, spinner: spinner2 } = makeTheme3(theme);
|
269737
|
+
useEffect3(() => {
|
269738
|
+
if (status === "loading") {
|
269739
|
+
let tickInterval;
|
269740
|
+
let inc = -1;
|
269741
|
+
const delayTimeout = setTimeout(AsyncResource9.bind(() => {
|
269742
|
+
setShowLoader(true);
|
269743
|
+
tickInterval = setInterval(AsyncResource9.bind(() => {
|
269744
|
+
inc = inc + 1;
|
269745
|
+
setTick(inc % spinner2.frames.length);
|
269746
|
+
}), spinner2.interval);
|
269747
|
+
}), 300);
|
269748
|
+
return () => {
|
269749
|
+
clearTimeout(delayTimeout);
|
269750
|
+
clearInterval(tickInterval);
|
269751
|
+
};
|
269752
|
+
} else {
|
269753
|
+
setShowLoader(false);
|
269754
|
+
}
|
269755
|
+
}, [status]);
|
269756
|
+
if (showLoader) {
|
269757
|
+
return spinner2.frames[tick];
|
269758
|
+
}
|
269759
|
+
const iconName = status === "loading" ? "idle" : status;
|
269760
|
+
return typeof prefix === "string" ? prefix : prefix[iconName] ?? prefix["idle"];
|
269761
|
+
}
|
269762
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/use-memo.js
|
269763
|
+
function useMemo(fn, dependencies) {
|
269764
|
+
return withPointer3((pointer) => {
|
269765
|
+
const prev = pointer.get();
|
269766
|
+
if (!prev || prev.dependencies.length !== dependencies.length || prev.dependencies.some((dep, i6) => dep !== dependencies[i6])) {
|
269767
|
+
const value4 = fn();
|
269768
|
+
pointer.set({ value: value4, dependencies });
|
269769
|
+
return value4;
|
269770
|
+
}
|
269771
|
+
return prev.value;
|
269772
|
+
});
|
269773
|
+
}
|
269774
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/use-ref.js
|
269775
|
+
function useRef3(val) {
|
269776
|
+
return useState3({ current: val })[0];
|
269777
|
+
}
|
269778
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/use-keypress.js
|
269779
|
+
function useKeypress3(userHandler) {
|
269780
|
+
const signal = useRef3(userHandler);
|
269781
|
+
signal.current = userHandler;
|
269782
|
+
useEffect3((rl) => {
|
269783
|
+
let ignore = false;
|
269784
|
+
const handler = withUpdates3((_input, event) => {
|
269785
|
+
if (ignore)
|
269786
|
+
return;
|
269787
|
+
signal.current(event, rl);
|
269788
|
+
});
|
269789
|
+
rl.input.on("keypress", handler);
|
269790
|
+
return () => {
|
269791
|
+
ignore = true;
|
269792
|
+
rl.input.removeListener("keypress", handler);
|
269793
|
+
};
|
269794
|
+
}, []);
|
269795
|
+
}
|
269796
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/utils.js
|
269797
|
+
var import_cli_width3 = __toESM(require_cli_width(), 1);
|
269798
|
+
var import_wrap_ansi3 = __toESM(require_wrap_ansi(), 1);
|
269799
|
+
function breakLines3(content, width) {
|
269800
|
+
return content.split(`
|
269801
|
+
`).flatMap((line) => import_wrap_ansi3.default(line, width, { trim: false, hard: true }).split(`
|
269802
|
+
`).map((str) => str.trimEnd())).join(`
|
269803
|
+
`);
|
269804
|
+
}
|
269805
|
+
function readlineWidth3() {
|
269806
|
+
return import_cli_width3.default({ defaultWidth: 80, output: readline5().output });
|
269807
|
+
}
|
269808
|
+
|
269809
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/pagination/lines.js
|
269810
|
+
function split2(content, width) {
|
269811
|
+
return breakLines3(content, width).split(`
|
269812
|
+
`);
|
269813
|
+
}
|
269814
|
+
function rotate(count, items) {
|
269815
|
+
const max = items.length;
|
269816
|
+
const offset = (count % max + max) % max;
|
269817
|
+
return [...items.slice(offset), ...items.slice(0, offset)];
|
269818
|
+
}
|
269819
|
+
function lines({ items, width, renderItem, active, position: requested, pageSize }) {
|
269820
|
+
const layouts = items.map((item, index) => ({
|
269821
|
+
item,
|
269822
|
+
index,
|
269823
|
+
isActive: index === active
|
269824
|
+
}));
|
269825
|
+
const layoutsInPage = rotate(active - requested, layouts).slice(0, pageSize);
|
269826
|
+
const renderItemAt = (index) => layoutsInPage[index] == null ? [] : split2(renderItem(layoutsInPage[index]), width);
|
269827
|
+
const pageBuffer = Array.from({ length: pageSize });
|
269828
|
+
const activeItem = renderItemAt(requested).slice(0, pageSize);
|
269829
|
+
const position = requested + activeItem.length <= pageSize ? requested : pageSize - activeItem.length;
|
269830
|
+
pageBuffer.splice(position, activeItem.length, ...activeItem);
|
269831
|
+
let bufferPointer = position + activeItem.length;
|
269832
|
+
let layoutPointer = requested + 1;
|
269833
|
+
while (bufferPointer < pageSize && layoutPointer < layoutsInPage.length) {
|
269834
|
+
for (const line of renderItemAt(layoutPointer)) {
|
269835
|
+
pageBuffer[bufferPointer++] = line;
|
269836
|
+
if (bufferPointer >= pageSize)
|
269837
|
+
break;
|
269838
|
+
}
|
269839
|
+
layoutPointer++;
|
269840
|
+
}
|
269841
|
+
bufferPointer = position - 1;
|
269842
|
+
layoutPointer = requested - 1;
|
269843
|
+
while (bufferPointer >= 0 && layoutPointer >= 0) {
|
269844
|
+
for (const line of renderItemAt(layoutPointer).reverse()) {
|
269845
|
+
pageBuffer[bufferPointer--] = line;
|
269846
|
+
if (bufferPointer < 0)
|
269847
|
+
break;
|
269848
|
+
}
|
269849
|
+
layoutPointer--;
|
269850
|
+
}
|
269851
|
+
return pageBuffer.filter((line) => typeof line === "string");
|
269852
|
+
}
|
269853
|
+
|
269854
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/pagination/position.js
|
269855
|
+
function finite({ active, pageSize, total }) {
|
269856
|
+
const middle = Math.floor(pageSize / 2);
|
269857
|
+
if (total <= pageSize || active < middle)
|
269858
|
+
return active;
|
269859
|
+
if (active >= total - middle)
|
269860
|
+
return active + pageSize - total;
|
269861
|
+
return middle;
|
269862
|
+
}
|
269863
|
+
function infinite({ active, lastActive, total, pageSize, pointer }) {
|
269864
|
+
if (total <= pageSize)
|
269865
|
+
return active;
|
269866
|
+
if (lastActive < active && active - lastActive < pageSize) {
|
269867
|
+
return Math.min(Math.floor(pageSize / 2), pointer + active - lastActive);
|
269868
|
+
}
|
269869
|
+
return pointer;
|
269870
|
+
}
|
269871
|
+
|
269872
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/pagination/use-pagination.js
|
269873
|
+
function usePagination({ items, active, renderItem, pageSize, loop = true }) {
|
269874
|
+
const state = useRef3({ position: 0, lastActive: 0 });
|
269875
|
+
const position = loop ? infinite({
|
269876
|
+
active,
|
269877
|
+
lastActive: state.current.lastActive,
|
269878
|
+
total: items.length,
|
269879
|
+
pageSize,
|
269880
|
+
pointer: state.current.position
|
269881
|
+
}) : finite({
|
269882
|
+
active,
|
269883
|
+
total: items.length,
|
269884
|
+
pageSize
|
269885
|
+
});
|
269886
|
+
state.current.position = position;
|
269887
|
+
state.current.lastActive = active;
|
269888
|
+
return lines({
|
269889
|
+
items,
|
269890
|
+
width: readlineWidth3(),
|
269891
|
+
renderItem,
|
269892
|
+
active,
|
269893
|
+
position,
|
269894
|
+
pageSize
|
269895
|
+
}).join(`
|
269896
|
+
`);
|
269897
|
+
}
|
269898
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
|
269899
|
+
var import_mute_stream3 = __toESM(require_lib(), 1);
|
269900
|
+
import * as readline6 from "node:readline";
|
269901
|
+
import { AsyncResource as AsyncResource10 } from "node:async_hooks";
|
269902
|
+
|
269903
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/screen-manager.js
|
269904
|
+
var import_ansi_escapes3 = __toESM(require_ansi_escapes(), 1);
|
269905
|
+
import { stripVTControlCharacters as stripVTControlCharacters4 } from "node:util";
|
269906
|
+
var height3 = (content) => content.split(`
|
269907
|
+
`).length;
|
269908
|
+
var lastLine3 = (content) => content.split(`
|
269909
|
+
`).pop() ?? "";
|
269910
|
+
function cursorDown3(n6) {
|
269911
|
+
return n6 > 0 ? import_ansi_escapes3.default.cursorDown(n6) : "";
|
269912
|
+
}
|
269913
|
+
|
269914
|
+
class ScreenManager3 {
|
269915
|
+
height = 0;
|
269916
|
+
extraLinesUnderPrompt = 0;
|
269917
|
+
cursorPos;
|
269918
|
+
rl;
|
269919
|
+
constructor(rl) {
|
269920
|
+
this.rl = rl;
|
269921
|
+
this.cursorPos = rl.getCursorPos();
|
269922
|
+
}
|
269923
|
+
write(content) {
|
269924
|
+
this.rl.output.unmute();
|
269925
|
+
this.rl.output.write(content);
|
269926
|
+
this.rl.output.mute();
|
269927
|
+
}
|
269928
|
+
render(content, bottomContent = "") {
|
269929
|
+
const promptLine = lastLine3(content);
|
269930
|
+
const rawPromptLine = stripVTControlCharacters4(promptLine);
|
269931
|
+
let prompt = rawPromptLine;
|
269932
|
+
if (this.rl.line.length > 0) {
|
269933
|
+
prompt = prompt.slice(0, -this.rl.line.length);
|
269934
|
+
}
|
269935
|
+
this.rl.setPrompt(prompt);
|
269936
|
+
this.cursorPos = this.rl.getCursorPos();
|
269937
|
+
const width = readlineWidth3();
|
269938
|
+
content = breakLines3(content, width);
|
269939
|
+
bottomContent = breakLines3(bottomContent, width);
|
269940
|
+
if (rawPromptLine.length % width === 0) {
|
269941
|
+
content += `
|
269942
|
+
`;
|
269943
|
+
}
|
269944
|
+
let output = content + (bottomContent ? `
|
269945
|
+
` + bottomContent : "");
|
269946
|
+
const promptLineUpDiff = Math.floor(rawPromptLine.length / width) - this.cursorPos.rows;
|
269947
|
+
const bottomContentHeight = promptLineUpDiff + (bottomContent ? height3(bottomContent) : 0);
|
269948
|
+
if (bottomContentHeight > 0)
|
269949
|
+
output += import_ansi_escapes3.default.cursorUp(bottomContentHeight);
|
269950
|
+
output += import_ansi_escapes3.default.cursorTo(this.cursorPos.cols);
|
269951
|
+
this.write(cursorDown3(this.extraLinesUnderPrompt) + import_ansi_escapes3.default.eraseLines(this.height) + output);
|
269952
|
+
this.extraLinesUnderPrompt = bottomContentHeight;
|
269953
|
+
this.height = height3(output);
|
269954
|
+
}
|
269955
|
+
checkCursorPos() {
|
269956
|
+
const cursorPos = this.rl.getCursorPos();
|
269957
|
+
if (cursorPos.cols !== this.cursorPos.cols) {
|
269958
|
+
this.write(import_ansi_escapes3.default.cursorTo(cursorPos.cols));
|
269959
|
+
this.cursorPos = cursorPos;
|
269960
|
+
}
|
269961
|
+
}
|
269962
|
+
done({ clearContent }) {
|
269963
|
+
this.rl.setPrompt("");
|
269964
|
+
let output = cursorDown3(this.extraLinesUnderPrompt);
|
269965
|
+
output += clearContent ? import_ansi_escapes3.default.eraseLines(this.height) : `
|
269966
|
+
`;
|
269967
|
+
output += import_ansi_escapes3.default.cursorShow;
|
269968
|
+
this.write(output);
|
269969
|
+
this.rl.close();
|
269970
|
+
}
|
269971
|
+
}
|
269972
|
+
|
269973
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/promise-polyfill.js
|
269974
|
+
class PromisePolyfill3 extends Promise {
|
269975
|
+
static withResolver() {
|
269976
|
+
let resolve5;
|
269977
|
+
let reject;
|
269978
|
+
const promise2 = new Promise((res, rej) => {
|
269979
|
+
resolve5 = res;
|
269980
|
+
reject = rej;
|
269981
|
+
});
|
269982
|
+
return { promise: promise2, resolve: resolve5, reject };
|
269983
|
+
}
|
269984
|
+
}
|
269985
|
+
|
269986
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
|
269987
|
+
function getCallSites3() {
|
269988
|
+
const _prepareStackTrace = Error.prepareStackTrace;
|
269989
|
+
let result = [];
|
269990
|
+
try {
|
269991
|
+
Error.prepareStackTrace = (_5, callSites) => {
|
269992
|
+
const callSitesWithoutCurrent = callSites.slice(1);
|
269993
|
+
result = callSitesWithoutCurrent;
|
269994
|
+
return callSitesWithoutCurrent;
|
269995
|
+
};
|
269996
|
+
new Error().stack;
|
269997
|
+
} catch {
|
269998
|
+
return result;
|
269999
|
+
}
|
270000
|
+
Error.prepareStackTrace = _prepareStackTrace;
|
270001
|
+
return result;
|
270002
|
+
}
|
270003
|
+
function createPrompt3(view) {
|
270004
|
+
const callSites = getCallSites3();
|
270005
|
+
const prompt = (config3, context = {}) => {
|
270006
|
+
const { input = process.stdin, signal } = context;
|
270007
|
+
const cleanups = new Set;
|
270008
|
+
const output = new import_mute_stream3.default;
|
270009
|
+
output.pipe(context.output ?? process.stdout);
|
270010
|
+
const rl = readline6.createInterface({
|
270011
|
+
terminal: true,
|
270012
|
+
input,
|
270013
|
+
output
|
270014
|
+
});
|
270015
|
+
const screen = new ScreenManager3(rl);
|
270016
|
+
const { promise: promise2, resolve: resolve5, reject } = PromisePolyfill3.withResolver();
|
270017
|
+
const cancel3 = () => reject(new CancelPromptError3);
|
270018
|
+
if (signal) {
|
270019
|
+
const abort = () => reject(new AbortPromptError3({ cause: signal.reason }));
|
270020
|
+
if (signal.aborted) {
|
270021
|
+
abort();
|
270022
|
+
return Object.assign(promise2, { cancel: cancel3 });
|
270023
|
+
}
|
270024
|
+
signal.addEventListener("abort", abort);
|
270025
|
+
cleanups.add(() => signal.removeEventListener("abort", abort));
|
270026
|
+
}
|
270027
|
+
cleanups.add(onExit((code2, signal2) => {
|
270028
|
+
reject(new ExitPromptError3(`User force closed the prompt with ${code2} ${signal2}`));
|
270029
|
+
}));
|
270030
|
+
const sigint = () => reject(new ExitPromptError3(`User force closed the prompt with SIGINT`));
|
270031
|
+
rl.on("SIGINT", sigint);
|
270032
|
+
cleanups.add(() => rl.removeListener("SIGINT", sigint));
|
270033
|
+
const checkCursorPos = () => screen.checkCursorPos();
|
270034
|
+
rl.input.on("keypress", checkCursorPos);
|
270035
|
+
cleanups.add(() => rl.input.removeListener("keypress", checkCursorPos));
|
270036
|
+
return withHooks3(rl, (cycle) => {
|
270037
|
+
const hooksCleanup = AsyncResource10.bind(() => effectScheduler3.clearAll());
|
270038
|
+
rl.on("close", hooksCleanup);
|
270039
|
+
cleanups.add(() => rl.removeListener("close", hooksCleanup));
|
270040
|
+
cycle(() => {
|
270041
|
+
try {
|
270042
|
+
const nextView = view(config3, (value4) => {
|
270043
|
+
setImmediate(() => resolve5(value4));
|
270044
|
+
});
|
270045
|
+
if (nextView === undefined) {
|
270046
|
+
const callerFilename = callSites[1]?.getFileName();
|
270047
|
+
throw new Error(`Prompt functions must return a string.
|
270048
|
+
at ${callerFilename}`);
|
270049
|
+
}
|
270050
|
+
const [content, bottomContent] = typeof nextView === "string" ? [nextView] : nextView;
|
270051
|
+
screen.render(content, bottomContent);
|
270052
|
+
effectScheduler3.run();
|
270053
|
+
} catch (error39) {
|
270054
|
+
reject(error39);
|
270055
|
+
}
|
270056
|
+
});
|
270057
|
+
return Object.assign(promise2.then((answer) => {
|
270058
|
+
effectScheduler3.clearAll();
|
270059
|
+
return answer;
|
270060
|
+
}, (error39) => {
|
270061
|
+
effectScheduler3.clearAll();
|
270062
|
+
throw error39;
|
270063
|
+
}).finally(() => {
|
270064
|
+
cleanups.forEach((cleanup) => cleanup());
|
270065
|
+
screen.done({ clearContent: Boolean(context.clearPromptOnDone) });
|
270066
|
+
output.end();
|
270067
|
+
}).then(() => promise2), { cancel: cancel3 });
|
270068
|
+
});
|
270069
|
+
};
|
270070
|
+
return prompt;
|
270071
|
+
}
|
270072
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/Separator.js
|
270073
|
+
var import_yoctocolors_cjs4 = __toESM(require_yoctocolors_cjs(), 1);
|
270074
|
+
class Separator {
|
270075
|
+
separator = import_yoctocolors_cjs4.default.dim(Array.from({ length: 15 }).join(esm_default2.line));
|
270076
|
+
type = "separator";
|
270077
|
+
constructor(separator) {
|
270078
|
+
if (separator) {
|
270079
|
+
this.separator = separator;
|
270080
|
+
}
|
270081
|
+
}
|
270082
|
+
static isSeparator(choice) {
|
270083
|
+
return Boolean(choice && typeof choice === "object" && "type" in choice && choice.type === "separator");
|
270084
|
+
}
|
270085
|
+
}
|
270086
|
+
// ../../node_modules/@inquirer/select/dist/esm/index.js
|
270087
|
+
var import_yoctocolors_cjs5 = __toESM(require_yoctocolors_cjs(), 1);
|
270088
|
+
var import_ansi_escapes4 = __toESM(require_ansi_escapes(), 1);
|
268765
270089
|
var selectTheme = {
|
268766
|
-
icon: { cursor:
|
270090
|
+
icon: { cursor: esm_default2.pointer },
|
268767
270091
|
style: {
|
268768
|
-
disabled: (text2) =>
|
268769
|
-
description: (text2) =>
|
270092
|
+
disabled: (text2) => import_yoctocolors_cjs5.default.dim(`- ${text2}`),
|
270093
|
+
description: (text2) => import_yoctocolors_cjs5.default.cyan(text2)
|
268770
270094
|
},
|
268771
270095
|
helpMode: "auto",
|
268772
270096
|
indexMode: "hidden"
|
@@ -268799,19 +270123,19 @@ function normalizeChoices(choices) {
|
|
268799
270123
|
return normalizedChoice;
|
268800
270124
|
});
|
268801
270125
|
}
|
268802
|
-
var
|
270126
|
+
var esm_default4 = createPrompt3((config3, done) => {
|
268803
270127
|
const { loop = true, pageSize = 7 } = config3;
|
268804
|
-
const firstRender =
|
268805
|
-
const theme =
|
268806
|
-
const [status, setStatus] =
|
268807
|
-
const prefix =
|
268808
|
-
const searchTimeoutRef =
|
270128
|
+
const firstRender = useRef3(true);
|
270129
|
+
const theme = makeTheme3(selectTheme, config3.theme);
|
270130
|
+
const [status, setStatus] = useState3("idle");
|
270131
|
+
const prefix = usePrefix3({ status, theme });
|
270132
|
+
const searchTimeoutRef = useRef3();
|
268809
270133
|
const items = useMemo(() => normalizeChoices(config3.choices), [config3.choices]);
|
268810
270134
|
const bounds = useMemo(() => {
|
268811
270135
|
const first = items.findIndex(isSelectable);
|
268812
270136
|
const last = items.findLastIndex(isSelectable);
|
268813
270137
|
if (first === -1) {
|
268814
|
-
throw new
|
270138
|
+
throw new ValidationError3("[select prompt] No selectable choices. All choices are disabled.");
|
268815
270139
|
}
|
268816
270140
|
return { first, last };
|
268817
270141
|
}, [items]);
|
@@ -268820,24 +270144,24 @@ var esm_default3 = createPrompt((config3, done) => {
|
|
268820
270144
|
return -1;
|
268821
270145
|
return items.findIndex((item) => isSelectable(item) && item.value === config3.default);
|
268822
270146
|
}, [config3.default, items]);
|
268823
|
-
const [active, setActive] =
|
270147
|
+
const [active, setActive] = useState3(defaultItemIndex === -1 ? bounds.first : defaultItemIndex);
|
268824
270148
|
const selectedChoice = items[active];
|
268825
|
-
|
270149
|
+
useKeypress3((key4, rl) => {
|
268826
270150
|
clearTimeout(searchTimeoutRef.current);
|
268827
|
-
if (
|
270151
|
+
if (isEnterKey3(key4)) {
|
268828
270152
|
setStatus("done");
|
268829
270153
|
done(selectedChoice.value);
|
268830
|
-
} else if (isUpKey(
|
270154
|
+
} else if (isUpKey(key4) || isDownKey(key4)) {
|
268831
270155
|
rl.clearLine(0);
|
268832
|
-
if (loop || isUpKey(
|
268833
|
-
const offset = isUpKey(
|
270156
|
+
if (loop || isUpKey(key4) && active !== bounds.first || isDownKey(key4) && active !== bounds.last) {
|
270157
|
+
const offset = isUpKey(key4) ? -1 : 1;
|
268834
270158
|
let next = active;
|
268835
270159
|
do {
|
268836
270160
|
next = (next + offset + items.length) % items.length;
|
268837
270161
|
} while (!isSelectable(items[next]));
|
268838
270162
|
setActive(next);
|
268839
270163
|
}
|
268840
|
-
} else if (isNumberKey(
|
270164
|
+
} else if (isNumberKey(key4) && !Number.isNaN(Number(rl.line))) {
|
268841
270165
|
const position = Number(rl.line) - 1;
|
268842
270166
|
const item = items[position];
|
268843
270167
|
if (item != null && isSelectable(item)) {
|
@@ -268846,7 +270170,7 @@ var esm_default3 = createPrompt((config3, done) => {
|
|
268846
270170
|
searchTimeoutRef.current = setTimeout(() => {
|
268847
270171
|
rl.clearLine(0);
|
268848
270172
|
}, 700);
|
268849
|
-
} else if (
|
270173
|
+
} else if (isBackspaceKey2(key4)) {
|
268850
270174
|
rl.clearLine(0);
|
268851
270175
|
} else {
|
268852
270176
|
const searchTerm = rl.line.toLowerCase();
|
@@ -268863,7 +270187,7 @@ var esm_default3 = createPrompt((config3, done) => {
|
|
268863
270187
|
}, 700);
|
268864
270188
|
}
|
268865
270189
|
});
|
268866
|
-
|
270190
|
+
useEffect3(() => () => {
|
268867
270191
|
clearTimeout(searchTimeoutRef.current);
|
268868
270192
|
}, []);
|
268869
270193
|
const message = theme.style.message(config3.message, status);
|
@@ -268903,7 +270227,7 @@ ${theme.style.help(`(${config3.instructions?.pager ?? "Use arrow keys to reveal
|
|
268903
270227
|
const choiceDescription = selectedChoice.description ? `
|
268904
270228
|
${theme.style.description(selectedChoice.description)}` : ``;
|
268905
270229
|
return `${[prefix, message, helpTipTop].filter(Boolean).join(" ")}
|
268906
|
-
${page}${helpTipBottom}${choiceDescription}${
|
270230
|
+
${page}${helpTipBottom}${choiceDescription}${import_ansi_escapes4.default.cursorHide}`;
|
268907
270231
|
});
|
268908
270232
|
|
268909
270233
|
// src/prompts/smart-contract-set/subgraph.prompt.ts
|
@@ -268957,7 +270281,7 @@ async function subgraphPrompt({
|
|
268957
270281
|
} else {
|
268958
270282
|
defaultChoice = env2.SETTLEMINT_THEGRAPH_DEFAULT_SUBGRAPH ?? subgraphNames[0];
|
268959
270283
|
}
|
268960
|
-
const subgraphName = choices.length === 1 && choices[0] === NEW ? NEW : await
|
270284
|
+
const subgraphName = choices.length === 1 && choices[0] === NEW ? NEW : await esm_default4({
|
268961
270285
|
message,
|
268962
270286
|
choices: choices.map((name3) => ({
|
268963
270287
|
name: name3,
|
@@ -270483,14 +271807,14 @@ function includesArgs(parameters) {
|
|
270483
271807
|
});
|
270484
271808
|
}
|
270485
271809
|
if (typeof args === "object" && !Array.isArray(args) && typeof matchArgs === "object" && !Array.isArray(matchArgs))
|
270486
|
-
return Object.entries(matchArgs).every(([
|
271810
|
+
return Object.entries(matchArgs).every(([key4, value4]) => {
|
270487
271811
|
if (value4 === null || value4 === undefined)
|
270488
271812
|
return true;
|
270489
|
-
const input = inputs.find((input2) => input2.name ===
|
271813
|
+
const input = inputs.find((input2) => input2.name === key4);
|
270490
271814
|
if (!input)
|
270491
271815
|
return false;
|
270492
271816
|
const value_ = Array.isArray(value4) ? value4 : [value4];
|
270493
|
-
return value_.some((value5) => isEqual(input, value5, args[
|
271817
|
+
return value_.some((value5) => isEqual(input, value5, args[key4]));
|
270494
271818
|
});
|
270495
271819
|
return false;
|
270496
271820
|
}
|
@@ -270686,13 +272010,13 @@ function observe(observerId, callbacks, fn) {
|
|
270686
272010
|
if (listeners && listeners.length > 0)
|
270687
272011
|
return unwatch;
|
270688
272012
|
const emit = {};
|
270689
|
-
for (const
|
270690
|
-
emit[
|
272013
|
+
for (const key4 in callbacks) {
|
272014
|
+
emit[key4] = (...args) => {
|
270691
272015
|
const listeners2 = getListeners();
|
270692
272016
|
if (listeners2.length === 0)
|
270693
272017
|
return;
|
270694
272018
|
for (const listener of listeners2)
|
270695
|
-
listener.fns[
|
272019
|
+
listener.fns[key4]?.(...args);
|
270696
272020
|
};
|
270697
272021
|
}
|
270698
272022
|
const cleanup = fn(emit);
|
@@ -271031,7 +272355,7 @@ function uid(length = 11) {
|
|
271031
272355
|
|
271032
272356
|
// ../../node_modules/viem/_esm/clients/createClient.js
|
271033
272357
|
function createClient(parameters) {
|
271034
|
-
const { batch, cacheTime = parameters.pollingInterval ?? 4000, ccipRead, key:
|
272358
|
+
const { batch, cacheTime = parameters.pollingInterval ?? 4000, ccipRead, key: key4 = "base", name: name3 = "Base Client", pollingInterval = 4000, type: type4 = "base" } = parameters;
|
271035
272359
|
const chain = parameters.chain;
|
271036
272360
|
const account = parameters.account ? parseAccount(parameters.account) : undefined;
|
271037
272361
|
const { config: config3, request: request2, value: value4 } = parameters.transport({
|
@@ -271045,7 +272369,7 @@ function createClient(parameters) {
|
|
271045
272369
|
cacheTime,
|
271046
272370
|
ccipRead,
|
271047
272371
|
chain,
|
271048
|
-
key:
|
272372
|
+
key: key4,
|
271049
272373
|
name: name3,
|
271050
272374
|
pollingInterval,
|
271051
272375
|
request: request2,
|
@@ -271056,8 +272380,8 @@ function createClient(parameters) {
|
|
271056
272380
|
function extend2(base2) {
|
271057
272381
|
return (extendFn) => {
|
271058
272382
|
const extended = extendFn(base2);
|
271059
|
-
for (const
|
271060
|
-
delete extended[
|
272383
|
+
for (const key5 in client)
|
272384
|
+
delete extended[key5];
|
271061
272385
|
const combined = { ...base2, ...extended };
|
271062
272386
|
return Object.assign(combined, { extend: extend2(combined) });
|
271063
272387
|
};
|
@@ -271237,11 +272561,11 @@ function shouldRetry(error39) {
|
|
271237
272561
|
}
|
271238
272562
|
|
271239
272563
|
// ../../node_modules/viem/_esm/clients/transports/createTransport.js
|
271240
|
-
function createTransport({ key:
|
272564
|
+
function createTransport({ key: key4, methods, name: name3, request: request2, retryCount = 3, retryDelay = 150, timeout, type: type4 }, value4) {
|
271241
272565
|
const uid2 = uid();
|
271242
272566
|
return {
|
271243
272567
|
config: {
|
271244
|
-
key:
|
272568
|
+
key: key4,
|
271245
272569
|
methods,
|
271246
272570
|
name: name3,
|
271247
272571
|
request: request2,
|
@@ -271398,7 +272722,7 @@ function getHttpRpcClient(url2, options = {}) {
|
|
271398
272722
|
|
271399
272723
|
// ../../node_modules/viem/_esm/clients/transports/http.js
|
271400
272724
|
function http(url2, config3 = {}) {
|
271401
|
-
const { batch, fetchOptions, key:
|
272725
|
+
const { batch, fetchOptions, key: key4 = "http", methods, name: name3 = "HTTP JSON-RPC", onFetchRequest, onFetchResponse, retryDelay, raw } = config3;
|
271402
272726
|
return ({ chain, retryCount: retryCount_, timeout: timeout_ }) => {
|
271403
272727
|
const { batchSize = 1000, wait: wait2 = 0 } = typeof batch === "object" ? batch : {};
|
271404
272728
|
const retryCount = config3.retryCount ?? retryCount_;
|
@@ -271413,7 +272737,7 @@ function http(url2, config3 = {}) {
|
|
271413
272737
|
timeout
|
271414
272738
|
});
|
271415
272739
|
return createTransport({
|
271416
|
-
key:
|
272740
|
+
key: key4,
|
271417
272741
|
methods,
|
271418
272742
|
name: name3,
|
271419
272743
|
async request({ method, params }) {
|
@@ -271864,7 +273188,7 @@ init_getChainContractAddress();
|
|
271864
273188
|
init_toHex();
|
271865
273189
|
init_localBatchGatewayRequest();
|
271866
273190
|
async function getEnsText(client, parameters) {
|
271867
|
-
const { blockNumber, blockTag, key:
|
273191
|
+
const { blockNumber, blockTag, key: key4, name: name3, gatewayUrls, strict } = parameters;
|
271868
273192
|
const { chain } = client;
|
271869
273193
|
const universalResolverAddress = (() => {
|
271870
273194
|
if (parameters.universalResolverAddress)
|
@@ -271890,7 +273214,7 @@ async function getEnsText(client, parameters) {
|
|
271890
273214
|
encodeFunctionData({
|
271891
273215
|
abi: textResolverAbi,
|
271892
273216
|
functionName: "text",
|
271893
|
-
args: [namehash(name3),
|
273217
|
+
args: [namehash(name3), key4]
|
271894
273218
|
}),
|
271895
273219
|
gatewayUrls ?? [localBatchGatewayUrl]
|
271896
273220
|
],
|
@@ -272912,16 +274236,16 @@ class LruMap2 extends Map {
|
|
272912
274236
|
});
|
272913
274237
|
this.maxSize = size5;
|
272914
274238
|
}
|
272915
|
-
get(
|
272916
|
-
const value4 = super.get(
|
272917
|
-
if (super.has(
|
272918
|
-
this.delete(
|
272919
|
-
super.set(
|
274239
|
+
get(key4) {
|
274240
|
+
const value4 = super.get(key4);
|
274241
|
+
if (super.has(key4) && value4 !== undefined) {
|
274242
|
+
this.delete(key4);
|
274243
|
+
super.set(key4, value4);
|
272920
274244
|
}
|
272921
274245
|
return value4;
|
272922
274246
|
}
|
272923
|
-
set(
|
272924
|
-
super.set(
|
274247
|
+
set(key4, value4) {
|
274248
|
+
super.set(key4, value4);
|
272925
274249
|
if (this.maxSize && this.size > this.maxSize) {
|
272926
274250
|
const firstKey = this.keys().next().value;
|
272927
274251
|
if (firstKey)
|
@@ -274767,10 +276091,10 @@ function publicActions(client) {
|
|
274767
276091
|
|
274768
276092
|
// ../../node_modules/viem/_esm/clients/createPublicClient.js
|
274769
276093
|
function createPublicClient(parameters) {
|
274770
|
-
const { key:
|
276094
|
+
const { key: key4 = "public", name: name3 = "Public Client" } = parameters;
|
274771
276095
|
const client = createClient({
|
274772
276096
|
...parameters,
|
274773
|
-
key:
|
276097
|
+
key: key4,
|
274774
276098
|
name: name3,
|
274775
276099
|
type: "publicClient"
|
274776
276100
|
});
|
@@ -274942,19 +276266,19 @@ function getBooleanValue(value4, defaultValue) {
|
|
274942
276266
|
function boolToString(value4) {
|
274943
276267
|
return value4 ? "Yes" : "No";
|
274944
276268
|
}
|
274945
|
-
var
|
276269
|
+
var esm_default5 = createPrompt((config3, done) => {
|
274946
276270
|
const { transformer = boolToString } = config3;
|
274947
276271
|
const [status, setStatus] = useState("idle");
|
274948
276272
|
const [value4, setValue] = useState("");
|
274949
276273
|
const theme = makeTheme(config3.theme);
|
274950
276274
|
const prefix = usePrefix({ status, theme });
|
274951
|
-
useKeypress((
|
274952
|
-
if (isEnterKey(
|
276275
|
+
useKeypress((key4, rl) => {
|
276276
|
+
if (isEnterKey(key4)) {
|
274953
276277
|
const answer = getBooleanValue(value4, config3.default);
|
274954
276278
|
setValue(transformer(answer));
|
274955
276279
|
setStatus("done");
|
274956
276280
|
done(answer);
|
274957
|
-
} else if (
|
276281
|
+
} else if (key4.name === "tab") {
|
274958
276282
|
const answer = boolToString(!getBooleanValue(value4, config3.default));
|
274959
276283
|
rl.clearLine(0);
|
274960
276284
|
rl.write(answer);
|
@@ -274974,20 +276298,476 @@ var esm_default4 = createPrompt((config3, done) => {
|
|
274974
276298
|
return `${prefix} ${message}${defaultValue} ${formattedValue}`;
|
274975
276299
|
});
|
274976
276300
|
|
276301
|
+
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/key.js
|
276302
|
+
var isEnterKey4 = (key4) => key4.name === "enter" || key4.name === "return";
|
276303
|
+
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/errors.js
|
276304
|
+
class AbortPromptError4 extends Error {
|
276305
|
+
name = "AbortPromptError";
|
276306
|
+
message = "Prompt was aborted";
|
276307
|
+
constructor(options) {
|
276308
|
+
super();
|
276309
|
+
this.cause = options?.cause;
|
276310
|
+
}
|
276311
|
+
}
|
276312
|
+
|
276313
|
+
class CancelPromptError4 extends Error {
|
276314
|
+
name = "CancelPromptError";
|
276315
|
+
message = "Prompt was canceled";
|
276316
|
+
}
|
276317
|
+
|
276318
|
+
class ExitPromptError4 extends Error {
|
276319
|
+
name = "ExitPromptError";
|
276320
|
+
}
|
276321
|
+
|
276322
|
+
class HookError4 extends Error {
|
276323
|
+
name = "HookError";
|
276324
|
+
}
|
276325
|
+
|
276326
|
+
class ValidationError4 extends Error {
|
276327
|
+
name = "ValidationError";
|
276328
|
+
}
|
276329
|
+
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/use-prefix.js
|
276330
|
+
import { AsyncResource as AsyncResource12 } from "node:async_hooks";
|
276331
|
+
|
276332
|
+
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/hook-engine.js
|
276333
|
+
import { AsyncLocalStorage as AsyncLocalStorage4, AsyncResource as AsyncResource11 } from "node:async_hooks";
|
276334
|
+
var hookStorage4 = new AsyncLocalStorage4;
|
276335
|
+
function createStore4(rl) {
|
276336
|
+
const store = {
|
276337
|
+
rl,
|
276338
|
+
hooks: [],
|
276339
|
+
hooksCleanup: [],
|
276340
|
+
hooksEffect: [],
|
276341
|
+
index: 0,
|
276342
|
+
handleChange() {}
|
276343
|
+
};
|
276344
|
+
return store;
|
276345
|
+
}
|
276346
|
+
function withHooks4(rl, cb) {
|
276347
|
+
const store = createStore4(rl);
|
276348
|
+
return hookStorage4.run(store, () => {
|
276349
|
+
function cycle(render) {
|
276350
|
+
store.handleChange = () => {
|
276351
|
+
store.index = 0;
|
276352
|
+
render();
|
276353
|
+
};
|
276354
|
+
store.handleChange();
|
276355
|
+
}
|
276356
|
+
return cb(cycle);
|
276357
|
+
});
|
276358
|
+
}
|
276359
|
+
function getStore4() {
|
276360
|
+
const store = hookStorage4.getStore();
|
276361
|
+
if (!store) {
|
276362
|
+
throw new HookError4("[Inquirer] Hook functions can only be called from within a prompt");
|
276363
|
+
}
|
276364
|
+
return store;
|
276365
|
+
}
|
276366
|
+
function readline7() {
|
276367
|
+
return getStore4().rl;
|
276368
|
+
}
|
276369
|
+
function withUpdates4(fn) {
|
276370
|
+
const wrapped = (...args) => {
|
276371
|
+
const store = getStore4();
|
276372
|
+
let shouldUpdate = false;
|
276373
|
+
const oldHandleChange = store.handleChange;
|
276374
|
+
store.handleChange = () => {
|
276375
|
+
shouldUpdate = true;
|
276376
|
+
};
|
276377
|
+
const returnValue = fn(...args);
|
276378
|
+
if (shouldUpdate) {
|
276379
|
+
oldHandleChange();
|
276380
|
+
}
|
276381
|
+
store.handleChange = oldHandleChange;
|
276382
|
+
return returnValue;
|
276383
|
+
};
|
276384
|
+
return AsyncResource11.bind(wrapped);
|
276385
|
+
}
|
276386
|
+
function withPointer4(cb) {
|
276387
|
+
const store = getStore4();
|
276388
|
+
const { index: index2 } = store;
|
276389
|
+
const pointer = {
|
276390
|
+
get() {
|
276391
|
+
return store.hooks[index2];
|
276392
|
+
},
|
276393
|
+
set(value4) {
|
276394
|
+
store.hooks[index2] = value4;
|
276395
|
+
},
|
276396
|
+
initialized: index2 in store.hooks
|
276397
|
+
};
|
276398
|
+
const returnValue = cb(pointer);
|
276399
|
+
store.index++;
|
276400
|
+
return returnValue;
|
276401
|
+
}
|
276402
|
+
function handleChange4() {
|
276403
|
+
getStore4().handleChange();
|
276404
|
+
}
|
276405
|
+
var effectScheduler4 = {
|
276406
|
+
queue(cb) {
|
276407
|
+
const store = getStore4();
|
276408
|
+
const { index: index2 } = store;
|
276409
|
+
store.hooksEffect.push(() => {
|
276410
|
+
store.hooksCleanup[index2]?.();
|
276411
|
+
const cleanFn = cb(readline7());
|
276412
|
+
if (cleanFn != null && typeof cleanFn !== "function") {
|
276413
|
+
throw new ValidationError4("useEffect return value must be a cleanup function or nothing.");
|
276414
|
+
}
|
276415
|
+
store.hooksCleanup[index2] = cleanFn;
|
276416
|
+
});
|
276417
|
+
},
|
276418
|
+
run() {
|
276419
|
+
const store = getStore4();
|
276420
|
+
withUpdates4(() => {
|
276421
|
+
store.hooksEffect.forEach((effect) => {
|
276422
|
+
effect();
|
276423
|
+
});
|
276424
|
+
store.hooksEffect.length = 0;
|
276425
|
+
})();
|
276426
|
+
},
|
276427
|
+
clearAll() {
|
276428
|
+
const store = getStore4();
|
276429
|
+
store.hooksCleanup.forEach((cleanFn) => {
|
276430
|
+
cleanFn?.();
|
276431
|
+
});
|
276432
|
+
store.hooksEffect.length = 0;
|
276433
|
+
store.hooksCleanup.length = 0;
|
276434
|
+
}
|
276435
|
+
};
|
276436
|
+
|
276437
|
+
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/use-state.js
|
276438
|
+
function useState4(defaultValue) {
|
276439
|
+
return withPointer4((pointer) => {
|
276440
|
+
const setFn = (newValue) => {
|
276441
|
+
if (pointer.get() !== newValue) {
|
276442
|
+
pointer.set(newValue);
|
276443
|
+
handleChange4();
|
276444
|
+
}
|
276445
|
+
};
|
276446
|
+
if (pointer.initialized) {
|
276447
|
+
return [pointer.get(), setFn];
|
276448
|
+
}
|
276449
|
+
const value4 = typeof defaultValue === "function" ? defaultValue() : defaultValue;
|
276450
|
+
pointer.set(value4);
|
276451
|
+
return [value4, setFn];
|
276452
|
+
});
|
276453
|
+
}
|
276454
|
+
|
276455
|
+
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/use-effect.js
|
276456
|
+
function useEffect4(cb, depArray) {
|
276457
|
+
withPointer4((pointer) => {
|
276458
|
+
const oldDeps = pointer.get();
|
276459
|
+
const hasChanged = !Array.isArray(oldDeps) || depArray.some((dep, i6) => !Object.is(dep, oldDeps[i6]));
|
276460
|
+
if (hasChanged) {
|
276461
|
+
effectScheduler4.queue(cb);
|
276462
|
+
}
|
276463
|
+
pointer.set(depArray);
|
276464
|
+
});
|
276465
|
+
}
|
276466
|
+
|
276467
|
+
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/theme.js
|
276468
|
+
var import_yoctocolors_cjs6 = __toESM(require_yoctocolors_cjs(), 1);
|
276469
|
+
var defaultTheme4 = {
|
276470
|
+
prefix: {
|
276471
|
+
idle: import_yoctocolors_cjs6.default.blue("?"),
|
276472
|
+
done: import_yoctocolors_cjs6.default.green(esm_default2.tick)
|
276473
|
+
},
|
276474
|
+
spinner: {
|
276475
|
+
interval: 80,
|
276476
|
+
frames: ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"].map((frame) => import_yoctocolors_cjs6.default.yellow(frame))
|
276477
|
+
},
|
276478
|
+
style: {
|
276479
|
+
answer: import_yoctocolors_cjs6.default.cyan,
|
276480
|
+
message: import_yoctocolors_cjs6.default.bold,
|
276481
|
+
error: (text2) => import_yoctocolors_cjs6.default.red(`> ${text2}`),
|
276482
|
+
defaultAnswer: (text2) => import_yoctocolors_cjs6.default.dim(`(${text2})`),
|
276483
|
+
help: import_yoctocolors_cjs6.default.dim,
|
276484
|
+
highlight: import_yoctocolors_cjs6.default.cyan,
|
276485
|
+
key: (text2) => import_yoctocolors_cjs6.default.cyan(import_yoctocolors_cjs6.default.bold(`<${text2}>`))
|
276486
|
+
}
|
276487
|
+
};
|
276488
|
+
|
276489
|
+
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/make-theme.js
|
276490
|
+
function isPlainObject6(value4) {
|
276491
|
+
if (typeof value4 !== "object" || value4 === null)
|
276492
|
+
return false;
|
276493
|
+
let proto = value4;
|
276494
|
+
while (Object.getPrototypeOf(proto) !== null) {
|
276495
|
+
proto = Object.getPrototypeOf(proto);
|
276496
|
+
}
|
276497
|
+
return Object.getPrototypeOf(value4) === proto;
|
276498
|
+
}
|
276499
|
+
function deepMerge5(...objects) {
|
276500
|
+
const output = {};
|
276501
|
+
for (const obj of objects) {
|
276502
|
+
for (const [key4, value4] of Object.entries(obj)) {
|
276503
|
+
const prevValue = output[key4];
|
276504
|
+
output[key4] = isPlainObject6(prevValue) && isPlainObject6(value4) ? deepMerge5(prevValue, value4) : value4;
|
276505
|
+
}
|
276506
|
+
}
|
276507
|
+
return output;
|
276508
|
+
}
|
276509
|
+
function makeTheme4(...themes) {
|
276510
|
+
const themesToMerge = [
|
276511
|
+
defaultTheme4,
|
276512
|
+
...themes.filter((theme) => theme != null)
|
276513
|
+
];
|
276514
|
+
return deepMerge5(...themesToMerge);
|
276515
|
+
}
|
276516
|
+
|
276517
|
+
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/use-prefix.js
|
276518
|
+
function usePrefix4({ status = "idle", theme }) {
|
276519
|
+
const [showLoader, setShowLoader] = useState4(false);
|
276520
|
+
const [tick, setTick] = useState4(0);
|
276521
|
+
const { prefix, spinner: spinner2 } = makeTheme4(theme);
|
276522
|
+
useEffect4(() => {
|
276523
|
+
if (status === "loading") {
|
276524
|
+
let tickInterval;
|
276525
|
+
let inc = -1;
|
276526
|
+
const delayTimeout = setTimeout(AsyncResource12.bind(() => {
|
276527
|
+
setShowLoader(true);
|
276528
|
+
tickInterval = setInterval(AsyncResource12.bind(() => {
|
276529
|
+
inc = inc + 1;
|
276530
|
+
setTick(inc % spinner2.frames.length);
|
276531
|
+
}), spinner2.interval);
|
276532
|
+
}), 300);
|
276533
|
+
return () => {
|
276534
|
+
clearTimeout(delayTimeout);
|
276535
|
+
clearInterval(tickInterval);
|
276536
|
+
};
|
276537
|
+
} else {
|
276538
|
+
setShowLoader(false);
|
276539
|
+
}
|
276540
|
+
}, [status]);
|
276541
|
+
if (showLoader) {
|
276542
|
+
return spinner2.frames[tick];
|
276543
|
+
}
|
276544
|
+
const iconName = status === "loading" ? "idle" : status;
|
276545
|
+
return typeof prefix === "string" ? prefix : prefix[iconName] ?? prefix["idle"];
|
276546
|
+
}
|
276547
|
+
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/use-ref.js
|
276548
|
+
function useRef4(val) {
|
276549
|
+
return useState4({ current: val })[0];
|
276550
|
+
}
|
276551
|
+
|
276552
|
+
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/use-keypress.js
|
276553
|
+
function useKeypress4(userHandler) {
|
276554
|
+
const signal = useRef4(userHandler);
|
276555
|
+
signal.current = userHandler;
|
276556
|
+
useEffect4((rl) => {
|
276557
|
+
let ignore = false;
|
276558
|
+
const handler = withUpdates4((_input, event) => {
|
276559
|
+
if (ignore)
|
276560
|
+
return;
|
276561
|
+
signal.current(event, rl);
|
276562
|
+
});
|
276563
|
+
rl.input.on("keypress", handler);
|
276564
|
+
return () => {
|
276565
|
+
ignore = true;
|
276566
|
+
rl.input.removeListener("keypress", handler);
|
276567
|
+
};
|
276568
|
+
}, []);
|
276569
|
+
}
|
276570
|
+
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/utils.js
|
276571
|
+
var import_cli_width4 = __toESM(require_cli_width(), 1);
|
276572
|
+
var import_wrap_ansi4 = __toESM(require_wrap_ansi(), 1);
|
276573
|
+
function breakLines4(content, width) {
|
276574
|
+
return content.split(`
|
276575
|
+
`).flatMap((line) => import_wrap_ansi4.default(line, width, { trim: false, hard: true }).split(`
|
276576
|
+
`).map((str) => str.trimEnd())).join(`
|
276577
|
+
`);
|
276578
|
+
}
|
276579
|
+
function readlineWidth4() {
|
276580
|
+
return import_cli_width4.default({ defaultWidth: 80, output: readline7().output });
|
276581
|
+
}
|
276582
|
+
|
276583
|
+
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
|
276584
|
+
var import_mute_stream4 = __toESM(require_lib(), 1);
|
276585
|
+
import * as readline8 from "node:readline";
|
276586
|
+
import { AsyncResource as AsyncResource13 } from "node:async_hooks";
|
276587
|
+
|
276588
|
+
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/screen-manager.js
|
276589
|
+
var import_ansi_escapes5 = __toESM(require_ansi_escapes(), 1);
|
276590
|
+
import { stripVTControlCharacters as stripVTControlCharacters5 } from "node:util";
|
276591
|
+
var height4 = (content) => content.split(`
|
276592
|
+
`).length;
|
276593
|
+
var lastLine4 = (content) => content.split(`
|
276594
|
+
`).pop() ?? "";
|
276595
|
+
function cursorDown4(n6) {
|
276596
|
+
return n6 > 0 ? import_ansi_escapes5.default.cursorDown(n6) : "";
|
276597
|
+
}
|
276598
|
+
|
276599
|
+
class ScreenManager4 {
|
276600
|
+
height = 0;
|
276601
|
+
extraLinesUnderPrompt = 0;
|
276602
|
+
cursorPos;
|
276603
|
+
rl;
|
276604
|
+
constructor(rl) {
|
276605
|
+
this.rl = rl;
|
276606
|
+
this.cursorPos = rl.getCursorPos();
|
276607
|
+
}
|
276608
|
+
write(content) {
|
276609
|
+
this.rl.output.unmute();
|
276610
|
+
this.rl.output.write(content);
|
276611
|
+
this.rl.output.mute();
|
276612
|
+
}
|
276613
|
+
render(content, bottomContent = "") {
|
276614
|
+
const promptLine = lastLine4(content);
|
276615
|
+
const rawPromptLine = stripVTControlCharacters5(promptLine);
|
276616
|
+
let prompt = rawPromptLine;
|
276617
|
+
if (this.rl.line.length > 0) {
|
276618
|
+
prompt = prompt.slice(0, -this.rl.line.length);
|
276619
|
+
}
|
276620
|
+
this.rl.setPrompt(prompt);
|
276621
|
+
this.cursorPos = this.rl.getCursorPos();
|
276622
|
+
const width = readlineWidth4();
|
276623
|
+
content = breakLines4(content, width);
|
276624
|
+
bottomContent = breakLines4(bottomContent, width);
|
276625
|
+
if (rawPromptLine.length % width === 0) {
|
276626
|
+
content += `
|
276627
|
+
`;
|
276628
|
+
}
|
276629
|
+
let output = content + (bottomContent ? `
|
276630
|
+
` + bottomContent : "");
|
276631
|
+
const promptLineUpDiff = Math.floor(rawPromptLine.length / width) - this.cursorPos.rows;
|
276632
|
+
const bottomContentHeight = promptLineUpDiff + (bottomContent ? height4(bottomContent) : 0);
|
276633
|
+
if (bottomContentHeight > 0)
|
276634
|
+
output += import_ansi_escapes5.default.cursorUp(bottomContentHeight);
|
276635
|
+
output += import_ansi_escapes5.default.cursorTo(this.cursorPos.cols);
|
276636
|
+
this.write(cursorDown4(this.extraLinesUnderPrompt) + import_ansi_escapes5.default.eraseLines(this.height) + output);
|
276637
|
+
this.extraLinesUnderPrompt = bottomContentHeight;
|
276638
|
+
this.height = height4(output);
|
276639
|
+
}
|
276640
|
+
checkCursorPos() {
|
276641
|
+
const cursorPos = this.rl.getCursorPos();
|
276642
|
+
if (cursorPos.cols !== this.cursorPos.cols) {
|
276643
|
+
this.write(import_ansi_escapes5.default.cursorTo(cursorPos.cols));
|
276644
|
+
this.cursorPos = cursorPos;
|
276645
|
+
}
|
276646
|
+
}
|
276647
|
+
done({ clearContent }) {
|
276648
|
+
this.rl.setPrompt("");
|
276649
|
+
let output = cursorDown4(this.extraLinesUnderPrompt);
|
276650
|
+
output += clearContent ? import_ansi_escapes5.default.eraseLines(this.height) : `
|
276651
|
+
`;
|
276652
|
+
output += import_ansi_escapes5.default.cursorShow;
|
276653
|
+
this.write(output);
|
276654
|
+
this.rl.close();
|
276655
|
+
}
|
276656
|
+
}
|
276657
|
+
|
276658
|
+
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/promise-polyfill.js
|
276659
|
+
class PromisePolyfill4 extends Promise {
|
276660
|
+
static withResolver() {
|
276661
|
+
let resolve6;
|
276662
|
+
let reject;
|
276663
|
+
const promise2 = new Promise((res, rej) => {
|
276664
|
+
resolve6 = res;
|
276665
|
+
reject = rej;
|
276666
|
+
});
|
276667
|
+
return { promise: promise2, resolve: resolve6, reject };
|
276668
|
+
}
|
276669
|
+
}
|
276670
|
+
|
276671
|
+
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
|
276672
|
+
function getCallSites4() {
|
276673
|
+
const _prepareStackTrace = Error.prepareStackTrace;
|
276674
|
+
let result = [];
|
276675
|
+
try {
|
276676
|
+
Error.prepareStackTrace = (_5, callSites) => {
|
276677
|
+
const callSitesWithoutCurrent = callSites.slice(1);
|
276678
|
+
result = callSitesWithoutCurrent;
|
276679
|
+
return callSitesWithoutCurrent;
|
276680
|
+
};
|
276681
|
+
new Error().stack;
|
276682
|
+
} catch {
|
276683
|
+
return result;
|
276684
|
+
}
|
276685
|
+
Error.prepareStackTrace = _prepareStackTrace;
|
276686
|
+
return result;
|
276687
|
+
}
|
276688
|
+
function createPrompt4(view) {
|
276689
|
+
const callSites = getCallSites4();
|
276690
|
+
const prompt = (config3, context = {}) => {
|
276691
|
+
const { input = process.stdin, signal } = context;
|
276692
|
+
const cleanups = new Set;
|
276693
|
+
const output = new import_mute_stream4.default;
|
276694
|
+
output.pipe(context.output ?? process.stdout);
|
276695
|
+
const rl = readline8.createInterface({
|
276696
|
+
terminal: true,
|
276697
|
+
input,
|
276698
|
+
output
|
276699
|
+
});
|
276700
|
+
const screen = new ScreenManager4(rl);
|
276701
|
+
const { promise: promise2, resolve: resolve6, reject } = PromisePolyfill4.withResolver();
|
276702
|
+
const cancel3 = () => reject(new CancelPromptError4);
|
276703
|
+
if (signal) {
|
276704
|
+
const abort = () => reject(new AbortPromptError4({ cause: signal.reason }));
|
276705
|
+
if (signal.aborted) {
|
276706
|
+
abort();
|
276707
|
+
return Object.assign(promise2, { cancel: cancel3 });
|
276708
|
+
}
|
276709
|
+
signal.addEventListener("abort", abort);
|
276710
|
+
cleanups.add(() => signal.removeEventListener("abort", abort));
|
276711
|
+
}
|
276712
|
+
cleanups.add(onExit((code2, signal2) => {
|
276713
|
+
reject(new ExitPromptError4(`User force closed the prompt with ${code2} ${signal2}`));
|
276714
|
+
}));
|
276715
|
+
const sigint = () => reject(new ExitPromptError4(`User force closed the prompt with SIGINT`));
|
276716
|
+
rl.on("SIGINT", sigint);
|
276717
|
+
cleanups.add(() => rl.removeListener("SIGINT", sigint));
|
276718
|
+
const checkCursorPos = () => screen.checkCursorPos();
|
276719
|
+
rl.input.on("keypress", checkCursorPos);
|
276720
|
+
cleanups.add(() => rl.input.removeListener("keypress", checkCursorPos));
|
276721
|
+
return withHooks4(rl, (cycle) => {
|
276722
|
+
const hooksCleanup = AsyncResource13.bind(() => effectScheduler4.clearAll());
|
276723
|
+
rl.on("close", hooksCleanup);
|
276724
|
+
cleanups.add(() => rl.removeListener("close", hooksCleanup));
|
276725
|
+
cycle(() => {
|
276726
|
+
try {
|
276727
|
+
const nextView = view(config3, (value4) => {
|
276728
|
+
setImmediate(() => resolve6(value4));
|
276729
|
+
});
|
276730
|
+
if (nextView === undefined) {
|
276731
|
+
const callerFilename = callSites[1]?.getFileName();
|
276732
|
+
throw new Error(`Prompt functions must return a string.
|
276733
|
+
at ${callerFilename}`);
|
276734
|
+
}
|
276735
|
+
const [content, bottomContent] = typeof nextView === "string" ? [nextView] : nextView;
|
276736
|
+
screen.render(content, bottomContent);
|
276737
|
+
effectScheduler4.run();
|
276738
|
+
} catch (error39) {
|
276739
|
+
reject(error39);
|
276740
|
+
}
|
276741
|
+
});
|
276742
|
+
return Object.assign(promise2.then((answer) => {
|
276743
|
+
effectScheduler4.clearAll();
|
276744
|
+
return answer;
|
276745
|
+
}, (error39) => {
|
276746
|
+
effectScheduler4.clearAll();
|
276747
|
+
throw error39;
|
276748
|
+
}).finally(() => {
|
276749
|
+
cleanups.forEach((cleanup) => cleanup());
|
276750
|
+
screen.done({ clearContent: Boolean(context.clearPromptOnDone) });
|
276751
|
+
output.end();
|
276752
|
+
}).then(() => promise2), { cancel: cancel3 });
|
276753
|
+
});
|
276754
|
+
};
|
276755
|
+
return prompt;
|
276756
|
+
}
|
274977
276757
|
// ../../node_modules/@inquirer/password/dist/esm/index.js
|
274978
|
-
var
|
274979
|
-
var
|
276758
|
+
var import_ansi_escapes6 = __toESM(require_ansi_escapes(), 1);
|
276759
|
+
var esm_default6 = createPrompt4((config3, done) => {
|
274980
276760
|
const { validate: validate5 = () => true } = config3;
|
274981
|
-
const theme =
|
274982
|
-
const [status, setStatus] =
|
274983
|
-
const [errorMsg, setError] =
|
274984
|
-
const [value4, setValue] =
|
274985
|
-
const prefix =
|
274986
|
-
|
276761
|
+
const theme = makeTheme4(config3.theme);
|
276762
|
+
const [status, setStatus] = useState4("idle");
|
276763
|
+
const [errorMsg, setError] = useState4();
|
276764
|
+
const [value4, setValue] = useState4("");
|
276765
|
+
const prefix = usePrefix4({ status, theme });
|
276766
|
+
useKeypress4(async (key5, rl) => {
|
274987
276767
|
if (status !== "idle") {
|
274988
276768
|
return;
|
274989
276769
|
}
|
274990
|
-
if (
|
276770
|
+
if (isEnterKey4(key5)) {
|
274991
276771
|
const answer = value4;
|
274992
276772
|
setStatus("loading");
|
274993
276773
|
const isValid = await validate5(answer);
|
@@ -275012,7 +276792,7 @@ var esm_default5 = createPrompt((config3, done) => {
|
|
275012
276792
|
const maskChar = typeof config3.mask === "string" ? config3.mask : "*";
|
275013
276793
|
formattedValue = maskChar.repeat(value4.length);
|
275014
276794
|
} else if (status !== "done") {
|
275015
|
-
helpTip = `${theme.style.help("[input is masked]")}${
|
276795
|
+
helpTip = `${theme.style.help("[input is masked]")}${import_ansi_escapes6.default.cursorHide}`;
|
275016
276796
|
}
|
275017
276797
|
if (status === "done") {
|
275018
276798
|
formattedValue = theme.style.answer(formattedValue);
|
@@ -275034,7 +276814,7 @@ async function applicationAccessTokenPrompt(env2, application, settlemint, accep
|
|
275034
276814
|
return defaultAccessToken;
|
275035
276815
|
}
|
275036
276816
|
if (defaultAccessToken) {
|
275037
|
-
const keep = await
|
276817
|
+
const keep = await esm_default5({
|
275038
276818
|
message: "Do you want to use the existing application access token?",
|
275039
276819
|
default: true
|
275040
276820
|
});
|
@@ -275042,12 +276822,12 @@ async function applicationAccessTokenPrompt(env2, application, settlemint, accep
|
|
275042
276822
|
return defaultAccessToken;
|
275043
276823
|
}
|
275044
276824
|
}
|
275045
|
-
const create2 = await
|
276825
|
+
const create2 = await esm_default5({
|
275046
276826
|
message: "Do you want to create a new application access token?",
|
275047
276827
|
default: false
|
275048
276828
|
});
|
275049
276829
|
if (create2) {
|
275050
|
-
const name3 = await
|
276830
|
+
const name3 = await esm_default3({
|
275051
276831
|
message: "How would you like to name this application access token?",
|
275052
276832
|
default: `SettleMint CLI (${Date.now()}${process.env.USER ? ` ${process.env.USER}` : ""})`,
|
275053
276833
|
required: true,
|
@@ -275110,7 +276890,7 @@ async function applicationAccessTokenPrompt(env2, application, settlemint, accep
|
|
275110
276890
|
return aat;
|
275111
276891
|
} catch (error39) {}
|
275112
276892
|
}
|
275113
|
-
return
|
276893
|
+
return esm_default6({
|
275114
276894
|
message: "What is the application access token for your application in SettleMint? (format: sm_aat_...)",
|
275115
276895
|
validate(value4) {
|
275116
276896
|
try {
|
@@ -275142,7 +276922,7 @@ async function applicationPrompt(env2, applications, accept) {
|
|
275142
276922
|
if (is_in_ci_default) {
|
275143
276923
|
nothingSelectedError("application");
|
275144
276924
|
}
|
275145
|
-
const application = await
|
276925
|
+
const application = await esm_default4({
|
275146
276926
|
message: "Which application do you want to connect to?",
|
275147
276927
|
choices: applications.map((applications2) => ({
|
275148
276928
|
name: `${applications2.name} (${applications2.uniqueName})`,
|
@@ -275245,7 +277025,7 @@ async function blockchainNodeOrLoadBalancerPrompt({
|
|
275245
277025
|
isRequired,
|
275246
277026
|
defaultHandler: async ({ defaultService: defaultNode, choices }) => {
|
275247
277027
|
const filteredChoices = filterRunningOnly ? choices.filter(({ value: node }) => isRunning(node)) : choices;
|
275248
|
-
return
|
277028
|
+
return esm_default4({
|
275249
277029
|
message: promptMessage ?? "Which blockchain node or load balancer do you want to connect to?",
|
275250
277030
|
choices: filteredChoices,
|
275251
277031
|
default: defaultNode
|
@@ -275284,7 +277064,7 @@ async function blockchainNodePrompt({
|
|
275284
277064
|
}
|
275285
277065
|
return item;
|
275286
277066
|
}) : choices;
|
275287
|
-
return
|
277067
|
+
return esm_default4({
|
275288
277068
|
message: promptMessage ?? "Which blockchain node do you want to connect to?",
|
275289
277069
|
choices: filteredChoices,
|
275290
277070
|
default: defaultNode
|
@@ -275310,7 +277090,7 @@ async function blockscoutPrompt({
|
|
275310
277090
|
envKey: "SETTLEMINT_BLOCKSCOUT",
|
275311
277091
|
isRequired,
|
275312
277092
|
defaultHandler: async ({ defaultService: defaultBlockscout, choices }) => {
|
275313
|
-
return
|
277093
|
+
return esm_default4({
|
275314
277094
|
message: "Which blockscout instance do you want to connect to?",
|
275315
277095
|
choices,
|
275316
277096
|
default: defaultBlockscout
|
@@ -275333,7 +277113,7 @@ async function customDeploymentPrompt({
|
|
275333
277113
|
envKey: "SETTLEMINT_CUSTOM_DEPLOYMENT",
|
275334
277114
|
isRequired,
|
275335
277115
|
defaultHandler: async ({ defaultService: defaultCustomDeployment, choices }) => {
|
275336
|
-
return
|
277116
|
+
return esm_default4({
|
275337
277117
|
message: "Which Custom Deployment do you want to connect to?",
|
275338
277118
|
choices,
|
275339
277119
|
default: defaultCustomDeployment
|
@@ -275360,7 +277140,7 @@ async function hasuraPrompt({
|
|
275360
277140
|
envKey: "SETTLEMINT_HASURA",
|
275361
277141
|
isRequired,
|
275362
277142
|
defaultHandler: async ({ defaultService: defaultHasura, choices }) => {
|
275363
|
-
return
|
277143
|
+
return esm_default4({
|
275364
277144
|
message: "Which Hasura instance do you want to connect to?",
|
275365
277145
|
choices,
|
275366
277146
|
default: defaultHasura
|
@@ -275384,7 +277164,7 @@ async function hdPrivateKeyPrompt({
|
|
275384
277164
|
envKey: "SETTLEMINT_HD_PRIVATE_KEY",
|
275385
277165
|
isRequired,
|
275386
277166
|
defaultHandler: async ({ defaultService: defaultPrivateKey, choices }) => {
|
275387
|
-
return
|
277167
|
+
return esm_default4({
|
275388
277168
|
message: "Which HD Private Key do you want to use?",
|
275389
277169
|
choices,
|
275390
277170
|
default: defaultPrivateKey
|
@@ -275408,7 +277188,7 @@ async function ipfsPrompt({
|
|
275408
277188
|
envKey: "SETTLEMINT_IPFS",
|
275409
277189
|
isRequired,
|
275410
277190
|
defaultHandler: async ({ defaultService: defaultStorage, choices }) => {
|
275411
|
-
return
|
277191
|
+
return esm_default4({
|
275412
277192
|
message: "Which IPFS instance do you want to connect to?",
|
275413
277193
|
choices,
|
275414
277194
|
default: defaultStorage
|
@@ -275432,7 +277212,7 @@ async function minioPrompt({
|
|
275432
277212
|
envKey: "SETTLEMINT_MINIO",
|
275433
277213
|
isRequired,
|
275434
277214
|
defaultHandler: async ({ defaultService: defaultStorage, choices }) => {
|
275435
|
-
return
|
277215
|
+
return esm_default4({
|
275436
277216
|
message: "Which MinIO instance do you want to connect to?",
|
275437
277217
|
choices,
|
275438
277218
|
default: defaultStorage
|
@@ -275456,7 +277236,7 @@ async function portalPrompt({
|
|
275456
277236
|
envKey: "SETTLEMINT_PORTAL",
|
275457
277237
|
isRequired,
|
275458
277238
|
defaultHandler: async ({ defaultService: defaultMiddleware, choices }) => {
|
275459
|
-
return
|
277239
|
+
return esm_default4({
|
275460
277240
|
message: "Which Smart Contract Portal instance do you want to connect to?",
|
275461
277241
|
choices,
|
275462
277242
|
default: defaultMiddleware
|
@@ -275485,7 +277265,7 @@ async function theGraphPrompt({
|
|
275485
277265
|
isRequired,
|
275486
277266
|
defaultHandler: async ({ defaultService: defaultMiddleware, choices }) => {
|
275487
277267
|
const filteredChoices = filterRunningOnly ? choices.filter(({ value: middleware }) => isRunning(middleware)) : choices;
|
275488
|
-
return
|
277268
|
+
return esm_default4({
|
275489
277269
|
message: "Which The Graph instance do you want to connect to?",
|
275490
277270
|
choices: filteredChoices,
|
275491
277271
|
default: defaultMiddleware
|
@@ -275513,7 +277293,7 @@ async function instancePrompt({
|
|
275513
277293
|
return sanitizeInstanceUrl(defaultPromptInstance);
|
275514
277294
|
}
|
275515
277295
|
if (freeTextInput) {
|
275516
|
-
const instance = await
|
277296
|
+
const instance = await esm_default3({
|
275517
277297
|
message: "What is the URL of your SettleMint instance?",
|
275518
277298
|
default: defaultPromptInstance,
|
275519
277299
|
required: true,
|
@@ -275532,7 +277312,7 @@ async function instancePrompt({
|
|
275532
277312
|
if (knownInstances.length === 0) {
|
275533
277313
|
note("No instances found. Run `settlemint login` to configure an instance.", "warn");
|
275534
277314
|
}
|
275535
|
-
return
|
277315
|
+
return esm_default4({
|
275536
277316
|
message: "What instance do you want to connect to?",
|
275537
277317
|
choices: [
|
275538
277318
|
...knownInstances.map((instance) => ({
|
@@ -275564,7 +277344,7 @@ async function serviceSecretPrompt({
|
|
275564
277344
|
return defaultSecret;
|
275565
277345
|
}
|
275566
277346
|
if (defaultSecret) {
|
275567
|
-
const keep = await
|
277347
|
+
const keep = await esm_default5({
|
275568
277348
|
message: `Do you want to use the existing ${name3} secret?`,
|
275569
277349
|
default: true
|
275570
277350
|
});
|
@@ -275572,7 +277352,7 @@ async function serviceSecretPrompt({
|
|
275572
277352
|
return defaultSecret;
|
275573
277353
|
}
|
275574
277354
|
}
|
275575
|
-
const serviceSecret = await
|
277355
|
+
const serviceSecret = await esm_default6({
|
275576
277356
|
message
|
275577
277357
|
});
|
275578
277358
|
return serviceSecret || undefined;
|
@@ -275593,7 +277373,7 @@ async function serviceUrlPrompt({
|
|
275593
277373
|
if (isCi) {
|
275594
277374
|
return defaultUrl ? new URL(defaultUrl).toString() : undefined;
|
275595
277375
|
}
|
275596
|
-
const serviceUrl = await
|
277376
|
+
const serviceUrl = await esm_default3({
|
275597
277377
|
message: example ? `${message} (eg ${example})` : message,
|
275598
277378
|
default: defaultUrl,
|
275599
277379
|
required: true,
|
@@ -275624,7 +277404,7 @@ async function workspacePrompt(env2, workspaces, accept) {
|
|
275624
277404
|
if (is_in_ci_default) {
|
275625
277405
|
nothingSelectedError("workspace");
|
275626
277406
|
}
|
275627
|
-
const workspace = await
|
277407
|
+
const workspace = await esm_default4({
|
275628
277408
|
message: "Which workspace do you want to connect to?",
|
275629
277409
|
choices: workspaces.map((workspace2) => ({
|
275630
277410
|
name: `${workspace2.name} (${workspace2.uniqueName})`,
|
@@ -275913,10 +277693,10 @@ function getTheGraphSubgraphUrl(theGraphUrl, subgraphName) {
|
|
275913
277693
|
}
|
275914
277694
|
|
275915
277695
|
// ../utils/dist/logging.mjs
|
275916
|
-
var
|
277696
|
+
var maskTokens6 = (output) => {
|
275917
277697
|
return output.replace(/sm_(pat|aat|sat)_[0-9a-zA-Z]+/g, "***");
|
275918
277698
|
};
|
275919
|
-
function
|
277699
|
+
function createLogger3(options = {}) {
|
275920
277700
|
const { level = "warn", prefix = "" } = options;
|
275921
277701
|
const logLevels = {
|
275922
277702
|
debug: 0,
|
@@ -275949,27 +277729,27 @@ ${JSON.stringify(arg, null, 2)}`;
|
|
275949
277729
|
return {
|
275950
277730
|
debug: (message, ...args) => {
|
275951
277731
|
if (shouldLog("debug")) {
|
275952
|
-
console.debug(`\x1B[32m${prefix}[DEBUG] ${
|
277732
|
+
console.debug(`\x1B[32m${prefix}[DEBUG] ${maskTokens6(message)}${maskTokens6(formatArgs(args))}\x1B[0m`);
|
275953
277733
|
}
|
275954
277734
|
},
|
275955
277735
|
info: (message, ...args) => {
|
275956
277736
|
if (shouldLog("info")) {
|
275957
|
-
console.info(`\x1B[34m${prefix}[INFO] ${
|
277737
|
+
console.info(`\x1B[34m${prefix}[INFO] ${maskTokens6(message)}${maskTokens6(formatArgs(args))}\x1B[0m`);
|
275958
277738
|
}
|
275959
277739
|
},
|
275960
277740
|
warn: (message, ...args) => {
|
275961
277741
|
if (shouldLog("warn")) {
|
275962
|
-
console.warn(`\x1B[33m${prefix}[WARN] ${
|
277742
|
+
console.warn(`\x1B[33m${prefix}[WARN] ${maskTokens6(message)}${maskTokens6(formatArgs(args))}\x1B[0m`);
|
275963
277743
|
}
|
275964
277744
|
},
|
275965
277745
|
error: (message, ...args) => {
|
275966
277746
|
if (shouldLog("error")) {
|
275967
|
-
console.error(`\x1B[31m${prefix}[ERROR] ${
|
277747
|
+
console.error(`\x1B[31m${prefix}[ERROR] ${maskTokens6(message)}${maskTokens6(formatArgs(args))}\x1B[0m`);
|
275968
277748
|
}
|
275969
277749
|
}
|
275970
277750
|
};
|
275971
277751
|
}
|
275972
|
-
var
|
277752
|
+
var logger3 = createLogger3();
|
275973
277753
|
|
275974
277754
|
// src/prompts/standalone/service-value.prompt.ts
|
275975
277755
|
async function serviceValuePrompt({
|
@@ -275986,7 +277766,7 @@ async function serviceValuePrompt({
|
|
275986
277766
|
if (isCi) {
|
275987
277767
|
return defaultValue;
|
275988
277768
|
}
|
275989
|
-
const serviceSecret = await
|
277769
|
+
const serviceSecret = await esm_default3({
|
275990
277770
|
message: example ? `${message} (eg ${example})` : message,
|
275991
277771
|
default: defaultValue
|
275992
277772
|
});
|
@@ -276348,7 +278128,7 @@ async function connectToStandalone(env2, acceptDefaults, prod) {
|
|
276348
278128
|
table("Configuration", Object.values(selectedServices).filter((item) => !item.isSecret).map((item) => {
|
276349
278129
|
return {
|
276350
278130
|
name: item.label,
|
276351
|
-
value: item.result ?
|
278131
|
+
value: item.result ? maskTokens6(item.result) : undefined
|
276352
278132
|
};
|
276353
278133
|
}).filter(Boolean));
|
276354
278134
|
}
|
@@ -276398,7 +278178,7 @@ async function templatePrompt(platformConfig, argument) {
|
|
276398
278178
|
}
|
276399
278179
|
return template2;
|
276400
278180
|
}
|
276401
|
-
const template = await
|
278181
|
+
const template = await esm_default4({
|
276402
278182
|
message: "Which template do you want to use?",
|
276403
278183
|
choices: [
|
276404
278184
|
...kits.map((template2) => ({
|
@@ -276416,7 +278196,7 @@ async function projectNamePrompt(env2, argument) {
|
|
276416
278196
|
if (defaultInstance) {
|
276417
278197
|
return defaultInstance;
|
276418
278198
|
}
|
276419
|
-
return
|
278199
|
+
return esm_default3({
|
276420
278200
|
message: "What is the name of your new SettleMint project?",
|
276421
278201
|
default: defaultInstance,
|
276422
278202
|
required: true,
|
@@ -276618,7 +278398,7 @@ var basename2 = function(p5, extension) {
|
|
276618
278398
|
return extension && lastSegment.endsWith(extension) ? lastSegment.slice(0, -extension.length) : lastSegment;
|
276619
278399
|
};
|
276620
278400
|
// ../../node_modules/defu/dist/defu.mjs
|
276621
|
-
function
|
278401
|
+
function isPlainObject7(value4) {
|
276622
278402
|
if (value4 === null || typeof value4 !== "object") {
|
276623
278403
|
return false;
|
276624
278404
|
}
|
@@ -276635,27 +278415,27 @@ function isPlainObject4(value4) {
|
|
276635
278415
|
return true;
|
276636
278416
|
}
|
276637
278417
|
function _defu(baseObject, defaults2, namespace = ".", merger) {
|
276638
|
-
if (!
|
278418
|
+
if (!isPlainObject7(defaults2)) {
|
276639
278419
|
return _defu(baseObject, {}, namespace, merger);
|
276640
278420
|
}
|
276641
278421
|
const object2 = Object.assign({}, defaults2);
|
276642
|
-
for (const
|
276643
|
-
if (
|
278422
|
+
for (const key5 in baseObject) {
|
278423
|
+
if (key5 === "__proto__" || key5 === "constructor") {
|
276644
278424
|
continue;
|
276645
278425
|
}
|
276646
|
-
const value4 = baseObject[
|
278426
|
+
const value4 = baseObject[key5];
|
276647
278427
|
if (value4 === null || value4 === undefined) {
|
276648
278428
|
continue;
|
276649
278429
|
}
|
276650
|
-
if (merger && merger(object2,
|
278430
|
+
if (merger && merger(object2, key5, value4, namespace)) {
|
276651
278431
|
continue;
|
276652
278432
|
}
|
276653
|
-
if (Array.isArray(value4) && Array.isArray(object2[
|
276654
|
-
object2[
|
276655
|
-
} else if (
|
276656
|
-
object2[
|
278433
|
+
if (Array.isArray(value4) && Array.isArray(object2[key5])) {
|
278434
|
+
object2[key5] = [...value4, ...object2[key5]];
|
278435
|
+
} else if (isPlainObject7(value4) && isPlainObject7(object2[key5])) {
|
278436
|
+
object2[key5] = _defu(value4, object2[key5], (namespace ? `${namespace}.` : "") + key5.toString(), merger);
|
276657
278437
|
} else {
|
276658
|
-
object2[
|
278438
|
+
object2[key5] = value4;
|
276659
278439
|
}
|
276660
278440
|
}
|
276661
278441
|
return object2;
|
@@ -276664,15 +278444,15 @@ function createDefu(merger) {
|
|
276664
278444
|
return (...arguments_4) => arguments_4.reduce((p5, c3) => _defu(p5, c3, "", merger), {});
|
276665
278445
|
}
|
276666
278446
|
var defu = createDefu();
|
276667
|
-
var defuFn = createDefu((object2,
|
276668
|
-
if (object2[
|
276669
|
-
object2[
|
278447
|
+
var defuFn = createDefu((object2, key5, currentValue) => {
|
278448
|
+
if (object2[key5] !== undefined && typeof currentValue === "function") {
|
278449
|
+
object2[key5] = currentValue(object2[key5]);
|
276670
278450
|
return true;
|
276671
278451
|
}
|
276672
278452
|
});
|
276673
|
-
var defuArrayFn = createDefu((object2,
|
276674
|
-
if (Array.isArray(object2[
|
276675
|
-
object2[
|
278453
|
+
var defuArrayFn = createDefu((object2, key5, currentValue) => {
|
278454
|
+
if (Array.isArray(object2[key5]) && typeof currentValue === "function") {
|
278455
|
+
object2[key5] = currentValue(object2[key5]);
|
276676
278456
|
return true;
|
276677
278457
|
}
|
276678
278458
|
});
|
@@ -279882,11 +281662,11 @@ function cacheDirectory() {
|
|
279882
281662
|
}
|
279883
281663
|
function normalizeHeaders(headers = {}) {
|
279884
281664
|
const normalized = {};
|
279885
|
-
for (const [
|
281665
|
+
for (const [key5, value4] of Object.entries(headers)) {
|
279886
281666
|
if (!value4) {
|
279887
281667
|
continue;
|
279888
281668
|
}
|
279889
|
-
normalized[
|
281669
|
+
normalized[key5.toLowerCase()] = value4;
|
279890
281670
|
}
|
279891
281671
|
return normalized;
|
279892
281672
|
}
|
@@ -280184,7 +281964,7 @@ function createCommand2() {
|
|
280184
281964
|
await mkdir6(projectDir, { recursive: true });
|
280185
281965
|
}
|
280186
281966
|
if (!await isEmpty(projectDir)) {
|
280187
|
-
const confirmEmpty = await
|
281967
|
+
const confirmEmpty = await esm_default5({
|
280188
281968
|
message: `The folder ${projectDir} already exists. Do you want to empty it?`,
|
280189
281969
|
default: false
|
280190
281970
|
});
|
@@ -280398,7 +282178,7 @@ async function personalAccessTokenPrompt(env2, instance, accept) {
|
|
280398
282178
|
return defaultPersonalAccessToken;
|
280399
282179
|
}
|
280400
282180
|
if (existingConfig && defaultPersonalAccessToken) {
|
280401
|
-
const useExisting = await
|
282181
|
+
const useExisting = await esm_default5({
|
280402
282182
|
message: `Do you want to use your existing personal access token for ${instance}?`,
|
280403
282183
|
default: true
|
280404
282184
|
});
|
@@ -280406,7 +282186,7 @@ async function personalAccessTokenPrompt(env2, instance, accept) {
|
|
280406
282186
|
return defaultPersonalAccessToken;
|
280407
282187
|
}
|
280408
282188
|
}
|
280409
|
-
return
|
282189
|
+
return esm_default6({
|
280410
282190
|
message: "What is your personal access token in SettleMint? (format: sm_pat_...)",
|
280411
282191
|
validate(value4) {
|
280412
282192
|
try {
|
@@ -280519,7 +282299,7 @@ function logoutCommand() {
|
|
280519
282299
|
}
|
280520
282300
|
const env2 = await loadEnv(false, false);
|
280521
282301
|
const defaultInstance = env2.SETTLEMINT_INSTANCE;
|
280522
|
-
const instance = await
|
282302
|
+
const instance = await esm_default4({
|
280523
282303
|
message: "Select the instance to logout from:",
|
280524
282304
|
choices: instances.map((instance2) => ({
|
280525
282305
|
value: instance2,
|
@@ -280540,7 +282320,7 @@ async function pincodeVerificationPrompt(verificationChallenges) {
|
|
280540
282320
|
if (verificationChallenges.length === 1) {
|
280541
282321
|
return verificationChallenges[0];
|
280542
282322
|
}
|
280543
|
-
const verificationChallenge = await
|
282323
|
+
const verificationChallenge = await esm_default4({
|
280544
282324
|
message: "Which pincode verification do you want to use?",
|
280545
282325
|
choices: verificationChallenges.map((verificationChallenge2) => ({
|
280546
282326
|
name: verificationChallenge2.name,
|
@@ -280604,7 +282384,7 @@ function pincodeVerificationResponseCommand() {
|
|
280604
282384
|
nodeId: selectedBlockchainNode.id
|
280605
282385
|
});
|
280606
282386
|
const verificationChallenge = await pincodeVerificationPrompt(pincodeVerificationChallenges);
|
280607
|
-
const pincode = await
|
282387
|
+
const pincode = await esm_default6({
|
280608
282388
|
message: "Enter your pincode",
|
280609
282389
|
validate(value4) {
|
280610
282390
|
if (!value4.trim()) {
|
@@ -280729,7 +282509,7 @@ async function providerPrompt(platformConfig, argument) {
|
|
280729
282509
|
if (possibleProviders.length === 1) {
|
280730
282510
|
return possibleProviders[0];
|
280731
282511
|
}
|
280732
|
-
const provider = await
|
282512
|
+
const provider = await esm_default4({
|
280733
282513
|
message: "Which provider do you want to use?",
|
280734
282514
|
choices: platformConfig.deploymentEngineTargets.map((target) => ({
|
280735
282515
|
name: target.name,
|
@@ -280760,7 +282540,7 @@ async function regionPrompt(provider, argument) {
|
|
280760
282540
|
if (possibleRegions.length === 1) {
|
280761
282541
|
return possibleRegions[0];
|
280762
282542
|
}
|
280763
|
-
const region = await
|
282543
|
+
const region = await esm_default4({
|
280764
282544
|
message: "Which region do you want to use?",
|
280765
282545
|
choices: provider.clusters.map((cluster) => ({
|
280766
282546
|
name: cluster.name,
|
@@ -281269,7 +283049,7 @@ async function blockchainNetworkPrompt({
|
|
281269
283049
|
envKey: "SETTLEMINT_BLOCKCHAIN_NETWORK",
|
281270
283050
|
isRequired,
|
281271
283051
|
defaultHandler: async ({ defaultService: defaultNetwork, choices }) => {
|
281272
|
-
return
|
283052
|
+
return esm_default4({
|
281273
283053
|
message: "Which blockchain network do you want to connect to?",
|
281274
283054
|
choices,
|
281275
283055
|
default: defaultNetwork
|
@@ -282174,7 +283954,7 @@ function createCommand3() {
|
|
282174
283954
|
|
282175
283955
|
// src/prompts/delete-confirmation.prompt.ts
|
282176
283956
|
async function deleteConfirmationPrompt(itemDescription) {
|
282177
|
-
const confirmation = await
|
283957
|
+
const confirmation = await esm_default3({
|
282178
283958
|
message: `Are you sure you want to delete ${itemDescription}? (yes/no)`,
|
282179
283959
|
required: true,
|
282180
283960
|
validate(value4) {
|
@@ -282577,7 +284357,7 @@ function jsonOutput(data) {
|
|
282577
284357
|
var composer = require_composer();
|
282578
284358
|
var Document = require_Document();
|
282579
284359
|
var Schema = require_Schema();
|
282580
|
-
var
|
284360
|
+
var errors7 = require_errors3();
|
282581
284361
|
var Alias = require_Alias();
|
282582
284362
|
var identity2 = require_identity();
|
282583
284363
|
var Pair = require_Pair();
|
@@ -282593,9 +284373,9 @@ var visit2 = require_visit();
|
|
282593
284373
|
var $Composer = composer.Composer;
|
282594
284374
|
var $Document = Document.Document;
|
282595
284375
|
var $Schema = Schema.Schema;
|
282596
|
-
var $YAMLError =
|
282597
|
-
var $YAMLParseError =
|
282598
|
-
var $YAMLWarning =
|
284376
|
+
var $YAMLError = errors7.YAMLError;
|
284377
|
+
var $YAMLParseError = errors7.YAMLParseError;
|
284378
|
+
var $YAMLWarning = errors7.YAMLWarning;
|
282599
284379
|
var $Alias = Alias.Alias;
|
282600
284380
|
var $isAlias = identity2.isAlias;
|
282601
284381
|
var $isCollection = identity2.isCollection;
|
@@ -282961,7 +284741,7 @@ async function getServicesAndMapResults({
|
|
282961
284741
|
const application = await settlemint.application.read(applicationUniqueName);
|
282962
284742
|
const services = await servicesSpinner(settlemint, applicationUniqueName, types2);
|
282963
284743
|
const results = (types2 ?? SERVICE_TYPES).filter((serviceType) => !types2 || types2.includes(serviceType)).map((serviceType) => {
|
282964
|
-
const [_6, labels] = Object.entries(LABELS_MAP).find(([
|
284744
|
+
const [_6, labels] = Object.entries(LABELS_MAP).find(([key5, value4]) => value4.command === serviceType) ?? [
|
282965
284745
|
null,
|
282966
284746
|
{ plural: serviceType }
|
282967
284747
|
];
|
@@ -283114,7 +284894,7 @@ async function useCasePrompt(platformConfig, argument) {
|
|
283114
284894
|
if (selectableUseCases.length === 1) {
|
283115
284895
|
return selectableUseCases[0];
|
283116
284896
|
}
|
283117
|
-
const useCase = await
|
284897
|
+
const useCase = await esm_default4({
|
283118
284898
|
message: "Which use case do you want to use?",
|
283119
284899
|
choices: selectableUseCases.map((useCase2) => ({
|
283120
284900
|
name: formatUseCaseName(useCase2.name),
|
@@ -283172,7 +284952,7 @@ function createCommand4() {
|
|
283172
284952
|
const targetDir = formatTargetDir(name3);
|
283173
284953
|
const projectDir = join10(process.cwd(), targetDir);
|
283174
284954
|
if (await exists3(projectDir) && !await isEmpty(projectDir)) {
|
283175
|
-
const confirmEmpty = await
|
284955
|
+
const confirmEmpty = await esm_default5({
|
283176
284956
|
message: `The folder ${projectDir} already exists. Do you want to delete it?`,
|
283177
284957
|
default: false
|
283178
284958
|
});
|
@@ -283202,11 +284982,11 @@ function createCommand4() {
|
|
283202
284982
|
|
283203
284983
|
// src/utils/commands/passthrough-options.ts
|
283204
284984
|
function mapPassthroughOptions(options, command) {
|
283205
|
-
const optionArgs = Object.entries(options).map(([
|
284985
|
+
const optionArgs = Object.entries(options).map(([key5, value4]) => {
|
283206
284986
|
if (value4 === true) {
|
283207
|
-
return `--${
|
284987
|
+
return `--${key5}`;
|
283208
284988
|
}
|
283209
|
-
return `--${
|
284989
|
+
return `--${key5}=${value4}`;
|
283210
284990
|
});
|
283211
284991
|
return [...optionArgs, ...command.args];
|
283212
284992
|
}
|
@@ -283462,7 +285242,7 @@ async function addressPrompt({
|
|
283462
285242
|
hardhatConfig
|
283463
285243
|
}) {
|
283464
285244
|
if (!node) {
|
283465
|
-
return
|
285245
|
+
return esm_default3({
|
283466
285246
|
message: "Which private key address do you want to deploy from?",
|
283467
285247
|
validate: (value4) => {
|
283468
285248
|
if (!isAddress(value4)) {
|
@@ -283482,7 +285262,7 @@ async function addressPrompt({
|
|
283482
285262
|
note(`Private key with address '${defaultAddress}' is not activated on the node '${node.uniqueName}'.
|
283483
285263
|
Please select another key or activate this key on the node and try again.`, "warn");
|
283484
285264
|
}
|
283485
|
-
const address = await
|
285265
|
+
const address = await esm_default4({
|
283486
285266
|
message: "Which private key do you want to deploy from?",
|
283487
285267
|
choices: possiblePrivateKeys.map(({ address: address2, name: name3 }) => ({
|
283488
285268
|
name: name3,
|
@@ -284338,4 +286118,4 @@ async function sdkCliCommand(argv = process.argv) {
|
|
284338
286118
|
// src/cli.ts
|
284339
286119
|
sdkCliCommand();
|
284340
286120
|
|
284341
|
-
//# debugId=
|
286121
|
+
//# debugId=5E06A80FBB768B6A64756E2164756E21
|