@settlemint/sdk-cli 1.1.15 → 1.1.16-main05684df0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -4
- package/dist/cli.js +1988 -706
- package/dist/cli.js.map +55 -26
- package/package.json +6 -6
package/dist/cli.js
CHANGED
@@ -14516,8 +14516,8 @@ var require_printLocation = __commonJS((exports) => {
|
|
14516
14516
|
const columnNum = sourceLocation.column + columnOffset;
|
14517
14517
|
const locationStr = `${source.name}:${lineNum}:${columnNum}
|
14518
14518
|
`;
|
14519
|
-
const
|
14520
|
-
const locationLine =
|
14519
|
+
const lines = body.split(/\r\n|[\n\r]/g);
|
14520
|
+
const locationLine = lines[lineIndex];
|
14521
14521
|
if (locationLine.length > 120) {
|
14522
14522
|
const subLineIndex = Math.floor(columnNum / 80);
|
14523
14523
|
const subLineColumnNum = columnNum % 80;
|
@@ -14533,14 +14533,14 @@ var require_printLocation = __commonJS((exports) => {
|
|
14533
14533
|
]);
|
14534
14534
|
}
|
14535
14535
|
return locationStr + printPrefixedLines([
|
14536
|
-
[`${lineNum - 1} |`,
|
14536
|
+
[`${lineNum - 1} |`, lines[lineIndex - 1]],
|
14537
14537
|
[`${lineNum} |`, locationLine],
|
14538
14538
|
["|", "^".padStart(columnNum)],
|
14539
|
-
[`${lineNum + 1} |`,
|
14539
|
+
[`${lineNum + 1} |`, lines[lineIndex + 1]]
|
14540
14540
|
]);
|
14541
14541
|
}
|
14542
|
-
function printPrefixedLines(
|
14543
|
-
const existingLines =
|
14542
|
+
function printPrefixedLines(lines) {
|
14543
|
+
const existingLines = lines.filter(([_, line]) => line !== undefined);
|
14544
14544
|
const padLen = Math.max(...existingLines.map(([prefix]) => prefix.length));
|
14545
14545
|
return existingLines.map(([prefix, line]) => prefix.padStart(padLen) + (line ? " " + line : "")).join(`
|
14546
14546
|
`);
|
@@ -14953,14 +14953,14 @@ var require_blockString = __commonJS((exports) => {
|
|
14953
14953
|
exports.isPrintableAsBlockString = isPrintableAsBlockString;
|
14954
14954
|
exports.printBlockString = printBlockString;
|
14955
14955
|
var _characterClasses = require_characterClasses();
|
14956
|
-
function dedentBlockStringLines(
|
14956
|
+
function dedentBlockStringLines(lines) {
|
14957
14957
|
var _firstNonEmptyLine2;
|
14958
14958
|
let commonIndent = Number.MAX_SAFE_INTEGER;
|
14959
14959
|
let firstNonEmptyLine = null;
|
14960
14960
|
let lastNonEmptyLine = -1;
|
14961
|
-
for (let i = 0;i <
|
14961
|
+
for (let i = 0;i < lines.length; ++i) {
|
14962
14962
|
var _firstNonEmptyLine;
|
14963
|
-
const line =
|
14963
|
+
const line = lines[i];
|
14964
14964
|
const indent = leadingWhitespace(line);
|
14965
14965
|
if (indent === line.length) {
|
14966
14966
|
continue;
|
@@ -14971,7 +14971,7 @@ var require_blockString = __commonJS((exports) => {
|
|
14971
14971
|
commonIndent = indent;
|
14972
14972
|
}
|
14973
14973
|
}
|
14974
|
-
return
|
14974
|
+
return lines.map((line, i) => i === 0 ? line : line.slice(commonIndent)).slice((_firstNonEmptyLine2 = firstNonEmptyLine) !== null && _firstNonEmptyLine2 !== undefined ? _firstNonEmptyLine2 : 0, lastNonEmptyLine + 1);
|
14975
14975
|
}
|
14976
14976
|
function leadingWhitespace(str) {
|
14977
14977
|
let i = 0;
|
@@ -15033,9 +15033,9 @@ var require_blockString = __commonJS((exports) => {
|
|
15033
15033
|
}
|
15034
15034
|
function printBlockString(value, options) {
|
15035
15035
|
const escapedValue = value.replace(/"""/g, '\\"""');
|
15036
|
-
const
|
15037
|
-
const isSingleLine =
|
15038
|
-
const forceLeadingNewLine =
|
15036
|
+
const lines = escapedValue.split(/\r\n|[\n\r]/g);
|
15037
|
+
const isSingleLine = lines.length === 1;
|
15038
|
+
const forceLeadingNewLine = lines.length > 1 && lines.slice(1).every((line) => line.length === 0 || (0, _characterClasses.isWhiteSpace)(line.charCodeAt(0)));
|
15039
15039
|
const hasTrailingTripleQuotes = escapedValue.endsWith('\\"""');
|
15040
15040
|
const hasTrailingQuote = value.endsWith('"') && !hasTrailingTripleQuotes;
|
15041
15041
|
const hasTrailingSlash = value.endsWith("\\");
|
@@ -34095,9 +34095,9 @@ var require_commonjs4 = __commonJS((exports) => {
|
|
34095
34095
|
this.#resolveCache = new ResolveCache2;
|
34096
34096
|
this.#resolvePosixCache = new ResolveCache2;
|
34097
34097
|
this.#children = new ChildrenCache2(childrenCacheSize);
|
34098
|
-
const
|
34099
|
-
if (
|
34100
|
-
|
34098
|
+
const split = cwdPath.substring(this.rootPath.length).split(sep2);
|
34099
|
+
if (split.length === 1 && !split[0]) {
|
34100
|
+
split.pop();
|
34101
34101
|
}
|
34102
34102
|
if (nocase === undefined) {
|
34103
34103
|
throw new TypeError("must provide nocase setting to PathScurryBase ctor");
|
@@ -34106,11 +34106,11 @@ var require_commonjs4 = __commonJS((exports) => {
|
|
34106
34106
|
this.root = this.newRoot(this.#fs);
|
34107
34107
|
this.roots[this.rootPath] = this.root;
|
34108
34108
|
let prev = this.root;
|
34109
|
-
let len =
|
34109
|
+
let len = split.length - 1;
|
34110
34110
|
const joinSep = pathImpl.sep;
|
34111
34111
|
let abs = this.rootPath;
|
34112
34112
|
let sawFirst = false;
|
34113
|
-
for (const part of
|
34113
|
+
for (const part of split) {
|
34114
34114
|
const l = len--;
|
34115
34115
|
prev = prev.child(part, {
|
34116
34116
|
relative: new Array(l).fill("..").join(joinSep),
|
@@ -36562,9 +36562,9 @@ var require_ini = __commonJS((exports, module) => {
|
|
36562
36562
|
let p = out;
|
36563
36563
|
let section = null;
|
36564
36564
|
const re = /^\[([^\]]*)\]\s*$|^([^=]+)(=(.*))?$/i;
|
36565
|
-
const
|
36565
|
+
const lines = str.split(/[\r\n]+/g);
|
36566
36566
|
const duplicates = {};
|
36567
|
-
for (const line of
|
36567
|
+
for (const line of lines) {
|
36568
36568
|
if (!line || line.match(/^\s*[;#]/) || line.match(/^\s*$/)) {
|
36569
36569
|
continue;
|
36570
36570
|
}
|
@@ -38119,7 +38119,7 @@ var require_semver2 = __commonJS((exports, module) => {
|
|
38119
38119
|
// ../../node_modules/@npmcli/git/lib/lines-to-revs.js
|
38120
38120
|
var require_lines_to_revs = __commonJS((exports, module) => {
|
38121
38121
|
var semver = require_semver2();
|
38122
|
-
module.exports = (
|
38122
|
+
module.exports = (lines) => finish(lines.reduce(linesToRevsReducer, {
|
38123
38123
|
versions: {},
|
38124
38124
|
"dist-tags": {},
|
38125
38125
|
refs: {},
|
@@ -38180,12 +38180,12 @@ var require_lines_to_revs = __commonJS((exports, module) => {
|
|
38180
38180
|
return "other";
|
38181
38181
|
};
|
38182
38182
|
var lineToRevDoc = (line) => {
|
38183
|
-
const
|
38184
|
-
if (
|
38183
|
+
const split = line.trim().split(/\s+/, 2);
|
38184
|
+
if (split.length < 2) {
|
38185
38185
|
return null;
|
38186
38186
|
}
|
38187
|
-
const sha =
|
38188
|
-
const rawRef =
|
38187
|
+
const sha = split[0].trim();
|
38188
|
+
const rawRef = split[1].trim();
|
38189
38189
|
const type2 = refType(rawRef);
|
38190
38190
|
if (type2 === "tag") {
|
38191
38191
|
const ref = rawRef.slice("refs/tags/".length);
|
@@ -40746,17 +40746,17 @@ var require_normalize_data = __commonJS((exports, module) => {
|
|
40746
40746
|
};
|
40747
40747
|
var isEmail = (str) => str.includes("@") && str.indexOf("@") < str.lastIndexOf(".");
|
40748
40748
|
function extractDescription(description) {
|
40749
|
-
const
|
40749
|
+
const lines = description.trim().split(`
|
40750
40750
|
`);
|
40751
40751
|
let start = 0;
|
40752
|
-
while (
|
40752
|
+
while (lines[start]?.trim().match(/^(#|$)/)) {
|
40753
40753
|
start++;
|
40754
40754
|
}
|
40755
40755
|
let end = start + 1;
|
40756
|
-
while (end <
|
40756
|
+
while (end < lines.length && lines[end].trim()) {
|
40757
40757
|
end++;
|
40758
40758
|
}
|
40759
|
-
return
|
40759
|
+
return lines.slice(start, end).join(" ").trim();
|
40760
40760
|
}
|
40761
40761
|
function stringifyPerson(person) {
|
40762
40762
|
if (typeof person !== "string") {
|
@@ -59469,9 +59469,9 @@ ${lanes.join(`
|
|
59469
59469
|
return node.kind === 183 || node.kind === 233;
|
59470
59470
|
}
|
59471
59471
|
var MAX_SMI_X86 = 1073741823;
|
59472
|
-
function guessIndentation(
|
59472
|
+
function guessIndentation(lines) {
|
59473
59473
|
let indentation = MAX_SMI_X86;
|
59474
|
-
for (const line of
|
59474
|
+
for (const line of lines) {
|
59475
59475
|
if (!line.length) {
|
59476
59476
|
continue;
|
59477
59477
|
}
|
@@ -148028,8 +148028,8 @@ ${lanes.join(`
|
|
148028
148028
|
if (node.comment) {
|
148029
148029
|
const text = getTextOfJSDocComment(node.comment);
|
148030
148030
|
if (text) {
|
148031
|
-
const
|
148032
|
-
for (const line of
|
148031
|
+
const lines = text.split(/\r\n?|\n/);
|
148032
|
+
for (const line of lines) {
|
148033
148033
|
writeLine();
|
148034
148034
|
writeSpace();
|
148035
148035
|
writePunctuation("*");
|
@@ -148673,9 +148673,9 @@ ${lanes.join(`
|
|
148673
148673
|
if (getEmitFlags(parentNode) & 1) {
|
148674
148674
|
writeSpace();
|
148675
148675
|
} else if (preserveSourceNewlines) {
|
148676
|
-
const
|
148677
|
-
if (
|
148678
|
-
writeLine(
|
148676
|
+
const lines = getLinesBetweenNodes(parentNode, prevChildNode, nextChildNode);
|
148677
|
+
if (lines) {
|
148678
|
+
writeLine(lines);
|
148679
148679
|
} else {
|
148680
148680
|
writeSpace();
|
148681
148681
|
}
|
@@ -148684,9 +148684,9 @@ ${lanes.join(`
|
|
148684
148684
|
}
|
148685
148685
|
}
|
148686
148686
|
function writeLines(text) {
|
148687
|
-
const
|
148688
|
-
const indentation = guessIndentation(
|
148689
|
-
for (const lineText of
|
148687
|
+
const lines = text.split(/\r\n?|\n/);
|
148688
|
+
const indentation = guessIndentation(lines);
|
148689
|
+
for (const lineText of lines) {
|
148690
148690
|
const line = indentation ? lineText.slice(indentation) : lineText;
|
148691
148691
|
if (line.length) {
|
148692
148692
|
writeLine();
|
@@ -148784,11 +148784,11 @@ ${lanes.join(`
|
|
148784
148784
|
}
|
148785
148785
|
function getEffectiveLines(getLineDifference) {
|
148786
148786
|
Debug.assert(!!preserveSourceNewlines);
|
148787
|
-
const
|
148788
|
-
if (
|
148787
|
+
const lines = getLineDifference(true);
|
148788
|
+
if (lines === 0) {
|
148789
148789
|
return getLineDifference(false);
|
148790
148790
|
}
|
148791
|
-
return
|
148791
|
+
return lines;
|
148792
148792
|
}
|
148793
148793
|
function writeLineSeparatorsAndIndentBefore(node, parent2) {
|
148794
148794
|
const leadingNewlines = preserveSourceNewlines && getLeadingLineTerminatorCount(parent2, node, 0);
|
@@ -159074,7 +159074,7 @@ ${lanes.join(`
|
|
159074
159074
|
function generateOptionOutput(sys2, option, rightAlignOfLeft, leftAlignOfRight) {
|
159075
159075
|
var _a;
|
159076
159076
|
const text = [];
|
159077
|
-
const
|
159077
|
+
const colors2 = createColors(sys2);
|
159078
159078
|
const name2 = getDisplayNameTextOfOption(option);
|
159079
159079
|
const valueCandidates = getValueCandidate(option);
|
159080
159080
|
const defaultValueDescription = typeof option.defaultValueDescription === "object" ? getDiagnosticText(option.defaultValueDescription) : formatDefaultValue(option.defaultValueDescription, option.type === "list" || option.type === "listOrElement" ? option.element.type : option.type);
|
@@ -159095,7 +159095,7 @@ ${lanes.join(`
|
|
159095
159095
|
}
|
159096
159096
|
text.push(sys2.newLine);
|
159097
159097
|
} else {
|
159098
|
-
text.push(
|
159098
|
+
text.push(colors2.blue(name2), sys2.newLine);
|
159099
159099
|
if (option.description) {
|
159100
159100
|
const description3 = getDiagnosticText(option.description);
|
159101
159101
|
text.push(description3);
|
@@ -159140,7 +159140,7 @@ ${lanes.join(`
|
|
159140
159140
|
if (isFirstLine) {
|
159141
159141
|
curLeft = left.padStart(rightAlignOfLeft2);
|
159142
159142
|
curLeft = curLeft.padEnd(leftAlignOfRight2);
|
159143
|
-
curLeft = colorLeft ?
|
159143
|
+
curLeft = colorLeft ? colors2.blue(curLeft) : curLeft;
|
159144
159144
|
} else {
|
159145
159145
|
curLeft = "".padStart(leftAlignOfRight2);
|
159146
159146
|
}
|
@@ -159209,15 +159209,15 @@ ${lanes.join(`
|
|
159209
159209
|
}
|
159210
159210
|
const rightAlignOfLeftPart = maxLength2 + 2;
|
159211
159211
|
const leftAlignOfRightPart = rightAlignOfLeftPart + 2;
|
159212
|
-
let
|
159212
|
+
let lines = [];
|
159213
159213
|
for (const option of optionsList) {
|
159214
159214
|
const tmp = generateOptionOutput(sys2, option, rightAlignOfLeftPart, leftAlignOfRightPart);
|
159215
|
-
|
159215
|
+
lines = [...lines, ...tmp];
|
159216
159216
|
}
|
159217
|
-
if (
|
159218
|
-
|
159217
|
+
if (lines[lines.length - 2] !== sys2.newLine) {
|
159218
|
+
lines.push(sys2.newLine);
|
159219
159219
|
}
|
159220
|
-
return
|
159220
|
+
return lines;
|
159221
159221
|
}
|
159222
159222
|
function generateSectionOptionsOutput(sys2, sectionName, options, subCategory, beforeOptionsDescription, afterOptionsDescription) {
|
159223
159223
|
let res = [];
|
@@ -159252,9 +159252,9 @@ ${lanes.join(`
|
|
159252
159252
|
return res;
|
159253
159253
|
}
|
159254
159254
|
function printEasyHelp(sys2, simpleOptions) {
|
159255
|
-
const
|
159255
|
+
const colors2 = createColors(sys2);
|
159256
159256
|
let output = [...getHeader(sys2, `${getDiagnosticText(Diagnostics.tsc_Colon_The_TypeScript_Compiler)} - ${getDiagnosticText(Diagnostics.Version_0, version)}`)];
|
159257
|
-
output.push(
|
159257
|
+
output.push(colors2.bold(getDiagnosticText(Diagnostics.COMMON_COMMANDS)) + sys2.newLine + sys2.newLine);
|
159258
159258
|
example("tsc", Diagnostics.Compiles_the_current_project_tsconfig_json_in_the_working_directory);
|
159259
159259
|
example("tsc app.ts util.ts", Diagnostics.Ignoring_tsconfig_json_compiles_the_specified_files_with_default_compiler_options);
|
159260
159260
|
example("tsc -b", Diagnostics.Build_a_composite_project_in_the_working_directory);
|
@@ -159275,7 +159275,7 @@ ${lanes.join(`
|
|
159275
159275
|
function example(ex, desc) {
|
159276
159276
|
const examples = typeof ex === "string" ? [ex] : ex;
|
159277
159277
|
for (const example2 of examples) {
|
159278
|
-
output.push(" " +
|
159278
|
+
output.push(" " + colors2.blue(example2) + sys2.newLine);
|
159279
159279
|
}
|
159280
159280
|
output.push(" " + getDiagnosticText(desc) + sys2.newLine + sys2.newLine);
|
159281
159281
|
}
|
@@ -159298,12 +159298,12 @@ ${lanes.join(`
|
|
159298
159298
|
}
|
159299
159299
|
function getHeader(sys2, message) {
|
159300
159300
|
var _a;
|
159301
|
-
const
|
159301
|
+
const colors2 = createColors(sys2);
|
159302
159302
|
const header = [];
|
159303
159303
|
const terminalWidth = ((_a = sys2.getWidthOfTerminal) == null ? undefined : _a.call(sys2)) ?? 0;
|
159304
159304
|
const tsIconLength = 5;
|
159305
|
-
const tsIconFirstLine =
|
159306
|
-
const tsIconSecondLine =
|
159305
|
+
const tsIconFirstLine = colors2.blueBackground("".padStart(tsIconLength));
|
159306
|
+
const tsIconSecondLine = colors2.blueBackground(colors2.brightWhite("TS ".padStart(tsIconLength)));
|
159307
159307
|
if (terminalWidth >= message.length + tsIconLength) {
|
159308
159308
|
const rightAlign = terminalWidth > 120 ? 120 : terminalWidth;
|
159309
159309
|
const leftAlign = rightAlign - tsIconLength;
|
@@ -211016,9 +211016,9 @@ Additional information: BADCLIENT: Bad error code, ${badCode} not found in range
|
|
211016
211016
|
insertedText = this.initialText + this.trailingText;
|
211017
211017
|
}
|
211018
211018
|
const lm = LineIndex.linesFromText(insertedText);
|
211019
|
-
const
|
211020
|
-
if (
|
211021
|
-
|
211019
|
+
const lines = lm.lines;
|
211020
|
+
if (lines.length > 1 && lines[lines.length - 1] === "") {
|
211021
|
+
lines.pop();
|
211022
211022
|
}
|
211023
211023
|
let branchParent;
|
211024
211024
|
let lastZeroCount;
|
@@ -211037,13 +211037,13 @@ Additional information: BADCLIENT: Bad error code, ${badCode} not found in range
|
|
211037
211037
|
branchParent.remove(lastZeroCount);
|
211038
211038
|
}
|
211039
211039
|
const leafNode = this.startPath[this.startPath.length - 1];
|
211040
|
-
if (
|
211041
|
-
leafNode.text =
|
211042
|
-
if (
|
211043
|
-
let insertedNodes = new Array(
|
211040
|
+
if (lines.length > 0) {
|
211041
|
+
leafNode.text = lines[0];
|
211042
|
+
if (lines.length > 1) {
|
211043
|
+
let insertedNodes = new Array(lines.length - 1);
|
211044
211044
|
let startNode2 = leafNode;
|
211045
|
-
for (let i2 = 1;i2 <
|
211046
|
-
insertedNodes[i2 - 1] = new LineLeaf(
|
211045
|
+
for (let i2 = 1;i2 < lines.length; i2++) {
|
211046
|
+
insertedNodes[i2 - 1] = new LineLeaf(lines[i2]);
|
211047
211047
|
}
|
211048
211048
|
let pathIndex = this.startPath.length - 2;
|
211049
211049
|
while (pathIndex >= 0) {
|
@@ -211313,11 +211313,11 @@ Additional information: BADCLIENT: Bad error code, ${badCode} not found in range
|
|
211313
211313
|
return { absolutePosition: this.root.charCount(), lineText: undefined };
|
211314
211314
|
}
|
211315
211315
|
}
|
211316
|
-
load(
|
211317
|
-
if (
|
211316
|
+
load(lines) {
|
211317
|
+
if (lines.length > 0) {
|
211318
211318
|
const leaves = [];
|
211319
|
-
for (let i2 = 0;i2 <
|
211320
|
-
leaves[i2] = new LineLeaf(
|
211319
|
+
for (let i2 = 0;i2 < lines.length; i2++) {
|
211320
|
+
leaves[i2] = new LineLeaf(lines[i2]);
|
211321
211321
|
}
|
211322
211322
|
this.root = _LineIndex.buildTreeFromBottom(leaves);
|
211323
211323
|
} else {
|
@@ -211420,18 +211420,18 @@ Additional information: BADCLIENT: Bad error code, ${badCode} not found in range
|
|
211420
211420
|
if (lineMap.length === 0) {
|
211421
211421
|
return { lines: [], lineMap };
|
211422
211422
|
}
|
211423
|
-
const
|
211423
|
+
const lines = new Array(lineMap.length);
|
211424
211424
|
const lc = lineMap.length - 1;
|
211425
211425
|
for (let lmi = 0;lmi < lc; lmi++) {
|
211426
|
-
|
211426
|
+
lines[lmi] = text.substring(lineMap[lmi], lineMap[lmi + 1]);
|
211427
211427
|
}
|
211428
211428
|
const endText = text.substring(lineMap[lc]);
|
211429
211429
|
if (endText.length > 0) {
|
211430
|
-
|
211430
|
+
lines[lc] = endText;
|
211431
211431
|
} else {
|
211432
|
-
|
211432
|
+
lines.pop();
|
211433
211433
|
}
|
211434
|
-
return { lines
|
211434
|
+
return { lines, lineMap };
|
211435
211435
|
}
|
211436
211436
|
};
|
211437
211437
|
var LineNode = class _LineNode {
|
@@ -212511,7 +212511,7 @@ async function* streamBody(e4) {
|
|
212511
212511
|
}
|
212512
212512
|
}
|
212513
212513
|
}
|
212514
|
-
async function*
|
212514
|
+
async function* split(e4, r3) {
|
212515
212515
|
var a4 = "";
|
212516
212516
|
var n3;
|
212517
212517
|
for await (var t4 of e4) {
|
@@ -212545,7 +212545,7 @@ function makeFetchSource(e4, r3, a4) {
|
|
212545
212545
|
var n5 = "--" + (a6 ? a6[1] : "-");
|
212546
212546
|
var t5 = true;
|
212547
212547
|
var i4;
|
212548
|
-
for await (var o4 of
|
212548
|
+
for await (var o4 of split(streamBody(r5), `\r
|
212549
212549
|
` + n5)) {
|
212550
212550
|
if (t5) {
|
212551
212551
|
t5 = false;
|
@@ -212578,7 +212578,7 @@ function makeFetchSource(e4, r3, a4) {
|
|
212578
212578
|
} else if (/text\/event-stream/i.test(o3)) {
|
212579
212579
|
s2 = async function* parseEventStream(e6) {
|
212580
212580
|
var r5;
|
212581
|
-
for await (var a6 of
|
212581
|
+
for await (var a6 of split(streamBody(e6), `
|
212582
212582
|
|
212583
212583
|
`)) {
|
212584
212584
|
var n5 = a6.match(S);
|
@@ -228098,6 +228098,57 @@ ${whileRunning(e10)}`;
|
|
228098
228098
|
}, qe);
|
228099
228099
|
});
|
228100
228100
|
|
228101
|
+
// ../../node_modules/slugify/slugify.js
|
228102
|
+
var require_slugify = __commonJS((exports, module) => {
|
228103
|
+
(function(name3, root, factory) {
|
228104
|
+
if (typeof exports === "object") {
|
228105
|
+
module.exports = factory();
|
228106
|
+
module.exports["default"] = factory();
|
228107
|
+
} else if (typeof define === "function" && define.amd) {
|
228108
|
+
define(factory);
|
228109
|
+
} else {
|
228110
|
+
root[name3] = factory();
|
228111
|
+
}
|
228112
|
+
})("slugify", exports, function() {
|
228113
|
+
var charMap = JSON.parse('{"$":"dollar","%":"percent","&":"and","<":"less",">":"greater","|":"or","¢":"cent","£":"pound","¤":"currency","¥":"yen","©":"(c)","ª":"a","®":"(r)","º":"o","À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","Æ":"AE","Ç":"C","È":"E","É":"E","Ê":"E","Ë":"E","Ì":"I","Í":"I","Î":"I","Ï":"I","Ð":"D","Ñ":"N","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","Ù":"U","Ú":"U","Û":"U","Ü":"U","Ý":"Y","Þ":"TH","ß":"ss","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","æ":"ae","ç":"c","è":"e","é":"e","ê":"e","ë":"e","ì":"i","í":"i","î":"i","ï":"i","ð":"d","ñ":"n","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","ù":"u","ú":"u","û":"u","ü":"u","ý":"y","þ":"th","ÿ":"y","Ā":"A","ā":"a","Ă":"A","ă":"a","Ą":"A","ą":"a","Ć":"C","ć":"c","Č":"C","č":"c","Ď":"D","ď":"d","Đ":"DJ","đ":"dj","Ē":"E","ē":"e","Ė":"E","ė":"e","Ę":"e","ę":"e","Ě":"E","ě":"e","Ğ":"G","ğ":"g","Ģ":"G","ģ":"g","Ĩ":"I","ĩ":"i","Ī":"i","ī":"i","Į":"I","į":"i","İ":"I","ı":"i","Ķ":"k","ķ":"k","Ļ":"L","ļ":"l","Ľ":"L","ľ":"l","Ł":"L","ł":"l","Ń":"N","ń":"n","Ņ":"N","ņ":"n","Ň":"N","ň":"n","Ō":"O","ō":"o","Ő":"O","ő":"o","Œ":"OE","œ":"oe","Ŕ":"R","ŕ":"r","Ř":"R","ř":"r","Ś":"S","ś":"s","Ş":"S","ş":"s","Š":"S","š":"s","Ţ":"T","ţ":"t","Ť":"T","ť":"t","Ũ":"U","ũ":"u","Ū":"u","ū":"u","Ů":"U","ů":"u","Ű":"U","ű":"u","Ų":"U","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","ź":"z","Ż":"Z","ż":"z","Ž":"Z","ž":"z","Ə":"E","ƒ":"f","Ơ":"O","ơ":"o","Ư":"U","ư":"u","Lj":"LJ","lj":"lj","Nj":"NJ","nj":"nj","Ș":"S","ș":"s","Ț":"T","ț":"t","ə":"e","˚":"o","Ά":"A","Έ":"E","Ή":"H","Ί":"I","Ό":"O","Ύ":"Y","Ώ":"W","ΐ":"i","Α":"A","Β":"B","Γ":"G","Δ":"D","Ε":"E","Ζ":"Z","Η":"H","Θ":"8","Ι":"I","Κ":"K","Λ":"L","Μ":"M","Ν":"N","Ξ":"3","Ο":"O","Π":"P","Ρ":"R","Σ":"S","Τ":"T","Υ":"Y","Φ":"F","Χ":"X","Ψ":"PS","Ω":"W","Ϊ":"I","Ϋ":"Y","ά":"a","έ":"e","ή":"h","ί":"i","ΰ":"y","α":"a","β":"b","γ":"g","δ":"d","ε":"e","ζ":"z","η":"h","θ":"8","ι":"i","κ":"k","λ":"l","μ":"m","ν":"n","ξ":"3","ο":"o","π":"p","ρ":"r","ς":"s","σ":"s","τ":"t","υ":"y","φ":"f","χ":"x","ψ":"ps","ω":"w","ϊ":"i","ϋ":"y","ό":"o","ύ":"y","ώ":"w","Ё":"Yo","Ђ":"DJ","Є":"Ye","І":"I","Ї":"Yi","Ј":"J","Љ":"LJ","Њ":"NJ","Ћ":"C","Џ":"DZ","А":"A","Б":"B","В":"V","Г":"G","Д":"D","Е":"E","Ж":"Zh","З":"Z","И":"I","Й":"J","К":"K","Л":"L","М":"M","Н":"N","О":"O","П":"P","Р":"R","С":"S","Т":"T","У":"U","Ф":"F","Х":"H","Ц":"C","Ч":"Ch","Ш":"Sh","Щ":"Sh","Ъ":"U","Ы":"Y","Ь":"","Э":"E","Ю":"Yu","Я":"Ya","а":"a","б":"b","в":"v","г":"g","д":"d","е":"e","ж":"zh","з":"z","и":"i","й":"j","к":"k","л":"l","м":"m","н":"n","о":"o","п":"p","р":"r","с":"s","т":"t","у":"u","ф":"f","х":"h","ц":"c","ч":"ch","ш":"sh","щ":"sh","ъ":"u","ы":"y","ь":"","э":"e","ю":"yu","я":"ya","ё":"yo","ђ":"dj","є":"ye","і":"i","ї":"yi","ј":"j","љ":"lj","њ":"nj","ћ":"c","ѝ":"u","џ":"dz","Ґ":"G","ґ":"g","Ғ":"GH","ғ":"gh","Қ":"KH","қ":"kh","Ң":"NG","ң":"ng","Ү":"UE","ү":"ue","Ұ":"U","ұ":"u","Һ":"H","һ":"h","Ә":"AE","ә":"ae","Ө":"OE","ө":"oe","Ա":"A","Բ":"B","Գ":"G","Դ":"D","Ե":"E","Զ":"Z","Է":"E\'","Ը":"Y\'","Թ":"T\'","Ժ":"JH","Ի":"I","Լ":"L","Խ":"X","Ծ":"C\'","Կ":"K","Հ":"H","Ձ":"D\'","Ղ":"GH","Ճ":"TW","Մ":"M","Յ":"Y","Ն":"N","Շ":"SH","Չ":"CH","Պ":"P","Ջ":"J","Ռ":"R\'","Ս":"S","Վ":"V","Տ":"T","Ր":"R","Ց":"C","Փ":"P\'","Ք":"Q\'","Օ":"O\'\'","Ֆ":"F","և":"EV","ء":"a","آ":"aa","أ":"a","ؤ":"u","إ":"i","ئ":"e","ا":"a","ب":"b","ة":"h","ت":"t","ث":"th","ج":"j","ح":"h","خ":"kh","د":"d","ذ":"th","ر":"r","ز":"z","س":"s","ش":"sh","ص":"s","ض":"dh","ط":"t","ظ":"z","ع":"a","غ":"gh","ف":"f","ق":"q","ك":"k","ل":"l","م":"m","ن":"n","ه":"h","و":"w","ى":"a","ي":"y","ً":"an","ٌ":"on","ٍ":"en","َ":"a","ُ":"u","ِ":"e","ْ":"","٠":"0","١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","پ":"p","چ":"ch","ژ":"zh","ک":"k","گ":"g","ی":"y","۰":"0","۱":"1","۲":"2","۳":"3","۴":"4","۵":"5","۶":"6","۷":"7","۸":"8","۹":"9","฿":"baht","ა":"a","ბ":"b","გ":"g","დ":"d","ე":"e","ვ":"v","ზ":"z","თ":"t","ი":"i","კ":"k","ლ":"l","მ":"m","ნ":"n","ო":"o","პ":"p","ჟ":"zh","რ":"r","ს":"s","ტ":"t","უ":"u","ფ":"f","ქ":"k","ღ":"gh","ყ":"q","შ":"sh","ჩ":"ch","ც":"ts","ძ":"dz","წ":"ts","ჭ":"ch","ხ":"kh","ჯ":"j","ჰ":"h","Ṣ":"S","ṣ":"s","Ẁ":"W","ẁ":"w","Ẃ":"W","ẃ":"w","Ẅ":"W","ẅ":"w","ẞ":"SS","Ạ":"A","ạ":"a","Ả":"A","ả":"a","Ấ":"A","ấ":"a","Ầ":"A","ầ":"a","Ẩ":"A","ẩ":"a","Ẫ":"A","ẫ":"a","Ậ":"A","ậ":"a","Ắ":"A","ắ":"a","Ằ":"A","ằ":"a","Ẳ":"A","ẳ":"a","Ẵ":"A","ẵ":"a","Ặ":"A","ặ":"a","Ẹ":"E","ẹ":"e","Ẻ":"E","ẻ":"e","Ẽ":"E","ẽ":"e","Ế":"E","ế":"e","Ề":"E","ề":"e","Ể":"E","ể":"e","Ễ":"E","ễ":"e","Ệ":"E","ệ":"e","Ỉ":"I","ỉ":"i","Ị":"I","ị":"i","Ọ":"O","ọ":"o","Ỏ":"O","ỏ":"o","Ố":"O","ố":"o","Ồ":"O","ồ":"o","Ổ":"O","ổ":"o","Ỗ":"O","ỗ":"o","Ộ":"O","ộ":"o","Ớ":"O","ớ":"o","Ờ":"O","ờ":"o","Ở":"O","ở":"o","Ỡ":"O","ỡ":"o","Ợ":"O","ợ":"o","Ụ":"U","ụ":"u","Ủ":"U","ủ":"u","Ứ":"U","ứ":"u","Ừ":"U","ừ":"u","Ử":"U","ử":"u","Ữ":"U","ữ":"u","Ự":"U","ự":"u","Ỳ":"Y","ỳ":"y","Ỵ":"Y","ỵ":"y","Ỷ":"Y","ỷ":"y","Ỹ":"Y","ỹ":"y","–":"-","‘":"\'","’":"\'","“":"\\"","”":"\\"","„":"\\"","†":"+","•":"*","…":"...","₠":"ecu","₢":"cruzeiro","₣":"french franc","₤":"lira","₥":"mill","₦":"naira","₧":"peseta","₨":"rupee","₩":"won","₪":"new shequel","₫":"dong","€":"euro","₭":"kip","₮":"tugrik","₯":"drachma","₰":"penny","₱":"peso","₲":"guarani","₳":"austral","₴":"hryvnia","₵":"cedi","₸":"kazakhstani tenge","₹":"indian rupee","₺":"turkish lira","₽":"russian ruble","₿":"bitcoin","℠":"sm","™":"tm","∂":"d","∆":"delta","∑":"sum","∞":"infinity","♥":"love","元":"yuan","円":"yen","﷼":"rial","ﻵ":"laa","ﻷ":"laa","ﻹ":"lai","ﻻ":"la"}');
|
228114
|
+
var locales = JSON.parse('{"bg":{"Й":"Y","Ц":"Ts","Щ":"Sht","Ъ":"A","Ь":"Y","й":"y","ц":"ts","щ":"sht","ъ":"a","ь":"y"},"de":{"Ä":"AE","ä":"ae","Ö":"OE","ö":"oe","Ü":"UE","ü":"ue","ß":"ss","%":"prozent","&":"und","|":"oder","∑":"summe","∞":"unendlich","♥":"liebe"},"es":{"%":"por ciento","&":"y","<":"menor que",">":"mayor que","|":"o","¢":"centavos","£":"libras","¤":"moneda","₣":"francos","∑":"suma","∞":"infinito","♥":"amor"},"fr":{"%":"pourcent","&":"et","<":"plus petit",">":"plus grand","|":"ou","¢":"centime","£":"livre","¤":"devise","₣":"franc","∑":"somme","∞":"infini","♥":"amour"},"pt":{"%":"porcento","&":"e","<":"menor",">":"maior","|":"ou","¢":"centavo","∑":"soma","£":"libra","∞":"infinito","♥":"amor"},"uk":{"И":"Y","и":"y","Й":"Y","й":"y","Ц":"Ts","ц":"ts","Х":"Kh","х":"kh","Щ":"Shch","щ":"shch","Г":"H","г":"h"},"vi":{"Đ":"D","đ":"d"},"da":{"Ø":"OE","ø":"oe","Å":"AA","å":"aa","%":"procent","&":"og","|":"eller","$":"dollar","<":"mindre end",">":"større end"},"nb":{"&":"og","Å":"AA","Æ":"AE","Ø":"OE","å":"aa","æ":"ae","ø":"oe"},"it":{"&":"e"},"nl":{"&":"en"},"sv":{"&":"och","Å":"AA","Ä":"AE","Ö":"OE","å":"aa","ä":"ae","ö":"oe"}}');
|
228115
|
+
function replace(string, options) {
|
228116
|
+
if (typeof string !== "string") {
|
228117
|
+
throw new Error("slugify: string argument expected");
|
228118
|
+
}
|
228119
|
+
options = typeof options === "string" ? { replacement: options } : options || {};
|
228120
|
+
var locale = locales[options.locale] || {};
|
228121
|
+
var replacement = options.replacement === undefined ? "-" : options.replacement;
|
228122
|
+
var trim = options.trim === undefined ? true : options.trim;
|
228123
|
+
var slug = string.normalize().split("").reduce(function(result, ch) {
|
228124
|
+
var appendChar = locale[ch];
|
228125
|
+
if (appendChar === undefined)
|
228126
|
+
appendChar = charMap[ch];
|
228127
|
+
if (appendChar === undefined)
|
228128
|
+
appendChar = ch;
|
228129
|
+
if (appendChar === replacement)
|
228130
|
+
appendChar = " ";
|
228131
|
+
return result + appendChar.replace(options.remove || /[^\w\s$*_+~.()'"!\-:@]+/g, "");
|
228132
|
+
}, "");
|
228133
|
+
if (options.strict) {
|
228134
|
+
slug = slug.replace(/[^A-Za-z0-9\s]/g, "");
|
228135
|
+
}
|
228136
|
+
if (trim) {
|
228137
|
+
slug = slug.trim();
|
228138
|
+
}
|
228139
|
+
slug = slug.replace(/\s+/g, replacement);
|
228140
|
+
if (options.lower) {
|
228141
|
+
slug = slug.toLowerCase();
|
228142
|
+
}
|
228143
|
+
return slug;
|
228144
|
+
}
|
228145
|
+
replace.extend = function(customMap) {
|
228146
|
+
Object.assign(charMap, customMap);
|
228147
|
+
};
|
228148
|
+
return replace;
|
228149
|
+
});
|
228150
|
+
});
|
228151
|
+
|
228101
228152
|
// ../../node_modules/node-fetch-native/dist/shared/node-fetch-native.DhEqb06g.cjs
|
228102
228153
|
var require_node_fetch_native_DhEqb06g = __commonJS((exports) => {
|
228103
228154
|
var l2 = Object.defineProperty;
|
@@ -232194,8 +232245,8 @@ var require_lib13 = __commonJS((exports, module) => {
|
|
232194
232245
|
function fetch2(input, options) {
|
232195
232246
|
return nodeFetch.fetch(input, options);
|
232196
232247
|
}
|
232197
|
-
for (const
|
232198
|
-
fetch2[
|
232248
|
+
for (const key4 in nodeFetch) {
|
232249
|
+
fetch2[key4] = nodeFetch[key4];
|
232199
232250
|
}
|
232200
232251
|
module.exports = fetch2;
|
232201
232252
|
});
|
@@ -232288,11 +232339,11 @@ var require_proxy = __commonJS((exports) => {
|
|
232288
232339
|
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;
|
232289
232340
|
}
|
232290
232341
|
e10(requireSymbols$4, "requireSymbols$4");
|
232291
|
-
var
|
232342
|
+
var errors4;
|
232292
232343
|
var hasRequiredErrors;
|
232293
232344
|
function requireErrors() {
|
232294
232345
|
if (hasRequiredErrors)
|
232295
|
-
return
|
232346
|
+
return errors4;
|
232296
232347
|
hasRequiredErrors = 1;
|
232297
232348
|
|
232298
232349
|
class A5 extends Error {
|
@@ -232501,7 +232552,7 @@ var require_proxy = __commonJS((exports) => {
|
|
232501
232552
|
super(i6, { cause: k5, ...F3 ?? {} }), this.name = "SecureProxyConnectionError", this.message = i6 || "Secure Proxy Connection failed", this.code = "UND_ERR_PRX_TLS", this.cause = k5;
|
232502
232553
|
}
|
232503
232554
|
}
|
232504
|
-
return
|
232555
|
+
return errors4 = { AbortError: Q4, HTTPParserError: Y4, UndiciError: A5, HeadersTimeoutError: c3, HeadersOverflowError: E6, BodyTimeoutError: t8, RequestContentLengthMismatchError: r6, ConnectTimeoutError: p6, ResponseStatusCodeError: B4, InvalidArgumentError: f5, InvalidReturnValueError: l2, RequestAbortedError: u6, ClientDestroyedError: a7, ClientClosedError: g5, InformationalError: n6, SocketError: d6, NotSupportedError: N6, ResponseContentLengthMismatchError: o8, BalancedPoolMissingUpstreamError: M5, ResponseExceededMaxSizeError: J4, RequestRetryError: V5, ResponseError: H4, SecureProxyConnectionError: h7 }, errors4;
|
232505
232556
|
}
|
232506
232557
|
e10(requireErrors, "requireErrors");
|
232507
232558
|
var constants$4;
|
@@ -241790,11 +241841,11 @@ ${g5}`;
|
|
241790
241841
|
return e10(u6, "plural"), ms;
|
241791
241842
|
}
|
241792
241843
|
e10(requireMs, "requireMs");
|
241793
|
-
var
|
241844
|
+
var common3;
|
241794
241845
|
var hasRequiredCommon;
|
241795
241846
|
function requireCommon() {
|
241796
241847
|
if (hasRequiredCommon)
|
241797
|
-
return
|
241848
|
+
return common3;
|
241798
241849
|
hasRequiredCommon = 1;
|
241799
241850
|
function A5(p6) {
|
241800
241851
|
E6.debug = E6, E6.default = E6, E6.coerce = u6, E6.disable = l2, E6.enable = B4, E6.enabled = Q4, E6.humanize = requireMs(), E6.destroy = n6, Object.keys(p6).forEach((r6) => {
|
@@ -241882,7 +241933,7 @@ ${g5}`;
|
|
241882
241933
|
}
|
241883
241934
|
return e10(n6, "destroy"), E6.enable(E6.load()), E6;
|
241884
241935
|
}
|
241885
|
-
return e10(A5, "setup"),
|
241936
|
+
return e10(A5, "setup"), common3 = A5, common3;
|
241886
241937
|
}
|
241887
241938
|
e10(requireCommon, "requireCommon");
|
241888
241939
|
var hasRequiredBrowser;
|
@@ -242474,11 +242525,11 @@ var require_visit = __commonJS((exports) => {
|
|
242474
242525
|
visit2.BREAK = BREAK;
|
242475
242526
|
visit2.SKIP = SKIP;
|
242476
242527
|
visit2.REMOVE = REMOVE;
|
242477
|
-
function visit_(
|
242478
|
-
const ctrl = callVisitor(
|
242528
|
+
function visit_(key4, node, visitor, path5) {
|
242529
|
+
const ctrl = callVisitor(key4, node, visitor, path5);
|
242479
242530
|
if (identity2.isNode(ctrl) || identity2.isPair(ctrl)) {
|
242480
|
-
replaceNode(
|
242481
|
-
return visit_(
|
242531
|
+
replaceNode(key4, path5, ctrl);
|
242532
|
+
return visit_(key4, ctrl, visitor, path5);
|
242482
242533
|
}
|
242483
242534
|
if (typeof ctrl !== "symbol") {
|
242484
242535
|
if (identity2.isCollection(node)) {
|
@@ -242522,11 +242573,11 @@ var require_visit = __commonJS((exports) => {
|
|
242522
242573
|
visitAsync.BREAK = BREAK;
|
242523
242574
|
visitAsync.SKIP = SKIP;
|
242524
242575
|
visitAsync.REMOVE = REMOVE;
|
242525
|
-
async function visitAsync_(
|
242526
|
-
const ctrl = await callVisitor(
|
242576
|
+
async function visitAsync_(key4, node, visitor, path5) {
|
242577
|
+
const ctrl = await callVisitor(key4, node, visitor, path5);
|
242527
242578
|
if (identity2.isNode(ctrl) || identity2.isPair(ctrl)) {
|
242528
|
-
replaceNode(
|
242529
|
-
return visitAsync_(
|
242579
|
+
replaceNode(key4, path5, ctrl);
|
242580
|
+
return visitAsync_(key4, ctrl, visitor, path5);
|
242530
242581
|
}
|
242531
242582
|
if (typeof ctrl !== "symbol") {
|
242532
242583
|
if (identity2.isCollection(node)) {
|
@@ -242576,27 +242627,27 @@ var require_visit = __commonJS((exports) => {
|
|
242576
242627
|
}
|
242577
242628
|
return visitor;
|
242578
242629
|
}
|
242579
|
-
function callVisitor(
|
242630
|
+
function callVisitor(key4, node, visitor, path5) {
|
242580
242631
|
if (typeof visitor === "function")
|
242581
|
-
return visitor(
|
242632
|
+
return visitor(key4, node, path5);
|
242582
242633
|
if (identity2.isMap(node))
|
242583
|
-
return visitor.Map?.(
|
242634
|
+
return visitor.Map?.(key4, node, path5);
|
242584
242635
|
if (identity2.isSeq(node))
|
242585
|
-
return visitor.Seq?.(
|
242636
|
+
return visitor.Seq?.(key4, node, path5);
|
242586
242637
|
if (identity2.isPair(node))
|
242587
|
-
return visitor.Pair?.(
|
242638
|
+
return visitor.Pair?.(key4, node, path5);
|
242588
242639
|
if (identity2.isScalar(node))
|
242589
|
-
return visitor.Scalar?.(
|
242640
|
+
return visitor.Scalar?.(key4, node, path5);
|
242590
242641
|
if (identity2.isAlias(node))
|
242591
|
-
return visitor.Alias?.(
|
242642
|
+
return visitor.Alias?.(key4, node, path5);
|
242592
242643
|
return;
|
242593
242644
|
}
|
242594
|
-
function replaceNode(
|
242645
|
+
function replaceNode(key4, path5, node) {
|
242595
242646
|
const parent = path5[path5.length - 1];
|
242596
242647
|
if (identity2.isCollection(parent)) {
|
242597
|
-
parent.items[
|
242648
|
+
parent.items[key4] = node;
|
242598
242649
|
} else if (identity2.isPair(parent)) {
|
242599
|
-
if (
|
242650
|
+
if (key4 === "key")
|
242600
242651
|
parent.key = node;
|
242601
242652
|
else
|
242602
242653
|
parent.value = node;
|
@@ -242828,7 +242879,7 @@ var require_anchors = __commonJS((exports) => {
|
|
242828
242879
|
|
242829
242880
|
// ../../node_modules/yaml/dist/doc/applyReviver.js
|
242830
242881
|
var require_applyReviver = __commonJS((exports) => {
|
242831
|
-
function applyReviver(reviver, obj,
|
242882
|
+
function applyReviver(reviver, obj, key4, val) {
|
242832
242883
|
if (val && typeof val === "object") {
|
242833
242884
|
if (Array.isArray(val)) {
|
242834
242885
|
for (let i7 = 0, len = val.length;i7 < len; ++i7) {
|
@@ -242868,7 +242919,7 @@ var require_applyReviver = __commonJS((exports) => {
|
|
242868
242919
|
}
|
242869
242920
|
}
|
242870
242921
|
}
|
242871
|
-
return reviver.call(obj,
|
242922
|
+
return reviver.call(obj, key4, val);
|
242872
242923
|
}
|
242873
242924
|
exports.applyReviver = applyReviver;
|
242874
242925
|
});
|
@@ -243186,29 +243237,29 @@ var require_Collection = __commonJS((exports) => {
|
|
243186
243237
|
if (isEmptyPath(path5))
|
243187
243238
|
this.add(value4);
|
243188
243239
|
else {
|
243189
|
-
const [
|
243190
|
-
const node = this.get(
|
243240
|
+
const [key4, ...rest] = path5;
|
243241
|
+
const node = this.get(key4, true);
|
243191
243242
|
if (identity2.isCollection(node))
|
243192
243243
|
node.addIn(rest, value4);
|
243193
243244
|
else if (node === undefined && this.schema)
|
243194
|
-
this.set(
|
243245
|
+
this.set(key4, collectionFromPath(this.schema, rest, value4));
|
243195
243246
|
else
|
243196
|
-
throw new Error(`Expected YAML collection at ${
|
243247
|
+
throw new Error(`Expected YAML collection at ${key4}. Remaining path: ${rest}`);
|
243197
243248
|
}
|
243198
243249
|
}
|
243199
243250
|
deleteIn(path5) {
|
243200
|
-
const [
|
243251
|
+
const [key4, ...rest] = path5;
|
243201
243252
|
if (rest.length === 0)
|
243202
|
-
return this.delete(
|
243203
|
-
const node = this.get(
|
243253
|
+
return this.delete(key4);
|
243254
|
+
const node = this.get(key4, true);
|
243204
243255
|
if (identity2.isCollection(node))
|
243205
243256
|
return node.deleteIn(rest);
|
243206
243257
|
else
|
243207
|
-
throw new Error(`Expected YAML collection at ${
|
243258
|
+
throw new Error(`Expected YAML collection at ${key4}. Remaining path: ${rest}`);
|
243208
243259
|
}
|
243209
243260
|
getIn(path5, keepScalar) {
|
243210
|
-
const [
|
243211
|
-
const node = this.get(
|
243261
|
+
const [key4, ...rest] = path5;
|
243262
|
+
const node = this.get(key4, true);
|
243212
243263
|
if (rest.length === 0)
|
243213
243264
|
return !keepScalar && identity2.isScalar(node) ? node.value : node;
|
243214
243265
|
else
|
@@ -243223,24 +243274,24 @@ var require_Collection = __commonJS((exports) => {
|
|
243223
243274
|
});
|
243224
243275
|
}
|
243225
243276
|
hasIn(path5) {
|
243226
|
-
const [
|
243277
|
+
const [key4, ...rest] = path5;
|
243227
243278
|
if (rest.length === 0)
|
243228
|
-
return this.has(
|
243229
|
-
const node = this.get(
|
243279
|
+
return this.has(key4);
|
243280
|
+
const node = this.get(key4, true);
|
243230
243281
|
return identity2.isCollection(node) ? node.hasIn(rest) : false;
|
243231
243282
|
}
|
243232
243283
|
setIn(path5, value4) {
|
243233
|
-
const [
|
243284
|
+
const [key4, ...rest] = path5;
|
243234
243285
|
if (rest.length === 0) {
|
243235
|
-
this.set(
|
243286
|
+
this.set(key4, value4);
|
243236
243287
|
} else {
|
243237
|
-
const node = this.get(
|
243288
|
+
const node = this.get(key4, true);
|
243238
243289
|
if (identity2.isCollection(node))
|
243239
243290
|
node.setIn(rest, value4);
|
243240
243291
|
else if (node === undefined && this.schema)
|
243241
|
-
this.set(
|
243292
|
+
this.set(key4, collectionFromPath(this.schema, rest, value4));
|
243242
243293
|
else
|
243243
|
-
throw new Error(`Expected YAML collection at ${
|
243294
|
+
throw new Error(`Expected YAML collection at ${key4}. Remaining path: ${rest}`);
|
243244
243295
|
}
|
243245
243296
|
}
|
243246
243297
|
}
|
@@ -243828,19 +243879,19 @@ var require_stringifyPair = __commonJS((exports) => {
|
|
243828
243879
|
var Scalar = require_Scalar();
|
243829
243880
|
var stringify3 = require_stringify();
|
243830
243881
|
var stringifyComment = require_stringifyComment();
|
243831
|
-
function stringifyPair2({ key:
|
243882
|
+
function stringifyPair2({ key: key4, value: value4 }, ctx, onComment, onChompKeep) {
|
243832
243883
|
const { allNullValues, doc, indent: indent2, indentStep, options: { commentString, indentSeq, simpleKeys } } = ctx;
|
243833
|
-
let keyComment = identity2.isNode(
|
243884
|
+
let keyComment = identity2.isNode(key4) && key4.comment || null;
|
243834
243885
|
if (simpleKeys) {
|
243835
243886
|
if (keyComment) {
|
243836
243887
|
throw new Error("With simple keys, key nodes cannot have comments");
|
243837
243888
|
}
|
243838
|
-
if (identity2.isCollection(
|
243889
|
+
if (identity2.isCollection(key4) || !identity2.isNode(key4) && typeof key4 === "object") {
|
243839
243890
|
const msg = "With simple keys, collection cannot be used as a key value";
|
243840
243891
|
throw new Error(msg);
|
243841
243892
|
}
|
243842
243893
|
}
|
243843
|
-
let explicitKey = !simpleKeys && (!
|
243894
|
+
let explicitKey = !simpleKeys && (!key4 || keyComment && value4 == null && !ctx.inFlow || identity2.isCollection(key4) || (identity2.isScalar(key4) ? key4.type === Scalar.Scalar.BLOCK_FOLDED || key4.type === Scalar.Scalar.BLOCK_LITERAL : typeof key4 === "object"));
|
243844
243895
|
ctx = Object.assign({}, ctx, {
|
243845
243896
|
allNullValues: false,
|
243846
243897
|
implicitKey: !explicitKey && (simpleKeys || !allNullValues),
|
@@ -243848,7 +243899,7 @@ var require_stringifyPair = __commonJS((exports) => {
|
|
243848
243899
|
});
|
243849
243900
|
let keyCommentDone = false;
|
243850
243901
|
let chompKeep = false;
|
243851
|
-
let str = stringify3.stringify(
|
243902
|
+
let str = stringify3.stringify(key4, ctx, () => keyCommentDone = true, () => chompKeep = true);
|
243852
243903
|
if (!explicitKey && !ctx.inFlow && str.length > 1024) {
|
243853
243904
|
if (simpleKeys)
|
243854
243905
|
throw new Error("With simple keys, single line scalar must not span more than 1024 characters");
|
@@ -243992,7 +244043,7 @@ var require_merge = __commonJS((exports) => {
|
|
243992
244043
|
}),
|
243993
244044
|
stringify: () => MERGE_KEY
|
243994
244045
|
};
|
243995
|
-
var isMergeKey = (ctx,
|
244046
|
+
var isMergeKey = (ctx, key4) => (merge3.identify(key4) || identity2.isScalar(key4) && (!key4.type || key4.type === Scalar.Scalar.PLAIN) && merge3.identify(key4.value)) && ctx?.doc.schema.tags.some((tag) => tag.tag === merge3.tag && tag.default);
|
243996
244047
|
function addMergeToJSMap(ctx, map3, value4) {
|
243997
244048
|
value4 = ctx && identity2.isAlias(value4) ? value4.resolve(ctx.doc) : value4;
|
243998
244049
|
if (identity2.isSeq(value4))
|
@@ -244009,14 +244060,14 @@ var require_merge = __commonJS((exports) => {
|
|
244009
244060
|
if (!identity2.isMap(source))
|
244010
244061
|
throw new Error("Merge sources must be maps or map aliases");
|
244011
244062
|
const srcMap = source.toJSON(null, ctx, Map);
|
244012
|
-
for (const [
|
244063
|
+
for (const [key4, value5] of srcMap) {
|
244013
244064
|
if (map3 instanceof Map) {
|
244014
|
-
if (!map3.has(
|
244015
|
-
map3.set(
|
244065
|
+
if (!map3.has(key4))
|
244066
|
+
map3.set(key4, value5);
|
244016
244067
|
} else if (map3 instanceof Set) {
|
244017
|
-
map3.add(
|
244018
|
-
} else if (!Object.prototype.hasOwnProperty.call(map3,
|
244019
|
-
Object.defineProperty(map3,
|
244068
|
+
map3.add(key4);
|
244069
|
+
} else if (!Object.prototype.hasOwnProperty.call(map3, key4)) {
|
244070
|
+
Object.defineProperty(map3, key4, {
|
244020
244071
|
value: value5,
|
244021
244072
|
writable: true,
|
244022
244073
|
enumerable: true,
|
@@ -244038,19 +244089,19 @@ var require_addPairToJSMap = __commonJS((exports) => {
|
|
244038
244089
|
var stringify3 = require_stringify();
|
244039
244090
|
var identity2 = require_identity();
|
244040
244091
|
var toJS = require_toJS();
|
244041
|
-
function addPairToJSMap(ctx, map3, { key:
|
244042
|
-
if (identity2.isNode(
|
244043
|
-
|
244044
|
-
else if (merge3.isMergeKey(ctx,
|
244092
|
+
function addPairToJSMap(ctx, map3, { key: key4, value: value4 }) {
|
244093
|
+
if (identity2.isNode(key4) && key4.addToJSMap)
|
244094
|
+
key4.addToJSMap(ctx, map3, value4);
|
244095
|
+
else if (merge3.isMergeKey(ctx, key4))
|
244045
244096
|
merge3.addMergeToJSMap(ctx, map3, value4);
|
244046
244097
|
else {
|
244047
|
-
const jsKey = toJS.toJS(
|
244098
|
+
const jsKey = toJS.toJS(key4, "", ctx);
|
244048
244099
|
if (map3 instanceof Map) {
|
244049
244100
|
map3.set(jsKey, toJS.toJS(value4, jsKey, ctx));
|
244050
244101
|
} else if (map3 instanceof Set) {
|
244051
244102
|
map3.add(jsKey);
|
244052
244103
|
} else {
|
244053
|
-
const stringKey = stringifyKey(
|
244104
|
+
const stringKey = stringifyKey(key4, jsKey, ctx);
|
244054
244105
|
const jsValue = toJS.toJS(value4, stringKey, ctx);
|
244055
244106
|
if (stringKey in map3)
|
244056
244107
|
Object.defineProperty(map3, stringKey, {
|
@@ -244065,19 +244116,19 @@ var require_addPairToJSMap = __commonJS((exports) => {
|
|
244065
244116
|
}
|
244066
244117
|
return map3;
|
244067
244118
|
}
|
244068
|
-
function stringifyKey(
|
244119
|
+
function stringifyKey(key4, jsKey, ctx) {
|
244069
244120
|
if (jsKey === null)
|
244070
244121
|
return "";
|
244071
244122
|
if (typeof jsKey !== "object")
|
244072
244123
|
return String(jsKey);
|
244073
|
-
if (identity2.isNode(
|
244124
|
+
if (identity2.isNode(key4) && ctx?.doc) {
|
244074
244125
|
const strCtx = stringify3.createStringifyContext(ctx.doc, {});
|
244075
244126
|
strCtx.anchors = new Set;
|
244076
244127
|
for (const node of ctx.anchors.keys())
|
244077
244128
|
strCtx.anchors.add(node.anchor);
|
244078
244129
|
strCtx.inFlow = true;
|
244079
244130
|
strCtx.inStringifyKey = true;
|
244080
|
-
const strKey =
|
244131
|
+
const strKey = key4.toString(strCtx);
|
244081
244132
|
if (!ctx.mapKeyWarned) {
|
244082
244133
|
let jsonStr = JSON.stringify(strKey);
|
244083
244134
|
if (jsonStr.length > 40)
|
@@ -244098,25 +244149,25 @@ var require_Pair = __commonJS((exports) => {
|
|
244098
244149
|
var stringifyPair2 = require_stringifyPair();
|
244099
244150
|
var addPairToJSMap = require_addPairToJSMap();
|
244100
244151
|
var identity2 = require_identity();
|
244101
|
-
function createPair(
|
244102
|
-
const k6 = createNode.createNode(
|
244152
|
+
function createPair(key4, value4, ctx) {
|
244153
|
+
const k6 = createNode.createNode(key4, undefined, ctx);
|
244103
244154
|
const v7 = createNode.createNode(value4, undefined, ctx);
|
244104
244155
|
return new Pair(k6, v7);
|
244105
244156
|
}
|
244106
244157
|
|
244107
244158
|
class Pair {
|
244108
|
-
constructor(
|
244159
|
+
constructor(key4, value4 = null) {
|
244109
244160
|
Object.defineProperty(this, identity2.NODE_TYPE, { value: identity2.PAIR });
|
244110
|
-
this.key =
|
244161
|
+
this.key = key4;
|
244111
244162
|
this.value = value4;
|
244112
244163
|
}
|
244113
244164
|
clone(schema) {
|
244114
|
-
let { key:
|
244115
|
-
if (identity2.isNode(
|
244116
|
-
|
244165
|
+
let { key: key4, value: value4 } = this;
|
244166
|
+
if (identity2.isNode(key4))
|
244167
|
+
key4 = key4.clone(schema);
|
244117
244168
|
if (identity2.isNode(value4))
|
244118
244169
|
value4 = value4.clone(schema);
|
244119
|
-
return new Pair(
|
244170
|
+
return new Pair(key4, value4);
|
244120
244171
|
}
|
244121
244172
|
toJSON(_6, ctx) {
|
244122
244173
|
const pair = ctx?.mapAsMap ? new Map : {};
|
@@ -244283,11 +244334,11 @@ var require_YAMLMap = __commonJS((exports) => {
|
|
244283
244334
|
var identity2 = require_identity();
|
244284
244335
|
var Pair = require_Pair();
|
244285
244336
|
var Scalar = require_Scalar();
|
244286
|
-
function findPair(items,
|
244287
|
-
const k6 = identity2.isScalar(
|
244337
|
+
function findPair(items, key4) {
|
244338
|
+
const k6 = identity2.isScalar(key4) ? key4.value : key4;
|
244288
244339
|
for (const it2 of items) {
|
244289
244340
|
if (identity2.isPair(it2)) {
|
244290
|
-
if (it2.key ===
|
244341
|
+
if (it2.key === key4 || it2.key === k6)
|
244291
244342
|
return it2;
|
244292
244343
|
if (identity2.isScalar(it2.key) && it2.key.value === k6)
|
244293
244344
|
return it2;
|
@@ -244307,20 +244358,20 @@ var require_YAMLMap = __commonJS((exports) => {
|
|
244307
244358
|
static from(schema, obj, ctx) {
|
244308
244359
|
const { keepUndefined, replacer } = ctx;
|
244309
244360
|
const map3 = new this(schema);
|
244310
|
-
const add = (
|
244361
|
+
const add = (key4, value4) => {
|
244311
244362
|
if (typeof replacer === "function")
|
244312
|
-
value4 = replacer.call(obj,
|
244313
|
-
else if (Array.isArray(replacer) && !replacer.includes(
|
244363
|
+
value4 = replacer.call(obj, key4, value4);
|
244364
|
+
else if (Array.isArray(replacer) && !replacer.includes(key4))
|
244314
244365
|
return;
|
244315
244366
|
if (value4 !== undefined || keepUndefined)
|
244316
|
-
map3.items.push(Pair.createPair(
|
244367
|
+
map3.items.push(Pair.createPair(key4, value4, ctx));
|
244317
244368
|
};
|
244318
244369
|
if (obj instanceof Map) {
|
244319
|
-
for (const [
|
244320
|
-
add(
|
244370
|
+
for (const [key4, value4] of obj)
|
244371
|
+
add(key4, value4);
|
244321
244372
|
} else if (obj && typeof obj === "object") {
|
244322
|
-
for (const
|
244323
|
-
add(
|
244373
|
+
for (const key4 of Object.keys(obj))
|
244374
|
+
add(key4, obj[key4]);
|
244324
244375
|
}
|
244325
244376
|
if (typeof schema.sortMapEntries === "function") {
|
244326
244377
|
map3.items.sort(schema.sortMapEntries);
|
@@ -244354,23 +244405,23 @@ var require_YAMLMap = __commonJS((exports) => {
|
|
244354
244405
|
this.items.push(_pair);
|
244355
244406
|
}
|
244356
244407
|
}
|
244357
|
-
delete(
|
244358
|
-
const it2 = findPair(this.items,
|
244408
|
+
delete(key4) {
|
244409
|
+
const it2 = findPair(this.items, key4);
|
244359
244410
|
if (!it2)
|
244360
244411
|
return false;
|
244361
244412
|
const del = this.items.splice(this.items.indexOf(it2), 1);
|
244362
244413
|
return del.length > 0;
|
244363
244414
|
}
|
244364
|
-
get(
|
244365
|
-
const it2 = findPair(this.items,
|
244415
|
+
get(key4, keepScalar) {
|
244416
|
+
const it2 = findPair(this.items, key4);
|
244366
244417
|
const node = it2?.value;
|
244367
244418
|
return (!keepScalar && identity2.isScalar(node) ? node.value : node) ?? undefined;
|
244368
244419
|
}
|
244369
|
-
has(
|
244370
|
-
return !!findPair(this.items,
|
244420
|
+
has(key4) {
|
244421
|
+
return !!findPair(this.items, key4);
|
244371
244422
|
}
|
244372
|
-
set(
|
244373
|
-
this.add(new Pair.Pair(
|
244423
|
+
set(key4, value4) {
|
244424
|
+
this.add(new Pair.Pair(key4, value4), true);
|
244374
244425
|
}
|
244375
244426
|
toJSON(_6, ctx, Type) {
|
244376
244427
|
const map3 = Type ? new Type : ctx?.mapAsMap ? new Map : {};
|
@@ -244441,28 +244492,28 @@ var require_YAMLSeq = __commonJS((exports) => {
|
|
244441
244492
|
add(value4) {
|
244442
244493
|
this.items.push(value4);
|
244443
244494
|
}
|
244444
|
-
delete(
|
244445
|
-
const idx = asItemIndex(
|
244495
|
+
delete(key4) {
|
244496
|
+
const idx = asItemIndex(key4);
|
244446
244497
|
if (typeof idx !== "number")
|
244447
244498
|
return false;
|
244448
244499
|
const del = this.items.splice(idx, 1);
|
244449
244500
|
return del.length > 0;
|
244450
244501
|
}
|
244451
|
-
get(
|
244452
|
-
const idx = asItemIndex(
|
244502
|
+
get(key4, keepScalar) {
|
244503
|
+
const idx = asItemIndex(key4);
|
244453
244504
|
if (typeof idx !== "number")
|
244454
244505
|
return;
|
244455
244506
|
const it2 = this.items[idx];
|
244456
244507
|
return !keepScalar && identity2.isScalar(it2) ? it2.value : it2;
|
244457
244508
|
}
|
244458
|
-
has(
|
244459
|
-
const idx = asItemIndex(
|
244509
|
+
has(key4) {
|
244510
|
+
const idx = asItemIndex(key4);
|
244460
244511
|
return typeof idx === "number" && idx < this.items.length;
|
244461
244512
|
}
|
244462
|
-
set(
|
244463
|
-
const idx = asItemIndex(
|
244513
|
+
set(key4, value4) {
|
244514
|
+
const idx = asItemIndex(key4);
|
244464
244515
|
if (typeof idx !== "number")
|
244465
|
-
throw new Error(`Expected a valid index, not ${
|
244516
|
+
throw new Error(`Expected a valid index, not ${key4}.`);
|
244466
244517
|
const prev = this.items[idx];
|
244467
244518
|
if (identity2.isScalar(prev) && Scalar.isScalarValue(value4))
|
244468
244519
|
prev.value = value4;
|
@@ -244496,8 +244547,8 @@ var require_YAMLSeq = __commonJS((exports) => {
|
|
244496
244547
|
let i7 = 0;
|
244497
244548
|
for (let it2 of obj) {
|
244498
244549
|
if (typeof replacer === "function") {
|
244499
|
-
const
|
244500
|
-
it2 = replacer.call(obj,
|
244550
|
+
const key4 = obj instanceof Set ? it2 : String(i7++);
|
244551
|
+
it2 = replacer.call(obj, key4, it2);
|
244501
244552
|
}
|
244502
244553
|
seq.items.push(createNode.createNode(it2, undefined, ctx));
|
244503
244554
|
}
|
@@ -244505,8 +244556,8 @@ var require_YAMLSeq = __commonJS((exports) => {
|
|
244505
244556
|
return seq;
|
244506
244557
|
}
|
244507
244558
|
}
|
244508
|
-
function asItemIndex(
|
244509
|
-
let idx = identity2.isScalar(
|
244559
|
+
function asItemIndex(key4) {
|
244560
|
+
let idx = identity2.isScalar(key4) ? key4.value : key4;
|
244510
244561
|
if (idx && typeof idx === "string")
|
244511
244562
|
idx = Number(idx);
|
244512
244563
|
return typeof idx === "number" && Number.isInteger(idx) && idx >= 0 ? idx : null;
|
@@ -244878,25 +244929,25 @@ ${cn.comment}` : item.comment;
|
|
244878
244929
|
for (let it2 of iterable) {
|
244879
244930
|
if (typeof replacer === "function")
|
244880
244931
|
it2 = replacer.call(iterable, String(i7++), it2);
|
244881
|
-
let
|
244932
|
+
let key4, value4;
|
244882
244933
|
if (Array.isArray(it2)) {
|
244883
244934
|
if (it2.length === 2) {
|
244884
|
-
|
244935
|
+
key4 = it2[0];
|
244885
244936
|
value4 = it2[1];
|
244886
244937
|
} else
|
244887
244938
|
throw new TypeError(`Expected [key, value] tuple: ${it2}`);
|
244888
244939
|
} else if (it2 && it2 instanceof Object) {
|
244889
244940
|
const keys = Object.keys(it2);
|
244890
244941
|
if (keys.length === 1) {
|
244891
|
-
|
244892
|
-
value4 = it2[
|
244942
|
+
key4 = keys[0];
|
244943
|
+
value4 = it2[key4];
|
244893
244944
|
} else {
|
244894
244945
|
throw new TypeError(`Expected tuple with one key, not ${keys.length} keys`);
|
244895
244946
|
}
|
244896
244947
|
} else {
|
244897
|
-
|
244948
|
+
key4 = it2;
|
244898
244949
|
}
|
244899
|
-
pairs2.items.push(Pair.createPair(
|
244950
|
+
pairs2.items.push(Pair.createPair(key4, value4, ctx));
|
244900
244951
|
}
|
244901
244952
|
return pairs2;
|
244902
244953
|
}
|
@@ -244937,16 +244988,16 @@ var require_omap = __commonJS((exports) => {
|
|
244937
244988
|
if (ctx?.onCreate)
|
244938
244989
|
ctx.onCreate(map3);
|
244939
244990
|
for (const pair of this.items) {
|
244940
|
-
let
|
244991
|
+
let key4, value4;
|
244941
244992
|
if (identity2.isPair(pair)) {
|
244942
|
-
|
244943
|
-
value4 = toJS.toJS(pair.value,
|
244993
|
+
key4 = toJS.toJS(pair.key, "", ctx);
|
244994
|
+
value4 = toJS.toJS(pair.value, key4, ctx);
|
244944
244995
|
} else {
|
244945
|
-
|
244996
|
+
key4 = toJS.toJS(pair, "", ctx);
|
244946
244997
|
}
|
244947
|
-
if (map3.has(
|
244998
|
+
if (map3.has(key4))
|
244948
244999
|
throw new Error("Ordered maps must not include duplicate keys");
|
244949
|
-
map3.set(
|
245000
|
+
map3.set(key4, value4);
|
244950
245001
|
}
|
244951
245002
|
return map3;
|
244952
245003
|
}
|
@@ -244967,12 +245018,12 @@ var require_omap = __commonJS((exports) => {
|
|
244967
245018
|
resolve(seq, onError) {
|
244968
245019
|
const pairs$1 = pairs.resolvePairs(seq, onError);
|
244969
245020
|
const seenKeys = [];
|
244970
|
-
for (const { key:
|
244971
|
-
if (identity2.isScalar(
|
244972
|
-
if (seenKeys.includes(
|
244973
|
-
onError(`Ordered maps must not include duplicate keys: ${
|
245021
|
+
for (const { key: key4 } of pairs$1.items) {
|
245022
|
+
if (identity2.isScalar(key4)) {
|
245023
|
+
if (seenKeys.includes(key4.value)) {
|
245024
|
+
onError(`Ordered maps must not include duplicate keys: ${key4.value}`);
|
244974
245025
|
} else {
|
244975
|
-
seenKeys.push(
|
245026
|
+
seenKeys.push(key4.value);
|
244976
245027
|
}
|
244977
245028
|
}
|
244978
245029
|
}
|
@@ -245146,30 +245197,30 @@ var require_set = __commonJS((exports) => {
|
|
245146
245197
|
super(schema);
|
245147
245198
|
this.tag = YAMLSet.tag;
|
245148
245199
|
}
|
245149
|
-
add(
|
245200
|
+
add(key4) {
|
245150
245201
|
let pair;
|
245151
|
-
if (identity2.isPair(
|
245152
|
-
pair =
|
245153
|
-
else if (
|
245154
|
-
pair = new Pair.Pair(
|
245202
|
+
if (identity2.isPair(key4))
|
245203
|
+
pair = key4;
|
245204
|
+
else if (key4 && typeof key4 === "object" && "key" in key4 && "value" in key4 && key4.value === null)
|
245205
|
+
pair = new Pair.Pair(key4.key, null);
|
245155
245206
|
else
|
245156
|
-
pair = new Pair.Pair(
|
245207
|
+
pair = new Pair.Pair(key4, null);
|
245157
245208
|
const prev = YAMLMap.findPair(this.items, pair.key);
|
245158
245209
|
if (!prev)
|
245159
245210
|
this.items.push(pair);
|
245160
245211
|
}
|
245161
|
-
get(
|
245162
|
-
const pair = YAMLMap.findPair(this.items,
|
245212
|
+
get(key4, keepPair) {
|
245213
|
+
const pair = YAMLMap.findPair(this.items, key4);
|
245163
245214
|
return !keepPair && identity2.isPair(pair) ? identity2.isScalar(pair.key) ? pair.key.value : pair.key : pair;
|
245164
245215
|
}
|
245165
|
-
set(
|
245216
|
+
set(key4, value4) {
|
245166
245217
|
if (typeof value4 !== "boolean")
|
245167
245218
|
throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof value4}`);
|
245168
|
-
const prev = YAMLMap.findPair(this.items,
|
245219
|
+
const prev = YAMLMap.findPair(this.items, key4);
|
245169
245220
|
if (prev && !value4) {
|
245170
245221
|
this.items.splice(this.items.indexOf(prev), 1);
|
245171
245222
|
} else if (!prev && value4) {
|
245172
|
-
this.items.push(new Pair.Pair(
|
245223
|
+
this.items.push(new Pair.Pair(key4));
|
245173
245224
|
}
|
245174
245225
|
}
|
245175
245226
|
toJSON(_6, ctx) {
|
@@ -245404,7 +245455,7 @@ var require_tags = __commonJS((exports) => {
|
|
245404
245455
|
if (Array.isArray(customTags))
|
245405
245456
|
tags = [];
|
245406
245457
|
else {
|
245407
|
-
const keys = Array.from(schemas.keys()).filter((
|
245458
|
+
const keys = Array.from(schemas.keys()).filter((key4) => key4 !== "yaml11").map((key4) => JSON.stringify(key4)).join(", ");
|
245408
245459
|
throw new Error(`Unknown schema "${schemaName}"; use one of ${keys} or define customTags array`);
|
245409
245460
|
}
|
245410
245461
|
}
|
@@ -245420,7 +245471,7 @@ var require_tags = __commonJS((exports) => {
|
|
245420
245471
|
const tagObj = typeof tag === "string" ? tagsByName[tag] : tag;
|
245421
245472
|
if (!tagObj) {
|
245422
245473
|
const tagName = JSON.stringify(tag);
|
245423
|
-
const keys = Object.keys(tagsByName).map((
|
245474
|
+
const keys = Object.keys(tagsByName).map((key4) => JSON.stringify(key4)).join(", ");
|
245424
245475
|
throw new Error(`Unknown custom tag ${tagName}; use one of ${keys}`);
|
245425
245476
|
}
|
245426
245477
|
if (!tags2.includes(tagObj))
|
@@ -245655,13 +245706,13 @@ var require_Document = __commonJS((exports) => {
|
|
245655
245706
|
setAnchors();
|
245656
245707
|
return node;
|
245657
245708
|
}
|
245658
|
-
createPair(
|
245659
|
-
const k6 = this.createNode(
|
245709
|
+
createPair(key4, value4, options = {}) {
|
245710
|
+
const k6 = this.createNode(key4, null, options);
|
245660
245711
|
const v7 = this.createNode(value4, null, options);
|
245661
245712
|
return new Pair.Pair(k6, v7);
|
245662
245713
|
}
|
245663
|
-
delete(
|
245664
|
-
return assertCollection(this.contents) ? this.contents.delete(
|
245714
|
+
delete(key4) {
|
245715
|
+
return assertCollection(this.contents) ? this.contents.delete(key4) : false;
|
245665
245716
|
}
|
245666
245717
|
deleteIn(path5) {
|
245667
245718
|
if (Collection.isEmptyPath(path5)) {
|
@@ -245672,27 +245723,27 @@ var require_Document = __commonJS((exports) => {
|
|
245672
245723
|
}
|
245673
245724
|
return assertCollection(this.contents) ? this.contents.deleteIn(path5) : false;
|
245674
245725
|
}
|
245675
|
-
get(
|
245676
|
-
return identity2.isCollection(this.contents) ? this.contents.get(
|
245726
|
+
get(key4, keepScalar) {
|
245727
|
+
return identity2.isCollection(this.contents) ? this.contents.get(key4, keepScalar) : undefined;
|
245677
245728
|
}
|
245678
245729
|
getIn(path5, keepScalar) {
|
245679
245730
|
if (Collection.isEmptyPath(path5))
|
245680
245731
|
return !keepScalar && identity2.isScalar(this.contents) ? this.contents.value : this.contents;
|
245681
245732
|
return identity2.isCollection(this.contents) ? this.contents.getIn(path5, keepScalar) : undefined;
|
245682
245733
|
}
|
245683
|
-
has(
|
245684
|
-
return identity2.isCollection(this.contents) ? this.contents.has(
|
245734
|
+
has(key4) {
|
245735
|
+
return identity2.isCollection(this.contents) ? this.contents.has(key4) : false;
|
245685
245736
|
}
|
245686
245737
|
hasIn(path5) {
|
245687
245738
|
if (Collection.isEmptyPath(path5))
|
245688
245739
|
return this.contents !== undefined;
|
245689
245740
|
return identity2.isCollection(this.contents) ? this.contents.hasIn(path5) : false;
|
245690
245741
|
}
|
245691
|
-
set(
|
245742
|
+
set(key4, value4) {
|
245692
245743
|
if (this.contents == null) {
|
245693
|
-
this.contents = Collection.collectionFromPath(this.schema, [
|
245744
|
+
this.contents = Collection.collectionFromPath(this.schema, [key4], value4);
|
245694
245745
|
} else if (assertCollection(this.contents)) {
|
245695
|
-
this.contents.set(
|
245746
|
+
this.contents.set(key4, value4);
|
245696
245747
|
}
|
245697
245748
|
}
|
245698
245749
|
setIn(path5, value4) {
|
@@ -245976,25 +246027,25 @@ var require_resolve_props = __commonJS((exports) => {
|
|
245976
246027
|
|
245977
246028
|
// ../../node_modules/yaml/dist/compose/util-contains-newline.js
|
245978
246029
|
var require_util_contains_newline = __commonJS((exports) => {
|
245979
|
-
function containsNewline(
|
245980
|
-
if (!
|
246030
|
+
function containsNewline(key4) {
|
246031
|
+
if (!key4)
|
245981
246032
|
return null;
|
245982
|
-
switch (
|
246033
|
+
switch (key4.type) {
|
245983
246034
|
case "alias":
|
245984
246035
|
case "scalar":
|
245985
246036
|
case "double-quoted-scalar":
|
245986
246037
|
case "single-quoted-scalar":
|
245987
|
-
if (
|
246038
|
+
if (key4.source.includes(`
|
245988
246039
|
`))
|
245989
246040
|
return true;
|
245990
|
-
if (
|
245991
|
-
for (const st2 of
|
246041
|
+
if (key4.end) {
|
246042
|
+
for (const st2 of key4.end)
|
245992
246043
|
if (st2.type === "newline")
|
245993
246044
|
return true;
|
245994
246045
|
}
|
245995
246046
|
return false;
|
245996
246047
|
case "flow-collection":
|
245997
|
-
for (const it2 of
|
246048
|
+
for (const it2 of key4.items) {
|
245998
246049
|
for (const st2 of it2.start)
|
245999
246050
|
if (st2.type === "newline")
|
246000
246051
|
return true;
|
@@ -246059,10 +246110,10 @@ var require_resolve_block_map = __commonJS((exports) => {
|
|
246059
246110
|
let offset = bm.offset;
|
246060
246111
|
let commentEnd = null;
|
246061
246112
|
for (const collItem of bm.items) {
|
246062
|
-
const { start: start3, key:
|
246113
|
+
const { start: start3, key: key4, sep: sep3, value: value4 } = collItem;
|
246063
246114
|
const keyProps = resolveProps.resolveProps(start3, {
|
246064
246115
|
indicator: "explicit-key-ind",
|
246065
|
-
next:
|
246116
|
+
next: key4 ?? sep3?.[0],
|
246066
246117
|
offset,
|
246067
246118
|
onError,
|
246068
246119
|
parentIndent: bm.indent,
|
@@ -246070,10 +246121,10 @@ var require_resolve_block_map = __commonJS((exports) => {
|
|
246070
246121
|
});
|
246071
246122
|
const implicitKey = !keyProps.found;
|
246072
246123
|
if (implicitKey) {
|
246073
|
-
if (
|
246074
|
-
if (
|
246124
|
+
if (key4) {
|
246125
|
+
if (key4.type === "block-seq")
|
246075
246126
|
onError(offset, "BLOCK_AS_IMPLICIT_KEY", "A block sequence may not be used as an implicit map key");
|
246076
|
-
else if ("indent" in
|
246127
|
+
else if ("indent" in key4 && key4.indent !== bm.indent)
|
246077
246128
|
onError(offset, "BAD_INDENT", startColMsg);
|
246078
246129
|
}
|
246079
246130
|
if (!keyProps.anchor && !keyProps.tag && !sep3) {
|
@@ -246087,17 +246138,17 @@ var require_resolve_block_map = __commonJS((exports) => {
|
|
246087
246138
|
}
|
246088
246139
|
continue;
|
246089
246140
|
}
|
246090
|
-
if (keyProps.newlineAfterProp || utilContainsNewline.containsNewline(
|
246091
|
-
onError(
|
246141
|
+
if (keyProps.newlineAfterProp || utilContainsNewline.containsNewline(key4)) {
|
246142
|
+
onError(key4 ?? start3[start3.length - 1], "MULTILINE_IMPLICIT_KEY", "Implicit keys need to be on a single line");
|
246092
246143
|
}
|
246093
246144
|
} else if (keyProps.found?.indent !== bm.indent) {
|
246094
246145
|
onError(offset, "BAD_INDENT", startColMsg);
|
246095
246146
|
}
|
246096
246147
|
ctx.atKey = true;
|
246097
246148
|
const keyStart = keyProps.end;
|
246098
|
-
const keyNode =
|
246149
|
+
const keyNode = key4 ? composeNode(ctx, key4, keyProps, onError) : composeEmptyNode(ctx, keyStart, start3, null, keyProps, onError);
|
246099
246150
|
if (ctx.schema.compat)
|
246100
|
-
utilFlowIndentCheck.flowIndentCheck(bm.indent,
|
246151
|
+
utilFlowIndentCheck.flowIndentCheck(bm.indent, key4, onError);
|
246101
246152
|
ctx.atKey = false;
|
246102
246153
|
if (utilMapIncludes.mapIncludes(ctx, map3.items, keyNode))
|
246103
246154
|
onError(keyStart, "DUPLICATE_KEY", "Map keys must be unique");
|
@@ -246107,7 +246158,7 @@ var require_resolve_block_map = __commonJS((exports) => {
|
|
246107
246158
|
offset: keyNode.range[2],
|
246108
246159
|
onError,
|
246109
246160
|
parentIndent: bm.indent,
|
246110
|
-
startOnNewline: !
|
246161
|
+
startOnNewline: !key4 || key4.type === "block-scalar"
|
246111
246162
|
});
|
246112
246163
|
offset = valueProps.end;
|
246113
246164
|
if (valueProps.found) {
|
@@ -246263,11 +246314,11 @@ var require_resolve_flow_collection = __commonJS((exports) => {
|
|
246263
246314
|
let offset = fc.offset + fc.start.source.length;
|
246264
246315
|
for (let i7 = 0;i7 < fc.items.length; ++i7) {
|
246265
246316
|
const collItem = fc.items[i7];
|
246266
|
-
const { start: start3, key:
|
246317
|
+
const { start: start3, key: key4, sep: sep3, value: value4 } = collItem;
|
246267
246318
|
const props = resolveProps.resolveProps(start3, {
|
246268
246319
|
flow: fcName,
|
246269
246320
|
indicator: "explicit-key-ind",
|
246270
|
-
next:
|
246321
|
+
next: key4 ?? sep3?.[0],
|
246271
246322
|
offset,
|
246272
246323
|
onError,
|
246273
246324
|
parentIndent: fc.indent,
|
@@ -246289,8 +246340,8 @@ var require_resolve_flow_collection = __commonJS((exports) => {
|
|
246289
246340
|
offset = props.end;
|
246290
246341
|
continue;
|
246291
246342
|
}
|
246292
|
-
if (!isMap && ctx.options.strict && utilContainsNewline.containsNewline(
|
246293
|
-
onError(
|
246343
|
+
if (!isMap && ctx.options.strict && utilContainsNewline.containsNewline(key4))
|
246344
|
+
onError(key4, "MULTILINE_IMPLICIT_KEY", "Implicit keys of flow sequence pairs need to be on a single line");
|
246294
246345
|
}
|
246295
246346
|
if (i7 === 0) {
|
246296
246347
|
if (props.comma)
|
@@ -246335,8 +246386,8 @@ var require_resolve_flow_collection = __commonJS((exports) => {
|
|
246335
246386
|
} else {
|
246336
246387
|
ctx.atKey = true;
|
246337
246388
|
const keyStart = props.end;
|
246338
|
-
const keyNode =
|
246339
|
-
if (isBlock(
|
246389
|
+
const keyNode = key4 ? composeNode(ctx, key4, props, onError) : composeEmptyNode(ctx, keyStart, start3, null, props, onError);
|
246390
|
+
if (isBlock(key4))
|
246340
246391
|
onError(keyNode.range, "BLOCK_IN_FLOW", blockMsg);
|
246341
246392
|
ctx.atKey = false;
|
246342
246393
|
const valueProps = resolveProps.resolveProps(sep3 ?? [], {
|
@@ -247148,7 +247199,7 @@ var require_composer = __commonJS((exports) => {
|
|
247148
247199
|
var node_process = __require("node:process");
|
247149
247200
|
var directives4 = require_directives2();
|
247150
247201
|
var Document = require_Document();
|
247151
|
-
var
|
247202
|
+
var errors4 = require_errors3();
|
247152
247203
|
var identity2 = require_identity();
|
247153
247204
|
var composeDoc = require_compose_doc();
|
247154
247205
|
var resolveEnd = require_resolve_end();
|
@@ -247199,9 +247250,9 @@ var require_composer = __commonJS((exports) => {
|
|
247199
247250
|
this.onError = (source, code2, message, warning) => {
|
247200
247251
|
const pos = getErrorPos(source);
|
247201
247252
|
if (warning)
|
247202
|
-
this.warnings.push(new
|
247253
|
+
this.warnings.push(new errors4.YAMLWarning(pos, code2, message));
|
247203
247254
|
else
|
247204
|
-
this.errors.push(new
|
247255
|
+
this.errors.push(new errors4.YAMLParseError(pos, code2, message));
|
247205
247256
|
};
|
247206
247257
|
this.directives = new directives4.Directives({ version: options.version || "1.2" });
|
247207
247258
|
this.options = options;
|
@@ -247285,7 +247336,7 @@ ${cb}` : comment;
|
|
247285
247336
|
break;
|
247286
247337
|
case "error": {
|
247287
247338
|
const msg = token.source ? `${token.message}: ${JSON.stringify(token.source)}` : token.message;
|
247288
|
-
const error5 = new
|
247339
|
+
const error5 = new errors4.YAMLParseError(getErrorPos(token), "UNEXPECTED_TOKEN", msg);
|
247289
247340
|
if (this.atDirectives || !this.doc)
|
247290
247341
|
this.errors.push(error5);
|
247291
247342
|
else
|
@@ -247295,7 +247346,7 @@ ${cb}` : comment;
|
|
247295
247346
|
case "doc-end": {
|
247296
247347
|
if (!this.doc) {
|
247297
247348
|
const msg = "Unexpected doc-end without preceding document";
|
247298
|
-
this.errors.push(new
|
247349
|
+
this.errors.push(new errors4.YAMLParseError(getErrorPos(token), "UNEXPECTED_TOKEN", msg));
|
247299
247350
|
break;
|
247300
247351
|
}
|
247301
247352
|
this.doc.directives.docEnd = true;
|
@@ -247310,7 +247361,7 @@ ${end.comment}` : end.comment;
|
|
247310
247361
|
break;
|
247311
247362
|
}
|
247312
247363
|
default:
|
247313
|
-
this.errors.push(new
|
247364
|
+
this.errors.push(new errors4.YAMLParseError(getErrorPos(token), "UNEXPECTED_TOKEN", `Unsupported token ${token.type}`));
|
247314
247365
|
}
|
247315
247366
|
}
|
247316
247367
|
*end(forceDoc = false, endOffset = -1) {
|
@@ -247336,7 +247387,7 @@ ${end.comment}` : end.comment;
|
|
247336
247387
|
var require_cst_scalar = __commonJS((exports) => {
|
247337
247388
|
var resolveBlockScalar = require_resolve_block_scalar();
|
247338
247389
|
var resolveFlowScalar = require_resolve_flow_scalar();
|
247339
|
-
var
|
247390
|
+
var errors4 = require_errors3();
|
247340
247391
|
var stringifyString = require_stringifyString();
|
247341
247392
|
function resolveAsScalar(token, strict = true, onError) {
|
247342
247393
|
if (token) {
|
@@ -247345,7 +247396,7 @@ var require_cst_scalar = __commonJS((exports) => {
|
|
247345
247396
|
if (onError)
|
247346
247397
|
onError(offset, code2, message);
|
247347
247398
|
else
|
247348
|
-
throw new
|
247399
|
+
throw new errors4.YAMLParseError([offset, offset + 1], code2, message);
|
247349
247400
|
};
|
247350
247401
|
switch (token.type) {
|
247351
247402
|
case "scalar":
|
@@ -247459,9 +247510,9 @@ var require_cst_scalar = __commonJS((exports) => {
|
|
247459
247510
|
if (!addEndtoBlockProps(props, "end" in token ? token.end : undefined))
|
247460
247511
|
props.push({ type: "newline", offset: -1, indent: indent2, source: `
|
247461
247512
|
` });
|
247462
|
-
for (const
|
247463
|
-
if (
|
247464
|
-
delete token[
|
247513
|
+
for (const key4 of Object.keys(token))
|
247514
|
+
if (key4 !== "type" && key4 !== "offset")
|
247515
|
+
delete token[key4];
|
247465
247516
|
Object.assign(token, { type: "block-scalar", indent: indent2, props, source: body });
|
247466
247517
|
}
|
247467
247518
|
}
|
@@ -247510,9 +247561,9 @@ var require_cst_scalar = __commonJS((exports) => {
|
|
247510
247561
|
default: {
|
247511
247562
|
const indent2 = "indent" in token ? token.indent : -1;
|
247512
247563
|
const end = "end" in token && Array.isArray(token.end) ? token.end.filter((st2) => st2.type === "space" || st2.type === "comment" || st2.type === "newline") : [];
|
247513
|
-
for (const
|
247514
|
-
if (
|
247515
|
-
delete token[
|
247564
|
+
for (const key4 of Object.keys(token))
|
247565
|
+
if (key4 !== "type" && key4 !== "offset")
|
247566
|
+
delete token[key4];
|
247516
247567
|
Object.assign(token, { type: type4, indent: indent2, source, end });
|
247517
247568
|
}
|
247518
247569
|
}
|
@@ -247564,12 +247615,12 @@ var require_cst_stringify = __commonJS((exports) => {
|
|
247564
247615
|
}
|
247565
247616
|
}
|
247566
247617
|
}
|
247567
|
-
function stringifyItem({ start: start3, key:
|
247618
|
+
function stringifyItem({ start: start3, key: key4, sep: sep3, value: value4 }) {
|
247568
247619
|
let res = "";
|
247569
247620
|
for (const st2 of start3)
|
247570
247621
|
res += st2.source;
|
247571
|
-
if (
|
247572
|
-
res += stringifyToken(
|
247622
|
+
if (key4)
|
247623
|
+
res += stringifyToken(key4);
|
247573
247624
|
if (sep3)
|
247574
247625
|
for (const st2 of sep3)
|
247575
247626
|
res += st2.source;
|
@@ -248866,7 +248917,7 @@ var require_parser2 = __commonJS((exports) => {
|
|
248866
248917
|
});
|
248867
248918
|
} else if (isFlowToken(it2.key) && !includesToken(it2.sep, "newline")) {
|
248868
248919
|
const start4 = getFirstKeyStartProps(it2.start);
|
248869
|
-
const
|
248920
|
+
const key4 = it2.key;
|
248870
248921
|
const sep3 = it2.sep;
|
248871
248922
|
sep3.push(this.sourceToken);
|
248872
248923
|
delete it2.key;
|
@@ -248875,7 +248926,7 @@ var require_parser2 = __commonJS((exports) => {
|
|
248875
248926
|
type: "block-map",
|
248876
248927
|
offset: this.offset,
|
248877
248928
|
indent: this.indent,
|
248878
|
-
items: [{ start: start4, key:
|
248929
|
+
items: [{ start: start4, key: key4, sep: sep3 }]
|
248879
248930
|
});
|
248880
248931
|
} else if (start3.length > 0) {
|
248881
248932
|
it2.sep = it2.sep.concat(start3, this.sourceToken);
|
@@ -249198,7 +249249,7 @@ var require_parser2 = __commonJS((exports) => {
|
|
249198
249249
|
var require_public_api = __commonJS((exports) => {
|
249199
249250
|
var composer = require_composer();
|
249200
249251
|
var Document = require_Document();
|
249201
|
-
var
|
249252
|
+
var errors4 = require_errors3();
|
249202
249253
|
var log = require_log();
|
249203
249254
|
var identity2 = require_identity();
|
249204
249255
|
var lineCounter = require_line_counter();
|
@@ -249215,8 +249266,8 @@ var require_public_api = __commonJS((exports) => {
|
|
249215
249266
|
const docs = Array.from(composer$1.compose(parser$1.parse(source)));
|
249216
249267
|
if (prettyErrors && lineCounter2)
|
249217
249268
|
for (const doc of docs) {
|
249218
|
-
doc.errors.forEach(
|
249219
|
-
doc.warnings.forEach(
|
249269
|
+
doc.errors.forEach(errors4.prettifyError(source, lineCounter2));
|
249270
|
+
doc.warnings.forEach(errors4.prettifyError(source, lineCounter2));
|
249220
249271
|
}
|
249221
249272
|
if (docs.length > 0)
|
249222
249273
|
return docs;
|
@@ -249231,13 +249282,13 @@ var require_public_api = __commonJS((exports) => {
|
|
249231
249282
|
if (!doc)
|
249232
249283
|
doc = _doc;
|
249233
249284
|
else if (doc.options.logLevel !== "silent") {
|
249234
|
-
doc.errors.push(new
|
249285
|
+
doc.errors.push(new errors4.YAMLParseError(_doc.range.slice(0, 2), "MULTIPLE_DOCS", "Source contains multiple documents; please use YAML.parseAllDocuments()"));
|
249235
249286
|
break;
|
249236
249287
|
}
|
249237
249288
|
}
|
249238
249289
|
if (prettyErrors && lineCounter2) {
|
249239
|
-
doc.errors.forEach(
|
249240
|
-
doc.warnings.forEach(
|
249290
|
+
doc.errors.forEach(errors4.prettifyError(source, lineCounter2));
|
249291
|
+
doc.warnings.forEach(errors4.prettifyError(source, lineCounter2));
|
249241
249292
|
}
|
249242
249293
|
return doc;
|
249243
249294
|
}
|
@@ -249288,57 +249339,6 @@ var require_public_api = __commonJS((exports) => {
|
|
249288
249339
|
exports.stringify = stringify3;
|
249289
249340
|
});
|
249290
249341
|
|
249291
|
-
// ../../node_modules/slugify/slugify.js
|
249292
|
-
var require_slugify = __commonJS((exports, module) => {
|
249293
|
-
(function(name3, root, factory) {
|
249294
|
-
if (typeof exports === "object") {
|
249295
|
-
module.exports = factory();
|
249296
|
-
module.exports["default"] = factory();
|
249297
|
-
} else if (typeof define === "function" && define.amd) {
|
249298
|
-
define(factory);
|
249299
|
-
} else {
|
249300
|
-
root[name3] = factory();
|
249301
|
-
}
|
249302
|
-
})("slugify", exports, function() {
|
249303
|
-
var charMap = JSON.parse('{"$":"dollar","%":"percent","&":"and","<":"less",">":"greater","|":"or","¢":"cent","£":"pound","¤":"currency","¥":"yen","©":"(c)","ª":"a","®":"(r)","º":"o","À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","Æ":"AE","Ç":"C","È":"E","É":"E","Ê":"E","Ë":"E","Ì":"I","Í":"I","Î":"I","Ï":"I","Ð":"D","Ñ":"N","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","Ù":"U","Ú":"U","Û":"U","Ü":"U","Ý":"Y","Þ":"TH","ß":"ss","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","æ":"ae","ç":"c","è":"e","é":"e","ê":"e","ë":"e","ì":"i","í":"i","î":"i","ï":"i","ð":"d","ñ":"n","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","ù":"u","ú":"u","û":"u","ü":"u","ý":"y","þ":"th","ÿ":"y","Ā":"A","ā":"a","Ă":"A","ă":"a","Ą":"A","ą":"a","Ć":"C","ć":"c","Č":"C","č":"c","Ď":"D","ď":"d","Đ":"DJ","đ":"dj","Ē":"E","ē":"e","Ė":"E","ė":"e","Ę":"e","ę":"e","Ě":"E","ě":"e","Ğ":"G","ğ":"g","Ģ":"G","ģ":"g","Ĩ":"I","ĩ":"i","Ī":"i","ī":"i","Į":"I","į":"i","İ":"I","ı":"i","Ķ":"k","ķ":"k","Ļ":"L","ļ":"l","Ľ":"L","ľ":"l","Ł":"L","ł":"l","Ń":"N","ń":"n","Ņ":"N","ņ":"n","Ň":"N","ň":"n","Ō":"O","ō":"o","Ő":"O","ő":"o","Œ":"OE","œ":"oe","Ŕ":"R","ŕ":"r","Ř":"R","ř":"r","Ś":"S","ś":"s","Ş":"S","ş":"s","Š":"S","š":"s","Ţ":"T","ţ":"t","Ť":"T","ť":"t","Ũ":"U","ũ":"u","Ū":"u","ū":"u","Ů":"U","ů":"u","Ű":"U","ű":"u","Ų":"U","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","ź":"z","Ż":"Z","ż":"z","Ž":"Z","ž":"z","Ə":"E","ƒ":"f","Ơ":"O","ơ":"o","Ư":"U","ư":"u","Lj":"LJ","lj":"lj","Nj":"NJ","nj":"nj","Ș":"S","ș":"s","Ț":"T","ț":"t","ə":"e","˚":"o","Ά":"A","Έ":"E","Ή":"H","Ί":"I","Ό":"O","Ύ":"Y","Ώ":"W","ΐ":"i","Α":"A","Β":"B","Γ":"G","Δ":"D","Ε":"E","Ζ":"Z","Η":"H","Θ":"8","Ι":"I","Κ":"K","Λ":"L","Μ":"M","Ν":"N","Ξ":"3","Ο":"O","Π":"P","Ρ":"R","Σ":"S","Τ":"T","Υ":"Y","Φ":"F","Χ":"X","Ψ":"PS","Ω":"W","Ϊ":"I","Ϋ":"Y","ά":"a","έ":"e","ή":"h","ί":"i","ΰ":"y","α":"a","β":"b","γ":"g","δ":"d","ε":"e","ζ":"z","η":"h","θ":"8","ι":"i","κ":"k","λ":"l","μ":"m","ν":"n","ξ":"3","ο":"o","π":"p","ρ":"r","ς":"s","σ":"s","τ":"t","υ":"y","φ":"f","χ":"x","ψ":"ps","ω":"w","ϊ":"i","ϋ":"y","ό":"o","ύ":"y","ώ":"w","Ё":"Yo","Ђ":"DJ","Є":"Ye","І":"I","Ї":"Yi","Ј":"J","Љ":"LJ","Њ":"NJ","Ћ":"C","Џ":"DZ","А":"A","Б":"B","В":"V","Г":"G","Д":"D","Е":"E","Ж":"Zh","З":"Z","И":"I","Й":"J","К":"K","Л":"L","М":"M","Н":"N","О":"O","П":"P","Р":"R","С":"S","Т":"T","У":"U","Ф":"F","Х":"H","Ц":"C","Ч":"Ch","Ш":"Sh","Щ":"Sh","Ъ":"U","Ы":"Y","Ь":"","Э":"E","Ю":"Yu","Я":"Ya","а":"a","б":"b","в":"v","г":"g","д":"d","е":"e","ж":"zh","з":"z","и":"i","й":"j","к":"k","л":"l","м":"m","н":"n","о":"o","п":"p","р":"r","с":"s","т":"t","у":"u","ф":"f","х":"h","ц":"c","ч":"ch","ш":"sh","щ":"sh","ъ":"u","ы":"y","ь":"","э":"e","ю":"yu","я":"ya","ё":"yo","ђ":"dj","є":"ye","і":"i","ї":"yi","ј":"j","љ":"lj","њ":"nj","ћ":"c","ѝ":"u","џ":"dz","Ґ":"G","ґ":"g","Ғ":"GH","ғ":"gh","Қ":"KH","қ":"kh","Ң":"NG","ң":"ng","Ү":"UE","ү":"ue","Ұ":"U","ұ":"u","Һ":"H","һ":"h","Ә":"AE","ә":"ae","Ө":"OE","ө":"oe","Ա":"A","Բ":"B","Գ":"G","Դ":"D","Ե":"E","Զ":"Z","Է":"E\'","Ը":"Y\'","Թ":"T\'","Ժ":"JH","Ի":"I","Լ":"L","Խ":"X","Ծ":"C\'","Կ":"K","Հ":"H","Ձ":"D\'","Ղ":"GH","Ճ":"TW","Մ":"M","Յ":"Y","Ն":"N","Շ":"SH","Չ":"CH","Պ":"P","Ջ":"J","Ռ":"R\'","Ս":"S","Վ":"V","Տ":"T","Ր":"R","Ց":"C","Փ":"P\'","Ք":"Q\'","Օ":"O\'\'","Ֆ":"F","և":"EV","ء":"a","آ":"aa","أ":"a","ؤ":"u","إ":"i","ئ":"e","ا":"a","ب":"b","ة":"h","ت":"t","ث":"th","ج":"j","ح":"h","خ":"kh","د":"d","ذ":"th","ر":"r","ز":"z","س":"s","ش":"sh","ص":"s","ض":"dh","ط":"t","ظ":"z","ع":"a","غ":"gh","ف":"f","ق":"q","ك":"k","ل":"l","م":"m","ن":"n","ه":"h","و":"w","ى":"a","ي":"y","ً":"an","ٌ":"on","ٍ":"en","َ":"a","ُ":"u","ِ":"e","ْ":"","٠":"0","١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","پ":"p","چ":"ch","ژ":"zh","ک":"k","گ":"g","ی":"y","۰":"0","۱":"1","۲":"2","۳":"3","۴":"4","۵":"5","۶":"6","۷":"7","۸":"8","۹":"9","฿":"baht","ა":"a","ბ":"b","გ":"g","დ":"d","ე":"e","ვ":"v","ზ":"z","თ":"t","ი":"i","კ":"k","ლ":"l","მ":"m","ნ":"n","ო":"o","პ":"p","ჟ":"zh","რ":"r","ს":"s","ტ":"t","უ":"u","ფ":"f","ქ":"k","ღ":"gh","ყ":"q","შ":"sh","ჩ":"ch","ც":"ts","ძ":"dz","წ":"ts","ჭ":"ch","ხ":"kh","ჯ":"j","ჰ":"h","Ṣ":"S","ṣ":"s","Ẁ":"W","ẁ":"w","Ẃ":"W","ẃ":"w","Ẅ":"W","ẅ":"w","ẞ":"SS","Ạ":"A","ạ":"a","Ả":"A","ả":"a","Ấ":"A","ấ":"a","Ầ":"A","ầ":"a","Ẩ":"A","ẩ":"a","Ẫ":"A","ẫ":"a","Ậ":"A","ậ":"a","Ắ":"A","ắ":"a","Ằ":"A","ằ":"a","Ẳ":"A","ẳ":"a","Ẵ":"A","ẵ":"a","Ặ":"A","ặ":"a","Ẹ":"E","ẹ":"e","Ẻ":"E","ẻ":"e","Ẽ":"E","ẽ":"e","Ế":"E","ế":"e","Ề":"E","ề":"e","Ể":"E","ể":"e","Ễ":"E","ễ":"e","Ệ":"E","ệ":"e","Ỉ":"I","ỉ":"i","Ị":"I","ị":"i","Ọ":"O","ọ":"o","Ỏ":"O","ỏ":"o","Ố":"O","ố":"o","Ồ":"O","ồ":"o","Ổ":"O","ổ":"o","Ỗ":"O","ỗ":"o","Ộ":"O","ộ":"o","Ớ":"O","ớ":"o","Ờ":"O","ờ":"o","Ở":"O","ở":"o","Ỡ":"O","ỡ":"o","Ợ":"O","ợ":"o","Ụ":"U","ụ":"u","Ủ":"U","ủ":"u","Ứ":"U","ứ":"u","Ừ":"U","ừ":"u","Ử":"U","ử":"u","Ữ":"U","ữ":"u","Ự":"U","ự":"u","Ỳ":"Y","ỳ":"y","Ỵ":"Y","ỵ":"y","Ỷ":"Y","ỷ":"y","Ỹ":"Y","ỹ":"y","–":"-","‘":"\'","’":"\'","“":"\\"","”":"\\"","„":"\\"","†":"+","•":"*","…":"...","₠":"ecu","₢":"cruzeiro","₣":"french franc","₤":"lira","₥":"mill","₦":"naira","₧":"peseta","₨":"rupee","₩":"won","₪":"new shequel","₫":"dong","€":"euro","₭":"kip","₮":"tugrik","₯":"drachma","₰":"penny","₱":"peso","₲":"guarani","₳":"austral","₴":"hryvnia","₵":"cedi","₸":"kazakhstani tenge","₹":"indian rupee","₺":"turkish lira","₽":"russian ruble","₿":"bitcoin","℠":"sm","™":"tm","∂":"d","∆":"delta","∑":"sum","∞":"infinity","♥":"love","元":"yuan","円":"yen","﷼":"rial","ﻵ":"laa","ﻷ":"laa","ﻹ":"lai","ﻻ":"la"}');
|
249304
|
-
var locales = JSON.parse('{"bg":{"Й":"Y","Ц":"Ts","Щ":"Sht","Ъ":"A","Ь":"Y","й":"y","ц":"ts","щ":"sht","ъ":"a","ь":"y"},"de":{"Ä":"AE","ä":"ae","Ö":"OE","ö":"oe","Ü":"UE","ü":"ue","ß":"ss","%":"prozent","&":"und","|":"oder","∑":"summe","∞":"unendlich","♥":"liebe"},"es":{"%":"por ciento","&":"y","<":"menor que",">":"mayor que","|":"o","¢":"centavos","£":"libras","¤":"moneda","₣":"francos","∑":"suma","∞":"infinito","♥":"amor"},"fr":{"%":"pourcent","&":"et","<":"plus petit",">":"plus grand","|":"ou","¢":"centime","£":"livre","¤":"devise","₣":"franc","∑":"somme","∞":"infini","♥":"amour"},"pt":{"%":"porcento","&":"e","<":"menor",">":"maior","|":"ou","¢":"centavo","∑":"soma","£":"libra","∞":"infinito","♥":"amor"},"uk":{"И":"Y","и":"y","Й":"Y","й":"y","Ц":"Ts","ц":"ts","Х":"Kh","х":"kh","Щ":"Shch","щ":"shch","Г":"H","г":"h"},"vi":{"Đ":"D","đ":"d"},"da":{"Ø":"OE","ø":"oe","Å":"AA","å":"aa","%":"procent","&":"og","|":"eller","$":"dollar","<":"mindre end",">":"større end"},"nb":{"&":"og","Å":"AA","Æ":"AE","Ø":"OE","å":"aa","æ":"ae","ø":"oe"},"it":{"&":"e"},"nl":{"&":"en"},"sv":{"&":"och","Å":"AA","Ä":"AE","Ö":"OE","å":"aa","ä":"ae","ö":"oe"}}');
|
249305
|
-
function replace(string, options) {
|
249306
|
-
if (typeof string !== "string") {
|
249307
|
-
throw new Error("slugify: string argument expected");
|
249308
|
-
}
|
249309
|
-
options = typeof options === "string" ? { replacement: options } : options || {};
|
249310
|
-
var locale = locales[options.locale] || {};
|
249311
|
-
var replacement = options.replacement === undefined ? "-" : options.replacement;
|
249312
|
-
var trim = options.trim === undefined ? true : options.trim;
|
249313
|
-
var slug = string.normalize().split("").reduce(function(result, ch) {
|
249314
|
-
var appendChar = locale[ch];
|
249315
|
-
if (appendChar === undefined)
|
249316
|
-
appendChar = charMap[ch];
|
249317
|
-
if (appendChar === undefined)
|
249318
|
-
appendChar = ch;
|
249319
|
-
if (appendChar === replacement)
|
249320
|
-
appendChar = " ";
|
249321
|
-
return result + appendChar.replace(options.remove || /[^\w\s$*_+~.()'"!\-:@]+/g, "");
|
249322
|
-
}, "");
|
249323
|
-
if (options.strict) {
|
249324
|
-
slug = slug.replace(/[^A-Za-z0-9\s]/g, "");
|
249325
|
-
}
|
249326
|
-
if (trim) {
|
249327
|
-
slug = slug.trim();
|
249328
|
-
}
|
249329
|
-
slug = slug.replace(/\s+/g, replacement);
|
249330
|
-
if (options.lower) {
|
249331
|
-
slug = slug.toLowerCase();
|
249332
|
-
}
|
249333
|
-
return slug;
|
249334
|
-
}
|
249335
|
-
replace.extend = function(customMap) {
|
249336
|
-
Object.assign(charMap, customMap);
|
249337
|
-
};
|
249338
|
-
return replace;
|
249339
|
-
});
|
249340
|
-
});
|
249341
|
-
|
249342
249342
|
// ../utils/dist/environment.mjs
|
249343
249343
|
import { join } from "node:path";
|
249344
249344
|
|
@@ -259498,7 +259498,7 @@ var DotEnvSchema = z.object({
|
|
259498
259498
|
SETTLEMINT_HASURA_DATABASE_URL: z.string().optional(),
|
259499
259499
|
SETTLEMINT_THEGRAPH: UniqueNameSchema.optional(),
|
259500
259500
|
SETTLEMINT_THEGRAPH_SUBGRAPHS_ENDPOINTS: z.preprocess((value) => tryParseJson(value, []), z.array(UrlSchema).optional()),
|
259501
|
-
|
259501
|
+
SETTLEMINT_THEGRAPH_DEFAULT_SUBGRAPH: z.string().optional(),
|
259502
259502
|
SETTLEMINT_PORTAL: UniqueNameSchema.optional(),
|
259503
259503
|
SETTLEMINT_PORTAL_GRAPHQL_ENDPOINT: UrlSchema.optional(),
|
259504
259504
|
SETTLEMINT_PORTAL_REST_ENDPOINT: UrlSchema.optional(),
|
@@ -259683,7 +259683,7 @@ function pruneCurrentEnv(currentEnv, env2) {
|
|
259683
259683
|
var package_default = {
|
259684
259684
|
name: "@settlemint/sdk-cli",
|
259685
259685
|
description: "Command-line interface for SettleMint SDK, providing development tools and project management capabilities",
|
259686
|
-
version: "1.1.
|
259686
|
+
version: "1.1.16-main05684df0",
|
259687
259687
|
type: "module",
|
259688
259688
|
private: false,
|
259689
259689
|
license: "FSL-1.1-MIT",
|
@@ -259728,12 +259728,12 @@ var package_default = {
|
|
259728
259728
|
devDependencies: {
|
259729
259729
|
"@commander-js/extra-typings": "13.1.0",
|
259730
259730
|
"@inquirer/confirm": "5.1.6",
|
259731
|
-
"@inquirer/input": "4.1.
|
259731
|
+
"@inquirer/input": "4.1.7",
|
259732
259732
|
"@inquirer/password": "4.0.9",
|
259733
|
-
"@inquirer/select": "4.0.
|
259734
|
-
"@settlemint/sdk-js": "1.1.
|
259735
|
-
"@settlemint/sdk-utils": "1.1.
|
259736
|
-
"@types/node": "22.13.
|
259733
|
+
"@inquirer/select": "4.0.10",
|
259734
|
+
"@settlemint/sdk-js": "1.1.16-main05684df0",
|
259735
|
+
"@settlemint/sdk-utils": "1.1.16-main05684df0",
|
259736
|
+
"@types/node": "22.13.10",
|
259737
259737
|
"@types/semver": "7.5.8",
|
259738
259738
|
"@types/which": "3.0.4",
|
259739
259739
|
"get-tsconfig": "4.10.0",
|
@@ -259822,10 +259822,6 @@ var {
|
|
259822
259822
|
} = import__.default;
|
259823
259823
|
|
259824
259824
|
// ../../node_modules/@inquirer/core/dist/esm/lib/key.js
|
259825
|
-
var isUpKey = (key) => key.name === "up" || key.name === "k" || key.ctrl && key.name === "p";
|
259826
|
-
var isDownKey = (key) => key.name === "down" || key.name === "j" || key.ctrl && key.name === "n";
|
259827
|
-
var isBackspaceKey = (key) => key.name === "backspace";
|
259828
|
-
var isNumberKey = (key) => "123456789".includes(key.name);
|
259829
259825
|
var isEnterKey = (key) => key.name === "enter" || key.name === "return";
|
259830
259826
|
// ../../node_modules/@inquirer/core/dist/esm/lib/errors.js
|
259831
259827
|
class AbortPromptError extends Error {
|
@@ -259995,7 +259991,7 @@ function useEffect(cb, depArray) {
|
|
259995
259991
|
// ../../node_modules/@inquirer/core/dist/esm/lib/theme.js
|
259996
259992
|
var import_yoctocolors_cjs = __toESM(require_yoctocolors_cjs(), 1);
|
259997
259993
|
|
259998
|
-
// ../../node_modules/@inquirer/figures/dist/esm/index.js
|
259994
|
+
// ../../node_modules/@inquirer/core/node_modules/@inquirer/figures/dist/esm/index.js
|
259999
259995
|
import process4 from "node:process";
|
260000
259996
|
function isUnicodeSupported2() {
|
260001
259997
|
if (process4.platform !== "win32") {
|
@@ -260360,22 +260356,11 @@ function usePrefix({ status = "idle", theme }) {
|
|
260360
260356
|
const iconName = status === "loading" ? "idle" : status;
|
260361
260357
|
return typeof prefix === "string" ? prefix : prefix[iconName] ?? prefix["idle"];
|
260362
260358
|
}
|
260363
|
-
// ../../node_modules/@inquirer/core/dist/esm/lib/use-memo.js
|
260364
|
-
function useMemo(fn, dependencies) {
|
260365
|
-
return withPointer((pointer) => {
|
260366
|
-
const prev = pointer.get();
|
260367
|
-
if (!prev || prev.dependencies.length !== dependencies.length || prev.dependencies.some((dep, i) => dep !== dependencies[i])) {
|
260368
|
-
const value = fn();
|
260369
|
-
pointer.set({ value, dependencies });
|
260370
|
-
return value;
|
260371
|
-
}
|
260372
|
-
return prev.value;
|
260373
|
-
});
|
260374
|
-
}
|
260375
260359
|
// ../../node_modules/@inquirer/core/dist/esm/lib/use-ref.js
|
260376
260360
|
function useRef(val) {
|
260377
260361
|
return useState({ current: val })[0];
|
260378
260362
|
}
|
260363
|
+
|
260379
260364
|
// ../../node_modules/@inquirer/core/dist/esm/lib/use-keypress.js
|
260380
260365
|
function useKeypress(userHandler) {
|
260381
260366
|
const signal = useRef(userHandler);
|
@@ -260407,95 +260392,6 @@ function readlineWidth() {
|
|
260407
260392
|
return import_cli_width.default({ defaultWidth: 80, output: readline().output });
|
260408
260393
|
}
|
260409
260394
|
|
260410
|
-
// ../../node_modules/@inquirer/core/dist/esm/lib/pagination/lines.js
|
260411
|
-
function split(content, width) {
|
260412
|
-
return breakLines(content, width).split(`
|
260413
|
-
`);
|
260414
|
-
}
|
260415
|
-
function rotate(count, items) {
|
260416
|
-
const max = items.length;
|
260417
|
-
const offset = (count % max + max) % max;
|
260418
|
-
return [...items.slice(offset), ...items.slice(0, offset)];
|
260419
|
-
}
|
260420
|
-
function lines({ items, width, renderItem, active, position: requested, pageSize }) {
|
260421
|
-
const layouts = items.map((item, index) => ({
|
260422
|
-
item,
|
260423
|
-
index,
|
260424
|
-
isActive: index === active
|
260425
|
-
}));
|
260426
|
-
const layoutsInPage = rotate(active - requested, layouts).slice(0, pageSize);
|
260427
|
-
const renderItemAt = (index) => layoutsInPage[index] == null ? [] : split(renderItem(layoutsInPage[index]), width);
|
260428
|
-
const pageBuffer = Array.from({ length: pageSize });
|
260429
|
-
const activeItem = renderItemAt(requested).slice(0, pageSize);
|
260430
|
-
const position = requested + activeItem.length <= pageSize ? requested : pageSize - activeItem.length;
|
260431
|
-
pageBuffer.splice(position, activeItem.length, ...activeItem);
|
260432
|
-
let bufferPointer = position + activeItem.length;
|
260433
|
-
let layoutPointer = requested + 1;
|
260434
|
-
while (bufferPointer < pageSize && layoutPointer < layoutsInPage.length) {
|
260435
|
-
for (const line of renderItemAt(layoutPointer)) {
|
260436
|
-
pageBuffer[bufferPointer++] = line;
|
260437
|
-
if (bufferPointer >= pageSize)
|
260438
|
-
break;
|
260439
|
-
}
|
260440
|
-
layoutPointer++;
|
260441
|
-
}
|
260442
|
-
bufferPointer = position - 1;
|
260443
|
-
layoutPointer = requested - 1;
|
260444
|
-
while (bufferPointer >= 0 && layoutPointer >= 0) {
|
260445
|
-
for (const line of renderItemAt(layoutPointer).reverse()) {
|
260446
|
-
pageBuffer[bufferPointer--] = line;
|
260447
|
-
if (bufferPointer < 0)
|
260448
|
-
break;
|
260449
|
-
}
|
260450
|
-
layoutPointer--;
|
260451
|
-
}
|
260452
|
-
return pageBuffer.filter((line) => typeof line === "string");
|
260453
|
-
}
|
260454
|
-
|
260455
|
-
// ../../node_modules/@inquirer/core/dist/esm/lib/pagination/position.js
|
260456
|
-
function finite({ active, pageSize, total }) {
|
260457
|
-
const middle = Math.floor(pageSize / 2);
|
260458
|
-
if (total <= pageSize || active < middle)
|
260459
|
-
return active;
|
260460
|
-
if (active >= total - middle)
|
260461
|
-
return active + pageSize - total;
|
260462
|
-
return middle;
|
260463
|
-
}
|
260464
|
-
function infinite({ active, lastActive, total, pageSize, pointer }) {
|
260465
|
-
if (total <= pageSize)
|
260466
|
-
return active;
|
260467
|
-
if (lastActive < active && active - lastActive < pageSize) {
|
260468
|
-
return Math.min(Math.floor(pageSize / 2), pointer + active - lastActive);
|
260469
|
-
}
|
260470
|
-
return pointer;
|
260471
|
-
}
|
260472
|
-
|
260473
|
-
// ../../node_modules/@inquirer/core/dist/esm/lib/pagination/use-pagination.js
|
260474
|
-
function usePagination({ items, active, renderItem, pageSize, loop = true }) {
|
260475
|
-
const state = useRef({ position: 0, lastActive: 0 });
|
260476
|
-
const position = loop ? infinite({
|
260477
|
-
active,
|
260478
|
-
lastActive: state.current.lastActive,
|
260479
|
-
total: items.length,
|
260480
|
-
pageSize,
|
260481
|
-
pointer: state.current.position
|
260482
|
-
}) : finite({
|
260483
|
-
active,
|
260484
|
-
total: items.length,
|
260485
|
-
pageSize
|
260486
|
-
});
|
260487
|
-
state.current.position = position;
|
260488
|
-
state.current.lastActive = active;
|
260489
|
-
return lines({
|
260490
|
-
items,
|
260491
|
-
width: readlineWidth(),
|
260492
|
-
renderItem,
|
260493
|
-
active,
|
260494
|
-
position,
|
260495
|
-
pageSize
|
260496
|
-
}).join(`
|
260497
|
-
`);
|
260498
|
-
}
|
260499
260395
|
// ../../node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
|
260500
260396
|
var import_mute_stream = __toESM(require_lib(), 1);
|
260501
260397
|
import * as readline2 from "node:readline";
|
@@ -260881,20 +260777,6 @@ function createPrompt(view) {
|
|
260881
260777
|
};
|
260882
260778
|
return prompt;
|
260883
260779
|
}
|
260884
|
-
// ../../node_modules/@inquirer/core/dist/esm/lib/Separator.js
|
260885
|
-
var import_yoctocolors_cjs2 = __toESM(require_yoctocolors_cjs(), 1);
|
260886
|
-
class Separator {
|
260887
|
-
separator = import_yoctocolors_cjs2.default.dim(Array.from({ length: 15 }).join(esm_default.line));
|
260888
|
-
type = "separator";
|
260889
|
-
constructor(separator) {
|
260890
|
-
if (separator) {
|
260891
|
-
this.separator = separator;
|
260892
|
-
}
|
260893
|
-
}
|
260894
|
-
static isSeparator(choice) {
|
260895
|
-
return Boolean(choice && typeof choice === "object" && "type" in choice && choice.type === "separator");
|
260896
|
-
}
|
260897
|
-
}
|
260898
260780
|
// ../utils/dist/terminal.mjs
|
260899
260781
|
import { spawn } from "node:child_process";
|
260900
260782
|
var import_console_table_printer2 = __toESM(require_dist2(), 1);
|
@@ -261002,7 +260884,7 @@ ${error.stack}`));
|
|
261002
260884
|
return handleError(err);
|
261003
260885
|
}
|
261004
260886
|
}
|
261005
|
-
const spinner2 = yoctoSpinner().start(options.startMessage);
|
260887
|
+
const spinner2 = yoctoSpinner({ stream: process.stdout }).start(options.startMessage);
|
261006
260888
|
try {
|
261007
260889
|
const result = await options.task(spinner2);
|
261008
260890
|
spinner2.success(options.stopMessage);
|
@@ -261161,7 +261043,7 @@ var DotEnvSchema2 = z.object({
|
|
261161
261043
|
SETTLEMINT_HASURA_DATABASE_URL: z.string().optional(),
|
261162
261044
|
SETTLEMINT_THEGRAPH: UniqueNameSchema2.optional(),
|
261163
261045
|
SETTLEMINT_THEGRAPH_SUBGRAPHS_ENDPOINTS: z.preprocess((value) => tryParseJson2(value, []), z.array(UrlSchema2).optional()),
|
261164
|
-
|
261046
|
+
SETTLEMINT_THEGRAPH_DEFAULT_SUBGRAPH: z.string().optional(),
|
261165
261047
|
SETTLEMINT_PORTAL: UniqueNameSchema2.optional(),
|
261166
261048
|
SETTLEMINT_PORTAL_GRAPHQL_ENDPOINT: UrlSchema2.optional(),
|
261167
261049
|
SETTLEMINT_PORTAL_REST_ENDPOINT: UrlSchema2.optional(),
|
@@ -264003,6 +263885,21 @@ export const { client: ${graphqlClientVariable}, graphql: ${graphqlVariable} } =
|
|
264003
263885
|
});`
|
264004
263886
|
]);
|
264005
263887
|
}
|
263888
|
+
if (env2.SETTLEMINT_THEGRAPH_DEFAULT_SUBGRAPH) {
|
263889
|
+
const isDefaulSubgraphGenerated = toGenerate.some((gqlEndpoint) => {
|
263890
|
+
const name3 = gqlEndpoint.split("/").pop();
|
263891
|
+
return name3 === env2.SETTLEMINT_THEGRAPH_DEFAULT_SUBGRAPH;
|
263892
|
+
});
|
263893
|
+
if (isDefaulSubgraphGenerated) {
|
263894
|
+
const nameSuffix = capitalizeFirstLetter2(env2.SETTLEMINT_THEGRAPH_DEFAULT_SUBGRAPH);
|
263895
|
+
const graphqlClientVariable = getVariableName(`theGraphClient${nameSuffix}`);
|
263896
|
+
const graphqlVariable = getVariableName(`theGraphGraphql${nameSuffix}`);
|
263897
|
+
template.push(`
|
263898
|
+
export const theGraphClient = ${graphqlClientVariable};
|
263899
|
+
export const theGraphGraphql = ${graphqlVariable};
|
263900
|
+
`);
|
263901
|
+
}
|
263902
|
+
}
|
264006
263903
|
await writeTemplate(template.join(`
|
264007
263904
|
`), "/lib/settlemint", "the-graph.ts");
|
264008
263905
|
const projectDir = await projectRoot3();
|
@@ -265061,14 +264958,1424 @@ async function codegenTsconfig(env2, thegraphSubgraphNames) {
|
|
265061
264958
|
};
|
265062
264959
|
}
|
265063
264960
|
|
265064
|
-
//
|
265065
|
-
var
|
264961
|
+
// src/utils/subgraph/sanitize-name.ts
|
264962
|
+
var import_slugify = __toESM(require_slugify(), 1);
|
264963
|
+
function sanitizeName(value4, length = 35) {
|
264964
|
+
return import_slugify.default(value4, {
|
264965
|
+
strict: true,
|
264966
|
+
remove: /[!"'()*+.:@~]/g,
|
264967
|
+
replacement: "-",
|
264968
|
+
lower: true
|
264969
|
+
}).slice(0, length).replaceAll(/(^\d*)/g, "").replaceAll(/(-$)/g, "").replaceAll(/(^-)/g, "");
|
264970
|
+
}
|
264971
|
+
|
264972
|
+
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/key.js
|
264973
|
+
var isBackspaceKey = (key2) => key2.name === "backspace";
|
264974
|
+
var isEnterKey2 = (key2) => key2.name === "enter" || key2.name === "return";
|
264975
|
+
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/errors.js
|
264976
|
+
class AbortPromptError2 extends Error {
|
264977
|
+
name = "AbortPromptError";
|
264978
|
+
message = "Prompt was aborted";
|
264979
|
+
constructor(options) {
|
264980
|
+
super();
|
264981
|
+
this.cause = options?.cause;
|
264982
|
+
}
|
264983
|
+
}
|
264984
|
+
|
264985
|
+
class CancelPromptError2 extends Error {
|
264986
|
+
name = "CancelPromptError";
|
264987
|
+
message = "Prompt was canceled";
|
264988
|
+
}
|
264989
|
+
|
264990
|
+
class ExitPromptError2 extends Error {
|
264991
|
+
name = "ExitPromptError";
|
264992
|
+
}
|
264993
|
+
|
264994
|
+
class HookError2 extends Error {
|
264995
|
+
name = "HookError";
|
264996
|
+
}
|
264997
|
+
|
264998
|
+
class ValidationError2 extends Error {
|
264999
|
+
name = "ValidationError";
|
265000
|
+
}
|
265001
|
+
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/use-prefix.js
|
265002
|
+
import { AsyncResource as AsyncResource5 } from "node:async_hooks";
|
265003
|
+
|
265004
|
+
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/hook-engine.js
|
265005
|
+
import { AsyncLocalStorage as AsyncLocalStorage2, AsyncResource as AsyncResource4 } from "node:async_hooks";
|
265006
|
+
var hookStorage2 = new AsyncLocalStorage2;
|
265007
|
+
function createStore2(rl) {
|
265008
|
+
const store = {
|
265009
|
+
rl,
|
265010
|
+
hooks: [],
|
265011
|
+
hooksCleanup: [],
|
265012
|
+
hooksEffect: [],
|
265013
|
+
index: 0,
|
265014
|
+
handleChange() {
|
265015
|
+
}
|
265016
|
+
};
|
265017
|
+
return store;
|
265018
|
+
}
|
265019
|
+
function withHooks2(rl, cb) {
|
265020
|
+
const store = createStore2(rl);
|
265021
|
+
return hookStorage2.run(store, () => {
|
265022
|
+
function cycle(render) {
|
265023
|
+
store.handleChange = () => {
|
265024
|
+
store.index = 0;
|
265025
|
+
render();
|
265026
|
+
};
|
265027
|
+
store.handleChange();
|
265028
|
+
}
|
265029
|
+
return cb(cycle);
|
265030
|
+
});
|
265031
|
+
}
|
265032
|
+
function getStore2() {
|
265033
|
+
const store = hookStorage2.getStore();
|
265034
|
+
if (!store) {
|
265035
|
+
throw new HookError2("[Inquirer] Hook functions can only be called from within a prompt");
|
265036
|
+
}
|
265037
|
+
return store;
|
265038
|
+
}
|
265039
|
+
function readline3() {
|
265040
|
+
return getStore2().rl;
|
265041
|
+
}
|
265042
|
+
function withUpdates2(fn) {
|
265043
|
+
const wrapped = (...args) => {
|
265044
|
+
const store = getStore2();
|
265045
|
+
let shouldUpdate = false;
|
265046
|
+
const oldHandleChange = store.handleChange;
|
265047
|
+
store.handleChange = () => {
|
265048
|
+
shouldUpdate = true;
|
265049
|
+
};
|
265050
|
+
const returnValue = fn(...args);
|
265051
|
+
if (shouldUpdate) {
|
265052
|
+
oldHandleChange();
|
265053
|
+
}
|
265054
|
+
store.handleChange = oldHandleChange;
|
265055
|
+
return returnValue;
|
265056
|
+
};
|
265057
|
+
return AsyncResource4.bind(wrapped);
|
265058
|
+
}
|
265059
|
+
function withPointer2(cb) {
|
265060
|
+
const store = getStore2();
|
265061
|
+
const { index } = store;
|
265062
|
+
const pointer = {
|
265063
|
+
get() {
|
265064
|
+
return store.hooks[index];
|
265065
|
+
},
|
265066
|
+
set(value4) {
|
265067
|
+
store.hooks[index] = value4;
|
265068
|
+
},
|
265069
|
+
initialized: index in store.hooks
|
265070
|
+
};
|
265071
|
+
const returnValue = cb(pointer);
|
265072
|
+
store.index++;
|
265073
|
+
return returnValue;
|
265074
|
+
}
|
265075
|
+
function handleChange2() {
|
265076
|
+
getStore2().handleChange();
|
265077
|
+
}
|
265078
|
+
var effectScheduler2 = {
|
265079
|
+
queue(cb) {
|
265080
|
+
const store = getStore2();
|
265081
|
+
const { index } = store;
|
265082
|
+
store.hooksEffect.push(() => {
|
265083
|
+
store.hooksCleanup[index]?.();
|
265084
|
+
const cleanFn = cb(readline3());
|
265085
|
+
if (cleanFn != null && typeof cleanFn !== "function") {
|
265086
|
+
throw new ValidationError2("useEffect return value must be a cleanup function or nothing.");
|
265087
|
+
}
|
265088
|
+
store.hooksCleanup[index] = cleanFn;
|
265089
|
+
});
|
265090
|
+
},
|
265091
|
+
run() {
|
265092
|
+
const store = getStore2();
|
265093
|
+
withUpdates2(() => {
|
265094
|
+
store.hooksEffect.forEach((effect) => {
|
265095
|
+
effect();
|
265096
|
+
});
|
265097
|
+
store.hooksEffect.length = 0;
|
265098
|
+
})();
|
265099
|
+
},
|
265100
|
+
clearAll() {
|
265101
|
+
const store = getStore2();
|
265102
|
+
store.hooksCleanup.forEach((cleanFn) => {
|
265103
|
+
cleanFn?.();
|
265104
|
+
});
|
265105
|
+
store.hooksEffect.length = 0;
|
265106
|
+
store.hooksCleanup.length = 0;
|
265107
|
+
}
|
265108
|
+
};
|
265109
|
+
|
265110
|
+
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/use-state.js
|
265111
|
+
function useState2(defaultValue) {
|
265112
|
+
return withPointer2((pointer) => {
|
265113
|
+
const setFn = (newValue) => {
|
265114
|
+
if (pointer.get() !== newValue) {
|
265115
|
+
pointer.set(newValue);
|
265116
|
+
handleChange2();
|
265117
|
+
}
|
265118
|
+
};
|
265119
|
+
if (pointer.initialized) {
|
265120
|
+
return [pointer.get(), setFn];
|
265121
|
+
}
|
265122
|
+
const value4 = typeof defaultValue === "function" ? defaultValue() : defaultValue;
|
265123
|
+
pointer.set(value4);
|
265124
|
+
return [value4, setFn];
|
265125
|
+
});
|
265126
|
+
}
|
265127
|
+
|
265128
|
+
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/use-effect.js
|
265129
|
+
function useEffect2(cb, depArray) {
|
265130
|
+
withPointer2((pointer) => {
|
265131
|
+
const oldDeps = pointer.get();
|
265132
|
+
const hasChanged = !Array.isArray(oldDeps) || depArray.some((dep, i6) => !Object.is(dep, oldDeps[i6]));
|
265133
|
+
if (hasChanged) {
|
265134
|
+
effectScheduler2.queue(cb);
|
265135
|
+
}
|
265136
|
+
pointer.set(depArray);
|
265137
|
+
});
|
265138
|
+
}
|
265139
|
+
|
265140
|
+
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/theme.js
|
265141
|
+
var import_yoctocolors_cjs2 = __toESM(require_yoctocolors_cjs(), 1);
|
265142
|
+
|
265143
|
+
// ../../node_modules/@inquirer/figures/dist/esm/index.js
|
265144
|
+
import process8 from "node:process";
|
265145
|
+
function isUnicodeSupported3() {
|
265146
|
+
if (process8.platform !== "win32") {
|
265147
|
+
return process8.env["TERM"] !== "linux";
|
265148
|
+
}
|
265149
|
+
return Boolean(process8.env["WT_SESSION"]) || Boolean(process8.env["TERMINUS_SUBLIME"]) || process8.env["ConEmuTask"] === "{cmd::Cmder}" || process8.env["TERM_PROGRAM"] === "Terminus-Sublime" || process8.env["TERM_PROGRAM"] === "vscode" || process8.env["TERM"] === "xterm-256color" || process8.env["TERM"] === "alacritty" || process8.env["TERMINAL_EMULATOR"] === "JetBrains-JediTerm";
|
265150
|
+
}
|
265151
|
+
var common2 = {
|
265152
|
+
circleQuestionMark: "(?)",
|
265153
|
+
questionMarkPrefix: "(?)",
|
265154
|
+
square: "█",
|
265155
|
+
squareDarkShade: "▓",
|
265156
|
+
squareMediumShade: "▒",
|
265157
|
+
squareLightShade: "░",
|
265158
|
+
squareTop: "▀",
|
265159
|
+
squareBottom: "▄",
|
265160
|
+
squareLeft: "▌",
|
265161
|
+
squareRight: "▐",
|
265162
|
+
squareCenter: "■",
|
265163
|
+
bullet: "●",
|
265164
|
+
dot: "․",
|
265165
|
+
ellipsis: "…",
|
265166
|
+
pointerSmall: "›",
|
265167
|
+
triangleUp: "▲",
|
265168
|
+
triangleUpSmall: "▴",
|
265169
|
+
triangleDown: "▼",
|
265170
|
+
triangleDownSmall: "▾",
|
265171
|
+
triangleLeftSmall: "◂",
|
265172
|
+
triangleRightSmall: "▸",
|
265173
|
+
home: "⌂",
|
265174
|
+
heart: "♥",
|
265175
|
+
musicNote: "♪",
|
265176
|
+
musicNoteBeamed: "♫",
|
265177
|
+
arrowUp: "↑",
|
265178
|
+
arrowDown: "↓",
|
265179
|
+
arrowLeft: "←",
|
265180
|
+
arrowRight: "→",
|
265181
|
+
arrowLeftRight: "↔",
|
265182
|
+
arrowUpDown: "↕",
|
265183
|
+
almostEqual: "≈",
|
265184
|
+
notEqual: "≠",
|
265185
|
+
lessOrEqual: "≤",
|
265186
|
+
greaterOrEqual: "≥",
|
265187
|
+
identical: "≡",
|
265188
|
+
infinity: "∞",
|
265189
|
+
subscriptZero: "₀",
|
265190
|
+
subscriptOne: "₁",
|
265191
|
+
subscriptTwo: "₂",
|
265192
|
+
subscriptThree: "₃",
|
265193
|
+
subscriptFour: "₄",
|
265194
|
+
subscriptFive: "₅",
|
265195
|
+
subscriptSix: "₆",
|
265196
|
+
subscriptSeven: "₇",
|
265197
|
+
subscriptEight: "₈",
|
265198
|
+
subscriptNine: "₉",
|
265199
|
+
oneHalf: "½",
|
265200
|
+
oneThird: "⅓",
|
265201
|
+
oneQuarter: "¼",
|
265202
|
+
oneFifth: "⅕",
|
265203
|
+
oneSixth: "⅙",
|
265204
|
+
oneEighth: "⅛",
|
265205
|
+
twoThirds: "⅔",
|
265206
|
+
twoFifths: "⅖",
|
265207
|
+
threeQuarters: "¾",
|
265208
|
+
threeFifths: "⅗",
|
265209
|
+
threeEighths: "⅜",
|
265210
|
+
fourFifths: "⅘",
|
265211
|
+
fiveSixths: "⅚",
|
265212
|
+
fiveEighths: "⅝",
|
265213
|
+
sevenEighths: "⅞",
|
265214
|
+
line: "─",
|
265215
|
+
lineBold: "━",
|
265216
|
+
lineDouble: "═",
|
265217
|
+
lineDashed0: "┄",
|
265218
|
+
lineDashed1: "┅",
|
265219
|
+
lineDashed2: "┈",
|
265220
|
+
lineDashed3: "┉",
|
265221
|
+
lineDashed4: "╌",
|
265222
|
+
lineDashed5: "╍",
|
265223
|
+
lineDashed6: "╴",
|
265224
|
+
lineDashed7: "╶",
|
265225
|
+
lineDashed8: "╸",
|
265226
|
+
lineDashed9: "╺",
|
265227
|
+
lineDashed10: "╼",
|
265228
|
+
lineDashed11: "╾",
|
265229
|
+
lineDashed12: "−",
|
265230
|
+
lineDashed13: "–",
|
265231
|
+
lineDashed14: "‐",
|
265232
|
+
lineDashed15: "⁃",
|
265233
|
+
lineVertical: "│",
|
265234
|
+
lineVerticalBold: "┃",
|
265235
|
+
lineVerticalDouble: "║",
|
265236
|
+
lineVerticalDashed0: "┆",
|
265237
|
+
lineVerticalDashed1: "┇",
|
265238
|
+
lineVerticalDashed2: "┊",
|
265239
|
+
lineVerticalDashed3: "┋",
|
265240
|
+
lineVerticalDashed4: "╎",
|
265241
|
+
lineVerticalDashed5: "╏",
|
265242
|
+
lineVerticalDashed6: "╵",
|
265243
|
+
lineVerticalDashed7: "╷",
|
265244
|
+
lineVerticalDashed8: "╹",
|
265245
|
+
lineVerticalDashed9: "╻",
|
265246
|
+
lineVerticalDashed10: "╽",
|
265247
|
+
lineVerticalDashed11: "╿",
|
265248
|
+
lineDownLeft: "┐",
|
265249
|
+
lineDownLeftArc: "╮",
|
265250
|
+
lineDownBoldLeftBold: "┓",
|
265251
|
+
lineDownBoldLeft: "┒",
|
265252
|
+
lineDownLeftBold: "┑",
|
265253
|
+
lineDownDoubleLeftDouble: "╗",
|
265254
|
+
lineDownDoubleLeft: "╖",
|
265255
|
+
lineDownLeftDouble: "╕",
|
265256
|
+
lineDownRight: "┌",
|
265257
|
+
lineDownRightArc: "╭",
|
265258
|
+
lineDownBoldRightBold: "┏",
|
265259
|
+
lineDownBoldRight: "┎",
|
265260
|
+
lineDownRightBold: "┍",
|
265261
|
+
lineDownDoubleRightDouble: "╔",
|
265262
|
+
lineDownDoubleRight: "╓",
|
265263
|
+
lineDownRightDouble: "╒",
|
265264
|
+
lineUpLeft: "┘",
|
265265
|
+
lineUpLeftArc: "╯",
|
265266
|
+
lineUpBoldLeftBold: "┛",
|
265267
|
+
lineUpBoldLeft: "┚",
|
265268
|
+
lineUpLeftBold: "┙",
|
265269
|
+
lineUpDoubleLeftDouble: "╝",
|
265270
|
+
lineUpDoubleLeft: "╜",
|
265271
|
+
lineUpLeftDouble: "╛",
|
265272
|
+
lineUpRight: "└",
|
265273
|
+
lineUpRightArc: "╰",
|
265274
|
+
lineUpBoldRightBold: "┗",
|
265275
|
+
lineUpBoldRight: "┖",
|
265276
|
+
lineUpRightBold: "┕",
|
265277
|
+
lineUpDoubleRightDouble: "╚",
|
265278
|
+
lineUpDoubleRight: "╙",
|
265279
|
+
lineUpRightDouble: "╘",
|
265280
|
+
lineUpDownLeft: "┤",
|
265281
|
+
lineUpBoldDownBoldLeftBold: "┫",
|
265282
|
+
lineUpBoldDownBoldLeft: "┨",
|
265283
|
+
lineUpDownLeftBold: "┥",
|
265284
|
+
lineUpBoldDownLeftBold: "┩",
|
265285
|
+
lineUpDownBoldLeftBold: "┪",
|
265286
|
+
lineUpDownBoldLeft: "┧",
|
265287
|
+
lineUpBoldDownLeft: "┦",
|
265288
|
+
lineUpDoubleDownDoubleLeftDouble: "╣",
|
265289
|
+
lineUpDoubleDownDoubleLeft: "╢",
|
265290
|
+
lineUpDownLeftDouble: "╡",
|
265291
|
+
lineUpDownRight: "├",
|
265292
|
+
lineUpBoldDownBoldRightBold: "┣",
|
265293
|
+
lineUpBoldDownBoldRight: "┠",
|
265294
|
+
lineUpDownRightBold: "┝",
|
265295
|
+
lineUpBoldDownRightBold: "┡",
|
265296
|
+
lineUpDownBoldRightBold: "┢",
|
265297
|
+
lineUpDownBoldRight: "┟",
|
265298
|
+
lineUpBoldDownRight: "┞",
|
265299
|
+
lineUpDoubleDownDoubleRightDouble: "╠",
|
265300
|
+
lineUpDoubleDownDoubleRight: "╟",
|
265301
|
+
lineUpDownRightDouble: "╞",
|
265302
|
+
lineDownLeftRight: "┬",
|
265303
|
+
lineDownBoldLeftBoldRightBold: "┳",
|
265304
|
+
lineDownLeftBoldRightBold: "┯",
|
265305
|
+
lineDownBoldLeftRight: "┰",
|
265306
|
+
lineDownBoldLeftBoldRight: "┱",
|
265307
|
+
lineDownBoldLeftRightBold: "┲",
|
265308
|
+
lineDownLeftRightBold: "┮",
|
265309
|
+
lineDownLeftBoldRight: "┭",
|
265310
|
+
lineDownDoubleLeftDoubleRightDouble: "╦",
|
265311
|
+
lineDownDoubleLeftRight: "╥",
|
265312
|
+
lineDownLeftDoubleRightDouble: "╤",
|
265313
|
+
lineUpLeftRight: "┴",
|
265314
|
+
lineUpBoldLeftBoldRightBold: "┻",
|
265315
|
+
lineUpLeftBoldRightBold: "┷",
|
265316
|
+
lineUpBoldLeftRight: "┸",
|
265317
|
+
lineUpBoldLeftBoldRight: "┹",
|
265318
|
+
lineUpBoldLeftRightBold: "┺",
|
265319
|
+
lineUpLeftRightBold: "┶",
|
265320
|
+
lineUpLeftBoldRight: "┵",
|
265321
|
+
lineUpDoubleLeftDoubleRightDouble: "╩",
|
265322
|
+
lineUpDoubleLeftRight: "╨",
|
265323
|
+
lineUpLeftDoubleRightDouble: "╧",
|
265324
|
+
lineUpDownLeftRight: "┼",
|
265325
|
+
lineUpBoldDownBoldLeftBoldRightBold: "╋",
|
265326
|
+
lineUpDownBoldLeftBoldRightBold: "╈",
|
265327
|
+
lineUpBoldDownLeftBoldRightBold: "╇",
|
265328
|
+
lineUpBoldDownBoldLeftRightBold: "╊",
|
265329
|
+
lineUpBoldDownBoldLeftBoldRight: "╉",
|
265330
|
+
lineUpBoldDownLeftRight: "╀",
|
265331
|
+
lineUpDownBoldLeftRight: "╁",
|
265332
|
+
lineUpDownLeftBoldRight: "┽",
|
265333
|
+
lineUpDownLeftRightBold: "┾",
|
265334
|
+
lineUpBoldDownBoldLeftRight: "╂",
|
265335
|
+
lineUpDownLeftBoldRightBold: "┿",
|
265336
|
+
lineUpBoldDownLeftBoldRight: "╃",
|
265337
|
+
lineUpBoldDownLeftRightBold: "╄",
|
265338
|
+
lineUpDownBoldLeftBoldRight: "╅",
|
265339
|
+
lineUpDownBoldLeftRightBold: "╆",
|
265340
|
+
lineUpDoubleDownDoubleLeftDoubleRightDouble: "╬",
|
265341
|
+
lineUpDoubleDownDoubleLeftRight: "╫",
|
265342
|
+
lineUpDownLeftDoubleRightDouble: "╪",
|
265343
|
+
lineCross: "╳",
|
265344
|
+
lineBackslash: "╲",
|
265345
|
+
lineSlash: "╱"
|
265346
|
+
};
|
265347
|
+
var specialMainSymbols2 = {
|
265348
|
+
tick: "✔",
|
265349
|
+
info: "ℹ",
|
265350
|
+
warning: "⚠",
|
265351
|
+
cross: "✘",
|
265352
|
+
squareSmall: "◻",
|
265353
|
+
squareSmallFilled: "◼",
|
265354
|
+
circle: "◯",
|
265355
|
+
circleFilled: "◉",
|
265356
|
+
circleDotted: "◌",
|
265357
|
+
circleDouble: "◎",
|
265358
|
+
circleCircle: "ⓞ",
|
265359
|
+
circleCross: "ⓧ",
|
265360
|
+
circlePipe: "Ⓘ",
|
265361
|
+
radioOn: "◉",
|
265362
|
+
radioOff: "◯",
|
265363
|
+
checkboxOn: "☒",
|
265364
|
+
checkboxOff: "☐",
|
265365
|
+
checkboxCircleOn: "ⓧ",
|
265366
|
+
checkboxCircleOff: "Ⓘ",
|
265367
|
+
pointer: "❯",
|
265368
|
+
triangleUpOutline: "△",
|
265369
|
+
triangleLeft: "◀",
|
265370
|
+
triangleRight: "▶",
|
265371
|
+
lozenge: "◆",
|
265372
|
+
lozengeOutline: "◇",
|
265373
|
+
hamburger: "☰",
|
265374
|
+
smiley: "㋡",
|
265375
|
+
mustache: "෴",
|
265376
|
+
star: "★",
|
265377
|
+
play: "▶",
|
265378
|
+
nodejs: "⬢",
|
265379
|
+
oneSeventh: "⅐",
|
265380
|
+
oneNinth: "⅑",
|
265381
|
+
oneTenth: "⅒"
|
265382
|
+
};
|
265383
|
+
var specialFallbackSymbols2 = {
|
265384
|
+
tick: "√",
|
265385
|
+
info: "i",
|
265386
|
+
warning: "‼",
|
265387
|
+
cross: "×",
|
265388
|
+
squareSmall: "□",
|
265389
|
+
squareSmallFilled: "■",
|
265390
|
+
circle: "( )",
|
265391
|
+
circleFilled: "(*)",
|
265392
|
+
circleDotted: "( )",
|
265393
|
+
circleDouble: "( )",
|
265394
|
+
circleCircle: "(○)",
|
265395
|
+
circleCross: "(×)",
|
265396
|
+
circlePipe: "(│)",
|
265397
|
+
radioOn: "(*)",
|
265398
|
+
radioOff: "( )",
|
265399
|
+
checkboxOn: "[×]",
|
265400
|
+
checkboxOff: "[ ]",
|
265401
|
+
checkboxCircleOn: "(×)",
|
265402
|
+
checkboxCircleOff: "( )",
|
265403
|
+
pointer: ">",
|
265404
|
+
triangleUpOutline: "∆",
|
265405
|
+
triangleLeft: "◄",
|
265406
|
+
triangleRight: "►",
|
265407
|
+
lozenge: "♦",
|
265408
|
+
lozengeOutline: "◊",
|
265409
|
+
hamburger: "≡",
|
265410
|
+
smiley: "☺",
|
265411
|
+
mustache: "┌─┐",
|
265412
|
+
star: "✶",
|
265413
|
+
play: "►",
|
265414
|
+
nodejs: "♦",
|
265415
|
+
oneSeventh: "1/7",
|
265416
|
+
oneNinth: "1/9",
|
265417
|
+
oneTenth: "1/10"
|
265418
|
+
};
|
265419
|
+
var mainSymbols2 = { ...common2, ...specialMainSymbols2 };
|
265420
|
+
var fallbackSymbols2 = {
|
265421
|
+
...common2,
|
265422
|
+
...specialFallbackSymbols2
|
265423
|
+
};
|
265424
|
+
var shouldUseMain2 = isUnicodeSupported3();
|
265425
|
+
var figures2 = shouldUseMain2 ? mainSymbols2 : fallbackSymbols2;
|
265426
|
+
var esm_default2 = figures2;
|
265427
|
+
var replacements2 = Object.entries(specialMainSymbols2);
|
265428
|
+
|
265429
|
+
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/theme.js
|
265430
|
+
var defaultTheme2 = {
|
265431
|
+
prefix: {
|
265432
|
+
idle: import_yoctocolors_cjs2.default.blue("?"),
|
265433
|
+
done: import_yoctocolors_cjs2.default.green(esm_default2.tick)
|
265434
|
+
},
|
265435
|
+
spinner: {
|
265436
|
+
interval: 80,
|
265437
|
+
frames: ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"].map((frame) => import_yoctocolors_cjs2.default.yellow(frame))
|
265438
|
+
},
|
265439
|
+
style: {
|
265440
|
+
answer: import_yoctocolors_cjs2.default.cyan,
|
265441
|
+
message: import_yoctocolors_cjs2.default.bold,
|
265442
|
+
error: (text2) => import_yoctocolors_cjs2.default.red(`> ${text2}`),
|
265443
|
+
defaultAnswer: (text2) => import_yoctocolors_cjs2.default.dim(`(${text2})`),
|
265444
|
+
help: import_yoctocolors_cjs2.default.dim,
|
265445
|
+
highlight: import_yoctocolors_cjs2.default.cyan,
|
265446
|
+
key: (text2) => import_yoctocolors_cjs2.default.cyan(import_yoctocolors_cjs2.default.bold(`<${text2}>`))
|
265447
|
+
}
|
265448
|
+
};
|
265449
|
+
|
265450
|
+
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/make-theme.js
|
265451
|
+
function isPlainObject3(value4) {
|
265452
|
+
if (typeof value4 !== "object" || value4 === null)
|
265453
|
+
return false;
|
265454
|
+
let proto = value4;
|
265455
|
+
while (Object.getPrototypeOf(proto) !== null) {
|
265456
|
+
proto = Object.getPrototypeOf(proto);
|
265457
|
+
}
|
265458
|
+
return Object.getPrototypeOf(value4) === proto;
|
265459
|
+
}
|
265460
|
+
function deepMerge3(...objects) {
|
265461
|
+
const output = {};
|
265462
|
+
for (const obj of objects) {
|
265463
|
+
for (const [key2, value4] of Object.entries(obj)) {
|
265464
|
+
const prevValue = output[key2];
|
265465
|
+
output[key2] = isPlainObject3(prevValue) && isPlainObject3(value4) ? deepMerge3(prevValue, value4) : value4;
|
265466
|
+
}
|
265467
|
+
}
|
265468
|
+
return output;
|
265469
|
+
}
|
265470
|
+
function makeTheme2(...themes) {
|
265471
|
+
const themesToMerge = [
|
265472
|
+
defaultTheme2,
|
265473
|
+
...themes.filter((theme) => theme != null)
|
265474
|
+
];
|
265475
|
+
return deepMerge3(...themesToMerge);
|
265476
|
+
}
|
265477
|
+
|
265478
|
+
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/use-prefix.js
|
265479
|
+
function usePrefix2({ status = "idle", theme }) {
|
265480
|
+
const [showLoader, setShowLoader] = useState2(false);
|
265481
|
+
const [tick, setTick] = useState2(0);
|
265482
|
+
const { prefix, spinner: spinner2 } = makeTheme2(theme);
|
265483
|
+
useEffect2(() => {
|
265484
|
+
if (status === "loading") {
|
265485
|
+
let tickInterval;
|
265486
|
+
let inc = -1;
|
265487
|
+
const delayTimeout = setTimeout(AsyncResource5.bind(() => {
|
265488
|
+
setShowLoader(true);
|
265489
|
+
tickInterval = setInterval(AsyncResource5.bind(() => {
|
265490
|
+
inc = inc + 1;
|
265491
|
+
setTick(inc % spinner2.frames.length);
|
265492
|
+
}), spinner2.interval);
|
265493
|
+
}), 300);
|
265494
|
+
return () => {
|
265495
|
+
clearTimeout(delayTimeout);
|
265496
|
+
clearInterval(tickInterval);
|
265497
|
+
};
|
265498
|
+
} else {
|
265499
|
+
setShowLoader(false);
|
265500
|
+
}
|
265501
|
+
}, [status]);
|
265502
|
+
if (showLoader) {
|
265503
|
+
return spinner2.frames[tick];
|
265504
|
+
}
|
265505
|
+
const iconName = status === "loading" ? "idle" : status;
|
265506
|
+
return typeof prefix === "string" ? prefix : prefix[iconName] ?? prefix["idle"];
|
265507
|
+
}
|
265508
|
+
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/use-ref.js
|
265509
|
+
function useRef2(val) {
|
265510
|
+
return useState2({ current: val })[0];
|
265511
|
+
}
|
265512
|
+
|
265513
|
+
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/use-keypress.js
|
265514
|
+
function useKeypress2(userHandler) {
|
265515
|
+
const signal = useRef2(userHandler);
|
265516
|
+
signal.current = userHandler;
|
265517
|
+
useEffect2((rl) => {
|
265518
|
+
let ignore = false;
|
265519
|
+
const handler = withUpdates2((_input, event) => {
|
265520
|
+
if (ignore)
|
265521
|
+
return;
|
265522
|
+
signal.current(event, rl);
|
265523
|
+
});
|
265524
|
+
rl.input.on("keypress", handler);
|
265525
|
+
return () => {
|
265526
|
+
ignore = true;
|
265527
|
+
rl.input.removeListener("keypress", handler);
|
265528
|
+
};
|
265529
|
+
}, []);
|
265530
|
+
}
|
265531
|
+
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/utils.js
|
265532
|
+
var import_cli_width2 = __toESM(require_cli_width(), 1);
|
265533
|
+
var import_wrap_ansi2 = __toESM(require_wrap_ansi(), 1);
|
265534
|
+
function breakLines2(content, width) {
|
265535
|
+
return content.split(`
|
265536
|
+
`).flatMap((line) => import_wrap_ansi2.default(line, width, { trim: false, hard: true }).split(`
|
265537
|
+
`).map((str) => str.trimEnd())).join(`
|
265538
|
+
`);
|
265539
|
+
}
|
265540
|
+
function readlineWidth2() {
|
265541
|
+
return import_cli_width2.default({ defaultWidth: 80, output: readline3().output });
|
265542
|
+
}
|
265543
|
+
|
265544
|
+
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
|
265545
|
+
var import_mute_stream2 = __toESM(require_lib(), 1);
|
265546
|
+
import * as readline4 from "node:readline";
|
265547
|
+
import { AsyncResource as AsyncResource6 } from "node:async_hooks";
|
265548
|
+
|
265549
|
+
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/screen-manager.js
|
265066
265550
|
var import_ansi_escapes2 = __toESM(require_ansi_escapes(), 1);
|
265551
|
+
import { stripVTControlCharacters as stripVTControlCharacters3 } from "node:util";
|
265552
|
+
var height2 = (content) => content.split(`
|
265553
|
+
`).length;
|
265554
|
+
var lastLine2 = (content) => content.split(`
|
265555
|
+
`).pop() ?? "";
|
265556
|
+
function cursorDown2(n6) {
|
265557
|
+
return n6 > 0 ? import_ansi_escapes2.default.cursorDown(n6) : "";
|
265558
|
+
}
|
265559
|
+
|
265560
|
+
class ScreenManager2 {
|
265561
|
+
height = 0;
|
265562
|
+
extraLinesUnderPrompt = 0;
|
265563
|
+
cursorPos;
|
265564
|
+
rl;
|
265565
|
+
constructor(rl) {
|
265566
|
+
this.rl = rl;
|
265567
|
+
this.cursorPos = rl.getCursorPos();
|
265568
|
+
}
|
265569
|
+
write(content) {
|
265570
|
+
this.rl.output.unmute();
|
265571
|
+
this.rl.output.write(content);
|
265572
|
+
this.rl.output.mute();
|
265573
|
+
}
|
265574
|
+
render(content, bottomContent = "") {
|
265575
|
+
const promptLine = lastLine2(content);
|
265576
|
+
const rawPromptLine = stripVTControlCharacters3(promptLine);
|
265577
|
+
let prompt = rawPromptLine;
|
265578
|
+
if (this.rl.line.length > 0) {
|
265579
|
+
prompt = prompt.slice(0, -this.rl.line.length);
|
265580
|
+
}
|
265581
|
+
this.rl.setPrompt(prompt);
|
265582
|
+
this.cursorPos = this.rl.getCursorPos();
|
265583
|
+
const width = readlineWidth2();
|
265584
|
+
content = breakLines2(content, width);
|
265585
|
+
bottomContent = breakLines2(bottomContent, width);
|
265586
|
+
if (rawPromptLine.length % width === 0) {
|
265587
|
+
content += `
|
265588
|
+
`;
|
265589
|
+
}
|
265590
|
+
let output = content + (bottomContent ? `
|
265591
|
+
` + bottomContent : "");
|
265592
|
+
const promptLineUpDiff = Math.floor(rawPromptLine.length / width) - this.cursorPos.rows;
|
265593
|
+
const bottomContentHeight = promptLineUpDiff + (bottomContent ? height2(bottomContent) : 0);
|
265594
|
+
if (bottomContentHeight > 0)
|
265595
|
+
output += import_ansi_escapes2.default.cursorUp(bottomContentHeight);
|
265596
|
+
output += import_ansi_escapes2.default.cursorTo(this.cursorPos.cols);
|
265597
|
+
this.write(cursorDown2(this.extraLinesUnderPrompt) + import_ansi_escapes2.default.eraseLines(this.height) + output);
|
265598
|
+
this.extraLinesUnderPrompt = bottomContentHeight;
|
265599
|
+
this.height = height2(output);
|
265600
|
+
}
|
265601
|
+
checkCursorPos() {
|
265602
|
+
const cursorPos = this.rl.getCursorPos();
|
265603
|
+
if (cursorPos.cols !== this.cursorPos.cols) {
|
265604
|
+
this.write(import_ansi_escapes2.default.cursorTo(cursorPos.cols));
|
265605
|
+
this.cursorPos = cursorPos;
|
265606
|
+
}
|
265607
|
+
}
|
265608
|
+
done({ clearContent }) {
|
265609
|
+
this.rl.setPrompt("");
|
265610
|
+
let output = cursorDown2(this.extraLinesUnderPrompt);
|
265611
|
+
output += clearContent ? import_ansi_escapes2.default.eraseLines(this.height) : `
|
265612
|
+
`;
|
265613
|
+
output += import_ansi_escapes2.default.cursorShow;
|
265614
|
+
this.write(output);
|
265615
|
+
this.rl.close();
|
265616
|
+
}
|
265617
|
+
}
|
265618
|
+
|
265619
|
+
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/promise-polyfill.js
|
265620
|
+
class PromisePolyfill2 extends Promise {
|
265621
|
+
static withResolver() {
|
265622
|
+
let resolve5;
|
265623
|
+
let reject;
|
265624
|
+
const promise = new Promise((res, rej) => {
|
265625
|
+
resolve5 = res;
|
265626
|
+
reject = rej;
|
265627
|
+
});
|
265628
|
+
return { promise, resolve: resolve5, reject };
|
265629
|
+
}
|
265630
|
+
}
|
265631
|
+
|
265632
|
+
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
|
265633
|
+
function getCallSites2() {
|
265634
|
+
const _prepareStackTrace = Error.prepareStackTrace;
|
265635
|
+
let result = [];
|
265636
|
+
try {
|
265637
|
+
Error.prepareStackTrace = (_5, callSites) => {
|
265638
|
+
const callSitesWithoutCurrent = callSites.slice(1);
|
265639
|
+
result = callSitesWithoutCurrent;
|
265640
|
+
return callSitesWithoutCurrent;
|
265641
|
+
};
|
265642
|
+
new Error().stack;
|
265643
|
+
} catch {
|
265644
|
+
return result;
|
265645
|
+
}
|
265646
|
+
Error.prepareStackTrace = _prepareStackTrace;
|
265647
|
+
return result;
|
265648
|
+
}
|
265649
|
+
function createPrompt2(view) {
|
265650
|
+
const callSites = getCallSites2();
|
265651
|
+
const prompt = (config3, context = {}) => {
|
265652
|
+
const { input = process.stdin, signal } = context;
|
265653
|
+
const cleanups = new Set;
|
265654
|
+
const output = new import_mute_stream2.default;
|
265655
|
+
output.pipe(context.output ?? process.stdout);
|
265656
|
+
const rl = readline4.createInterface({
|
265657
|
+
terminal: true,
|
265658
|
+
input,
|
265659
|
+
output
|
265660
|
+
});
|
265661
|
+
const screen = new ScreenManager2(rl);
|
265662
|
+
const { promise, resolve: resolve5, reject } = PromisePolyfill2.withResolver();
|
265663
|
+
const cancel3 = () => reject(new CancelPromptError2);
|
265664
|
+
if (signal) {
|
265665
|
+
const abort = () => reject(new AbortPromptError2({ cause: signal.reason }));
|
265666
|
+
if (signal.aborted) {
|
265667
|
+
abort();
|
265668
|
+
return Object.assign(promise, { cancel: cancel3 });
|
265669
|
+
}
|
265670
|
+
signal.addEventListener("abort", abort);
|
265671
|
+
cleanups.add(() => signal.removeEventListener("abort", abort));
|
265672
|
+
}
|
265673
|
+
cleanups.add(onExit((code2, signal2) => {
|
265674
|
+
reject(new ExitPromptError2(`User force closed the prompt with ${code2} ${signal2}`));
|
265675
|
+
}));
|
265676
|
+
const checkCursorPos = () => screen.checkCursorPos();
|
265677
|
+
rl.input.on("keypress", checkCursorPos);
|
265678
|
+
cleanups.add(() => rl.input.removeListener("keypress", checkCursorPos));
|
265679
|
+
return withHooks2(rl, (cycle) => {
|
265680
|
+
const hooksCleanup = AsyncResource6.bind(() => effectScheduler2.clearAll());
|
265681
|
+
rl.on("close", hooksCleanup);
|
265682
|
+
cleanups.add(() => rl.removeListener("close", hooksCleanup));
|
265683
|
+
cycle(() => {
|
265684
|
+
try {
|
265685
|
+
const nextView = view(config3, (value4) => {
|
265686
|
+
setImmediate(() => resolve5(value4));
|
265687
|
+
});
|
265688
|
+
if (nextView === undefined) {
|
265689
|
+
const callerFilename = callSites[1]?.getFileName?.();
|
265690
|
+
throw new Error(`Prompt functions must return a string.
|
265691
|
+
at ${callerFilename}`);
|
265692
|
+
}
|
265693
|
+
const [content, bottomContent] = typeof nextView === "string" ? [nextView] : nextView;
|
265694
|
+
screen.render(content, bottomContent);
|
265695
|
+
effectScheduler2.run();
|
265696
|
+
} catch (error5) {
|
265697
|
+
reject(error5);
|
265698
|
+
}
|
265699
|
+
});
|
265700
|
+
return Object.assign(promise.then((answer) => {
|
265701
|
+
effectScheduler2.clearAll();
|
265702
|
+
return answer;
|
265703
|
+
}, (error5) => {
|
265704
|
+
effectScheduler2.clearAll();
|
265705
|
+
throw error5;
|
265706
|
+
}).finally(() => {
|
265707
|
+
cleanups.forEach((cleanup) => cleanup());
|
265708
|
+
screen.done({ clearContent: Boolean(context.clearPromptOnDone) });
|
265709
|
+
output.end();
|
265710
|
+
}).then(() => promise), { cancel: cancel3 });
|
265711
|
+
});
|
265712
|
+
};
|
265713
|
+
return prompt;
|
265714
|
+
}
|
265715
|
+
// ../../node_modules/@inquirer/input/dist/esm/index.js
|
265716
|
+
var inputTheme = {
|
265717
|
+
validationFailureMode: "keep"
|
265718
|
+
};
|
265719
|
+
var esm_default3 = createPrompt2((config3, done) => {
|
265720
|
+
const { required, validate: validate3 = () => true } = config3;
|
265721
|
+
const theme = makeTheme2(inputTheme, config3.theme);
|
265722
|
+
const [status, setStatus] = useState2("idle");
|
265723
|
+
const [defaultValue = "", setDefaultValue] = useState2(config3.default);
|
265724
|
+
const [errorMsg, setError] = useState2();
|
265725
|
+
const [value4, setValue] = useState2("");
|
265726
|
+
const prefix = usePrefix2({ status, theme });
|
265727
|
+
useKeypress2(async (key3, rl) => {
|
265728
|
+
if (status !== "idle") {
|
265729
|
+
return;
|
265730
|
+
}
|
265731
|
+
if (isEnterKey2(key3)) {
|
265732
|
+
const answer = value4 || defaultValue;
|
265733
|
+
setStatus("loading");
|
265734
|
+
const isValid2 = required && !answer ? "You must provide a value" : await validate3(answer);
|
265735
|
+
if (isValid2 === true) {
|
265736
|
+
setValue(answer);
|
265737
|
+
setStatus("done");
|
265738
|
+
done(answer);
|
265739
|
+
} else {
|
265740
|
+
if (theme.validationFailureMode === "clear") {
|
265741
|
+
setValue("");
|
265742
|
+
} else {
|
265743
|
+
rl.write(value4);
|
265744
|
+
}
|
265745
|
+
setError(isValid2 || "You must provide a valid value");
|
265746
|
+
setStatus("idle");
|
265747
|
+
}
|
265748
|
+
} else if (isBackspaceKey(key3) && !value4) {
|
265749
|
+
setDefaultValue(undefined);
|
265750
|
+
} else if (key3.name === "tab" && !value4) {
|
265751
|
+
setDefaultValue(undefined);
|
265752
|
+
rl.clearLine(0);
|
265753
|
+
rl.write(defaultValue);
|
265754
|
+
setValue(defaultValue);
|
265755
|
+
} else {
|
265756
|
+
setValue(rl.line);
|
265757
|
+
setError(undefined);
|
265758
|
+
}
|
265759
|
+
});
|
265760
|
+
const message = theme.style.message(config3.message, status);
|
265761
|
+
let formattedValue = value4;
|
265762
|
+
if (typeof config3.transformer === "function") {
|
265763
|
+
formattedValue = config3.transformer(value4, { isFinal: status === "done" });
|
265764
|
+
} else if (status === "done") {
|
265765
|
+
formattedValue = theme.style.answer(value4);
|
265766
|
+
}
|
265767
|
+
let defaultStr;
|
265768
|
+
if (defaultValue && status !== "done" && !value4) {
|
265769
|
+
defaultStr = theme.style.defaultAnswer(defaultValue);
|
265770
|
+
}
|
265771
|
+
let error5 = "";
|
265772
|
+
if (errorMsg) {
|
265773
|
+
error5 = theme.style.error(errorMsg);
|
265774
|
+
}
|
265775
|
+
return [
|
265776
|
+
[prefix, message, defaultStr, formattedValue].filter((v6) => v6 !== undefined).join(" "),
|
265777
|
+
error5
|
265778
|
+
];
|
265779
|
+
});
|
265780
|
+
|
265781
|
+
// src/prompts/smart-contract-set/subgraph-name.prompt.ts
|
265782
|
+
async function subgraphNamePrompt({
|
265783
|
+
defaultName,
|
265784
|
+
env: env2,
|
265785
|
+
accept
|
265786
|
+
}) {
|
265787
|
+
const defaultSubgraphName = defaultName ? sanitizeName(defaultName) : undefined;
|
265788
|
+
if (accept) {
|
265789
|
+
return defaultSubgraphName ?? env2.SETTLEMINT_THEGRAPH_DEFAULT_SUBGRAPH;
|
265790
|
+
}
|
265791
|
+
const subgraphName = await esm_default3({
|
265792
|
+
message: "What is the name of your subgraph?",
|
265793
|
+
default: defaultSubgraphName,
|
265794
|
+
required: true
|
265795
|
+
});
|
265796
|
+
return sanitizeName(subgraphName);
|
265797
|
+
}
|
265798
|
+
|
265799
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/key.js
|
265800
|
+
var isUpKey = (key3) => key3.name === "up" || key3.name === "k" || key3.ctrl && key3.name === "p";
|
265801
|
+
var isDownKey = (key3) => key3.name === "down" || key3.name === "j" || key3.ctrl && key3.name === "n";
|
265802
|
+
var isBackspaceKey2 = (key3) => key3.name === "backspace";
|
265803
|
+
var isNumberKey = (key3) => "123456789".includes(key3.name);
|
265804
|
+
var isEnterKey3 = (key3) => key3.name === "enter" || key3.name === "return";
|
265805
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/errors.js
|
265806
|
+
class AbortPromptError3 extends Error {
|
265807
|
+
name = "AbortPromptError";
|
265808
|
+
message = "Prompt was aborted";
|
265809
|
+
constructor(options) {
|
265810
|
+
super();
|
265811
|
+
this.cause = options?.cause;
|
265812
|
+
}
|
265813
|
+
}
|
265814
|
+
|
265815
|
+
class CancelPromptError3 extends Error {
|
265816
|
+
name = "CancelPromptError";
|
265817
|
+
message = "Prompt was canceled";
|
265818
|
+
}
|
265819
|
+
|
265820
|
+
class ExitPromptError3 extends Error {
|
265821
|
+
name = "ExitPromptError";
|
265822
|
+
}
|
265823
|
+
|
265824
|
+
class HookError3 extends Error {
|
265825
|
+
name = "HookError";
|
265826
|
+
}
|
265827
|
+
|
265828
|
+
class ValidationError3 extends Error {
|
265829
|
+
name = "ValidationError";
|
265830
|
+
}
|
265831
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/use-prefix.js
|
265832
|
+
import { AsyncResource as AsyncResource8 } from "node:async_hooks";
|
265833
|
+
|
265834
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/hook-engine.js
|
265835
|
+
import { AsyncLocalStorage as AsyncLocalStorage3, AsyncResource as AsyncResource7 } from "node:async_hooks";
|
265836
|
+
var hookStorage3 = new AsyncLocalStorage3;
|
265837
|
+
function createStore3(rl) {
|
265838
|
+
const store = {
|
265839
|
+
rl,
|
265840
|
+
hooks: [],
|
265841
|
+
hooksCleanup: [],
|
265842
|
+
hooksEffect: [],
|
265843
|
+
index: 0,
|
265844
|
+
handleChange() {
|
265845
|
+
}
|
265846
|
+
};
|
265847
|
+
return store;
|
265848
|
+
}
|
265849
|
+
function withHooks3(rl, cb) {
|
265850
|
+
const store = createStore3(rl);
|
265851
|
+
return hookStorage3.run(store, () => {
|
265852
|
+
function cycle(render) {
|
265853
|
+
store.handleChange = () => {
|
265854
|
+
store.index = 0;
|
265855
|
+
render();
|
265856
|
+
};
|
265857
|
+
store.handleChange();
|
265858
|
+
}
|
265859
|
+
return cb(cycle);
|
265860
|
+
});
|
265861
|
+
}
|
265862
|
+
function getStore3() {
|
265863
|
+
const store = hookStorage3.getStore();
|
265864
|
+
if (!store) {
|
265865
|
+
throw new HookError3("[Inquirer] Hook functions can only be called from within a prompt");
|
265866
|
+
}
|
265867
|
+
return store;
|
265868
|
+
}
|
265869
|
+
function readline5() {
|
265870
|
+
return getStore3().rl;
|
265871
|
+
}
|
265872
|
+
function withUpdates3(fn) {
|
265873
|
+
const wrapped = (...args) => {
|
265874
|
+
const store = getStore3();
|
265875
|
+
let shouldUpdate = false;
|
265876
|
+
const oldHandleChange = store.handleChange;
|
265877
|
+
store.handleChange = () => {
|
265878
|
+
shouldUpdate = true;
|
265879
|
+
};
|
265880
|
+
const returnValue = fn(...args);
|
265881
|
+
if (shouldUpdate) {
|
265882
|
+
oldHandleChange();
|
265883
|
+
}
|
265884
|
+
store.handleChange = oldHandleChange;
|
265885
|
+
return returnValue;
|
265886
|
+
};
|
265887
|
+
return AsyncResource7.bind(wrapped);
|
265888
|
+
}
|
265889
|
+
function withPointer3(cb) {
|
265890
|
+
const store = getStore3();
|
265891
|
+
const { index } = store;
|
265892
|
+
const pointer = {
|
265893
|
+
get() {
|
265894
|
+
return store.hooks[index];
|
265895
|
+
},
|
265896
|
+
set(value4) {
|
265897
|
+
store.hooks[index] = value4;
|
265898
|
+
},
|
265899
|
+
initialized: index in store.hooks
|
265900
|
+
};
|
265901
|
+
const returnValue = cb(pointer);
|
265902
|
+
store.index++;
|
265903
|
+
return returnValue;
|
265904
|
+
}
|
265905
|
+
function handleChange3() {
|
265906
|
+
getStore3().handleChange();
|
265907
|
+
}
|
265908
|
+
var effectScheduler3 = {
|
265909
|
+
queue(cb) {
|
265910
|
+
const store = getStore3();
|
265911
|
+
const { index } = store;
|
265912
|
+
store.hooksEffect.push(() => {
|
265913
|
+
store.hooksCleanup[index]?.();
|
265914
|
+
const cleanFn = cb(readline5());
|
265915
|
+
if (cleanFn != null && typeof cleanFn !== "function") {
|
265916
|
+
throw new ValidationError3("useEffect return value must be a cleanup function or nothing.");
|
265917
|
+
}
|
265918
|
+
store.hooksCleanup[index] = cleanFn;
|
265919
|
+
});
|
265920
|
+
},
|
265921
|
+
run() {
|
265922
|
+
const store = getStore3();
|
265923
|
+
withUpdates3(() => {
|
265924
|
+
store.hooksEffect.forEach((effect) => {
|
265925
|
+
effect();
|
265926
|
+
});
|
265927
|
+
store.hooksEffect.length = 0;
|
265928
|
+
})();
|
265929
|
+
},
|
265930
|
+
clearAll() {
|
265931
|
+
const store = getStore3();
|
265932
|
+
store.hooksCleanup.forEach((cleanFn) => {
|
265933
|
+
cleanFn?.();
|
265934
|
+
});
|
265935
|
+
store.hooksEffect.length = 0;
|
265936
|
+
store.hooksCleanup.length = 0;
|
265937
|
+
}
|
265938
|
+
};
|
265939
|
+
|
265940
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/use-state.js
|
265941
|
+
function useState3(defaultValue) {
|
265942
|
+
return withPointer3((pointer) => {
|
265943
|
+
const setFn = (newValue) => {
|
265944
|
+
if (pointer.get() !== newValue) {
|
265945
|
+
pointer.set(newValue);
|
265946
|
+
handleChange3();
|
265947
|
+
}
|
265948
|
+
};
|
265949
|
+
if (pointer.initialized) {
|
265950
|
+
return [pointer.get(), setFn];
|
265951
|
+
}
|
265952
|
+
const value4 = typeof defaultValue === "function" ? defaultValue() : defaultValue;
|
265953
|
+
pointer.set(value4);
|
265954
|
+
return [value4, setFn];
|
265955
|
+
});
|
265956
|
+
}
|
265957
|
+
|
265958
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/use-effect.js
|
265959
|
+
function useEffect3(cb, depArray) {
|
265960
|
+
withPointer3((pointer) => {
|
265961
|
+
const oldDeps = pointer.get();
|
265962
|
+
const hasChanged = !Array.isArray(oldDeps) || depArray.some((dep, i6) => !Object.is(dep, oldDeps[i6]));
|
265963
|
+
if (hasChanged) {
|
265964
|
+
effectScheduler3.queue(cb);
|
265965
|
+
}
|
265966
|
+
pointer.set(depArray);
|
265967
|
+
});
|
265968
|
+
}
|
265969
|
+
|
265970
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/theme.js
|
265971
|
+
var import_yoctocolors_cjs3 = __toESM(require_yoctocolors_cjs(), 1);
|
265972
|
+
var defaultTheme3 = {
|
265973
|
+
prefix: {
|
265974
|
+
idle: import_yoctocolors_cjs3.default.blue("?"),
|
265975
|
+
done: import_yoctocolors_cjs3.default.green(esm_default2.tick)
|
265976
|
+
},
|
265977
|
+
spinner: {
|
265978
|
+
interval: 80,
|
265979
|
+
frames: ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"].map((frame) => import_yoctocolors_cjs3.default.yellow(frame))
|
265980
|
+
},
|
265981
|
+
style: {
|
265982
|
+
answer: import_yoctocolors_cjs3.default.cyan,
|
265983
|
+
message: import_yoctocolors_cjs3.default.bold,
|
265984
|
+
error: (text2) => import_yoctocolors_cjs3.default.red(`> ${text2}`),
|
265985
|
+
defaultAnswer: (text2) => import_yoctocolors_cjs3.default.dim(`(${text2})`),
|
265986
|
+
help: import_yoctocolors_cjs3.default.dim,
|
265987
|
+
highlight: import_yoctocolors_cjs3.default.cyan,
|
265988
|
+
key: (text2) => import_yoctocolors_cjs3.default.cyan(import_yoctocolors_cjs3.default.bold(`<${text2}>`))
|
265989
|
+
}
|
265990
|
+
};
|
265991
|
+
|
265992
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/make-theme.js
|
265993
|
+
function isPlainObject4(value4) {
|
265994
|
+
if (typeof value4 !== "object" || value4 === null)
|
265995
|
+
return false;
|
265996
|
+
let proto = value4;
|
265997
|
+
while (Object.getPrototypeOf(proto) !== null) {
|
265998
|
+
proto = Object.getPrototypeOf(proto);
|
265999
|
+
}
|
266000
|
+
return Object.getPrototypeOf(value4) === proto;
|
266001
|
+
}
|
266002
|
+
function deepMerge4(...objects) {
|
266003
|
+
const output = {};
|
266004
|
+
for (const obj of objects) {
|
266005
|
+
for (const [key3, value4] of Object.entries(obj)) {
|
266006
|
+
const prevValue = output[key3];
|
266007
|
+
output[key3] = isPlainObject4(prevValue) && isPlainObject4(value4) ? deepMerge4(prevValue, value4) : value4;
|
266008
|
+
}
|
266009
|
+
}
|
266010
|
+
return output;
|
266011
|
+
}
|
266012
|
+
function makeTheme3(...themes) {
|
266013
|
+
const themesToMerge = [
|
266014
|
+
defaultTheme3,
|
266015
|
+
...themes.filter((theme) => theme != null)
|
266016
|
+
];
|
266017
|
+
return deepMerge4(...themesToMerge);
|
266018
|
+
}
|
266019
|
+
|
266020
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/use-prefix.js
|
266021
|
+
function usePrefix3({ status = "idle", theme }) {
|
266022
|
+
const [showLoader, setShowLoader] = useState3(false);
|
266023
|
+
const [tick, setTick] = useState3(0);
|
266024
|
+
const { prefix, spinner: spinner2 } = makeTheme3(theme);
|
266025
|
+
useEffect3(() => {
|
266026
|
+
if (status === "loading") {
|
266027
|
+
let tickInterval;
|
266028
|
+
let inc = -1;
|
266029
|
+
const delayTimeout = setTimeout(AsyncResource8.bind(() => {
|
266030
|
+
setShowLoader(true);
|
266031
|
+
tickInterval = setInterval(AsyncResource8.bind(() => {
|
266032
|
+
inc = inc + 1;
|
266033
|
+
setTick(inc % spinner2.frames.length);
|
266034
|
+
}), spinner2.interval);
|
266035
|
+
}), 300);
|
266036
|
+
return () => {
|
266037
|
+
clearTimeout(delayTimeout);
|
266038
|
+
clearInterval(tickInterval);
|
266039
|
+
};
|
266040
|
+
} else {
|
266041
|
+
setShowLoader(false);
|
266042
|
+
}
|
266043
|
+
}, [status]);
|
266044
|
+
if (showLoader) {
|
266045
|
+
return spinner2.frames[tick];
|
266046
|
+
}
|
266047
|
+
const iconName = status === "loading" ? "idle" : status;
|
266048
|
+
return typeof prefix === "string" ? prefix : prefix[iconName] ?? prefix["idle"];
|
266049
|
+
}
|
266050
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/use-memo.js
|
266051
|
+
function useMemo(fn, dependencies) {
|
266052
|
+
return withPointer3((pointer) => {
|
266053
|
+
const prev = pointer.get();
|
266054
|
+
if (!prev || prev.dependencies.length !== dependencies.length || prev.dependencies.some((dep, i6) => dep !== dependencies[i6])) {
|
266055
|
+
const value4 = fn();
|
266056
|
+
pointer.set({ value: value4, dependencies });
|
266057
|
+
return value4;
|
266058
|
+
}
|
266059
|
+
return prev.value;
|
266060
|
+
});
|
266061
|
+
}
|
266062
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/use-ref.js
|
266063
|
+
function useRef3(val) {
|
266064
|
+
return useState3({ current: val })[0];
|
266065
|
+
}
|
266066
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/use-keypress.js
|
266067
|
+
function useKeypress3(userHandler) {
|
266068
|
+
const signal = useRef3(userHandler);
|
266069
|
+
signal.current = userHandler;
|
266070
|
+
useEffect3((rl) => {
|
266071
|
+
let ignore = false;
|
266072
|
+
const handler = withUpdates3((_input, event) => {
|
266073
|
+
if (ignore)
|
266074
|
+
return;
|
266075
|
+
signal.current(event, rl);
|
266076
|
+
});
|
266077
|
+
rl.input.on("keypress", handler);
|
266078
|
+
return () => {
|
266079
|
+
ignore = true;
|
266080
|
+
rl.input.removeListener("keypress", handler);
|
266081
|
+
};
|
266082
|
+
}, []);
|
266083
|
+
}
|
266084
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/utils.js
|
266085
|
+
var import_cli_width3 = __toESM(require_cli_width(), 1);
|
266086
|
+
var import_wrap_ansi3 = __toESM(require_wrap_ansi(), 1);
|
266087
|
+
function breakLines3(content, width) {
|
266088
|
+
return content.split(`
|
266089
|
+
`).flatMap((line) => import_wrap_ansi3.default(line, width, { trim: false, hard: true }).split(`
|
266090
|
+
`).map((str) => str.trimEnd())).join(`
|
266091
|
+
`);
|
266092
|
+
}
|
266093
|
+
function readlineWidth3() {
|
266094
|
+
return import_cli_width3.default({ defaultWidth: 80, output: readline5().output });
|
266095
|
+
}
|
266096
|
+
|
266097
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/pagination/lines.js
|
266098
|
+
function split2(content, width) {
|
266099
|
+
return breakLines3(content, width).split(`
|
266100
|
+
`);
|
266101
|
+
}
|
266102
|
+
function rotate(count, items) {
|
266103
|
+
const max = items.length;
|
266104
|
+
const offset = (count % max + max) % max;
|
266105
|
+
return [...items.slice(offset), ...items.slice(0, offset)];
|
266106
|
+
}
|
266107
|
+
function lines({ items, width, renderItem, active, position: requested, pageSize }) {
|
266108
|
+
const layouts = items.map((item, index) => ({
|
266109
|
+
item,
|
266110
|
+
index,
|
266111
|
+
isActive: index === active
|
266112
|
+
}));
|
266113
|
+
const layoutsInPage = rotate(active - requested, layouts).slice(0, pageSize);
|
266114
|
+
const renderItemAt = (index) => layoutsInPage[index] == null ? [] : split2(renderItem(layoutsInPage[index]), width);
|
266115
|
+
const pageBuffer = Array.from({ length: pageSize });
|
266116
|
+
const activeItem = renderItemAt(requested).slice(0, pageSize);
|
266117
|
+
const position = requested + activeItem.length <= pageSize ? requested : pageSize - activeItem.length;
|
266118
|
+
pageBuffer.splice(position, activeItem.length, ...activeItem);
|
266119
|
+
let bufferPointer = position + activeItem.length;
|
266120
|
+
let layoutPointer = requested + 1;
|
266121
|
+
while (bufferPointer < pageSize && layoutPointer < layoutsInPage.length) {
|
266122
|
+
for (const line of renderItemAt(layoutPointer)) {
|
266123
|
+
pageBuffer[bufferPointer++] = line;
|
266124
|
+
if (bufferPointer >= pageSize)
|
266125
|
+
break;
|
266126
|
+
}
|
266127
|
+
layoutPointer++;
|
266128
|
+
}
|
266129
|
+
bufferPointer = position - 1;
|
266130
|
+
layoutPointer = requested - 1;
|
266131
|
+
while (bufferPointer >= 0 && layoutPointer >= 0) {
|
266132
|
+
for (const line of renderItemAt(layoutPointer).reverse()) {
|
266133
|
+
pageBuffer[bufferPointer--] = line;
|
266134
|
+
if (bufferPointer < 0)
|
266135
|
+
break;
|
266136
|
+
}
|
266137
|
+
layoutPointer--;
|
266138
|
+
}
|
266139
|
+
return pageBuffer.filter((line) => typeof line === "string");
|
266140
|
+
}
|
266141
|
+
|
266142
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/pagination/position.js
|
266143
|
+
function finite({ active, pageSize, total }) {
|
266144
|
+
const middle = Math.floor(pageSize / 2);
|
266145
|
+
if (total <= pageSize || active < middle)
|
266146
|
+
return active;
|
266147
|
+
if (active >= total - middle)
|
266148
|
+
return active + pageSize - total;
|
266149
|
+
return middle;
|
266150
|
+
}
|
266151
|
+
function infinite({ active, lastActive, total, pageSize, pointer }) {
|
266152
|
+
if (total <= pageSize)
|
266153
|
+
return active;
|
266154
|
+
if (lastActive < active && active - lastActive < pageSize) {
|
266155
|
+
return Math.min(Math.floor(pageSize / 2), pointer + active - lastActive);
|
266156
|
+
}
|
266157
|
+
return pointer;
|
266158
|
+
}
|
266159
|
+
|
266160
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/pagination/use-pagination.js
|
266161
|
+
function usePagination({ items, active, renderItem, pageSize, loop = true }) {
|
266162
|
+
const state = useRef3({ position: 0, lastActive: 0 });
|
266163
|
+
const position = loop ? infinite({
|
266164
|
+
active,
|
266165
|
+
lastActive: state.current.lastActive,
|
266166
|
+
total: items.length,
|
266167
|
+
pageSize,
|
266168
|
+
pointer: state.current.position
|
266169
|
+
}) : finite({
|
266170
|
+
active,
|
266171
|
+
total: items.length,
|
266172
|
+
pageSize
|
266173
|
+
});
|
266174
|
+
state.current.position = position;
|
266175
|
+
state.current.lastActive = active;
|
266176
|
+
return lines({
|
266177
|
+
items,
|
266178
|
+
width: readlineWidth3(),
|
266179
|
+
renderItem,
|
266180
|
+
active,
|
266181
|
+
position,
|
266182
|
+
pageSize
|
266183
|
+
}).join(`
|
266184
|
+
`);
|
266185
|
+
}
|
266186
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
|
266187
|
+
var import_mute_stream3 = __toESM(require_lib(), 1);
|
266188
|
+
import * as readline6 from "node:readline";
|
266189
|
+
import { AsyncResource as AsyncResource9 } from "node:async_hooks";
|
266190
|
+
|
266191
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/screen-manager.js
|
266192
|
+
var import_ansi_escapes3 = __toESM(require_ansi_escapes(), 1);
|
266193
|
+
import { stripVTControlCharacters as stripVTControlCharacters4 } from "node:util";
|
266194
|
+
var height3 = (content) => content.split(`
|
266195
|
+
`).length;
|
266196
|
+
var lastLine3 = (content) => content.split(`
|
266197
|
+
`).pop() ?? "";
|
266198
|
+
function cursorDown3(n6) {
|
266199
|
+
return n6 > 0 ? import_ansi_escapes3.default.cursorDown(n6) : "";
|
266200
|
+
}
|
266201
|
+
|
266202
|
+
class ScreenManager3 {
|
266203
|
+
height = 0;
|
266204
|
+
extraLinesUnderPrompt = 0;
|
266205
|
+
cursorPos;
|
266206
|
+
rl;
|
266207
|
+
constructor(rl) {
|
266208
|
+
this.rl = rl;
|
266209
|
+
this.cursorPos = rl.getCursorPos();
|
266210
|
+
}
|
266211
|
+
write(content) {
|
266212
|
+
this.rl.output.unmute();
|
266213
|
+
this.rl.output.write(content);
|
266214
|
+
this.rl.output.mute();
|
266215
|
+
}
|
266216
|
+
render(content, bottomContent = "") {
|
266217
|
+
const promptLine = lastLine3(content);
|
266218
|
+
const rawPromptLine = stripVTControlCharacters4(promptLine);
|
266219
|
+
let prompt = rawPromptLine;
|
266220
|
+
if (this.rl.line.length > 0) {
|
266221
|
+
prompt = prompt.slice(0, -this.rl.line.length);
|
266222
|
+
}
|
266223
|
+
this.rl.setPrompt(prompt);
|
266224
|
+
this.cursorPos = this.rl.getCursorPos();
|
266225
|
+
const width = readlineWidth3();
|
266226
|
+
content = breakLines3(content, width);
|
266227
|
+
bottomContent = breakLines3(bottomContent, width);
|
266228
|
+
if (rawPromptLine.length % width === 0) {
|
266229
|
+
content += `
|
266230
|
+
`;
|
266231
|
+
}
|
266232
|
+
let output = content + (bottomContent ? `
|
266233
|
+
` + bottomContent : "");
|
266234
|
+
const promptLineUpDiff = Math.floor(rawPromptLine.length / width) - this.cursorPos.rows;
|
266235
|
+
const bottomContentHeight = promptLineUpDiff + (bottomContent ? height3(bottomContent) : 0);
|
266236
|
+
if (bottomContentHeight > 0)
|
266237
|
+
output += import_ansi_escapes3.default.cursorUp(bottomContentHeight);
|
266238
|
+
output += import_ansi_escapes3.default.cursorTo(this.cursorPos.cols);
|
266239
|
+
this.write(cursorDown3(this.extraLinesUnderPrompt) + import_ansi_escapes3.default.eraseLines(this.height) + output);
|
266240
|
+
this.extraLinesUnderPrompt = bottomContentHeight;
|
266241
|
+
this.height = height3(output);
|
266242
|
+
}
|
266243
|
+
checkCursorPos() {
|
266244
|
+
const cursorPos = this.rl.getCursorPos();
|
266245
|
+
if (cursorPos.cols !== this.cursorPos.cols) {
|
266246
|
+
this.write(import_ansi_escapes3.default.cursorTo(cursorPos.cols));
|
266247
|
+
this.cursorPos = cursorPos;
|
266248
|
+
}
|
266249
|
+
}
|
266250
|
+
done({ clearContent }) {
|
266251
|
+
this.rl.setPrompt("");
|
266252
|
+
let output = cursorDown3(this.extraLinesUnderPrompt);
|
266253
|
+
output += clearContent ? import_ansi_escapes3.default.eraseLines(this.height) : `
|
266254
|
+
`;
|
266255
|
+
output += import_ansi_escapes3.default.cursorShow;
|
266256
|
+
this.write(output);
|
266257
|
+
this.rl.close();
|
266258
|
+
}
|
266259
|
+
}
|
266260
|
+
|
266261
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/promise-polyfill.js
|
266262
|
+
class PromisePolyfill3 extends Promise {
|
266263
|
+
static withResolver() {
|
266264
|
+
let resolve5;
|
266265
|
+
let reject;
|
266266
|
+
const promise = new Promise((res, rej) => {
|
266267
|
+
resolve5 = res;
|
266268
|
+
reject = rej;
|
266269
|
+
});
|
266270
|
+
return { promise, resolve: resolve5, reject };
|
266271
|
+
}
|
266272
|
+
}
|
266273
|
+
|
266274
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
|
266275
|
+
function getCallSites3() {
|
266276
|
+
const _prepareStackTrace = Error.prepareStackTrace;
|
266277
|
+
let result = [];
|
266278
|
+
try {
|
266279
|
+
Error.prepareStackTrace = (_5, callSites) => {
|
266280
|
+
const callSitesWithoutCurrent = callSites.slice(1);
|
266281
|
+
result = callSitesWithoutCurrent;
|
266282
|
+
return callSitesWithoutCurrent;
|
266283
|
+
};
|
266284
|
+
new Error().stack;
|
266285
|
+
} catch {
|
266286
|
+
return result;
|
266287
|
+
}
|
266288
|
+
Error.prepareStackTrace = _prepareStackTrace;
|
266289
|
+
return result;
|
266290
|
+
}
|
266291
|
+
function createPrompt3(view) {
|
266292
|
+
const callSites = getCallSites3();
|
266293
|
+
const prompt = (config3, context = {}) => {
|
266294
|
+
const { input = process.stdin, signal } = context;
|
266295
|
+
const cleanups = new Set;
|
266296
|
+
const output = new import_mute_stream3.default;
|
266297
|
+
output.pipe(context.output ?? process.stdout);
|
266298
|
+
const rl = readline6.createInterface({
|
266299
|
+
terminal: true,
|
266300
|
+
input,
|
266301
|
+
output
|
266302
|
+
});
|
266303
|
+
const screen = new ScreenManager3(rl);
|
266304
|
+
const { promise, resolve: resolve5, reject } = PromisePolyfill3.withResolver();
|
266305
|
+
const cancel3 = () => reject(new CancelPromptError3);
|
266306
|
+
if (signal) {
|
266307
|
+
const abort = () => reject(new AbortPromptError3({ cause: signal.reason }));
|
266308
|
+
if (signal.aborted) {
|
266309
|
+
abort();
|
266310
|
+
return Object.assign(promise, { cancel: cancel3 });
|
266311
|
+
}
|
266312
|
+
signal.addEventListener("abort", abort);
|
266313
|
+
cleanups.add(() => signal.removeEventListener("abort", abort));
|
266314
|
+
}
|
266315
|
+
cleanups.add(onExit((code2, signal2) => {
|
266316
|
+
reject(new ExitPromptError3(`User force closed the prompt with ${code2} ${signal2}`));
|
266317
|
+
}));
|
266318
|
+
const checkCursorPos = () => screen.checkCursorPos();
|
266319
|
+
rl.input.on("keypress", checkCursorPos);
|
266320
|
+
cleanups.add(() => rl.input.removeListener("keypress", checkCursorPos));
|
266321
|
+
return withHooks3(rl, (cycle) => {
|
266322
|
+
const hooksCleanup = AsyncResource9.bind(() => effectScheduler3.clearAll());
|
266323
|
+
rl.on("close", hooksCleanup);
|
266324
|
+
cleanups.add(() => rl.removeListener("close", hooksCleanup));
|
266325
|
+
cycle(() => {
|
266326
|
+
try {
|
266327
|
+
const nextView = view(config3, (value4) => {
|
266328
|
+
setImmediate(() => resolve5(value4));
|
266329
|
+
});
|
266330
|
+
if (nextView === undefined) {
|
266331
|
+
const callerFilename = callSites[1]?.getFileName?.();
|
266332
|
+
throw new Error(`Prompt functions must return a string.
|
266333
|
+
at ${callerFilename}`);
|
266334
|
+
}
|
266335
|
+
const [content, bottomContent] = typeof nextView === "string" ? [nextView] : nextView;
|
266336
|
+
screen.render(content, bottomContent);
|
266337
|
+
effectScheduler3.run();
|
266338
|
+
} catch (error5) {
|
266339
|
+
reject(error5);
|
266340
|
+
}
|
266341
|
+
});
|
266342
|
+
return Object.assign(promise.then((answer) => {
|
266343
|
+
effectScheduler3.clearAll();
|
266344
|
+
return answer;
|
266345
|
+
}, (error5) => {
|
266346
|
+
effectScheduler3.clearAll();
|
266347
|
+
throw error5;
|
266348
|
+
}).finally(() => {
|
266349
|
+
cleanups.forEach((cleanup) => cleanup());
|
266350
|
+
screen.done({ clearContent: Boolean(context.clearPromptOnDone) });
|
266351
|
+
output.end();
|
266352
|
+
}).then(() => promise), { cancel: cancel3 });
|
266353
|
+
});
|
266354
|
+
};
|
266355
|
+
return prompt;
|
266356
|
+
}
|
266357
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/Separator.js
|
266358
|
+
var import_yoctocolors_cjs4 = __toESM(require_yoctocolors_cjs(), 1);
|
266359
|
+
class Separator {
|
266360
|
+
separator = import_yoctocolors_cjs4.default.dim(Array.from({ length: 15 }).join(esm_default2.line));
|
266361
|
+
type = "separator";
|
266362
|
+
constructor(separator) {
|
266363
|
+
if (separator) {
|
266364
|
+
this.separator = separator;
|
266365
|
+
}
|
266366
|
+
}
|
266367
|
+
static isSeparator(choice) {
|
266368
|
+
return Boolean(choice && typeof choice === "object" && "type" in choice && choice.type === "separator");
|
266369
|
+
}
|
266370
|
+
}
|
266371
|
+
// ../../node_modules/@inquirer/select/dist/esm/index.js
|
266372
|
+
var import_yoctocolors_cjs5 = __toESM(require_yoctocolors_cjs(), 1);
|
266373
|
+
var import_ansi_escapes4 = __toESM(require_ansi_escapes(), 1);
|
265067
266374
|
var selectTheme = {
|
265068
|
-
icon: { cursor:
|
266375
|
+
icon: { cursor: esm_default2.pointer },
|
265069
266376
|
style: {
|
265070
|
-
disabled: (text2) =>
|
265071
|
-
description: (text2) =>
|
266377
|
+
disabled: (text2) => import_yoctocolors_cjs5.default.dim(`- ${text2}`),
|
266378
|
+
description: (text2) => import_yoctocolors_cjs5.default.cyan(text2)
|
265072
266379
|
},
|
265073
266380
|
helpMode: "auto"
|
265074
266381
|
};
|
@@ -265097,19 +266404,19 @@ function normalizeChoices(choices) {
|
|
265097
266404
|
};
|
265098
266405
|
});
|
265099
266406
|
}
|
265100
|
-
var
|
266407
|
+
var esm_default4 = createPrompt3((config3, done) => {
|
265101
266408
|
const { loop = true, pageSize = 7 } = config3;
|
265102
|
-
const firstRender =
|
265103
|
-
const theme =
|
265104
|
-
const [status, setStatus] =
|
265105
|
-
const prefix =
|
265106
|
-
const searchTimeoutRef =
|
266409
|
+
const firstRender = useRef3(true);
|
266410
|
+
const theme = makeTheme3(selectTheme, config3.theme);
|
266411
|
+
const [status, setStatus] = useState3("idle");
|
266412
|
+
const prefix = usePrefix3({ status, theme });
|
266413
|
+
const searchTimeoutRef = useRef3();
|
265107
266414
|
const items = useMemo(() => normalizeChoices(config3.choices), [config3.choices]);
|
265108
266415
|
const bounds = useMemo(() => {
|
265109
266416
|
const first = items.findIndex(isSelectable);
|
265110
266417
|
const last = items.findLastIndex(isSelectable);
|
265111
266418
|
if (first === -1) {
|
265112
|
-
throw new
|
266419
|
+
throw new ValidationError3("[select prompt] No selectable choices. All choices are disabled.");
|
265113
266420
|
}
|
265114
266421
|
return { first, last };
|
265115
266422
|
}, [items]);
|
@@ -265118,31 +266425,31 @@ var esm_default2 = createPrompt((config3, done) => {
|
|
265118
266425
|
return -1;
|
265119
266426
|
return items.findIndex((item) => isSelectable(item) && item.value === config3.default);
|
265120
266427
|
}, [config3.default, items]);
|
265121
|
-
const [active, setActive] =
|
266428
|
+
const [active, setActive] = useState3(defaultItemIndex === -1 ? bounds.first : defaultItemIndex);
|
265122
266429
|
const selectedChoice = items[active];
|
265123
|
-
|
266430
|
+
useKeypress3((key4, rl) => {
|
265124
266431
|
clearTimeout(searchTimeoutRef.current);
|
265125
|
-
if (
|
266432
|
+
if (isEnterKey3(key4)) {
|
265126
266433
|
setStatus("done");
|
265127
266434
|
done(selectedChoice.value);
|
265128
|
-
} else if (isUpKey(
|
266435
|
+
} else if (isUpKey(key4) || isDownKey(key4)) {
|
265129
266436
|
rl.clearLine(0);
|
265130
|
-
if (loop || isUpKey(
|
265131
|
-
const offset = isUpKey(
|
266437
|
+
if (loop || isUpKey(key4) && active !== bounds.first || isDownKey(key4) && active !== bounds.last) {
|
266438
|
+
const offset = isUpKey(key4) ? -1 : 1;
|
265132
266439
|
let next = active;
|
265133
266440
|
do {
|
265134
266441
|
next = (next + offset + items.length) % items.length;
|
265135
266442
|
} while (!isSelectable(items[next]));
|
265136
266443
|
setActive(next);
|
265137
266444
|
}
|
265138
|
-
} else if (isNumberKey(
|
266445
|
+
} else if (isNumberKey(key4)) {
|
265139
266446
|
rl.clearLine(0);
|
265140
|
-
const position = Number(
|
266447
|
+
const position = Number(key4.name) - 1;
|
265141
266448
|
const item = items[position];
|
265142
266449
|
if (item != null && isSelectable(item)) {
|
265143
266450
|
setActive(position);
|
265144
266451
|
}
|
265145
|
-
} else if (
|
266452
|
+
} else if (isBackspaceKey2(key4)) {
|
265146
266453
|
rl.clearLine(0);
|
265147
266454
|
} else {
|
265148
266455
|
const searchTerm = rl.line.toLowerCase();
|
@@ -265159,7 +266466,7 @@ var esm_default2 = createPrompt((config3, done) => {
|
|
265159
266466
|
}, 700);
|
265160
266467
|
}
|
265161
266468
|
});
|
265162
|
-
|
266469
|
+
useEffect3(() => () => {
|
265163
266470
|
clearTimeout(searchTimeoutRef.current);
|
265164
266471
|
}, []);
|
265165
266472
|
const message = theme.style.message(config3.message, status);
|
@@ -265198,16 +266505,24 @@ ${theme.style.help("(Use arrow keys to reveal more choices)")}`;
|
|
265198
266505
|
const choiceDescription = selectedChoice.description ? `
|
265199
266506
|
${theme.style.description(selectedChoice.description)}` : ``;
|
265200
266507
|
return `${[prefix, message, helpTipTop].filter(Boolean).join(" ")}
|
265201
|
-
${page}${helpTipBottom}${choiceDescription}${
|
266508
|
+
${page}${helpTipBottom}${choiceDescription}${import_ansi_escapes4.default.cursorHide}`;
|
265202
266509
|
});
|
265203
266510
|
|
265204
266511
|
// src/prompts/smart-contract-set/subgraph.prompt.ts
|
265205
266512
|
var ALL = "All";
|
265206
|
-
|
265207
|
-
|
266513
|
+
var NEW = "New subgraph";
|
266514
|
+
async function subgraphPrompt({
|
266515
|
+
env: env2,
|
266516
|
+
accept,
|
266517
|
+
message,
|
266518
|
+
allowAll = false,
|
266519
|
+
allowNew = false,
|
266520
|
+
isCi = is_in_ci_default
|
266521
|
+
}) {
|
266522
|
+
const autoAccept = isCi || !!accept;
|
265208
266523
|
const subgraphNames = env2.SETTLEMINT_THEGRAPH_SUBGRAPHS_ENDPOINTS?.map((endpoint) => endpoint.split("/").pop()).filter(Boolean) ?? [];
|
265209
266524
|
if (autoAccept) {
|
265210
|
-
return subgraphNames;
|
266525
|
+
return allowAll ? subgraphNames : env2.SETTLEMINT_THEGRAPH_DEFAULT_SUBGRAPH ? [env2.SETTLEMINT_THEGRAPH_DEFAULT_SUBGRAPH] : [];
|
265211
266526
|
}
|
265212
266527
|
if (subgraphNames.length === 0) {
|
265213
266528
|
cancel2("No subgraphs found");
|
@@ -265215,17 +266530,43 @@ async function subgraphPrompt(env2, accept) {
|
|
265215
266530
|
if (subgraphNames.length === 1) {
|
265216
266531
|
return subgraphNames;
|
265217
266532
|
}
|
265218
|
-
const
|
265219
|
-
|
265220
|
-
choices
|
266533
|
+
const choices = subgraphNames.slice().sort();
|
266534
|
+
if (allowAll) {
|
266535
|
+
choices.unshift(ALL);
|
266536
|
+
}
|
266537
|
+
if (allowNew) {
|
266538
|
+
choices.unshift(NEW);
|
266539
|
+
}
|
266540
|
+
let defaultChoice;
|
266541
|
+
if (allowAll) {
|
266542
|
+
defaultChoice = ALL;
|
266543
|
+
} else if (allowNew) {
|
266544
|
+
defaultChoice = env2.SETTLEMINT_THEGRAPH_DEFAULT_SUBGRAPH ?? NEW;
|
266545
|
+
} else {
|
266546
|
+
defaultChoice = env2.SETTLEMINT_THEGRAPH_DEFAULT_SUBGRAPH ?? subgraphNames[0];
|
266547
|
+
}
|
266548
|
+
const subgraphName = await esm_default4({
|
266549
|
+
message,
|
266550
|
+
choices: choices.map((name3) => ({
|
265221
266551
|
name: name3,
|
265222
266552
|
value: name3
|
265223
266553
|
})),
|
265224
|
-
default:
|
266554
|
+
default: defaultChoice
|
265225
266555
|
});
|
265226
266556
|
if (!subgraphName) {
|
265227
266557
|
cancel2("No subgraph selected");
|
265228
266558
|
}
|
266559
|
+
if (subgraphName === NEW) {
|
266560
|
+
const newSubgraphName = await subgraphNamePrompt({
|
266561
|
+
defaultName: "",
|
266562
|
+
env: env2,
|
266563
|
+
accept: autoAccept
|
266564
|
+
});
|
266565
|
+
if (!newSubgraphName) {
|
266566
|
+
return [];
|
266567
|
+
}
|
266568
|
+
return [newSubgraphName];
|
266569
|
+
}
|
265229
266570
|
return subgraphName === ALL ? subgraphNames : [subgraphName];
|
265230
266571
|
}
|
265231
266572
|
|
@@ -265486,7 +266827,12 @@ function codegenCommand() {
|
|
265486
266827
|
intro("Generating GraphQL types and queries for your dApp");
|
265487
266828
|
const env2 = await loadEnv(true, !!prod);
|
265488
266829
|
if (!Array.isArray(thegraphSubgraphNames)) {
|
265489
|
-
thegraphSubgraphNames = await subgraphPrompt(
|
266830
|
+
thegraphSubgraphNames = await subgraphPrompt({
|
266831
|
+
env: env2,
|
266832
|
+
accept: true,
|
266833
|
+
message: "Which The Graph subgraph do you want to generate types for?",
|
266834
|
+
allowAll: true
|
266835
|
+
});
|
265490
266836
|
}
|
265491
266837
|
const { hasura, portal, thegraph, blockscout } = await spinner({
|
265492
266838
|
startMessage: "Testing configured GraphQL schema",
|
@@ -265541,19 +266887,19 @@ function getBooleanValue(value4, defaultValue) {
|
|
265541
266887
|
function boolToString(value4) {
|
265542
266888
|
return value4 ? "Yes" : "No";
|
265543
266889
|
}
|
265544
|
-
var
|
266890
|
+
var esm_default5 = createPrompt((config3, done) => {
|
265545
266891
|
const { transformer = boolToString } = config3;
|
265546
266892
|
const [status, setStatus] = useState("idle");
|
265547
266893
|
const [value4, setValue] = useState("");
|
265548
266894
|
const theme = makeTheme(config3.theme);
|
265549
266895
|
const prefix = usePrefix({ status, theme });
|
265550
|
-
useKeypress((
|
265551
|
-
if (isEnterKey(
|
266896
|
+
useKeypress((key4, rl) => {
|
266897
|
+
if (isEnterKey(key4)) {
|
265552
266898
|
const answer = getBooleanValue(value4, config3.default);
|
265553
266899
|
setValue(transformer(answer));
|
265554
266900
|
setStatus("done");
|
265555
266901
|
done(answer);
|
265556
|
-
} else if (
|
266902
|
+
} else if (key4.name === "tab") {
|
265557
266903
|
const answer = boolToString(!getBooleanValue(value4, config3.default));
|
265558
266904
|
rl.clearLine(0);
|
265559
266905
|
rl.write(answer);
|
@@ -265573,86 +266919,20 @@ var esm_default3 = createPrompt((config3, done) => {
|
|
265573
266919
|
return `${prefix} ${message}${defaultValue} ${formattedValue}`;
|
265574
266920
|
});
|
265575
266921
|
|
265576
|
-
// ../../node_modules/@inquirer/input/dist/esm/index.js
|
265577
|
-
var inputTheme = {
|
265578
|
-
validationFailureMode: "keep"
|
265579
|
-
};
|
265580
|
-
var esm_default4 = createPrompt((config3, done) => {
|
265581
|
-
const { required, validate: validate3 = () => true } = config3;
|
265582
|
-
const theme = makeTheme(inputTheme, config3.theme);
|
265583
|
-
const [status, setStatus] = useState("idle");
|
265584
|
-
const [defaultValue = "", setDefaultValue] = useState(config3.default);
|
265585
|
-
const [errorMsg, setError] = useState();
|
265586
|
-
const [value4, setValue] = useState("");
|
265587
|
-
const prefix = usePrefix({ status, theme });
|
265588
|
-
useKeypress(async (key2, rl) => {
|
265589
|
-
if (status !== "idle") {
|
265590
|
-
return;
|
265591
|
-
}
|
265592
|
-
if (isEnterKey(key2)) {
|
265593
|
-
const answer = value4 || defaultValue;
|
265594
|
-
setStatus("loading");
|
265595
|
-
const isValid2 = required && !answer ? "You must provide a value" : await validate3(answer);
|
265596
|
-
if (isValid2 === true) {
|
265597
|
-
setValue(answer);
|
265598
|
-
setStatus("done");
|
265599
|
-
done(answer);
|
265600
|
-
} else {
|
265601
|
-
if (theme.validationFailureMode === "clear") {
|
265602
|
-
setValue("");
|
265603
|
-
} else {
|
265604
|
-
rl.write(value4);
|
265605
|
-
}
|
265606
|
-
setError(isValid2 || "You must provide a valid value");
|
265607
|
-
setStatus("idle");
|
265608
|
-
}
|
265609
|
-
} else if (isBackspaceKey(key2) && !value4) {
|
265610
|
-
setDefaultValue(undefined);
|
265611
|
-
} else if (key2.name === "tab" && !value4) {
|
265612
|
-
setDefaultValue(undefined);
|
265613
|
-
rl.clearLine(0);
|
265614
|
-
rl.write(defaultValue);
|
265615
|
-
setValue(defaultValue);
|
265616
|
-
} else {
|
265617
|
-
setValue(rl.line);
|
265618
|
-
setError(undefined);
|
265619
|
-
}
|
265620
|
-
});
|
265621
|
-
const message = theme.style.message(config3.message, status);
|
265622
|
-
let formattedValue = value4;
|
265623
|
-
if (typeof config3.transformer === "function") {
|
265624
|
-
formattedValue = config3.transformer(value4, { isFinal: status === "done" });
|
265625
|
-
} else if (status === "done") {
|
265626
|
-
formattedValue = theme.style.answer(value4);
|
265627
|
-
}
|
265628
|
-
let defaultStr;
|
265629
|
-
if (defaultValue && status !== "done" && !value4) {
|
265630
|
-
defaultStr = theme.style.defaultAnswer(defaultValue);
|
265631
|
-
}
|
265632
|
-
let error5 = "";
|
265633
|
-
if (errorMsg) {
|
265634
|
-
error5 = theme.style.error(errorMsg);
|
265635
|
-
}
|
265636
|
-
return [
|
265637
|
-
[prefix, message, defaultStr, formattedValue].filter((v6) => v6 !== undefined).join(" "),
|
265638
|
-
error5
|
265639
|
-
];
|
265640
|
-
});
|
265641
|
-
|
265642
266922
|
// ../../node_modules/@inquirer/password/dist/esm/index.js
|
265643
|
-
var
|
265644
|
-
var
|
266923
|
+
var import_ansi_escapes5 = __toESM(require_ansi_escapes(), 1);
|
266924
|
+
var esm_default6 = createPrompt((config3, done) => {
|
265645
266925
|
const { validate: validate3 = () => true } = config3;
|
265646
266926
|
const theme = makeTheme(config3.theme);
|
265647
266927
|
const [status, setStatus] = useState("idle");
|
265648
266928
|
const [errorMsg, setError] = useState();
|
265649
266929
|
const [value4, setValue] = useState("");
|
265650
266930
|
const prefix = usePrefix({ status, theme });
|
265651
|
-
useKeypress(async (
|
266931
|
+
useKeypress(async (key4, rl) => {
|
265652
266932
|
if (status !== "idle") {
|
265653
266933
|
return;
|
265654
266934
|
}
|
265655
|
-
if (isEnterKey(
|
266935
|
+
if (isEnterKey(key4)) {
|
265656
266936
|
const answer = value4;
|
265657
266937
|
setStatus("loading");
|
265658
266938
|
const isValid2 = await validate3(answer);
|
@@ -265677,7 +266957,7 @@ var esm_default5 = createPrompt((config3, done) => {
|
|
265677
266957
|
const maskChar = typeof config3.mask === "string" ? config3.mask : "*";
|
265678
266958
|
formattedValue = maskChar.repeat(value4.length);
|
265679
266959
|
} else if (status !== "done") {
|
265680
|
-
helpTip = `${theme.style.help("[input is masked]")}${
|
266960
|
+
helpTip = `${theme.style.help("[input is masked]")}${import_ansi_escapes5.default.cursorHide}`;
|
265681
266961
|
}
|
265682
266962
|
if (status === "done") {
|
265683
266963
|
formattedValue = theme.style.answer(formattedValue);
|
@@ -265699,7 +266979,7 @@ async function applicationAccessTokenPrompt(env2, application, settlemint, accep
|
|
265699
266979
|
return defaultAccessToken;
|
265700
266980
|
}
|
265701
266981
|
if (defaultAccessToken) {
|
265702
|
-
const keep = await
|
266982
|
+
const keep = await esm_default5({
|
265703
266983
|
message: "Do you want to use the existing application access token?",
|
265704
266984
|
default: true
|
265705
266985
|
});
|
@@ -265707,12 +266987,12 @@ async function applicationAccessTokenPrompt(env2, application, settlemint, accep
|
|
265707
266987
|
return defaultAccessToken;
|
265708
266988
|
}
|
265709
266989
|
}
|
265710
|
-
const create2 = await
|
266990
|
+
const create2 = await esm_default5({
|
265711
266991
|
message: "Do you want to create a new application access token?",
|
265712
266992
|
default: false
|
265713
266993
|
});
|
265714
266994
|
if (create2) {
|
265715
|
-
const name3 = await
|
266995
|
+
const name3 = await esm_default3({
|
265716
266996
|
message: "How would you like to name this application access token?",
|
265717
266997
|
default: `SettleMint CLI (${Date.now()}${process.env.USER ? ` ${process.env.USER}` : ""})`,
|
265718
266998
|
required: true,
|
@@ -265776,7 +267056,7 @@ async function applicationAccessTokenPrompt(env2, application, settlemint, accep
|
|
265776
267056
|
} catch (error5) {
|
265777
267057
|
}
|
265778
267058
|
}
|
265779
|
-
return
|
267059
|
+
return esm_default6({
|
265780
267060
|
message: "What is the application access token for your application in SettleMint? (format: sm_aat_...)",
|
265781
267061
|
validate(value4) {
|
265782
267062
|
try {
|
@@ -265808,7 +267088,7 @@ async function applicationPrompt(env2, applications, accept) {
|
|
265808
267088
|
if (is_in_ci_default) {
|
265809
267089
|
nothingSelectedError("application");
|
265810
267090
|
}
|
265811
|
-
const application = await
|
267091
|
+
const application = await esm_default4({
|
265812
267092
|
message: "Which application do you want to connect to?",
|
265813
267093
|
choices: applications.map((applications2) => ({
|
265814
267094
|
name: `${applications2.name} (${applications2.uniqueName})`,
|
@@ -265881,7 +267161,7 @@ async function blockchainNodePrompt({
|
|
265881
267161
|
isRequired,
|
265882
267162
|
defaultHandler: async ({ defaultService: defaultNode, choices }) => {
|
265883
267163
|
const filteredChoices = filterRunningOnly ? choices.filter(({ value: node }) => node === undefined || node?.status === "COMPLETED") : choices;
|
265884
|
-
return
|
267164
|
+
return esm_default4({
|
265885
267165
|
message: promptMessage ?? "Which blockchain node do you want to connect to?",
|
265886
267166
|
choices: filteredChoices,
|
265887
267167
|
default: defaultNode
|
@@ -265906,7 +267186,7 @@ async function blockscoutPrompt({
|
|
265906
267186
|
envKey: "SETTLEMINT_BLOCKSCOUT",
|
265907
267187
|
isRequired,
|
265908
267188
|
defaultHandler: async ({ defaultService: defaultBlockscout, choices }) => {
|
265909
|
-
return
|
267189
|
+
return esm_default4({
|
265910
267190
|
message: "Which blockscout instance do you want to connect to?",
|
265911
267191
|
choices,
|
265912
267192
|
default: defaultBlockscout
|
@@ -265929,7 +267209,7 @@ async function customDeploymentPrompt({
|
|
265929
267209
|
envKey: "SETTLEMINT_CUSTOM_DEPLOYMENT",
|
265930
267210
|
isRequired,
|
265931
267211
|
defaultHandler: async ({ defaultService: defaultCustomDeployment, choices }) => {
|
265932
|
-
return
|
267212
|
+
return esm_default4({
|
265933
267213
|
message: "Which Custom Deployment do you want to connect to?",
|
265934
267214
|
choices,
|
265935
267215
|
default: defaultCustomDeployment
|
@@ -265953,7 +267233,7 @@ async function hasuraPrompt({
|
|
265953
267233
|
envKey: "SETTLEMINT_HASURA",
|
265954
267234
|
isRequired,
|
265955
267235
|
defaultHandler: async ({ defaultService: defaultHasura, choices }) => {
|
265956
|
-
return
|
267236
|
+
return esm_default4({
|
265957
267237
|
message: "Which Hasura instance do you want to connect to?",
|
265958
267238
|
choices,
|
265959
267239
|
default: defaultHasura
|
@@ -265977,7 +267257,7 @@ async function hdPrivateKeyPrompt({
|
|
265977
267257
|
envKey: "SETTLEMINT_HD_PRIVATE_KEY",
|
265978
267258
|
isRequired,
|
265979
267259
|
defaultHandler: async ({ defaultService: defaultPrivateKey, choices }) => {
|
265980
|
-
return
|
267260
|
+
return esm_default4({
|
265981
267261
|
message: "Which HD Private Key do you want to use?",
|
265982
267262
|
choices,
|
265983
267263
|
default: defaultPrivateKey
|
@@ -266001,7 +267281,7 @@ async function ipfsPrompt({
|
|
266001
267281
|
envKey: "SETTLEMINT_IPFS",
|
266002
267282
|
isRequired,
|
266003
267283
|
defaultHandler: async ({ defaultService: defaultStorage, choices }) => {
|
266004
|
-
return
|
267284
|
+
return esm_default4({
|
266005
267285
|
message: "Which IPFS instance do you want to connect to?",
|
266006
267286
|
choices,
|
266007
267287
|
default: defaultStorage
|
@@ -266025,7 +267305,7 @@ async function minioPrompt({
|
|
266025
267305
|
envKey: "SETTLEMINT_MINIO",
|
266026
267306
|
isRequired,
|
266027
267307
|
defaultHandler: async ({ defaultService: defaultStorage, choices }) => {
|
266028
|
-
return
|
267308
|
+
return esm_default4({
|
266029
267309
|
message: "Which MinIO instance do you want to connect to?",
|
266030
267310
|
choices,
|
266031
267311
|
default: defaultStorage
|
@@ -266049,7 +267329,7 @@ async function portalPrompt({
|
|
266049
267329
|
envKey: "SETTLEMINT_PORTAL",
|
266050
267330
|
isRequired,
|
266051
267331
|
defaultHandler: async ({ defaultService: defaultMiddleware, choices }) => {
|
266052
|
-
return
|
267332
|
+
return esm_default4({
|
266053
267333
|
message: "Which Smart Contract Portal instance do you want to connect to?",
|
266054
267334
|
choices,
|
266055
267335
|
default: defaultMiddleware
|
@@ -266078,7 +267358,7 @@ async function theGraphPrompt({
|
|
266078
267358
|
isRequired,
|
266079
267359
|
defaultHandler: async ({ defaultService: defaultMiddleware, choices }) => {
|
266080
267360
|
const filteredChoices = filterRunningOnly ? choices.filter(({ value: middleware }) => middleware === undefined || middleware?.status === "COMPLETED") : choices;
|
266081
|
-
return
|
267361
|
+
return esm_default4({
|
266082
267362
|
message: "Which The Graph instance do you want to connect to?",
|
266083
267363
|
choices: filteredChoices,
|
266084
267364
|
default: defaultMiddleware
|
@@ -266112,7 +267392,7 @@ async function instancePrompt(env2, accept, freeTextInput = false, isCi = is_in_
|
|
266112
267392
|
return sanitizeInstanceUrl(defaultPromptInstance);
|
266113
267393
|
}
|
266114
267394
|
if (freeTextInput) {
|
266115
|
-
const instance = await
|
267395
|
+
const instance = await esm_default3({
|
266116
267396
|
message: "What is the URL of your SettleMint instance?",
|
266117
267397
|
default: defaultPromptInstance,
|
266118
267398
|
required: true,
|
@@ -266134,7 +267414,7 @@ async function instancePrompt(env2, accept, freeTextInput = false, isCi = is_in_
|
|
266134
267414
|
if (knownInstances.length === 1) {
|
266135
267415
|
return sanitizeInstanceUrl(knownInstances[0]);
|
266136
267416
|
}
|
266137
|
-
return
|
267417
|
+
return esm_default4({
|
266138
267418
|
message: "What SettleMint instance do you want to connect to?",
|
266139
267419
|
choices: [
|
266140
267420
|
...knownInstances.map((instance) => ({
|
@@ -266160,7 +267440,7 @@ async function workspacePrompt(env2, workspaces, accept) {
|
|
266160
267440
|
if (is_in_ci_default) {
|
266161
267441
|
nothingSelectedError("workspace");
|
266162
267442
|
}
|
266163
|
-
const workspace = await
|
267443
|
+
const workspace = await esm_default4({
|
266164
267444
|
message: "Which workspace do you want to connect to?",
|
266165
267445
|
choices: workspaces.map((workspace2) => ({
|
266166
267446
|
name: `${workspace2.name} (${workspace2.uniqueName})`,
|
@@ -266253,7 +267533,7 @@ async function writeEnvSpinner(prod, env2) {
|
|
266253
267533
|
SETTLEMINT_HASURA_ENDPOINT: env2.SETTLEMINT_HASURA_ENDPOINT,
|
266254
267534
|
SETTLEMINT_THEGRAPH: env2.SETTLEMINT_THEGRAPH,
|
266255
267535
|
SETTLEMINT_THEGRAPH_SUBGRAPHS_ENDPOINTS: env2.SETTLEMINT_THEGRAPH_SUBGRAPHS_ENDPOINTS,
|
266256
|
-
|
267536
|
+
SETTLEMINT_THEGRAPH_DEFAULT_SUBGRAPH: env2.SETTLEMINT_THEGRAPH_DEFAULT_SUBGRAPH,
|
266257
267537
|
SETTLEMINT_PORTAL: env2.SETTLEMINT_PORTAL,
|
266258
267538
|
SETTLEMINT_PORTAL_GRAPHQL_ENDPOINT: env2.SETTLEMINT_PORTAL_GRAPHQL_ENDPOINT,
|
266259
267539
|
SETTLEMINT_PORTAL_REST_ENDPOINT: env2.SETTLEMINT_PORTAL_REST_ENDPOINT,
|
@@ -266391,6 +267671,12 @@ function connectCommand() {
|
|
266391
267671
|
middlewares,
|
266392
267672
|
accept: acceptDefaults
|
266393
267673
|
});
|
267674
|
+
const graphEndpoints = await getGraphEndpoint(settlemint, thegraph);
|
267675
|
+
const [defaultSubgraph] = thegraph ? await subgraphPrompt({
|
267676
|
+
env: { ...env2, ...graphEndpoints },
|
267677
|
+
accept: acceptDefaults,
|
267678
|
+
message: "Which The Graph subgraph do you want to use as the default?"
|
267679
|
+
}) : [];
|
266394
267680
|
const portal = await portalPrompt({
|
266395
267681
|
env: env2,
|
266396
267682
|
middlewares,
|
@@ -266496,7 +267782,8 @@ function connectCommand() {
|
|
266496
267782
|
SETTLEMINT_HASURA: hasura?.uniqueName,
|
266497
267783
|
...getHasuraEndpoints(hasura),
|
266498
267784
|
SETTLEMINT_THEGRAPH: thegraph?.uniqueName,
|
266499
|
-
|
267785
|
+
SETTLEMINT_THEGRAPH_DEFAULT_SUBGRAPH: defaultSubgraph,
|
267786
|
+
...graphEndpoints,
|
266500
267787
|
SETTLEMINT_PORTAL: portal?.uniqueName,
|
266501
267788
|
...getPortalEndpoints(portal),
|
266502
267789
|
SETTLEMINT_HD_PRIVATE_KEY: hdPrivateKey?.uniqueName,
|
@@ -266517,27 +267804,6 @@ function connectCommand() {
|
|
266517
267804
|
import { mkdir as mkdir6 } from "node:fs/promises";
|
266518
267805
|
import { join as join9 } from "node:path";
|
266519
267806
|
|
266520
|
-
// src/prompts/project-name.prompt.ts
|
266521
|
-
async function projectNamePrompt(env2, argument) {
|
266522
|
-
const defaultInstance = env2.SETTLEMINT_NEW_PROJECT_NAME ?? argument;
|
266523
|
-
if (defaultInstance) {
|
266524
|
-
return defaultInstance;
|
266525
|
-
}
|
266526
|
-
return esm_default4({
|
266527
|
-
message: "What is the name of your new SettleMint project?",
|
266528
|
-
default: defaultInstance,
|
266529
|
-
required: true,
|
266530
|
-
validate(value4) {
|
266531
|
-
try {
|
266532
|
-
validate2(z.string(), value4);
|
266533
|
-
return true;
|
266534
|
-
} catch (error5) {
|
266535
|
-
return "Invalid projectname";
|
266536
|
-
}
|
266537
|
-
}
|
266538
|
-
});
|
266539
|
-
}
|
266540
|
-
|
266541
267807
|
// src/utils/platform-utils.ts
|
266542
267808
|
function getUseCases(platformConfig) {
|
266543
267809
|
return platformConfig.smartContractSets.sets.filter((useCase) => !useCase.featureflagged);
|
@@ -266546,7 +267812,7 @@ function getKits(platformConfig) {
|
|
266546
267812
|
return platformConfig.kits ?? [];
|
266547
267813
|
}
|
266548
267814
|
|
266549
|
-
// src/prompts/
|
267815
|
+
// src/prompts/kit/template.prompt.ts
|
266550
267816
|
async function templatePrompt(platformConfig, argument) {
|
266551
267817
|
const kits = getKits(platformConfig);
|
266552
267818
|
if (kits.length === 0) {
|
@@ -266560,7 +267826,7 @@ async function templatePrompt(platformConfig, argument) {
|
|
266560
267826
|
}
|
266561
267827
|
return template2;
|
266562
267828
|
}
|
266563
|
-
const template = await
|
267829
|
+
const template = await esm_default4({
|
266564
267830
|
message: "Which template do you want to use?",
|
266565
267831
|
choices: [
|
266566
267832
|
...kits.map((template2) => ({
|
@@ -266572,6 +267838,27 @@ async function templatePrompt(platformConfig, argument) {
|
|
266572
267838
|
return template;
|
266573
267839
|
}
|
266574
267840
|
|
267841
|
+
// src/prompts/project-name.prompt.ts
|
267842
|
+
async function projectNamePrompt(env2, argument) {
|
267843
|
+
const defaultInstance = env2.SETTLEMINT_NEW_PROJECT_NAME ?? argument;
|
267844
|
+
if (defaultInstance) {
|
267845
|
+
return defaultInstance;
|
267846
|
+
}
|
267847
|
+
return esm_default3({
|
267848
|
+
message: "What is the name of your new SettleMint project?",
|
267849
|
+
default: defaultInstance,
|
267850
|
+
required: true,
|
267851
|
+
validate(value4) {
|
267852
|
+
try {
|
267853
|
+
validate2(z.string(), value4);
|
267854
|
+
return true;
|
267855
|
+
} catch (error5) {
|
267856
|
+
return "Invalid projectname";
|
267857
|
+
}
|
267858
|
+
}
|
267859
|
+
});
|
267860
|
+
}
|
267861
|
+
|
266575
267862
|
// src/utils/download-extract.ts
|
266576
267863
|
import { mkdir as mkdir5 } from "node:fs/promises";
|
266577
267864
|
|
@@ -266759,7 +268046,7 @@ var basename2 = function(p6, extension) {
|
|
266759
268046
|
return extension && lastSegment.endsWith(extension) ? lastSegment.slice(0, -extension.length) : lastSegment;
|
266760
268047
|
};
|
266761
268048
|
// ../../node_modules/defu/dist/defu.mjs
|
266762
|
-
function
|
268049
|
+
function isPlainObject5(value4) {
|
266763
268050
|
if (value4 === null || typeof value4 !== "object") {
|
266764
268051
|
return false;
|
266765
268052
|
}
|
@@ -266776,27 +268063,27 @@ function isPlainObject3(value4) {
|
|
266776
268063
|
return true;
|
266777
268064
|
}
|
266778
268065
|
function _defu(baseObject, defaults2, namespace = ".", merger) {
|
266779
|
-
if (!
|
268066
|
+
if (!isPlainObject5(defaults2)) {
|
266780
268067
|
return _defu(baseObject, {}, namespace, merger);
|
266781
268068
|
}
|
266782
268069
|
const object = Object.assign({}, defaults2);
|
266783
|
-
for (const
|
266784
|
-
if (
|
268070
|
+
for (const key4 in baseObject) {
|
268071
|
+
if (key4 === "__proto__" || key4 === "constructor") {
|
266785
268072
|
continue;
|
266786
268073
|
}
|
266787
|
-
const value4 = baseObject[
|
268074
|
+
const value4 = baseObject[key4];
|
266788
268075
|
if (value4 === null || value4 === undefined) {
|
266789
268076
|
continue;
|
266790
268077
|
}
|
266791
|
-
if (merger && merger(object,
|
268078
|
+
if (merger && merger(object, key4, value4, namespace)) {
|
266792
268079
|
continue;
|
266793
268080
|
}
|
266794
|
-
if (Array.isArray(value4) && Array.isArray(object[
|
266795
|
-
object[
|
266796
|
-
} else if (
|
266797
|
-
object[
|
268081
|
+
if (Array.isArray(value4) && Array.isArray(object[key4])) {
|
268082
|
+
object[key4] = [...value4, ...object[key4]];
|
268083
|
+
} else if (isPlainObject5(value4) && isPlainObject5(object[key4])) {
|
268084
|
+
object[key4] = _defu(value4, object[key4], (namespace ? `${namespace}.` : "") + key4.toString(), merger);
|
266798
268085
|
} else {
|
266799
|
-
object[
|
268086
|
+
object[key4] = value4;
|
266800
268087
|
}
|
266801
268088
|
}
|
266802
268089
|
return object;
|
@@ -266805,15 +268092,15 @@ function createDefu(merger) {
|
|
266805
268092
|
return (...arguments_4) => arguments_4.reduce((p6, c3) => _defu(p6, c3, "", merger), {});
|
266806
268093
|
}
|
266807
268094
|
var defu = createDefu();
|
266808
|
-
var defuFn = createDefu((object,
|
266809
|
-
if (object[
|
266810
|
-
object[
|
268095
|
+
var defuFn = createDefu((object, key4, currentValue) => {
|
268096
|
+
if (object[key4] !== undefined && typeof currentValue === "function") {
|
268097
|
+
object[key4] = currentValue(object[key4]);
|
266811
268098
|
return true;
|
266812
268099
|
}
|
266813
268100
|
});
|
266814
|
-
var defuArrayFn = createDefu((object,
|
266815
|
-
if (Array.isArray(object[
|
266816
|
-
object[
|
268101
|
+
var defuArrayFn = createDefu((object, key4, currentValue) => {
|
268102
|
+
if (Array.isArray(object[key4]) && typeof currentValue === "function") {
|
268103
|
+
object[key4] = currentValue(object[key4]);
|
266817
268104
|
return true;
|
266818
268105
|
}
|
266819
268106
|
});
|
@@ -269527,11 +270814,11 @@ function cacheDirectory() {
|
|
269527
270814
|
}
|
269528
270815
|
function normalizeHeaders(headers = {}) {
|
269529
270816
|
const normalized = {};
|
269530
|
-
for (const [
|
270817
|
+
for (const [key4, value4] of Object.entries(headers)) {
|
269531
270818
|
if (!value4) {
|
269532
270819
|
continue;
|
269533
270820
|
}
|
269534
|
-
normalized[
|
270821
|
+
normalized[key4.toLowerCase()] = value4;
|
269535
270822
|
}
|
269536
270823
|
return normalized;
|
269537
270824
|
}
|
@@ -269768,7 +271055,11 @@ async function downloadTemplate(input, options = {}) {
|
|
269768
271055
|
var import_proxy2 = __toESM(require_proxy(), 1);
|
269769
271056
|
|
269770
271057
|
// src/utils/download-extract.ts
|
269771
|
-
async function downloadAndExtractNpmPackage(
|
271058
|
+
async function downloadAndExtractNpmPackage({
|
271059
|
+
template,
|
271060
|
+
version,
|
271061
|
+
targetDir
|
271062
|
+
}) {
|
269772
271063
|
await mkdir5(targetDir, { recursive: true });
|
269773
271064
|
const response = await fetch(`https://registry.npmjs.org/${template}`);
|
269774
271065
|
if (!response.ok) {
|
@@ -269776,7 +271067,7 @@ async function downloadAndExtractNpmPackage(template, targetDir) {
|
|
269776
271067
|
}
|
269777
271068
|
const data = await response.json();
|
269778
271069
|
const latestVersion = data["dist-tags"].latest;
|
269779
|
-
const tarball = data.versions[latestVersion].dist.tarball;
|
271070
|
+
const tarball = data.versions[version ?? latestVersion].dist.tarball;
|
269780
271071
|
await downloadTemplate(tarball, {
|
269781
271072
|
dir: targetDir,
|
269782
271073
|
force: true
|
@@ -269785,9 +271076,12 @@ async function downloadAndExtractNpmPackage(template, targetDir) {
|
|
269785
271076
|
|
269786
271077
|
// src/commands/create.ts
|
269787
271078
|
function createCommand2() {
|
269788
|
-
return new Command("create").description("Bootstrap your SettleMint project").option("-n, --project-name <name>", "The name for your SettleMint project").option("-t, --template <template>", "The template for your SettleMint project (run `settlemint platform config` to see available templates)").option("-i, --instance <instance>", "The instance to connect to").action(async ({ projectName, template, instance }) => {
|
271079
|
+
return new Command("create").description("Bootstrap your SettleMint project").option("-n, --project-name <name>", "The name for your SettleMint project").option("-t, --template <template>", "The template for your SettleMint project (run `settlemint platform config` to see available templates)").option("-v, --version <version>", "Specify the template version to use (defaults to latest stable version)").option("-i, --instance <instance>", "The instance to connect to").action(async ({ projectName, template, version, instance }) => {
|
269789
271080
|
intro("Creating a new SettleMint project");
|
269790
271081
|
const env2 = await loadEnv(false, false);
|
271082
|
+
if (version && !template) {
|
271083
|
+
cancel2("The --version option requires the --template option to be set");
|
271084
|
+
}
|
269791
271085
|
const selectedInstance = instance ? sanitizeAndValidateInstanceUrl(instance) : await instancePrompt(env2, true);
|
269792
271086
|
const settlemint = createSettleMintClient({
|
269793
271087
|
instance: selectedInstance,
|
@@ -269806,7 +271100,7 @@ function createCommand2() {
|
|
269806
271100
|
await mkdir6(projectDir, { recursive: true });
|
269807
271101
|
}
|
269808
271102
|
if (!await isEmpty(projectDir)) {
|
269809
|
-
const confirmEmpty = await
|
271103
|
+
const confirmEmpty = await esm_default5({
|
269810
271104
|
message: `The folder ${projectDir} already exists. Do you want to empty it?`,
|
269811
271105
|
default: false
|
269812
271106
|
});
|
@@ -269818,7 +271112,11 @@ function createCommand2() {
|
|
269818
271112
|
await spinner({
|
269819
271113
|
startMessage: "Scaffolding the project",
|
269820
271114
|
task: async () => {
|
269821
|
-
await downloadAndExtractNpmPackage(
|
271115
|
+
await downloadAndExtractNpmPackage({
|
271116
|
+
template: selectedTemplate.npmPackageName,
|
271117
|
+
version,
|
271118
|
+
targetDir: projectDir
|
271119
|
+
});
|
269822
271120
|
await setName(name3, projectDir);
|
269823
271121
|
},
|
269824
271122
|
stopMessage: "Project fully scaffolded"
|
@@ -269836,7 +271134,7 @@ async function personalAccessTokenPrompt(env2, instance, accept) {
|
|
269836
271134
|
return defaultPersonalAccessToken;
|
269837
271135
|
}
|
269838
271136
|
if (existingConfig && defaultPersonalAccessToken) {
|
269839
|
-
const useExisting = await
|
271137
|
+
const useExisting = await esm_default5({
|
269840
271138
|
message: `Do you want to use your existing personal access token for ${instance}?`,
|
269841
271139
|
default: true
|
269842
271140
|
});
|
@@ -269844,7 +271142,7 @@ async function personalAccessTokenPrompt(env2, instance, accept) {
|
|
269844
271142
|
return defaultPersonalAccessToken;
|
269845
271143
|
}
|
269846
271144
|
}
|
269847
|
-
return
|
271145
|
+
return esm_default6({
|
269848
271146
|
message: "What is your personal access token in SettleMint? (format: sm_pat_...)",
|
269849
271147
|
validate(value4) {
|
269850
271148
|
try {
|
@@ -269944,7 +271242,7 @@ function logoutCommand() {
|
|
269944
271242
|
}
|
269945
271243
|
const env2 = await loadEnv(false, false);
|
269946
271244
|
const defaultInstance = env2.SETTLEMINT_INSTANCE;
|
269947
|
-
const instance = await
|
271245
|
+
const instance = await esm_default4({
|
269948
271246
|
message: "Select the instance to logout from:",
|
269949
271247
|
choices: instances.map((instance2) => ({
|
269950
271248
|
value: instance2,
|
@@ -270034,7 +271332,7 @@ function pincodeVerificationResponseCommand() {
|
|
270034
271332
|
return nothingSelectedError("blockchain node");
|
270035
271333
|
}
|
270036
271334
|
}
|
270037
|
-
const pincode = await
|
271335
|
+
const pincode = await esm_default6({
|
270038
271336
|
message: "Enter your pincode",
|
270039
271337
|
validate(value4) {
|
270040
271338
|
if (!value4.trim()) {
|
@@ -270160,7 +271458,7 @@ async function providerPrompt(platformConfig, argument) {
|
|
270160
271458
|
if (possibleProviders.length === 1) {
|
270161
271459
|
return possibleProviders[0];
|
270162
271460
|
}
|
270163
|
-
const provider = await
|
271461
|
+
const provider = await esm_default4({
|
270164
271462
|
message: "Which provider do you want to use?",
|
270165
271463
|
choices: platformConfig.deploymentEngineTargets.map((target) => ({
|
270166
271464
|
name: target.name,
|
@@ -270191,7 +271489,7 @@ async function regionPrompt(provider, argument) {
|
|
270191
271489
|
if (possibleRegions.length === 1) {
|
270192
271490
|
return possibleRegions[0];
|
270193
271491
|
}
|
270194
|
-
const region = await
|
271492
|
+
const region = await esm_default4({
|
270195
271493
|
message: "Which region do you want to use?",
|
270196
271494
|
choices: provider.clusters.map((cluster) => ({
|
270197
271495
|
name: cluster.name,
|
@@ -270679,7 +271977,7 @@ async function blockchainNetworkPrompt({
|
|
270679
271977
|
envKey: "SETTLEMINT_BLOCKCHAIN_NETWORK",
|
270680
271978
|
isRequired,
|
270681
271979
|
defaultHandler: async ({ defaultService: defaultNetwork, choices }) => {
|
270682
|
-
return
|
271980
|
+
return esm_default4({
|
270683
271981
|
message: "Which blockchain network do you want to connect to?",
|
270684
271982
|
choices,
|
270685
271983
|
default: defaultNetwork
|
@@ -271406,7 +272704,7 @@ function createCommand3() {
|
|
271406
272704
|
|
271407
272705
|
// src/prompts/delete-confirmation.prompt.ts
|
271408
272706
|
async function deleteConfirmationPrompt(itemDescription) {
|
271409
|
-
const confirmation = await
|
272707
|
+
const confirmation = await esm_default3({
|
271410
272708
|
message: `Are you sure you want to delete ${itemDescription}? (yes/no)`,
|
271411
272709
|
required: true,
|
271412
272710
|
validate(value4) {
|
@@ -271763,7 +273061,7 @@ function jsonOutput(data) {
|
|
271763
273061
|
var composer = require_composer();
|
271764
273062
|
var Document = require_Document();
|
271765
273063
|
var Schema = require_Schema();
|
271766
|
-
var
|
273064
|
+
var errors4 = require_errors3();
|
271767
273065
|
var Alias = require_Alias();
|
271768
273066
|
var identity2 = require_identity();
|
271769
273067
|
var Pair = require_Pair();
|
@@ -271779,9 +273077,9 @@ var visit2 = require_visit();
|
|
271779
273077
|
var $Composer = composer.Composer;
|
271780
273078
|
var $Document = Document.Document;
|
271781
273079
|
var $Schema = Schema.Schema;
|
271782
|
-
var $YAMLError =
|
271783
|
-
var $YAMLParseError =
|
271784
|
-
var $YAMLWarning =
|
273080
|
+
var $YAMLError = errors4.YAMLError;
|
273081
|
+
var $YAMLParseError = errors4.YAMLParseError;
|
273082
|
+
var $YAMLWarning = errors4.YAMLWarning;
|
271785
273083
|
var $Alias = Alias.Alias;
|
271786
273084
|
var $isAlias = identity2.isAlias;
|
271787
273085
|
var $isCollection = identity2.isCollection;
|
@@ -271834,7 +273132,9 @@ function configCommand() {
|
|
271834
273132
|
})).sort((a8, b4) => a8.name.localeCompare(b4.name)),
|
271835
273133
|
kits: kits.map((kit) => ({
|
271836
273134
|
id: kit.id,
|
271837
|
-
name: kit.name
|
273135
|
+
name: kit.name,
|
273136
|
+
description: kit.description,
|
273137
|
+
npmPackage: kit.npmPackageName
|
271838
273138
|
})).sort((a8, b4) => a8.name.localeCompare(b4.name)),
|
271839
273139
|
deploymentEngineTargets: platformConfig.deploymentEngineTargets.filter((provider) => !provider.disabled).flatMap((provider) => provider.clusters.filter((cluster) => !cluster.disabled).map((region) => ({
|
271840
273140
|
providerId: provider.id,
|
@@ -272127,7 +273427,7 @@ async function getServicesAndMapResults({
|
|
272127
273427
|
const application = await settlemint.application.read(applicationUniqueName);
|
272128
273428
|
const services = await servicesSpinner(settlemint, applicationUniqueName, types2);
|
272129
273429
|
const results = (types2 ?? SERVICE_TYPES).filter((serviceType) => !types2 || types2.includes(serviceType)).map((serviceType) => {
|
272130
|
-
const [_6, labels] = Object.entries(LABELS_MAP).find(([
|
273430
|
+
const [_6, labels] = Object.entries(LABELS_MAP).find(([key4, value4]) => value4.command === serviceType) ?? [
|
272131
273431
|
null,
|
272132
273432
|
{ plural: serviceType }
|
272133
273433
|
];
|
@@ -272275,7 +273575,7 @@ async function useCasePrompt(platformConfig, argument) {
|
|
272275
273575
|
if (selectableUseCases.length === 1) {
|
272276
273576
|
return selectableUseCases[0];
|
272277
273577
|
}
|
272278
|
-
const useCase = await
|
273578
|
+
const useCase = await esm_default4({
|
272279
273579
|
message: "Which use case do you want to use?",
|
272280
273580
|
choices: selectableUseCases.map((useCase2) => ({
|
272281
273581
|
name: formatUseCaseName(useCase2.name),
|
@@ -272325,7 +273625,7 @@ function createCommand4() {
|
|
272325
273625
|
const targetDir = formatTargetDir(name3);
|
272326
273626
|
const projectDir = join10(process.cwd(), targetDir);
|
272327
273627
|
if (await exists3(projectDir) && !await isEmpty(projectDir)) {
|
272328
|
-
const confirmEmpty = await
|
273628
|
+
const confirmEmpty = await esm_default5({
|
272329
273629
|
message: `The folder ${projectDir} already exists. Do you want to delete it?`,
|
272330
273630
|
default: false
|
272331
273631
|
});
|
@@ -272355,11 +273655,11 @@ function createCommand4() {
|
|
272355
273655
|
|
272356
273656
|
// src/utils/commands/passthrough-options.ts
|
272357
273657
|
function mapPassthroughOptions(options, command) {
|
272358
|
-
const optionArgs = Object.entries(options).map(([
|
273658
|
+
const optionArgs = Object.entries(options).map(([key4, value4]) => {
|
272359
273659
|
if (value4 === true) {
|
272360
|
-
return `--${
|
273660
|
+
return `--${key4}`;
|
272361
273661
|
}
|
272362
|
-
return `--${
|
273662
|
+
return `--${key4}=${value4}`;
|
272363
273663
|
});
|
272364
273664
|
return [...optionArgs, ...command.args];
|
272365
273665
|
}
|
@@ -272566,7 +273866,7 @@ async function addressPrompt({
|
|
272566
273866
|
note(`Private key with address '${defaultAddress}' is not activated on the node '${node.uniqueName}'.
|
272567
273867
|
Please select another key or activate this key on the node and try again.`, "warn");
|
272568
273868
|
}
|
272569
|
-
const address = await
|
273869
|
+
const address = await esm_default4({
|
272570
273870
|
message: "Which private key do you want to deploy from?",
|
272571
273871
|
choices: possiblePrivateKeys.map(({ address: address2, name: name3 }) => ({
|
272572
273872
|
name: name3,
|
@@ -272885,17 +274185,6 @@ import { dirname as dirname10 } from "node:path";
|
|
272885
274185
|
import { rm as rm4 } from "node:fs/promises";
|
272886
274186
|
var import_semver = __toESM(require_semver2(), 1);
|
272887
274187
|
|
272888
|
-
// src/utils/subgraph/sanitize-name.ts
|
272889
|
-
var import_slugify = __toESM(require_slugify(), 1);
|
272890
|
-
function sanitizeName(value4, length = 35) {
|
272891
|
-
return import_slugify.default(value4, {
|
272892
|
-
strict: true,
|
272893
|
-
remove: /[!"'()*+.:@~]/g,
|
272894
|
-
replacement: "-",
|
272895
|
-
lower: true
|
272896
|
-
}).slice(0, length).replaceAll(/(^\d*)/g, "").replaceAll(/(-$)/g, "").replaceAll(/(^-)/g, "");
|
272897
|
-
}
|
272898
|
-
|
272899
274188
|
// src/utils/subgraph/subgraph-config.ts
|
272900
274189
|
import { readFile as readFile7, writeFile as writeFile8 } from "node:fs/promises";
|
272901
274190
|
import { basename as basename4, join as join11 } from "node:path";
|
@@ -273077,40 +274366,6 @@ function subgraphCodegenCommand() {
|
|
273077
274366
|
|
273078
274367
|
// src/commands/smart-contract-set/subgraph/deploy.ts
|
273079
274368
|
import { dirname as dirname12 } from "node:path";
|
273080
|
-
|
273081
|
-
// src/prompts/smart-contract-set/subgraph-name.prompt.ts
|
273082
|
-
async function subgraphNamePrompt({
|
273083
|
-
defaultName,
|
273084
|
-
env: env2,
|
273085
|
-
accept,
|
273086
|
-
prod
|
273087
|
-
}) {
|
273088
|
-
const defaultSubgraphName = defaultName ? sanitizeName(defaultName) : undefined;
|
273089
|
-
if (accept) {
|
273090
|
-
if (defaultSubgraphName && env2.SETTLEMINT_THEGRAPH_SUBGRAPH_NAME !== defaultSubgraphName) {
|
273091
|
-
await saveSubgraphName(defaultSubgraphName, env2, prod);
|
273092
|
-
}
|
273093
|
-
return defaultSubgraphName ?? env2.SETTLEMINT_THEGRAPH_SUBGRAPH_NAME;
|
273094
|
-
}
|
273095
|
-
const subgraphName = await esm_default4({
|
273096
|
-
message: "What is the name of your subgraph?",
|
273097
|
-
default: defaultSubgraphName,
|
273098
|
-
required: true
|
273099
|
-
});
|
273100
|
-
const sanitizedSubgraphName = sanitizeName(subgraphName);
|
273101
|
-
if (env2.SETTLEMINT_THEGRAPH_SUBGRAPH_NAME !== sanitizedSubgraphName) {
|
273102
|
-
await saveSubgraphName(sanitizedSubgraphName, env2, prod);
|
273103
|
-
}
|
273104
|
-
return sanitizedSubgraphName;
|
273105
|
-
}
|
273106
|
-
async function saveSubgraphName(sanitizedSubgraphName, env2, prod) {
|
273107
|
-
await writeEnvSpinner(!!prod, {
|
273108
|
-
...env2,
|
273109
|
-
SETTLEMINT_THEGRAPH_SUBGRAPH_NAME: sanitizedSubgraphName
|
273110
|
-
});
|
273111
|
-
}
|
273112
|
-
|
273113
|
-
// src/commands/smart-contract-set/subgraph/deploy.ts
|
273114
274369
|
function subgraphDeployCommand() {
|
273115
274370
|
return new Command("deploy").description("Deploy the subgraph").usage(createExamples([
|
273116
274371
|
{
|
@@ -273156,14 +274411,24 @@ function subgraphDeployCommand() {
|
|
273156
274411
|
cancel2('The "subgraph/subgraph.config.json" config has not been set, ensure all the contracts listed have an address added');
|
273157
274412
|
}
|
273158
274413
|
}
|
273159
|
-
|
273160
|
-
|
273161
|
-
|
273162
|
-
|
273163
|
-
|
273164
|
-
|
274414
|
+
let graphName;
|
274415
|
+
if (!subgraphName) {
|
274416
|
+
const selectedSubgraphs = await subgraphPrompt({
|
274417
|
+
env: env2,
|
274418
|
+
accept: autoAccept,
|
274419
|
+
message: "Which subgraph do you want to deploy to?",
|
274420
|
+
allowNew: true
|
274421
|
+
});
|
274422
|
+
graphName = selectedSubgraphs[0];
|
274423
|
+
} else {
|
274424
|
+
graphName = await subgraphNamePrompt({
|
274425
|
+
defaultName: subgraphName,
|
274426
|
+
env: env2,
|
274427
|
+
accept: autoAccept
|
274428
|
+
});
|
274429
|
+
}
|
273165
274430
|
if (!graphName) {
|
273166
|
-
cancel2("No
|
274431
|
+
cancel2("No subgraph name provided. Please provide a subgraph name to continue.");
|
273167
274432
|
}
|
273168
274433
|
const middlewareAdminUrl = new URL(`/${encodeURIComponent(accessToken)}/admin`, theGraphMiddleware.serviceUrl).toString();
|
273169
274434
|
await executeCommand(command, [...args, "graph", "create", "--node", middlewareAdminUrl, graphName]);
|
@@ -273208,14 +274473,20 @@ function subgraphRemoveCommand() {
|
|
273208
274473
|
description: "Remove a subgraph",
|
273209
274474
|
command: "scs subgraph remove my-subgraph"
|
273210
274475
|
}
|
273211
|
-
])).option("-a, --accept-defaults", "Accept the default and previously set values").option("--prod", "Connect to your production environment").option("-f, --force", "Force remove the subgraph without confirmation").argument("
|
274476
|
+
])).option("-a, --accept-defaults", "Accept the default and previously set values").option("--prod", "Connect to your production environment").option("-f, --force", "Force remove the subgraph without confirmation").argument("[subgraph-name]", "The name of the subgraph to remove (defaults to value in .env if not provided)").action(async (subgraphName, { prod, acceptDefaults, force }) => {
|
273212
274477
|
intro("Removing subgraph");
|
273213
274478
|
await validateIfRequiredPackagesAreInstalled(["@graphprotocol/graph-cli"]);
|
273214
|
-
if (!force) {
|
273215
|
-
await deleteConfirmationPrompt(`the subgraph ${subgraphName}`);
|
273216
|
-
}
|
273217
274479
|
const autoAccept = !!acceptDefaults || is_in_ci_default;
|
273218
274480
|
const env2 = await loadEnv(false, !!prod);
|
274481
|
+
const selectedSubgraphs = subgraphName ? [subgraphName] : await subgraphPrompt({
|
274482
|
+
env: env2,
|
274483
|
+
accept: autoAccept,
|
274484
|
+
message: "Which subgraph do you want to remove?"
|
274485
|
+
});
|
274486
|
+
const graphName = selectedSubgraphs[0];
|
274487
|
+
if (!force) {
|
274488
|
+
await deleteConfirmationPrompt(`the subgraph ${graphName}`);
|
274489
|
+
}
|
273219
274490
|
const instance = await instancePrompt(env2, true);
|
273220
274491
|
const accessToken = await getApplicationOrPersonalAccessToken({
|
273221
274492
|
env: env2,
|
@@ -273233,19 +274504,30 @@ function subgraphRemoveCommand() {
|
|
273233
274504
|
const cwd2 = dirname13(subgraphYamlFile);
|
273234
274505
|
const { command, args } = await getPackageManagerExecutable();
|
273235
274506
|
const middlewareAdminUrl = new URL(`/${encodeURIComponent(accessToken)}/admin`, theGraphMiddleware.serviceUrl).toString();
|
273236
|
-
await executeCommand(command, [...args, "graph", "remove", "--node", middlewareAdminUrl,
|
274507
|
+
await executeCommand(command, [...args, "graph", "remove", "--node", middlewareAdminUrl, graphName]);
|
273237
274508
|
const settlemintClient = createSettleMintClient({
|
273238
274509
|
accessToken,
|
273239
274510
|
instance
|
273240
274511
|
});
|
273241
|
-
const
|
273242
|
-
|
274512
|
+
const graphEndpoints = await spinner({
|
274513
|
+
startMessage: "Waiting for subgraph to be removed",
|
274514
|
+
task: () => retryWhenFailed2(async () => {
|
274515
|
+
const middleware = await settlemintClient.middleware.read(theGraphMiddleware.uniqueName);
|
274516
|
+
const endpoints = await getGraphEndpoint(settlemintClient, middleware);
|
274517
|
+
if (endpoints.SETTLEMINT_THEGRAPH_SUBGRAPHS_ENDPOINTS?.some((endpoint) => endpoint.endsWith(graphName))) {
|
274518
|
+
throw new Error(`Subgraph '${graphName}' not removed from middleware '${theGraphMiddleware.uniqueName}'`);
|
274519
|
+
}
|
274520
|
+
return endpoints;
|
274521
|
+
}, 5, 5000),
|
274522
|
+
stopMessage: "Waiting finished"
|
274523
|
+
});
|
273243
274524
|
await writeEnvSpinner(!!prod, {
|
273244
274525
|
...env2,
|
273245
274526
|
SETTLEMINT_THEGRAPH: theGraphMiddleware.uniqueName,
|
274527
|
+
SETTLEMINT_THEGRAPH_DEFAULT_SUBGRAPH: env2.SETTLEMINT_THEGRAPH_DEFAULT_SUBGRAPH === graphName ? undefined : env2.SETTLEMINT_THEGRAPH_DEFAULT_SUBGRAPH,
|
273246
274528
|
...graphEndpoints
|
273247
274529
|
});
|
273248
|
-
outro(`Subgraph ${
|
274530
|
+
outro(`Subgraph ${graphName} removed successfully`);
|
273249
274531
|
});
|
273250
274532
|
}
|
273251
274533
|
|
@@ -273388,4 +274670,4 @@ async function sdkCliCommand(argv = process.argv) {
|
|
273388
274670
|
// src/cli.ts
|
273389
274671
|
sdkCliCommand();
|
273390
274672
|
|
273391
|
-
//# debugId=
|
274673
|
+
//# debugId=4A99356B4CC9016364756E2164756E21
|