@settlemint/sdk-cli 1.1.3-pr079be885 → 1.1.3-pr1322fc8f
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 +586 -935
- package/dist/cli.js.map +17 -30
- package/package.json +8 -8
package/dist/cli.js
CHANGED
|
@@ -14374,8 +14374,8 @@ var require_printLocation = __commonJS((exports) => {
|
|
|
14374
14374
|
const columnNum = sourceLocation.column + columnOffset;
|
|
14375
14375
|
const locationStr = `${source.name}:${lineNum}:${columnNum}
|
|
14376
14376
|
`;
|
|
14377
|
-
const
|
|
14378
|
-
const locationLine =
|
|
14377
|
+
const lines2 = body.split(/\r\n|[\n\r]/g);
|
|
14378
|
+
const locationLine = lines2[lineIndex];
|
|
14379
14379
|
if (locationLine.length > 120) {
|
|
14380
14380
|
const subLineIndex = Math.floor(columnNum / 80);
|
|
14381
14381
|
const subLineColumnNum = columnNum % 80;
|
|
@@ -14391,14 +14391,14 @@ var require_printLocation = __commonJS((exports) => {
|
|
|
14391
14391
|
]);
|
|
14392
14392
|
}
|
|
14393
14393
|
return locationStr + printPrefixedLines([
|
|
14394
|
-
[`${lineNum - 1} |`,
|
|
14394
|
+
[`${lineNum - 1} |`, lines2[lineIndex - 1]],
|
|
14395
14395
|
[`${lineNum} |`, locationLine],
|
|
14396
14396
|
["|", "^".padStart(columnNum)],
|
|
14397
|
-
[`${lineNum + 1} |`,
|
|
14397
|
+
[`${lineNum + 1} |`, lines2[lineIndex + 1]]
|
|
14398
14398
|
]);
|
|
14399
14399
|
}
|
|
14400
|
-
function printPrefixedLines(
|
|
14401
|
-
const existingLines =
|
|
14400
|
+
function printPrefixedLines(lines2) {
|
|
14401
|
+
const existingLines = lines2.filter(([_, line]) => line !== undefined);
|
|
14402
14402
|
const padLen = Math.max(...existingLines.map(([prefix]) => prefix.length));
|
|
14403
14403
|
return existingLines.map(([prefix, line]) => prefix.padStart(padLen) + (line ? " " + line : "")).join(`
|
|
14404
14404
|
`);
|
|
@@ -14811,14 +14811,14 @@ var require_blockString = __commonJS((exports) => {
|
|
|
14811
14811
|
exports.isPrintableAsBlockString = isPrintableAsBlockString;
|
|
14812
14812
|
exports.printBlockString = printBlockString;
|
|
14813
14813
|
var _characterClasses = require_characterClasses();
|
|
14814
|
-
function dedentBlockStringLines(
|
|
14814
|
+
function dedentBlockStringLines(lines2) {
|
|
14815
14815
|
var _firstNonEmptyLine2;
|
|
14816
14816
|
let commonIndent = Number.MAX_SAFE_INTEGER;
|
|
14817
14817
|
let firstNonEmptyLine = null;
|
|
14818
14818
|
let lastNonEmptyLine = -1;
|
|
14819
|
-
for (let i = 0;i <
|
|
14819
|
+
for (let i = 0;i < lines2.length; ++i) {
|
|
14820
14820
|
var _firstNonEmptyLine;
|
|
14821
|
-
const line =
|
|
14821
|
+
const line = lines2[i];
|
|
14822
14822
|
const indent = leadingWhitespace(line);
|
|
14823
14823
|
if (indent === line.length) {
|
|
14824
14824
|
continue;
|
|
@@ -14829,7 +14829,7 @@ var require_blockString = __commonJS((exports) => {
|
|
|
14829
14829
|
commonIndent = indent;
|
|
14830
14830
|
}
|
|
14831
14831
|
}
|
|
14832
|
-
return
|
|
14832
|
+
return lines2.map((line, i) => i === 0 ? line : line.slice(commonIndent)).slice((_firstNonEmptyLine2 = firstNonEmptyLine) !== null && _firstNonEmptyLine2 !== undefined ? _firstNonEmptyLine2 : 0, lastNonEmptyLine + 1);
|
|
14833
14833
|
}
|
|
14834
14834
|
function leadingWhitespace(str) {
|
|
14835
14835
|
let i = 0;
|
|
@@ -14891,9 +14891,9 @@ var require_blockString = __commonJS((exports) => {
|
|
|
14891
14891
|
}
|
|
14892
14892
|
function printBlockString(value, options) {
|
|
14893
14893
|
const escapedValue = value.replace(/"""/g, '\\"""');
|
|
14894
|
-
const
|
|
14895
|
-
const isSingleLine =
|
|
14896
|
-
const forceLeadingNewLine =
|
|
14894
|
+
const lines2 = escapedValue.split(/\r\n|[\n\r]/g);
|
|
14895
|
+
const isSingleLine = lines2.length === 1;
|
|
14896
|
+
const forceLeadingNewLine = lines2.length > 1 && lines2.slice(1).every((line) => line.length === 0 || (0, _characterClasses.isWhiteSpace)(line.charCodeAt(0)));
|
|
14897
14897
|
const hasTrailingTripleQuotes = escapedValue.endsWith('\\"""');
|
|
14898
14898
|
const hasTrailingQuote = value.endsWith('"') && !hasTrailingTripleQuotes;
|
|
14899
14899
|
const hasTrailingSlash = value.endsWith("\\");
|
|
@@ -34006,9 +34006,9 @@ var require_commonjs4 = __commonJS((exports) => {
|
|
|
34006
34006
|
this.#resolveCache = new ResolveCache2;
|
|
34007
34007
|
this.#resolvePosixCache = new ResolveCache2;
|
|
34008
34008
|
this.#children = new ChildrenCache2(childrenCacheSize);
|
|
34009
|
-
const
|
|
34010
|
-
if (
|
|
34011
|
-
|
|
34009
|
+
const split2 = cwdPath.substring(this.rootPath.length).split(sep2);
|
|
34010
|
+
if (split2.length === 1 && !split2[0]) {
|
|
34011
|
+
split2.pop();
|
|
34012
34012
|
}
|
|
34013
34013
|
if (nocase === undefined) {
|
|
34014
34014
|
throw new TypeError("must provide nocase setting to PathScurryBase ctor");
|
|
@@ -34017,11 +34017,11 @@ var require_commonjs4 = __commonJS((exports) => {
|
|
|
34017
34017
|
this.root = this.newRoot(this.#fs);
|
|
34018
34018
|
this.roots[this.rootPath] = this.root;
|
|
34019
34019
|
let prev = this.root;
|
|
34020
|
-
let len =
|
|
34020
|
+
let len = split2.length - 1;
|
|
34021
34021
|
const joinSep = pathImpl.sep;
|
|
34022
34022
|
let abs = this.rootPath;
|
|
34023
34023
|
let sawFirst = false;
|
|
34024
|
-
for (const part of
|
|
34024
|
+
for (const part of split2) {
|
|
34025
34025
|
const l2 = len--;
|
|
34026
34026
|
prev = prev.child(part, {
|
|
34027
34027
|
relative: new Array(l2).fill("..").join(joinSep),
|
|
@@ -37186,9 +37186,9 @@ var require_ini = __commonJS((exports, module) => {
|
|
|
37186
37186
|
let p = out;
|
|
37187
37187
|
let section = null;
|
|
37188
37188
|
const re = /^\[([^\]]*)\]\s*$|^([^=]+)(=(.*))?$/i;
|
|
37189
|
-
const
|
|
37189
|
+
const lines2 = str.split(/[\r\n]+/g);
|
|
37190
37190
|
const duplicates = {};
|
|
37191
|
-
for (const line of
|
|
37191
|
+
for (const line of lines2) {
|
|
37192
37192
|
if (!line || line.match(/^\s*[;#]/) || line.match(/^\s*$/)) {
|
|
37193
37193
|
continue;
|
|
37194
37194
|
}
|
|
@@ -39173,7 +39173,7 @@ var require_semver3 = __commonJS((exports, module) => {
|
|
|
39173
39173
|
// ../../node_modules/@npmcli/git/lib/lines-to-revs.js
|
|
39174
39174
|
var require_lines_to_revs = __commonJS((exports, module) => {
|
|
39175
39175
|
var semver = require_semver3();
|
|
39176
|
-
module.exports = (
|
|
39176
|
+
module.exports = (lines2) => finish(lines2.reduce(linesToRevsReducer, {
|
|
39177
39177
|
versions: {},
|
|
39178
39178
|
"dist-tags": {},
|
|
39179
39179
|
refs: {},
|
|
@@ -39234,12 +39234,12 @@ var require_lines_to_revs = __commonJS((exports, module) => {
|
|
|
39234
39234
|
return "other";
|
|
39235
39235
|
};
|
|
39236
39236
|
var lineToRevDoc = (line) => {
|
|
39237
|
-
const
|
|
39238
|
-
if (
|
|
39237
|
+
const split2 = line.trim().split(/\s+/, 2);
|
|
39238
|
+
if (split2.length < 2) {
|
|
39239
39239
|
return null;
|
|
39240
39240
|
}
|
|
39241
|
-
const sha =
|
|
39242
|
-
const rawRef =
|
|
39241
|
+
const sha = split2[0].trim();
|
|
39242
|
+
const rawRef = split2[1].trim();
|
|
39243
39243
|
const type2 = refType(rawRef);
|
|
39244
39244
|
if (type2 === "tag") {
|
|
39245
39245
|
const ref = rawRef.slice("refs/tags/".length);
|
|
@@ -46994,17 +46994,17 @@ var require_normalize_data = __commonJS((exports, module) => {
|
|
|
46994
46994
|
};
|
|
46995
46995
|
var isEmail = (str) => str.includes("@") && str.indexOf("@") < str.lastIndexOf(".");
|
|
46996
46996
|
function extractDescription(description) {
|
|
46997
|
-
const
|
|
46997
|
+
const lines2 = description.trim().split(`
|
|
46998
46998
|
`);
|
|
46999
46999
|
let start = 0;
|
|
47000
|
-
while (
|
|
47000
|
+
while (lines2[start]?.trim().match(/^(#|$)/)) {
|
|
47001
47001
|
start++;
|
|
47002
47002
|
}
|
|
47003
47003
|
let end = start + 1;
|
|
47004
|
-
while (end <
|
|
47004
|
+
while (end < lines2.length && lines2[end].trim()) {
|
|
47005
47005
|
end++;
|
|
47006
47006
|
}
|
|
47007
|
-
return
|
|
47007
|
+
return lines2.slice(start, end).join(" ").trim();
|
|
47008
47008
|
}
|
|
47009
47009
|
function stringifyPerson(person) {
|
|
47010
47010
|
if (typeof person !== "string") {
|
|
@@ -48070,6 +48070,7 @@ var require_re6 = __commonJS((exports, module) => {
|
|
|
48070
48070
|
var re = exports.re = [];
|
|
48071
48071
|
var safeRe = exports.safeRe = [];
|
|
48072
48072
|
var src = exports.src = [];
|
|
48073
|
+
var safeSrc = exports.safeSrc = [];
|
|
48073
48074
|
var t3 = exports.t = {};
|
|
48074
48075
|
var R = 0;
|
|
48075
48076
|
var LETTERDASHNUMBER = "[a-zA-Z0-9-]";
|
|
@@ -48090,6 +48091,7 @@ var require_re6 = __commonJS((exports, module) => {
|
|
|
48090
48091
|
debug(name, index, value2);
|
|
48091
48092
|
t3[name] = index;
|
|
48092
48093
|
src[index] = value2;
|
|
48094
|
+
safeSrc[index] = safe;
|
|
48093
48095
|
re[index] = new RegExp(value2, isGlobal ? "g" : undefined);
|
|
48094
48096
|
safeRe[index] = new RegExp(safe, isGlobal ? "g" : undefined);
|
|
48095
48097
|
};
|
|
@@ -48180,7 +48182,7 @@ var require_identifiers6 = __commonJS((exports, module) => {
|
|
|
48180
48182
|
var require_semver10 = __commonJS((exports, module) => {
|
|
48181
48183
|
var debug = require_debug6();
|
|
48182
48184
|
var { MAX_LENGTH, MAX_SAFE_INTEGER } = require_constants7();
|
|
48183
|
-
var { safeRe: re, t: t3 } = require_re6();
|
|
48185
|
+
var { safeRe: re, safeSrc: src, t: t3 } = require_re6();
|
|
48184
48186
|
var parseOptions = require_parse_options6();
|
|
48185
48187
|
var { compareIdentifiers } = require_identifiers6();
|
|
48186
48188
|
|
|
@@ -48322,7 +48324,8 @@ var require_semver10 = __commonJS((exports, module) => {
|
|
|
48322
48324
|
throw new Error("invalid increment argument: identifier is empty");
|
|
48323
48325
|
}
|
|
48324
48326
|
if (identifier) {
|
|
48325
|
-
const
|
|
48327
|
+
const r2 = new RegExp(`^${this.options.loose ? src[t3.PRERELEASELOOSE] : src[t3.PRERELEASE]}$`);
|
|
48328
|
+
const match2 = `-${identifier}`.match(r2);
|
|
48326
48329
|
if (!match2 || match2[1] !== identifier) {
|
|
48327
48330
|
throw new Error(`invalid identifier: ${identifier}`);
|
|
48328
48331
|
}
|
|
@@ -67380,9 +67383,9 @@ ${lanes.join(`
|
|
|
67380
67383
|
return node.kind === 183 || node.kind === 233;
|
|
67381
67384
|
}
|
|
67382
67385
|
var MAX_SMI_X86 = 1073741823;
|
|
67383
|
-
function guessIndentation(
|
|
67386
|
+
function guessIndentation(lines2) {
|
|
67384
67387
|
let indentation = MAX_SMI_X86;
|
|
67385
|
-
for (const line of
|
|
67388
|
+
for (const line of lines2) {
|
|
67386
67389
|
if (!line.length) {
|
|
67387
67390
|
continue;
|
|
67388
67391
|
}
|
|
@@ -155720,8 +155723,8 @@ ${lanes.join(`
|
|
|
155720
155723
|
if (node.comment) {
|
|
155721
155724
|
const text = getTextOfJSDocComment(node.comment);
|
|
155722
155725
|
if (text) {
|
|
155723
|
-
const
|
|
155724
|
-
for (const line of
|
|
155726
|
+
const lines2 = text.split(/\r\n?|\n/);
|
|
155727
|
+
for (const line of lines2) {
|
|
155725
155728
|
writeLine();
|
|
155726
155729
|
writeSpace();
|
|
155727
155730
|
writePunctuation("*");
|
|
@@ -156365,9 +156368,9 @@ ${lanes.join(`
|
|
|
156365
156368
|
if (getEmitFlags(parentNode) & 1) {
|
|
156366
156369
|
writeSpace();
|
|
156367
156370
|
} else if (preserveSourceNewlines) {
|
|
156368
|
-
const
|
|
156369
|
-
if (
|
|
156370
|
-
writeLine(
|
|
156371
|
+
const lines2 = getLinesBetweenNodes(parentNode, prevChildNode, nextChildNode);
|
|
156372
|
+
if (lines2) {
|
|
156373
|
+
writeLine(lines2);
|
|
156371
156374
|
} else {
|
|
156372
156375
|
writeSpace();
|
|
156373
156376
|
}
|
|
@@ -156376,9 +156379,9 @@ ${lanes.join(`
|
|
|
156376
156379
|
}
|
|
156377
156380
|
}
|
|
156378
156381
|
function writeLines(text) {
|
|
156379
|
-
const
|
|
156380
|
-
const indentation = guessIndentation(
|
|
156381
|
-
for (const lineText of
|
|
156382
|
+
const lines2 = text.split(/\r\n?|\n/);
|
|
156383
|
+
const indentation = guessIndentation(lines2);
|
|
156384
|
+
for (const lineText of lines2) {
|
|
156382
156385
|
const line = indentation ? lineText.slice(indentation) : lineText;
|
|
156383
156386
|
if (line.length) {
|
|
156384
156387
|
writeLine();
|
|
@@ -156476,11 +156479,11 @@ ${lanes.join(`
|
|
|
156476
156479
|
}
|
|
156477
156480
|
function getEffectiveLines(getLineDifference) {
|
|
156478
156481
|
Debug.assert(!!preserveSourceNewlines);
|
|
156479
|
-
const
|
|
156480
|
-
if (
|
|
156482
|
+
const lines2 = getLineDifference(true);
|
|
156483
|
+
if (lines2 === 0) {
|
|
156481
156484
|
return getLineDifference(false);
|
|
156482
156485
|
}
|
|
156483
|
-
return
|
|
156486
|
+
return lines2;
|
|
156484
156487
|
}
|
|
156485
156488
|
function writeLineSeparatorsAndIndentBefore(node, parent2) {
|
|
156486
156489
|
const leadingNewlines = preserveSourceNewlines && getLeadingLineTerminatorCount(parent2, node, 0);
|
|
@@ -166738,7 +166741,7 @@ ${lanes.join(`
|
|
|
166738
166741
|
function generateOptionOutput(sys2, option, rightAlignOfLeft, leftAlignOfRight) {
|
|
166739
166742
|
var _a;
|
|
166740
166743
|
const text = [];
|
|
166741
|
-
const
|
|
166744
|
+
const colors3 = createColors(sys2);
|
|
166742
166745
|
const name = getDisplayNameTextOfOption(option);
|
|
166743
166746
|
const valueCandidates = getValueCandidate(option);
|
|
166744
166747
|
const defaultValueDescription = typeof option.defaultValueDescription === "object" ? getDiagnosticText(option.defaultValueDescription) : formatDefaultValue(option.defaultValueDescription, option.type === "list" || option.type === "listOrElement" ? option.element.type : option.type);
|
|
@@ -166759,7 +166762,7 @@ ${lanes.join(`
|
|
|
166759
166762
|
}
|
|
166760
166763
|
text.push(sys2.newLine);
|
|
166761
166764
|
} else {
|
|
166762
|
-
text.push(
|
|
166765
|
+
text.push(colors3.blue(name), sys2.newLine);
|
|
166763
166766
|
if (option.description) {
|
|
166764
166767
|
const description3 = getDiagnosticText(option.description);
|
|
166765
166768
|
text.push(description3);
|
|
@@ -166804,7 +166807,7 @@ ${lanes.join(`
|
|
|
166804
166807
|
if (isFirstLine) {
|
|
166805
166808
|
curLeft = left.padStart(rightAlignOfLeft2);
|
|
166806
166809
|
curLeft = curLeft.padEnd(leftAlignOfRight2);
|
|
166807
|
-
curLeft = colorLeft ?
|
|
166810
|
+
curLeft = colorLeft ? colors3.blue(curLeft) : curLeft;
|
|
166808
166811
|
} else {
|
|
166809
166812
|
curLeft = "".padStart(leftAlignOfRight2);
|
|
166810
166813
|
}
|
|
@@ -166873,15 +166876,15 @@ ${lanes.join(`
|
|
|
166873
166876
|
}
|
|
166874
166877
|
const rightAlignOfLeftPart = maxLength2 + 2;
|
|
166875
166878
|
const leftAlignOfRightPart = rightAlignOfLeftPart + 2;
|
|
166876
|
-
let
|
|
166879
|
+
let lines2 = [];
|
|
166877
166880
|
for (const option of optionsList) {
|
|
166878
166881
|
const tmp = generateOptionOutput(sys2, option, rightAlignOfLeftPart, leftAlignOfRightPart);
|
|
166879
|
-
|
|
166882
|
+
lines2 = [...lines2, ...tmp];
|
|
166880
166883
|
}
|
|
166881
|
-
if (
|
|
166882
|
-
|
|
166884
|
+
if (lines2[lines2.length - 2] !== sys2.newLine) {
|
|
166885
|
+
lines2.push(sys2.newLine);
|
|
166883
166886
|
}
|
|
166884
|
-
return
|
|
166887
|
+
return lines2;
|
|
166885
166888
|
}
|
|
166886
166889
|
function generateSectionOptionsOutput(sys2, sectionName, options, subCategory, beforeOptionsDescription, afterOptionsDescription) {
|
|
166887
166890
|
let res = [];
|
|
@@ -166916,9 +166919,9 @@ ${lanes.join(`
|
|
|
166916
166919
|
return res;
|
|
166917
166920
|
}
|
|
166918
166921
|
function printEasyHelp(sys2, simpleOptions) {
|
|
166919
|
-
const
|
|
166922
|
+
const colors3 = createColors(sys2);
|
|
166920
166923
|
let output = [...getHeader(sys2, `${getDiagnosticText(Diagnostics.tsc_Colon_The_TypeScript_Compiler)} - ${getDiagnosticText(Diagnostics.Version_0, version)}`)];
|
|
166921
|
-
output.push(
|
|
166924
|
+
output.push(colors3.bold(getDiagnosticText(Diagnostics.COMMON_COMMANDS)) + sys2.newLine + sys2.newLine);
|
|
166922
166925
|
example("tsc", Diagnostics.Compiles_the_current_project_tsconfig_json_in_the_working_directory);
|
|
166923
166926
|
example("tsc app.ts util.ts", Diagnostics.Ignoring_tsconfig_json_compiles_the_specified_files_with_default_compiler_options);
|
|
166924
166927
|
example("tsc -b", Diagnostics.Build_a_composite_project_in_the_working_directory);
|
|
@@ -166939,7 +166942,7 @@ ${lanes.join(`
|
|
|
166939
166942
|
function example(ex, desc) {
|
|
166940
166943
|
const examples = typeof ex === "string" ? [ex] : ex;
|
|
166941
166944
|
for (const example2 of examples) {
|
|
166942
|
-
output.push(" " +
|
|
166945
|
+
output.push(" " + colors3.blue(example2) + sys2.newLine);
|
|
166943
166946
|
}
|
|
166944
166947
|
output.push(" " + getDiagnosticText(desc) + sys2.newLine + sys2.newLine);
|
|
166945
166948
|
}
|
|
@@ -166962,12 +166965,12 @@ ${lanes.join(`
|
|
|
166962
166965
|
}
|
|
166963
166966
|
function getHeader(sys2, message) {
|
|
166964
166967
|
var _a;
|
|
166965
|
-
const
|
|
166968
|
+
const colors3 = createColors(sys2);
|
|
166966
166969
|
const header = [];
|
|
166967
166970
|
const terminalWidth = ((_a = sys2.getWidthOfTerminal) == null ? undefined : _a.call(sys2)) ?? 0;
|
|
166968
166971
|
const tsIconLength = 5;
|
|
166969
|
-
const tsIconFirstLine =
|
|
166970
|
-
const tsIconSecondLine =
|
|
166972
|
+
const tsIconFirstLine = colors3.blueBackground("".padStart(tsIconLength));
|
|
166973
|
+
const tsIconSecondLine = colors3.blueBackground(colors3.brightWhite("TS ".padStart(tsIconLength)));
|
|
166971
166974
|
if (terminalWidth >= message.length + tsIconLength) {
|
|
166972
166975
|
const rightAlign = terminalWidth > 120 ? 120 : terminalWidth;
|
|
166973
166976
|
const leftAlign = rightAlign - tsIconLength;
|
|
@@ -218657,9 +218660,9 @@ ${e3.message}`;
|
|
|
218657
218660
|
insertedText = this.initialText + this.trailingText;
|
|
218658
218661
|
}
|
|
218659
218662
|
const lm = LineIndex.linesFromText(insertedText);
|
|
218660
|
-
const
|
|
218661
|
-
if (
|
|
218662
|
-
|
|
218663
|
+
const lines2 = lm.lines;
|
|
218664
|
+
if (lines2.length > 1 && lines2[lines2.length - 1] === "") {
|
|
218665
|
+
lines2.pop();
|
|
218663
218666
|
}
|
|
218664
218667
|
let branchParent;
|
|
218665
218668
|
let lastZeroCount;
|
|
@@ -218678,13 +218681,13 @@ ${e3.message}`;
|
|
|
218678
218681
|
branchParent.remove(lastZeroCount);
|
|
218679
218682
|
}
|
|
218680
218683
|
const leafNode = this.startPath[this.startPath.length - 1];
|
|
218681
|
-
if (
|
|
218682
|
-
leafNode.text =
|
|
218683
|
-
if (
|
|
218684
|
-
let insertedNodes = new Array(
|
|
218684
|
+
if (lines2.length > 0) {
|
|
218685
|
+
leafNode.text = lines2[0];
|
|
218686
|
+
if (lines2.length > 1) {
|
|
218687
|
+
let insertedNodes = new Array(lines2.length - 1);
|
|
218685
218688
|
let startNode2 = leafNode;
|
|
218686
|
-
for (let i2 = 1;i2 <
|
|
218687
|
-
insertedNodes[i2 - 1] = new LineLeaf(
|
|
218689
|
+
for (let i2 = 1;i2 < lines2.length; i2++) {
|
|
218690
|
+
insertedNodes[i2 - 1] = new LineLeaf(lines2[i2]);
|
|
218688
218691
|
}
|
|
218689
218692
|
let pathIndex = this.startPath.length - 2;
|
|
218690
218693
|
while (pathIndex >= 0) {
|
|
@@ -218954,11 +218957,11 @@ ${e3.message}`;
|
|
|
218954
218957
|
return { absolutePosition: this.root.charCount(), lineText: undefined };
|
|
218955
218958
|
}
|
|
218956
218959
|
}
|
|
218957
|
-
load(
|
|
218958
|
-
if (
|
|
218960
|
+
load(lines2) {
|
|
218961
|
+
if (lines2.length > 0) {
|
|
218959
218962
|
const leaves = [];
|
|
218960
|
-
for (let i2 = 0;i2 <
|
|
218961
|
-
leaves[i2] = new LineLeaf(
|
|
218963
|
+
for (let i2 = 0;i2 < lines2.length; i2++) {
|
|
218964
|
+
leaves[i2] = new LineLeaf(lines2[i2]);
|
|
218962
218965
|
}
|
|
218963
218966
|
this.root = _LineIndex.buildTreeFromBottom(leaves);
|
|
218964
218967
|
} else {
|
|
@@ -219061,18 +219064,18 @@ ${e3.message}`;
|
|
|
219061
219064
|
if (lineMap.length === 0) {
|
|
219062
219065
|
return { lines: [], lineMap };
|
|
219063
219066
|
}
|
|
219064
|
-
const
|
|
219067
|
+
const lines2 = new Array(lineMap.length);
|
|
219065
219068
|
const lc = lineMap.length - 1;
|
|
219066
219069
|
for (let lmi = 0;lmi < lc; lmi++) {
|
|
219067
|
-
|
|
219070
|
+
lines2[lmi] = text.substring(lineMap[lmi], lineMap[lmi + 1]);
|
|
219068
219071
|
}
|
|
219069
219072
|
const endText = text.substring(lineMap[lc]);
|
|
219070
219073
|
if (endText.length > 0) {
|
|
219071
|
-
|
|
219074
|
+
lines2[lc] = endText;
|
|
219072
219075
|
} else {
|
|
219073
|
-
|
|
219076
|
+
lines2.pop();
|
|
219074
219077
|
}
|
|
219075
|
-
return { lines, lineMap };
|
|
219078
|
+
return { lines: lines2, lineMap };
|
|
219076
219079
|
}
|
|
219077
219080
|
};
|
|
219078
219081
|
var LineNode = class _LineNode {
|
|
@@ -220152,7 +220155,7 @@ async function* streamBody(e4) {
|
|
|
220152
220155
|
}
|
|
220153
220156
|
}
|
|
220154
220157
|
}
|
|
220155
|
-
async function*
|
|
220158
|
+
async function* split2(e4, r3) {
|
|
220156
220159
|
var a4 = "";
|
|
220157
220160
|
var n3;
|
|
220158
220161
|
for await (var t4 of e4) {
|
|
@@ -220186,7 +220189,7 @@ function makeFetchSource(e4, r3, a4) {
|
|
|
220186
220189
|
var n5 = "--" + (a6 ? a6[1] : "-");
|
|
220187
220190
|
var t5 = true;
|
|
220188
220191
|
var i4;
|
|
220189
|
-
for await (var o4 of
|
|
220192
|
+
for await (var o4 of split2(streamBody(r5), `\r
|
|
220190
220193
|
` + n5)) {
|
|
220191
220194
|
if (t5) {
|
|
220192
220195
|
t5 = false;
|
|
@@ -220219,7 +220222,7 @@ function makeFetchSource(e4, r3, a4) {
|
|
|
220219
220222
|
} else if (/text\/event-stream/i.test(o3)) {
|
|
220220
220223
|
s3 = async function* parseEventStream(e6) {
|
|
220221
220224
|
var r5;
|
|
220222
|
-
for await (var a6 of
|
|
220225
|
+
for await (var a6 of split2(streamBody(e6), `
|
|
220223
220226
|
|
|
220224
220227
|
`)) {
|
|
220225
220228
|
var n5 = a6.match(S);
|
|
@@ -241158,8 +241161,8 @@ var require_mkdir = __commonJS((exports, module) => {
|
|
|
241158
241161
|
return "CwdError";
|
|
241159
241162
|
}
|
|
241160
241163
|
}
|
|
241161
|
-
var cGet = (cache,
|
|
241162
|
-
var cSet = (cache,
|
|
241164
|
+
var cGet = (cache, key2) => cache.get(normPath(key2));
|
|
241165
|
+
var cSet = (cache, key2, val) => cache.set(normPath(key2), val);
|
|
241163
241166
|
var checkCwd = (dir, cb) => {
|
|
241164
241167
|
fs3.stat(dir, (er2, st2) => {
|
|
241165
241168
|
if (er2 || !st2.isDirectory()) {
|
|
@@ -241530,8 +241533,8 @@ var require_unpack = __commonJS((exports, module) => {
|
|
|
241530
241533
|
}
|
|
241531
241534
|
};
|
|
241532
241535
|
var dropCache = (cache) => {
|
|
241533
|
-
for (const
|
|
241534
|
-
cache.delete(
|
|
241536
|
+
for (const key2 of cache.keys()) {
|
|
241537
|
+
cache.delete(key2);
|
|
241535
241538
|
}
|
|
241536
241539
|
};
|
|
241537
241540
|
|
|
@@ -246328,8 +246331,8 @@ var require_lib13 = __commonJS((exports, module) => {
|
|
|
246328
246331
|
function fetch2(input, options) {
|
|
246329
246332
|
return nodeFetch.fetch(input, options);
|
|
246330
246333
|
}
|
|
246331
|
-
for (const
|
|
246332
|
-
fetch2[
|
|
246334
|
+
for (const key2 in nodeFetch) {
|
|
246335
|
+
fetch2[key2] = nodeFetch[key2];
|
|
246333
246336
|
}
|
|
246334
246337
|
module.exports = fetch2;
|
|
246335
246338
|
});
|
|
@@ -246422,11 +246425,11 @@ var require_proxy = __commonJS((exports) => {
|
|
|
246422
246425
|
return hasRequiredSymbols$4 || (hasRequiredSymbols$4 = 1, symbols$4 = { kClose: Symbol("close"), kDestroy: Symbol("destroy"), kDispatch: Symbol("dispatch"), kUrl: Symbol("url"), kWriting: Symbol("writing"), kResuming: Symbol("resuming"), kQueue: Symbol("queue"), kConnect: Symbol("connect"), kConnecting: Symbol("connecting"), kKeepAliveDefaultTimeout: Symbol("default keep alive timeout"), kKeepAliveMaxTimeout: Symbol("max keep alive timeout"), kKeepAliveTimeoutThreshold: Symbol("keep alive timeout threshold"), kKeepAliveTimeoutValue: Symbol("keep alive timeout"), kKeepAlive: Symbol("keep alive"), kHeadersTimeout: Symbol("headers timeout"), kBodyTimeout: Symbol("body timeout"), kServerName: Symbol("server name"), kLocalAddress: Symbol("local address"), kHost: Symbol("host"), kNoRef: Symbol("no ref"), kBodyUsed: Symbol("used"), kBody: Symbol("abstracted request body"), kRunning: Symbol("running"), kBlocking: Symbol("blocking"), kPending: Symbol("pending"), kSize: Symbol("size"), kBusy: Symbol("busy"), kQueued: Symbol("queued"), kFree: Symbol("free"), kConnected: Symbol("connected"), kClosed: Symbol("closed"), kNeedDrain: Symbol("need drain"), kReset: Symbol("reset"), kDestroyed: Symbol.for("nodejs.stream.destroyed"), kResume: Symbol("resume"), kOnError: Symbol("on error"), kMaxHeadersSize: Symbol("max headers size"), kRunningIdx: Symbol("running index"), kPendingIdx: Symbol("pending index"), kError: Symbol("error"), kClients: Symbol("clients"), kClient: Symbol("client"), kParser: Symbol("parser"), kOnDestroyed: Symbol("destroy callbacks"), kPipelining: Symbol("pipelining"), kSocket: Symbol("socket"), kHostHeader: Symbol("host header"), kConnector: Symbol("connector"), kStrictContentLength: Symbol("strict content length"), kMaxRedirections: Symbol("maxRedirections"), kMaxRequests: Symbol("maxRequestsPerClient"), kProxy: Symbol("proxy agent options"), kCounter: Symbol("socket request counter"), kInterceptors: Symbol("dispatch interceptors"), kMaxResponseSize: Symbol("max response size"), kHTTP2Session: Symbol("http2Session"), kHTTP2SessionState: Symbol("http2Session state"), kRetryHandlerDefaultRetry: Symbol("retry agent default retry"), kConstruct: Symbol("constructable"), kListeners: Symbol("listeners"), kHTTPContext: Symbol("http context"), kMaxConcurrentStreams: Symbol("max concurrent streams"), kNoProxyAgent: Symbol("no proxy agent"), kHttpProxyAgent: Symbol("http proxy agent"), kHttpsProxyAgent: Symbol("https proxy agent") }), symbols$4;
|
|
246423
246426
|
}
|
|
246424
246427
|
e10(requireSymbols$4, "requireSymbols$4");
|
|
246425
|
-
var
|
|
246428
|
+
var errors2;
|
|
246426
246429
|
var hasRequiredErrors;
|
|
246427
246430
|
function requireErrors() {
|
|
246428
246431
|
if (hasRequiredErrors)
|
|
246429
|
-
return
|
|
246432
|
+
return errors2;
|
|
246430
246433
|
hasRequiredErrors = 1;
|
|
246431
246434
|
|
|
246432
246435
|
class A5 extends Error {
|
|
@@ -246635,7 +246638,7 @@ var require_proxy = __commonJS((exports) => {
|
|
|
246635
246638
|
super(i6, { cause: k5, ...F3 ?? {} }), this.name = "SecureProxyConnectionError", this.message = i6 || "Secure Proxy Connection failed", this.code = "UND_ERR_PRX_TLS", this.cause = k5;
|
|
246636
246639
|
}
|
|
246637
246640
|
}
|
|
246638
|
-
return
|
|
246641
|
+
return errors2 = { AbortError: Q4, HTTPParserError: Y4, UndiciError: A5, HeadersTimeoutError: c3, HeadersOverflowError: E6, BodyTimeoutError: t8, RequestContentLengthMismatchError: r6, ConnectTimeoutError: p6, ResponseStatusCodeError: B4, InvalidArgumentError: f6, InvalidReturnValueError: l3, RequestAbortedError: u6, ClientDestroyedError: a7, ClientClosedError: g6, InformationalError: n6, SocketError: d6, NotSupportedError: N6, ResponseContentLengthMismatchError: o8, BalancedPoolMissingUpstreamError: M5, ResponseExceededMaxSizeError: J4, RequestRetryError: V5, ResponseError: H4, SecureProxyConnectionError: h7 }, errors2;
|
|
246639
246642
|
}
|
|
246640
246643
|
e10(requireErrors, "requireErrors");
|
|
246641
246644
|
var constants$4;
|
|
@@ -256608,11 +256611,11 @@ var require_visit = __commonJS((exports) => {
|
|
|
256608
256611
|
visit2.BREAK = BREAK;
|
|
256609
256612
|
visit2.SKIP = SKIP;
|
|
256610
256613
|
visit2.REMOVE = REMOVE;
|
|
256611
|
-
function visit_(
|
|
256612
|
-
const ctrl = callVisitor(
|
|
256614
|
+
function visit_(key2, node, visitor, path5) {
|
|
256615
|
+
const ctrl = callVisitor(key2, node, visitor, path5);
|
|
256613
256616
|
if (identity2.isNode(ctrl) || identity2.isPair(ctrl)) {
|
|
256614
|
-
replaceNode(
|
|
256615
|
-
return visit_(
|
|
256617
|
+
replaceNode(key2, path5, ctrl);
|
|
256618
|
+
return visit_(key2, ctrl, visitor, path5);
|
|
256616
256619
|
}
|
|
256617
256620
|
if (typeof ctrl !== "symbol") {
|
|
256618
256621
|
if (identity2.isCollection(node)) {
|
|
@@ -256656,11 +256659,11 @@ var require_visit = __commonJS((exports) => {
|
|
|
256656
256659
|
visitAsync.BREAK = BREAK;
|
|
256657
256660
|
visitAsync.SKIP = SKIP;
|
|
256658
256661
|
visitAsync.REMOVE = REMOVE;
|
|
256659
|
-
async function visitAsync_(
|
|
256660
|
-
const ctrl = await callVisitor(
|
|
256662
|
+
async function visitAsync_(key2, node, visitor, path5) {
|
|
256663
|
+
const ctrl = await callVisitor(key2, node, visitor, path5);
|
|
256661
256664
|
if (identity2.isNode(ctrl) || identity2.isPair(ctrl)) {
|
|
256662
|
-
replaceNode(
|
|
256663
|
-
return visitAsync_(
|
|
256665
|
+
replaceNode(key2, path5, ctrl);
|
|
256666
|
+
return visitAsync_(key2, ctrl, visitor, path5);
|
|
256664
256667
|
}
|
|
256665
256668
|
if (typeof ctrl !== "symbol") {
|
|
256666
256669
|
if (identity2.isCollection(node)) {
|
|
@@ -256710,27 +256713,27 @@ var require_visit = __commonJS((exports) => {
|
|
|
256710
256713
|
}
|
|
256711
256714
|
return visitor;
|
|
256712
256715
|
}
|
|
256713
|
-
function callVisitor(
|
|
256716
|
+
function callVisitor(key2, node, visitor, path5) {
|
|
256714
256717
|
if (typeof visitor === "function")
|
|
256715
|
-
return visitor(
|
|
256718
|
+
return visitor(key2, node, path5);
|
|
256716
256719
|
if (identity2.isMap(node))
|
|
256717
|
-
return visitor.Map?.(
|
|
256720
|
+
return visitor.Map?.(key2, node, path5);
|
|
256718
256721
|
if (identity2.isSeq(node))
|
|
256719
|
-
return visitor.Seq?.(
|
|
256722
|
+
return visitor.Seq?.(key2, node, path5);
|
|
256720
256723
|
if (identity2.isPair(node))
|
|
256721
|
-
return visitor.Pair?.(
|
|
256724
|
+
return visitor.Pair?.(key2, node, path5);
|
|
256722
256725
|
if (identity2.isScalar(node))
|
|
256723
|
-
return visitor.Scalar?.(
|
|
256726
|
+
return visitor.Scalar?.(key2, node, path5);
|
|
256724
256727
|
if (identity2.isAlias(node))
|
|
256725
|
-
return visitor.Alias?.(
|
|
256728
|
+
return visitor.Alias?.(key2, node, path5);
|
|
256726
256729
|
return;
|
|
256727
256730
|
}
|
|
256728
|
-
function replaceNode(
|
|
256731
|
+
function replaceNode(key2, path5, node) {
|
|
256729
256732
|
const parent = path5[path5.length - 1];
|
|
256730
256733
|
if (identity2.isCollection(parent)) {
|
|
256731
|
-
parent.items[
|
|
256734
|
+
parent.items[key2] = node;
|
|
256732
256735
|
} else if (identity2.isPair(parent)) {
|
|
256733
|
-
if (
|
|
256736
|
+
if (key2 === "key")
|
|
256734
256737
|
parent.key = node;
|
|
256735
256738
|
else
|
|
256736
256739
|
parent.value = node;
|
|
@@ -256962,7 +256965,7 @@ var require_anchors = __commonJS((exports) => {
|
|
|
256962
256965
|
|
|
256963
256966
|
// ../../node_modules/yaml/dist/doc/applyReviver.js
|
|
256964
256967
|
var require_applyReviver = __commonJS((exports) => {
|
|
256965
|
-
function applyReviver(reviver, obj,
|
|
256968
|
+
function applyReviver(reviver, obj, key2, val) {
|
|
256966
256969
|
if (val && typeof val === "object") {
|
|
256967
256970
|
if (Array.isArray(val)) {
|
|
256968
256971
|
for (let i6 = 0, len = val.length;i6 < len; ++i6) {
|
|
@@ -257002,7 +257005,7 @@ var require_applyReviver = __commonJS((exports) => {
|
|
|
257002
257005
|
}
|
|
257003
257006
|
}
|
|
257004
257007
|
}
|
|
257005
|
-
return reviver.call(obj,
|
|
257008
|
+
return reviver.call(obj, key2, val);
|
|
257006
257009
|
}
|
|
257007
257010
|
exports.applyReviver = applyReviver;
|
|
257008
257011
|
});
|
|
@@ -257320,29 +257323,29 @@ var require_Collection = __commonJS((exports) => {
|
|
|
257320
257323
|
if (isEmptyPath(path5))
|
|
257321
257324
|
this.add(value4);
|
|
257322
257325
|
else {
|
|
257323
|
-
const [
|
|
257324
|
-
const node = this.get(
|
|
257326
|
+
const [key2, ...rest] = path5;
|
|
257327
|
+
const node = this.get(key2, true);
|
|
257325
257328
|
if (identity2.isCollection(node))
|
|
257326
257329
|
node.addIn(rest, value4);
|
|
257327
257330
|
else if (node === undefined && this.schema)
|
|
257328
|
-
this.set(
|
|
257331
|
+
this.set(key2, collectionFromPath(this.schema, rest, value4));
|
|
257329
257332
|
else
|
|
257330
|
-
throw new Error(`Expected YAML collection at ${
|
|
257333
|
+
throw new Error(`Expected YAML collection at ${key2}. Remaining path: ${rest}`);
|
|
257331
257334
|
}
|
|
257332
257335
|
}
|
|
257333
257336
|
deleteIn(path5) {
|
|
257334
|
-
const [
|
|
257337
|
+
const [key2, ...rest] = path5;
|
|
257335
257338
|
if (rest.length === 0)
|
|
257336
|
-
return this.delete(
|
|
257337
|
-
const node = this.get(
|
|
257339
|
+
return this.delete(key2);
|
|
257340
|
+
const node = this.get(key2, true);
|
|
257338
257341
|
if (identity2.isCollection(node))
|
|
257339
257342
|
return node.deleteIn(rest);
|
|
257340
257343
|
else
|
|
257341
|
-
throw new Error(`Expected YAML collection at ${
|
|
257344
|
+
throw new Error(`Expected YAML collection at ${key2}. Remaining path: ${rest}`);
|
|
257342
257345
|
}
|
|
257343
257346
|
getIn(path5, keepScalar) {
|
|
257344
|
-
const [
|
|
257345
|
-
const node = this.get(
|
|
257347
|
+
const [key2, ...rest] = path5;
|
|
257348
|
+
const node = this.get(key2, true);
|
|
257346
257349
|
if (rest.length === 0)
|
|
257347
257350
|
return !keepScalar && identity2.isScalar(node) ? node.value : node;
|
|
257348
257351
|
else
|
|
@@ -257357,24 +257360,24 @@ var require_Collection = __commonJS((exports) => {
|
|
|
257357
257360
|
});
|
|
257358
257361
|
}
|
|
257359
257362
|
hasIn(path5) {
|
|
257360
|
-
const [
|
|
257363
|
+
const [key2, ...rest] = path5;
|
|
257361
257364
|
if (rest.length === 0)
|
|
257362
|
-
return this.has(
|
|
257363
|
-
const node = this.get(
|
|
257365
|
+
return this.has(key2);
|
|
257366
|
+
const node = this.get(key2, true);
|
|
257364
257367
|
return identity2.isCollection(node) ? node.hasIn(rest) : false;
|
|
257365
257368
|
}
|
|
257366
257369
|
setIn(path5, value4) {
|
|
257367
|
-
const [
|
|
257370
|
+
const [key2, ...rest] = path5;
|
|
257368
257371
|
if (rest.length === 0) {
|
|
257369
|
-
this.set(
|
|
257372
|
+
this.set(key2, value4);
|
|
257370
257373
|
} else {
|
|
257371
|
-
const node = this.get(
|
|
257374
|
+
const node = this.get(key2, true);
|
|
257372
257375
|
if (identity2.isCollection(node))
|
|
257373
257376
|
node.setIn(rest, value4);
|
|
257374
257377
|
else if (node === undefined && this.schema)
|
|
257375
|
-
this.set(
|
|
257378
|
+
this.set(key2, collectionFromPath(this.schema, rest, value4));
|
|
257376
257379
|
else
|
|
257377
|
-
throw new Error(`Expected YAML collection at ${
|
|
257380
|
+
throw new Error(`Expected YAML collection at ${key2}. Remaining path: ${rest}`);
|
|
257378
257381
|
}
|
|
257379
257382
|
}
|
|
257380
257383
|
}
|
|
@@ -257962,19 +257965,19 @@ var require_stringifyPair = __commonJS((exports) => {
|
|
|
257962
257965
|
var Scalar = require_Scalar();
|
|
257963
257966
|
var stringify3 = require_stringify();
|
|
257964
257967
|
var stringifyComment = require_stringifyComment();
|
|
257965
|
-
function stringifyPair2({ key:
|
|
257968
|
+
function stringifyPair2({ key: key2, value: value4 }, ctx, onComment, onChompKeep) {
|
|
257966
257969
|
const { allNullValues, doc, indent: indent2, indentStep, options: { commentString, indentSeq, simpleKeys } } = ctx;
|
|
257967
|
-
let keyComment = identity2.isNode(
|
|
257970
|
+
let keyComment = identity2.isNode(key2) && key2.comment || null;
|
|
257968
257971
|
if (simpleKeys) {
|
|
257969
257972
|
if (keyComment) {
|
|
257970
257973
|
throw new Error("With simple keys, key nodes cannot have comments");
|
|
257971
257974
|
}
|
|
257972
|
-
if (identity2.isCollection(
|
|
257975
|
+
if (identity2.isCollection(key2) || !identity2.isNode(key2) && typeof key2 === "object") {
|
|
257973
257976
|
const msg = "With simple keys, collection cannot be used as a key value";
|
|
257974
257977
|
throw new Error(msg);
|
|
257975
257978
|
}
|
|
257976
257979
|
}
|
|
257977
|
-
let explicitKey = !simpleKeys && (!
|
|
257980
|
+
let explicitKey = !simpleKeys && (!key2 || keyComment && value4 == null && !ctx.inFlow || identity2.isCollection(key2) || (identity2.isScalar(key2) ? key2.type === Scalar.Scalar.BLOCK_FOLDED || key2.type === Scalar.Scalar.BLOCK_LITERAL : typeof key2 === "object"));
|
|
257978
257981
|
ctx = Object.assign({}, ctx, {
|
|
257979
257982
|
allNullValues: false,
|
|
257980
257983
|
implicitKey: !explicitKey && (simpleKeys || !allNullValues),
|
|
@@ -257982,7 +257985,7 @@ var require_stringifyPair = __commonJS((exports) => {
|
|
|
257982
257985
|
});
|
|
257983
257986
|
let keyCommentDone = false;
|
|
257984
257987
|
let chompKeep = false;
|
|
257985
|
-
let str = stringify3.stringify(
|
|
257988
|
+
let str = stringify3.stringify(key2, ctx, () => keyCommentDone = true, () => chompKeep = true);
|
|
257986
257989
|
if (!explicitKey && !ctx.inFlow && str.length > 1024) {
|
|
257987
257990
|
if (simpleKeys)
|
|
257988
257991
|
throw new Error("With simple keys, single line scalar must not span more than 1024 characters");
|
|
@@ -258126,7 +258129,7 @@ var require_merge = __commonJS((exports) => {
|
|
|
258126
258129
|
}),
|
|
258127
258130
|
stringify: () => MERGE_KEY
|
|
258128
258131
|
};
|
|
258129
|
-
var isMergeKey = (ctx,
|
|
258132
|
+
var isMergeKey = (ctx, key2) => (merge3.identify(key2) || identity2.isScalar(key2) && (!key2.type || key2.type === Scalar.Scalar.PLAIN) && merge3.identify(key2.value)) && ctx?.doc.schema.tags.some((tag) => tag.tag === merge3.tag && tag.default);
|
|
258130
258133
|
function addMergeToJSMap(ctx, map3, value4) {
|
|
258131
258134
|
value4 = ctx && identity2.isAlias(value4) ? value4.resolve(ctx.doc) : value4;
|
|
258132
258135
|
if (identity2.isSeq(value4))
|
|
@@ -258143,14 +258146,14 @@ var require_merge = __commonJS((exports) => {
|
|
|
258143
258146
|
if (!identity2.isMap(source))
|
|
258144
258147
|
throw new Error("Merge sources must be maps or map aliases");
|
|
258145
258148
|
const srcMap = source.toJSON(null, ctx, Map);
|
|
258146
|
-
for (const [
|
|
258149
|
+
for (const [key2, value5] of srcMap) {
|
|
258147
258150
|
if (map3 instanceof Map) {
|
|
258148
|
-
if (!map3.has(
|
|
258149
|
-
map3.set(
|
|
258151
|
+
if (!map3.has(key2))
|
|
258152
|
+
map3.set(key2, value5);
|
|
258150
258153
|
} else if (map3 instanceof Set) {
|
|
258151
|
-
map3.add(
|
|
258152
|
-
} else if (!Object.prototype.hasOwnProperty.call(map3,
|
|
258153
|
-
Object.defineProperty(map3,
|
|
258154
|
+
map3.add(key2);
|
|
258155
|
+
} else if (!Object.prototype.hasOwnProperty.call(map3, key2)) {
|
|
258156
|
+
Object.defineProperty(map3, key2, {
|
|
258154
258157
|
value: value5,
|
|
258155
258158
|
writable: true,
|
|
258156
258159
|
enumerable: true,
|
|
@@ -258172,19 +258175,19 @@ var require_addPairToJSMap = __commonJS((exports) => {
|
|
|
258172
258175
|
var stringify3 = require_stringify();
|
|
258173
258176
|
var identity2 = require_identity();
|
|
258174
258177
|
var toJS = require_toJS();
|
|
258175
|
-
function addPairToJSMap(ctx, map3, { key:
|
|
258176
|
-
if (identity2.isNode(
|
|
258177
|
-
|
|
258178
|
-
else if (merge3.isMergeKey(ctx,
|
|
258178
|
+
function addPairToJSMap(ctx, map3, { key: key2, value: value4 }) {
|
|
258179
|
+
if (identity2.isNode(key2) && key2.addToJSMap)
|
|
258180
|
+
key2.addToJSMap(ctx, map3, value4);
|
|
258181
|
+
else if (merge3.isMergeKey(ctx, key2))
|
|
258179
258182
|
merge3.addMergeToJSMap(ctx, map3, value4);
|
|
258180
258183
|
else {
|
|
258181
|
-
const jsKey = toJS.toJS(
|
|
258184
|
+
const jsKey = toJS.toJS(key2, "", ctx);
|
|
258182
258185
|
if (map3 instanceof Map) {
|
|
258183
258186
|
map3.set(jsKey, toJS.toJS(value4, jsKey, ctx));
|
|
258184
258187
|
} else if (map3 instanceof Set) {
|
|
258185
258188
|
map3.add(jsKey);
|
|
258186
258189
|
} else {
|
|
258187
|
-
const stringKey = stringifyKey(
|
|
258190
|
+
const stringKey = stringifyKey(key2, jsKey, ctx);
|
|
258188
258191
|
const jsValue = toJS.toJS(value4, stringKey, ctx);
|
|
258189
258192
|
if (stringKey in map3)
|
|
258190
258193
|
Object.defineProperty(map3, stringKey, {
|
|
@@ -258199,19 +258202,19 @@ var require_addPairToJSMap = __commonJS((exports) => {
|
|
|
258199
258202
|
}
|
|
258200
258203
|
return map3;
|
|
258201
258204
|
}
|
|
258202
|
-
function stringifyKey(
|
|
258205
|
+
function stringifyKey(key2, jsKey, ctx) {
|
|
258203
258206
|
if (jsKey === null)
|
|
258204
258207
|
return "";
|
|
258205
258208
|
if (typeof jsKey !== "object")
|
|
258206
258209
|
return String(jsKey);
|
|
258207
|
-
if (identity2.isNode(
|
|
258210
|
+
if (identity2.isNode(key2) && ctx?.doc) {
|
|
258208
258211
|
const strCtx = stringify3.createStringifyContext(ctx.doc, {});
|
|
258209
258212
|
strCtx.anchors = new Set;
|
|
258210
258213
|
for (const node of ctx.anchors.keys())
|
|
258211
258214
|
strCtx.anchors.add(node.anchor);
|
|
258212
258215
|
strCtx.inFlow = true;
|
|
258213
258216
|
strCtx.inStringifyKey = true;
|
|
258214
|
-
const strKey =
|
|
258217
|
+
const strKey = key2.toString(strCtx);
|
|
258215
258218
|
if (!ctx.mapKeyWarned) {
|
|
258216
258219
|
let jsonStr = JSON.stringify(strKey);
|
|
258217
258220
|
if (jsonStr.length > 40)
|
|
@@ -258232,25 +258235,25 @@ var require_Pair = __commonJS((exports) => {
|
|
|
258232
258235
|
var stringifyPair2 = require_stringifyPair();
|
|
258233
258236
|
var addPairToJSMap = require_addPairToJSMap();
|
|
258234
258237
|
var identity2 = require_identity();
|
|
258235
|
-
function createPair(
|
|
258236
|
-
const k5 = createNode.createNode(
|
|
258238
|
+
function createPair(key2, value4, ctx) {
|
|
258239
|
+
const k5 = createNode.createNode(key2, undefined, ctx);
|
|
258237
258240
|
const v7 = createNode.createNode(value4, undefined, ctx);
|
|
258238
258241
|
return new Pair(k5, v7);
|
|
258239
258242
|
}
|
|
258240
258243
|
|
|
258241
258244
|
class Pair {
|
|
258242
|
-
constructor(
|
|
258245
|
+
constructor(key2, value4 = null) {
|
|
258243
258246
|
Object.defineProperty(this, identity2.NODE_TYPE, { value: identity2.PAIR });
|
|
258244
|
-
this.key =
|
|
258247
|
+
this.key = key2;
|
|
258245
258248
|
this.value = value4;
|
|
258246
258249
|
}
|
|
258247
258250
|
clone(schema) {
|
|
258248
|
-
let { key:
|
|
258249
|
-
if (identity2.isNode(
|
|
258250
|
-
|
|
258251
|
+
let { key: key2, value: value4 } = this;
|
|
258252
|
+
if (identity2.isNode(key2))
|
|
258253
|
+
key2 = key2.clone(schema);
|
|
258251
258254
|
if (identity2.isNode(value4))
|
|
258252
258255
|
value4 = value4.clone(schema);
|
|
258253
|
-
return new Pair(
|
|
258256
|
+
return new Pair(key2, value4);
|
|
258254
258257
|
}
|
|
258255
258258
|
toJSON(_5, ctx) {
|
|
258256
258259
|
const pair = ctx?.mapAsMap ? new Map : {};
|
|
@@ -258417,11 +258420,11 @@ var require_YAMLMap = __commonJS((exports) => {
|
|
|
258417
258420
|
var identity2 = require_identity();
|
|
258418
258421
|
var Pair = require_Pair();
|
|
258419
258422
|
var Scalar = require_Scalar();
|
|
258420
|
-
function findPair(items,
|
|
258421
|
-
const k5 = identity2.isScalar(
|
|
258423
|
+
function findPair(items, key2) {
|
|
258424
|
+
const k5 = identity2.isScalar(key2) ? key2.value : key2;
|
|
258422
258425
|
for (const it2 of items) {
|
|
258423
258426
|
if (identity2.isPair(it2)) {
|
|
258424
|
-
if (it2.key ===
|
|
258427
|
+
if (it2.key === key2 || it2.key === k5)
|
|
258425
258428
|
return it2;
|
|
258426
258429
|
if (identity2.isScalar(it2.key) && it2.key.value === k5)
|
|
258427
258430
|
return it2;
|
|
@@ -258441,20 +258444,20 @@ var require_YAMLMap = __commonJS((exports) => {
|
|
|
258441
258444
|
static from(schema, obj, ctx) {
|
|
258442
258445
|
const { keepUndefined, replacer } = ctx;
|
|
258443
258446
|
const map3 = new this(schema);
|
|
258444
|
-
const add = (
|
|
258447
|
+
const add = (key2, value4) => {
|
|
258445
258448
|
if (typeof replacer === "function")
|
|
258446
|
-
value4 = replacer.call(obj,
|
|
258447
|
-
else if (Array.isArray(replacer) && !replacer.includes(
|
|
258449
|
+
value4 = replacer.call(obj, key2, value4);
|
|
258450
|
+
else if (Array.isArray(replacer) && !replacer.includes(key2))
|
|
258448
258451
|
return;
|
|
258449
258452
|
if (value4 !== undefined || keepUndefined)
|
|
258450
|
-
map3.items.push(Pair.createPair(
|
|
258453
|
+
map3.items.push(Pair.createPair(key2, value4, ctx));
|
|
258451
258454
|
};
|
|
258452
258455
|
if (obj instanceof Map) {
|
|
258453
|
-
for (const [
|
|
258454
|
-
add(
|
|
258456
|
+
for (const [key2, value4] of obj)
|
|
258457
|
+
add(key2, value4);
|
|
258455
258458
|
} else if (obj && typeof obj === "object") {
|
|
258456
|
-
for (const
|
|
258457
|
-
add(
|
|
258459
|
+
for (const key2 of Object.keys(obj))
|
|
258460
|
+
add(key2, obj[key2]);
|
|
258458
258461
|
}
|
|
258459
258462
|
if (typeof schema.sortMapEntries === "function") {
|
|
258460
258463
|
map3.items.sort(schema.sortMapEntries);
|
|
@@ -258488,23 +258491,23 @@ var require_YAMLMap = __commonJS((exports) => {
|
|
|
258488
258491
|
this.items.push(_pair);
|
|
258489
258492
|
}
|
|
258490
258493
|
}
|
|
258491
|
-
delete(
|
|
258492
|
-
const it2 = findPair(this.items,
|
|
258494
|
+
delete(key2) {
|
|
258495
|
+
const it2 = findPair(this.items, key2);
|
|
258493
258496
|
if (!it2)
|
|
258494
258497
|
return false;
|
|
258495
258498
|
const del = this.items.splice(this.items.indexOf(it2), 1);
|
|
258496
258499
|
return del.length > 0;
|
|
258497
258500
|
}
|
|
258498
|
-
get(
|
|
258499
|
-
const it2 = findPair(this.items,
|
|
258501
|
+
get(key2, keepScalar) {
|
|
258502
|
+
const it2 = findPair(this.items, key2);
|
|
258500
258503
|
const node = it2?.value;
|
|
258501
258504
|
return (!keepScalar && identity2.isScalar(node) ? node.value : node) ?? undefined;
|
|
258502
258505
|
}
|
|
258503
|
-
has(
|
|
258504
|
-
return !!findPair(this.items,
|
|
258506
|
+
has(key2) {
|
|
258507
|
+
return !!findPair(this.items, key2);
|
|
258505
258508
|
}
|
|
258506
|
-
set(
|
|
258507
|
-
this.add(new Pair.Pair(
|
|
258509
|
+
set(key2, value4) {
|
|
258510
|
+
this.add(new Pair.Pair(key2, value4), true);
|
|
258508
258511
|
}
|
|
258509
258512
|
toJSON(_5, ctx, Type) {
|
|
258510
258513
|
const map3 = Type ? new Type : ctx?.mapAsMap ? new Map : {};
|
|
@@ -258575,28 +258578,28 @@ var require_YAMLSeq = __commonJS((exports) => {
|
|
|
258575
258578
|
add(value4) {
|
|
258576
258579
|
this.items.push(value4);
|
|
258577
258580
|
}
|
|
258578
|
-
delete(
|
|
258579
|
-
const idx = asItemIndex(
|
|
258581
|
+
delete(key2) {
|
|
258582
|
+
const idx = asItemIndex(key2);
|
|
258580
258583
|
if (typeof idx !== "number")
|
|
258581
258584
|
return false;
|
|
258582
258585
|
const del = this.items.splice(idx, 1);
|
|
258583
258586
|
return del.length > 0;
|
|
258584
258587
|
}
|
|
258585
|
-
get(
|
|
258586
|
-
const idx = asItemIndex(
|
|
258588
|
+
get(key2, keepScalar) {
|
|
258589
|
+
const idx = asItemIndex(key2);
|
|
258587
258590
|
if (typeof idx !== "number")
|
|
258588
258591
|
return;
|
|
258589
258592
|
const it2 = this.items[idx];
|
|
258590
258593
|
return !keepScalar && identity2.isScalar(it2) ? it2.value : it2;
|
|
258591
258594
|
}
|
|
258592
|
-
has(
|
|
258593
|
-
const idx = asItemIndex(
|
|
258595
|
+
has(key2) {
|
|
258596
|
+
const idx = asItemIndex(key2);
|
|
258594
258597
|
return typeof idx === "number" && idx < this.items.length;
|
|
258595
258598
|
}
|
|
258596
|
-
set(
|
|
258597
|
-
const idx = asItemIndex(
|
|
258599
|
+
set(key2, value4) {
|
|
258600
|
+
const idx = asItemIndex(key2);
|
|
258598
258601
|
if (typeof idx !== "number")
|
|
258599
|
-
throw new Error(`Expected a valid index, not ${
|
|
258602
|
+
throw new Error(`Expected a valid index, not ${key2}.`);
|
|
258600
258603
|
const prev = this.items[idx];
|
|
258601
258604
|
if (identity2.isScalar(prev) && Scalar.isScalarValue(value4))
|
|
258602
258605
|
prev.value = value4;
|
|
@@ -258630,8 +258633,8 @@ var require_YAMLSeq = __commonJS((exports) => {
|
|
|
258630
258633
|
let i6 = 0;
|
|
258631
258634
|
for (let it2 of obj) {
|
|
258632
258635
|
if (typeof replacer === "function") {
|
|
258633
|
-
const
|
|
258634
|
-
it2 = replacer.call(obj,
|
|
258636
|
+
const key2 = obj instanceof Set ? it2 : String(i6++);
|
|
258637
|
+
it2 = replacer.call(obj, key2, it2);
|
|
258635
258638
|
}
|
|
258636
258639
|
seq.items.push(createNode.createNode(it2, undefined, ctx));
|
|
258637
258640
|
}
|
|
@@ -258639,8 +258642,8 @@ var require_YAMLSeq = __commonJS((exports) => {
|
|
|
258639
258642
|
return seq;
|
|
258640
258643
|
}
|
|
258641
258644
|
}
|
|
258642
|
-
function asItemIndex(
|
|
258643
|
-
let idx = identity2.isScalar(
|
|
258645
|
+
function asItemIndex(key2) {
|
|
258646
|
+
let idx = identity2.isScalar(key2) ? key2.value : key2;
|
|
258644
258647
|
if (idx && typeof idx === "string")
|
|
258645
258648
|
idx = Number(idx);
|
|
258646
258649
|
return typeof idx === "number" && Number.isInteger(idx) && idx >= 0 ? idx : null;
|
|
@@ -259012,25 +259015,25 @@ ${cn.comment}` : item.comment;
|
|
|
259012
259015
|
for (let it2 of iterable) {
|
|
259013
259016
|
if (typeof replacer === "function")
|
|
259014
259017
|
it2 = replacer.call(iterable, String(i6++), it2);
|
|
259015
|
-
let
|
|
259018
|
+
let key2, value4;
|
|
259016
259019
|
if (Array.isArray(it2)) {
|
|
259017
259020
|
if (it2.length === 2) {
|
|
259018
|
-
|
|
259021
|
+
key2 = it2[0];
|
|
259019
259022
|
value4 = it2[1];
|
|
259020
259023
|
} else
|
|
259021
259024
|
throw new TypeError(`Expected [key, value] tuple: ${it2}`);
|
|
259022
259025
|
} else if (it2 && it2 instanceof Object) {
|
|
259023
259026
|
const keys = Object.keys(it2);
|
|
259024
259027
|
if (keys.length === 1) {
|
|
259025
|
-
|
|
259026
|
-
value4 = it2[
|
|
259028
|
+
key2 = keys[0];
|
|
259029
|
+
value4 = it2[key2];
|
|
259027
259030
|
} else {
|
|
259028
259031
|
throw new TypeError(`Expected tuple with one key, not ${keys.length} keys`);
|
|
259029
259032
|
}
|
|
259030
259033
|
} else {
|
|
259031
|
-
|
|
259034
|
+
key2 = it2;
|
|
259032
259035
|
}
|
|
259033
|
-
pairs2.items.push(Pair.createPair(
|
|
259036
|
+
pairs2.items.push(Pair.createPair(key2, value4, ctx));
|
|
259034
259037
|
}
|
|
259035
259038
|
return pairs2;
|
|
259036
259039
|
}
|
|
@@ -259071,16 +259074,16 @@ var require_omap = __commonJS((exports) => {
|
|
|
259071
259074
|
if (ctx?.onCreate)
|
|
259072
259075
|
ctx.onCreate(map3);
|
|
259073
259076
|
for (const pair of this.items) {
|
|
259074
|
-
let
|
|
259077
|
+
let key2, value4;
|
|
259075
259078
|
if (identity2.isPair(pair)) {
|
|
259076
|
-
|
|
259077
|
-
value4 = toJS.toJS(pair.value,
|
|
259079
|
+
key2 = toJS.toJS(pair.key, "", ctx);
|
|
259080
|
+
value4 = toJS.toJS(pair.value, key2, ctx);
|
|
259078
259081
|
} else {
|
|
259079
|
-
|
|
259082
|
+
key2 = toJS.toJS(pair, "", ctx);
|
|
259080
259083
|
}
|
|
259081
|
-
if (map3.has(
|
|
259084
|
+
if (map3.has(key2))
|
|
259082
259085
|
throw new Error("Ordered maps must not include duplicate keys");
|
|
259083
|
-
map3.set(
|
|
259086
|
+
map3.set(key2, value4);
|
|
259084
259087
|
}
|
|
259085
259088
|
return map3;
|
|
259086
259089
|
}
|
|
@@ -259101,12 +259104,12 @@ var require_omap = __commonJS((exports) => {
|
|
|
259101
259104
|
resolve(seq, onError) {
|
|
259102
259105
|
const pairs$1 = pairs.resolvePairs(seq, onError);
|
|
259103
259106
|
const seenKeys = [];
|
|
259104
|
-
for (const { key:
|
|
259105
|
-
if (identity2.isScalar(
|
|
259106
|
-
if (seenKeys.includes(
|
|
259107
|
-
onError(`Ordered maps must not include duplicate keys: ${
|
|
259107
|
+
for (const { key: key2 } of pairs$1.items) {
|
|
259108
|
+
if (identity2.isScalar(key2)) {
|
|
259109
|
+
if (seenKeys.includes(key2.value)) {
|
|
259110
|
+
onError(`Ordered maps must not include duplicate keys: ${key2.value}`);
|
|
259108
259111
|
} else {
|
|
259109
|
-
seenKeys.push(
|
|
259112
|
+
seenKeys.push(key2.value);
|
|
259110
259113
|
}
|
|
259111
259114
|
}
|
|
259112
259115
|
}
|
|
@@ -259280,30 +259283,30 @@ var require_set = __commonJS((exports) => {
|
|
|
259280
259283
|
super(schema);
|
|
259281
259284
|
this.tag = YAMLSet.tag;
|
|
259282
259285
|
}
|
|
259283
|
-
add(
|
|
259286
|
+
add(key2) {
|
|
259284
259287
|
let pair;
|
|
259285
|
-
if (identity2.isPair(
|
|
259286
|
-
pair =
|
|
259287
|
-
else if (
|
|
259288
|
-
pair = new Pair.Pair(
|
|
259288
|
+
if (identity2.isPair(key2))
|
|
259289
|
+
pair = key2;
|
|
259290
|
+
else if (key2 && typeof key2 === "object" && "key" in key2 && "value" in key2 && key2.value === null)
|
|
259291
|
+
pair = new Pair.Pair(key2.key, null);
|
|
259289
259292
|
else
|
|
259290
|
-
pair = new Pair.Pair(
|
|
259293
|
+
pair = new Pair.Pair(key2, null);
|
|
259291
259294
|
const prev = YAMLMap.findPair(this.items, pair.key);
|
|
259292
259295
|
if (!prev)
|
|
259293
259296
|
this.items.push(pair);
|
|
259294
259297
|
}
|
|
259295
|
-
get(
|
|
259296
|
-
const pair = YAMLMap.findPair(this.items,
|
|
259298
|
+
get(key2, keepPair) {
|
|
259299
|
+
const pair = YAMLMap.findPair(this.items, key2);
|
|
259297
259300
|
return !keepPair && identity2.isPair(pair) ? identity2.isScalar(pair.key) ? pair.key.value : pair.key : pair;
|
|
259298
259301
|
}
|
|
259299
|
-
set(
|
|
259302
|
+
set(key2, value4) {
|
|
259300
259303
|
if (typeof value4 !== "boolean")
|
|
259301
259304
|
throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof value4}`);
|
|
259302
|
-
const prev = YAMLMap.findPair(this.items,
|
|
259305
|
+
const prev = YAMLMap.findPair(this.items, key2);
|
|
259303
259306
|
if (prev && !value4) {
|
|
259304
259307
|
this.items.splice(this.items.indexOf(prev), 1);
|
|
259305
259308
|
} else if (!prev && value4) {
|
|
259306
|
-
this.items.push(new Pair.Pair(
|
|
259309
|
+
this.items.push(new Pair.Pair(key2));
|
|
259307
259310
|
}
|
|
259308
259311
|
}
|
|
259309
259312
|
toJSON(_5, ctx) {
|
|
@@ -259538,7 +259541,7 @@ var require_tags = __commonJS((exports) => {
|
|
|
259538
259541
|
if (Array.isArray(customTags))
|
|
259539
259542
|
tags = [];
|
|
259540
259543
|
else {
|
|
259541
|
-
const keys = Array.from(schemas.keys()).filter((
|
|
259544
|
+
const keys = Array.from(schemas.keys()).filter((key2) => key2 !== "yaml11").map((key2) => JSON.stringify(key2)).join(", ");
|
|
259542
259545
|
throw new Error(`Unknown schema "${schemaName}"; use one of ${keys} or define customTags array`);
|
|
259543
259546
|
}
|
|
259544
259547
|
}
|
|
@@ -259554,7 +259557,7 @@ var require_tags = __commonJS((exports) => {
|
|
|
259554
259557
|
const tagObj = typeof tag === "string" ? tagsByName[tag] : tag;
|
|
259555
259558
|
if (!tagObj) {
|
|
259556
259559
|
const tagName = JSON.stringify(tag);
|
|
259557
|
-
const keys = Object.keys(tagsByName).map((
|
|
259560
|
+
const keys = Object.keys(tagsByName).map((key2) => JSON.stringify(key2)).join(", ");
|
|
259558
259561
|
throw new Error(`Unknown custom tag ${tagName}; use one of ${keys}`);
|
|
259559
259562
|
}
|
|
259560
259563
|
if (!tags2.includes(tagObj))
|
|
@@ -259789,13 +259792,13 @@ var require_Document = __commonJS((exports) => {
|
|
|
259789
259792
|
setAnchors();
|
|
259790
259793
|
return node;
|
|
259791
259794
|
}
|
|
259792
|
-
createPair(
|
|
259793
|
-
const k5 = this.createNode(
|
|
259795
|
+
createPair(key2, value4, options = {}) {
|
|
259796
|
+
const k5 = this.createNode(key2, null, options);
|
|
259794
259797
|
const v7 = this.createNode(value4, null, options);
|
|
259795
259798
|
return new Pair.Pair(k5, v7);
|
|
259796
259799
|
}
|
|
259797
|
-
delete(
|
|
259798
|
-
return assertCollection(this.contents) ? this.contents.delete(
|
|
259800
|
+
delete(key2) {
|
|
259801
|
+
return assertCollection(this.contents) ? this.contents.delete(key2) : false;
|
|
259799
259802
|
}
|
|
259800
259803
|
deleteIn(path5) {
|
|
259801
259804
|
if (Collection.isEmptyPath(path5)) {
|
|
@@ -259806,27 +259809,27 @@ var require_Document = __commonJS((exports) => {
|
|
|
259806
259809
|
}
|
|
259807
259810
|
return assertCollection(this.contents) ? this.contents.deleteIn(path5) : false;
|
|
259808
259811
|
}
|
|
259809
|
-
get(
|
|
259810
|
-
return identity2.isCollection(this.contents) ? this.contents.get(
|
|
259812
|
+
get(key2, keepScalar) {
|
|
259813
|
+
return identity2.isCollection(this.contents) ? this.contents.get(key2, keepScalar) : undefined;
|
|
259811
259814
|
}
|
|
259812
259815
|
getIn(path5, keepScalar) {
|
|
259813
259816
|
if (Collection.isEmptyPath(path5))
|
|
259814
259817
|
return !keepScalar && identity2.isScalar(this.contents) ? this.contents.value : this.contents;
|
|
259815
259818
|
return identity2.isCollection(this.contents) ? this.contents.getIn(path5, keepScalar) : undefined;
|
|
259816
259819
|
}
|
|
259817
|
-
has(
|
|
259818
|
-
return identity2.isCollection(this.contents) ? this.contents.has(
|
|
259820
|
+
has(key2) {
|
|
259821
|
+
return identity2.isCollection(this.contents) ? this.contents.has(key2) : false;
|
|
259819
259822
|
}
|
|
259820
259823
|
hasIn(path5) {
|
|
259821
259824
|
if (Collection.isEmptyPath(path5))
|
|
259822
259825
|
return this.contents !== undefined;
|
|
259823
259826
|
return identity2.isCollection(this.contents) ? this.contents.hasIn(path5) : false;
|
|
259824
259827
|
}
|
|
259825
|
-
set(
|
|
259828
|
+
set(key2, value4) {
|
|
259826
259829
|
if (this.contents == null) {
|
|
259827
|
-
this.contents = Collection.collectionFromPath(this.schema, [
|
|
259830
|
+
this.contents = Collection.collectionFromPath(this.schema, [key2], value4);
|
|
259828
259831
|
} else if (assertCollection(this.contents)) {
|
|
259829
|
-
this.contents.set(
|
|
259832
|
+
this.contents.set(key2, value4);
|
|
259830
259833
|
}
|
|
259831
259834
|
}
|
|
259832
259835
|
setIn(path5, value4) {
|
|
@@ -260110,25 +260113,25 @@ var require_resolve_props = __commonJS((exports) => {
|
|
|
260110
260113
|
|
|
260111
260114
|
// ../../node_modules/yaml/dist/compose/util-contains-newline.js
|
|
260112
260115
|
var require_util_contains_newline = __commonJS((exports) => {
|
|
260113
|
-
function containsNewline(
|
|
260114
|
-
if (!
|
|
260116
|
+
function containsNewline(key2) {
|
|
260117
|
+
if (!key2)
|
|
260115
260118
|
return null;
|
|
260116
|
-
switch (
|
|
260119
|
+
switch (key2.type) {
|
|
260117
260120
|
case "alias":
|
|
260118
260121
|
case "scalar":
|
|
260119
260122
|
case "double-quoted-scalar":
|
|
260120
260123
|
case "single-quoted-scalar":
|
|
260121
|
-
if (
|
|
260124
|
+
if (key2.source.includes(`
|
|
260122
260125
|
`))
|
|
260123
260126
|
return true;
|
|
260124
|
-
if (
|
|
260125
|
-
for (const st2 of
|
|
260127
|
+
if (key2.end) {
|
|
260128
|
+
for (const st2 of key2.end)
|
|
260126
260129
|
if (st2.type === "newline")
|
|
260127
260130
|
return true;
|
|
260128
260131
|
}
|
|
260129
260132
|
return false;
|
|
260130
260133
|
case "flow-collection":
|
|
260131
|
-
for (const it2 of
|
|
260134
|
+
for (const it2 of key2.items) {
|
|
260132
260135
|
for (const st2 of it2.start)
|
|
260133
260136
|
if (st2.type === "newline")
|
|
260134
260137
|
return true;
|
|
@@ -260193,10 +260196,10 @@ var require_resolve_block_map = __commonJS((exports) => {
|
|
|
260193
260196
|
let offset = bm.offset;
|
|
260194
260197
|
let commentEnd = null;
|
|
260195
260198
|
for (const collItem of bm.items) {
|
|
260196
|
-
const { start: start3, key:
|
|
260199
|
+
const { start: start3, key: key2, sep: sep3, value: value4 } = collItem;
|
|
260197
260200
|
const keyProps = resolveProps.resolveProps(start3, {
|
|
260198
260201
|
indicator: "explicit-key-ind",
|
|
260199
|
-
next:
|
|
260202
|
+
next: key2 ?? sep3?.[0],
|
|
260200
260203
|
offset,
|
|
260201
260204
|
onError,
|
|
260202
260205
|
parentIndent: bm.indent,
|
|
@@ -260204,10 +260207,10 @@ var require_resolve_block_map = __commonJS((exports) => {
|
|
|
260204
260207
|
});
|
|
260205
260208
|
const implicitKey = !keyProps.found;
|
|
260206
260209
|
if (implicitKey) {
|
|
260207
|
-
if (
|
|
260208
|
-
if (
|
|
260210
|
+
if (key2) {
|
|
260211
|
+
if (key2.type === "block-seq")
|
|
260209
260212
|
onError(offset, "BLOCK_AS_IMPLICIT_KEY", "A block sequence may not be used as an implicit map key");
|
|
260210
|
-
else if ("indent" in
|
|
260213
|
+
else if ("indent" in key2 && key2.indent !== bm.indent)
|
|
260211
260214
|
onError(offset, "BAD_INDENT", startColMsg);
|
|
260212
260215
|
}
|
|
260213
260216
|
if (!keyProps.anchor && !keyProps.tag && !sep3) {
|
|
@@ -260221,17 +260224,17 @@ var require_resolve_block_map = __commonJS((exports) => {
|
|
|
260221
260224
|
}
|
|
260222
260225
|
continue;
|
|
260223
260226
|
}
|
|
260224
|
-
if (keyProps.newlineAfterProp || utilContainsNewline.containsNewline(
|
|
260225
|
-
onError(
|
|
260227
|
+
if (keyProps.newlineAfterProp || utilContainsNewline.containsNewline(key2)) {
|
|
260228
|
+
onError(key2 ?? start3[start3.length - 1], "MULTILINE_IMPLICIT_KEY", "Implicit keys need to be on a single line");
|
|
260226
260229
|
}
|
|
260227
260230
|
} else if (keyProps.found?.indent !== bm.indent) {
|
|
260228
260231
|
onError(offset, "BAD_INDENT", startColMsg);
|
|
260229
260232
|
}
|
|
260230
260233
|
ctx.atKey = true;
|
|
260231
260234
|
const keyStart = keyProps.end;
|
|
260232
|
-
const keyNode =
|
|
260235
|
+
const keyNode = key2 ? composeNode(ctx, key2, keyProps, onError) : composeEmptyNode(ctx, keyStart, start3, null, keyProps, onError);
|
|
260233
260236
|
if (ctx.schema.compat)
|
|
260234
|
-
utilFlowIndentCheck.flowIndentCheck(bm.indent,
|
|
260237
|
+
utilFlowIndentCheck.flowIndentCheck(bm.indent, key2, onError);
|
|
260235
260238
|
ctx.atKey = false;
|
|
260236
260239
|
if (utilMapIncludes.mapIncludes(ctx, map3.items, keyNode))
|
|
260237
260240
|
onError(keyStart, "DUPLICATE_KEY", "Map keys must be unique");
|
|
@@ -260241,7 +260244,7 @@ var require_resolve_block_map = __commonJS((exports) => {
|
|
|
260241
260244
|
offset: keyNode.range[2],
|
|
260242
260245
|
onError,
|
|
260243
260246
|
parentIndent: bm.indent,
|
|
260244
|
-
startOnNewline: !
|
|
260247
|
+
startOnNewline: !key2 || key2.type === "block-scalar"
|
|
260245
260248
|
});
|
|
260246
260249
|
offset = valueProps.end;
|
|
260247
260250
|
if (valueProps.found) {
|
|
@@ -260397,11 +260400,11 @@ var require_resolve_flow_collection = __commonJS((exports) => {
|
|
|
260397
260400
|
let offset = fc.offset + fc.start.source.length;
|
|
260398
260401
|
for (let i6 = 0;i6 < fc.items.length; ++i6) {
|
|
260399
260402
|
const collItem = fc.items[i6];
|
|
260400
|
-
const { start: start3, key:
|
|
260403
|
+
const { start: start3, key: key2, sep: sep3, value: value4 } = collItem;
|
|
260401
260404
|
const props = resolveProps.resolveProps(start3, {
|
|
260402
260405
|
flow: fcName,
|
|
260403
260406
|
indicator: "explicit-key-ind",
|
|
260404
|
-
next:
|
|
260407
|
+
next: key2 ?? sep3?.[0],
|
|
260405
260408
|
offset,
|
|
260406
260409
|
onError,
|
|
260407
260410
|
parentIndent: fc.indent,
|
|
@@ -260423,8 +260426,8 @@ var require_resolve_flow_collection = __commonJS((exports) => {
|
|
|
260423
260426
|
offset = props.end;
|
|
260424
260427
|
continue;
|
|
260425
260428
|
}
|
|
260426
|
-
if (!isMap && ctx.options.strict && utilContainsNewline.containsNewline(
|
|
260427
|
-
onError(
|
|
260429
|
+
if (!isMap && ctx.options.strict && utilContainsNewline.containsNewline(key2))
|
|
260430
|
+
onError(key2, "MULTILINE_IMPLICIT_KEY", "Implicit keys of flow sequence pairs need to be on a single line");
|
|
260428
260431
|
}
|
|
260429
260432
|
if (i6 === 0) {
|
|
260430
260433
|
if (props.comma)
|
|
@@ -260469,8 +260472,8 @@ var require_resolve_flow_collection = __commonJS((exports) => {
|
|
|
260469
260472
|
} else {
|
|
260470
260473
|
ctx.atKey = true;
|
|
260471
260474
|
const keyStart = props.end;
|
|
260472
|
-
const keyNode =
|
|
260473
|
-
if (isBlock(
|
|
260475
|
+
const keyNode = key2 ? composeNode(ctx, key2, props, onError) : composeEmptyNode(ctx, keyStart, start3, null, props, onError);
|
|
260476
|
+
if (isBlock(key2))
|
|
260474
260477
|
onError(keyNode.range, "BLOCK_IN_FLOW", blockMsg);
|
|
260475
260478
|
ctx.atKey = false;
|
|
260476
260479
|
const valueProps = resolveProps.resolveProps(sep3 ?? [], {
|
|
@@ -261282,7 +261285,7 @@ var require_composer = __commonJS((exports) => {
|
|
|
261282
261285
|
var node_process = __require("node:process");
|
|
261283
261286
|
var directives4 = require_directives2();
|
|
261284
261287
|
var Document = require_Document();
|
|
261285
|
-
var
|
|
261288
|
+
var errors2 = require_errors3();
|
|
261286
261289
|
var identity2 = require_identity();
|
|
261287
261290
|
var composeDoc = require_compose_doc();
|
|
261288
261291
|
var resolveEnd = require_resolve_end();
|
|
@@ -261333,9 +261336,9 @@ var require_composer = __commonJS((exports) => {
|
|
|
261333
261336
|
this.onError = (source, code2, message, warning) => {
|
|
261334
261337
|
const pos = getErrorPos(source);
|
|
261335
261338
|
if (warning)
|
|
261336
|
-
this.warnings.push(new
|
|
261339
|
+
this.warnings.push(new errors2.YAMLWarning(pos, code2, message));
|
|
261337
261340
|
else
|
|
261338
|
-
this.errors.push(new
|
|
261341
|
+
this.errors.push(new errors2.YAMLParseError(pos, code2, message));
|
|
261339
261342
|
};
|
|
261340
261343
|
this.directives = new directives4.Directives({ version: options.version || "1.2" });
|
|
261341
261344
|
this.options = options;
|
|
@@ -261419,7 +261422,7 @@ ${cb}` : comment;
|
|
|
261419
261422
|
break;
|
|
261420
261423
|
case "error": {
|
|
261421
261424
|
const msg = token.source ? `${token.message}: ${JSON.stringify(token.source)}` : token.message;
|
|
261422
|
-
const error5 = new
|
|
261425
|
+
const error5 = new errors2.YAMLParseError(getErrorPos(token), "UNEXPECTED_TOKEN", msg);
|
|
261423
261426
|
if (this.atDirectives || !this.doc)
|
|
261424
261427
|
this.errors.push(error5);
|
|
261425
261428
|
else
|
|
@@ -261429,7 +261432,7 @@ ${cb}` : comment;
|
|
|
261429
261432
|
case "doc-end": {
|
|
261430
261433
|
if (!this.doc) {
|
|
261431
261434
|
const msg = "Unexpected doc-end without preceding document";
|
|
261432
|
-
this.errors.push(new
|
|
261435
|
+
this.errors.push(new errors2.YAMLParseError(getErrorPos(token), "UNEXPECTED_TOKEN", msg));
|
|
261433
261436
|
break;
|
|
261434
261437
|
}
|
|
261435
261438
|
this.doc.directives.docEnd = true;
|
|
@@ -261444,7 +261447,7 @@ ${end.comment}` : end.comment;
|
|
|
261444
261447
|
break;
|
|
261445
261448
|
}
|
|
261446
261449
|
default:
|
|
261447
|
-
this.errors.push(new
|
|
261450
|
+
this.errors.push(new errors2.YAMLParseError(getErrorPos(token), "UNEXPECTED_TOKEN", `Unsupported token ${token.type}`));
|
|
261448
261451
|
}
|
|
261449
261452
|
}
|
|
261450
261453
|
*end(forceDoc = false, endOffset = -1) {
|
|
@@ -261470,7 +261473,7 @@ ${end.comment}` : end.comment;
|
|
|
261470
261473
|
var require_cst_scalar = __commonJS((exports) => {
|
|
261471
261474
|
var resolveBlockScalar = require_resolve_block_scalar();
|
|
261472
261475
|
var resolveFlowScalar = require_resolve_flow_scalar();
|
|
261473
|
-
var
|
|
261476
|
+
var errors2 = require_errors3();
|
|
261474
261477
|
var stringifyString = require_stringifyString();
|
|
261475
261478
|
function resolveAsScalar(token, strict = true, onError) {
|
|
261476
261479
|
if (token) {
|
|
@@ -261479,7 +261482,7 @@ var require_cst_scalar = __commonJS((exports) => {
|
|
|
261479
261482
|
if (onError)
|
|
261480
261483
|
onError(offset, code2, message);
|
|
261481
261484
|
else
|
|
261482
|
-
throw new
|
|
261485
|
+
throw new errors2.YAMLParseError([offset, offset + 1], code2, message);
|
|
261483
261486
|
};
|
|
261484
261487
|
switch (token.type) {
|
|
261485
261488
|
case "scalar":
|
|
@@ -261593,9 +261596,9 @@ var require_cst_scalar = __commonJS((exports) => {
|
|
|
261593
261596
|
if (!addEndtoBlockProps(props, "end" in token ? token.end : undefined))
|
|
261594
261597
|
props.push({ type: "newline", offset: -1, indent: indent2, source: `
|
|
261595
261598
|
` });
|
|
261596
|
-
for (const
|
|
261597
|
-
if (
|
|
261598
|
-
delete token[
|
|
261599
|
+
for (const key2 of Object.keys(token))
|
|
261600
|
+
if (key2 !== "type" && key2 !== "offset")
|
|
261601
|
+
delete token[key2];
|
|
261599
261602
|
Object.assign(token, { type: "block-scalar", indent: indent2, props, source: body });
|
|
261600
261603
|
}
|
|
261601
261604
|
}
|
|
@@ -261644,9 +261647,9 @@ var require_cst_scalar = __commonJS((exports) => {
|
|
|
261644
261647
|
default: {
|
|
261645
261648
|
const indent2 = "indent" in token ? token.indent : -1;
|
|
261646
261649
|
const end = "end" in token && Array.isArray(token.end) ? token.end.filter((st2) => st2.type === "space" || st2.type === "comment" || st2.type === "newline") : [];
|
|
261647
|
-
for (const
|
|
261648
|
-
if (
|
|
261649
|
-
delete token[
|
|
261650
|
+
for (const key2 of Object.keys(token))
|
|
261651
|
+
if (key2 !== "type" && key2 !== "offset")
|
|
261652
|
+
delete token[key2];
|
|
261650
261653
|
Object.assign(token, { type: type4, indent: indent2, source, end });
|
|
261651
261654
|
}
|
|
261652
261655
|
}
|
|
@@ -261698,12 +261701,12 @@ var require_cst_stringify = __commonJS((exports) => {
|
|
|
261698
261701
|
}
|
|
261699
261702
|
}
|
|
261700
261703
|
}
|
|
261701
|
-
function stringifyItem({ start: start3, key:
|
|
261704
|
+
function stringifyItem({ start: start3, key: key2, sep: sep3, value: value4 }) {
|
|
261702
261705
|
let res = "";
|
|
261703
261706
|
for (const st2 of start3)
|
|
261704
261707
|
res += st2.source;
|
|
261705
|
-
if (
|
|
261706
|
-
res += stringifyToken(
|
|
261708
|
+
if (key2)
|
|
261709
|
+
res += stringifyToken(key2);
|
|
261707
261710
|
if (sep3)
|
|
261708
261711
|
for (const st2 of sep3)
|
|
261709
261712
|
res += st2.source;
|
|
@@ -263000,7 +263003,7 @@ var require_parser2 = __commonJS((exports) => {
|
|
|
263000
263003
|
});
|
|
263001
263004
|
} else if (isFlowToken(it2.key) && !includesToken(it2.sep, "newline")) {
|
|
263002
263005
|
const start4 = getFirstKeyStartProps(it2.start);
|
|
263003
|
-
const
|
|
263006
|
+
const key2 = it2.key;
|
|
263004
263007
|
const sep3 = it2.sep;
|
|
263005
263008
|
sep3.push(this.sourceToken);
|
|
263006
263009
|
delete it2.key;
|
|
@@ -263009,7 +263012,7 @@ var require_parser2 = __commonJS((exports) => {
|
|
|
263009
263012
|
type: "block-map",
|
|
263010
263013
|
offset: this.offset,
|
|
263011
263014
|
indent: this.indent,
|
|
263012
|
-
items: [{ start: start4, key:
|
|
263015
|
+
items: [{ start: start4, key: key2, sep: sep3 }]
|
|
263013
263016
|
});
|
|
263014
263017
|
} else if (start3.length > 0) {
|
|
263015
263018
|
it2.sep = it2.sep.concat(start3, this.sourceToken);
|
|
@@ -263332,7 +263335,7 @@ var require_parser2 = __commonJS((exports) => {
|
|
|
263332
263335
|
var require_public_api = __commonJS((exports) => {
|
|
263333
263336
|
var composer = require_composer();
|
|
263334
263337
|
var Document = require_Document();
|
|
263335
|
-
var
|
|
263338
|
+
var errors2 = require_errors3();
|
|
263336
263339
|
var log = require_log();
|
|
263337
263340
|
var identity2 = require_identity();
|
|
263338
263341
|
var lineCounter = require_line_counter();
|
|
@@ -263349,8 +263352,8 @@ var require_public_api = __commonJS((exports) => {
|
|
|
263349
263352
|
const docs = Array.from(composer$1.compose(parser$1.parse(source)));
|
|
263350
263353
|
if (prettyErrors && lineCounter2)
|
|
263351
263354
|
for (const doc of docs) {
|
|
263352
|
-
doc.errors.forEach(
|
|
263353
|
-
doc.warnings.forEach(
|
|
263355
|
+
doc.errors.forEach(errors2.prettifyError(source, lineCounter2));
|
|
263356
|
+
doc.warnings.forEach(errors2.prettifyError(source, lineCounter2));
|
|
263354
263357
|
}
|
|
263355
263358
|
if (docs.length > 0)
|
|
263356
263359
|
return docs;
|
|
@@ -263365,13 +263368,13 @@ var require_public_api = __commonJS((exports) => {
|
|
|
263365
263368
|
if (!doc)
|
|
263366
263369
|
doc = _doc;
|
|
263367
263370
|
else if (doc.options.logLevel !== "silent") {
|
|
263368
|
-
doc.errors.push(new
|
|
263371
|
+
doc.errors.push(new errors2.YAMLParseError(_doc.range.slice(0, 2), "MULTIPLE_DOCS", "Source contains multiple documents; please use YAML.parseAllDocuments()"));
|
|
263369
263372
|
break;
|
|
263370
263373
|
}
|
|
263371
263374
|
}
|
|
263372
263375
|
if (prettyErrors && lineCounter2) {
|
|
263373
|
-
doc.errors.forEach(
|
|
263374
|
-
doc.warnings.forEach(
|
|
263376
|
+
doc.errors.forEach(errors2.prettifyError(source, lineCounter2));
|
|
263377
|
+
doc.warnings.forEach(errors2.prettifyError(source, lineCounter2));
|
|
263375
263378
|
}
|
|
263376
263379
|
return doc;
|
|
263377
263380
|
}
|
|
@@ -274459,7 +274462,7 @@ function pruneCurrentEnv(currentEnv, env2) {
|
|
|
274459
274462
|
var package_default = {
|
|
274460
274463
|
name: "@settlemint/sdk-cli",
|
|
274461
274464
|
description: "Command-line interface for SettleMint SDK, providing development tools and project management capabilities",
|
|
274462
|
-
version: "1.1.3-
|
|
274465
|
+
version: "1.1.3-pr1322fc8f",
|
|
274463
274466
|
type: "module",
|
|
274464
274467
|
private: false,
|
|
274465
274468
|
license: "FSL-1.1-MIT",
|
|
@@ -274503,19 +274506,19 @@ var package_default = {
|
|
|
274503
274506
|
},
|
|
274504
274507
|
devDependencies: {
|
|
274505
274508
|
"@commander-js/extra-typings": "13.1.0",
|
|
274506
|
-
"@inquirer/confirm": "5.1.
|
|
274507
|
-
"@inquirer/input": "4.1.
|
|
274508
|
-
"@inquirer/password": "4.0.
|
|
274509
|
+
"@inquirer/confirm": "5.1.5",
|
|
274510
|
+
"@inquirer/input": "4.1.5",
|
|
274511
|
+
"@inquirer/password": "4.0.8",
|
|
274509
274512
|
"@inquirer/select": "4.0.8",
|
|
274510
|
-
"@settlemint/sdk-js": "1.1.3-
|
|
274511
|
-
"@settlemint/sdk-utils": "1.1.3-
|
|
274512
|
-
"@types/node": "22.13.
|
|
274513
|
+
"@settlemint/sdk-js": "1.1.3-pr1322fc8f",
|
|
274514
|
+
"@settlemint/sdk-utils": "1.1.3-pr1322fc8f",
|
|
274515
|
+
"@types/node": "22.13.1",
|
|
274513
274516
|
"@types/semver": "7.5.8",
|
|
274514
274517
|
"@types/which": "3.0.4",
|
|
274515
274518
|
"get-tsconfig": "4.10.0",
|
|
274516
274519
|
giget: "1.2.4",
|
|
274517
274520
|
"is-in-ci": "1.0.0",
|
|
274518
|
-
semver: "7.7.
|
|
274521
|
+
semver: "7.7.1",
|
|
274519
274522
|
slugify: "1.6.6",
|
|
274520
274523
|
which: "5.0.0",
|
|
274521
274524
|
yaml: "2.7.0",
|
|
@@ -274598,7 +274601,10 @@ var {
|
|
|
274598
274601
|
} = import__.default;
|
|
274599
274602
|
|
|
274600
274603
|
// ../../node_modules/@inquirer/core/dist/esm/lib/key.js
|
|
274604
|
+
var isUpKey = (key) => key.name === "up" || key.name === "k" || key.ctrl && key.name === "p";
|
|
274605
|
+
var isDownKey = (key) => key.name === "down" || key.name === "j" || key.ctrl && key.name === "n";
|
|
274601
274606
|
var isBackspaceKey = (key) => key.name === "backspace";
|
|
274607
|
+
var isNumberKey = (key) => "123456789".includes(key.name);
|
|
274602
274608
|
var isEnterKey = (key) => key.name === "enter" || key.name === "return";
|
|
274603
274609
|
// ../../node_modules/@inquirer/core/dist/esm/lib/errors.js
|
|
274604
274610
|
class AbortPromptError extends Error {
|
|
@@ -275133,11 +275139,22 @@ function usePrefix({ status = "idle", theme }) {
|
|
|
275133
275139
|
const iconName = status === "loading" ? "idle" : status;
|
|
275134
275140
|
return typeof prefix === "string" ? prefix : prefix[iconName] ?? prefix["idle"];
|
|
275135
275141
|
}
|
|
275142
|
+
// ../../node_modules/@inquirer/core/dist/esm/lib/use-memo.js
|
|
275143
|
+
function useMemo(fn, dependencies) {
|
|
275144
|
+
return withPointer((pointer) => {
|
|
275145
|
+
const prev = pointer.get();
|
|
275146
|
+
if (!prev || prev.dependencies.length !== dependencies.length || prev.dependencies.some((dep, i) => dep !== dependencies[i])) {
|
|
275147
|
+
const value = fn();
|
|
275148
|
+
pointer.set({ value, dependencies });
|
|
275149
|
+
return value;
|
|
275150
|
+
}
|
|
275151
|
+
return prev.value;
|
|
275152
|
+
});
|
|
275153
|
+
}
|
|
275136
275154
|
// ../../node_modules/@inquirer/core/dist/esm/lib/use-ref.js
|
|
275137
275155
|
function useRef(val) {
|
|
275138
275156
|
return useState({ current: val })[0];
|
|
275139
275157
|
}
|
|
275140
|
-
|
|
275141
275158
|
// ../../node_modules/@inquirer/core/dist/esm/lib/use-keypress.js
|
|
275142
275159
|
function useKeypress(userHandler) {
|
|
275143
275160
|
const signal = useRef(userHandler);
|
|
@@ -275169,6 +275186,95 @@ function readlineWidth() {
|
|
|
275169
275186
|
return import_cli_width.default({ defaultWidth: 80, output: readline().output });
|
|
275170
275187
|
}
|
|
275171
275188
|
|
|
275189
|
+
// ../../node_modules/@inquirer/core/dist/esm/lib/pagination/lines.js
|
|
275190
|
+
function split(content, width) {
|
|
275191
|
+
return breakLines(content, width).split(`
|
|
275192
|
+
`);
|
|
275193
|
+
}
|
|
275194
|
+
function rotate(count, items) {
|
|
275195
|
+
const max = items.length;
|
|
275196
|
+
const offset = (count % max + max) % max;
|
|
275197
|
+
return [...items.slice(offset), ...items.slice(0, offset)];
|
|
275198
|
+
}
|
|
275199
|
+
function lines({ items, width, renderItem, active, position: requested, pageSize }) {
|
|
275200
|
+
const layouts = items.map((item, index) => ({
|
|
275201
|
+
item,
|
|
275202
|
+
index,
|
|
275203
|
+
isActive: index === active
|
|
275204
|
+
}));
|
|
275205
|
+
const layoutsInPage = rotate(active - requested, layouts).slice(0, pageSize);
|
|
275206
|
+
const renderItemAt = (index) => layoutsInPage[index] == null ? [] : split(renderItem(layoutsInPage[index]), width);
|
|
275207
|
+
const pageBuffer = Array.from({ length: pageSize });
|
|
275208
|
+
const activeItem = renderItemAt(requested).slice(0, pageSize);
|
|
275209
|
+
const position = requested + activeItem.length <= pageSize ? requested : pageSize - activeItem.length;
|
|
275210
|
+
pageBuffer.splice(position, activeItem.length, ...activeItem);
|
|
275211
|
+
let bufferPointer = position + activeItem.length;
|
|
275212
|
+
let layoutPointer = requested + 1;
|
|
275213
|
+
while (bufferPointer < pageSize && layoutPointer < layoutsInPage.length) {
|
|
275214
|
+
for (const line of renderItemAt(layoutPointer)) {
|
|
275215
|
+
pageBuffer[bufferPointer++] = line;
|
|
275216
|
+
if (bufferPointer >= pageSize)
|
|
275217
|
+
break;
|
|
275218
|
+
}
|
|
275219
|
+
layoutPointer++;
|
|
275220
|
+
}
|
|
275221
|
+
bufferPointer = position - 1;
|
|
275222
|
+
layoutPointer = requested - 1;
|
|
275223
|
+
while (bufferPointer >= 0 && layoutPointer >= 0) {
|
|
275224
|
+
for (const line of renderItemAt(layoutPointer).reverse()) {
|
|
275225
|
+
pageBuffer[bufferPointer--] = line;
|
|
275226
|
+
if (bufferPointer < 0)
|
|
275227
|
+
break;
|
|
275228
|
+
}
|
|
275229
|
+
layoutPointer--;
|
|
275230
|
+
}
|
|
275231
|
+
return pageBuffer.filter((line) => typeof line === "string");
|
|
275232
|
+
}
|
|
275233
|
+
|
|
275234
|
+
// ../../node_modules/@inquirer/core/dist/esm/lib/pagination/position.js
|
|
275235
|
+
function finite({ active, pageSize, total }) {
|
|
275236
|
+
const middle = Math.floor(pageSize / 2);
|
|
275237
|
+
if (total <= pageSize || active < middle)
|
|
275238
|
+
return active;
|
|
275239
|
+
if (active >= total - middle)
|
|
275240
|
+
return active + pageSize - total;
|
|
275241
|
+
return middle;
|
|
275242
|
+
}
|
|
275243
|
+
function infinite({ active, lastActive, total, pageSize, pointer }) {
|
|
275244
|
+
if (total <= pageSize)
|
|
275245
|
+
return active;
|
|
275246
|
+
if (lastActive < active && active - lastActive < pageSize) {
|
|
275247
|
+
return Math.min(Math.floor(pageSize / 2), pointer + active - lastActive);
|
|
275248
|
+
}
|
|
275249
|
+
return pointer;
|
|
275250
|
+
}
|
|
275251
|
+
|
|
275252
|
+
// ../../node_modules/@inquirer/core/dist/esm/lib/pagination/use-pagination.js
|
|
275253
|
+
function usePagination({ items, active, renderItem, pageSize, loop = true }) {
|
|
275254
|
+
const state = useRef({ position: 0, lastActive: 0 });
|
|
275255
|
+
const position = loop ? infinite({
|
|
275256
|
+
active,
|
|
275257
|
+
lastActive: state.current.lastActive,
|
|
275258
|
+
total: items.length,
|
|
275259
|
+
pageSize,
|
|
275260
|
+
pointer: state.current.position
|
|
275261
|
+
}) : finite({
|
|
275262
|
+
active,
|
|
275263
|
+
total: items.length,
|
|
275264
|
+
pageSize
|
|
275265
|
+
});
|
|
275266
|
+
state.current.position = position;
|
|
275267
|
+
state.current.lastActive = active;
|
|
275268
|
+
return lines({
|
|
275269
|
+
items,
|
|
275270
|
+
width: readlineWidth(),
|
|
275271
|
+
renderItem,
|
|
275272
|
+
active,
|
|
275273
|
+
position,
|
|
275274
|
+
pageSize
|
|
275275
|
+
}).join(`
|
|
275276
|
+
`);
|
|
275277
|
+
}
|
|
275172
275278
|
// ../../node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
|
|
275173
275279
|
var import_mute_stream = __toESM(require_lib(), 1);
|
|
275174
275280
|
import * as readline2 from "node:readline";
|
|
@@ -275554,6 +275660,20 @@ function createPrompt(view) {
|
|
|
275554
275660
|
};
|
|
275555
275661
|
return prompt;
|
|
275556
275662
|
}
|
|
275663
|
+
// ../../node_modules/@inquirer/core/dist/esm/lib/Separator.js
|
|
275664
|
+
var import_yoctocolors_cjs2 = __toESM(require_yoctocolors_cjs(), 1);
|
|
275665
|
+
class Separator {
|
|
275666
|
+
separator = import_yoctocolors_cjs2.default.dim(Array.from({ length: 15 }).join(esm_default.line));
|
|
275667
|
+
type = "separator";
|
|
275668
|
+
constructor(separator) {
|
|
275669
|
+
if (separator) {
|
|
275670
|
+
this.separator = separator;
|
|
275671
|
+
}
|
|
275672
|
+
}
|
|
275673
|
+
static isSeparator(choice) {
|
|
275674
|
+
return Boolean(choice && typeof choice === "object" && "type" in choice && choice.type === "separator");
|
|
275675
|
+
}
|
|
275676
|
+
}
|
|
275557
275677
|
// ../utils/dist/terminal.mjs
|
|
275558
275678
|
import { spawn } from "node:child_process";
|
|
275559
275679
|
var import_console_table_printer2 = __toESM(require_dist2(), 1);
|
|
@@ -276431,6 +276551,7 @@ function initGraphQLTada() {
|
|
|
276431
276551
|
var t2 = initGraphQLTada();
|
|
276432
276552
|
|
|
276433
276553
|
// ../js/dist/settlemint.mjs
|
|
276554
|
+
import { createHash } from "node:crypto";
|
|
276434
276555
|
var graphql = initGraphQLTada();
|
|
276435
276556
|
var WorkspaceFragment = graphql(`
|
|
276436
276557
|
fragment Workspace on Workspace {
|
|
@@ -277731,6 +277852,50 @@ var ClientOptionsSchema = z.object({
|
|
|
277731
277852
|
accessToken: AccessTokenSchema2,
|
|
277732
277853
|
instance: UrlSchema2
|
|
277733
277854
|
});
|
|
277855
|
+
function hashPincode(pincode, salt) {
|
|
277856
|
+
return createHash("sha256").update(`${salt}${pincode}`).digest("hex");
|
|
277857
|
+
}
|
|
277858
|
+
function generateResponse(pincode, salt, challenge) {
|
|
277859
|
+
const hashedPincode = hashPincode(pincode, salt);
|
|
277860
|
+
return createHash("sha256").update(`${hashedPincode}_${challenge}`).digest("hex");
|
|
277861
|
+
}
|
|
277862
|
+
async function getPincodeVerificationResponse({
|
|
277863
|
+
userWalletAddress,
|
|
277864
|
+
pincode,
|
|
277865
|
+
accessToken,
|
|
277866
|
+
instance,
|
|
277867
|
+
nodeId
|
|
277868
|
+
}) {
|
|
277869
|
+
const response = await fetch(`${instance}/cm/nodes/${encodeURIComponent(nodeId)}/user-wallets/${encodeURIComponent(userWalletAddress)}/verifications/challenges`, {
|
|
277870
|
+
method: "POST",
|
|
277871
|
+
headers: {
|
|
277872
|
+
"Content-Type": "application/json",
|
|
277873
|
+
"x-auth-token": accessToken
|
|
277874
|
+
},
|
|
277875
|
+
body: JSON.stringify({
|
|
277876
|
+
pincode,
|
|
277877
|
+
verificationType: "PINCODE",
|
|
277878
|
+
name: "pincode"
|
|
277879
|
+
})
|
|
277880
|
+
});
|
|
277881
|
+
if (!response.ok) {
|
|
277882
|
+
if (response.status === 404) {
|
|
277883
|
+
throw new Error(`No user wallet found with address '${userWalletAddress}' for node '${nodeId}'`);
|
|
277884
|
+
}
|
|
277885
|
+
throw new Error("Failed to get verification challenge");
|
|
277886
|
+
}
|
|
277887
|
+
const verificationChallenges = await response.json();
|
|
277888
|
+
if (!verificationChallenges.length) {
|
|
277889
|
+
throw new Error("No verification challenges received");
|
|
277890
|
+
}
|
|
277891
|
+
const firstChallenge = verificationChallenges[0];
|
|
277892
|
+
const challenge = firstChallenge?.challenge;
|
|
277893
|
+
if (!challenge?.secret || !challenge?.salt) {
|
|
277894
|
+
throw new Error("Could not authenticate pin code, invalid challenge format");
|
|
277895
|
+
}
|
|
277896
|
+
const { secret, salt } = challenge;
|
|
277897
|
+
return generateResponse(pincode, salt, secret);
|
|
277898
|
+
}
|
|
277734
277899
|
function createSettleMintClient(options) {
|
|
277735
277900
|
ensureServer();
|
|
277736
277901
|
const validatedOptions = options.anonymous ? validate2(z.object({
|
|
@@ -277828,6 +277993,13 @@ function createSettleMintClient(options) {
|
|
|
277828
277993
|
},
|
|
277829
277994
|
platform: {
|
|
277830
277995
|
config: getPlatformConfig(gqlClient)
|
|
277996
|
+
},
|
|
277997
|
+
wallet: {
|
|
277998
|
+
pincodeVerificationResponse: (args) => getPincodeVerificationResponse({
|
|
277999
|
+
...args,
|
|
278000
|
+
instance: validatedOptions.instance,
|
|
278001
|
+
accessToken: validatedOptions.accessToken
|
|
278002
|
+
})
|
|
277831
278003
|
}
|
|
277832
278004
|
};
|
|
277833
278005
|
}
|
|
@@ -279560,586 +279732,14 @@ async function codegenTsconfig(env2, thegraphSubgraphNames) {
|
|
|
279560
279732
|
};
|
|
279561
279733
|
}
|
|
279562
279734
|
|
|
279563
|
-
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/key.js
|
|
279564
|
-
var isUpKey = (key2) => key2.name === "up" || key2.name === "k" || key2.ctrl && key2.name === "p";
|
|
279565
|
-
var isDownKey = (key2) => key2.name === "down" || key2.name === "j" || key2.ctrl && key2.name === "n";
|
|
279566
|
-
var isBackspaceKey2 = (key2) => key2.name === "backspace";
|
|
279567
|
-
var isNumberKey = (key2) => "123456789".includes(key2.name);
|
|
279568
|
-
var isEnterKey2 = (key2) => key2.name === "enter" || key2.name === "return";
|
|
279569
|
-
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/errors.js
|
|
279570
|
-
class AbortPromptError2 extends Error {
|
|
279571
|
-
name = "AbortPromptError";
|
|
279572
|
-
message = "Prompt was aborted";
|
|
279573
|
-
constructor(options) {
|
|
279574
|
-
super();
|
|
279575
|
-
this.cause = options?.cause;
|
|
279576
|
-
}
|
|
279577
|
-
}
|
|
279578
|
-
|
|
279579
|
-
class CancelPromptError2 extends Error {
|
|
279580
|
-
name = "CancelPromptError";
|
|
279581
|
-
message = "Prompt was canceled";
|
|
279582
|
-
}
|
|
279583
|
-
|
|
279584
|
-
class ExitPromptError2 extends Error {
|
|
279585
|
-
name = "ExitPromptError";
|
|
279586
|
-
}
|
|
279587
|
-
|
|
279588
|
-
class HookError2 extends Error {
|
|
279589
|
-
name = "HookError";
|
|
279590
|
-
}
|
|
279591
|
-
|
|
279592
|
-
class ValidationError2 extends Error {
|
|
279593
|
-
name = "ValidationError";
|
|
279594
|
-
}
|
|
279595
|
-
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/use-prefix.js
|
|
279596
|
-
import { AsyncResource as AsyncResource5 } from "node:async_hooks";
|
|
279597
|
-
|
|
279598
|
-
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/hook-engine.js
|
|
279599
|
-
import { AsyncLocalStorage as AsyncLocalStorage2, AsyncResource as AsyncResource4 } from "node:async_hooks";
|
|
279600
|
-
var hookStorage2 = new AsyncLocalStorage2;
|
|
279601
|
-
function createStore2(rl) {
|
|
279602
|
-
const store = {
|
|
279603
|
-
rl,
|
|
279604
|
-
hooks: [],
|
|
279605
|
-
hooksCleanup: [],
|
|
279606
|
-
hooksEffect: [],
|
|
279607
|
-
index: 0,
|
|
279608
|
-
handleChange() {
|
|
279609
|
-
}
|
|
279610
|
-
};
|
|
279611
|
-
return store;
|
|
279612
|
-
}
|
|
279613
|
-
function withHooks2(rl, cb) {
|
|
279614
|
-
const store = createStore2(rl);
|
|
279615
|
-
return hookStorage2.run(store, () => {
|
|
279616
|
-
function cycle(render) {
|
|
279617
|
-
store.handleChange = () => {
|
|
279618
|
-
store.index = 0;
|
|
279619
|
-
render();
|
|
279620
|
-
};
|
|
279621
|
-
store.handleChange();
|
|
279622
|
-
}
|
|
279623
|
-
return cb(cycle);
|
|
279624
|
-
});
|
|
279625
|
-
}
|
|
279626
|
-
function getStore2() {
|
|
279627
|
-
const store = hookStorage2.getStore();
|
|
279628
|
-
if (!store) {
|
|
279629
|
-
throw new HookError2("[Inquirer] Hook functions can only be called from within a prompt");
|
|
279630
|
-
}
|
|
279631
|
-
return store;
|
|
279632
|
-
}
|
|
279633
|
-
function readline3() {
|
|
279634
|
-
return getStore2().rl;
|
|
279635
|
-
}
|
|
279636
|
-
function withUpdates2(fn) {
|
|
279637
|
-
const wrapped = (...args) => {
|
|
279638
|
-
const store = getStore2();
|
|
279639
|
-
let shouldUpdate = false;
|
|
279640
|
-
const oldHandleChange = store.handleChange;
|
|
279641
|
-
store.handleChange = () => {
|
|
279642
|
-
shouldUpdate = true;
|
|
279643
|
-
};
|
|
279644
|
-
const returnValue = fn(...args);
|
|
279645
|
-
if (shouldUpdate) {
|
|
279646
|
-
oldHandleChange();
|
|
279647
|
-
}
|
|
279648
|
-
store.handleChange = oldHandleChange;
|
|
279649
|
-
return returnValue;
|
|
279650
|
-
};
|
|
279651
|
-
return AsyncResource4.bind(wrapped);
|
|
279652
|
-
}
|
|
279653
|
-
function withPointer2(cb) {
|
|
279654
|
-
const store = getStore2();
|
|
279655
|
-
const { index } = store;
|
|
279656
|
-
const pointer = {
|
|
279657
|
-
get() {
|
|
279658
|
-
return store.hooks[index];
|
|
279659
|
-
},
|
|
279660
|
-
set(value4) {
|
|
279661
|
-
store.hooks[index] = value4;
|
|
279662
|
-
},
|
|
279663
|
-
initialized: index in store.hooks
|
|
279664
|
-
};
|
|
279665
|
-
const returnValue = cb(pointer);
|
|
279666
|
-
store.index++;
|
|
279667
|
-
return returnValue;
|
|
279668
|
-
}
|
|
279669
|
-
function handleChange2() {
|
|
279670
|
-
getStore2().handleChange();
|
|
279671
|
-
}
|
|
279672
|
-
var effectScheduler2 = {
|
|
279673
|
-
queue(cb) {
|
|
279674
|
-
const store = getStore2();
|
|
279675
|
-
const { index } = store;
|
|
279676
|
-
store.hooksEffect.push(() => {
|
|
279677
|
-
store.hooksCleanup[index]?.();
|
|
279678
|
-
const cleanFn = cb(readline3());
|
|
279679
|
-
if (cleanFn != null && typeof cleanFn !== "function") {
|
|
279680
|
-
throw new ValidationError2("useEffect return value must be a cleanup function or nothing.");
|
|
279681
|
-
}
|
|
279682
|
-
store.hooksCleanup[index] = cleanFn;
|
|
279683
|
-
});
|
|
279684
|
-
},
|
|
279685
|
-
run() {
|
|
279686
|
-
const store = getStore2();
|
|
279687
|
-
withUpdates2(() => {
|
|
279688
|
-
store.hooksEffect.forEach((effect) => {
|
|
279689
|
-
effect();
|
|
279690
|
-
});
|
|
279691
|
-
store.hooksEffect.length = 0;
|
|
279692
|
-
})();
|
|
279693
|
-
},
|
|
279694
|
-
clearAll() {
|
|
279695
|
-
const store = getStore2();
|
|
279696
|
-
store.hooksCleanup.forEach((cleanFn) => {
|
|
279697
|
-
cleanFn?.();
|
|
279698
|
-
});
|
|
279699
|
-
store.hooksEffect.length = 0;
|
|
279700
|
-
store.hooksCleanup.length = 0;
|
|
279701
|
-
}
|
|
279702
|
-
};
|
|
279703
|
-
|
|
279704
|
-
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/use-state.js
|
|
279705
|
-
function useState2(defaultValue) {
|
|
279706
|
-
return withPointer2((pointer) => {
|
|
279707
|
-
const setFn = (newValue) => {
|
|
279708
|
-
if (pointer.get() !== newValue) {
|
|
279709
|
-
pointer.set(newValue);
|
|
279710
|
-
handleChange2();
|
|
279711
|
-
}
|
|
279712
|
-
};
|
|
279713
|
-
if (pointer.initialized) {
|
|
279714
|
-
return [pointer.get(), setFn];
|
|
279715
|
-
}
|
|
279716
|
-
const value4 = typeof defaultValue === "function" ? defaultValue() : defaultValue;
|
|
279717
|
-
pointer.set(value4);
|
|
279718
|
-
return [value4, setFn];
|
|
279719
|
-
});
|
|
279720
|
-
}
|
|
279721
|
-
|
|
279722
|
-
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/use-effect.js
|
|
279723
|
-
function useEffect2(cb, depArray) {
|
|
279724
|
-
withPointer2((pointer) => {
|
|
279725
|
-
const oldDeps = pointer.get();
|
|
279726
|
-
const hasChanged = !Array.isArray(oldDeps) || depArray.some((dep, i6) => !Object.is(dep, oldDeps[i6]));
|
|
279727
|
-
if (hasChanged) {
|
|
279728
|
-
effectScheduler2.queue(cb);
|
|
279729
|
-
}
|
|
279730
|
-
pointer.set(depArray);
|
|
279731
|
-
});
|
|
279732
|
-
}
|
|
279733
|
-
|
|
279734
|
-
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/theme.js
|
|
279735
|
-
var import_yoctocolors_cjs2 = __toESM(require_yoctocolors_cjs(), 1);
|
|
279736
|
-
var defaultTheme2 = {
|
|
279737
|
-
prefix: {
|
|
279738
|
-
idle: import_yoctocolors_cjs2.default.blue("?"),
|
|
279739
|
-
done: import_yoctocolors_cjs2.default.green(esm_default.tick)
|
|
279740
|
-
},
|
|
279741
|
-
spinner: {
|
|
279742
|
-
interval: 80,
|
|
279743
|
-
frames: ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"].map((frame) => import_yoctocolors_cjs2.default.yellow(frame))
|
|
279744
|
-
},
|
|
279745
|
-
style: {
|
|
279746
|
-
answer: import_yoctocolors_cjs2.default.cyan,
|
|
279747
|
-
message: import_yoctocolors_cjs2.default.bold,
|
|
279748
|
-
error: (text2) => import_yoctocolors_cjs2.default.red(`> ${text2}`),
|
|
279749
|
-
defaultAnswer: (text2) => import_yoctocolors_cjs2.default.dim(`(${text2})`),
|
|
279750
|
-
help: import_yoctocolors_cjs2.default.dim,
|
|
279751
|
-
highlight: import_yoctocolors_cjs2.default.cyan,
|
|
279752
|
-
key: (text2) => import_yoctocolors_cjs2.default.cyan(import_yoctocolors_cjs2.default.bold(`<${text2}>`))
|
|
279753
|
-
}
|
|
279754
|
-
};
|
|
279755
|
-
|
|
279756
|
-
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/make-theme.js
|
|
279757
|
-
function isPlainObject3(value4) {
|
|
279758
|
-
if (typeof value4 !== "object" || value4 === null)
|
|
279759
|
-
return false;
|
|
279760
|
-
let proto = value4;
|
|
279761
|
-
while (Object.getPrototypeOf(proto) !== null) {
|
|
279762
|
-
proto = Object.getPrototypeOf(proto);
|
|
279763
|
-
}
|
|
279764
|
-
return Object.getPrototypeOf(value4) === proto;
|
|
279765
|
-
}
|
|
279766
|
-
function deepMerge3(...objects) {
|
|
279767
|
-
const output = {};
|
|
279768
|
-
for (const obj of objects) {
|
|
279769
|
-
for (const [key2, value4] of Object.entries(obj)) {
|
|
279770
|
-
const prevValue = output[key2];
|
|
279771
|
-
output[key2] = isPlainObject3(prevValue) && isPlainObject3(value4) ? deepMerge3(prevValue, value4) : value4;
|
|
279772
|
-
}
|
|
279773
|
-
}
|
|
279774
|
-
return output;
|
|
279775
|
-
}
|
|
279776
|
-
function makeTheme2(...themes) {
|
|
279777
|
-
const themesToMerge = [
|
|
279778
|
-
defaultTheme2,
|
|
279779
|
-
...themes.filter((theme) => theme != null)
|
|
279780
|
-
];
|
|
279781
|
-
return deepMerge3(...themesToMerge);
|
|
279782
|
-
}
|
|
279783
|
-
|
|
279784
|
-
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/use-prefix.js
|
|
279785
|
-
function usePrefix2({ status = "idle", theme }) {
|
|
279786
|
-
const [showLoader, setShowLoader] = useState2(false);
|
|
279787
|
-
const [tick, setTick] = useState2(0);
|
|
279788
|
-
const { prefix, spinner: spinner2 } = makeTheme2(theme);
|
|
279789
|
-
useEffect2(() => {
|
|
279790
|
-
if (status === "loading") {
|
|
279791
|
-
let tickInterval;
|
|
279792
|
-
let inc = -1;
|
|
279793
|
-
const delayTimeout = setTimeout(AsyncResource5.bind(() => {
|
|
279794
|
-
setShowLoader(true);
|
|
279795
|
-
tickInterval = setInterval(AsyncResource5.bind(() => {
|
|
279796
|
-
inc = inc + 1;
|
|
279797
|
-
setTick(inc % spinner2.frames.length);
|
|
279798
|
-
}), spinner2.interval);
|
|
279799
|
-
}), 300);
|
|
279800
|
-
return () => {
|
|
279801
|
-
clearTimeout(delayTimeout);
|
|
279802
|
-
clearInterval(tickInterval);
|
|
279803
|
-
};
|
|
279804
|
-
} else {
|
|
279805
|
-
setShowLoader(false);
|
|
279806
|
-
}
|
|
279807
|
-
}, [status]);
|
|
279808
|
-
if (showLoader) {
|
|
279809
|
-
return spinner2.frames[tick];
|
|
279810
|
-
}
|
|
279811
|
-
const iconName = status === "loading" ? "idle" : status;
|
|
279812
|
-
return typeof prefix === "string" ? prefix : prefix[iconName] ?? prefix["idle"];
|
|
279813
|
-
}
|
|
279814
|
-
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/use-memo.js
|
|
279815
|
-
function useMemo(fn, dependencies) {
|
|
279816
|
-
return withPointer2((pointer) => {
|
|
279817
|
-
const prev = pointer.get();
|
|
279818
|
-
if (!prev || prev.dependencies.length !== dependencies.length || prev.dependencies.some((dep, i6) => dep !== dependencies[i6])) {
|
|
279819
|
-
const value4 = fn();
|
|
279820
|
-
pointer.set({ value: value4, dependencies });
|
|
279821
|
-
return value4;
|
|
279822
|
-
}
|
|
279823
|
-
return prev.value;
|
|
279824
|
-
});
|
|
279825
|
-
}
|
|
279826
|
-
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/use-ref.js
|
|
279827
|
-
function useRef2(val) {
|
|
279828
|
-
return useState2({ current: val })[0];
|
|
279829
|
-
}
|
|
279830
|
-
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/use-keypress.js
|
|
279831
|
-
function useKeypress2(userHandler) {
|
|
279832
|
-
const signal = useRef2(userHandler);
|
|
279833
|
-
signal.current = userHandler;
|
|
279834
|
-
useEffect2((rl) => {
|
|
279835
|
-
let ignore = false;
|
|
279836
|
-
const handler = withUpdates2((_input, event) => {
|
|
279837
|
-
if (ignore)
|
|
279838
|
-
return;
|
|
279839
|
-
signal.current(event, rl);
|
|
279840
|
-
});
|
|
279841
|
-
rl.input.on("keypress", handler);
|
|
279842
|
-
return () => {
|
|
279843
|
-
ignore = true;
|
|
279844
|
-
rl.input.removeListener("keypress", handler);
|
|
279845
|
-
};
|
|
279846
|
-
}, []);
|
|
279847
|
-
}
|
|
279848
|
-
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/utils.js
|
|
279849
|
-
var import_cli_width2 = __toESM(require_cli_width(), 1);
|
|
279850
|
-
var import_wrap_ansi2 = __toESM(require_wrap_ansi(), 1);
|
|
279851
|
-
function breakLines2(content, width) {
|
|
279852
|
-
return content.split(`
|
|
279853
|
-
`).flatMap((line) => import_wrap_ansi2.default(line, width, { trim: false, hard: true }).split(`
|
|
279854
|
-
`).map((str) => str.trimEnd())).join(`
|
|
279855
|
-
`);
|
|
279856
|
-
}
|
|
279857
|
-
function readlineWidth2() {
|
|
279858
|
-
return import_cli_width2.default({ defaultWidth: 80, output: readline3().output });
|
|
279859
|
-
}
|
|
279860
|
-
|
|
279861
|
-
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/pagination/lines.js
|
|
279862
|
-
function split2(content, width) {
|
|
279863
|
-
return breakLines2(content, width).split(`
|
|
279864
|
-
`);
|
|
279865
|
-
}
|
|
279866
|
-
function rotate(count, items) {
|
|
279867
|
-
const max = items.length;
|
|
279868
|
-
const offset = (count % max + max) % max;
|
|
279869
|
-
return [...items.slice(offset), ...items.slice(0, offset)];
|
|
279870
|
-
}
|
|
279871
|
-
function lines({ items, width, renderItem, active, position: requested, pageSize }) {
|
|
279872
|
-
const layouts = items.map((item, index) => ({
|
|
279873
|
-
item,
|
|
279874
|
-
index,
|
|
279875
|
-
isActive: index === active
|
|
279876
|
-
}));
|
|
279877
|
-
const layoutsInPage = rotate(active - requested, layouts).slice(0, pageSize);
|
|
279878
|
-
const renderItemAt = (index) => layoutsInPage[index] == null ? [] : split2(renderItem(layoutsInPage[index]), width);
|
|
279879
|
-
const pageBuffer = Array.from({ length: pageSize });
|
|
279880
|
-
const activeItem = renderItemAt(requested).slice(0, pageSize);
|
|
279881
|
-
const position = requested + activeItem.length <= pageSize ? requested : pageSize - activeItem.length;
|
|
279882
|
-
pageBuffer.splice(position, activeItem.length, ...activeItem);
|
|
279883
|
-
let bufferPointer = position + activeItem.length;
|
|
279884
|
-
let layoutPointer = requested + 1;
|
|
279885
|
-
while (bufferPointer < pageSize && layoutPointer < layoutsInPage.length) {
|
|
279886
|
-
for (const line of renderItemAt(layoutPointer)) {
|
|
279887
|
-
pageBuffer[bufferPointer++] = line;
|
|
279888
|
-
if (bufferPointer >= pageSize)
|
|
279889
|
-
break;
|
|
279890
|
-
}
|
|
279891
|
-
layoutPointer++;
|
|
279892
|
-
}
|
|
279893
|
-
bufferPointer = position - 1;
|
|
279894
|
-
layoutPointer = requested - 1;
|
|
279895
|
-
while (bufferPointer >= 0 && layoutPointer >= 0) {
|
|
279896
|
-
for (const line of renderItemAt(layoutPointer).reverse()) {
|
|
279897
|
-
pageBuffer[bufferPointer--] = line;
|
|
279898
|
-
if (bufferPointer < 0)
|
|
279899
|
-
break;
|
|
279900
|
-
}
|
|
279901
|
-
layoutPointer--;
|
|
279902
|
-
}
|
|
279903
|
-
return pageBuffer.filter((line) => typeof line === "string");
|
|
279904
|
-
}
|
|
279905
|
-
|
|
279906
|
-
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/pagination/position.js
|
|
279907
|
-
function finite({ active, pageSize, total }) {
|
|
279908
|
-
const middle = Math.floor(pageSize / 2);
|
|
279909
|
-
if (total <= pageSize || active < middle)
|
|
279910
|
-
return active;
|
|
279911
|
-
if (active >= total - middle)
|
|
279912
|
-
return active + pageSize - total;
|
|
279913
|
-
return middle;
|
|
279914
|
-
}
|
|
279915
|
-
function infinite({ active, lastActive, total, pageSize, pointer }) {
|
|
279916
|
-
if (total <= pageSize)
|
|
279917
|
-
return active;
|
|
279918
|
-
if (lastActive < active && active - lastActive < pageSize) {
|
|
279919
|
-
return Math.min(Math.floor(pageSize / 2), pointer + active - lastActive);
|
|
279920
|
-
}
|
|
279921
|
-
return pointer;
|
|
279922
|
-
}
|
|
279923
|
-
|
|
279924
|
-
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/pagination/use-pagination.js
|
|
279925
|
-
function usePagination({ items, active, renderItem, pageSize, loop = true }) {
|
|
279926
|
-
const state = useRef2({ position: 0, lastActive: 0 });
|
|
279927
|
-
const position = loop ? infinite({
|
|
279928
|
-
active,
|
|
279929
|
-
lastActive: state.current.lastActive,
|
|
279930
|
-
total: items.length,
|
|
279931
|
-
pageSize,
|
|
279932
|
-
pointer: state.current.position
|
|
279933
|
-
}) : finite({
|
|
279934
|
-
active,
|
|
279935
|
-
total: items.length,
|
|
279936
|
-
pageSize
|
|
279937
|
-
});
|
|
279938
|
-
state.current.position = position;
|
|
279939
|
-
state.current.lastActive = active;
|
|
279940
|
-
return lines({
|
|
279941
|
-
items,
|
|
279942
|
-
width: readlineWidth2(),
|
|
279943
|
-
renderItem,
|
|
279944
|
-
active,
|
|
279945
|
-
position,
|
|
279946
|
-
pageSize
|
|
279947
|
-
}).join(`
|
|
279948
|
-
`);
|
|
279949
|
-
}
|
|
279950
|
-
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
|
|
279951
|
-
var import_mute_stream2 = __toESM(require_lib(), 1);
|
|
279952
|
-
import * as readline4 from "node:readline";
|
|
279953
|
-
import { AsyncResource as AsyncResource6 } from "node:async_hooks";
|
|
279954
|
-
|
|
279955
|
-
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/screen-manager.js
|
|
279956
|
-
var import_ansi_escapes2 = __toESM(require_ansi_escapes(), 1);
|
|
279957
|
-
import { stripVTControlCharacters as stripVTControlCharacters3 } from "node:util";
|
|
279958
|
-
var height2 = (content) => content.split(`
|
|
279959
|
-
`).length;
|
|
279960
|
-
var lastLine2 = (content) => content.split(`
|
|
279961
|
-
`).pop() ?? "";
|
|
279962
|
-
function cursorDown2(n6) {
|
|
279963
|
-
return n6 > 0 ? import_ansi_escapes2.default.cursorDown(n6) : "";
|
|
279964
|
-
}
|
|
279965
|
-
|
|
279966
|
-
class ScreenManager2 {
|
|
279967
|
-
rl;
|
|
279968
|
-
height = 0;
|
|
279969
|
-
extraLinesUnderPrompt = 0;
|
|
279970
|
-
cursorPos;
|
|
279971
|
-
constructor(rl) {
|
|
279972
|
-
this.rl = rl;
|
|
279973
|
-
this.rl = rl;
|
|
279974
|
-
this.cursorPos = rl.getCursorPos();
|
|
279975
|
-
}
|
|
279976
|
-
write(content) {
|
|
279977
|
-
this.rl.output.unmute();
|
|
279978
|
-
this.rl.output.write(content);
|
|
279979
|
-
this.rl.output.mute();
|
|
279980
|
-
}
|
|
279981
|
-
render(content, bottomContent = "") {
|
|
279982
|
-
const promptLine = lastLine2(content);
|
|
279983
|
-
const rawPromptLine = stripVTControlCharacters3(promptLine);
|
|
279984
|
-
let prompt = rawPromptLine;
|
|
279985
|
-
if (this.rl.line.length > 0) {
|
|
279986
|
-
prompt = prompt.slice(0, -this.rl.line.length);
|
|
279987
|
-
}
|
|
279988
|
-
this.rl.setPrompt(prompt);
|
|
279989
|
-
this.cursorPos = this.rl.getCursorPos();
|
|
279990
|
-
const width = readlineWidth2();
|
|
279991
|
-
content = breakLines2(content, width);
|
|
279992
|
-
bottomContent = breakLines2(bottomContent, width);
|
|
279993
|
-
if (rawPromptLine.length % width === 0) {
|
|
279994
|
-
content += `
|
|
279995
|
-
`;
|
|
279996
|
-
}
|
|
279997
|
-
let output = content + (bottomContent ? `
|
|
279998
|
-
` + bottomContent : "");
|
|
279999
|
-
const promptLineUpDiff = Math.floor(rawPromptLine.length / width) - this.cursorPos.rows;
|
|
280000
|
-
const bottomContentHeight = promptLineUpDiff + (bottomContent ? height2(bottomContent) : 0);
|
|
280001
|
-
if (bottomContentHeight > 0)
|
|
280002
|
-
output += import_ansi_escapes2.default.cursorUp(bottomContentHeight);
|
|
280003
|
-
output += import_ansi_escapes2.default.cursorTo(this.cursorPos.cols);
|
|
280004
|
-
this.write(cursorDown2(this.extraLinesUnderPrompt) + import_ansi_escapes2.default.eraseLines(this.height) + output);
|
|
280005
|
-
this.extraLinesUnderPrompt = bottomContentHeight;
|
|
280006
|
-
this.height = height2(output);
|
|
280007
|
-
}
|
|
280008
|
-
checkCursorPos() {
|
|
280009
|
-
const cursorPos = this.rl.getCursorPos();
|
|
280010
|
-
if (cursorPos.cols !== this.cursorPos.cols) {
|
|
280011
|
-
this.write(import_ansi_escapes2.default.cursorTo(cursorPos.cols));
|
|
280012
|
-
this.cursorPos = cursorPos;
|
|
280013
|
-
}
|
|
280014
|
-
}
|
|
280015
|
-
done({ clearContent }) {
|
|
280016
|
-
this.rl.setPrompt("");
|
|
280017
|
-
let output = cursorDown2(this.extraLinesUnderPrompt);
|
|
280018
|
-
output += clearContent ? import_ansi_escapes2.default.eraseLines(this.height) : `
|
|
280019
|
-
`;
|
|
280020
|
-
output += import_ansi_escapes2.default.cursorShow;
|
|
280021
|
-
this.write(output);
|
|
280022
|
-
this.rl.close();
|
|
280023
|
-
}
|
|
280024
|
-
}
|
|
280025
|
-
|
|
280026
|
-
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/promise-polyfill.js
|
|
280027
|
-
class PromisePolyfill2 extends Promise {
|
|
280028
|
-
static withResolver() {
|
|
280029
|
-
let resolve5;
|
|
280030
|
-
let reject;
|
|
280031
|
-
const promise = new Promise((res, rej) => {
|
|
280032
|
-
resolve5 = res;
|
|
280033
|
-
reject = rej;
|
|
280034
|
-
});
|
|
280035
|
-
return { promise, resolve: resolve5, reject };
|
|
280036
|
-
}
|
|
280037
|
-
}
|
|
280038
|
-
|
|
280039
|
-
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
|
|
280040
|
-
function getCallSites2() {
|
|
280041
|
-
const _prepareStackTrace = Error.prepareStackTrace;
|
|
280042
|
-
try {
|
|
280043
|
-
let result = [];
|
|
280044
|
-
Error.prepareStackTrace = (_5, callSites) => {
|
|
280045
|
-
const callSitesWithoutCurrent = callSites.slice(1);
|
|
280046
|
-
result = callSitesWithoutCurrent;
|
|
280047
|
-
return callSitesWithoutCurrent;
|
|
280048
|
-
};
|
|
280049
|
-
new Error().stack;
|
|
280050
|
-
return result;
|
|
280051
|
-
} finally {
|
|
280052
|
-
Error.prepareStackTrace = _prepareStackTrace;
|
|
280053
|
-
}
|
|
280054
|
-
}
|
|
280055
|
-
function createPrompt2(view) {
|
|
280056
|
-
const callSites = getCallSites2();
|
|
280057
|
-
const callerFilename = callSites[1]?.getFileName?.();
|
|
280058
|
-
const prompt = (config3, context = {}) => {
|
|
280059
|
-
const { input = process.stdin, signal } = context;
|
|
280060
|
-
const cleanups = new Set;
|
|
280061
|
-
const output = new import_mute_stream2.default;
|
|
280062
|
-
output.pipe(context.output ?? process.stdout);
|
|
280063
|
-
const rl = readline4.createInterface({
|
|
280064
|
-
terminal: true,
|
|
280065
|
-
input,
|
|
280066
|
-
output
|
|
280067
|
-
});
|
|
280068
|
-
const screen = new ScreenManager2(rl);
|
|
280069
|
-
const { promise, resolve: resolve5, reject } = PromisePolyfill2.withResolver();
|
|
280070
|
-
const cancel3 = () => reject(new CancelPromptError2);
|
|
280071
|
-
if (signal) {
|
|
280072
|
-
const abort = () => reject(new AbortPromptError2({ cause: signal.reason }));
|
|
280073
|
-
if (signal.aborted) {
|
|
280074
|
-
abort();
|
|
280075
|
-
return Object.assign(promise, { cancel: cancel3 });
|
|
280076
|
-
}
|
|
280077
|
-
signal.addEventListener("abort", abort);
|
|
280078
|
-
cleanups.add(() => signal.removeEventListener("abort", abort));
|
|
280079
|
-
}
|
|
280080
|
-
cleanups.add(onExit((code2, signal2) => {
|
|
280081
|
-
reject(new ExitPromptError2(`User force closed the prompt with ${code2} ${signal2}`));
|
|
280082
|
-
}));
|
|
280083
|
-
const checkCursorPos = () => screen.checkCursorPos();
|
|
280084
|
-
rl.input.on("keypress", checkCursorPos);
|
|
280085
|
-
cleanups.add(() => rl.input.removeListener("keypress", checkCursorPos));
|
|
280086
|
-
return withHooks2(rl, (cycle) => {
|
|
280087
|
-
const hooksCleanup = AsyncResource6.bind(() => effectScheduler2.clearAll());
|
|
280088
|
-
rl.on("close", hooksCleanup);
|
|
280089
|
-
cleanups.add(() => rl.removeListener("close", hooksCleanup));
|
|
280090
|
-
cycle(() => {
|
|
280091
|
-
try {
|
|
280092
|
-
const nextView = view(config3, (value4) => {
|
|
280093
|
-
setImmediate(() => resolve5(value4));
|
|
280094
|
-
});
|
|
280095
|
-
if (nextView === undefined) {
|
|
280096
|
-
throw new Error(`Prompt functions must return a string.
|
|
280097
|
-
at ${callerFilename}`);
|
|
280098
|
-
}
|
|
280099
|
-
const [content, bottomContent] = typeof nextView === "string" ? [nextView] : nextView;
|
|
280100
|
-
screen.render(content, bottomContent);
|
|
280101
|
-
effectScheduler2.run();
|
|
280102
|
-
} catch (error5) {
|
|
280103
|
-
reject(error5);
|
|
280104
|
-
}
|
|
280105
|
-
});
|
|
280106
|
-
return Object.assign(promise.then((answer) => {
|
|
280107
|
-
effectScheduler2.clearAll();
|
|
280108
|
-
return answer;
|
|
280109
|
-
}, (error5) => {
|
|
280110
|
-
effectScheduler2.clearAll();
|
|
280111
|
-
throw error5;
|
|
280112
|
-
}).finally(() => {
|
|
280113
|
-
cleanups.forEach((cleanup) => cleanup());
|
|
280114
|
-
screen.done({ clearContent: Boolean(context.clearPromptOnDone) });
|
|
280115
|
-
output.end();
|
|
280116
|
-
}).then(() => promise), { cancel: cancel3 });
|
|
280117
|
-
});
|
|
280118
|
-
};
|
|
280119
|
-
return prompt;
|
|
280120
|
-
}
|
|
280121
|
-
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/Separator.js
|
|
280122
|
-
var import_yoctocolors_cjs3 = __toESM(require_yoctocolors_cjs(), 1);
|
|
280123
|
-
class Separator {
|
|
280124
|
-
separator = import_yoctocolors_cjs3.default.dim(Array.from({ length: 15 }).join(esm_default.line));
|
|
280125
|
-
type = "separator";
|
|
280126
|
-
constructor(separator) {
|
|
280127
|
-
if (separator) {
|
|
280128
|
-
this.separator = separator;
|
|
280129
|
-
}
|
|
280130
|
-
}
|
|
280131
|
-
static isSeparator(choice) {
|
|
280132
|
-
return Boolean(choice && typeof choice === "object" && "type" in choice && choice.type === "separator");
|
|
280133
|
-
}
|
|
280134
|
-
}
|
|
280135
279735
|
// ../../node_modules/@inquirer/select/dist/esm/index.js
|
|
280136
|
-
var
|
|
280137
|
-
var
|
|
279736
|
+
var import_yoctocolors_cjs3 = __toESM(require_yoctocolors_cjs(), 1);
|
|
279737
|
+
var import_ansi_escapes2 = __toESM(require_ansi_escapes(), 1);
|
|
280138
279738
|
var selectTheme = {
|
|
280139
279739
|
icon: { cursor: esm_default.pointer },
|
|
280140
279740
|
style: {
|
|
280141
|
-
disabled: (text2) =>
|
|
280142
|
-
description: (text2) =>
|
|
279741
|
+
disabled: (text2) => import_yoctocolors_cjs3.default.dim(`- ${text2}`),
|
|
279742
|
+
description: (text2) => import_yoctocolors_cjs3.default.cyan(text2)
|
|
280143
279743
|
},
|
|
280144
279744
|
helpMode: "auto"
|
|
280145
279745
|
};
|
|
@@ -280168,19 +279768,19 @@ function normalizeChoices(choices) {
|
|
|
280168
279768
|
};
|
|
280169
279769
|
});
|
|
280170
279770
|
}
|
|
280171
|
-
var esm_default2 =
|
|
279771
|
+
var esm_default2 = createPrompt((config3, done) => {
|
|
280172
279772
|
const { loop = true, pageSize = 7 } = config3;
|
|
280173
|
-
const firstRender =
|
|
280174
|
-
const theme =
|
|
280175
|
-
const [status, setStatus] =
|
|
280176
|
-
const prefix =
|
|
280177
|
-
const searchTimeoutRef =
|
|
279773
|
+
const firstRender = useRef(true);
|
|
279774
|
+
const theme = makeTheme(selectTheme, config3.theme);
|
|
279775
|
+
const [status, setStatus] = useState("idle");
|
|
279776
|
+
const prefix = usePrefix({ status, theme });
|
|
279777
|
+
const searchTimeoutRef = useRef();
|
|
280178
279778
|
const items = useMemo(() => normalizeChoices(config3.choices), [config3.choices]);
|
|
280179
279779
|
const bounds = useMemo(() => {
|
|
280180
279780
|
const first = items.findIndex(isSelectable);
|
|
280181
279781
|
const last = items.findLastIndex(isSelectable);
|
|
280182
279782
|
if (first === -1) {
|
|
280183
|
-
throw new
|
|
279783
|
+
throw new ValidationError("[select prompt] No selectable choices. All choices are disabled.");
|
|
280184
279784
|
}
|
|
280185
279785
|
return { first, last };
|
|
280186
279786
|
}, [items]);
|
|
@@ -280189,31 +279789,31 @@ var esm_default2 = createPrompt2((config3, done) => {
|
|
|
280189
279789
|
return -1;
|
|
280190
279790
|
return items.findIndex((item) => isSelectable(item) && item.value === config3.default);
|
|
280191
279791
|
}, [config3.default, items]);
|
|
280192
|
-
const [active, setActive] =
|
|
279792
|
+
const [active, setActive] = useState(defaultItemIndex === -1 ? bounds.first : defaultItemIndex);
|
|
280193
279793
|
const selectedChoice = items[active];
|
|
280194
|
-
|
|
279794
|
+
useKeypress((key2, rl) => {
|
|
280195
279795
|
clearTimeout(searchTimeoutRef.current);
|
|
280196
|
-
if (
|
|
279796
|
+
if (isEnterKey(key2)) {
|
|
280197
279797
|
setStatus("done");
|
|
280198
279798
|
done(selectedChoice.value);
|
|
280199
|
-
} else if (isUpKey(
|
|
279799
|
+
} else if (isUpKey(key2) || isDownKey(key2)) {
|
|
280200
279800
|
rl.clearLine(0);
|
|
280201
|
-
if (loop || isUpKey(
|
|
280202
|
-
const offset = isUpKey(
|
|
279801
|
+
if (loop || isUpKey(key2) && active !== bounds.first || isDownKey(key2) && active !== bounds.last) {
|
|
279802
|
+
const offset = isUpKey(key2) ? -1 : 1;
|
|
280203
279803
|
let next = active;
|
|
280204
279804
|
do {
|
|
280205
279805
|
next = (next + offset + items.length) % items.length;
|
|
280206
279806
|
} while (!isSelectable(items[next]));
|
|
280207
279807
|
setActive(next);
|
|
280208
279808
|
}
|
|
280209
|
-
} else if (isNumberKey(
|
|
279809
|
+
} else if (isNumberKey(key2)) {
|
|
280210
279810
|
rl.clearLine(0);
|
|
280211
|
-
const position = Number(
|
|
279811
|
+
const position = Number(key2.name) - 1;
|
|
280212
279812
|
const item = items[position];
|
|
280213
279813
|
if (item != null && isSelectable(item)) {
|
|
280214
279814
|
setActive(position);
|
|
280215
279815
|
}
|
|
280216
|
-
} else if (
|
|
279816
|
+
} else if (isBackspaceKey(key2)) {
|
|
280217
279817
|
rl.clearLine(0);
|
|
280218
279818
|
} else {
|
|
280219
279819
|
const searchTerm = rl.line.toLowerCase();
|
|
@@ -280230,7 +279830,7 @@ var esm_default2 = createPrompt2((config3, done) => {
|
|
|
280230
279830
|
}, 700);
|
|
280231
279831
|
}
|
|
280232
279832
|
});
|
|
280233
|
-
|
|
279833
|
+
useEffect(() => () => {
|
|
280234
279834
|
clearTimeout(searchTimeoutRef.current);
|
|
280235
279835
|
}, []);
|
|
280236
279836
|
const message = theme.style.message(config3.message, status);
|
|
@@ -280269,7 +279869,7 @@ ${theme.style.help("(Use arrow keys to reveal more choices)")}`;
|
|
|
280269
279869
|
const choiceDescription = selectedChoice.description ? `
|
|
280270
279870
|
${theme.style.description(selectedChoice.description)}` : ``;
|
|
280271
279871
|
return `${[prefix, message, helpTipTop].filter(Boolean).join(" ")}
|
|
280272
|
-
${page}${helpTipBottom}${choiceDescription}${
|
|
279872
|
+
${page}${helpTipBottom}${choiceDescription}${import_ansi_escapes2.default.cursorHide}`;
|
|
280273
279873
|
});
|
|
280274
279874
|
|
|
280275
279875
|
// src/prompts/smart-contract-set/subgraph.prompt.ts
|
|
@@ -280609,13 +280209,13 @@ var esm_default3 = createPrompt((config3, done) => {
|
|
|
280609
280209
|
const [value4, setValue] = useState("");
|
|
280610
280210
|
const theme = makeTheme(config3.theme);
|
|
280611
280211
|
const prefix = usePrefix({ status, theme });
|
|
280612
|
-
useKeypress((
|
|
280613
|
-
if (isEnterKey(
|
|
280212
|
+
useKeypress((key2, rl) => {
|
|
280213
|
+
if (isEnterKey(key2)) {
|
|
280614
280214
|
const answer = getBooleanValue(value4, config3.default);
|
|
280615
280215
|
setValue(transformer(answer));
|
|
280616
280216
|
setStatus("done");
|
|
280617
280217
|
done(answer);
|
|
280618
|
-
} else if (
|
|
280218
|
+
} else if (key2.name === "tab") {
|
|
280619
280219
|
const answer = boolToString(!getBooleanValue(value4, config3.default));
|
|
280620
280220
|
rl.clearLine(0);
|
|
280621
280221
|
rl.write(answer);
|
|
@@ -280647,11 +280247,11 @@ var esm_default4 = createPrompt((config3, done) => {
|
|
|
280647
280247
|
const [errorMsg, setError] = useState();
|
|
280648
280248
|
const [value4, setValue] = useState("");
|
|
280649
280249
|
const prefix = usePrefix({ status, theme });
|
|
280650
|
-
useKeypress(async (
|
|
280250
|
+
useKeypress(async (key2, rl) => {
|
|
280651
280251
|
if (status !== "idle") {
|
|
280652
280252
|
return;
|
|
280653
280253
|
}
|
|
280654
|
-
if (isEnterKey(
|
|
280254
|
+
if (isEnterKey(key2)) {
|
|
280655
280255
|
const answer = value4 || defaultValue;
|
|
280656
280256
|
setStatus("loading");
|
|
280657
280257
|
const isValid2 = required && !answer ? "You must provide a value" : await validate3(answer);
|
|
@@ -280668,9 +280268,9 @@ var esm_default4 = createPrompt((config3, done) => {
|
|
|
280668
280268
|
setError(isValid2 || "You must provide a valid value");
|
|
280669
280269
|
setStatus("idle");
|
|
280670
280270
|
}
|
|
280671
|
-
} else if (isBackspaceKey(
|
|
280271
|
+
} else if (isBackspaceKey(key2) && !value4) {
|
|
280672
280272
|
setDefaultValue(undefined);
|
|
280673
|
-
} else if (
|
|
280273
|
+
} else if (key2.name === "tab" && !value4) {
|
|
280674
280274
|
setDefaultValue(undefined);
|
|
280675
280275
|
rl.clearLine(0);
|
|
280676
280276
|
rl.write(defaultValue);
|
|
@@ -280702,7 +280302,7 @@ var esm_default4 = createPrompt((config3, done) => {
|
|
|
280702
280302
|
});
|
|
280703
280303
|
|
|
280704
280304
|
// ../../node_modules/@inquirer/password/dist/esm/index.js
|
|
280705
|
-
var
|
|
280305
|
+
var import_ansi_escapes3 = __toESM(require_ansi_escapes(), 1);
|
|
280706
280306
|
var esm_default5 = createPrompt((config3, done) => {
|
|
280707
280307
|
const { validate: validate3 = () => true } = config3;
|
|
280708
280308
|
const theme = makeTheme(config3.theme);
|
|
@@ -280710,11 +280310,11 @@ var esm_default5 = createPrompt((config3, done) => {
|
|
|
280710
280310
|
const [errorMsg, setError] = useState();
|
|
280711
280311
|
const [value4, setValue] = useState("");
|
|
280712
280312
|
const prefix = usePrefix({ status, theme });
|
|
280713
|
-
useKeypress(async (
|
|
280313
|
+
useKeypress(async (key2, rl) => {
|
|
280714
280314
|
if (status !== "idle") {
|
|
280715
280315
|
return;
|
|
280716
280316
|
}
|
|
280717
|
-
if (isEnterKey(
|
|
280317
|
+
if (isEnterKey(key2)) {
|
|
280718
280318
|
const answer = value4;
|
|
280719
280319
|
setStatus("loading");
|
|
280720
280320
|
const isValid2 = await validate3(answer);
|
|
@@ -280739,7 +280339,7 @@ var esm_default5 = createPrompt((config3, done) => {
|
|
|
280739
280339
|
const maskChar = typeof config3.mask === "string" ? config3.mask : "*";
|
|
280740
280340
|
formattedValue = maskChar.repeat(value4.length);
|
|
280741
280341
|
} else if (status !== "done") {
|
|
280742
|
-
helpTip = `${theme.style.help("[input is masked]")}${
|
|
280342
|
+
helpTip = `${theme.style.help("[input is masked]")}${import_ansi_escapes3.default.cursorHide}`;
|
|
280743
280343
|
}
|
|
280744
280344
|
if (status === "done") {
|
|
280745
280345
|
formattedValue = theme.style.answer(formattedValue);
|
|
@@ -281811,7 +281411,7 @@ var basename2 = function(p6, extension) {
|
|
|
281811
281411
|
return extension && lastSegment.endsWith(extension) ? lastSegment.slice(0, -extension.length) : lastSegment;
|
|
281812
281412
|
};
|
|
281813
281413
|
// ../../node_modules/defu/dist/defu.mjs
|
|
281814
|
-
function
|
|
281414
|
+
function isPlainObject3(value4) {
|
|
281815
281415
|
if (value4 === null || typeof value4 !== "object") {
|
|
281816
281416
|
return false;
|
|
281817
281417
|
}
|
|
@@ -281828,27 +281428,27 @@ function isPlainObject4(value4) {
|
|
|
281828
281428
|
return true;
|
|
281829
281429
|
}
|
|
281830
281430
|
function _defu(baseObject, defaults2, namespace = ".", merger) {
|
|
281831
|
-
if (!
|
|
281431
|
+
if (!isPlainObject3(defaults2)) {
|
|
281832
281432
|
return _defu(baseObject, {}, namespace, merger);
|
|
281833
281433
|
}
|
|
281834
281434
|
const object = Object.assign({}, defaults2);
|
|
281835
|
-
for (const
|
|
281836
|
-
if (
|
|
281435
|
+
for (const key2 in baseObject) {
|
|
281436
|
+
if (key2 === "__proto__" || key2 === "constructor") {
|
|
281837
281437
|
continue;
|
|
281838
281438
|
}
|
|
281839
|
-
const value4 = baseObject[
|
|
281439
|
+
const value4 = baseObject[key2];
|
|
281840
281440
|
if (value4 === null || value4 === undefined) {
|
|
281841
281441
|
continue;
|
|
281842
281442
|
}
|
|
281843
|
-
if (merger && merger(object,
|
|
281443
|
+
if (merger && merger(object, key2, value4, namespace)) {
|
|
281844
281444
|
continue;
|
|
281845
281445
|
}
|
|
281846
|
-
if (Array.isArray(value4) && Array.isArray(object[
|
|
281847
|
-
object[
|
|
281848
|
-
} else if (
|
|
281849
|
-
object[
|
|
281446
|
+
if (Array.isArray(value4) && Array.isArray(object[key2])) {
|
|
281447
|
+
object[key2] = [...value4, ...object[key2]];
|
|
281448
|
+
} else if (isPlainObject3(value4) && isPlainObject3(object[key2])) {
|
|
281449
|
+
object[key2] = _defu(value4, object[key2], (namespace ? `${namespace}.` : "") + key2.toString(), merger);
|
|
281850
281450
|
} else {
|
|
281851
|
-
object[
|
|
281451
|
+
object[key2] = value4;
|
|
281852
281452
|
}
|
|
281853
281453
|
}
|
|
281854
281454
|
return object;
|
|
@@ -281857,15 +281457,15 @@ function createDefu(merger) {
|
|
|
281857
281457
|
return (...arguments_4) => arguments_4.reduce((p6, c3) => _defu(p6, c3, "", merger), {});
|
|
281858
281458
|
}
|
|
281859
281459
|
var defu = createDefu();
|
|
281860
|
-
var defuFn = createDefu((object,
|
|
281861
|
-
if (object[
|
|
281862
|
-
object[
|
|
281460
|
+
var defuFn = createDefu((object, key2, currentValue) => {
|
|
281461
|
+
if (object[key2] !== undefined && typeof currentValue === "function") {
|
|
281462
|
+
object[key2] = currentValue(object[key2]);
|
|
281863
281463
|
return true;
|
|
281864
281464
|
}
|
|
281865
281465
|
});
|
|
281866
|
-
var defuArrayFn = createDefu((object,
|
|
281867
|
-
if (Array.isArray(object[
|
|
281868
|
-
object[
|
|
281466
|
+
var defuArrayFn = createDefu((object, key2, currentValue) => {
|
|
281467
|
+
if (Array.isArray(object[key2]) && typeof currentValue === "function") {
|
|
281468
|
+
object[key2] = currentValue(object[key2]);
|
|
281869
281469
|
return true;
|
|
281870
281470
|
}
|
|
281871
281471
|
});
|
|
@@ -282127,11 +281727,11 @@ function cacheDirectory() {
|
|
|
282127
281727
|
}
|
|
282128
281728
|
function normalizeHeaders(headers = {}) {
|
|
282129
281729
|
const normalized = {};
|
|
282130
|
-
for (const [
|
|
281730
|
+
for (const [key2, value4] of Object.entries(headers)) {
|
|
282131
281731
|
if (!value4) {
|
|
282132
281732
|
continue;
|
|
282133
281733
|
}
|
|
282134
|
-
normalized[
|
|
281734
|
+
normalized[key2.toLowerCase()] = value4;
|
|
282135
281735
|
}
|
|
282136
281736
|
return normalized;
|
|
282137
281737
|
}
|
|
@@ -282558,11 +282158,6 @@ function logoutCommand() {
|
|
|
282558
282158
|
});
|
|
282559
282159
|
}
|
|
282560
282160
|
|
|
282561
|
-
// src/commands/platform/common/cluster-service.args.ts
|
|
282562
|
-
function addClusterServiceArgs(cmd2) {
|
|
282563
|
-
return cmd2.option("--provider <provider>", "Network provider (run `settlemint platform config` to see available providers)").option("--region <region>", "Deployment region (run `settlemint platform config` to see available regions)").addOption(new Option("--size <size>", "Network size").choices(["CUSTOM", "LARGE", "MEDIUM", "SMALL"]).argParser((value4) => value4).default("SMALL")).addOption(new Option("--type <type>", "Network type").choices(["DEDICATED", "SHARED"]).argParser((value4) => value4).default("SHARED"));
|
|
282564
|
-
}
|
|
282565
|
-
|
|
282566
282161
|
// src/constants/resource-type.ts
|
|
282567
282162
|
var SETTLEMINT_CLIENT_MAP = {
|
|
282568
282163
|
application: "application",
|
|
@@ -282599,6 +282194,71 @@ var LABELS_MAP = {
|
|
|
282599
282194
|
}
|
|
282600
282195
|
};
|
|
282601
282196
|
|
|
282197
|
+
// src/spinners/service.spinner.ts
|
|
282198
|
+
async function serviceSpinner(type4, task) {
|
|
282199
|
+
const { plural } = LABELS_MAP[type4];
|
|
282200
|
+
return spinner({
|
|
282201
|
+
startMessage: `Loading ${plural} services`,
|
|
282202
|
+
stopMessage: `Loaded ${plural} services`,
|
|
282203
|
+
task
|
|
282204
|
+
});
|
|
282205
|
+
}
|
|
282206
|
+
|
|
282207
|
+
// src/commands/pincode-verification-response.ts
|
|
282208
|
+
function pincodeVerificationResponseCommand() {
|
|
282209
|
+
return new Command("pincode-verification-response").alias("pvr").description("Get pincode verification response for a blockchain node").requiredOption("--wallet-address <walletAddress>", "The wallet address to get pincode verification response for").option("-i, --instance <instance>", "The instance to connect to (defaults to the instance in the .env file)").option("--blockchain-node <blockchainNode>", "Blockchain Node unique name to get pincode verification response for").action(async ({ instance, blockchainNode, walletAddress }) => {
|
|
282210
|
+
intro("Generating pincode verification response for wallet address");
|
|
282211
|
+
const env2 = await loadEnv(false, false);
|
|
282212
|
+
const applicationUniqueName = env2.SETTLEMINT_APPLICATION;
|
|
282213
|
+
if (!applicationUniqueName) {
|
|
282214
|
+
return missingApplication();
|
|
282215
|
+
}
|
|
282216
|
+
const selectedInstance = instance ? sanitizeAndValidateInstanceUrl(instance) : await instancePrompt(env2, true);
|
|
282217
|
+
const personalAccessToken = await getInstanceCredentials(selectedInstance);
|
|
282218
|
+
if (!personalAccessToken) {
|
|
282219
|
+
return missingPersonalAccessTokenError();
|
|
282220
|
+
}
|
|
282221
|
+
const settlemint = createSettleMintClient({
|
|
282222
|
+
accessToken: personalAccessToken.personalAccessToken,
|
|
282223
|
+
instance: selectedInstance
|
|
282224
|
+
});
|
|
282225
|
+
const blockchainNodes = await serviceSpinner("blockchain node", () => settlemint.blockchainNode.list(applicationUniqueName));
|
|
282226
|
+
let selectedBlockchainNode = blockchainNode ? blockchainNodes.find((node) => node.uniqueName === blockchainNode) : undefined;
|
|
282227
|
+
if (!selectedBlockchainNode) {
|
|
282228
|
+
selectedBlockchainNode = await blockchainNodePrompt({
|
|
282229
|
+
env: env2,
|
|
282230
|
+
nodes: blockchainNodes,
|
|
282231
|
+
accept: false,
|
|
282232
|
+
isRequired: true
|
|
282233
|
+
});
|
|
282234
|
+
if (!selectedBlockchainNode) {
|
|
282235
|
+
return nothingSelectedError("blockchain node");
|
|
282236
|
+
}
|
|
282237
|
+
}
|
|
282238
|
+
const pincode = await esm_default5({
|
|
282239
|
+
message: "Enter your pincode",
|
|
282240
|
+
validate(value4) {
|
|
282241
|
+
if (!value4.trim()) {
|
|
282242
|
+
return "Pincode is required";
|
|
282243
|
+
}
|
|
282244
|
+
return true;
|
|
282245
|
+
}
|
|
282246
|
+
});
|
|
282247
|
+
const pincodeVerificationResponse = await settlemint.wallet.pincodeVerificationResponse({
|
|
282248
|
+
userWalletAddress: walletAddress,
|
|
282249
|
+
pincode,
|
|
282250
|
+
nodeId: selectedBlockchainNode.id
|
|
282251
|
+
});
|
|
282252
|
+
note(`Pincode verification response: ${pincodeVerificationResponse}`);
|
|
282253
|
+
outro("Pincode verification response generated");
|
|
282254
|
+
});
|
|
282255
|
+
}
|
|
282256
|
+
|
|
282257
|
+
// src/commands/platform/common/cluster-service.args.ts
|
|
282258
|
+
function addClusterServiceArgs(cmd2) {
|
|
282259
|
+
return cmd2.option("--provider <provider>", "Network provider (run `settlemint platform config` to see available providers)").option("--region <region>", "Deployment region (run `settlemint platform config` to see available regions)").addOption(new Option("--size <size>", "Network size").choices(["CUSTOM", "LARGE", "MEDIUM", "SMALL"]).argParser((value4) => value4).default("SMALL")).addOption(new Option("--type <type>", "Network type").choices(["DEDICATED", "SHARED"]).argParser((value4) => value4).default("SHARED"));
|
|
282260
|
+
}
|
|
282261
|
+
|
|
282602
282262
|
// src/commands/platform/utils/wait-for-completion.ts
|
|
282603
282263
|
class TimeoutError extends Error {
|
|
282604
282264
|
}
|
|
@@ -282611,7 +282271,7 @@ async function waitForCompletion({
|
|
|
282611
282271
|
restartIfTimeout = false
|
|
282612
282272
|
}) {
|
|
282613
282273
|
const serviceType = SETTLEMINT_CLIENT_MAP[type4];
|
|
282614
|
-
if (serviceType === "workspace" || serviceType === "application" || serviceType === "foundry" || serviceType === "applicationAccessToken" || serviceType === "platform") {
|
|
282274
|
+
if (serviceType === "workspace" || serviceType === "application" || serviceType === "foundry" || serviceType === "applicationAccessToken" || serviceType === "platform" || serviceType === "wallet") {
|
|
282615
282275
|
return true;
|
|
282616
282276
|
}
|
|
282617
282277
|
const service = settlemint[serviceType];
|
|
@@ -283228,16 +282888,6 @@ async function blockchainNetworkPrompt({
|
|
|
283228
282888
|
});
|
|
283229
282889
|
}
|
|
283230
282890
|
|
|
283231
|
-
// src/spinners/service.spinner.ts
|
|
283232
|
-
async function serviceSpinner(type4, task) {
|
|
283233
|
-
const { plural } = LABELS_MAP[type4];
|
|
283234
|
-
return spinner({
|
|
283235
|
-
startMessage: `Loading ${plural} services`,
|
|
283236
|
-
stopMessage: `Loaded ${plural} services`,
|
|
283237
|
-
task
|
|
283238
|
-
});
|
|
283239
|
-
}
|
|
283240
|
-
|
|
283241
282891
|
// src/commands/platform/blockchain-node/besu/create.ts
|
|
283242
282892
|
function blockchainNodeBesuCreateCommand() {
|
|
283243
282893
|
return getCreateCommand({
|
|
@@ -284313,7 +283963,7 @@ function jsonOutput(data) {
|
|
|
284313
283963
|
var composer = require_composer();
|
|
284314
283964
|
var Document = require_Document();
|
|
284315
283965
|
var Schema = require_Schema();
|
|
284316
|
-
var
|
|
283966
|
+
var errors2 = require_errors3();
|
|
284317
283967
|
var Alias = require_Alias();
|
|
284318
283968
|
var identity2 = require_identity();
|
|
284319
283969
|
var Pair = require_Pair();
|
|
@@ -284329,9 +283979,9 @@ var visit2 = require_visit();
|
|
|
284329
283979
|
var $Composer = composer.Composer;
|
|
284330
283980
|
var $Document = Document.Document;
|
|
284331
283981
|
var $Schema = Schema.Schema;
|
|
284332
|
-
var $YAMLError =
|
|
284333
|
-
var $YAMLParseError =
|
|
284334
|
-
var $YAMLWarning =
|
|
283982
|
+
var $YAMLError = errors2.YAMLError;
|
|
283983
|
+
var $YAMLParseError = errors2.YAMLParseError;
|
|
283984
|
+
var $YAMLWarning = errors2.YAMLWarning;
|
|
284335
283985
|
var $Alias = Alias.Alias;
|
|
284336
283986
|
var $isAlias = identity2.isAlias;
|
|
284337
283987
|
var $isCollection = identity2.isCollection;
|
|
@@ -284514,7 +284164,7 @@ function applicationsListCommand() {
|
|
|
284514
284164
|
});
|
|
284515
284165
|
if (printToTerminal) {
|
|
284516
284166
|
const selectedWorkspace = await settlemint.workspace.read(workspaceUniqueName);
|
|
284517
|
-
table(`Applications for workspace ${selectedWorkspace.name} (${selectedWorkspace}) - ${getWorkspaceUrl(selectedInstance, selectedWorkspace)}`, applicationsData);
|
|
284167
|
+
table(`Applications for workspace ${selectedWorkspace.name} (${selectedWorkspace.uniqueName}) - ${getWorkspaceUrl(selectedInstance, selectedWorkspace)}`, applicationsData);
|
|
284518
284168
|
} else if (output === "json") {
|
|
284519
284169
|
jsonOutput(applicationsData);
|
|
284520
284170
|
} else if (output === "yaml") {
|
|
@@ -284677,7 +284327,7 @@ async function getServicesAndMapResults({
|
|
|
284677
284327
|
const application = await settlemint.application.read(applicationUniqueName);
|
|
284678
284328
|
const services = await servicesSpinner(settlemint, applicationUniqueName, types2);
|
|
284679
284329
|
const results = (types2 ?? SERVICE_TYPES).filter((serviceType) => !types2 || types2.includes(serviceType)).map((serviceType) => {
|
|
284680
|
-
const [_5, labels] = Object.entries(LABELS_MAP).find(([
|
|
284330
|
+
const [_5, labels] = Object.entries(LABELS_MAP).find(([key2, value4]) => value4.command === serviceType) ?? [
|
|
284681
284331
|
null,
|
|
284682
284332
|
{ plural: serviceType }
|
|
284683
284333
|
];
|
|
@@ -284905,11 +284555,11 @@ function createCommand4() {
|
|
|
284905
284555
|
|
|
284906
284556
|
// src/utils/commands/passthrough-options.ts
|
|
284907
284557
|
function mapPassthroughOptions(options, command) {
|
|
284908
|
-
const optionArgs = Object.entries(options).map(([
|
|
284558
|
+
const optionArgs = Object.entries(options).map(([key2, value4]) => {
|
|
284909
284559
|
if (value4 === true) {
|
|
284910
|
-
return `--${
|
|
284560
|
+
return `--${key2}`;
|
|
284911
284561
|
}
|
|
284912
|
-
return `--${
|
|
284562
|
+
return `--${key2}=${value4}`;
|
|
284913
284563
|
});
|
|
284914
284564
|
return [...optionArgs, ...command.args];
|
|
284915
284565
|
}
|
|
@@ -285814,6 +285464,7 @@ function registerCommands() {
|
|
|
285814
285464
|
sdkcli.addCommand(createCommand2());
|
|
285815
285465
|
sdkcli.addCommand(loginCommand());
|
|
285816
285466
|
sdkcli.addCommand(logoutCommand());
|
|
285467
|
+
sdkcli.addCommand(pincodeVerificationResponseCommand());
|
|
285817
285468
|
return sdkcli;
|
|
285818
285469
|
}
|
|
285819
285470
|
async function sdkCliCommand(argv = process.argv) {
|
|
@@ -285833,4 +285484,4 @@ async function sdkCliCommand(argv = process.argv) {
|
|
|
285833
285484
|
// src/cli.ts
|
|
285834
285485
|
sdkCliCommand();
|
|
285835
285486
|
|
|
285836
|
-
//# debugId=
|
|
285487
|
+
//# debugId=2FA75ECFFCF5FB3D64756E2164756E21
|