@settlemint/sdk-cli 2.6.2-prcf189613 → 2.6.2-prcf9bf8f3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +1100 -630
- package/dist/cli.js.map +26 -11
- package/package.json +9 -9
package/dist/cli.js
CHANGED
@@ -3666,124 +3666,6 @@ var require_lib = __commonJS((exports, module) => {
|
|
3666
3666
|
module.exports = MuteStream;
|
3667
3667
|
});
|
3668
3668
|
|
3669
|
-
// ../../node_modules/.bun/ansi-escapes@4.3.2/node_modules/ansi-escapes/index.js
|
3670
|
-
var require_ansi_escapes = __commonJS((exports, module) => {
|
3671
|
-
var ansiEscapes = exports;
|
3672
|
-
exports.default = ansiEscapes;
|
3673
|
-
var ESC = "\x1B[";
|
3674
|
-
var OSC = "\x1B]";
|
3675
|
-
var BEL = "\x07";
|
3676
|
-
var SEP = ";";
|
3677
|
-
var isTerminalApp = process.env.TERM_PROGRAM === "Apple_Terminal";
|
3678
|
-
ansiEscapes.cursorTo = (x, y) => {
|
3679
|
-
if (typeof x !== "number") {
|
3680
|
-
throw new TypeError("The `x` argument is required");
|
3681
|
-
}
|
3682
|
-
if (typeof y !== "number") {
|
3683
|
-
return ESC + (x + 1) + "G";
|
3684
|
-
}
|
3685
|
-
return ESC + (y + 1) + ";" + (x + 1) + "H";
|
3686
|
-
};
|
3687
|
-
ansiEscapes.cursorMove = (x, y) => {
|
3688
|
-
if (typeof x !== "number") {
|
3689
|
-
throw new TypeError("The `x` argument is required");
|
3690
|
-
}
|
3691
|
-
let ret = "";
|
3692
|
-
if (x < 0) {
|
3693
|
-
ret += ESC + -x + "D";
|
3694
|
-
} else if (x > 0) {
|
3695
|
-
ret += ESC + x + "C";
|
3696
|
-
}
|
3697
|
-
if (y < 0) {
|
3698
|
-
ret += ESC + -y + "A";
|
3699
|
-
} else if (y > 0) {
|
3700
|
-
ret += ESC + y + "B";
|
3701
|
-
}
|
3702
|
-
return ret;
|
3703
|
-
};
|
3704
|
-
ansiEscapes.cursorUp = (count = 1) => ESC + count + "A";
|
3705
|
-
ansiEscapes.cursorDown = (count = 1) => ESC + count + "B";
|
3706
|
-
ansiEscapes.cursorForward = (count = 1) => ESC + count + "C";
|
3707
|
-
ansiEscapes.cursorBackward = (count = 1) => ESC + count + "D";
|
3708
|
-
ansiEscapes.cursorLeft = ESC + "G";
|
3709
|
-
ansiEscapes.cursorSavePosition = isTerminalApp ? "\x1B7" : ESC + "s";
|
3710
|
-
ansiEscapes.cursorRestorePosition = isTerminalApp ? "\x1B8" : ESC + "u";
|
3711
|
-
ansiEscapes.cursorGetPosition = ESC + "6n";
|
3712
|
-
ansiEscapes.cursorNextLine = ESC + "E";
|
3713
|
-
ansiEscapes.cursorPrevLine = ESC + "F";
|
3714
|
-
ansiEscapes.cursorHide = ESC + "?25l";
|
3715
|
-
ansiEscapes.cursorShow = ESC + "?25h";
|
3716
|
-
ansiEscapes.eraseLines = (count) => {
|
3717
|
-
let clear = "";
|
3718
|
-
for (let i = 0;i < count; i++) {
|
3719
|
-
clear += ansiEscapes.eraseLine + (i < count - 1 ? ansiEscapes.cursorUp() : "");
|
3720
|
-
}
|
3721
|
-
if (count) {
|
3722
|
-
clear += ansiEscapes.cursorLeft;
|
3723
|
-
}
|
3724
|
-
return clear;
|
3725
|
-
};
|
3726
|
-
ansiEscapes.eraseEndLine = ESC + "K";
|
3727
|
-
ansiEscapes.eraseStartLine = ESC + "1K";
|
3728
|
-
ansiEscapes.eraseLine = ESC + "2K";
|
3729
|
-
ansiEscapes.eraseDown = ESC + "J";
|
3730
|
-
ansiEscapes.eraseUp = ESC + "1J";
|
3731
|
-
ansiEscapes.eraseScreen = ESC + "2J";
|
3732
|
-
ansiEscapes.scrollUp = ESC + "S";
|
3733
|
-
ansiEscapes.scrollDown = ESC + "T";
|
3734
|
-
ansiEscapes.clearScreen = "\x1Bc";
|
3735
|
-
ansiEscapes.clearTerminal = process.platform === "win32" ? `${ansiEscapes.eraseScreen}${ESC}0f` : `${ansiEscapes.eraseScreen}${ESC}3J${ESC}H`;
|
3736
|
-
ansiEscapes.beep = BEL;
|
3737
|
-
ansiEscapes.link = (text, url) => {
|
3738
|
-
return [
|
3739
|
-
OSC,
|
3740
|
-
"8",
|
3741
|
-
SEP,
|
3742
|
-
SEP,
|
3743
|
-
url,
|
3744
|
-
BEL,
|
3745
|
-
text,
|
3746
|
-
OSC,
|
3747
|
-
"8",
|
3748
|
-
SEP,
|
3749
|
-
SEP,
|
3750
|
-
BEL
|
3751
|
-
].join("");
|
3752
|
-
};
|
3753
|
-
ansiEscapes.image = (buffer, options = {}) => {
|
3754
|
-
let ret = `${OSC}1337;File=inline=1`;
|
3755
|
-
if (options.width) {
|
3756
|
-
ret += `;width=${options.width}`;
|
3757
|
-
}
|
3758
|
-
if (options.height) {
|
3759
|
-
ret += `;height=${options.height}`;
|
3760
|
-
}
|
3761
|
-
if (options.preserveAspectRatio === false) {
|
3762
|
-
ret += ";preserveAspectRatio=0";
|
3763
|
-
}
|
3764
|
-
return ret + ":" + buffer.toString("base64") + BEL;
|
3765
|
-
};
|
3766
|
-
ansiEscapes.iTerm = {
|
3767
|
-
setCwd: (cwd = process.cwd()) => `${OSC}50;CurrentDir=${cwd}${BEL}`,
|
3768
|
-
annotation: (message, options = {}) => {
|
3769
|
-
let ret = `${OSC}1337;`;
|
3770
|
-
const hasX = typeof options.x !== "undefined";
|
3771
|
-
const hasY = typeof options.y !== "undefined";
|
3772
|
-
if ((hasX || hasY) && !(hasX && hasY && typeof options.length !== "undefined")) {
|
3773
|
-
throw new Error("`x`, `y` and `length` must be defined when `x` or `y` is defined");
|
3774
|
-
}
|
3775
|
-
message = message.replace(/\|/g, "");
|
3776
|
-
ret += options.isHidden ? "AddHiddenAnnotation=" : "AddAnnotation=";
|
3777
|
-
if (options.length > 0) {
|
3778
|
-
ret += (hasX ? [message, options.length, options.x, options.y] : [options.length, message]).join("|");
|
3779
|
-
} else {
|
3780
|
-
ret += message;
|
3781
|
-
}
|
3782
|
-
return ret + BEL;
|
3783
|
-
}
|
3784
|
-
};
|
3785
|
-
});
|
3786
|
-
|
3787
3669
|
// ../../node_modules/.bun/console-table-printer@2.14.6/node_modules/console-table-printer/dist/src/utils/colored-console-line.js
|
3788
3670
|
var require_colored_console_line = __commonJS((exports) => {
|
3789
3671
|
Object.defineProperty(exports, "__esModule", { value: true });
|
@@ -161660,7 +161542,7 @@ ${lanes.join(`
|
|
161660
161542
|
function generateOptionOutput(sys2, option, rightAlignOfLeft, leftAlignOfRight) {
|
161661
161543
|
var _a;
|
161662
161544
|
const text = [];
|
161663
|
-
const
|
161545
|
+
const colors3 = createColors(sys2);
|
161664
161546
|
const name2 = getDisplayNameTextOfOption(option);
|
161665
161547
|
const valueCandidates = getValueCandidate(option);
|
161666
161548
|
const defaultValueDescription = typeof option.defaultValueDescription === "object" ? getDiagnosticText(option.defaultValueDescription) : formatDefaultValue(option.defaultValueDescription, option.type === "list" || option.type === "listOrElement" ? option.element.type : option.type);
|
@@ -161681,7 +161563,7 @@ ${lanes.join(`
|
|
161681
161563
|
}
|
161682
161564
|
text.push(sys2.newLine);
|
161683
161565
|
} else {
|
161684
|
-
text.push(
|
161566
|
+
text.push(colors3.blue(name2), sys2.newLine);
|
161685
161567
|
if (option.description) {
|
161686
161568
|
const description3 = getDiagnosticText(option.description);
|
161687
161569
|
text.push(description3);
|
@@ -161726,7 +161608,7 @@ ${lanes.join(`
|
|
161726
161608
|
if (isFirstLine) {
|
161727
161609
|
curLeft = left.padStart(rightAlignOfLeft2);
|
161728
161610
|
curLeft = curLeft.padEnd(leftAlignOfRight2);
|
161729
|
-
curLeft = colorLeft ?
|
161611
|
+
curLeft = colorLeft ? colors3.blue(curLeft) : curLeft;
|
161730
161612
|
} else {
|
161731
161613
|
curLeft = "".padStart(leftAlignOfRight2);
|
161732
161614
|
}
|
@@ -161838,9 +161720,9 @@ ${lanes.join(`
|
|
161838
161720
|
return res;
|
161839
161721
|
}
|
161840
161722
|
function printEasyHelp(sys2, simpleOptions) {
|
161841
|
-
const
|
161723
|
+
const colors3 = createColors(sys2);
|
161842
161724
|
let output = [...getHeader(sys2, `${getDiagnosticText(Diagnostics.tsc_Colon_The_TypeScript_Compiler)} - ${getDiagnosticText(Diagnostics.Version_0, version2)}`)];
|
161843
|
-
output.push(
|
161725
|
+
output.push(colors3.bold(getDiagnosticText(Diagnostics.COMMON_COMMANDS)) + sys2.newLine + sys2.newLine);
|
161844
161726
|
example("tsc", Diagnostics.Compiles_the_current_project_tsconfig_json_in_the_working_directory);
|
161845
161727
|
example("tsc app.ts util.ts", Diagnostics.Ignoring_tsconfig_json_compiles_the_specified_files_with_default_compiler_options);
|
161846
161728
|
example("tsc -b", Diagnostics.Build_a_composite_project_in_the_working_directory);
|
@@ -161861,7 +161743,7 @@ ${lanes.join(`
|
|
161861
161743
|
function example(ex, desc) {
|
161862
161744
|
const examples = typeof ex === "string" ? [ex] : ex;
|
161863
161745
|
for (const example2 of examples) {
|
161864
|
-
output.push(" " +
|
161746
|
+
output.push(" " + colors3.blue(example2) + sys2.newLine);
|
161865
161747
|
}
|
161866
161748
|
output.push(" " + getDiagnosticText(desc) + sys2.newLine + sys2.newLine);
|
161867
161749
|
}
|
@@ -161884,12 +161766,12 @@ ${lanes.join(`
|
|
161884
161766
|
}
|
161885
161767
|
function getHeader(sys2, message) {
|
161886
161768
|
var _a;
|
161887
|
-
const
|
161769
|
+
const colors3 = createColors(sys2);
|
161888
161770
|
const header = [];
|
161889
161771
|
const terminalWidth = ((_a = sys2.getWidthOfTerminal) == null ? undefined : _a.call(sys2)) ?? 0;
|
161890
161772
|
const tsIconLength = 5;
|
161891
|
-
const tsIconFirstLine =
|
161892
|
-
const tsIconSecondLine =
|
161773
|
+
const tsIconFirstLine = colors3.blueBackground("".padStart(tsIconLength));
|
161774
|
+
const tsIconSecondLine = colors3.blueBackground(colors3.brightWhite("TS ".padStart(tsIconLength)));
|
161893
161775
|
if (terminalWidth >= message.length + tsIconLength) {
|
161894
161776
|
const rightAlign = terminalWidth > 120 ? 120 : terminalWidth;
|
161895
161777
|
const leftAlign = rightAlign - tsIconLength;
|
@@ -231946,6 +231828,124 @@ var require_slugify = __commonJS((exports, module) => {
|
|
231946
231828
|
});
|
231947
231829
|
});
|
231948
231830
|
|
231831
|
+
// ../../node_modules/.bun/ansi-escapes@4.3.2/node_modules/ansi-escapes/index.js
|
231832
|
+
var require_ansi_escapes = __commonJS((exports, module) => {
|
231833
|
+
var ansiEscapes = exports;
|
231834
|
+
exports.default = ansiEscapes;
|
231835
|
+
var ESC2 = "\x1B[";
|
231836
|
+
var OSC = "\x1B]";
|
231837
|
+
var BEL = "\x07";
|
231838
|
+
var SEP = ";";
|
231839
|
+
var isTerminalApp = process.env.TERM_PROGRAM === "Apple_Terminal";
|
231840
|
+
ansiEscapes.cursorTo = (x6, y4) => {
|
231841
|
+
if (typeof x6 !== "number") {
|
231842
|
+
throw new TypeError("The `x` argument is required");
|
231843
|
+
}
|
231844
|
+
if (typeof y4 !== "number") {
|
231845
|
+
return ESC2 + (x6 + 1) + "G";
|
231846
|
+
}
|
231847
|
+
return ESC2 + (y4 + 1) + ";" + (x6 + 1) + "H";
|
231848
|
+
};
|
231849
|
+
ansiEscapes.cursorMove = (x6, y4) => {
|
231850
|
+
if (typeof x6 !== "number") {
|
231851
|
+
throw new TypeError("The `x` argument is required");
|
231852
|
+
}
|
231853
|
+
let ret = "";
|
231854
|
+
if (x6 < 0) {
|
231855
|
+
ret += ESC2 + -x6 + "D";
|
231856
|
+
} else if (x6 > 0) {
|
231857
|
+
ret += ESC2 + x6 + "C";
|
231858
|
+
}
|
231859
|
+
if (y4 < 0) {
|
231860
|
+
ret += ESC2 + -y4 + "A";
|
231861
|
+
} else if (y4 > 0) {
|
231862
|
+
ret += ESC2 + y4 + "B";
|
231863
|
+
}
|
231864
|
+
return ret;
|
231865
|
+
};
|
231866
|
+
ansiEscapes.cursorUp = (count = 1) => ESC2 + count + "A";
|
231867
|
+
ansiEscapes.cursorDown = (count = 1) => ESC2 + count + "B";
|
231868
|
+
ansiEscapes.cursorForward = (count = 1) => ESC2 + count + "C";
|
231869
|
+
ansiEscapes.cursorBackward = (count = 1) => ESC2 + count + "D";
|
231870
|
+
ansiEscapes.cursorLeft = ESC2 + "G";
|
231871
|
+
ansiEscapes.cursorSavePosition = isTerminalApp ? "\x1B7" : ESC2 + "s";
|
231872
|
+
ansiEscapes.cursorRestorePosition = isTerminalApp ? "\x1B8" : ESC2 + "u";
|
231873
|
+
ansiEscapes.cursorGetPosition = ESC2 + "6n";
|
231874
|
+
ansiEscapes.cursorNextLine = ESC2 + "E";
|
231875
|
+
ansiEscapes.cursorPrevLine = ESC2 + "F";
|
231876
|
+
ansiEscapes.cursorHide = ESC2 + "?25l";
|
231877
|
+
ansiEscapes.cursorShow = ESC2 + "?25h";
|
231878
|
+
ansiEscapes.eraseLines = (count) => {
|
231879
|
+
let clear = "";
|
231880
|
+
for (let i7 = 0;i7 < count; i7++) {
|
231881
|
+
clear += ansiEscapes.eraseLine + (i7 < count - 1 ? ansiEscapes.cursorUp() : "");
|
231882
|
+
}
|
231883
|
+
if (count) {
|
231884
|
+
clear += ansiEscapes.cursorLeft;
|
231885
|
+
}
|
231886
|
+
return clear;
|
231887
|
+
};
|
231888
|
+
ansiEscapes.eraseEndLine = ESC2 + "K";
|
231889
|
+
ansiEscapes.eraseStartLine = ESC2 + "1K";
|
231890
|
+
ansiEscapes.eraseLine = ESC2 + "2K";
|
231891
|
+
ansiEscapes.eraseDown = ESC2 + "J";
|
231892
|
+
ansiEscapes.eraseUp = ESC2 + "1J";
|
231893
|
+
ansiEscapes.eraseScreen = ESC2 + "2J";
|
231894
|
+
ansiEscapes.scrollUp = ESC2 + "S";
|
231895
|
+
ansiEscapes.scrollDown = ESC2 + "T";
|
231896
|
+
ansiEscapes.clearScreen = "\x1Bc";
|
231897
|
+
ansiEscapes.clearTerminal = process.platform === "win32" ? `${ansiEscapes.eraseScreen}${ESC2}0f` : `${ansiEscapes.eraseScreen}${ESC2}3J${ESC2}H`;
|
231898
|
+
ansiEscapes.beep = BEL;
|
231899
|
+
ansiEscapes.link = (text2, url2) => {
|
231900
|
+
return [
|
231901
|
+
OSC,
|
231902
|
+
"8",
|
231903
|
+
SEP,
|
231904
|
+
SEP,
|
231905
|
+
url2,
|
231906
|
+
BEL,
|
231907
|
+
text2,
|
231908
|
+
OSC,
|
231909
|
+
"8",
|
231910
|
+
SEP,
|
231911
|
+
SEP,
|
231912
|
+
BEL
|
231913
|
+
].join("");
|
231914
|
+
};
|
231915
|
+
ansiEscapes.image = (buffer, options = {}) => {
|
231916
|
+
let ret = `${OSC}1337;File=inline=1`;
|
231917
|
+
if (options.width) {
|
231918
|
+
ret += `;width=${options.width}`;
|
231919
|
+
}
|
231920
|
+
if (options.height) {
|
231921
|
+
ret += `;height=${options.height}`;
|
231922
|
+
}
|
231923
|
+
if (options.preserveAspectRatio === false) {
|
231924
|
+
ret += ";preserveAspectRatio=0";
|
231925
|
+
}
|
231926
|
+
return ret + ":" + buffer.toString("base64") + BEL;
|
231927
|
+
};
|
231928
|
+
ansiEscapes.iTerm = {
|
231929
|
+
setCwd: (cwd = process.cwd()) => `${OSC}50;CurrentDir=${cwd}${BEL}`,
|
231930
|
+
annotation: (message, options = {}) => {
|
231931
|
+
let ret = `${OSC}1337;`;
|
231932
|
+
const hasX = typeof options.x !== "undefined";
|
231933
|
+
const hasY = typeof options.y !== "undefined";
|
231934
|
+
if ((hasX || hasY) && !(hasX && hasY && typeof options.length !== "undefined")) {
|
231935
|
+
throw new Error("`x`, `y` and `length` must be defined when `x` or `y` is defined");
|
231936
|
+
}
|
231937
|
+
message = message.replace(/\|/g, "");
|
231938
|
+
ret += options.isHidden ? "AddHiddenAnnotation=" : "AddAnnotation=";
|
231939
|
+
if (options.length > 0) {
|
231940
|
+
ret += (hasX ? [message, options.length, options.x, options.y] : [options.length, message]).join("|");
|
231941
|
+
} else {
|
231942
|
+
ret += message;
|
231943
|
+
}
|
231944
|
+
return ret + BEL;
|
231945
|
+
}
|
231946
|
+
};
|
231947
|
+
});
|
231948
|
+
|
231949
231949
|
// ../../node_modules/.bun/abitype@1.1.0+50e9b7ffbf081acf/node_modules/abitype/dist/esm/version.js
|
231950
231950
|
var version2 = "1.1.0";
|
231951
231951
|
|
@@ -240664,11 +240664,11 @@ var require_visit = __commonJS((exports) => {
|
|
240664
240664
|
visit2.BREAK = BREAK;
|
240665
240665
|
visit2.SKIP = SKIP;
|
240666
240666
|
visit2.REMOVE = REMOVE;
|
240667
|
-
function visit_(
|
240668
|
-
const ctrl = callVisitor(
|
240667
|
+
function visit_(key4, node, visitor, path5) {
|
240668
|
+
const ctrl = callVisitor(key4, node, visitor, path5);
|
240669
240669
|
if (identity2.isNode(ctrl) || identity2.isPair(ctrl)) {
|
240670
|
-
replaceNode(
|
240671
|
-
return visit_(
|
240670
|
+
replaceNode(key4, path5, ctrl);
|
240671
|
+
return visit_(key4, ctrl, visitor, path5);
|
240672
240672
|
}
|
240673
240673
|
if (typeof ctrl !== "symbol") {
|
240674
240674
|
if (identity2.isCollection(node)) {
|
@@ -240712,11 +240712,11 @@ var require_visit = __commonJS((exports) => {
|
|
240712
240712
|
visitAsync.BREAK = BREAK;
|
240713
240713
|
visitAsync.SKIP = SKIP;
|
240714
240714
|
visitAsync.REMOVE = REMOVE;
|
240715
|
-
async function visitAsync_(
|
240716
|
-
const ctrl = await callVisitor(
|
240715
|
+
async function visitAsync_(key4, node, visitor, path5) {
|
240716
|
+
const ctrl = await callVisitor(key4, node, visitor, path5);
|
240717
240717
|
if (identity2.isNode(ctrl) || identity2.isPair(ctrl)) {
|
240718
|
-
replaceNode(
|
240719
|
-
return visitAsync_(
|
240718
|
+
replaceNode(key4, path5, ctrl);
|
240719
|
+
return visitAsync_(key4, ctrl, visitor, path5);
|
240720
240720
|
}
|
240721
240721
|
if (typeof ctrl !== "symbol") {
|
240722
240722
|
if (identity2.isCollection(node)) {
|
@@ -240766,27 +240766,27 @@ var require_visit = __commonJS((exports) => {
|
|
240766
240766
|
}
|
240767
240767
|
return visitor;
|
240768
240768
|
}
|
240769
|
-
function callVisitor(
|
240769
|
+
function callVisitor(key4, node, visitor, path5) {
|
240770
240770
|
if (typeof visitor === "function")
|
240771
|
-
return visitor(
|
240771
|
+
return visitor(key4, node, path5);
|
240772
240772
|
if (identity2.isMap(node))
|
240773
|
-
return visitor.Map?.(
|
240773
|
+
return visitor.Map?.(key4, node, path5);
|
240774
240774
|
if (identity2.isSeq(node))
|
240775
|
-
return visitor.Seq?.(
|
240775
|
+
return visitor.Seq?.(key4, node, path5);
|
240776
240776
|
if (identity2.isPair(node))
|
240777
|
-
return visitor.Pair?.(
|
240777
|
+
return visitor.Pair?.(key4, node, path5);
|
240778
240778
|
if (identity2.isScalar(node))
|
240779
|
-
return visitor.Scalar?.(
|
240779
|
+
return visitor.Scalar?.(key4, node, path5);
|
240780
240780
|
if (identity2.isAlias(node))
|
240781
|
-
return visitor.Alias?.(
|
240781
|
+
return visitor.Alias?.(key4, node, path5);
|
240782
240782
|
return;
|
240783
240783
|
}
|
240784
|
-
function replaceNode(
|
240784
|
+
function replaceNode(key4, path5, node) {
|
240785
240785
|
const parent = path5[path5.length - 1];
|
240786
240786
|
if (identity2.isCollection(parent)) {
|
240787
|
-
parent.items[
|
240787
|
+
parent.items[key4] = node;
|
240788
240788
|
} else if (identity2.isPair(parent)) {
|
240789
|
-
if (
|
240789
|
+
if (key4 === "key")
|
240790
240790
|
parent.key = node;
|
240791
240791
|
else
|
240792
240792
|
parent.value = node;
|
@@ -241017,7 +241017,7 @@ var require_anchors = __commonJS((exports) => {
|
|
241017
241017
|
|
241018
241018
|
// ../../node_modules/.bun/yaml@2.8.1/node_modules/yaml/dist/doc/applyReviver.js
|
241019
241019
|
var require_applyReviver = __commonJS((exports) => {
|
241020
|
-
function applyReviver(reviver, obj,
|
241020
|
+
function applyReviver(reviver, obj, key4, val) {
|
241021
241021
|
if (val && typeof val === "object") {
|
241022
241022
|
if (Array.isArray(val)) {
|
241023
241023
|
for (let i8 = 0, len = val.length;i8 < len; ++i8) {
|
@@ -241057,7 +241057,7 @@ var require_applyReviver = __commonJS((exports) => {
|
|
241057
241057
|
}
|
241058
241058
|
}
|
241059
241059
|
}
|
241060
|
-
return reviver.call(obj,
|
241060
|
+
return reviver.call(obj, key4, val);
|
241061
241061
|
}
|
241062
241062
|
exports.applyReviver = applyReviver;
|
241063
241063
|
});
|
@@ -241386,29 +241386,29 @@ var require_Collection = __commonJS((exports) => {
|
|
241386
241386
|
if (isEmptyPath(path5))
|
241387
241387
|
this.add(value5);
|
241388
241388
|
else {
|
241389
|
-
const [
|
241390
|
-
const node = this.get(
|
241389
|
+
const [key4, ...rest] = path5;
|
241390
|
+
const node = this.get(key4, true);
|
241391
241391
|
if (identity2.isCollection(node))
|
241392
241392
|
node.addIn(rest, value5);
|
241393
241393
|
else if (node === undefined && this.schema)
|
241394
|
-
this.set(
|
241394
|
+
this.set(key4, collectionFromPath(this.schema, rest, value5));
|
241395
241395
|
else
|
241396
|
-
throw new Error(`Expected YAML collection at ${
|
241396
|
+
throw new Error(`Expected YAML collection at ${key4}. Remaining path: ${rest}`);
|
241397
241397
|
}
|
241398
241398
|
}
|
241399
241399
|
deleteIn(path5) {
|
241400
|
-
const [
|
241400
|
+
const [key4, ...rest] = path5;
|
241401
241401
|
if (rest.length === 0)
|
241402
|
-
return this.delete(
|
241403
|
-
const node = this.get(
|
241402
|
+
return this.delete(key4);
|
241403
|
+
const node = this.get(key4, true);
|
241404
241404
|
if (identity2.isCollection(node))
|
241405
241405
|
return node.deleteIn(rest);
|
241406
241406
|
else
|
241407
|
-
throw new Error(`Expected YAML collection at ${
|
241407
|
+
throw new Error(`Expected YAML collection at ${key4}. Remaining path: ${rest}`);
|
241408
241408
|
}
|
241409
241409
|
getIn(path5, keepScalar) {
|
241410
|
-
const [
|
241411
|
-
const node = this.get(
|
241410
|
+
const [key4, ...rest] = path5;
|
241411
|
+
const node = this.get(key4, true);
|
241412
241412
|
if (rest.length === 0)
|
241413
241413
|
return !keepScalar && identity2.isScalar(node) ? node.value : node;
|
241414
241414
|
else
|
@@ -241423,24 +241423,24 @@ var require_Collection = __commonJS((exports) => {
|
|
241423
241423
|
});
|
241424
241424
|
}
|
241425
241425
|
hasIn(path5) {
|
241426
|
-
const [
|
241426
|
+
const [key4, ...rest] = path5;
|
241427
241427
|
if (rest.length === 0)
|
241428
|
-
return this.has(
|
241429
|
-
const node = this.get(
|
241428
|
+
return this.has(key4);
|
241429
|
+
const node = this.get(key4, true);
|
241430
241430
|
return identity2.isCollection(node) ? node.hasIn(rest) : false;
|
241431
241431
|
}
|
241432
241432
|
setIn(path5, value5) {
|
241433
|
-
const [
|
241433
|
+
const [key4, ...rest] = path5;
|
241434
241434
|
if (rest.length === 0) {
|
241435
|
-
this.set(
|
241435
|
+
this.set(key4, value5);
|
241436
241436
|
} else {
|
241437
|
-
const node = this.get(
|
241437
|
+
const node = this.get(key4, true);
|
241438
241438
|
if (identity2.isCollection(node))
|
241439
241439
|
node.setIn(rest, value5);
|
241440
241440
|
else if (node === undefined && this.schema)
|
241441
|
-
this.set(
|
241441
|
+
this.set(key4, collectionFromPath(this.schema, rest, value5));
|
241442
241442
|
else
|
241443
|
-
throw new Error(`Expected YAML collection at ${
|
241443
|
+
throw new Error(`Expected YAML collection at ${key4}. Remaining path: ${rest}`);
|
241444
241444
|
}
|
241445
241445
|
}
|
241446
241446
|
}
|
@@ -242027,19 +242027,19 @@ var require_stringifyPair = __commonJS((exports) => {
|
|
242027
242027
|
var Scalar = require_Scalar();
|
242028
242028
|
var stringify5 = require_stringify();
|
242029
242029
|
var stringifyComment = require_stringifyComment();
|
242030
|
-
function stringifyPair2({ key:
|
242030
|
+
function stringifyPair2({ key: key4, value: value5 }, ctx, onComment, onChompKeep) {
|
242031
242031
|
const { allNullValues, doc: doc2, indent: indent2, indentStep, options: { commentString, indentSeq, simpleKeys } } = ctx;
|
242032
|
-
let keyComment = identity2.isNode(
|
242032
|
+
let keyComment = identity2.isNode(key4) && key4.comment || null;
|
242033
242033
|
if (simpleKeys) {
|
242034
242034
|
if (keyComment) {
|
242035
242035
|
throw new Error("With simple keys, key nodes cannot have comments");
|
242036
242036
|
}
|
242037
|
-
if (identity2.isCollection(
|
242037
|
+
if (identity2.isCollection(key4) || !identity2.isNode(key4) && typeof key4 === "object") {
|
242038
242038
|
const msg = "With simple keys, collection cannot be used as a key value";
|
242039
242039
|
throw new Error(msg);
|
242040
242040
|
}
|
242041
242041
|
}
|
242042
|
-
let explicitKey = !simpleKeys && (!
|
242042
|
+
let explicitKey = !simpleKeys && (!key4 || keyComment && value5 == null && !ctx.inFlow || identity2.isCollection(key4) || (identity2.isScalar(key4) ? key4.type === Scalar.Scalar.BLOCK_FOLDED || key4.type === Scalar.Scalar.BLOCK_LITERAL : typeof key4 === "object"));
|
242043
242043
|
ctx = Object.assign({}, ctx, {
|
242044
242044
|
allNullValues: false,
|
242045
242045
|
implicitKey: !explicitKey && (simpleKeys || !allNullValues),
|
@@ -242047,7 +242047,7 @@ var require_stringifyPair = __commonJS((exports) => {
|
|
242047
242047
|
});
|
242048
242048
|
let keyCommentDone = false;
|
242049
242049
|
let chompKeep = false;
|
242050
|
-
let str = stringify5.stringify(
|
242050
|
+
let str = stringify5.stringify(key4, ctx, () => keyCommentDone = true, () => chompKeep = true);
|
242051
242051
|
if (!explicitKey && !ctx.inFlow && str.length > 1024) {
|
242052
242052
|
if (simpleKeys)
|
242053
242053
|
throw new Error("With simple keys, single line scalar must not span more than 1024 characters");
|
@@ -242191,7 +242191,7 @@ var require_merge = __commonJS((exports) => {
|
|
242191
242191
|
}),
|
242192
242192
|
stringify: () => MERGE_KEY
|
242193
242193
|
};
|
242194
|
-
var isMergeKey = (ctx,
|
242194
|
+
var isMergeKey = (ctx, key4) => (merge4.identify(key4) || identity2.isScalar(key4) && (!key4.type || key4.type === Scalar.Scalar.PLAIN) && merge4.identify(key4.value)) && ctx?.doc.schema.tags.some((tag) => tag.tag === merge4.tag && tag.default);
|
242195
242195
|
function addMergeToJSMap(ctx, map4, value5) {
|
242196
242196
|
value5 = ctx && identity2.isAlias(value5) ? value5.resolve(ctx.doc) : value5;
|
242197
242197
|
if (identity2.isSeq(value5))
|
@@ -242208,14 +242208,14 @@ var require_merge = __commonJS((exports) => {
|
|
242208
242208
|
if (!identity2.isMap(source))
|
242209
242209
|
throw new Error("Merge sources must be maps or map aliases");
|
242210
242210
|
const srcMap = source.toJSON(null, ctx, Map);
|
242211
|
-
for (const [
|
242211
|
+
for (const [key4, value6] of srcMap) {
|
242212
242212
|
if (map4 instanceof Map) {
|
242213
|
-
if (!map4.has(
|
242214
|
-
map4.set(
|
242213
|
+
if (!map4.has(key4))
|
242214
|
+
map4.set(key4, value6);
|
242215
242215
|
} else if (map4 instanceof Set) {
|
242216
|
-
map4.add(
|
242217
|
-
} else if (!Object.prototype.hasOwnProperty.call(map4,
|
242218
|
-
Object.defineProperty(map4,
|
242216
|
+
map4.add(key4);
|
242217
|
+
} else if (!Object.prototype.hasOwnProperty.call(map4, key4)) {
|
242218
|
+
Object.defineProperty(map4, key4, {
|
242219
242219
|
value: value6,
|
242220
242220
|
writable: true,
|
242221
242221
|
enumerable: true,
|
@@ -242237,19 +242237,19 @@ var require_addPairToJSMap = __commonJS((exports) => {
|
|
242237
242237
|
var stringify5 = require_stringify();
|
242238
242238
|
var identity2 = require_identity();
|
242239
242239
|
var toJS = require_toJS();
|
242240
|
-
function addPairToJSMap(ctx, map4, { key:
|
242241
|
-
if (identity2.isNode(
|
242242
|
-
|
242243
|
-
else if (merge4.isMergeKey(ctx,
|
242240
|
+
function addPairToJSMap(ctx, map4, { key: key4, value: value5 }) {
|
242241
|
+
if (identity2.isNode(key4) && key4.addToJSMap)
|
242242
|
+
key4.addToJSMap(ctx, map4, value5);
|
242243
|
+
else if (merge4.isMergeKey(ctx, key4))
|
242244
242244
|
merge4.addMergeToJSMap(ctx, map4, value5);
|
242245
242245
|
else {
|
242246
|
-
const jsKey = toJS.toJS(
|
242246
|
+
const jsKey = toJS.toJS(key4, "", ctx);
|
242247
242247
|
if (map4 instanceof Map) {
|
242248
242248
|
map4.set(jsKey, toJS.toJS(value5, jsKey, ctx));
|
242249
242249
|
} else if (map4 instanceof Set) {
|
242250
242250
|
map4.add(jsKey);
|
242251
242251
|
} else {
|
242252
|
-
const stringKey = stringifyKey(
|
242252
|
+
const stringKey = stringifyKey(key4, jsKey, ctx);
|
242253
242253
|
const jsValue = toJS.toJS(value5, stringKey, ctx);
|
242254
242254
|
if (stringKey in map4)
|
242255
242255
|
Object.defineProperty(map4, stringKey, {
|
@@ -242264,19 +242264,19 @@ var require_addPairToJSMap = __commonJS((exports) => {
|
|
242264
242264
|
}
|
242265
242265
|
return map4;
|
242266
242266
|
}
|
242267
|
-
function stringifyKey(
|
242267
|
+
function stringifyKey(key4, jsKey, ctx) {
|
242268
242268
|
if (jsKey === null)
|
242269
242269
|
return "";
|
242270
242270
|
if (typeof jsKey !== "object")
|
242271
242271
|
return String(jsKey);
|
242272
|
-
if (identity2.isNode(
|
242272
|
+
if (identity2.isNode(key4) && ctx?.doc) {
|
242273
242273
|
const strCtx = stringify5.createStringifyContext(ctx.doc, {});
|
242274
242274
|
strCtx.anchors = new Set;
|
242275
242275
|
for (const node of ctx.anchors.keys())
|
242276
242276
|
strCtx.anchors.add(node.anchor);
|
242277
242277
|
strCtx.inFlow = true;
|
242278
242278
|
strCtx.inStringifyKey = true;
|
242279
|
-
const strKey =
|
242279
|
+
const strKey = key4.toString(strCtx);
|
242280
242280
|
if (!ctx.mapKeyWarned) {
|
242281
242281
|
let jsonStr = JSON.stringify(strKey);
|
242282
242282
|
if (jsonStr.length > 40)
|
@@ -242297,25 +242297,25 @@ var require_Pair = __commonJS((exports) => {
|
|
242297
242297
|
var stringifyPair2 = require_stringifyPair();
|
242298
242298
|
var addPairToJSMap = require_addPairToJSMap();
|
242299
242299
|
var identity2 = require_identity();
|
242300
|
-
function createPair(
|
242301
|
-
const k6 = createNode.createNode(
|
242300
|
+
function createPair(key4, value5, ctx) {
|
242301
|
+
const k6 = createNode.createNode(key4, undefined, ctx);
|
242302
242302
|
const v7 = createNode.createNode(value5, undefined, ctx);
|
242303
242303
|
return new Pair(k6, v7);
|
242304
242304
|
}
|
242305
242305
|
|
242306
242306
|
class Pair {
|
242307
|
-
constructor(
|
242307
|
+
constructor(key4, value5 = null) {
|
242308
242308
|
Object.defineProperty(this, identity2.NODE_TYPE, { value: identity2.PAIR });
|
242309
|
-
this.key =
|
242309
|
+
this.key = key4;
|
242310
242310
|
this.value = value5;
|
242311
242311
|
}
|
242312
242312
|
clone(schema) {
|
242313
|
-
let { key:
|
242314
|
-
if (identity2.isNode(
|
242315
|
-
|
242313
|
+
let { key: key4, value: value5 } = this;
|
242314
|
+
if (identity2.isNode(key4))
|
242315
|
+
key4 = key4.clone(schema);
|
242316
242316
|
if (identity2.isNode(value5))
|
242317
242317
|
value5 = value5.clone(schema);
|
242318
|
-
return new Pair(
|
242318
|
+
return new Pair(key4, value5);
|
242319
242319
|
}
|
242320
242320
|
toJSON(_6, ctx) {
|
242321
242321
|
const pair = ctx?.mapAsMap ? new Map : {};
|
@@ -242482,11 +242482,11 @@ var require_YAMLMap = __commonJS((exports) => {
|
|
242482
242482
|
var identity2 = require_identity();
|
242483
242483
|
var Pair = require_Pair();
|
242484
242484
|
var Scalar = require_Scalar();
|
242485
|
-
function findPair(items,
|
242486
|
-
const k6 = identity2.isScalar(
|
242485
|
+
function findPair(items, key4) {
|
242486
|
+
const k6 = identity2.isScalar(key4) ? key4.value : key4;
|
242487
242487
|
for (const it2 of items) {
|
242488
242488
|
if (identity2.isPair(it2)) {
|
242489
|
-
if (it2.key ===
|
242489
|
+
if (it2.key === key4 || it2.key === k6)
|
242490
242490
|
return it2;
|
242491
242491
|
if (identity2.isScalar(it2.key) && it2.key.value === k6)
|
242492
242492
|
return it2;
|
@@ -242506,20 +242506,20 @@ var require_YAMLMap = __commonJS((exports) => {
|
|
242506
242506
|
static from(schema, obj, ctx) {
|
242507
242507
|
const { keepUndefined, replacer } = ctx;
|
242508
242508
|
const map4 = new this(schema);
|
242509
|
-
const add = (
|
242509
|
+
const add = (key4, value5) => {
|
242510
242510
|
if (typeof replacer === "function")
|
242511
|
-
value5 = replacer.call(obj,
|
242512
|
-
else if (Array.isArray(replacer) && !replacer.includes(
|
242511
|
+
value5 = replacer.call(obj, key4, value5);
|
242512
|
+
else if (Array.isArray(replacer) && !replacer.includes(key4))
|
242513
242513
|
return;
|
242514
242514
|
if (value5 !== undefined || keepUndefined)
|
242515
|
-
map4.items.push(Pair.createPair(
|
242515
|
+
map4.items.push(Pair.createPair(key4, value5, ctx));
|
242516
242516
|
};
|
242517
242517
|
if (obj instanceof Map) {
|
242518
|
-
for (const [
|
242519
|
-
add(
|
242518
|
+
for (const [key4, value5] of obj)
|
242519
|
+
add(key4, value5);
|
242520
242520
|
} else if (obj && typeof obj === "object") {
|
242521
|
-
for (const
|
242522
|
-
add(
|
242521
|
+
for (const key4 of Object.keys(obj))
|
242522
|
+
add(key4, obj[key4]);
|
242523
242523
|
}
|
242524
242524
|
if (typeof schema.sortMapEntries === "function") {
|
242525
242525
|
map4.items.sort(schema.sortMapEntries);
|
@@ -242553,23 +242553,23 @@ var require_YAMLMap = __commonJS((exports) => {
|
|
242553
242553
|
this.items.push(_pair);
|
242554
242554
|
}
|
242555
242555
|
}
|
242556
|
-
delete(
|
242557
|
-
const it2 = findPair(this.items,
|
242556
|
+
delete(key4) {
|
242557
|
+
const it2 = findPair(this.items, key4);
|
242558
242558
|
if (!it2)
|
242559
242559
|
return false;
|
242560
242560
|
const del = this.items.splice(this.items.indexOf(it2), 1);
|
242561
242561
|
return del.length > 0;
|
242562
242562
|
}
|
242563
|
-
get(
|
242564
|
-
const it2 = findPair(this.items,
|
242563
|
+
get(key4, keepScalar) {
|
242564
|
+
const it2 = findPair(this.items, key4);
|
242565
242565
|
const node = it2?.value;
|
242566
242566
|
return (!keepScalar && identity2.isScalar(node) ? node.value : node) ?? undefined;
|
242567
242567
|
}
|
242568
|
-
has(
|
242569
|
-
return !!findPair(this.items,
|
242568
|
+
has(key4) {
|
242569
|
+
return !!findPair(this.items, key4);
|
242570
242570
|
}
|
242571
|
-
set(
|
242572
|
-
this.add(new Pair.Pair(
|
242571
|
+
set(key4, value5) {
|
242572
|
+
this.add(new Pair.Pair(key4, value5), true);
|
242573
242573
|
}
|
242574
242574
|
toJSON(_6, ctx, Type) {
|
242575
242575
|
const map4 = Type ? new Type : ctx?.mapAsMap ? new Map : {};
|
@@ -242640,28 +242640,28 @@ var require_YAMLSeq = __commonJS((exports) => {
|
|
242640
242640
|
add(value5) {
|
242641
242641
|
this.items.push(value5);
|
242642
242642
|
}
|
242643
|
-
delete(
|
242644
|
-
const idx = asItemIndex(
|
242643
|
+
delete(key4) {
|
242644
|
+
const idx = asItemIndex(key4);
|
242645
242645
|
if (typeof idx !== "number")
|
242646
242646
|
return false;
|
242647
242647
|
const del = this.items.splice(idx, 1);
|
242648
242648
|
return del.length > 0;
|
242649
242649
|
}
|
242650
|
-
get(
|
242651
|
-
const idx = asItemIndex(
|
242650
|
+
get(key4, keepScalar) {
|
242651
|
+
const idx = asItemIndex(key4);
|
242652
242652
|
if (typeof idx !== "number")
|
242653
242653
|
return;
|
242654
242654
|
const it2 = this.items[idx];
|
242655
242655
|
return !keepScalar && identity2.isScalar(it2) ? it2.value : it2;
|
242656
242656
|
}
|
242657
|
-
has(
|
242658
|
-
const idx = asItemIndex(
|
242657
|
+
has(key4) {
|
242658
|
+
const idx = asItemIndex(key4);
|
242659
242659
|
return typeof idx === "number" && idx < this.items.length;
|
242660
242660
|
}
|
242661
|
-
set(
|
242662
|
-
const idx = asItemIndex(
|
242661
|
+
set(key4, value5) {
|
242662
|
+
const idx = asItemIndex(key4);
|
242663
242663
|
if (typeof idx !== "number")
|
242664
|
-
throw new Error(`Expected a valid index, not ${
|
242664
|
+
throw new Error(`Expected a valid index, not ${key4}.`);
|
242665
242665
|
const prev = this.items[idx];
|
242666
242666
|
if (identity2.isScalar(prev) && Scalar.isScalarValue(value5))
|
242667
242667
|
prev.value = value5;
|
@@ -242695,8 +242695,8 @@ var require_YAMLSeq = __commonJS((exports) => {
|
|
242695
242695
|
let i8 = 0;
|
242696
242696
|
for (let it2 of obj) {
|
242697
242697
|
if (typeof replacer === "function") {
|
242698
|
-
const
|
242699
|
-
it2 = replacer.call(obj,
|
242698
|
+
const key4 = obj instanceof Set ? it2 : String(i8++);
|
242699
|
+
it2 = replacer.call(obj, key4, it2);
|
242700
242700
|
}
|
242701
242701
|
seq.items.push(createNode.createNode(it2, undefined, ctx));
|
242702
242702
|
}
|
@@ -242704,8 +242704,8 @@ var require_YAMLSeq = __commonJS((exports) => {
|
|
242704
242704
|
return seq;
|
242705
242705
|
}
|
242706
242706
|
}
|
242707
|
-
function asItemIndex(
|
242708
|
-
let idx = identity2.isScalar(
|
242707
|
+
function asItemIndex(key4) {
|
242708
|
+
let idx = identity2.isScalar(key4) ? key4.value : key4;
|
242709
242709
|
if (idx && typeof idx === "string")
|
242710
242710
|
idx = Number(idx);
|
242711
242711
|
return typeof idx === "number" && Number.isInteger(idx) && idx >= 0 ? idx : null;
|
@@ -243078,25 +243078,25 @@ ${cn.comment}` : item.comment;
|
|
243078
243078
|
for (let it2 of iterable) {
|
243079
243079
|
if (typeof replacer === "function")
|
243080
243080
|
it2 = replacer.call(iterable, String(i8++), it2);
|
243081
|
-
let
|
243081
|
+
let key4, value5;
|
243082
243082
|
if (Array.isArray(it2)) {
|
243083
243083
|
if (it2.length === 2) {
|
243084
|
-
|
243084
|
+
key4 = it2[0];
|
243085
243085
|
value5 = it2[1];
|
243086
243086
|
} else
|
243087
243087
|
throw new TypeError(`Expected [key, value] tuple: ${it2}`);
|
243088
243088
|
} else if (it2 && it2 instanceof Object) {
|
243089
243089
|
const keys = Object.keys(it2);
|
243090
243090
|
if (keys.length === 1) {
|
243091
|
-
|
243092
|
-
value5 = it2[
|
243091
|
+
key4 = keys[0];
|
243092
|
+
value5 = it2[key4];
|
243093
243093
|
} else {
|
243094
243094
|
throw new TypeError(`Expected tuple with one key, not ${keys.length} keys`);
|
243095
243095
|
}
|
243096
243096
|
} else {
|
243097
|
-
|
243097
|
+
key4 = it2;
|
243098
243098
|
}
|
243099
|
-
pairs2.items.push(Pair.createPair(
|
243099
|
+
pairs2.items.push(Pair.createPair(key4, value5, ctx));
|
243100
243100
|
}
|
243101
243101
|
return pairs2;
|
243102
243102
|
}
|
@@ -243137,16 +243137,16 @@ var require_omap = __commonJS((exports) => {
|
|
243137
243137
|
if (ctx?.onCreate)
|
243138
243138
|
ctx.onCreate(map4);
|
243139
243139
|
for (const pair of this.items) {
|
243140
|
-
let
|
243140
|
+
let key4, value5;
|
243141
243141
|
if (identity2.isPair(pair)) {
|
243142
|
-
|
243143
|
-
value5 = toJS.toJS(pair.value,
|
243142
|
+
key4 = toJS.toJS(pair.key, "", ctx);
|
243143
|
+
value5 = toJS.toJS(pair.value, key4, ctx);
|
243144
243144
|
} else {
|
243145
|
-
|
243145
|
+
key4 = toJS.toJS(pair, "", ctx);
|
243146
243146
|
}
|
243147
|
-
if (map4.has(
|
243147
|
+
if (map4.has(key4))
|
243148
243148
|
throw new Error("Ordered maps must not include duplicate keys");
|
243149
|
-
map4.set(
|
243149
|
+
map4.set(key4, value5);
|
243150
243150
|
}
|
243151
243151
|
return map4;
|
243152
243152
|
}
|
@@ -243167,12 +243167,12 @@ var require_omap = __commonJS((exports) => {
|
|
243167
243167
|
resolve(seq, onError) {
|
243168
243168
|
const pairs$1 = pairs.resolvePairs(seq, onError);
|
243169
243169
|
const seenKeys = [];
|
243170
|
-
for (const { key:
|
243171
|
-
if (identity2.isScalar(
|
243172
|
-
if (seenKeys.includes(
|
243173
|
-
onError(`Ordered maps must not include duplicate keys: ${
|
243170
|
+
for (const { key: key4 } of pairs$1.items) {
|
243171
|
+
if (identity2.isScalar(key4)) {
|
243172
|
+
if (seenKeys.includes(key4.value)) {
|
243173
|
+
onError(`Ordered maps must not include duplicate keys: ${key4.value}`);
|
243174
243174
|
} else {
|
243175
|
-
seenKeys.push(
|
243175
|
+
seenKeys.push(key4.value);
|
243176
243176
|
}
|
243177
243177
|
}
|
243178
243178
|
}
|
@@ -243346,30 +243346,30 @@ var require_set = __commonJS((exports) => {
|
|
243346
243346
|
super(schema);
|
243347
243347
|
this.tag = YAMLSet.tag;
|
243348
243348
|
}
|
243349
|
-
add(
|
243349
|
+
add(key4) {
|
243350
243350
|
let pair;
|
243351
|
-
if (identity2.isPair(
|
243352
|
-
pair =
|
243353
|
-
else if (
|
243354
|
-
pair = new Pair.Pair(
|
243351
|
+
if (identity2.isPair(key4))
|
243352
|
+
pair = key4;
|
243353
|
+
else if (key4 && typeof key4 === "object" && "key" in key4 && "value" in key4 && key4.value === null)
|
243354
|
+
pair = new Pair.Pair(key4.key, null);
|
243355
243355
|
else
|
243356
|
-
pair = new Pair.Pair(
|
243356
|
+
pair = new Pair.Pair(key4, null);
|
243357
243357
|
const prev = YAMLMap.findPair(this.items, pair.key);
|
243358
243358
|
if (!prev)
|
243359
243359
|
this.items.push(pair);
|
243360
243360
|
}
|
243361
|
-
get(
|
243362
|
-
const pair = YAMLMap.findPair(this.items,
|
243361
|
+
get(key4, keepPair) {
|
243362
|
+
const pair = YAMLMap.findPair(this.items, key4);
|
243363
243363
|
return !keepPair && identity2.isPair(pair) ? identity2.isScalar(pair.key) ? pair.key.value : pair.key : pair;
|
243364
243364
|
}
|
243365
|
-
set(
|
243365
|
+
set(key4, value5) {
|
243366
243366
|
if (typeof value5 !== "boolean")
|
243367
243367
|
throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof value5}`);
|
243368
|
-
const prev = YAMLMap.findPair(this.items,
|
243368
|
+
const prev = YAMLMap.findPair(this.items, key4);
|
243369
243369
|
if (prev && !value5) {
|
243370
243370
|
this.items.splice(this.items.indexOf(prev), 1);
|
243371
243371
|
} else if (!prev && value5) {
|
243372
|
-
this.items.push(new Pair.Pair(
|
243372
|
+
this.items.push(new Pair.Pair(key4));
|
243373
243373
|
}
|
243374
243374
|
}
|
243375
243375
|
toJSON(_6, ctx) {
|
@@ -243604,7 +243604,7 @@ var require_tags = __commonJS((exports) => {
|
|
243604
243604
|
if (Array.isArray(customTags))
|
243605
243605
|
tags = [];
|
243606
243606
|
else {
|
243607
|
-
const keys = Array.from(schemas3.keys()).filter((
|
243607
|
+
const keys = Array.from(schemas3.keys()).filter((key4) => key4 !== "yaml11").map((key4) => JSON.stringify(key4)).join(", ");
|
243608
243608
|
throw new Error(`Unknown schema "${schemaName}"; use one of ${keys} or define customTags array`);
|
243609
243609
|
}
|
243610
243610
|
}
|
@@ -243620,7 +243620,7 @@ var require_tags = __commonJS((exports) => {
|
|
243620
243620
|
const tagObj = typeof tag === "string" ? tagsByName[tag] : tag;
|
243621
243621
|
if (!tagObj) {
|
243622
243622
|
const tagName = JSON.stringify(tag);
|
243623
|
-
const keys = Object.keys(tagsByName).map((
|
243623
|
+
const keys = Object.keys(tagsByName).map((key4) => JSON.stringify(key4)).join(", ");
|
243624
243624
|
throw new Error(`Unknown custom tag ${tagName}; use one of ${keys}`);
|
243625
243625
|
}
|
243626
243626
|
if (!tags2.includes(tagObj))
|
@@ -243855,13 +243855,13 @@ var require_Document = __commonJS((exports) => {
|
|
243855
243855
|
setAnchors();
|
243856
243856
|
return node;
|
243857
243857
|
}
|
243858
|
-
createPair(
|
243859
|
-
const k6 = this.createNode(
|
243858
|
+
createPair(key4, value5, options = {}) {
|
243859
|
+
const k6 = this.createNode(key4, null, options);
|
243860
243860
|
const v7 = this.createNode(value5, null, options);
|
243861
243861
|
return new Pair.Pair(k6, v7);
|
243862
243862
|
}
|
243863
|
-
delete(
|
243864
|
-
return assertCollection(this.contents) ? this.contents.delete(
|
243863
|
+
delete(key4) {
|
243864
|
+
return assertCollection(this.contents) ? this.contents.delete(key4) : false;
|
243865
243865
|
}
|
243866
243866
|
deleteIn(path5) {
|
243867
243867
|
if (Collection.isEmptyPath(path5)) {
|
@@ -243872,27 +243872,27 @@ var require_Document = __commonJS((exports) => {
|
|
243872
243872
|
}
|
243873
243873
|
return assertCollection(this.contents) ? this.contents.deleteIn(path5) : false;
|
243874
243874
|
}
|
243875
|
-
get(
|
243876
|
-
return identity2.isCollection(this.contents) ? this.contents.get(
|
243875
|
+
get(key4, keepScalar) {
|
243876
|
+
return identity2.isCollection(this.contents) ? this.contents.get(key4, keepScalar) : undefined;
|
243877
243877
|
}
|
243878
243878
|
getIn(path5, keepScalar) {
|
243879
243879
|
if (Collection.isEmptyPath(path5))
|
243880
243880
|
return !keepScalar && identity2.isScalar(this.contents) ? this.contents.value : this.contents;
|
243881
243881
|
return identity2.isCollection(this.contents) ? this.contents.getIn(path5, keepScalar) : undefined;
|
243882
243882
|
}
|
243883
|
-
has(
|
243884
|
-
return identity2.isCollection(this.contents) ? this.contents.has(
|
243883
|
+
has(key4) {
|
243884
|
+
return identity2.isCollection(this.contents) ? this.contents.has(key4) : false;
|
243885
243885
|
}
|
243886
243886
|
hasIn(path5) {
|
243887
243887
|
if (Collection.isEmptyPath(path5))
|
243888
243888
|
return this.contents !== undefined;
|
243889
243889
|
return identity2.isCollection(this.contents) ? this.contents.hasIn(path5) : false;
|
243890
243890
|
}
|
243891
|
-
set(
|
243891
|
+
set(key4, value5) {
|
243892
243892
|
if (this.contents == null) {
|
243893
|
-
this.contents = Collection.collectionFromPath(this.schema, [
|
243893
|
+
this.contents = Collection.collectionFromPath(this.schema, [key4], value5);
|
243894
243894
|
} else if (assertCollection(this.contents)) {
|
243895
|
-
this.contents.set(
|
243895
|
+
this.contents.set(key4, value5);
|
243896
243896
|
}
|
243897
243897
|
}
|
243898
243898
|
setIn(path5, value5) {
|
@@ -244174,25 +244174,25 @@ var require_resolve_props = __commonJS((exports) => {
|
|
244174
244174
|
|
244175
244175
|
// ../../node_modules/.bun/yaml@2.8.1/node_modules/yaml/dist/compose/util-contains-newline.js
|
244176
244176
|
var require_util_contains_newline = __commonJS((exports) => {
|
244177
|
-
function containsNewline(
|
244178
|
-
if (!
|
244177
|
+
function containsNewline(key4) {
|
244178
|
+
if (!key4)
|
244179
244179
|
return null;
|
244180
|
-
switch (
|
244180
|
+
switch (key4.type) {
|
244181
244181
|
case "alias":
|
244182
244182
|
case "scalar":
|
244183
244183
|
case "double-quoted-scalar":
|
244184
244184
|
case "single-quoted-scalar":
|
244185
|
-
if (
|
244185
|
+
if (key4.source.includes(`
|
244186
244186
|
`))
|
244187
244187
|
return true;
|
244188
|
-
if (
|
244189
|
-
for (const st2 of
|
244188
|
+
if (key4.end) {
|
244189
|
+
for (const st2 of key4.end)
|
244190
244190
|
if (st2.type === "newline")
|
244191
244191
|
return true;
|
244192
244192
|
}
|
244193
244193
|
return false;
|
244194
244194
|
case "flow-collection":
|
244195
|
-
for (const it2 of
|
244195
|
+
for (const it2 of key4.items) {
|
244196
244196
|
for (const st2 of it2.start)
|
244197
244197
|
if (st2.type === "newline")
|
244198
244198
|
return true;
|
@@ -244257,10 +244257,10 @@ var require_resolve_block_map = __commonJS((exports) => {
|
|
244257
244257
|
let offset = bm.offset;
|
244258
244258
|
let commentEnd = null;
|
244259
244259
|
for (const collItem of bm.items) {
|
244260
|
-
const { start: start3, key:
|
244260
|
+
const { start: start3, key: key4, sep: sep4, value: value5 } = collItem;
|
244261
244261
|
const keyProps = resolveProps.resolveProps(start3, {
|
244262
244262
|
indicator: "explicit-key-ind",
|
244263
|
-
next:
|
244263
|
+
next: key4 ?? sep4?.[0],
|
244264
244264
|
offset,
|
244265
244265
|
onError,
|
244266
244266
|
parentIndent: bm.indent,
|
@@ -244268,10 +244268,10 @@ var require_resolve_block_map = __commonJS((exports) => {
|
|
244268
244268
|
});
|
244269
244269
|
const implicitKey = !keyProps.found;
|
244270
244270
|
if (implicitKey) {
|
244271
|
-
if (
|
244272
|
-
if (
|
244271
|
+
if (key4) {
|
244272
|
+
if (key4.type === "block-seq")
|
244273
244273
|
onError(offset, "BLOCK_AS_IMPLICIT_KEY", "A block sequence may not be used as an implicit map key");
|
244274
|
-
else if ("indent" in
|
244274
|
+
else if ("indent" in key4 && key4.indent !== bm.indent)
|
244275
244275
|
onError(offset, "BAD_INDENT", startColMsg);
|
244276
244276
|
}
|
244277
244277
|
if (!keyProps.anchor && !keyProps.tag && !sep4) {
|
@@ -244285,17 +244285,17 @@ var require_resolve_block_map = __commonJS((exports) => {
|
|
244285
244285
|
}
|
244286
244286
|
continue;
|
244287
244287
|
}
|
244288
|
-
if (keyProps.newlineAfterProp || utilContainsNewline.containsNewline(
|
244289
|
-
onError(
|
244288
|
+
if (keyProps.newlineAfterProp || utilContainsNewline.containsNewline(key4)) {
|
244289
|
+
onError(key4 ?? start3[start3.length - 1], "MULTILINE_IMPLICIT_KEY", "Implicit keys need to be on a single line");
|
244290
244290
|
}
|
244291
244291
|
} else if (keyProps.found?.indent !== bm.indent) {
|
244292
244292
|
onError(offset, "BAD_INDENT", startColMsg);
|
244293
244293
|
}
|
244294
244294
|
ctx.atKey = true;
|
244295
244295
|
const keyStart = keyProps.end;
|
244296
|
-
const keyNode =
|
244296
|
+
const keyNode = key4 ? composeNode(ctx, key4, keyProps, onError) : composeEmptyNode(ctx, keyStart, start3, null, keyProps, onError);
|
244297
244297
|
if (ctx.schema.compat)
|
244298
|
-
utilFlowIndentCheck.flowIndentCheck(bm.indent,
|
244298
|
+
utilFlowIndentCheck.flowIndentCheck(bm.indent, key4, onError);
|
244299
244299
|
ctx.atKey = false;
|
244300
244300
|
if (utilMapIncludes.mapIncludes(ctx, map4.items, keyNode))
|
244301
244301
|
onError(keyStart, "DUPLICATE_KEY", "Map keys must be unique");
|
@@ -244305,7 +244305,7 @@ var require_resolve_block_map = __commonJS((exports) => {
|
|
244305
244305
|
offset: keyNode.range[2],
|
244306
244306
|
onError,
|
244307
244307
|
parentIndent: bm.indent,
|
244308
|
-
startOnNewline: !
|
244308
|
+
startOnNewline: !key4 || key4.type === "block-scalar"
|
244309
244309
|
});
|
244310
244310
|
offset = valueProps.end;
|
244311
244311
|
if (valueProps.found) {
|
@@ -244461,11 +244461,11 @@ var require_resolve_flow_collection = __commonJS((exports) => {
|
|
244461
244461
|
let offset = fc.offset + fc.start.source.length;
|
244462
244462
|
for (let i8 = 0;i8 < fc.items.length; ++i8) {
|
244463
244463
|
const collItem = fc.items[i8];
|
244464
|
-
const { start: start3, key:
|
244464
|
+
const { start: start3, key: key4, sep: sep4, value: value5 } = collItem;
|
244465
244465
|
const props = resolveProps.resolveProps(start3, {
|
244466
244466
|
flow: fcName,
|
244467
244467
|
indicator: "explicit-key-ind",
|
244468
|
-
next:
|
244468
|
+
next: key4 ?? sep4?.[0],
|
244469
244469
|
offset,
|
244470
244470
|
onError,
|
244471
244471
|
parentIndent: fc.indent,
|
@@ -244487,8 +244487,8 @@ var require_resolve_flow_collection = __commonJS((exports) => {
|
|
244487
244487
|
offset = props.end;
|
244488
244488
|
continue;
|
244489
244489
|
}
|
244490
|
-
if (!isMap && ctx.options.strict && utilContainsNewline.containsNewline(
|
244491
|
-
onError(
|
244490
|
+
if (!isMap && ctx.options.strict && utilContainsNewline.containsNewline(key4))
|
244491
|
+
onError(key4, "MULTILINE_IMPLICIT_KEY", "Implicit keys of flow sequence pairs need to be on a single line");
|
244492
244492
|
}
|
244493
244493
|
if (i8 === 0) {
|
244494
244494
|
if (props.comma)
|
@@ -244533,8 +244533,8 @@ var require_resolve_flow_collection = __commonJS((exports) => {
|
|
244533
244533
|
} else {
|
244534
244534
|
ctx.atKey = true;
|
244535
244535
|
const keyStart = props.end;
|
244536
|
-
const keyNode =
|
244537
|
-
if (isBlock(
|
244536
|
+
const keyNode = key4 ? composeNode(ctx, key4, props, onError) : composeEmptyNode(ctx, keyStart, start3, null, props, onError);
|
244537
|
+
if (isBlock(key4))
|
244538
244538
|
onError(keyNode.range, "BLOCK_IN_FLOW", blockMsg);
|
244539
244539
|
ctx.atKey = false;
|
244540
244540
|
const valueProps = resolveProps.resolveProps(sep4 ?? [], {
|
@@ -245345,7 +245345,7 @@ var require_composer = __commonJS((exports) => {
|
|
245345
245345
|
var node_process = __require("process");
|
245346
245346
|
var directives5 = require_directives2();
|
245347
245347
|
var Document = require_Document();
|
245348
|
-
var
|
245348
|
+
var errors6 = require_errors3();
|
245349
245349
|
var identity2 = require_identity();
|
245350
245350
|
var composeDoc = require_compose_doc();
|
245351
245351
|
var resolveEnd = require_resolve_end();
|
@@ -245396,9 +245396,9 @@ var require_composer = __commonJS((exports) => {
|
|
245396
245396
|
this.onError = (source, code2, message, warning) => {
|
245397
245397
|
const pos = getErrorPos(source);
|
245398
245398
|
if (warning)
|
245399
|
-
this.warnings.push(new
|
245399
|
+
this.warnings.push(new errors6.YAMLWarning(pos, code2, message));
|
245400
245400
|
else
|
245401
|
-
this.errors.push(new
|
245401
|
+
this.errors.push(new errors6.YAMLParseError(pos, code2, message));
|
245402
245402
|
};
|
245403
245403
|
this.directives = new directives5.Directives({ version: options.version || "1.2" });
|
245404
245404
|
this.options = options;
|
@@ -245482,7 +245482,7 @@ ${cb}` : comment;
|
|
245482
245482
|
break;
|
245483
245483
|
case "error": {
|
245484
245484
|
const msg = token.source ? `${token.message}: ${JSON.stringify(token.source)}` : token.message;
|
245485
|
-
const error48 = new
|
245485
|
+
const error48 = new errors6.YAMLParseError(getErrorPos(token), "UNEXPECTED_TOKEN", msg);
|
245486
245486
|
if (this.atDirectives || !this.doc)
|
245487
245487
|
this.errors.push(error48);
|
245488
245488
|
else
|
@@ -245492,7 +245492,7 @@ ${cb}` : comment;
|
|
245492
245492
|
case "doc-end": {
|
245493
245493
|
if (!this.doc) {
|
245494
245494
|
const msg = "Unexpected doc-end without preceding document";
|
245495
|
-
this.errors.push(new
|
245495
|
+
this.errors.push(new errors6.YAMLParseError(getErrorPos(token), "UNEXPECTED_TOKEN", msg));
|
245496
245496
|
break;
|
245497
245497
|
}
|
245498
245498
|
this.doc.directives.docEnd = true;
|
@@ -245507,7 +245507,7 @@ ${end.comment}` : end.comment;
|
|
245507
245507
|
break;
|
245508
245508
|
}
|
245509
245509
|
default:
|
245510
|
-
this.errors.push(new
|
245510
|
+
this.errors.push(new errors6.YAMLParseError(getErrorPos(token), "UNEXPECTED_TOKEN", `Unsupported token ${token.type}`));
|
245511
245511
|
}
|
245512
245512
|
}
|
245513
245513
|
*end(forceDoc = false, endOffset = -1) {
|
@@ -245533,7 +245533,7 @@ ${end.comment}` : end.comment;
|
|
245533
245533
|
var require_cst_scalar = __commonJS((exports) => {
|
245534
245534
|
var resolveBlockScalar = require_resolve_block_scalar();
|
245535
245535
|
var resolveFlowScalar = require_resolve_flow_scalar();
|
245536
|
-
var
|
245536
|
+
var errors6 = require_errors3();
|
245537
245537
|
var stringifyString = require_stringifyString();
|
245538
245538
|
function resolveAsScalar(token, strict = true, onError) {
|
245539
245539
|
if (token) {
|
@@ -245542,7 +245542,7 @@ var require_cst_scalar = __commonJS((exports) => {
|
|
245542
245542
|
if (onError)
|
245543
245543
|
onError(offset, code2, message);
|
245544
245544
|
else
|
245545
|
-
throw new
|
245545
|
+
throw new errors6.YAMLParseError([offset, offset + 1], code2, message);
|
245546
245546
|
};
|
245547
245547
|
switch (token.type) {
|
245548
245548
|
case "scalar":
|
@@ -245656,9 +245656,9 @@ var require_cst_scalar = __commonJS((exports) => {
|
|
245656
245656
|
if (!addEndtoBlockProps(props, "end" in token ? token.end : undefined))
|
245657
245657
|
props.push({ type: "newline", offset: -1, indent: indent2, source: `
|
245658
245658
|
` });
|
245659
|
-
for (const
|
245660
|
-
if (
|
245661
|
-
delete token[
|
245659
|
+
for (const key4 of Object.keys(token))
|
245660
|
+
if (key4 !== "type" && key4 !== "offset")
|
245661
|
+
delete token[key4];
|
245662
245662
|
Object.assign(token, { type: "block-scalar", indent: indent2, props, source: body });
|
245663
245663
|
}
|
245664
245664
|
}
|
@@ -245707,9 +245707,9 @@ var require_cst_scalar = __commonJS((exports) => {
|
|
245707
245707
|
default: {
|
245708
245708
|
const indent2 = "indent" in token ? token.indent : -1;
|
245709
245709
|
const end = "end" in token && Array.isArray(token.end) ? token.end.filter((st2) => st2.type === "space" || st2.type === "comment" || st2.type === "newline") : [];
|
245710
|
-
for (const
|
245711
|
-
if (
|
245712
|
-
delete token[
|
245710
|
+
for (const key4 of Object.keys(token))
|
245711
|
+
if (key4 !== "type" && key4 !== "offset")
|
245712
|
+
delete token[key4];
|
245713
245713
|
Object.assign(token, { type: type5, indent: indent2, source, end });
|
245714
245714
|
}
|
245715
245715
|
}
|
@@ -245761,12 +245761,12 @@ var require_cst_stringify = __commonJS((exports) => {
|
|
245761
245761
|
}
|
245762
245762
|
}
|
245763
245763
|
}
|
245764
|
-
function stringifyItem({ start: start3, key:
|
245764
|
+
function stringifyItem({ start: start3, key: key4, sep: sep4, value: value5 }) {
|
245765
245765
|
let res = "";
|
245766
245766
|
for (const st2 of start3)
|
245767
245767
|
res += st2.source;
|
245768
|
-
if (
|
245769
|
-
res += stringifyToken(
|
245768
|
+
if (key4)
|
245769
|
+
res += stringifyToken(key4);
|
245770
245770
|
if (sep4)
|
245771
245771
|
for (const st2 of sep4)
|
245772
245772
|
res += st2.source;
|
@@ -247062,7 +247062,7 @@ var require_parser2 = __commonJS((exports) => {
|
|
247062
247062
|
});
|
247063
247063
|
} else if (isFlowToken(it2.key) && !includesToken(it2.sep, "newline")) {
|
247064
247064
|
const start4 = getFirstKeyStartProps(it2.start);
|
247065
|
-
const
|
247065
|
+
const key4 = it2.key;
|
247066
247066
|
const sep4 = it2.sep;
|
247067
247067
|
sep4.push(this.sourceToken);
|
247068
247068
|
delete it2.key;
|
@@ -247071,7 +247071,7 @@ var require_parser2 = __commonJS((exports) => {
|
|
247071
247071
|
type: "block-map",
|
247072
247072
|
offset: this.offset,
|
247073
247073
|
indent: this.indent,
|
247074
|
-
items: [{ start: start4, key:
|
247074
|
+
items: [{ start: start4, key: key4, sep: sep4 }]
|
247075
247075
|
});
|
247076
247076
|
} else if (start3.length > 0) {
|
247077
247077
|
it2.sep = it2.sep.concat(start3, this.sourceToken);
|
@@ -247404,7 +247404,7 @@ var require_parser2 = __commonJS((exports) => {
|
|
247404
247404
|
var require_public_api = __commonJS((exports) => {
|
247405
247405
|
var composer = require_composer();
|
247406
247406
|
var Document = require_Document();
|
247407
|
-
var
|
247407
|
+
var errors6 = require_errors3();
|
247408
247408
|
var log = require_log();
|
247409
247409
|
var identity2 = require_identity();
|
247410
247410
|
var lineCounter = require_line_counter();
|
@@ -247421,8 +247421,8 @@ var require_public_api = __commonJS((exports) => {
|
|
247421
247421
|
const docs = Array.from(composer$1.compose(parser$1.parse(source)));
|
247422
247422
|
if (prettyErrors && lineCounter2)
|
247423
247423
|
for (const doc2 of docs) {
|
247424
|
-
doc2.errors.forEach(
|
247425
|
-
doc2.warnings.forEach(
|
247424
|
+
doc2.errors.forEach(errors6.prettifyError(source, lineCounter2));
|
247425
|
+
doc2.warnings.forEach(errors6.prettifyError(source, lineCounter2));
|
247426
247426
|
}
|
247427
247427
|
if (docs.length > 0)
|
247428
247428
|
return docs;
|
@@ -247437,13 +247437,13 @@ var require_public_api = __commonJS((exports) => {
|
|
247437
247437
|
if (!doc2)
|
247438
247438
|
doc2 = _doc;
|
247439
247439
|
else if (doc2.options.logLevel !== "silent") {
|
247440
|
-
doc2.errors.push(new
|
247440
|
+
doc2.errors.push(new errors6.YAMLParseError(_doc.range.slice(0, 2), "MULTIPLE_DOCS", "Source contains multiple documents; please use YAML.parseAllDocuments()"));
|
247441
247441
|
break;
|
247442
247442
|
}
|
247443
247443
|
}
|
247444
247444
|
if (prettyErrors && lineCounter2) {
|
247445
|
-
doc2.errors.forEach(
|
247446
|
-
doc2.warnings.forEach(
|
247445
|
+
doc2.errors.forEach(errors6.prettifyError(source, lineCounter2));
|
247446
|
+
doc2.warnings.forEach(errors6.prettifyError(source, lineCounter2));
|
247447
247447
|
}
|
247448
247448
|
return doc2;
|
247449
247449
|
}
|
@@ -247510,11 +247510,13 @@ var {
|
|
247510
247510
|
Help
|
247511
247511
|
} = import__.default;
|
247512
247512
|
|
247513
|
-
// ../../node_modules/.bun/@inquirer+core@10.2.
|
247513
|
+
// ../../node_modules/.bun/@inquirer+core@10.2.2+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/key.js
|
247514
|
+
var isUpKey = (key) => key.name === "up";
|
247515
|
+
var isDownKey = (key) => key.name === "down";
|
247514
247516
|
var isBackspaceKey = (key) => key.name === "backspace";
|
247515
|
-
var
|
247517
|
+
var isNumberKey = (key) => "1234567890".includes(key.name);
|
247516
247518
|
var isEnterKey = (key) => key.name === "enter" || key.name === "return";
|
247517
|
-
// ../../node_modules/.bun/@inquirer+core@10.2.
|
247519
|
+
// ../../node_modules/.bun/@inquirer+core@10.2.2+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/errors.js
|
247518
247520
|
class AbortPromptError extends Error {
|
247519
247521
|
name = "AbortPromptError";
|
247520
247522
|
message = "Prompt was aborted";
|
@@ -247540,10 +247542,10 @@ class HookError extends Error {
|
|
247540
247542
|
class ValidationError extends Error {
|
247541
247543
|
name = "ValidationError";
|
247542
247544
|
}
|
247543
|
-
// ../../node_modules/.bun/@inquirer+core@10.2.
|
247545
|
+
// ../../node_modules/.bun/@inquirer+core@10.2.2+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/use-state.js
|
247544
247546
|
import { AsyncResource as AsyncResource2 } from "node:async_hooks";
|
247545
247547
|
|
247546
|
-
// ../../node_modules/.bun/@inquirer+core@10.2.
|
247548
|
+
// ../../node_modules/.bun/@inquirer+core@10.2.2+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/hook-engine.js
|
247547
247549
|
import { AsyncLocalStorage, AsyncResource } from "node:async_hooks";
|
247548
247550
|
var hookStorage = new AsyncLocalStorage;
|
247549
247551
|
function createStore(rl) {
|
@@ -247648,7 +247650,7 @@ var effectScheduler = {
|
|
247648
247650
|
}
|
247649
247651
|
};
|
247650
247652
|
|
247651
|
-
// ../../node_modules/.bun/@inquirer+core@10.2.
|
247653
|
+
// ../../node_modules/.bun/@inquirer+core@10.2.2+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/use-state.js
|
247652
247654
|
function useState(defaultValue) {
|
247653
247655
|
return withPointer((pointer) => {
|
247654
247656
|
const setState = AsyncResource2.bind(function setState(newValue) {
|
@@ -247666,7 +247668,7 @@ function useState(defaultValue) {
|
|
247666
247668
|
});
|
247667
247669
|
}
|
247668
247670
|
|
247669
|
-
// ../../node_modules/.bun/@inquirer+core@10.2.
|
247671
|
+
// ../../node_modules/.bun/@inquirer+core@10.2.2+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/use-effect.js
|
247670
247672
|
function useEffect(cb, depArray) {
|
247671
247673
|
withPointer((pointer) => {
|
247672
247674
|
const oldDeps = pointer.get();
|
@@ -247678,7 +247680,7 @@ function useEffect(cb, depArray) {
|
|
247678
247680
|
});
|
247679
247681
|
}
|
247680
247682
|
|
247681
|
-
// ../../node_modules/.bun/@inquirer+core@10.2.
|
247683
|
+
// ../../node_modules/.bun/@inquirer+core@10.2.2+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/theme.js
|
247682
247684
|
var import_yoctocolors_cjs = __toESM(require_yoctocolors_cjs(), 1);
|
247683
247685
|
|
247684
247686
|
// ../../node_modules/.bun/@inquirer+figures@1.0.13/node_modules/@inquirer/figures/dist/esm/index.js
|
@@ -247967,7 +247969,7 @@ var figures = shouldUseMain ? mainSymbols : fallbackSymbols;
|
|
247967
247969
|
var esm_default = figures;
|
247968
247970
|
var replacements = Object.entries(specialMainSymbols);
|
247969
247971
|
|
247970
|
-
// ../../node_modules/.bun/@inquirer+core@10.2.
|
247972
|
+
// ../../node_modules/.bun/@inquirer+core@10.2.2+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/theme.js
|
247971
247973
|
var defaultTheme = {
|
247972
247974
|
prefix: {
|
247973
247975
|
idle: import_yoctocolors_cjs.default.blue("?"),
|
@@ -247988,7 +247990,7 @@ var defaultTheme = {
|
|
247988
247990
|
}
|
247989
247991
|
};
|
247990
247992
|
|
247991
|
-
// ../../node_modules/.bun/@inquirer+core@10.2.
|
247993
|
+
// ../../node_modules/.bun/@inquirer+core@10.2.2+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/make-theme.js
|
247992
247994
|
function isPlainObject(value) {
|
247993
247995
|
if (typeof value !== "object" || value === null)
|
247994
247996
|
return false;
|
@@ -248016,7 +248018,7 @@ function makeTheme(...themes) {
|
|
248016
248018
|
return deepMerge(...themesToMerge);
|
248017
248019
|
}
|
248018
248020
|
|
248019
|
-
// ../../node_modules/.bun/@inquirer+core@10.2.
|
248021
|
+
// ../../node_modules/.bun/@inquirer+core@10.2.2+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/use-prefix.js
|
248020
248022
|
function usePrefix({ status = "idle", theme }) {
|
248021
248023
|
const [showLoader, setShowLoader] = useState(false);
|
248022
248024
|
const [tick, setTick] = useState(0);
|
@@ -248046,12 +248048,23 @@ function usePrefix({ status = "idle", theme }) {
|
|
248046
248048
|
const iconName = status === "loading" ? "idle" : status;
|
248047
248049
|
return typeof prefix === "string" ? prefix : prefix[iconName] ?? prefix["idle"];
|
248048
248050
|
}
|
248049
|
-
// ../../node_modules/.bun/@inquirer+core@10.2.
|
248051
|
+
// ../../node_modules/.bun/@inquirer+core@10.2.2+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/use-memo.js
|
248052
|
+
function useMemo(fn, dependencies) {
|
248053
|
+
return withPointer((pointer) => {
|
248054
|
+
const prev = pointer.get();
|
248055
|
+
if (!prev || prev.dependencies.length !== dependencies.length || prev.dependencies.some((dep, i) => dep !== dependencies[i])) {
|
248056
|
+
const value = fn();
|
248057
|
+
pointer.set({ value, dependencies });
|
248058
|
+
return value;
|
248059
|
+
}
|
248060
|
+
return prev.value;
|
248061
|
+
});
|
248062
|
+
}
|
248063
|
+
// ../../node_modules/.bun/@inquirer+core@10.2.2+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/use-ref.js
|
248050
248064
|
function useRef(val) {
|
248051
248065
|
return useState({ current: val })[0];
|
248052
248066
|
}
|
248053
|
-
|
248054
|
-
// ../../node_modules/.bun/@inquirer+core@10.2.0+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/use-keypress.js
|
248067
|
+
// ../../node_modules/.bun/@inquirer+core@10.2.2+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/use-keypress.js
|
248055
248068
|
function useKeypress(userHandler) {
|
248056
248069
|
const signal = useRef(userHandler);
|
248057
248070
|
signal.current = userHandler;
|
@@ -248069,7 +248082,7 @@ function useKeypress(userHandler) {
|
|
248069
248082
|
};
|
248070
248083
|
}, []);
|
248071
248084
|
}
|
248072
|
-
// ../../node_modules/.bun/@inquirer+core@10.2.
|
248085
|
+
// ../../node_modules/.bun/@inquirer+core@10.2.2+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/utils.js
|
248073
248086
|
var import_cli_width = __toESM(require_cli_width(), 1);
|
248074
248087
|
var import_wrap_ansi = __toESM(require_wrap_ansi(), 1);
|
248075
248088
|
function breakLines(content, width) {
|
@@ -248082,7 +248095,73 @@ function readlineWidth() {
|
|
248082
248095
|
return import_cli_width.default({ defaultWidth: 80, output: readline().output });
|
248083
248096
|
}
|
248084
248097
|
|
248085
|
-
// ../../node_modules/.bun/@inquirer+core@10.2.
|
248098
|
+
// ../../node_modules/.bun/@inquirer+core@10.2.2+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/pagination/use-pagination.js
|
248099
|
+
function usePointerPosition({ active, renderedItems, pageSize, loop }) {
|
248100
|
+
const state = useRef({
|
248101
|
+
lastPointer: active,
|
248102
|
+
lastActive: undefined
|
248103
|
+
});
|
248104
|
+
const { lastPointer, lastActive } = state.current;
|
248105
|
+
const middle = Math.floor(pageSize / 2);
|
248106
|
+
const renderedLength = renderedItems.reduce((acc, item) => acc + item.length, 0);
|
248107
|
+
const defaultPointerPosition = renderedItems.slice(0, active).reduce((acc, item) => acc + item.length, 0);
|
248108
|
+
let pointer = defaultPointerPosition;
|
248109
|
+
if (renderedLength > pageSize) {
|
248110
|
+
if (loop) {
|
248111
|
+
pointer = lastPointer;
|
248112
|
+
if (lastActive != null && lastActive < active && active - lastActive < pageSize) {
|
248113
|
+
pointer = Math.min(middle, Math.abs(active - lastActive) === 1 ? Math.min(lastPointer + (renderedItems[lastActive]?.length ?? 0), Math.max(defaultPointerPosition, lastPointer)) : lastPointer + active - lastActive);
|
248114
|
+
}
|
248115
|
+
} else {
|
248116
|
+
const spaceUnderActive = renderedItems.slice(active).reduce((acc, item) => acc + item.length, 0);
|
248117
|
+
pointer = spaceUnderActive < pageSize - middle ? pageSize - spaceUnderActive : Math.min(defaultPointerPosition, middle);
|
248118
|
+
}
|
248119
|
+
}
|
248120
|
+
state.current.lastPointer = pointer;
|
248121
|
+
state.current.lastActive = active;
|
248122
|
+
return pointer;
|
248123
|
+
}
|
248124
|
+
function usePagination({ items, active, renderItem, pageSize, loop = true }) {
|
248125
|
+
const width = readlineWidth();
|
248126
|
+
const bound = (num) => (num % items.length + items.length) % items.length;
|
248127
|
+
const renderedItems = items.map((item, index) => {
|
248128
|
+
if (item == null)
|
248129
|
+
return [];
|
248130
|
+
return breakLines(renderItem({ item, index, isActive: index === active }), width).split(`
|
248131
|
+
`);
|
248132
|
+
});
|
248133
|
+
const renderedLength = renderedItems.reduce((acc, item) => acc + item.length, 0);
|
248134
|
+
const renderItemAtIndex = (index) => renderedItems[index] ?? [];
|
248135
|
+
const pointer = usePointerPosition({ active, renderedItems, pageSize, loop });
|
248136
|
+
const activeItem = renderItemAtIndex(active).slice(0, pageSize);
|
248137
|
+
const activeItemPosition = pointer + activeItem.length <= pageSize ? pointer : pageSize - activeItem.length;
|
248138
|
+
const pageBuffer = Array.from({ length: pageSize });
|
248139
|
+
pageBuffer.splice(activeItemPosition, activeItem.length, ...activeItem);
|
248140
|
+
const itemVisited = new Set([active]);
|
248141
|
+
let bufferPointer = activeItemPosition + activeItem.length;
|
248142
|
+
let itemPointer = bound(active + 1);
|
248143
|
+
while (bufferPointer < pageSize && !itemVisited.has(itemPointer) && (loop && renderedLength > pageSize ? itemPointer !== active : itemPointer > active)) {
|
248144
|
+
const lines = renderItemAtIndex(itemPointer);
|
248145
|
+
const linesToAdd = lines.slice(0, pageSize - bufferPointer);
|
248146
|
+
pageBuffer.splice(bufferPointer, linesToAdd.length, ...linesToAdd);
|
248147
|
+
itemVisited.add(itemPointer);
|
248148
|
+
bufferPointer += linesToAdd.length;
|
248149
|
+
itemPointer = bound(itemPointer + 1);
|
248150
|
+
}
|
248151
|
+
bufferPointer = activeItemPosition - 1;
|
248152
|
+
itemPointer = bound(active - 1);
|
248153
|
+
while (bufferPointer >= 0 && !itemVisited.has(itemPointer) && (loop && renderedLength > pageSize ? itemPointer !== active : itemPointer < active)) {
|
248154
|
+
const lines = renderItemAtIndex(itemPointer);
|
248155
|
+
const linesToAdd = lines.slice(Math.max(0, lines.length - bufferPointer - 1));
|
248156
|
+
pageBuffer.splice(bufferPointer - linesToAdd.length + 1, linesToAdd.length, ...linesToAdd);
|
248157
|
+
itemVisited.add(itemPointer);
|
248158
|
+
bufferPointer -= linesToAdd.length;
|
248159
|
+
itemPointer = bound(itemPointer - 1);
|
248160
|
+
}
|
248161
|
+
return pageBuffer.filter((line) => typeof line === "string").join(`
|
248162
|
+
`);
|
248163
|
+
}
|
248164
|
+
// ../../node_modules/.bun/@inquirer+core@10.2.2+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
|
248086
248165
|
var import_mute_stream = __toESM(require_lib(), 1);
|
248087
248166
|
import * as readline2 from "node:readline";
|
248088
248167
|
import { AsyncResource as AsyncResource3 } from "node:async_hooks";
|
@@ -248295,16 +248374,30 @@ var {
|
|
248295
248374
|
unload
|
248296
248375
|
} = signalExitWrap(processOk(process3) ? new SignalExit(process3) : new SignalExitFallback);
|
248297
248376
|
|
248298
|
-
// ../../node_modules/.bun/@inquirer+core@10.2.
|
248299
|
-
var import_ansi_escapes = __toESM(require_ansi_escapes(), 1);
|
248377
|
+
// ../../node_modules/.bun/@inquirer+core@10.2.2+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/screen-manager.js
|
248300
248378
|
import { stripVTControlCharacters } from "node:util";
|
248379
|
+
|
248380
|
+
// ../../node_modules/.bun/@inquirer+ansi@1.0.0/node_modules/@inquirer/ansi/dist/esm/index.js
|
248381
|
+
var ESC = "\x1B[";
|
248382
|
+
var cursorLeft = ESC + "G";
|
248383
|
+
var cursorHide = ESC + "?25l";
|
248384
|
+
var cursorShow = ESC + "?25h";
|
248385
|
+
var cursorUp = (rows = 1) => rows > 0 ? `${ESC}${rows}A` : "";
|
248386
|
+
var cursorDown = (rows = 1) => rows > 0 ? `${ESC}${rows}B` : "";
|
248387
|
+
var cursorTo = (x, y) => {
|
248388
|
+
if (typeof y === "number" && !Number.isNaN(y)) {
|
248389
|
+
return `${ESC}${y + 1};${x + 1}H`;
|
248390
|
+
}
|
248391
|
+
return `${ESC}${x + 1}G`;
|
248392
|
+
};
|
248393
|
+
var eraseLine = ESC + "2K";
|
248394
|
+
var eraseLines = (lines) => lines > 0 ? (eraseLine + cursorUp(1)).repeat(lines - 1) + eraseLine + cursorLeft : "";
|
248395
|
+
|
248396
|
+
// ../../node_modules/.bun/@inquirer+core@10.2.2+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/screen-manager.js
|
248301
248397
|
var height = (content) => content.split(`
|
248302
248398
|
`).length;
|
248303
248399
|
var lastLine = (content) => content.split(`
|
248304
248400
|
`).pop() ?? "";
|
248305
|
-
function cursorDown(n) {
|
248306
|
-
return n > 0 ? import_ansi_escapes.default.cursorDown(n) : "";
|
248307
|
-
}
|
248308
248401
|
|
248309
248402
|
class ScreenManager {
|
248310
248403
|
height = 0;
|
@@ -248341,31 +248434,31 @@ class ScreenManager {
|
|
248341
248434
|
const promptLineUpDiff = Math.floor(rawPromptLine.length / width) - this.cursorPos.rows;
|
248342
248435
|
const bottomContentHeight = promptLineUpDiff + (bottomContent ? height(bottomContent) : 0);
|
248343
248436
|
if (bottomContentHeight > 0)
|
248344
|
-
output +=
|
248345
|
-
output +=
|
248346
|
-
this.write(cursorDown(this.extraLinesUnderPrompt) +
|
248437
|
+
output += cursorUp(bottomContentHeight);
|
248438
|
+
output += cursorTo(this.cursorPos.cols);
|
248439
|
+
this.write(cursorDown(this.extraLinesUnderPrompt) + eraseLines(this.height) + output);
|
248347
248440
|
this.extraLinesUnderPrompt = bottomContentHeight;
|
248348
248441
|
this.height = height(output);
|
248349
248442
|
}
|
248350
248443
|
checkCursorPos() {
|
248351
248444
|
const cursorPos = this.rl.getCursorPos();
|
248352
248445
|
if (cursorPos.cols !== this.cursorPos.cols) {
|
248353
|
-
this.write(
|
248446
|
+
this.write(cursorTo(cursorPos.cols));
|
248354
248447
|
this.cursorPos = cursorPos;
|
248355
248448
|
}
|
248356
248449
|
}
|
248357
248450
|
done({ clearContent }) {
|
248358
248451
|
this.rl.setPrompt("");
|
248359
248452
|
let output = cursorDown(this.extraLinesUnderPrompt);
|
248360
|
-
output += clearContent ?
|
248453
|
+
output += clearContent ? eraseLines(this.height) : `
|
248361
248454
|
`;
|
248362
|
-
output +=
|
248455
|
+
output += cursorShow;
|
248363
248456
|
this.write(output);
|
248364
248457
|
this.rl.close();
|
248365
248458
|
}
|
248366
248459
|
}
|
248367
248460
|
|
248368
|
-
// ../../node_modules/.bun/@inquirer+core@10.2.
|
248461
|
+
// ../../node_modules/.bun/@inquirer+core@10.2.2+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/promise-polyfill.js
|
248369
248462
|
class PromisePolyfill extends Promise {
|
248370
248463
|
static withResolver() {
|
248371
248464
|
let resolve;
|
@@ -248378,7 +248471,7 @@ class PromisePolyfill extends Promise {
|
|
248378
248471
|
}
|
248379
248472
|
}
|
248380
248473
|
|
248381
|
-
// ../../node_modules/.bun/@inquirer+core@10.2.
|
248474
|
+
// ../../node_modules/.bun/@inquirer+core@10.2.2+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
|
248382
248475
|
function getCallSites() {
|
248383
248476
|
const _prepareStackTrace = Error.prepareStackTrace;
|
248384
248477
|
let result = [];
|
@@ -248464,6 +248557,20 @@ function createPrompt(view) {
|
|
248464
248557
|
};
|
248465
248558
|
return prompt;
|
248466
248559
|
}
|
248560
|
+
// ../../node_modules/.bun/@inquirer+core@10.2.2+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/Separator.js
|
248561
|
+
var import_yoctocolors_cjs2 = __toESM(require_yoctocolors_cjs(), 1);
|
248562
|
+
class Separator {
|
248563
|
+
separator = import_yoctocolors_cjs2.default.dim(Array.from({ length: 15 }).join(esm_default.line));
|
248564
|
+
type = "separator";
|
248565
|
+
constructor(separator) {
|
248566
|
+
if (separator) {
|
248567
|
+
this.separator = separator;
|
248568
|
+
}
|
248569
|
+
}
|
248570
|
+
static isSeparator(choice) {
|
248571
|
+
return Boolean(choice && typeof choice === "object" && "type" in choice && choice.type === "separator");
|
248572
|
+
}
|
248573
|
+
}
|
248467
248574
|
// ../../node_modules/.bun/yoctocolors@2.1.2/node_modules/yoctocolors/base.js
|
248468
248575
|
var exports_base = {};
|
248469
248576
|
__export(exports_base, {
|
@@ -267121,7 +267228,7 @@ function pruneCurrentEnv(currentEnv, env2) {
|
|
267121
267228
|
var package_default = {
|
267122
267229
|
name: "@settlemint/sdk-cli",
|
267123
267230
|
description: "Command-line interface for SettleMint SDK, providing development tools and project management capabilities",
|
267124
|
-
version: "2.6.2-
|
267231
|
+
version: "2.6.2-prcf9bf8f3",
|
267125
267232
|
type: "module",
|
267126
267233
|
private: false,
|
267127
267234
|
license: "FSL-1.1-MIT",
|
@@ -267164,21 +267271,21 @@ var package_default = {
|
|
267164
267271
|
},
|
267165
267272
|
dependencies: {
|
267166
267273
|
"@gql.tada/cli-utils": "1.7.1",
|
267167
|
-
"@inquirer/core": "10.2.
|
267274
|
+
"@inquirer/core": "10.2.2",
|
267168
267275
|
"node-fetch-native": "1.6.7",
|
267169
267276
|
zod: "^4"
|
267170
267277
|
},
|
267171
267278
|
devDependencies: {
|
267172
267279
|
"@commander-js/extra-typings": "14.0.0",
|
267173
267280
|
commander: "14.0.1",
|
267174
|
-
"@inquirer/confirm": "5.1.
|
267281
|
+
"@inquirer/confirm": "5.1.17",
|
267175
267282
|
"@inquirer/input": "4.2.2",
|
267176
267283
|
"@inquirer/password": "4.0.18",
|
267177
|
-
"@inquirer/select": "4.3.
|
267178
|
-
"@settlemint/sdk-hasura": "2.6.2-
|
267179
|
-
"@settlemint/sdk-js": "2.6.2-
|
267180
|
-
"@settlemint/sdk-utils": "2.6.2-
|
267181
|
-
"@settlemint/sdk-viem": "2.6.2-
|
267284
|
+
"@inquirer/select": "4.3.4",
|
267285
|
+
"@settlemint/sdk-hasura": "2.6.2-prcf9bf8f3",
|
267286
|
+
"@settlemint/sdk-js": "2.6.2-prcf9bf8f3",
|
267287
|
+
"@settlemint/sdk-utils": "2.6.2-prcf9bf8f3",
|
267288
|
+
"@settlemint/sdk-viem": "2.6.2-prcf9bf8f3",
|
267182
267289
|
"@types/node": "24.4.0",
|
267183
267290
|
"@types/semver": "7.7.1",
|
267184
267291
|
"@types/which": "3.0.4",
|
@@ -267195,7 +267302,7 @@ var package_default = {
|
|
267195
267302
|
},
|
267196
267303
|
peerDependencies: {
|
267197
267304
|
hardhat: "<= 4",
|
267198
|
-
"@settlemint/sdk-js": "2.6.2-
|
267305
|
+
"@settlemint/sdk-js": "2.6.2-prcf9bf8f3"
|
267199
267306
|
},
|
267200
267307
|
peerDependenciesMeta: {
|
267201
267308
|
hardhat: {
|
@@ -273013,103 +273120,11 @@ function sanitizeName(value5, length = 35) {
|
|
273013
273120
|
}).slice(0, length).replaceAll(/(^\d*)/g, "").replaceAll(/(-$)/g, "").replaceAll(/(^-)/g, "");
|
273014
273121
|
}
|
273015
273122
|
|
273016
|
-
// ../../node_modules/.bun/@inquirer+
|
273017
|
-
var inputTheme = {
|
273018
|
-
validationFailureMode: "keep"
|
273019
|
-
};
|
273020
|
-
var esm_default2 = createPrompt((config3, done) => {
|
273021
|
-
const { required: required2, validate: validate3 = () => true, prefill = "tab" } = config3;
|
273022
|
-
const theme = makeTheme(inputTheme, config3.theme);
|
273023
|
-
const [status, setStatus] = useState("idle");
|
273024
|
-
const [defaultValue = "", setDefaultValue] = useState(config3.default);
|
273025
|
-
const [errorMsg, setError] = useState();
|
273026
|
-
const [value5, setValue] = useState("");
|
273027
|
-
const prefix = usePrefix({ status, theme });
|
273028
|
-
useKeypress(async (key2, rl) => {
|
273029
|
-
if (status !== "idle") {
|
273030
|
-
return;
|
273031
|
-
}
|
273032
|
-
if (isEnterKey(key2)) {
|
273033
|
-
const answer = value5 || defaultValue;
|
273034
|
-
setStatus("loading");
|
273035
|
-
const isValid = required2 && !answer ? "You must provide a value" : await validate3(answer);
|
273036
|
-
if (isValid === true) {
|
273037
|
-
setValue(answer);
|
273038
|
-
setStatus("done");
|
273039
|
-
done(answer);
|
273040
|
-
} else {
|
273041
|
-
if (theme.validationFailureMode === "clear") {
|
273042
|
-
setValue("");
|
273043
|
-
} else {
|
273044
|
-
rl.write(value5);
|
273045
|
-
}
|
273046
|
-
setError(isValid || "You must provide a valid value");
|
273047
|
-
setStatus("idle");
|
273048
|
-
}
|
273049
|
-
} else if (isBackspaceKey(key2) && !value5) {
|
273050
|
-
setDefaultValue(undefined);
|
273051
|
-
} else if (isTabKey(key2) && !value5) {
|
273052
|
-
setDefaultValue(undefined);
|
273053
|
-
rl.clearLine(0);
|
273054
|
-
rl.write(defaultValue);
|
273055
|
-
setValue(defaultValue);
|
273056
|
-
} else {
|
273057
|
-
setValue(rl.line);
|
273058
|
-
setError(undefined);
|
273059
|
-
}
|
273060
|
-
});
|
273061
|
-
useEffect((rl) => {
|
273062
|
-
if (prefill === "editable" && defaultValue) {
|
273063
|
-
rl.write(defaultValue);
|
273064
|
-
setValue(defaultValue);
|
273065
|
-
}
|
273066
|
-
}, []);
|
273067
|
-
const message = theme.style.message(config3.message, status);
|
273068
|
-
let formattedValue = value5;
|
273069
|
-
if (typeof config3.transformer === "function") {
|
273070
|
-
formattedValue = config3.transformer(value5, { isFinal: status === "done" });
|
273071
|
-
} else if (status === "done") {
|
273072
|
-
formattedValue = theme.style.answer(value5);
|
273073
|
-
}
|
273074
|
-
let defaultStr;
|
273075
|
-
if (defaultValue && status !== "done" && !value5) {
|
273076
|
-
defaultStr = theme.style.defaultAnswer(defaultValue);
|
273077
|
-
}
|
273078
|
-
let error48 = "";
|
273079
|
-
if (errorMsg) {
|
273080
|
-
error48 = theme.style.error(errorMsg);
|
273081
|
-
}
|
273082
|
-
return [
|
273083
|
-
[prefix, message, defaultStr, formattedValue].filter((v6) => v6 !== undefined).join(" "),
|
273084
|
-
error48
|
273085
|
-
];
|
273086
|
-
});
|
273087
|
-
|
273088
|
-
// src/prompts/smart-contract-set/subgraph-name.prompt.ts
|
273089
|
-
async function subgraphNamePrompt({
|
273090
|
-
defaultName,
|
273091
|
-
env: env2,
|
273092
|
-
accept
|
273093
|
-
}) {
|
273094
|
-
const defaultSubgraphName = defaultName ? sanitizeName(defaultName) : undefined;
|
273095
|
-
if (accept) {
|
273096
|
-
return defaultSubgraphName ?? env2.SETTLEMINT_THEGRAPH_DEFAULT_SUBGRAPH;
|
273097
|
-
}
|
273098
|
-
const subgraphName = await esm_default2({
|
273099
|
-
message: "What is the name of your subgraph?",
|
273100
|
-
default: defaultSubgraphName,
|
273101
|
-
required: true
|
273102
|
-
});
|
273103
|
-
return sanitizeName(subgraphName);
|
273104
|
-
}
|
273105
|
-
|
273106
|
-
// ../../node_modules/.bun/@inquirer+core@10.2.1+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/key.js
|
273107
|
-
var isUpKey = (key2) => key2.name === "up";
|
273108
|
-
var isDownKey = (key2) => key2.name === "down";
|
273123
|
+
// ../../node_modules/.bun/@inquirer+core@10.2.0+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/key.js
|
273109
273124
|
var isBackspaceKey2 = (key2) => key2.name === "backspace";
|
273110
|
-
var
|
273125
|
+
var isTabKey = (key2) => key2.name === "tab";
|
273111
273126
|
var isEnterKey2 = (key2) => key2.name === "enter" || key2.name === "return";
|
273112
|
-
// ../../node_modules/.bun/@inquirer+core@10.2.
|
273127
|
+
// ../../node_modules/.bun/@inquirer+core@10.2.0+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/errors.js
|
273113
273128
|
class AbortPromptError2 extends Error {
|
273114
273129
|
name = "AbortPromptError";
|
273115
273130
|
message = "Prompt was aborted";
|
@@ -273135,10 +273150,10 @@ class HookError2 extends Error {
|
|
273135
273150
|
class ValidationError2 extends Error {
|
273136
273151
|
name = "ValidationError";
|
273137
273152
|
}
|
273138
|
-
// ../../node_modules/.bun/@inquirer+core@10.2.
|
273153
|
+
// ../../node_modules/.bun/@inquirer+core@10.2.0+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/use-state.js
|
273139
273154
|
import { AsyncResource as AsyncResource5 } from "node:async_hooks";
|
273140
273155
|
|
273141
|
-
// ../../node_modules/.bun/@inquirer+core@10.2.
|
273156
|
+
// ../../node_modules/.bun/@inquirer+core@10.2.0+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/hook-engine.js
|
273142
273157
|
import { AsyncLocalStorage as AsyncLocalStorage2, AsyncResource as AsyncResource4 } from "node:async_hooks";
|
273143
273158
|
var hookStorage2 = new AsyncLocalStorage2;
|
273144
273159
|
function createStore2(rl) {
|
@@ -273243,7 +273258,7 @@ var effectScheduler2 = {
|
|
273243
273258
|
}
|
273244
273259
|
};
|
273245
273260
|
|
273246
|
-
// ../../node_modules/.bun/@inquirer+core@10.2.
|
273261
|
+
// ../../node_modules/.bun/@inquirer+core@10.2.0+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/use-state.js
|
273247
273262
|
function useState2(defaultValue) {
|
273248
273263
|
return withPointer2((pointer) => {
|
273249
273264
|
const setState = AsyncResource5.bind(function setState(newValue) {
|
@@ -273261,7 +273276,7 @@ function useState2(defaultValue) {
|
|
273261
273276
|
});
|
273262
273277
|
}
|
273263
273278
|
|
273264
|
-
// ../../node_modules/.bun/@inquirer+core@10.2.
|
273279
|
+
// ../../node_modules/.bun/@inquirer+core@10.2.0+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/use-effect.js
|
273265
273280
|
function useEffect2(cb, depArray) {
|
273266
273281
|
withPointer2((pointer) => {
|
273267
273282
|
const oldDeps = pointer.get();
|
@@ -273273,29 +273288,29 @@ function useEffect2(cb, depArray) {
|
|
273273
273288
|
});
|
273274
273289
|
}
|
273275
273290
|
|
273276
|
-
// ../../node_modules/.bun/@inquirer+core@10.2.
|
273277
|
-
var
|
273291
|
+
// ../../node_modules/.bun/@inquirer+core@10.2.0+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/theme.js
|
273292
|
+
var import_yoctocolors_cjs3 = __toESM(require_yoctocolors_cjs(), 1);
|
273278
273293
|
var defaultTheme2 = {
|
273279
273294
|
prefix: {
|
273280
|
-
idle:
|
273281
|
-
done:
|
273295
|
+
idle: import_yoctocolors_cjs3.default.blue("?"),
|
273296
|
+
done: import_yoctocolors_cjs3.default.green(esm_default.tick)
|
273282
273297
|
},
|
273283
273298
|
spinner: {
|
273284
273299
|
interval: 80,
|
273285
|
-
frames: ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"].map((frame) =>
|
273300
|
+
frames: ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"].map((frame) => import_yoctocolors_cjs3.default.yellow(frame))
|
273286
273301
|
},
|
273287
273302
|
style: {
|
273288
|
-
answer:
|
273289
|
-
message:
|
273290
|
-
error: (text2) =>
|
273291
|
-
defaultAnswer: (text2) =>
|
273292
|
-
help:
|
273293
|
-
highlight:
|
273294
|
-
key: (text2) =>
|
273303
|
+
answer: import_yoctocolors_cjs3.default.cyan,
|
273304
|
+
message: import_yoctocolors_cjs3.default.bold,
|
273305
|
+
error: (text2) => import_yoctocolors_cjs3.default.red(`> ${text2}`),
|
273306
|
+
defaultAnswer: (text2) => import_yoctocolors_cjs3.default.dim(`(${text2})`),
|
273307
|
+
help: import_yoctocolors_cjs3.default.dim,
|
273308
|
+
highlight: import_yoctocolors_cjs3.default.cyan,
|
273309
|
+
key: (text2) => import_yoctocolors_cjs3.default.cyan(import_yoctocolors_cjs3.default.bold(`<${text2}>`))
|
273295
273310
|
}
|
273296
273311
|
};
|
273297
273312
|
|
273298
|
-
// ../../node_modules/.bun/@inquirer+core@10.2.
|
273313
|
+
// ../../node_modules/.bun/@inquirer+core@10.2.0+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/make-theme.js
|
273299
273314
|
function isPlainObject4(value5) {
|
273300
273315
|
if (typeof value5 !== "object" || value5 === null)
|
273301
273316
|
return false;
|
@@ -273323,7 +273338,7 @@ function makeTheme2(...themes) {
|
|
273323
273338
|
return deepMerge3(...themesToMerge);
|
273324
273339
|
}
|
273325
273340
|
|
273326
|
-
// ../../node_modules/.bun/@inquirer+core@10.2.
|
273341
|
+
// ../../node_modules/.bun/@inquirer+core@10.2.0+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/use-prefix.js
|
273327
273342
|
function usePrefix2({ status = "idle", theme }) {
|
273328
273343
|
const [showLoader, setShowLoader] = useState2(false);
|
273329
273344
|
const [tick, setTick] = useState2(0);
|
@@ -273353,23 +273368,12 @@ function usePrefix2({ status = "idle", theme }) {
|
|
273353
273368
|
const iconName = status === "loading" ? "idle" : status;
|
273354
273369
|
return typeof prefix === "string" ? prefix : prefix[iconName] ?? prefix["idle"];
|
273355
273370
|
}
|
273356
|
-
// ../../node_modules/.bun/@inquirer+core@10.2.
|
273357
|
-
function useMemo(fn, dependencies) {
|
273358
|
-
return withPointer2((pointer) => {
|
273359
|
-
const prev = pointer.get();
|
273360
|
-
if (!prev || prev.dependencies.length !== dependencies.length || prev.dependencies.some((dep, i7) => dep !== dependencies[i7])) {
|
273361
|
-
const value5 = fn();
|
273362
|
-
pointer.set({ value: value5, dependencies });
|
273363
|
-
return value5;
|
273364
|
-
}
|
273365
|
-
return prev.value;
|
273366
|
-
});
|
273367
|
-
}
|
273368
|
-
// ../../node_modules/.bun/@inquirer+core@10.2.1+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/use-ref.js
|
273371
|
+
// ../../node_modules/.bun/@inquirer+core@10.2.0+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/use-ref.js
|
273369
273372
|
function useRef2(val) {
|
273370
273373
|
return useState2({ current: val })[0];
|
273371
273374
|
}
|
273372
|
-
|
273375
|
+
|
273376
|
+
// ../../node_modules/.bun/@inquirer+core@10.2.0+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/use-keypress.js
|
273373
273377
|
function useKeypress2(userHandler) {
|
273374
273378
|
const signal = useRef2(userHandler);
|
273375
273379
|
signal.current = userHandler;
|
@@ -273387,7 +273391,7 @@ function useKeypress2(userHandler) {
|
|
273387
273391
|
};
|
273388
273392
|
}, []);
|
273389
273393
|
}
|
273390
|
-
// ../../node_modules/.bun/@inquirer+core@10.2.
|
273394
|
+
// ../../node_modules/.bun/@inquirer+core@10.2.0+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/utils.js
|
273391
273395
|
var import_cli_width2 = __toESM(require_cli_width(), 1);
|
273392
273396
|
var import_wrap_ansi2 = __toESM(require_wrap_ansi(), 1);
|
273393
273397
|
function breakLines2(content, width) {
|
@@ -273400,86 +273404,20 @@ function readlineWidth2() {
|
|
273400
273404
|
return import_cli_width2.default({ defaultWidth: 80, output: readline3().output });
|
273401
273405
|
}
|
273402
273406
|
|
273403
|
-
// ../../node_modules/.bun/@inquirer+core@10.2.
|
273404
|
-
function usePointerPosition({ active, renderedItems, pageSize, loop }) {
|
273405
|
-
const state = useRef2({
|
273406
|
-
lastPointer: active,
|
273407
|
-
lastActive: undefined
|
273408
|
-
});
|
273409
|
-
const { lastPointer, lastActive } = state.current;
|
273410
|
-
const middle = Math.floor(pageSize / 2);
|
273411
|
-
const renderedLength = renderedItems.reduce((acc, item) => acc + item.length, 0);
|
273412
|
-
const defaultPointerPosition = renderedItems.slice(0, active).reduce((acc, item) => acc + item.length, 0);
|
273413
|
-
let pointer = defaultPointerPosition;
|
273414
|
-
if (renderedLength > pageSize) {
|
273415
|
-
if (loop) {
|
273416
|
-
pointer = lastPointer;
|
273417
|
-
if (lastActive != null && lastActive < active && active - lastActive < pageSize) {
|
273418
|
-
pointer = Math.min(middle, Math.abs(active - lastActive) === 1 ? Math.min(lastPointer + (renderedItems[lastActive]?.length ?? 0), Math.max(defaultPointerPosition, lastPointer)) : lastPointer + active - lastActive);
|
273419
|
-
}
|
273420
|
-
} else {
|
273421
|
-
const spaceUnderActive = renderedItems.slice(active).reduce((acc, item) => acc + item.length, 0);
|
273422
|
-
pointer = spaceUnderActive < pageSize - middle ? pageSize - spaceUnderActive : Math.min(defaultPointerPosition, middle);
|
273423
|
-
}
|
273424
|
-
}
|
273425
|
-
state.current.lastPointer = pointer;
|
273426
|
-
state.current.lastActive = active;
|
273427
|
-
return pointer;
|
273428
|
-
}
|
273429
|
-
function usePagination({ items, active, renderItem, pageSize, loop = true }) {
|
273430
|
-
const width = readlineWidth2();
|
273431
|
-
const bound = (num) => (num % items.length + items.length) % items.length;
|
273432
|
-
const renderedItems = items.map((item, index) => {
|
273433
|
-
if (item == null)
|
273434
|
-
return [];
|
273435
|
-
return breakLines2(renderItem({ item, index, isActive: index === active }), width).split(`
|
273436
|
-
`);
|
273437
|
-
});
|
273438
|
-
const renderedLength = renderedItems.reduce((acc, item) => acc + item.length, 0);
|
273439
|
-
const renderItemAtIndex = (index) => renderedItems[index] ?? [];
|
273440
|
-
const pointer = usePointerPosition({ active, renderedItems, pageSize, loop });
|
273441
|
-
const activeItem = renderItemAtIndex(active).slice(0, pageSize);
|
273442
|
-
const activeItemPosition = pointer + activeItem.length <= pageSize ? pointer : pageSize - activeItem.length;
|
273443
|
-
const pageBuffer = Array.from({ length: pageSize });
|
273444
|
-
pageBuffer.splice(activeItemPosition, activeItem.length, ...activeItem);
|
273445
|
-
const itemVisited = new Set([active]);
|
273446
|
-
let bufferPointer = activeItemPosition + activeItem.length;
|
273447
|
-
let itemPointer = bound(active + 1);
|
273448
|
-
while (bufferPointer < pageSize && !itemVisited.has(itemPointer) && (loop && renderedLength > pageSize ? itemPointer !== active : itemPointer > active)) {
|
273449
|
-
const lines = renderItemAtIndex(itemPointer);
|
273450
|
-
const linesToAdd = lines.slice(0, pageSize - bufferPointer);
|
273451
|
-
pageBuffer.splice(bufferPointer, linesToAdd.length, ...linesToAdd);
|
273452
|
-
itemVisited.add(itemPointer);
|
273453
|
-
bufferPointer += linesToAdd.length;
|
273454
|
-
itemPointer = bound(itemPointer + 1);
|
273455
|
-
}
|
273456
|
-
bufferPointer = activeItemPosition - 1;
|
273457
|
-
itemPointer = bound(active - 1);
|
273458
|
-
while (bufferPointer >= 0 && !itemVisited.has(itemPointer) && (loop && renderedLength > pageSize ? itemPointer !== active : itemPointer < active)) {
|
273459
|
-
const lines = renderItemAtIndex(itemPointer);
|
273460
|
-
const linesToAdd = lines.slice(Math.max(0, lines.length - bufferPointer - 1));
|
273461
|
-
pageBuffer.splice(bufferPointer - linesToAdd.length + 1, linesToAdd.length, ...linesToAdd);
|
273462
|
-
itemVisited.add(itemPointer);
|
273463
|
-
bufferPointer -= linesToAdd.length;
|
273464
|
-
itemPointer = bound(itemPointer - 1);
|
273465
|
-
}
|
273466
|
-
return pageBuffer.filter((line) => typeof line === "string").join(`
|
273467
|
-
`);
|
273468
|
-
}
|
273469
|
-
// ../../node_modules/.bun/@inquirer+core@10.2.1+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
|
273407
|
+
// ../../node_modules/.bun/@inquirer+core@10.2.0+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
|
273470
273408
|
var import_mute_stream2 = __toESM(require_lib(), 1);
|
273471
273409
|
import * as readline4 from "node:readline";
|
273472
273410
|
import { AsyncResource as AsyncResource6 } from "node:async_hooks";
|
273473
273411
|
|
273474
|
-
// ../../node_modules/.bun/@inquirer+core@10.2.
|
273475
|
-
var
|
273412
|
+
// ../../node_modules/.bun/@inquirer+core@10.2.0+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/screen-manager.js
|
273413
|
+
var import_ansi_escapes = __toESM(require_ansi_escapes(), 1);
|
273476
273414
|
import { stripVTControlCharacters as stripVTControlCharacters3 } from "node:util";
|
273477
273415
|
var height2 = (content) => content.split(`
|
273478
273416
|
`).length;
|
273479
273417
|
var lastLine2 = (content) => content.split(`
|
273480
273418
|
`).pop() ?? "";
|
273481
273419
|
function cursorDown2(n7) {
|
273482
|
-
return n7 > 0 ?
|
273420
|
+
return n7 > 0 ? import_ansi_escapes.default.cursorDown(n7) : "";
|
273483
273421
|
}
|
273484
273422
|
|
273485
273423
|
class ScreenManager2 {
|
@@ -273517,31 +273455,31 @@ class ScreenManager2 {
|
|
273517
273455
|
const promptLineUpDiff = Math.floor(rawPromptLine.length / width) - this.cursorPos.rows;
|
273518
273456
|
const bottomContentHeight = promptLineUpDiff + (bottomContent ? height2(bottomContent) : 0);
|
273519
273457
|
if (bottomContentHeight > 0)
|
273520
|
-
output +=
|
273521
|
-
output +=
|
273522
|
-
this.write(cursorDown2(this.extraLinesUnderPrompt) +
|
273458
|
+
output += import_ansi_escapes.default.cursorUp(bottomContentHeight);
|
273459
|
+
output += import_ansi_escapes.default.cursorTo(this.cursorPos.cols);
|
273460
|
+
this.write(cursorDown2(this.extraLinesUnderPrompt) + import_ansi_escapes.default.eraseLines(this.height) + output);
|
273523
273461
|
this.extraLinesUnderPrompt = bottomContentHeight;
|
273524
273462
|
this.height = height2(output);
|
273525
273463
|
}
|
273526
273464
|
checkCursorPos() {
|
273527
273465
|
const cursorPos = this.rl.getCursorPos();
|
273528
273466
|
if (cursorPos.cols !== this.cursorPos.cols) {
|
273529
|
-
this.write(
|
273467
|
+
this.write(import_ansi_escapes.default.cursorTo(cursorPos.cols));
|
273530
273468
|
this.cursorPos = cursorPos;
|
273531
273469
|
}
|
273532
273470
|
}
|
273533
273471
|
done({ clearContent }) {
|
273534
273472
|
this.rl.setPrompt("");
|
273535
273473
|
let output = cursorDown2(this.extraLinesUnderPrompt);
|
273536
|
-
output += clearContent ?
|
273474
|
+
output += clearContent ? import_ansi_escapes.default.eraseLines(this.height) : `
|
273537
273475
|
`;
|
273538
|
-
output +=
|
273476
|
+
output += import_ansi_escapes.default.cursorShow;
|
273539
273477
|
this.write(output);
|
273540
273478
|
this.rl.close();
|
273541
273479
|
}
|
273542
273480
|
}
|
273543
273481
|
|
273544
|
-
// ../../node_modules/.bun/@inquirer+core@10.2.
|
273482
|
+
// ../../node_modules/.bun/@inquirer+core@10.2.0+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/promise-polyfill.js
|
273545
273483
|
class PromisePolyfill2 extends Promise {
|
273546
273484
|
static withResolver() {
|
273547
273485
|
let resolve6;
|
@@ -273554,7 +273492,7 @@ class PromisePolyfill2 extends Promise {
|
|
273554
273492
|
}
|
273555
273493
|
}
|
273556
273494
|
|
273557
|
-
// ../../node_modules/.bun/@inquirer+core@10.2.
|
273495
|
+
// ../../node_modules/.bun/@inquirer+core@10.2.0+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
|
273558
273496
|
function getCallSites2() {
|
273559
273497
|
const _prepareStackTrace = Error.prepareStackTrace;
|
273560
273498
|
let result = [];
|
@@ -273640,23 +273578,98 @@ function createPrompt2(view) {
|
|
273640
273578
|
};
|
273641
273579
|
return prompt;
|
273642
273580
|
}
|
273643
|
-
// ../../node_modules/.bun/@inquirer+
|
273644
|
-
var
|
273645
|
-
|
273646
|
-
|
273647
|
-
|
273648
|
-
|
273649
|
-
|
273650
|
-
|
273581
|
+
// ../../node_modules/.bun/@inquirer+input@4.2.2+e9dc26b4af2fda18/node_modules/@inquirer/input/dist/esm/index.js
|
273582
|
+
var inputTheme = {
|
273583
|
+
validationFailureMode: "keep"
|
273584
|
+
};
|
273585
|
+
var esm_default2 = createPrompt2((config3, done) => {
|
273586
|
+
const { required: required2, validate: validate3 = () => true, prefill = "tab" } = config3;
|
273587
|
+
const theme = makeTheme2(inputTheme, config3.theme);
|
273588
|
+
const [status, setStatus] = useState2("idle");
|
273589
|
+
const [defaultValue = "", setDefaultValue] = useState2(config3.default);
|
273590
|
+
const [errorMsg, setError] = useState2();
|
273591
|
+
const [value5, setValue] = useState2("");
|
273592
|
+
const prefix = usePrefix2({ status, theme });
|
273593
|
+
useKeypress2(async (key3, rl) => {
|
273594
|
+
if (status !== "idle") {
|
273595
|
+
return;
|
273596
|
+
}
|
273597
|
+
if (isEnterKey2(key3)) {
|
273598
|
+
const answer = value5 || defaultValue;
|
273599
|
+
setStatus("loading");
|
273600
|
+
const isValid = required2 && !answer ? "You must provide a value" : await validate3(answer);
|
273601
|
+
if (isValid === true) {
|
273602
|
+
setValue(answer);
|
273603
|
+
setStatus("done");
|
273604
|
+
done(answer);
|
273605
|
+
} else {
|
273606
|
+
if (theme.validationFailureMode === "clear") {
|
273607
|
+
setValue("");
|
273608
|
+
} else {
|
273609
|
+
rl.write(value5);
|
273610
|
+
}
|
273611
|
+
setError(isValid || "You must provide a valid value");
|
273612
|
+
setStatus("idle");
|
273613
|
+
}
|
273614
|
+
} else if (isBackspaceKey2(key3) && !value5) {
|
273615
|
+
setDefaultValue(undefined);
|
273616
|
+
} else if (isTabKey(key3) && !value5) {
|
273617
|
+
setDefaultValue(undefined);
|
273618
|
+
rl.clearLine(0);
|
273619
|
+
rl.write(defaultValue);
|
273620
|
+
setValue(defaultValue);
|
273621
|
+
} else {
|
273622
|
+
setValue(rl.line);
|
273623
|
+
setError(undefined);
|
273651
273624
|
}
|
273625
|
+
});
|
273626
|
+
useEffect2((rl) => {
|
273627
|
+
if (prefill === "editable" && defaultValue) {
|
273628
|
+
rl.write(defaultValue);
|
273629
|
+
setValue(defaultValue);
|
273630
|
+
}
|
273631
|
+
}, []);
|
273632
|
+
const message = theme.style.message(config3.message, status);
|
273633
|
+
let formattedValue = value5;
|
273634
|
+
if (typeof config3.transformer === "function") {
|
273635
|
+
formattedValue = config3.transformer(value5, { isFinal: status === "done" });
|
273636
|
+
} else if (status === "done") {
|
273637
|
+
formattedValue = theme.style.answer(value5);
|
273652
273638
|
}
|
273653
|
-
|
273654
|
-
|
273639
|
+
let defaultStr;
|
273640
|
+
if (defaultValue && status !== "done" && !value5) {
|
273641
|
+
defaultStr = theme.style.defaultAnswer(defaultValue);
|
273642
|
+
}
|
273643
|
+
let error48 = "";
|
273644
|
+
if (errorMsg) {
|
273645
|
+
error48 = theme.style.error(errorMsg);
|
273646
|
+
}
|
273647
|
+
return [
|
273648
|
+
[prefix, message, defaultStr, formattedValue].filter((v6) => v6 !== undefined).join(" "),
|
273649
|
+
error48
|
273650
|
+
];
|
273651
|
+
});
|
273652
|
+
|
273653
|
+
// src/prompts/smart-contract-set/subgraph-name.prompt.ts
|
273654
|
+
async function subgraphNamePrompt({
|
273655
|
+
defaultName,
|
273656
|
+
env: env2,
|
273657
|
+
accept
|
273658
|
+
}) {
|
273659
|
+
const defaultSubgraphName = defaultName ? sanitizeName(defaultName) : undefined;
|
273660
|
+
if (accept) {
|
273661
|
+
return defaultSubgraphName ?? env2.SETTLEMINT_THEGRAPH_DEFAULT_SUBGRAPH;
|
273655
273662
|
}
|
273663
|
+
const subgraphName = await esm_default2({
|
273664
|
+
message: "What is the name of your subgraph?",
|
273665
|
+
default: defaultSubgraphName,
|
273666
|
+
required: true
|
273667
|
+
});
|
273668
|
+
return sanitizeName(subgraphName);
|
273656
273669
|
}
|
273657
|
-
|
273670
|
+
|
273671
|
+
// ../../node_modules/.bun/@inquirer+select@4.3.4+e9dc26b4af2fda18/node_modules/@inquirer/select/dist/esm/index.js
|
273658
273672
|
var import_yoctocolors_cjs4 = __toESM(require_yoctocolors_cjs(), 1);
|
273659
|
-
var import_ansi_escapes3 = __toESM(require_ansi_escapes(), 1);
|
273660
273673
|
var selectTheme = {
|
273661
273674
|
icon: { cursor: esm_default.pointer },
|
273662
273675
|
style: {
|
@@ -273694,19 +273707,19 @@ function normalizeChoices(choices) {
|
|
273694
273707
|
return normalizedChoice;
|
273695
273708
|
});
|
273696
273709
|
}
|
273697
|
-
var esm_default3 =
|
273710
|
+
var esm_default3 = createPrompt((config3, done) => {
|
273698
273711
|
const { loop = true, pageSize = 7 } = config3;
|
273699
|
-
const firstRender =
|
273700
|
-
const theme =
|
273701
|
-
const [status, setStatus] =
|
273702
|
-
const prefix =
|
273703
|
-
const searchTimeoutRef =
|
273712
|
+
const firstRender = useRef(true);
|
273713
|
+
const theme = makeTheme(selectTheme, config3.theme);
|
273714
|
+
const [status, setStatus] = useState("idle");
|
273715
|
+
const prefix = usePrefix({ status, theme });
|
273716
|
+
const searchTimeoutRef = useRef();
|
273704
273717
|
const items = useMemo(() => normalizeChoices(config3.choices), [config3.choices]);
|
273705
273718
|
const bounds = useMemo(() => {
|
273706
273719
|
const first = items.findIndex(isSelectable);
|
273707
273720
|
const last = items.findLastIndex(isSelectable);
|
273708
273721
|
if (first === -1) {
|
273709
|
-
throw new
|
273722
|
+
throw new ValidationError("[select prompt] No selectable choices. All choices are disabled.");
|
273710
273723
|
}
|
273711
273724
|
return { first, last };
|
273712
273725
|
}, [items]);
|
@@ -273715,11 +273728,11 @@ var esm_default3 = createPrompt2((config3, done) => {
|
|
273715
273728
|
return -1;
|
273716
273729
|
return items.findIndex((item) => isSelectable(item) && item.value === config3.default);
|
273717
273730
|
}, [config3.default, items]);
|
273718
|
-
const [active, setActive] =
|
273731
|
+
const [active, setActive] = useState(defaultItemIndex === -1 ? bounds.first : defaultItemIndex);
|
273719
273732
|
const selectedChoice = items[active];
|
273720
|
-
|
273733
|
+
useKeypress((key3, rl) => {
|
273721
273734
|
clearTimeout(searchTimeoutRef.current);
|
273722
|
-
if (
|
273735
|
+
if (isEnterKey(key3)) {
|
273723
273736
|
setStatus("done");
|
273724
273737
|
done(selectedChoice.value);
|
273725
273738
|
} else if (isUpKey(key3) || isDownKey(key3)) {
|
@@ -273748,7 +273761,7 @@ var esm_default3 = createPrompt2((config3, done) => {
|
|
273748
273761
|
searchTimeoutRef.current = setTimeout(() => {
|
273749
273762
|
rl.clearLine(0);
|
273750
273763
|
}, 700);
|
273751
|
-
} else if (
|
273764
|
+
} else if (isBackspaceKey(key3)) {
|
273752
273765
|
rl.clearLine(0);
|
273753
273766
|
} else {
|
273754
273767
|
const searchTerm = rl.line.toLowerCase();
|
@@ -273765,7 +273778,7 @@ var esm_default3 = createPrompt2((config3, done) => {
|
|
273765
273778
|
}, 700);
|
273766
273779
|
}
|
273767
273780
|
});
|
273768
|
-
|
273781
|
+
useEffect(() => () => {
|
273769
273782
|
clearTimeout(searchTimeoutRef.current);
|
273770
273783
|
}, []);
|
273771
273784
|
const message = theme.style.message(config3.message, status);
|
@@ -273807,7 +273820,7 @@ ${theme.style.help(`(${config3.instructions?.pager ?? "Use arrow keys to reveal
|
|
273807
273820
|
const choiceDescription = selectedChoice.description ? `
|
273808
273821
|
${theme.style.description(selectedChoice.description)}` : ``;
|
273809
273822
|
return `${[prefix, message, helpTipTop].filter(Boolean).join(" ")}
|
273810
|
-
${page}${helpTipBottom}${choiceDescription}${
|
273823
|
+
${page}${helpTipBottom}${choiceDescription}${cursorHide}`;
|
273811
273824
|
});
|
273812
273825
|
|
273813
273826
|
// src/prompts/smart-contract-set/subgraph.prompt.ts
|
@@ -299393,7 +299406,464 @@ function extractInfoFromBody(body) {
|
|
299393
299406
|
}
|
299394
299407
|
}
|
299395
299408
|
|
299396
|
-
// ../../node_modules/.bun/@inquirer+
|
299409
|
+
// ../../node_modules/.bun/@inquirer+core@10.2.1+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/key.js
|
299410
|
+
var isTabKey2 = (key3) => key3.name === "tab";
|
299411
|
+
var isEnterKey3 = (key3) => key3.name === "enter" || key3.name === "return";
|
299412
|
+
// ../../node_modules/.bun/@inquirer+core@10.2.1+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/errors.js
|
299413
|
+
class AbortPromptError3 extends Error {
|
299414
|
+
name = "AbortPromptError";
|
299415
|
+
message = "Prompt was aborted";
|
299416
|
+
constructor(options) {
|
299417
|
+
super();
|
299418
|
+
this.cause = options?.cause;
|
299419
|
+
}
|
299420
|
+
}
|
299421
|
+
|
299422
|
+
class CancelPromptError3 extends Error {
|
299423
|
+
name = "CancelPromptError";
|
299424
|
+
message = "Prompt was canceled";
|
299425
|
+
}
|
299426
|
+
|
299427
|
+
class ExitPromptError3 extends Error {
|
299428
|
+
name = "ExitPromptError";
|
299429
|
+
}
|
299430
|
+
|
299431
|
+
class HookError3 extends Error {
|
299432
|
+
name = "HookError";
|
299433
|
+
}
|
299434
|
+
|
299435
|
+
class ValidationError3 extends Error {
|
299436
|
+
name = "ValidationError";
|
299437
|
+
}
|
299438
|
+
// ../../node_modules/.bun/@inquirer+core@10.2.1+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/use-state.js
|
299439
|
+
import { AsyncResource as AsyncResource8 } from "node:async_hooks";
|
299440
|
+
|
299441
|
+
// ../../node_modules/.bun/@inquirer+core@10.2.1+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/hook-engine.js
|
299442
|
+
import { AsyncLocalStorage as AsyncLocalStorage3, AsyncResource as AsyncResource7 } from "node:async_hooks";
|
299443
|
+
var hookStorage3 = new AsyncLocalStorage3;
|
299444
|
+
function createStore3(rl) {
|
299445
|
+
const store = {
|
299446
|
+
rl,
|
299447
|
+
hooks: [],
|
299448
|
+
hooksCleanup: [],
|
299449
|
+
hooksEffect: [],
|
299450
|
+
index: 0,
|
299451
|
+
handleChange() {}
|
299452
|
+
};
|
299453
|
+
return store;
|
299454
|
+
}
|
299455
|
+
function withHooks3(rl, cb) {
|
299456
|
+
const store = createStore3(rl);
|
299457
|
+
return hookStorage3.run(store, () => {
|
299458
|
+
function cycle(render) {
|
299459
|
+
store.handleChange = () => {
|
299460
|
+
store.index = 0;
|
299461
|
+
render();
|
299462
|
+
};
|
299463
|
+
store.handleChange();
|
299464
|
+
}
|
299465
|
+
return cb(cycle);
|
299466
|
+
});
|
299467
|
+
}
|
299468
|
+
function getStore3() {
|
299469
|
+
const store = hookStorage3.getStore();
|
299470
|
+
if (!store) {
|
299471
|
+
throw new HookError3("[Inquirer] Hook functions can only be called from within a prompt");
|
299472
|
+
}
|
299473
|
+
return store;
|
299474
|
+
}
|
299475
|
+
function readline5() {
|
299476
|
+
return getStore3().rl;
|
299477
|
+
}
|
299478
|
+
function withUpdates3(fn) {
|
299479
|
+
const wrapped = (...args) => {
|
299480
|
+
const store = getStore3();
|
299481
|
+
let shouldUpdate = false;
|
299482
|
+
const oldHandleChange = store.handleChange;
|
299483
|
+
store.handleChange = () => {
|
299484
|
+
shouldUpdate = true;
|
299485
|
+
};
|
299486
|
+
const returnValue = fn(...args);
|
299487
|
+
if (shouldUpdate) {
|
299488
|
+
oldHandleChange();
|
299489
|
+
}
|
299490
|
+
store.handleChange = oldHandleChange;
|
299491
|
+
return returnValue;
|
299492
|
+
};
|
299493
|
+
return AsyncResource7.bind(wrapped);
|
299494
|
+
}
|
299495
|
+
function withPointer3(cb) {
|
299496
|
+
const store = getStore3();
|
299497
|
+
const { index: index2 } = store;
|
299498
|
+
const pointer = {
|
299499
|
+
get() {
|
299500
|
+
return store.hooks[index2];
|
299501
|
+
},
|
299502
|
+
set(value5) {
|
299503
|
+
store.hooks[index2] = value5;
|
299504
|
+
},
|
299505
|
+
initialized: index2 in store.hooks
|
299506
|
+
};
|
299507
|
+
const returnValue = cb(pointer);
|
299508
|
+
store.index++;
|
299509
|
+
return returnValue;
|
299510
|
+
}
|
299511
|
+
function handleChange3() {
|
299512
|
+
getStore3().handleChange();
|
299513
|
+
}
|
299514
|
+
var effectScheduler3 = {
|
299515
|
+
queue(cb) {
|
299516
|
+
const store = getStore3();
|
299517
|
+
const { index: index2 } = store;
|
299518
|
+
store.hooksEffect.push(() => {
|
299519
|
+
store.hooksCleanup[index2]?.();
|
299520
|
+
const cleanFn = cb(readline5());
|
299521
|
+
if (cleanFn != null && typeof cleanFn !== "function") {
|
299522
|
+
throw new ValidationError3("useEffect return value must be a cleanup function or nothing.");
|
299523
|
+
}
|
299524
|
+
store.hooksCleanup[index2] = cleanFn;
|
299525
|
+
});
|
299526
|
+
},
|
299527
|
+
run() {
|
299528
|
+
const store = getStore3();
|
299529
|
+
withUpdates3(() => {
|
299530
|
+
store.hooksEffect.forEach((effect) => {
|
299531
|
+
effect();
|
299532
|
+
});
|
299533
|
+
store.hooksEffect.length = 0;
|
299534
|
+
})();
|
299535
|
+
},
|
299536
|
+
clearAll() {
|
299537
|
+
const store = getStore3();
|
299538
|
+
store.hooksCleanup.forEach((cleanFn) => {
|
299539
|
+
cleanFn?.();
|
299540
|
+
});
|
299541
|
+
store.hooksEffect.length = 0;
|
299542
|
+
store.hooksCleanup.length = 0;
|
299543
|
+
}
|
299544
|
+
};
|
299545
|
+
|
299546
|
+
// ../../node_modules/.bun/@inquirer+core@10.2.1+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/use-state.js
|
299547
|
+
function useState3(defaultValue) {
|
299548
|
+
return withPointer3((pointer) => {
|
299549
|
+
const setState = AsyncResource8.bind(function setState(newValue) {
|
299550
|
+
if (pointer.get() !== newValue) {
|
299551
|
+
pointer.set(newValue);
|
299552
|
+
handleChange3();
|
299553
|
+
}
|
299554
|
+
});
|
299555
|
+
if (pointer.initialized) {
|
299556
|
+
return [pointer.get(), setState];
|
299557
|
+
}
|
299558
|
+
const value5 = typeof defaultValue === "function" ? defaultValue() : defaultValue;
|
299559
|
+
pointer.set(value5);
|
299560
|
+
return [value5, setState];
|
299561
|
+
});
|
299562
|
+
}
|
299563
|
+
|
299564
|
+
// ../../node_modules/.bun/@inquirer+core@10.2.1+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/use-effect.js
|
299565
|
+
function useEffect3(cb, depArray) {
|
299566
|
+
withPointer3((pointer) => {
|
299567
|
+
const oldDeps = pointer.get();
|
299568
|
+
const hasChanged = !Array.isArray(oldDeps) || depArray.some((dep, i7) => !Object.is(dep, oldDeps[i7]));
|
299569
|
+
if (hasChanged) {
|
299570
|
+
effectScheduler3.queue(cb);
|
299571
|
+
}
|
299572
|
+
pointer.set(depArray);
|
299573
|
+
});
|
299574
|
+
}
|
299575
|
+
|
299576
|
+
// ../../node_modules/.bun/@inquirer+core@10.2.1+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/theme.js
|
299577
|
+
var import_yoctocolors_cjs5 = __toESM(require_yoctocolors_cjs(), 1);
|
299578
|
+
var defaultTheme3 = {
|
299579
|
+
prefix: {
|
299580
|
+
idle: import_yoctocolors_cjs5.default.blue("?"),
|
299581
|
+
done: import_yoctocolors_cjs5.default.green(esm_default.tick)
|
299582
|
+
},
|
299583
|
+
spinner: {
|
299584
|
+
interval: 80,
|
299585
|
+
frames: ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"].map((frame) => import_yoctocolors_cjs5.default.yellow(frame))
|
299586
|
+
},
|
299587
|
+
style: {
|
299588
|
+
answer: import_yoctocolors_cjs5.default.cyan,
|
299589
|
+
message: import_yoctocolors_cjs5.default.bold,
|
299590
|
+
error: (text2) => import_yoctocolors_cjs5.default.red(`> ${text2}`),
|
299591
|
+
defaultAnswer: (text2) => import_yoctocolors_cjs5.default.dim(`(${text2})`),
|
299592
|
+
help: import_yoctocolors_cjs5.default.dim,
|
299593
|
+
highlight: import_yoctocolors_cjs5.default.cyan,
|
299594
|
+
key: (text2) => import_yoctocolors_cjs5.default.cyan(import_yoctocolors_cjs5.default.bold(`<${text2}>`))
|
299595
|
+
}
|
299596
|
+
};
|
299597
|
+
|
299598
|
+
// ../../node_modules/.bun/@inquirer+core@10.2.1+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/make-theme.js
|
299599
|
+
function isPlainObject5(value5) {
|
299600
|
+
if (typeof value5 !== "object" || value5 === null)
|
299601
|
+
return false;
|
299602
|
+
let proto = value5;
|
299603
|
+
while (Object.getPrototypeOf(proto) !== null) {
|
299604
|
+
proto = Object.getPrototypeOf(proto);
|
299605
|
+
}
|
299606
|
+
return Object.getPrototypeOf(value5) === proto;
|
299607
|
+
}
|
299608
|
+
function deepMerge4(...objects) {
|
299609
|
+
const output = {};
|
299610
|
+
for (const obj of objects) {
|
299611
|
+
for (const [key3, value5] of Object.entries(obj)) {
|
299612
|
+
const prevValue = output[key3];
|
299613
|
+
output[key3] = isPlainObject5(prevValue) && isPlainObject5(value5) ? deepMerge4(prevValue, value5) : value5;
|
299614
|
+
}
|
299615
|
+
}
|
299616
|
+
return output;
|
299617
|
+
}
|
299618
|
+
function makeTheme3(...themes) {
|
299619
|
+
const themesToMerge = [
|
299620
|
+
defaultTheme3,
|
299621
|
+
...themes.filter((theme) => theme != null)
|
299622
|
+
];
|
299623
|
+
return deepMerge4(...themesToMerge);
|
299624
|
+
}
|
299625
|
+
|
299626
|
+
// ../../node_modules/.bun/@inquirer+core@10.2.1+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/use-prefix.js
|
299627
|
+
function usePrefix3({ status = "idle", theme }) {
|
299628
|
+
const [showLoader, setShowLoader] = useState3(false);
|
299629
|
+
const [tick, setTick] = useState3(0);
|
299630
|
+
const { prefix, spinner: spinner2 } = makeTheme3(theme);
|
299631
|
+
useEffect3(() => {
|
299632
|
+
if (status === "loading") {
|
299633
|
+
let tickInterval;
|
299634
|
+
let inc = -1;
|
299635
|
+
const delayTimeout = setTimeout(() => {
|
299636
|
+
setShowLoader(true);
|
299637
|
+
tickInterval = setInterval(() => {
|
299638
|
+
inc = inc + 1;
|
299639
|
+
setTick(inc % spinner2.frames.length);
|
299640
|
+
}, spinner2.interval);
|
299641
|
+
}, 300);
|
299642
|
+
return () => {
|
299643
|
+
clearTimeout(delayTimeout);
|
299644
|
+
clearInterval(tickInterval);
|
299645
|
+
};
|
299646
|
+
} else {
|
299647
|
+
setShowLoader(false);
|
299648
|
+
}
|
299649
|
+
}, [status]);
|
299650
|
+
if (showLoader) {
|
299651
|
+
return spinner2.frames[tick];
|
299652
|
+
}
|
299653
|
+
const iconName = status === "loading" ? "idle" : status;
|
299654
|
+
return typeof prefix === "string" ? prefix : prefix[iconName] ?? prefix["idle"];
|
299655
|
+
}
|
299656
|
+
// ../../node_modules/.bun/@inquirer+core@10.2.1+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/use-ref.js
|
299657
|
+
function useRef3(val) {
|
299658
|
+
return useState3({ current: val })[0];
|
299659
|
+
}
|
299660
|
+
|
299661
|
+
// ../../node_modules/.bun/@inquirer+core@10.2.1+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/use-keypress.js
|
299662
|
+
function useKeypress3(userHandler) {
|
299663
|
+
const signal = useRef3(userHandler);
|
299664
|
+
signal.current = userHandler;
|
299665
|
+
useEffect3((rl) => {
|
299666
|
+
let ignore = false;
|
299667
|
+
const handler = withUpdates3((_input, event) => {
|
299668
|
+
if (ignore)
|
299669
|
+
return;
|
299670
|
+
signal.current(event, rl);
|
299671
|
+
});
|
299672
|
+
rl.input.on("keypress", handler);
|
299673
|
+
return () => {
|
299674
|
+
ignore = true;
|
299675
|
+
rl.input.removeListener("keypress", handler);
|
299676
|
+
};
|
299677
|
+
}, []);
|
299678
|
+
}
|
299679
|
+
// ../../node_modules/.bun/@inquirer+core@10.2.1+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/utils.js
|
299680
|
+
var import_cli_width3 = __toESM(require_cli_width(), 1);
|
299681
|
+
var import_wrap_ansi3 = __toESM(require_wrap_ansi(), 1);
|
299682
|
+
function breakLines3(content, width) {
|
299683
|
+
return content.split(`
|
299684
|
+
`).flatMap((line) => import_wrap_ansi3.default(line, width, { trim: false, hard: true }).split(`
|
299685
|
+
`).map((str) => str.trimEnd())).join(`
|
299686
|
+
`);
|
299687
|
+
}
|
299688
|
+
function readlineWidth3() {
|
299689
|
+
return import_cli_width3.default({ defaultWidth: 80, output: readline5().output });
|
299690
|
+
}
|
299691
|
+
|
299692
|
+
// ../../node_modules/.bun/@inquirer+core@10.2.1+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
|
299693
|
+
var import_mute_stream3 = __toESM(require_lib(), 1);
|
299694
|
+
import * as readline6 from "node:readline";
|
299695
|
+
import { AsyncResource as AsyncResource9 } from "node:async_hooks";
|
299696
|
+
|
299697
|
+
// ../../node_modules/.bun/@inquirer+core@10.2.1+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/screen-manager.js
|
299698
|
+
var import_ansi_escapes2 = __toESM(require_ansi_escapes(), 1);
|
299699
|
+
import { stripVTControlCharacters as stripVTControlCharacters4 } from "node:util";
|
299700
|
+
var height3 = (content) => content.split(`
|
299701
|
+
`).length;
|
299702
|
+
var lastLine3 = (content) => content.split(`
|
299703
|
+
`).pop() ?? "";
|
299704
|
+
function cursorDown3(n7) {
|
299705
|
+
return n7 > 0 ? import_ansi_escapes2.default.cursorDown(n7) : "";
|
299706
|
+
}
|
299707
|
+
|
299708
|
+
class ScreenManager3 {
|
299709
|
+
height = 0;
|
299710
|
+
extraLinesUnderPrompt = 0;
|
299711
|
+
cursorPos;
|
299712
|
+
rl;
|
299713
|
+
constructor(rl) {
|
299714
|
+
this.rl = rl;
|
299715
|
+
this.cursorPos = rl.getCursorPos();
|
299716
|
+
}
|
299717
|
+
write(content) {
|
299718
|
+
this.rl.output.unmute();
|
299719
|
+
this.rl.output.write(content);
|
299720
|
+
this.rl.output.mute();
|
299721
|
+
}
|
299722
|
+
render(content, bottomContent = "") {
|
299723
|
+
const promptLine = lastLine3(content);
|
299724
|
+
const rawPromptLine = stripVTControlCharacters4(promptLine);
|
299725
|
+
let prompt = rawPromptLine;
|
299726
|
+
if (this.rl.line.length > 0) {
|
299727
|
+
prompt = prompt.slice(0, -this.rl.line.length);
|
299728
|
+
}
|
299729
|
+
this.rl.setPrompt(prompt);
|
299730
|
+
this.cursorPos = this.rl.getCursorPos();
|
299731
|
+
const width = readlineWidth3();
|
299732
|
+
content = breakLines3(content, width);
|
299733
|
+
bottomContent = breakLines3(bottomContent, width);
|
299734
|
+
if (rawPromptLine.length % width === 0) {
|
299735
|
+
content += `
|
299736
|
+
`;
|
299737
|
+
}
|
299738
|
+
let output = content + (bottomContent ? `
|
299739
|
+
` + bottomContent : "");
|
299740
|
+
const promptLineUpDiff = Math.floor(rawPromptLine.length / width) - this.cursorPos.rows;
|
299741
|
+
const bottomContentHeight = promptLineUpDiff + (bottomContent ? height3(bottomContent) : 0);
|
299742
|
+
if (bottomContentHeight > 0)
|
299743
|
+
output += import_ansi_escapes2.default.cursorUp(bottomContentHeight);
|
299744
|
+
output += import_ansi_escapes2.default.cursorTo(this.cursorPos.cols);
|
299745
|
+
this.write(cursorDown3(this.extraLinesUnderPrompt) + import_ansi_escapes2.default.eraseLines(this.height) + output);
|
299746
|
+
this.extraLinesUnderPrompt = bottomContentHeight;
|
299747
|
+
this.height = height3(output);
|
299748
|
+
}
|
299749
|
+
checkCursorPos() {
|
299750
|
+
const cursorPos = this.rl.getCursorPos();
|
299751
|
+
if (cursorPos.cols !== this.cursorPos.cols) {
|
299752
|
+
this.write(import_ansi_escapes2.default.cursorTo(cursorPos.cols));
|
299753
|
+
this.cursorPos = cursorPos;
|
299754
|
+
}
|
299755
|
+
}
|
299756
|
+
done({ clearContent }) {
|
299757
|
+
this.rl.setPrompt("");
|
299758
|
+
let output = cursorDown3(this.extraLinesUnderPrompt);
|
299759
|
+
output += clearContent ? import_ansi_escapes2.default.eraseLines(this.height) : `
|
299760
|
+
`;
|
299761
|
+
output += import_ansi_escapes2.default.cursorShow;
|
299762
|
+
this.write(output);
|
299763
|
+
this.rl.close();
|
299764
|
+
}
|
299765
|
+
}
|
299766
|
+
|
299767
|
+
// ../../node_modules/.bun/@inquirer+core@10.2.1+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/promise-polyfill.js
|
299768
|
+
class PromisePolyfill3 extends Promise {
|
299769
|
+
static withResolver() {
|
299770
|
+
let resolve7;
|
299771
|
+
let reject;
|
299772
|
+
const promise2 = new Promise((res, rej) => {
|
299773
|
+
resolve7 = res;
|
299774
|
+
reject = rej;
|
299775
|
+
});
|
299776
|
+
return { promise: promise2, resolve: resolve7, reject };
|
299777
|
+
}
|
299778
|
+
}
|
299779
|
+
|
299780
|
+
// ../../node_modules/.bun/@inquirer+core@10.2.1+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
|
299781
|
+
function getCallSites3() {
|
299782
|
+
const _prepareStackTrace = Error.prepareStackTrace;
|
299783
|
+
let result = [];
|
299784
|
+
try {
|
299785
|
+
Error.prepareStackTrace = (_5, callSites) => {
|
299786
|
+
const callSitesWithoutCurrent = callSites.slice(1);
|
299787
|
+
result = callSitesWithoutCurrent;
|
299788
|
+
return callSitesWithoutCurrent;
|
299789
|
+
};
|
299790
|
+
new Error().stack;
|
299791
|
+
} catch {
|
299792
|
+
return result;
|
299793
|
+
}
|
299794
|
+
Error.prepareStackTrace = _prepareStackTrace;
|
299795
|
+
return result;
|
299796
|
+
}
|
299797
|
+
function createPrompt3(view) {
|
299798
|
+
const callSites = getCallSites3();
|
299799
|
+
const prompt = (config3, context = {}) => {
|
299800
|
+
const { input = process.stdin, signal } = context;
|
299801
|
+
const cleanups = new Set;
|
299802
|
+
const output = new import_mute_stream3.default;
|
299803
|
+
output.pipe(context.output ?? process.stdout);
|
299804
|
+
const rl = readline6.createInterface({
|
299805
|
+
terminal: true,
|
299806
|
+
input,
|
299807
|
+
output
|
299808
|
+
});
|
299809
|
+
const screen = new ScreenManager3(rl);
|
299810
|
+
const { promise: promise2, resolve: resolve7, reject } = PromisePolyfill3.withResolver();
|
299811
|
+
const cancel3 = () => reject(new CancelPromptError3);
|
299812
|
+
if (signal) {
|
299813
|
+
const abort = () => reject(new AbortPromptError3({ cause: signal.reason }));
|
299814
|
+
if (signal.aborted) {
|
299815
|
+
abort();
|
299816
|
+
return Object.assign(promise2, { cancel: cancel3 });
|
299817
|
+
}
|
299818
|
+
signal.addEventListener("abort", abort);
|
299819
|
+
cleanups.add(() => signal.removeEventListener("abort", abort));
|
299820
|
+
}
|
299821
|
+
cleanups.add(onExit((code2, signal2) => {
|
299822
|
+
reject(new ExitPromptError3(`User force closed the prompt with ${code2} ${signal2}`));
|
299823
|
+
}));
|
299824
|
+
const sigint = () => reject(new ExitPromptError3(`User force closed the prompt with SIGINT`));
|
299825
|
+
rl.on("SIGINT", sigint);
|
299826
|
+
cleanups.add(() => rl.removeListener("SIGINT", sigint));
|
299827
|
+
const checkCursorPos = () => screen.checkCursorPos();
|
299828
|
+
rl.input.on("keypress", checkCursorPos);
|
299829
|
+
cleanups.add(() => rl.input.removeListener("keypress", checkCursorPos));
|
299830
|
+
return withHooks3(rl, (cycle) => {
|
299831
|
+
const hooksCleanup = AsyncResource9.bind(() => effectScheduler3.clearAll());
|
299832
|
+
rl.on("close", hooksCleanup);
|
299833
|
+
cleanups.add(() => rl.removeListener("close", hooksCleanup));
|
299834
|
+
cycle(() => {
|
299835
|
+
try {
|
299836
|
+
const nextView = view(config3, (value5) => {
|
299837
|
+
setImmediate(() => resolve7(value5));
|
299838
|
+
});
|
299839
|
+
if (nextView === undefined) {
|
299840
|
+
const callerFilename = callSites[1]?.getFileName();
|
299841
|
+
throw new Error(`Prompt functions must return a string.
|
299842
|
+
at ${callerFilename}`);
|
299843
|
+
}
|
299844
|
+
const [content, bottomContent] = typeof nextView === "string" ? [nextView] : nextView;
|
299845
|
+
screen.render(content, bottomContent);
|
299846
|
+
effectScheduler3.run();
|
299847
|
+
} catch (error48) {
|
299848
|
+
reject(error48);
|
299849
|
+
}
|
299850
|
+
});
|
299851
|
+
return Object.assign(promise2.then((answer) => {
|
299852
|
+
effectScheduler3.clearAll();
|
299853
|
+
return answer;
|
299854
|
+
}, (error48) => {
|
299855
|
+
effectScheduler3.clearAll();
|
299856
|
+
throw error48;
|
299857
|
+
}).finally(() => {
|
299858
|
+
cleanups.forEach((cleanup) => cleanup());
|
299859
|
+
screen.done({ clearContent: Boolean(context.clearPromptOnDone) });
|
299860
|
+
output.end();
|
299861
|
+
}).then(() => promise2), { cancel: cancel3 });
|
299862
|
+
});
|
299863
|
+
};
|
299864
|
+
return prompt;
|
299865
|
+
}
|
299866
|
+
// ../../node_modules/.bun/@inquirer+confirm@5.1.17+e9dc26b4af2fda18/node_modules/@inquirer/confirm/dist/esm/index.js
|
299397
299867
|
function getBooleanValue(value5, defaultValue) {
|
299398
299868
|
let answer = defaultValue !== false;
|
299399
299869
|
if (/^(y|yes)/i.test(value5))
|
@@ -299405,21 +299875,21 @@ function getBooleanValue(value5, defaultValue) {
|
|
299405
299875
|
function boolToString(value5) {
|
299406
299876
|
return value5 ? "Yes" : "No";
|
299407
299877
|
}
|
299408
|
-
var esm_default4 =
|
299878
|
+
var esm_default4 = createPrompt3((config3, done) => {
|
299409
299879
|
const { transformer = boolToString } = config3;
|
299410
|
-
const [status, setStatus] =
|
299411
|
-
const [value5, setValue] =
|
299412
|
-
const theme =
|
299413
|
-
const prefix =
|
299414
|
-
|
299880
|
+
const [status, setStatus] = useState3("idle");
|
299881
|
+
const [value5, setValue] = useState3("");
|
299882
|
+
const theme = makeTheme3(config3.theme);
|
299883
|
+
const prefix = usePrefix3({ status, theme });
|
299884
|
+
useKeypress3((key4, rl) => {
|
299415
299885
|
if (status !== "idle")
|
299416
299886
|
return;
|
299417
|
-
if (
|
299887
|
+
if (isEnterKey3(key4)) {
|
299418
299888
|
const answer = getBooleanValue(value5, config3.default);
|
299419
299889
|
setValue(transformer(answer));
|
299420
299890
|
setStatus("done");
|
299421
299891
|
done(answer);
|
299422
|
-
} else if (
|
299892
|
+
} else if (isTabKey2(key4)) {
|
299423
299893
|
const answer = boolToString(!getBooleanValue(value5, config3.default));
|
299424
299894
|
rl.clearLine(0);
|
299425
299895
|
rl.write(answer);
|
@@ -299440,19 +299910,19 @@ var esm_default4 = createPrompt((config3, done) => {
|
|
299440
299910
|
});
|
299441
299911
|
|
299442
299912
|
// ../../node_modules/.bun/@inquirer+password@4.0.18+e9dc26b4af2fda18/node_modules/@inquirer/password/dist/esm/index.js
|
299443
|
-
var
|
299444
|
-
var esm_default5 =
|
299913
|
+
var import_ansi_escapes3 = __toESM(require_ansi_escapes(), 1);
|
299914
|
+
var esm_default5 = createPrompt2((config3, done) => {
|
299445
299915
|
const { validate: validate8 = () => true } = config3;
|
299446
|
-
const theme =
|
299447
|
-
const [status, setStatus] =
|
299448
|
-
const [errorMsg, setError] =
|
299449
|
-
const [value5, setValue] =
|
299450
|
-
const prefix =
|
299451
|
-
|
299916
|
+
const theme = makeTheme2(config3.theme);
|
299917
|
+
const [status, setStatus] = useState2("idle");
|
299918
|
+
const [errorMsg, setError] = useState2();
|
299919
|
+
const [value5, setValue] = useState2("");
|
299920
|
+
const prefix = usePrefix2({ status, theme });
|
299921
|
+
useKeypress2(async (key4, rl) => {
|
299452
299922
|
if (status !== "idle") {
|
299453
299923
|
return;
|
299454
299924
|
}
|
299455
|
-
if (
|
299925
|
+
if (isEnterKey2(key4)) {
|
299456
299926
|
const answer = value5;
|
299457
299927
|
setStatus("loading");
|
299458
299928
|
const isValid = await validate8(answer);
|
@@ -299477,7 +299947,7 @@ var esm_default5 = createPrompt((config3, done) => {
|
|
299477
299947
|
const maskChar = typeof config3.mask === "string" ? config3.mask : "*";
|
299478
299948
|
formattedValue = maskChar.repeat(value5.length);
|
299479
299949
|
} else if (status !== "done") {
|
299480
|
-
helpTip = `${theme.style.help("[input is masked]")}${
|
299950
|
+
helpTip = `${theme.style.help("[input is masked]")}${import_ansi_escapes3.default.cursorHide}`;
|
299481
299951
|
}
|
299482
299952
|
if (status === "done") {
|
299483
299953
|
formattedValue = theme.style.answer(formattedValue);
|
@@ -301155,7 +301625,7 @@ var basename2 = function(p5, extension) {
|
|
301155
301625
|
return extension && lastSegment.endsWith(extension) ? lastSegment.slice(0, -extension.length) : lastSegment;
|
301156
301626
|
};
|
301157
301627
|
// ../../node_modules/.bun/defu@6.1.4/node_modules/defu/dist/defu.mjs
|
301158
|
-
function
|
301628
|
+
function isPlainObject6(value5) {
|
301159
301629
|
if (value5 === null || typeof value5 !== "object") {
|
301160
301630
|
return false;
|
301161
301631
|
}
|
@@ -301172,27 +301642,27 @@ function isPlainObject5(value5) {
|
|
301172
301642
|
return true;
|
301173
301643
|
}
|
301174
301644
|
function _defu(baseObject, defaults2, namespace = ".", merger) {
|
301175
|
-
if (!
|
301645
|
+
if (!isPlainObject6(defaults2)) {
|
301176
301646
|
return _defu(baseObject, {}, namespace, merger);
|
301177
301647
|
}
|
301178
301648
|
const object2 = Object.assign({}, defaults2);
|
301179
|
-
for (const
|
301180
|
-
if (
|
301649
|
+
for (const key4 in baseObject) {
|
301650
|
+
if (key4 === "__proto__" || key4 === "constructor") {
|
301181
301651
|
continue;
|
301182
301652
|
}
|
301183
|
-
const value5 = baseObject[
|
301653
|
+
const value5 = baseObject[key4];
|
301184
301654
|
if (value5 === null || value5 === undefined) {
|
301185
301655
|
continue;
|
301186
301656
|
}
|
301187
|
-
if (merger && merger(object2,
|
301657
|
+
if (merger && merger(object2, key4, value5, namespace)) {
|
301188
301658
|
continue;
|
301189
301659
|
}
|
301190
|
-
if (Array.isArray(value5) && Array.isArray(object2[
|
301191
|
-
object2[
|
301192
|
-
} else if (
|
301193
|
-
object2[
|
301660
|
+
if (Array.isArray(value5) && Array.isArray(object2[key4])) {
|
301661
|
+
object2[key4] = [...value5, ...object2[key4]];
|
301662
|
+
} else if (isPlainObject6(value5) && isPlainObject6(object2[key4])) {
|
301663
|
+
object2[key4] = _defu(value5, object2[key4], (namespace ? `${namespace}.` : "") + key4.toString(), merger);
|
301194
301664
|
} else {
|
301195
|
-
object2[
|
301665
|
+
object2[key4] = value5;
|
301196
301666
|
}
|
301197
301667
|
}
|
301198
301668
|
return object2;
|
@@ -301201,15 +301671,15 @@ function createDefu(merger) {
|
|
301201
301671
|
return (...arguments_5) => arguments_5.reduce((p5, c3) => _defu(p5, c3, "", merger), {});
|
301202
301672
|
}
|
301203
301673
|
var defu = createDefu();
|
301204
|
-
var defuFn = createDefu((object2,
|
301205
|
-
if (object2[
|
301206
|
-
object2[
|
301674
|
+
var defuFn = createDefu((object2, key4, currentValue) => {
|
301675
|
+
if (object2[key4] !== undefined && typeof currentValue === "function") {
|
301676
|
+
object2[key4] = currentValue(object2[key4]);
|
301207
301677
|
return true;
|
301208
301678
|
}
|
301209
301679
|
});
|
301210
|
-
var defuArrayFn = createDefu((object2,
|
301211
|
-
if (Array.isArray(object2[
|
301212
|
-
object2[
|
301680
|
+
var defuArrayFn = createDefu((object2, key4, currentValue) => {
|
301681
|
+
if (Array.isArray(object2[key4]) && typeof currentValue === "function") {
|
301682
|
+
object2[key4] = currentValue(object2[key4]);
|
301213
301683
|
return true;
|
301214
301684
|
}
|
301215
301685
|
});
|
@@ -303915,11 +304385,11 @@ function cacheDirectory() {
|
|
303915
304385
|
}
|
303916
304386
|
function normalizeHeaders(headers = {}) {
|
303917
304387
|
const normalized = {};
|
303918
|
-
for (const [
|
304388
|
+
for (const [key4, value5] of Object.entries(headers)) {
|
303919
304389
|
if (!value5) {
|
303920
304390
|
continue;
|
303921
304391
|
}
|
303922
|
-
normalized[
|
304392
|
+
normalized[key4.toLowerCase()] = value5;
|
303923
304393
|
}
|
303924
304394
|
return normalized;
|
303925
304395
|
}
|
@@ -307168,7 +307638,7 @@ function jsonOutput(data) {
|
|
307168
307638
|
var composer = require_composer();
|
307169
307639
|
var Document = require_Document();
|
307170
307640
|
var Schema = require_Schema();
|
307171
|
-
var
|
307641
|
+
var errors6 = require_errors3();
|
307172
307642
|
var Alias = require_Alias();
|
307173
307643
|
var identity2 = require_identity();
|
307174
307644
|
var Pair = require_Pair();
|
@@ -307184,9 +307654,9 @@ var visit2 = require_visit();
|
|
307184
307654
|
var $Composer = composer.Composer;
|
307185
307655
|
var $Document = Document.Document;
|
307186
307656
|
var $Schema = Schema.Schema;
|
307187
|
-
var $YAMLError =
|
307188
|
-
var $YAMLParseError =
|
307189
|
-
var $YAMLWarning =
|
307657
|
+
var $YAMLError = errors6.YAMLError;
|
307658
|
+
var $YAMLParseError = errors6.YAMLParseError;
|
307659
|
+
var $YAMLWarning = errors6.YAMLWarning;
|
307190
307660
|
var $Alias = Alias.Alias;
|
307191
307661
|
var $isAlias = identity2.isAlias;
|
307192
307662
|
var $isCollection = identity2.isCollection;
|
@@ -307793,11 +308263,11 @@ function createCommand4() {
|
|
307793
308263
|
|
307794
308264
|
// src/utils/commands/passthrough-options.ts
|
307795
308265
|
function mapPassthroughOptions(options, command) {
|
307796
|
-
const optionArgs = Object.entries(options).map(([
|
308266
|
+
const optionArgs = Object.entries(options).map(([key4, value5]) => {
|
307797
308267
|
if (value5 === true) {
|
307798
|
-
return `--${
|
308268
|
+
return `--${key4}`;
|
307799
308269
|
}
|
307800
|
-
return `--${
|
308270
|
+
return `--${key4}=${value5}`;
|
307801
308271
|
});
|
307802
308272
|
return [...optionArgs, ...command.args];
|
307803
308273
|
}
|
@@ -309050,4 +309520,4 @@ async function sdkCliCommand(argv = process.argv) {
|
|
309050
309520
|
// src/cli.ts
|
309051
309521
|
sdkCliCommand();
|
309052
309522
|
|
309053
|
-
//# debugId=
|
309523
|
+
//# debugId=B247ABFAA17480B964756E2164756E21
|