@settlemint/sdk-cli 2.6.2-pr54b9710c → 2.6.2-pr5cf648f6
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 +720 -1179
- package/dist/cli.js.map +9 -23
- package/package.json +8 -8
package/dist/cli.js
CHANGED
@@ -161542,7 +161542,7 @@ ${lanes.join(`
|
|
161542
161542
|
function generateOptionOutput(sys2, option, rightAlignOfLeft, leftAlignOfRight) {
|
161543
161543
|
var _a;
|
161544
161544
|
const text = [];
|
161545
|
-
const
|
161545
|
+
const colors3 = createColors(sys2);
|
161546
161546
|
const name2 = getDisplayNameTextOfOption(option);
|
161547
161547
|
const valueCandidates = getValueCandidate(option);
|
161548
161548
|
const defaultValueDescription = typeof option.defaultValueDescription === "object" ? getDiagnosticText(option.defaultValueDescription) : formatDefaultValue(option.defaultValueDescription, option.type === "list" || option.type === "listOrElement" ? option.element.type : option.type);
|
@@ -161563,7 +161563,7 @@ ${lanes.join(`
|
|
161563
161563
|
}
|
161564
161564
|
text.push(sys2.newLine);
|
161565
161565
|
} else {
|
161566
|
-
text.push(
|
161566
|
+
text.push(colors3.blue(name2), sys2.newLine);
|
161567
161567
|
if (option.description) {
|
161568
161568
|
const description3 = getDiagnosticText(option.description);
|
161569
161569
|
text.push(description3);
|
@@ -161608,7 +161608,7 @@ ${lanes.join(`
|
|
161608
161608
|
if (isFirstLine) {
|
161609
161609
|
curLeft = left.padStart(rightAlignOfLeft2);
|
161610
161610
|
curLeft = curLeft.padEnd(leftAlignOfRight2);
|
161611
|
-
curLeft = colorLeft ?
|
161611
|
+
curLeft = colorLeft ? colors3.blue(curLeft) : curLeft;
|
161612
161612
|
} else {
|
161613
161613
|
curLeft = "".padStart(leftAlignOfRight2);
|
161614
161614
|
}
|
@@ -161720,9 +161720,9 @@ ${lanes.join(`
|
|
161720
161720
|
return res;
|
161721
161721
|
}
|
161722
161722
|
function printEasyHelp(sys2, simpleOptions) {
|
161723
|
-
const
|
161723
|
+
const colors3 = createColors(sys2);
|
161724
161724
|
let output = [...getHeader(sys2, `${getDiagnosticText(Diagnostics.tsc_Colon_The_TypeScript_Compiler)} - ${getDiagnosticText(Diagnostics.Version_0, version2)}`)];
|
161725
|
-
output.push(
|
161725
|
+
output.push(colors3.bold(getDiagnosticText(Diagnostics.COMMON_COMMANDS)) + sys2.newLine + sys2.newLine);
|
161726
161726
|
example("tsc", Diagnostics.Compiles_the_current_project_tsconfig_json_in_the_working_directory);
|
161727
161727
|
example("tsc app.ts util.ts", Diagnostics.Ignoring_tsconfig_json_compiles_the_specified_files_with_default_compiler_options);
|
161728
161728
|
example("tsc -b", Diagnostics.Build_a_composite_project_in_the_working_directory);
|
@@ -161743,7 +161743,7 @@ ${lanes.join(`
|
|
161743
161743
|
function example(ex, desc) {
|
161744
161744
|
const examples = typeof ex === "string" ? [ex] : ex;
|
161745
161745
|
for (const example2 of examples) {
|
161746
|
-
output.push(" " +
|
161746
|
+
output.push(" " + colors3.blue(example2) + sys2.newLine);
|
161747
161747
|
}
|
161748
161748
|
output.push(" " + getDiagnosticText(desc) + sys2.newLine + sys2.newLine);
|
161749
161749
|
}
|
@@ -161766,12 +161766,12 @@ ${lanes.join(`
|
|
161766
161766
|
}
|
161767
161767
|
function getHeader(sys2, message) {
|
161768
161768
|
var _a;
|
161769
|
-
const
|
161769
|
+
const colors3 = createColors(sys2);
|
161770
161770
|
const header = [];
|
161771
161771
|
const terminalWidth = ((_a = sys2.getWidthOfTerminal) == null ? undefined : _a.call(sys2)) ?? 0;
|
161772
161772
|
const tsIconLength = 5;
|
161773
|
-
const tsIconFirstLine =
|
161774
|
-
const tsIconSecondLine =
|
161773
|
+
const tsIconFirstLine = colors3.blueBackground("".padStart(tsIconLength));
|
161774
|
+
const tsIconSecondLine = colors3.blueBackground(colors3.brightWhite("TS ".padStart(tsIconLength)));
|
161775
161775
|
if (terminalWidth >= message.length + tsIconLength) {
|
161776
161776
|
const rightAlign = terminalWidth > 120 ? 120 : terminalWidth;
|
161777
161777
|
const leftAlign = rightAlign - tsIconLength;
|
@@ -231828,124 +231828,6 @@ var require_slugify = __commonJS((exports, module) => {
|
|
231828
231828
|
});
|
231829
231829
|
});
|
231830
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
231831
|
// ../../node_modules/.bun/abitype@1.1.0+50e9b7ffbf081acf/node_modules/abitype/dist/esm/version.js
|
231950
231832
|
var version2 = "1.1.0";
|
231951
231833
|
|
@@ -233941,16 +233823,16 @@ var init_lru = __esm(() => {
|
|
233941
233823
|
});
|
233942
233824
|
this.maxSize = size2;
|
233943
233825
|
}
|
233944
|
-
get(
|
233945
|
-
const value5 = super.get(
|
233946
|
-
if (super.has(
|
233947
|
-
this.delete(
|
233948
|
-
super.set(
|
233826
|
+
get(key2) {
|
233827
|
+
const value5 = super.get(key2);
|
233828
|
+
if (super.has(key2) && value5 !== undefined) {
|
233829
|
+
this.delete(key2);
|
233830
|
+
super.set(key2, value5);
|
233949
233831
|
}
|
233950
233832
|
return value5;
|
233951
233833
|
}
|
233952
|
-
set(
|
233953
|
-
super.set(
|
233834
|
+
set(key2, value5) {
|
233835
|
+
super.set(key2, value5);
|
233954
233836
|
if (this.maxSize && this.size > this.maxSize) {
|
233955
233837
|
const firstKey = this.keys().next().value;
|
233956
233838
|
if (firstKey)
|
@@ -234992,9 +234874,9 @@ var init_decodeErrorResult = __esm(() => {
|
|
234992
234874
|
});
|
234993
234875
|
|
234994
234876
|
// ../../node_modules/.bun/viem@2.37.5+50e9b7ffbf081acf/node_modules/viem/_esm/utils/stringify.js
|
234995
|
-
var stringify3 = (value5, replacer, space) => JSON.stringify(value5, (
|
234877
|
+
var stringify3 = (value5, replacer, space) => JSON.stringify(value5, (key2, value_) => {
|
234996
234878
|
const value6 = typeof value_ === "bigint" ? value_.toString() : value_;
|
234997
|
-
return typeof replacer === "function" ? replacer(
|
234879
|
+
return typeof replacer === "function" ? replacer(key2, value6) : value6;
|
234998
234880
|
}, space);
|
234999
234881
|
|
235000
234882
|
// ../../node_modules/.bun/viem@2.37.5+50e9b7ffbf081acf/node_modules/viem/_esm/utils/abi/formatAbiItemWithArgs.js
|
@@ -235108,13 +234990,13 @@ var init_stateOverride = __esm(() => {
|
|
235108
234990
|
|
235109
234991
|
// ../../node_modules/.bun/viem@2.37.5+50e9b7ffbf081acf/node_modules/viem/_esm/errors/transaction.js
|
235110
234992
|
function prettyPrint(args) {
|
235111
|
-
const entries = Object.entries(args).map(([
|
234993
|
+
const entries = Object.entries(args).map(([key2, value5]) => {
|
235112
234994
|
if (value5 === undefined || value5 === false)
|
235113
234995
|
return null;
|
235114
|
-
return [
|
234996
|
+
return [key2, value5];
|
235115
234997
|
}).filter(Boolean);
|
235116
|
-
const maxLength = entries.reduce((acc, [
|
235117
|
-
return entries.map(([
|
234998
|
+
const maxLength = entries.reduce((acc, [key2]) => Math.max(acc, key2.length), 0);
|
234999
|
+
return entries.map(([key2, value5]) => ` ${`${key2}:`.padEnd(maxLength + 1)} ${value5}`).join(`
|
235118
235000
|
`);
|
235119
235001
|
}
|
235120
235002
|
var FeeConflictError, InvalidLegacyVError, InvalidSerializableTransactionError, InvalidStorageKeySizeError, TransactionNotFoundError, TransactionReceiptNotFoundError, WaitForTransactionReceiptTimeoutError;
|
@@ -236232,7 +236114,7 @@ var init_sha2 = __esm(() => {
|
|
236232
236114
|
});
|
236233
236115
|
|
236234
236116
|
// ../../node_modules/.bun/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/hmac.js
|
236235
|
-
var HMAC, hmac = (hash3,
|
236117
|
+
var HMAC, hmac = (hash3, key2, message) => new HMAC(hash3, key2).update(message).digest();
|
236236
236118
|
var init_hmac = __esm(() => {
|
236237
236119
|
init_utils2();
|
236238
236120
|
HMAC = class HMAC extends Hash {
|
@@ -236241,7 +236123,7 @@ var init_hmac = __esm(() => {
|
|
236241
236123
|
this.finished = false;
|
236242
236124
|
this.destroyed = false;
|
236243
236125
|
ahash(hash3);
|
236244
|
-
const
|
236126
|
+
const key2 = toBytes2(_key);
|
236245
236127
|
this.iHash = hash3.create();
|
236246
236128
|
if (typeof this.iHash.update !== "function")
|
236247
236129
|
throw new Error("Expected instance of class which extends utils.Hash");
|
@@ -236249,7 +236131,7 @@ var init_hmac = __esm(() => {
|
|
236249
236131
|
this.outputLen = this.iHash.outputLen;
|
236250
236132
|
const blockLen = this.blockLen;
|
236251
236133
|
const pad2 = new Uint8Array(blockLen);
|
236252
|
-
pad2.set(
|
236134
|
+
pad2.set(key2.length > blockLen ? hash3.create().update(key2).digest() : key2);
|
236253
236135
|
for (let i7 = 0;i7 < pad2.length; i7++)
|
236254
236136
|
pad2[i7] ^= 54;
|
236255
236137
|
this.iHash.update(pad2);
|
@@ -236299,7 +236181,7 @@ var init_hmac = __esm(() => {
|
|
236299
236181
|
this.iHash.destroy();
|
236300
236182
|
}
|
236301
236183
|
};
|
236302
|
-
hmac.create = (hash3,
|
236184
|
+
hmac.create = (hash3, key2) => new HMAC(hash3, key2);
|
236303
236185
|
});
|
236304
236186
|
|
236305
236187
|
// ../../node_modules/.bun/@noble+curves@1.9.1/node_modules/@noble/curves/esm/abstract/utils.js
|
@@ -236758,13 +236640,13 @@ function getMinHashLength(fieldOrder) {
|
|
236758
236640
|
const length = getFieldBytesLength(fieldOrder);
|
236759
236641
|
return length + Math.ceil(length / 2);
|
236760
236642
|
}
|
236761
|
-
function mapHashToField(
|
236762
|
-
const len =
|
236643
|
+
function mapHashToField(key2, fieldOrder, isLE2 = false) {
|
236644
|
+
const len = key2.length;
|
236763
236645
|
const fieldLen = getFieldBytesLength(fieldOrder);
|
236764
236646
|
const minLen = getMinHashLength(fieldOrder);
|
236765
236647
|
if (len < 16 || len < minLen || len > 1024)
|
236766
236648
|
throw new Error("expected " + minLen + "-1024 bytes of input, got " + len);
|
236767
|
-
const num = isLE2 ? bytesToNumberLE(
|
236649
|
+
const num = isLE2 ? bytesToNumberLE(key2) : bytesToNumberBE(key2);
|
236768
236650
|
const reduced = mod(num, fieldOrder - _1n3) + _1n3;
|
236769
236651
|
return isLE2 ? numberToBytesLE(reduced, fieldLen) : numberToBytesBE(reduced, fieldLen);
|
236770
236652
|
}
|
@@ -237079,20 +236961,20 @@ function weierstrassPoints(opts) {
|
|
237079
236961
|
function isWithinCurveOrder(num) {
|
237080
236962
|
return inRange(num, _1n5, CURVE.n);
|
237081
236963
|
}
|
237082
|
-
function normPrivateKeyToScalar(
|
236964
|
+
function normPrivateKeyToScalar(key2) {
|
237083
236965
|
const { allowedPrivateKeyLengths: lengths, nByteLength, wrapPrivateKey, n: N6 } = CURVE;
|
237084
|
-
if (lengths && typeof
|
237085
|
-
if (isBytes2(
|
237086
|
-
|
237087
|
-
if (typeof
|
236966
|
+
if (lengths && typeof key2 !== "bigint") {
|
236967
|
+
if (isBytes2(key2))
|
236968
|
+
key2 = bytesToHex2(key2);
|
236969
|
+
if (typeof key2 !== "string" || !lengths.includes(key2.length))
|
237088
236970
|
throw new Error("invalid private key");
|
237089
|
-
|
236971
|
+
key2 = key2.padStart(nByteLength * 2, "0");
|
237090
236972
|
}
|
237091
236973
|
let num;
|
237092
236974
|
try {
|
237093
|
-
num = typeof
|
236975
|
+
num = typeof key2 === "bigint" ? key2 : bytesToNumberBE(ensureBytes("private key", key2, nByteLength));
|
237094
236976
|
} catch (error48) {
|
237095
|
-
throw new Error("invalid private key, expected hex or " + nByteLength + " bytes, got " + typeof
|
236977
|
+
throw new Error("invalid private key, expected hex or " + nByteLength + " bytes, got " + typeof key2);
|
237096
236978
|
}
|
237097
236979
|
if (wrapPrivateKey)
|
237098
236980
|
num = mod(num, N6);
|
@@ -237926,7 +237808,7 @@ var init_weierstrass = __esm(() => {
|
|
237926
237808
|
function getHash(hash3) {
|
237927
237809
|
return {
|
237928
237810
|
hash: hash3,
|
237929
|
-
hmac: (
|
237811
|
+
hmac: (key2, ...msgs) => hmac(hash3, key2, concatBytes(...msgs)),
|
237930
237812
|
randomBytes
|
237931
237813
|
};
|
237932
237814
|
}
|
@@ -238552,11 +238434,11 @@ function extract2(value_, { format: format2 }) {
|
|
238552
238434
|
const value5 = {};
|
238553
238435
|
function extract_(formatted2) {
|
238554
238436
|
const keys = Object.keys(formatted2);
|
238555
|
-
for (const
|
238556
|
-
if (
|
238557
|
-
value5[
|
238558
|
-
if (formatted2[
|
238559
|
-
extract_(formatted2[
|
238437
|
+
for (const key2 of keys) {
|
238438
|
+
if (key2 in value_)
|
238439
|
+
value5[key2] = value_[key2];
|
238440
|
+
if (formatted2[key2] && typeof formatted2[key2] === "object" && !Array.isArray(formatted2[key2]))
|
238441
|
+
extract_(formatted2[key2]);
|
238560
238442
|
}
|
238561
238443
|
}
|
238562
238444
|
const formatted = format2(value_ || {});
|
@@ -238572,8 +238454,8 @@ function defineFormatter(type5, format2) {
|
|
238572
238454
|
format: (args) => {
|
238573
238455
|
const formatted = format2(args);
|
238574
238456
|
if (exclude) {
|
238575
|
-
for (const
|
238576
|
-
delete formatted[
|
238457
|
+
for (const key2 of exclude) {
|
238458
|
+
delete formatted[key2];
|
238577
238459
|
}
|
238578
238460
|
}
|
238579
238461
|
return {
|
@@ -239119,9 +239001,9 @@ var init_hex = __esm(() => {
|
|
239119
239001
|
|
239120
239002
|
// ../../node_modules/.bun/ox@0.9.3+50e9b7ffbf081acf/node_modules/ox/_esm/core/Json.js
|
239121
239003
|
function stringify4(value5, replacer, space) {
|
239122
|
-
return JSON.stringify(value5, (
|
239004
|
+
return JSON.stringify(value5, (key2, value6) => {
|
239123
239005
|
if (typeof replacer === "function")
|
239124
|
-
return replacer(
|
239006
|
+
return replacer(key2, value6);
|
239125
239007
|
if (typeof value6 === "bigint")
|
239126
239008
|
return value6.toString() + bigIntSuffix;
|
239127
239009
|
return value6;
|
@@ -240592,6 +240474,124 @@ var init_call = __esm(() => {
|
|
240592
240474
|
init_assertRequest();
|
240593
240475
|
});
|
240594
240476
|
|
240477
|
+
// ../../node_modules/.bun/ansi-escapes@4.3.2/node_modules/ansi-escapes/index.js
|
240478
|
+
var require_ansi_escapes = __commonJS((exports, module) => {
|
240479
|
+
var ansiEscapes = exports;
|
240480
|
+
exports.default = ansiEscapes;
|
240481
|
+
var ESC2 = "\x1B[";
|
240482
|
+
var OSC = "\x1B]";
|
240483
|
+
var BEL = "\x07";
|
240484
|
+
var SEP = ";";
|
240485
|
+
var isTerminalApp = process.env.TERM_PROGRAM === "Apple_Terminal";
|
240486
|
+
ansiEscapes.cursorTo = (x6, y4) => {
|
240487
|
+
if (typeof x6 !== "number") {
|
240488
|
+
throw new TypeError("The `x` argument is required");
|
240489
|
+
}
|
240490
|
+
if (typeof y4 !== "number") {
|
240491
|
+
return ESC2 + (x6 + 1) + "G";
|
240492
|
+
}
|
240493
|
+
return ESC2 + (y4 + 1) + ";" + (x6 + 1) + "H";
|
240494
|
+
};
|
240495
|
+
ansiEscapes.cursorMove = (x6, y4) => {
|
240496
|
+
if (typeof x6 !== "number") {
|
240497
|
+
throw new TypeError("The `x` argument is required");
|
240498
|
+
}
|
240499
|
+
let ret = "";
|
240500
|
+
if (x6 < 0) {
|
240501
|
+
ret += ESC2 + -x6 + "D";
|
240502
|
+
} else if (x6 > 0) {
|
240503
|
+
ret += ESC2 + x6 + "C";
|
240504
|
+
}
|
240505
|
+
if (y4 < 0) {
|
240506
|
+
ret += ESC2 + -y4 + "A";
|
240507
|
+
} else if (y4 > 0) {
|
240508
|
+
ret += ESC2 + y4 + "B";
|
240509
|
+
}
|
240510
|
+
return ret;
|
240511
|
+
};
|
240512
|
+
ansiEscapes.cursorUp = (count = 1) => ESC2 + count + "A";
|
240513
|
+
ansiEscapes.cursorDown = (count = 1) => ESC2 + count + "B";
|
240514
|
+
ansiEscapes.cursorForward = (count = 1) => ESC2 + count + "C";
|
240515
|
+
ansiEscapes.cursorBackward = (count = 1) => ESC2 + count + "D";
|
240516
|
+
ansiEscapes.cursorLeft = ESC2 + "G";
|
240517
|
+
ansiEscapes.cursorSavePosition = isTerminalApp ? "\x1B7" : ESC2 + "s";
|
240518
|
+
ansiEscapes.cursorRestorePosition = isTerminalApp ? "\x1B8" : ESC2 + "u";
|
240519
|
+
ansiEscapes.cursorGetPosition = ESC2 + "6n";
|
240520
|
+
ansiEscapes.cursorNextLine = ESC2 + "E";
|
240521
|
+
ansiEscapes.cursorPrevLine = ESC2 + "F";
|
240522
|
+
ansiEscapes.cursorHide = ESC2 + "?25l";
|
240523
|
+
ansiEscapes.cursorShow = ESC2 + "?25h";
|
240524
|
+
ansiEscapes.eraseLines = (count) => {
|
240525
|
+
let clear = "";
|
240526
|
+
for (let i7 = 0;i7 < count; i7++) {
|
240527
|
+
clear += ansiEscapes.eraseLine + (i7 < count - 1 ? ansiEscapes.cursorUp() : "");
|
240528
|
+
}
|
240529
|
+
if (count) {
|
240530
|
+
clear += ansiEscapes.cursorLeft;
|
240531
|
+
}
|
240532
|
+
return clear;
|
240533
|
+
};
|
240534
|
+
ansiEscapes.eraseEndLine = ESC2 + "K";
|
240535
|
+
ansiEscapes.eraseStartLine = ESC2 + "1K";
|
240536
|
+
ansiEscapes.eraseLine = ESC2 + "2K";
|
240537
|
+
ansiEscapes.eraseDown = ESC2 + "J";
|
240538
|
+
ansiEscapes.eraseUp = ESC2 + "1J";
|
240539
|
+
ansiEscapes.eraseScreen = ESC2 + "2J";
|
240540
|
+
ansiEscapes.scrollUp = ESC2 + "S";
|
240541
|
+
ansiEscapes.scrollDown = ESC2 + "T";
|
240542
|
+
ansiEscapes.clearScreen = "\x1Bc";
|
240543
|
+
ansiEscapes.clearTerminal = process.platform === "win32" ? `${ansiEscapes.eraseScreen}${ESC2}0f` : `${ansiEscapes.eraseScreen}${ESC2}3J${ESC2}H`;
|
240544
|
+
ansiEscapes.beep = BEL;
|
240545
|
+
ansiEscapes.link = (text2, url2) => {
|
240546
|
+
return [
|
240547
|
+
OSC,
|
240548
|
+
"8",
|
240549
|
+
SEP,
|
240550
|
+
SEP,
|
240551
|
+
url2,
|
240552
|
+
BEL,
|
240553
|
+
text2,
|
240554
|
+
OSC,
|
240555
|
+
"8",
|
240556
|
+
SEP,
|
240557
|
+
SEP,
|
240558
|
+
BEL
|
240559
|
+
].join("");
|
240560
|
+
};
|
240561
|
+
ansiEscapes.image = (buffer2, options = {}) => {
|
240562
|
+
let ret = `${OSC}1337;File=inline=1`;
|
240563
|
+
if (options.width) {
|
240564
|
+
ret += `;width=${options.width}`;
|
240565
|
+
}
|
240566
|
+
if (options.height) {
|
240567
|
+
ret += `;height=${options.height}`;
|
240568
|
+
}
|
240569
|
+
if (options.preserveAspectRatio === false) {
|
240570
|
+
ret += ";preserveAspectRatio=0";
|
240571
|
+
}
|
240572
|
+
return ret + ":" + buffer2.toString("base64") + BEL;
|
240573
|
+
};
|
240574
|
+
ansiEscapes.iTerm = {
|
240575
|
+
setCwd: (cwd = process.cwd()) => `${OSC}50;CurrentDir=${cwd}${BEL}`,
|
240576
|
+
annotation: (message, options = {}) => {
|
240577
|
+
let ret = `${OSC}1337;`;
|
240578
|
+
const hasX = typeof options.x !== "undefined";
|
240579
|
+
const hasY = typeof options.y !== "undefined";
|
240580
|
+
if ((hasX || hasY) && !(hasX && hasY && typeof options.length !== "undefined")) {
|
240581
|
+
throw new Error("`x`, `y` and `length` must be defined when `x` or `y` is defined");
|
240582
|
+
}
|
240583
|
+
message = message.replace(/\|/g, "");
|
240584
|
+
ret += options.isHidden ? "AddHiddenAnnotation=" : "AddAnnotation=";
|
240585
|
+
if (options.length > 0) {
|
240586
|
+
ret += (hasX ? [message, options.length, options.x, options.y] : [options.length, message]).join("|");
|
240587
|
+
} else {
|
240588
|
+
ret += message;
|
240589
|
+
}
|
240590
|
+
return ret + BEL;
|
240591
|
+
}
|
240592
|
+
};
|
240593
|
+
});
|
240594
|
+
|
240595
240595
|
// ../../node_modules/.bun/yaml@2.8.1/node_modules/yaml/dist/nodes/identity.js
|
240596
240596
|
var require_identity = __commonJS((exports) => {
|
240597
240597
|
var ALIAS = Symbol.for("yaml.alias");
|
@@ -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_(key3, node, visitor, path5) {
|
240668
|
+
const ctrl = callVisitor(key3, node, visitor, path5);
|
240669
240669
|
if (identity2.isNode(ctrl) || identity2.isPair(ctrl)) {
|
240670
|
-
replaceNode(
|
240671
|
-
return visit_(
|
240670
|
+
replaceNode(key3, path5, ctrl);
|
240671
|
+
return visit_(key3, 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_(key3, node, visitor, path5) {
|
240716
|
+
const ctrl = await callVisitor(key3, node, visitor, path5);
|
240717
240717
|
if (identity2.isNode(ctrl) || identity2.isPair(ctrl)) {
|
240718
|
-
replaceNode(
|
240719
|
-
return visitAsync_(
|
240718
|
+
replaceNode(key3, path5, ctrl);
|
240719
|
+
return visitAsync_(key3, 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(key3, node, visitor, path5) {
|
240770
240770
|
if (typeof visitor === "function")
|
240771
|
-
return visitor(
|
240771
|
+
return visitor(key3, node, path5);
|
240772
240772
|
if (identity2.isMap(node))
|
240773
|
-
return visitor.Map?.(
|
240773
|
+
return visitor.Map?.(key3, node, path5);
|
240774
240774
|
if (identity2.isSeq(node))
|
240775
|
-
return visitor.Seq?.(
|
240775
|
+
return visitor.Seq?.(key3, node, path5);
|
240776
240776
|
if (identity2.isPair(node))
|
240777
|
-
return visitor.Pair?.(
|
240777
|
+
return visitor.Pair?.(key3, node, path5);
|
240778
240778
|
if (identity2.isScalar(node))
|
240779
|
-
return visitor.Scalar?.(
|
240779
|
+
return visitor.Scalar?.(key3, node, path5);
|
240780
240780
|
if (identity2.isAlias(node))
|
240781
|
-
return visitor.Alias?.(
|
240781
|
+
return visitor.Alias?.(key3, node, path5);
|
240782
240782
|
return;
|
240783
240783
|
}
|
240784
|
-
function replaceNode(
|
240784
|
+
function replaceNode(key3, path5, node) {
|
240785
240785
|
const parent = path5[path5.length - 1];
|
240786
240786
|
if (identity2.isCollection(parent)) {
|
240787
|
-
parent.items[
|
240787
|
+
parent.items[key3] = node;
|
240788
240788
|
} else if (identity2.isPair(parent)) {
|
240789
|
-
if (
|
240789
|
+
if (key3 === "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, key3, 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, key3, 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 [key3, ...rest] = path5;
|
241390
|
+
const node = this.get(key3, 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(key3, collectionFromPath(this.schema, rest, value5));
|
241395
241395
|
else
|
241396
|
-
throw new Error(`Expected YAML collection at ${
|
241396
|
+
throw new Error(`Expected YAML collection at ${key3}. Remaining path: ${rest}`);
|
241397
241397
|
}
|
241398
241398
|
}
|
241399
241399
|
deleteIn(path5) {
|
241400
|
-
const [
|
241400
|
+
const [key3, ...rest] = path5;
|
241401
241401
|
if (rest.length === 0)
|
241402
|
-
return this.delete(
|
241403
|
-
const node = this.get(
|
241402
|
+
return this.delete(key3);
|
241403
|
+
const node = this.get(key3, 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 ${key3}. Remaining path: ${rest}`);
|
241408
241408
|
}
|
241409
241409
|
getIn(path5, keepScalar) {
|
241410
|
-
const [
|
241411
|
-
const node = this.get(
|
241410
|
+
const [key3, ...rest] = path5;
|
241411
|
+
const node = this.get(key3, 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 [key3, ...rest] = path5;
|
241427
241427
|
if (rest.length === 0)
|
241428
|
-
return this.has(
|
241429
|
-
const node = this.get(
|
241428
|
+
return this.has(key3);
|
241429
|
+
const node = this.get(key3, true);
|
241430
241430
|
return identity2.isCollection(node) ? node.hasIn(rest) : false;
|
241431
241431
|
}
|
241432
241432
|
setIn(path5, value5) {
|
241433
|
-
const [
|
241433
|
+
const [key3, ...rest] = path5;
|
241434
241434
|
if (rest.length === 0) {
|
241435
|
-
this.set(
|
241435
|
+
this.set(key3, value5);
|
241436
241436
|
} else {
|
241437
|
-
const node = this.get(
|
241437
|
+
const node = this.get(key3, 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(key3, collectionFromPath(this.schema, rest, value5));
|
241442
241442
|
else
|
241443
|
-
throw new Error(`Expected YAML collection at ${
|
241443
|
+
throw new Error(`Expected YAML collection at ${key3}. 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: key3, 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(key3) && key3.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(key3) || !identity2.isNode(key3) && typeof key3 === "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 && (!key3 || keyComment && value5 == null && !ctx.inFlow || identity2.isCollection(key3) || (identity2.isScalar(key3) ? key3.type === Scalar.Scalar.BLOCK_FOLDED || key3.type === Scalar.Scalar.BLOCK_LITERAL : typeof key3 === "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(key3, 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, key3) => (merge4.identify(key3) || identity2.isScalar(key3) && (!key3.type || key3.type === Scalar.Scalar.PLAIN) && merge4.identify(key3.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 [key3, value6] of srcMap) {
|
242212
242212
|
if (map4 instanceof Map) {
|
242213
|
-
if (!map4.has(
|
242214
|
-
map4.set(
|
242213
|
+
if (!map4.has(key3))
|
242214
|
+
map4.set(key3, 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(key3);
|
242217
|
+
} else if (!Object.prototype.hasOwnProperty.call(map4, key3)) {
|
242218
|
+
Object.defineProperty(map4, key3, {
|
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: key3, value: value5 }) {
|
242241
|
+
if (identity2.isNode(key3) && key3.addToJSMap)
|
242242
|
+
key3.addToJSMap(ctx, map4, value5);
|
242243
|
+
else if (merge4.isMergeKey(ctx, key3))
|
242244
242244
|
merge4.addMergeToJSMap(ctx, map4, value5);
|
242245
242245
|
else {
|
242246
|
-
const jsKey = toJS.toJS(
|
242246
|
+
const jsKey = toJS.toJS(key3, "", 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(key3, 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(key3, 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(key3) && 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 = key3.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(key3, value5, ctx) {
|
242301
|
+
const k6 = createNode.createNode(key3, 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(key3, value5 = null) {
|
242308
242308
|
Object.defineProperty(this, identity2.NODE_TYPE, { value: identity2.PAIR });
|
242309
|
-
this.key =
|
242309
|
+
this.key = key3;
|
242310
242310
|
this.value = value5;
|
242311
242311
|
}
|
242312
242312
|
clone(schema) {
|
242313
|
-
let { key:
|
242314
|
-
if (identity2.isNode(
|
242315
|
-
|
242313
|
+
let { key: key3, value: value5 } = this;
|
242314
|
+
if (identity2.isNode(key3))
|
242315
|
+
key3 = key3.clone(schema);
|
242316
242316
|
if (identity2.isNode(value5))
|
242317
242317
|
value5 = value5.clone(schema);
|
242318
|
-
return new Pair(
|
242318
|
+
return new Pair(key3, 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, key3) {
|
242486
|
+
const k6 = identity2.isScalar(key3) ? key3.value : key3;
|
242487
242487
|
for (const it2 of items) {
|
242488
242488
|
if (identity2.isPair(it2)) {
|
242489
|
-
if (it2.key ===
|
242489
|
+
if (it2.key === key3 || 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 = (key3, 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, key3, value5);
|
242512
|
+
else if (Array.isArray(replacer) && !replacer.includes(key3))
|
242513
242513
|
return;
|
242514
242514
|
if (value5 !== undefined || keepUndefined)
|
242515
|
-
map4.items.push(Pair.createPair(
|
242515
|
+
map4.items.push(Pair.createPair(key3, value5, ctx));
|
242516
242516
|
};
|
242517
242517
|
if (obj instanceof Map) {
|
242518
|
-
for (const [
|
242519
|
-
add(
|
242518
|
+
for (const [key3, value5] of obj)
|
242519
|
+
add(key3, value5);
|
242520
242520
|
} else if (obj && typeof obj === "object") {
|
242521
|
-
for (const
|
242522
|
-
add(
|
242521
|
+
for (const key3 of Object.keys(obj))
|
242522
|
+
add(key3, obj[key3]);
|
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(key3) {
|
242557
|
+
const it2 = findPair(this.items, key3);
|
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(key3, keepScalar) {
|
242564
|
+
const it2 = findPair(this.items, key3);
|
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(key3) {
|
242569
|
+
return !!findPair(this.items, key3);
|
242570
242570
|
}
|
242571
|
-
set(
|
242572
|
-
this.add(new Pair.Pair(
|
242571
|
+
set(key3, value5) {
|
242572
|
+
this.add(new Pair.Pair(key3, 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(key3) {
|
242644
|
+
const idx = asItemIndex(key3);
|
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(key3, keepScalar) {
|
242651
|
+
const idx = asItemIndex(key3);
|
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(key3) {
|
242658
|
+
const idx = asItemIndex(key3);
|
242659
242659
|
return typeof idx === "number" && idx < this.items.length;
|
242660
242660
|
}
|
242661
|
-
set(
|
242662
|
-
const idx = asItemIndex(
|
242661
|
+
set(key3, value5) {
|
242662
|
+
const idx = asItemIndex(key3);
|
242663
242663
|
if (typeof idx !== "number")
|
242664
|
-
throw new Error(`Expected a valid index, not ${
|
242664
|
+
throw new Error(`Expected a valid index, not ${key3}.`);
|
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 key3 = obj instanceof Set ? it2 : String(i8++);
|
242699
|
+
it2 = replacer.call(obj, key3, 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(key3) {
|
242708
|
+
let idx = identity2.isScalar(key3) ? key3.value : key3;
|
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 key3, value5;
|
243082
243082
|
if (Array.isArray(it2)) {
|
243083
243083
|
if (it2.length === 2) {
|
243084
|
-
|
243084
|
+
key3 = 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
|
+
key3 = keys[0];
|
243092
|
+
value5 = it2[key3];
|
243093
243093
|
} else {
|
243094
243094
|
throw new TypeError(`Expected tuple with one key, not ${keys.length} keys`);
|
243095
243095
|
}
|
243096
243096
|
} else {
|
243097
|
-
|
243097
|
+
key3 = it2;
|
243098
243098
|
}
|
243099
|
-
pairs2.items.push(Pair.createPair(
|
243099
|
+
pairs2.items.push(Pair.createPair(key3, 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 key3, value5;
|
243141
243141
|
if (identity2.isPair(pair)) {
|
243142
|
-
|
243143
|
-
value5 = toJS.toJS(pair.value,
|
243142
|
+
key3 = toJS.toJS(pair.key, "", ctx);
|
243143
|
+
value5 = toJS.toJS(pair.value, key3, ctx);
|
243144
243144
|
} else {
|
243145
|
-
|
243145
|
+
key3 = toJS.toJS(pair, "", ctx);
|
243146
243146
|
}
|
243147
|
-
if (map4.has(
|
243147
|
+
if (map4.has(key3))
|
243148
243148
|
throw new Error("Ordered maps must not include duplicate keys");
|
243149
|
-
map4.set(
|
243149
|
+
map4.set(key3, 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: key3 } of pairs$1.items) {
|
243171
|
+
if (identity2.isScalar(key3)) {
|
243172
|
+
if (seenKeys.includes(key3.value)) {
|
243173
|
+
onError(`Ordered maps must not include duplicate keys: ${key3.value}`);
|
243174
243174
|
} else {
|
243175
|
-
seenKeys.push(
|
243175
|
+
seenKeys.push(key3.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(key3) {
|
243350
243350
|
let pair;
|
243351
|
-
if (identity2.isPair(
|
243352
|
-
pair =
|
243353
|
-
else if (
|
243354
|
-
pair = new Pair.Pair(
|
243351
|
+
if (identity2.isPair(key3))
|
243352
|
+
pair = key3;
|
243353
|
+
else if (key3 && typeof key3 === "object" && "key" in key3 && "value" in key3 && key3.value === null)
|
243354
|
+
pair = new Pair.Pair(key3.key, null);
|
243355
243355
|
else
|
243356
|
-
pair = new Pair.Pair(
|
243356
|
+
pair = new Pair.Pair(key3, 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(key3, keepPair) {
|
243362
|
+
const pair = YAMLMap.findPair(this.items, key3);
|
243363
243363
|
return !keepPair && identity2.isPair(pair) ? identity2.isScalar(pair.key) ? pair.key.value : pair.key : pair;
|
243364
243364
|
}
|
243365
|
-
set(
|
243365
|
+
set(key3, 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, key3);
|
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(key3));
|
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((key3) => key3 !== "yaml11").map((key3) => JSON.stringify(key3)).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((key3) => JSON.stringify(key3)).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(key3, value5, options = {}) {
|
243859
|
+
const k6 = this.createNode(key3, 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(key3) {
|
243864
|
+
return assertCollection(this.contents) ? this.contents.delete(key3) : 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(key3, keepScalar) {
|
243876
|
+
return identity2.isCollection(this.contents) ? this.contents.get(key3, 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(key3) {
|
243884
|
+
return identity2.isCollection(this.contents) ? this.contents.has(key3) : 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(key3, value5) {
|
243892
243892
|
if (this.contents == null) {
|
243893
|
-
this.contents = Collection.collectionFromPath(this.schema, [
|
243893
|
+
this.contents = Collection.collectionFromPath(this.schema, [key3], value5);
|
243894
243894
|
} else if (assertCollection(this.contents)) {
|
243895
|
-
this.contents.set(
|
243895
|
+
this.contents.set(key3, 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(key3) {
|
244178
|
+
if (!key3)
|
244179
244179
|
return null;
|
244180
|
-
switch (
|
244180
|
+
switch (key3.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 (key3.source.includes(`
|
244186
244186
|
`))
|
244187
244187
|
return true;
|
244188
|
-
if (
|
244189
|
-
for (const st2 of
|
244188
|
+
if (key3.end) {
|
244189
|
+
for (const st2 of key3.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 key3.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: key3, sep: sep4, value: value5 } = collItem;
|
244261
244261
|
const keyProps = resolveProps.resolveProps(start3, {
|
244262
244262
|
indicator: "explicit-key-ind",
|
244263
|
-
next:
|
244263
|
+
next: key3 ?? 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 (key3) {
|
244272
|
+
if (key3.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 key3 && key3.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(key3)) {
|
244289
|
+
onError(key3 ?? 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 = key3 ? composeNode(ctx, key3, 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, key3, 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: !key3 || key3.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: key3, 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: key3 ?? 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(key3))
|
244491
|
+
onError(key3, "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 = key3 ? composeNode(ctx, key3, props, onError) : composeEmptyNode(ctx, keyStart, start3, null, props, onError);
|
244537
|
+
if (isBlock(key3))
|
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 errors5 = 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 errors5.YAMLWarning(pos, code2, message));
|
245400
245400
|
else
|
245401
|
-
this.errors.push(new
|
245401
|
+
this.errors.push(new errors5.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 errors5.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 errors5.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 errors5.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 errors5 = 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 errors5.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 key3 of Object.keys(token))
|
245660
|
+
if (key3 !== "type" && key3 !== "offset")
|
245661
|
+
delete token[key3];
|
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 key3 of Object.keys(token))
|
245711
|
+
if (key3 !== "type" && key3 !== "offset")
|
245712
|
+
delete token[key3];
|
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: key3, 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 (key3)
|
245769
|
+
res += stringifyToken(key3);
|
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 key3 = 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: key3, 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 errors5 = 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(errors5.prettifyError(source, lineCounter2));
|
247425
|
+
doc2.warnings.forEach(errors5.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 errors5.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(errors5.prettifyError(source, lineCounter2));
|
247446
|
+
doc2.warnings.forEach(errors5.prettifyError(source, lineCounter2));
|
247447
247447
|
}
|
247448
247448
|
return doc2;
|
247449
247449
|
}
|
@@ -247511,8 +247511,11 @@ var {
|
|
247511
247511
|
} = import__.default;
|
247512
247512
|
|
247513
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
247517
|
var isTabKey = (key) => key.name === "tab";
|
247518
|
+
var isNumberKey = (key) => "1234567890".includes(key.name);
|
247516
247519
|
var isEnterKey = (key) => key.name === "enter" || key.name === "return";
|
247517
247520
|
// ../../node_modules/.bun/@inquirer+core@10.2.2+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/errors.js
|
247518
247521
|
class AbortPromptError extends Error {
|
@@ -248046,11 +248049,22 @@ function usePrefix({ status = "idle", theme }) {
|
|
248046
248049
|
const iconName = status === "loading" ? "idle" : status;
|
248047
248050
|
return typeof prefix === "string" ? prefix : prefix[iconName] ?? prefix["idle"];
|
248048
248051
|
}
|
248052
|
+
// ../../node_modules/.bun/@inquirer+core@10.2.2+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/use-memo.js
|
248053
|
+
function useMemo(fn, dependencies) {
|
248054
|
+
return withPointer((pointer) => {
|
248055
|
+
const prev = pointer.get();
|
248056
|
+
if (!prev || prev.dependencies.length !== dependencies.length || prev.dependencies.some((dep, i) => dep !== dependencies[i])) {
|
248057
|
+
const value = fn();
|
248058
|
+
pointer.set({ value, dependencies });
|
248059
|
+
return value;
|
248060
|
+
}
|
248061
|
+
return prev.value;
|
248062
|
+
});
|
248063
|
+
}
|
248049
248064
|
// ../../node_modules/.bun/@inquirer+core@10.2.2+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/use-ref.js
|
248050
248065
|
function useRef(val) {
|
248051
248066
|
return useState({ current: val })[0];
|
248052
248067
|
}
|
248053
|
-
|
248054
248068
|
// ../../node_modules/.bun/@inquirer+core@10.2.2+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/use-keypress.js
|
248055
248069
|
function useKeypress(userHandler) {
|
248056
248070
|
const signal = useRef(userHandler);
|
@@ -248082,6 +248096,72 @@ function readlineWidth() {
|
|
248082
248096
|
return import_cli_width.default({ defaultWidth: 80, output: readline().output });
|
248083
248097
|
}
|
248084
248098
|
|
248099
|
+
// ../../node_modules/.bun/@inquirer+core@10.2.2+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/pagination/use-pagination.js
|
248100
|
+
function usePointerPosition({ active, renderedItems, pageSize, loop }) {
|
248101
|
+
const state = useRef({
|
248102
|
+
lastPointer: active,
|
248103
|
+
lastActive: undefined
|
248104
|
+
});
|
248105
|
+
const { lastPointer, lastActive } = state.current;
|
248106
|
+
const middle = Math.floor(pageSize / 2);
|
248107
|
+
const renderedLength = renderedItems.reduce((acc, item) => acc + item.length, 0);
|
248108
|
+
const defaultPointerPosition = renderedItems.slice(0, active).reduce((acc, item) => acc + item.length, 0);
|
248109
|
+
let pointer = defaultPointerPosition;
|
248110
|
+
if (renderedLength > pageSize) {
|
248111
|
+
if (loop) {
|
248112
|
+
pointer = lastPointer;
|
248113
|
+
if (lastActive != null && lastActive < active && active - lastActive < pageSize) {
|
248114
|
+
pointer = Math.min(middle, Math.abs(active - lastActive) === 1 ? Math.min(lastPointer + (renderedItems[lastActive]?.length ?? 0), Math.max(defaultPointerPosition, lastPointer)) : lastPointer + active - lastActive);
|
248115
|
+
}
|
248116
|
+
} else {
|
248117
|
+
const spaceUnderActive = renderedItems.slice(active).reduce((acc, item) => acc + item.length, 0);
|
248118
|
+
pointer = spaceUnderActive < pageSize - middle ? pageSize - spaceUnderActive : Math.min(defaultPointerPosition, middle);
|
248119
|
+
}
|
248120
|
+
}
|
248121
|
+
state.current.lastPointer = pointer;
|
248122
|
+
state.current.lastActive = active;
|
248123
|
+
return pointer;
|
248124
|
+
}
|
248125
|
+
function usePagination({ items, active, renderItem, pageSize, loop = true }) {
|
248126
|
+
const width = readlineWidth();
|
248127
|
+
const bound = (num) => (num % items.length + items.length) % items.length;
|
248128
|
+
const renderedItems = items.map((item, index) => {
|
248129
|
+
if (item == null)
|
248130
|
+
return [];
|
248131
|
+
return breakLines(renderItem({ item, index, isActive: index === active }), width).split(`
|
248132
|
+
`);
|
248133
|
+
});
|
248134
|
+
const renderedLength = renderedItems.reduce((acc, item) => acc + item.length, 0);
|
248135
|
+
const renderItemAtIndex = (index) => renderedItems[index] ?? [];
|
248136
|
+
const pointer = usePointerPosition({ active, renderedItems, pageSize, loop });
|
248137
|
+
const activeItem = renderItemAtIndex(active).slice(0, pageSize);
|
248138
|
+
const activeItemPosition = pointer + activeItem.length <= pageSize ? pointer : pageSize - activeItem.length;
|
248139
|
+
const pageBuffer = Array.from({ length: pageSize });
|
248140
|
+
pageBuffer.splice(activeItemPosition, activeItem.length, ...activeItem);
|
248141
|
+
const itemVisited = new Set([active]);
|
248142
|
+
let bufferPointer = activeItemPosition + activeItem.length;
|
248143
|
+
let itemPointer = bound(active + 1);
|
248144
|
+
while (bufferPointer < pageSize && !itemVisited.has(itemPointer) && (loop && renderedLength > pageSize ? itemPointer !== active : itemPointer > active)) {
|
248145
|
+
const lines = renderItemAtIndex(itemPointer);
|
248146
|
+
const linesToAdd = lines.slice(0, pageSize - bufferPointer);
|
248147
|
+
pageBuffer.splice(bufferPointer, linesToAdd.length, ...linesToAdd);
|
248148
|
+
itemVisited.add(itemPointer);
|
248149
|
+
bufferPointer += linesToAdd.length;
|
248150
|
+
itemPointer = bound(itemPointer + 1);
|
248151
|
+
}
|
248152
|
+
bufferPointer = activeItemPosition - 1;
|
248153
|
+
itemPointer = bound(active - 1);
|
248154
|
+
while (bufferPointer >= 0 && !itemVisited.has(itemPointer) && (loop && renderedLength > pageSize ? itemPointer !== active : itemPointer < active)) {
|
248155
|
+
const lines = renderItemAtIndex(itemPointer);
|
248156
|
+
const linesToAdd = lines.slice(Math.max(0, lines.length - bufferPointer - 1));
|
248157
|
+
pageBuffer.splice(bufferPointer - linesToAdd.length + 1, linesToAdd.length, ...linesToAdd);
|
248158
|
+
itemVisited.add(itemPointer);
|
248159
|
+
bufferPointer -= linesToAdd.length;
|
248160
|
+
itemPointer = bound(itemPointer - 1);
|
248161
|
+
}
|
248162
|
+
return pageBuffer.filter((line) => typeof line === "string").join(`
|
248163
|
+
`);
|
248164
|
+
}
|
248085
248165
|
// ../../node_modules/.bun/@inquirer+core@10.2.2+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
|
248086
248166
|
var import_mute_stream = __toESM(require_lib(), 1);
|
248087
248167
|
import * as readline2 from "node:readline";
|
@@ -248478,6 +248558,20 @@ function createPrompt(view) {
|
|
248478
248558
|
};
|
248479
248559
|
return prompt;
|
248480
248560
|
}
|
248561
|
+
// ../../node_modules/.bun/@inquirer+core@10.2.2+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/Separator.js
|
248562
|
+
var import_yoctocolors_cjs2 = __toESM(require_yoctocolors_cjs(), 1);
|
248563
|
+
class Separator {
|
248564
|
+
separator = import_yoctocolors_cjs2.default.dim(Array.from({ length: 15 }).join(esm_default.line));
|
248565
|
+
type = "separator";
|
248566
|
+
constructor(separator) {
|
248567
|
+
if (separator) {
|
248568
|
+
this.separator = separator;
|
248569
|
+
}
|
248570
|
+
}
|
248571
|
+
static isSeparator(choice) {
|
248572
|
+
return Boolean(choice && typeof choice === "object" && "type" in choice && choice.type === "separator");
|
248573
|
+
}
|
248574
|
+
}
|
248481
248575
|
// ../../node_modules/.bun/yoctocolors@2.1.2/node_modules/yoctocolors/base.js
|
248482
248576
|
var exports_base = {};
|
248483
248577
|
__export(exports_base, {
|
@@ -267135,7 +267229,7 @@ function pruneCurrentEnv(currentEnv, env2) {
|
|
267135
267229
|
var package_default = {
|
267136
267230
|
name: "@settlemint/sdk-cli",
|
267137
267231
|
description: "Command-line interface for SettleMint SDK, providing development tools and project management capabilities",
|
267138
|
-
version: "2.6.2-
|
267232
|
+
version: "2.6.2-pr5cf648f6",
|
267139
267233
|
type: "module",
|
267140
267234
|
private: false,
|
267141
267235
|
license: "FSL-1.1-MIT",
|
@@ -267185,14 +267279,14 @@ var package_default = {
|
|
267185
267279
|
devDependencies: {
|
267186
267280
|
"@commander-js/extra-typings": "14.0.0",
|
267187
267281
|
commander: "14.0.1",
|
267188
|
-
"@inquirer/confirm": "5.1.
|
267282
|
+
"@inquirer/confirm": "5.1.18",
|
267189
267283
|
"@inquirer/input": "4.2.4",
|
267190
267284
|
"@inquirer/password": "4.0.18",
|
267191
|
-
"@inquirer/select": "4.3.
|
267192
|
-
"@settlemint/sdk-hasura": "2.6.2-
|
267193
|
-
"@settlemint/sdk-js": "2.6.2-
|
267194
|
-
"@settlemint/sdk-utils": "2.6.2-
|
267195
|
-
"@settlemint/sdk-viem": "2.6.2-
|
267285
|
+
"@inquirer/select": "4.3.4",
|
267286
|
+
"@settlemint/sdk-hasura": "2.6.2-pr5cf648f6",
|
267287
|
+
"@settlemint/sdk-js": "2.6.2-pr5cf648f6",
|
267288
|
+
"@settlemint/sdk-utils": "2.6.2-pr5cf648f6",
|
267289
|
+
"@settlemint/sdk-viem": "2.6.2-pr5cf648f6",
|
267196
267290
|
"@types/node": "24.4.0",
|
267197
267291
|
"@types/semver": "7.7.1",
|
267198
267292
|
"@types/which": "3.0.4",
|
@@ -267209,7 +267303,7 @@ var package_default = {
|
|
267209
267303
|
},
|
267210
267304
|
peerDependencies: {
|
267211
267305
|
hardhat: "<= 4",
|
267212
|
-
"@settlemint/sdk-js": "2.6.2-
|
267306
|
+
"@settlemint/sdk-js": "2.6.2-pr5cf648f6"
|
267213
267307
|
},
|
267214
267308
|
peerDependenciesMeta: {
|
267215
267309
|
hardhat: {
|
@@ -273117,565 +273211,13 @@ async function subgraphNamePrompt({
|
|
273117
273211
|
return sanitizeName(subgraphName);
|
273118
273212
|
}
|
273119
273213
|
|
273120
|
-
// ../../node_modules/.bun/@inquirer+
|
273121
|
-
var isUpKey = (key2) => key2.name === "up";
|
273122
|
-
var isDownKey = (key2) => key2.name === "down";
|
273123
|
-
var isBackspaceKey2 = (key2) => key2.name === "backspace";
|
273124
|
-
var isNumberKey = (key2) => "1234567890".includes(key2.name);
|
273125
|
-
var isEnterKey2 = (key2) => key2.name === "enter" || key2.name === "return";
|
273126
|
-
// ../../node_modules/.bun/@inquirer+core@10.2.0+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/errors.js
|
273127
|
-
class AbortPromptError2 extends Error {
|
273128
|
-
name = "AbortPromptError";
|
273129
|
-
message = "Prompt was aborted";
|
273130
|
-
constructor(options) {
|
273131
|
-
super();
|
273132
|
-
this.cause = options?.cause;
|
273133
|
-
}
|
273134
|
-
}
|
273135
|
-
|
273136
|
-
class CancelPromptError2 extends Error {
|
273137
|
-
name = "CancelPromptError";
|
273138
|
-
message = "Prompt was canceled";
|
273139
|
-
}
|
273140
|
-
|
273141
|
-
class ExitPromptError2 extends Error {
|
273142
|
-
name = "ExitPromptError";
|
273143
|
-
}
|
273144
|
-
|
273145
|
-
class HookError2 extends Error {
|
273146
|
-
name = "HookError";
|
273147
|
-
}
|
273148
|
-
|
273149
|
-
class ValidationError2 extends Error {
|
273150
|
-
name = "ValidationError";
|
273151
|
-
}
|
273152
|
-
// ../../node_modules/.bun/@inquirer+core@10.2.0+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/use-state.js
|
273153
|
-
import { AsyncResource as AsyncResource5 } from "node:async_hooks";
|
273154
|
-
|
273155
|
-
// ../../node_modules/.bun/@inquirer+core@10.2.0+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/hook-engine.js
|
273156
|
-
import { AsyncLocalStorage as AsyncLocalStorage2, AsyncResource as AsyncResource4 } from "node:async_hooks";
|
273157
|
-
var hookStorage2 = new AsyncLocalStorage2;
|
273158
|
-
function createStore2(rl) {
|
273159
|
-
const store = {
|
273160
|
-
rl,
|
273161
|
-
hooks: [],
|
273162
|
-
hooksCleanup: [],
|
273163
|
-
hooksEffect: [],
|
273164
|
-
index: 0,
|
273165
|
-
handleChange() {}
|
273166
|
-
};
|
273167
|
-
return store;
|
273168
|
-
}
|
273169
|
-
function withHooks2(rl, cb) {
|
273170
|
-
const store = createStore2(rl);
|
273171
|
-
return hookStorage2.run(store, () => {
|
273172
|
-
function cycle(render) {
|
273173
|
-
store.handleChange = () => {
|
273174
|
-
store.index = 0;
|
273175
|
-
render();
|
273176
|
-
};
|
273177
|
-
store.handleChange();
|
273178
|
-
}
|
273179
|
-
return cb(cycle);
|
273180
|
-
});
|
273181
|
-
}
|
273182
|
-
function getStore2() {
|
273183
|
-
const store = hookStorage2.getStore();
|
273184
|
-
if (!store) {
|
273185
|
-
throw new HookError2("[Inquirer] Hook functions can only be called from within a prompt");
|
273186
|
-
}
|
273187
|
-
return store;
|
273188
|
-
}
|
273189
|
-
function readline3() {
|
273190
|
-
return getStore2().rl;
|
273191
|
-
}
|
273192
|
-
function withUpdates2(fn) {
|
273193
|
-
const wrapped = (...args) => {
|
273194
|
-
const store = getStore2();
|
273195
|
-
let shouldUpdate = false;
|
273196
|
-
const oldHandleChange = store.handleChange;
|
273197
|
-
store.handleChange = () => {
|
273198
|
-
shouldUpdate = true;
|
273199
|
-
};
|
273200
|
-
const returnValue = fn(...args);
|
273201
|
-
if (shouldUpdate) {
|
273202
|
-
oldHandleChange();
|
273203
|
-
}
|
273204
|
-
store.handleChange = oldHandleChange;
|
273205
|
-
return returnValue;
|
273206
|
-
};
|
273207
|
-
return AsyncResource4.bind(wrapped);
|
273208
|
-
}
|
273209
|
-
function withPointer2(cb) {
|
273210
|
-
const store = getStore2();
|
273211
|
-
const { index } = store;
|
273212
|
-
const pointer = {
|
273213
|
-
get() {
|
273214
|
-
return store.hooks[index];
|
273215
|
-
},
|
273216
|
-
set(value5) {
|
273217
|
-
store.hooks[index] = value5;
|
273218
|
-
},
|
273219
|
-
initialized: index in store.hooks
|
273220
|
-
};
|
273221
|
-
const returnValue = cb(pointer);
|
273222
|
-
store.index++;
|
273223
|
-
return returnValue;
|
273224
|
-
}
|
273225
|
-
function handleChange2() {
|
273226
|
-
getStore2().handleChange();
|
273227
|
-
}
|
273228
|
-
var effectScheduler2 = {
|
273229
|
-
queue(cb) {
|
273230
|
-
const store = getStore2();
|
273231
|
-
const { index } = store;
|
273232
|
-
store.hooksEffect.push(() => {
|
273233
|
-
store.hooksCleanup[index]?.();
|
273234
|
-
const cleanFn = cb(readline3());
|
273235
|
-
if (cleanFn != null && typeof cleanFn !== "function") {
|
273236
|
-
throw new ValidationError2("useEffect return value must be a cleanup function or nothing.");
|
273237
|
-
}
|
273238
|
-
store.hooksCleanup[index] = cleanFn;
|
273239
|
-
});
|
273240
|
-
},
|
273241
|
-
run() {
|
273242
|
-
const store = getStore2();
|
273243
|
-
withUpdates2(() => {
|
273244
|
-
store.hooksEffect.forEach((effect) => {
|
273245
|
-
effect();
|
273246
|
-
});
|
273247
|
-
store.hooksEffect.length = 0;
|
273248
|
-
})();
|
273249
|
-
},
|
273250
|
-
clearAll() {
|
273251
|
-
const store = getStore2();
|
273252
|
-
store.hooksCleanup.forEach((cleanFn) => {
|
273253
|
-
cleanFn?.();
|
273254
|
-
});
|
273255
|
-
store.hooksEffect.length = 0;
|
273256
|
-
store.hooksCleanup.length = 0;
|
273257
|
-
}
|
273258
|
-
};
|
273259
|
-
|
273260
|
-
// ../../node_modules/.bun/@inquirer+core@10.2.0+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/use-state.js
|
273261
|
-
function useState2(defaultValue) {
|
273262
|
-
return withPointer2((pointer) => {
|
273263
|
-
const setState = AsyncResource5.bind(function setState(newValue) {
|
273264
|
-
if (pointer.get() !== newValue) {
|
273265
|
-
pointer.set(newValue);
|
273266
|
-
handleChange2();
|
273267
|
-
}
|
273268
|
-
});
|
273269
|
-
if (pointer.initialized) {
|
273270
|
-
return [pointer.get(), setState];
|
273271
|
-
}
|
273272
|
-
const value5 = typeof defaultValue === "function" ? defaultValue() : defaultValue;
|
273273
|
-
pointer.set(value5);
|
273274
|
-
return [value5, setState];
|
273275
|
-
});
|
273276
|
-
}
|
273277
|
-
|
273278
|
-
// ../../node_modules/.bun/@inquirer+core@10.2.0+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/use-effect.js
|
273279
|
-
function useEffect2(cb, depArray) {
|
273280
|
-
withPointer2((pointer) => {
|
273281
|
-
const oldDeps = pointer.get();
|
273282
|
-
const hasChanged = !Array.isArray(oldDeps) || depArray.some((dep, i7) => !Object.is(dep, oldDeps[i7]));
|
273283
|
-
if (hasChanged) {
|
273284
|
-
effectScheduler2.queue(cb);
|
273285
|
-
}
|
273286
|
-
pointer.set(depArray);
|
273287
|
-
});
|
273288
|
-
}
|
273289
|
-
|
273290
|
-
// ../../node_modules/.bun/@inquirer+core@10.2.0+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/theme.js
|
273291
|
-
var import_yoctocolors_cjs2 = __toESM(require_yoctocolors_cjs(), 1);
|
273292
|
-
var defaultTheme2 = {
|
273293
|
-
prefix: {
|
273294
|
-
idle: import_yoctocolors_cjs2.default.blue("?"),
|
273295
|
-
done: import_yoctocolors_cjs2.default.green(esm_default.tick)
|
273296
|
-
},
|
273297
|
-
spinner: {
|
273298
|
-
interval: 80,
|
273299
|
-
frames: ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"].map((frame) => import_yoctocolors_cjs2.default.yellow(frame))
|
273300
|
-
},
|
273301
|
-
style: {
|
273302
|
-
answer: import_yoctocolors_cjs2.default.cyan,
|
273303
|
-
message: import_yoctocolors_cjs2.default.bold,
|
273304
|
-
error: (text2) => import_yoctocolors_cjs2.default.red(`> ${text2}`),
|
273305
|
-
defaultAnswer: (text2) => import_yoctocolors_cjs2.default.dim(`(${text2})`),
|
273306
|
-
help: import_yoctocolors_cjs2.default.dim,
|
273307
|
-
highlight: import_yoctocolors_cjs2.default.cyan,
|
273308
|
-
key: (text2) => import_yoctocolors_cjs2.default.cyan(import_yoctocolors_cjs2.default.bold(`<${text2}>`))
|
273309
|
-
}
|
273310
|
-
};
|
273311
|
-
|
273312
|
-
// ../../node_modules/.bun/@inquirer+core@10.2.0+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/make-theme.js
|
273313
|
-
function isPlainObject4(value5) {
|
273314
|
-
if (typeof value5 !== "object" || value5 === null)
|
273315
|
-
return false;
|
273316
|
-
let proto = value5;
|
273317
|
-
while (Object.getPrototypeOf(proto) !== null) {
|
273318
|
-
proto = Object.getPrototypeOf(proto);
|
273319
|
-
}
|
273320
|
-
return Object.getPrototypeOf(value5) === proto;
|
273321
|
-
}
|
273322
|
-
function deepMerge3(...objects) {
|
273323
|
-
const output = {};
|
273324
|
-
for (const obj of objects) {
|
273325
|
-
for (const [key2, value5] of Object.entries(obj)) {
|
273326
|
-
const prevValue = output[key2];
|
273327
|
-
output[key2] = isPlainObject4(prevValue) && isPlainObject4(value5) ? deepMerge3(prevValue, value5) : value5;
|
273328
|
-
}
|
273329
|
-
}
|
273330
|
-
return output;
|
273331
|
-
}
|
273332
|
-
function makeTheme2(...themes) {
|
273333
|
-
const themesToMerge = [
|
273334
|
-
defaultTheme2,
|
273335
|
-
...themes.filter((theme) => theme != null)
|
273336
|
-
];
|
273337
|
-
return deepMerge3(...themesToMerge);
|
273338
|
-
}
|
273339
|
-
|
273340
|
-
// ../../node_modules/.bun/@inquirer+core@10.2.0+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/use-prefix.js
|
273341
|
-
function usePrefix2({ status = "idle", theme }) {
|
273342
|
-
const [showLoader, setShowLoader] = useState2(false);
|
273343
|
-
const [tick, setTick] = useState2(0);
|
273344
|
-
const { prefix, spinner: spinner2 } = makeTheme2(theme);
|
273345
|
-
useEffect2(() => {
|
273346
|
-
if (status === "loading") {
|
273347
|
-
let tickInterval;
|
273348
|
-
let inc = -1;
|
273349
|
-
const delayTimeout = setTimeout(() => {
|
273350
|
-
setShowLoader(true);
|
273351
|
-
tickInterval = setInterval(() => {
|
273352
|
-
inc = inc + 1;
|
273353
|
-
setTick(inc % spinner2.frames.length);
|
273354
|
-
}, spinner2.interval);
|
273355
|
-
}, 300);
|
273356
|
-
return () => {
|
273357
|
-
clearTimeout(delayTimeout);
|
273358
|
-
clearInterval(tickInterval);
|
273359
|
-
};
|
273360
|
-
} else {
|
273361
|
-
setShowLoader(false);
|
273362
|
-
}
|
273363
|
-
}, [status]);
|
273364
|
-
if (showLoader) {
|
273365
|
-
return spinner2.frames[tick];
|
273366
|
-
}
|
273367
|
-
const iconName = status === "loading" ? "idle" : status;
|
273368
|
-
return typeof prefix === "string" ? prefix : prefix[iconName] ?? prefix["idle"];
|
273369
|
-
}
|
273370
|
-
// ../../node_modules/.bun/@inquirer+core@10.2.0+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/use-memo.js
|
273371
|
-
function useMemo(fn, dependencies) {
|
273372
|
-
return withPointer2((pointer) => {
|
273373
|
-
const prev = pointer.get();
|
273374
|
-
if (!prev || prev.dependencies.length !== dependencies.length || prev.dependencies.some((dep, i7) => dep !== dependencies[i7])) {
|
273375
|
-
const value5 = fn();
|
273376
|
-
pointer.set({ value: value5, dependencies });
|
273377
|
-
return value5;
|
273378
|
-
}
|
273379
|
-
return prev.value;
|
273380
|
-
});
|
273381
|
-
}
|
273382
|
-
// ../../node_modules/.bun/@inquirer+core@10.2.0+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/use-ref.js
|
273383
|
-
function useRef2(val) {
|
273384
|
-
return useState2({ current: val })[0];
|
273385
|
-
}
|
273386
|
-
// ../../node_modules/.bun/@inquirer+core@10.2.0+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/use-keypress.js
|
273387
|
-
function useKeypress2(userHandler) {
|
273388
|
-
const signal = useRef2(userHandler);
|
273389
|
-
signal.current = userHandler;
|
273390
|
-
useEffect2((rl) => {
|
273391
|
-
let ignore = false;
|
273392
|
-
const handler = withUpdates2((_input, event) => {
|
273393
|
-
if (ignore)
|
273394
|
-
return;
|
273395
|
-
signal.current(event, rl);
|
273396
|
-
});
|
273397
|
-
rl.input.on("keypress", handler);
|
273398
|
-
return () => {
|
273399
|
-
ignore = true;
|
273400
|
-
rl.input.removeListener("keypress", handler);
|
273401
|
-
};
|
273402
|
-
}, []);
|
273403
|
-
}
|
273404
|
-
// ../../node_modules/.bun/@inquirer+core@10.2.0+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/utils.js
|
273405
|
-
var import_cli_width2 = __toESM(require_cli_width(), 1);
|
273406
|
-
var import_wrap_ansi2 = __toESM(require_wrap_ansi(), 1);
|
273407
|
-
function breakLines2(content, width) {
|
273408
|
-
return content.split(`
|
273409
|
-
`).flatMap((line) => import_wrap_ansi2.default(line, width, { trim: false, hard: true }).split(`
|
273410
|
-
`).map((str) => str.trimEnd())).join(`
|
273411
|
-
`);
|
273412
|
-
}
|
273413
|
-
function readlineWidth2() {
|
273414
|
-
return import_cli_width2.default({ defaultWidth: 80, output: readline3().output });
|
273415
|
-
}
|
273416
|
-
|
273417
|
-
// ../../node_modules/.bun/@inquirer+core@10.2.0+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/pagination/use-pagination.js
|
273418
|
-
function usePointerPosition({ active, renderedItems, pageSize, loop }) {
|
273419
|
-
const state = useRef2({
|
273420
|
-
lastPointer: active,
|
273421
|
-
lastActive: undefined
|
273422
|
-
});
|
273423
|
-
const { lastPointer, lastActive } = state.current;
|
273424
|
-
const middle = Math.floor(pageSize / 2);
|
273425
|
-
const renderedLength = renderedItems.reduce((acc, item) => acc + item.length, 0);
|
273426
|
-
const defaultPointerPosition = renderedItems.slice(0, active).reduce((acc, item) => acc + item.length, 0);
|
273427
|
-
let pointer = defaultPointerPosition;
|
273428
|
-
if (renderedLength > pageSize) {
|
273429
|
-
if (loop) {
|
273430
|
-
pointer = lastPointer;
|
273431
|
-
if (lastActive != null && lastActive < active && active - lastActive < pageSize) {
|
273432
|
-
pointer = Math.min(middle, Math.abs(active - lastActive) === 1 ? Math.min(lastPointer + (renderedItems[lastActive]?.length ?? 0), Math.max(defaultPointerPosition, lastPointer)) : lastPointer + active - lastActive);
|
273433
|
-
}
|
273434
|
-
} else {
|
273435
|
-
const spaceUnderActive = renderedItems.slice(active).reduce((acc, item) => acc + item.length, 0);
|
273436
|
-
pointer = spaceUnderActive < pageSize - middle ? pageSize - spaceUnderActive : Math.min(defaultPointerPosition, middle);
|
273437
|
-
}
|
273438
|
-
}
|
273439
|
-
state.current.lastPointer = pointer;
|
273440
|
-
state.current.lastActive = active;
|
273441
|
-
return pointer;
|
273442
|
-
}
|
273443
|
-
function usePagination({ items, active, renderItem, pageSize, loop = true }) {
|
273444
|
-
const width = readlineWidth2();
|
273445
|
-
const bound = (num) => (num % items.length + items.length) % items.length;
|
273446
|
-
const renderedItems = items.map((item, index) => {
|
273447
|
-
if (item == null)
|
273448
|
-
return [];
|
273449
|
-
return breakLines2(renderItem({ item, index, isActive: index === active }), width).split(`
|
273450
|
-
`);
|
273451
|
-
});
|
273452
|
-
const renderedLength = renderedItems.reduce((acc, item) => acc + item.length, 0);
|
273453
|
-
const renderItemAtIndex = (index) => renderedItems[index] ?? [];
|
273454
|
-
const pointer = usePointerPosition({ active, renderedItems, pageSize, loop });
|
273455
|
-
const activeItem = renderItemAtIndex(active).slice(0, pageSize);
|
273456
|
-
const activeItemPosition = pointer + activeItem.length <= pageSize ? pointer : pageSize - activeItem.length;
|
273457
|
-
const pageBuffer = Array.from({ length: pageSize });
|
273458
|
-
pageBuffer.splice(activeItemPosition, activeItem.length, ...activeItem);
|
273459
|
-
const itemVisited = new Set([active]);
|
273460
|
-
let bufferPointer = activeItemPosition + activeItem.length;
|
273461
|
-
let itemPointer = bound(active + 1);
|
273462
|
-
while (bufferPointer < pageSize && !itemVisited.has(itemPointer) && (loop && renderedLength > pageSize ? itemPointer !== active : itemPointer > active)) {
|
273463
|
-
const lines = renderItemAtIndex(itemPointer);
|
273464
|
-
const linesToAdd = lines.slice(0, pageSize - bufferPointer);
|
273465
|
-
pageBuffer.splice(bufferPointer, linesToAdd.length, ...linesToAdd);
|
273466
|
-
itemVisited.add(itemPointer);
|
273467
|
-
bufferPointer += linesToAdd.length;
|
273468
|
-
itemPointer = bound(itemPointer + 1);
|
273469
|
-
}
|
273470
|
-
bufferPointer = activeItemPosition - 1;
|
273471
|
-
itemPointer = bound(active - 1);
|
273472
|
-
while (bufferPointer >= 0 && !itemVisited.has(itemPointer) && (loop && renderedLength > pageSize ? itemPointer !== active : itemPointer < active)) {
|
273473
|
-
const lines = renderItemAtIndex(itemPointer);
|
273474
|
-
const linesToAdd = lines.slice(Math.max(0, lines.length - bufferPointer - 1));
|
273475
|
-
pageBuffer.splice(bufferPointer - linesToAdd.length + 1, linesToAdd.length, ...linesToAdd);
|
273476
|
-
itemVisited.add(itemPointer);
|
273477
|
-
bufferPointer -= linesToAdd.length;
|
273478
|
-
itemPointer = bound(itemPointer - 1);
|
273479
|
-
}
|
273480
|
-
return pageBuffer.filter((line) => typeof line === "string").join(`
|
273481
|
-
`);
|
273482
|
-
}
|
273483
|
-
// ../../node_modules/.bun/@inquirer+core@10.2.0+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
|
273484
|
-
var import_mute_stream2 = __toESM(require_lib(), 1);
|
273485
|
-
import * as readline4 from "node:readline";
|
273486
|
-
import { AsyncResource as AsyncResource6 } from "node:async_hooks";
|
273487
|
-
|
273488
|
-
// ../../node_modules/.bun/@inquirer+core@10.2.0+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/screen-manager.js
|
273489
|
-
var import_ansi_escapes = __toESM(require_ansi_escapes(), 1);
|
273490
|
-
import { stripVTControlCharacters as stripVTControlCharacters3 } from "node:util";
|
273491
|
-
var height2 = (content) => content.split(`
|
273492
|
-
`).length;
|
273493
|
-
var lastLine2 = (content) => content.split(`
|
273494
|
-
`).pop() ?? "";
|
273495
|
-
function cursorDown2(n7) {
|
273496
|
-
return n7 > 0 ? import_ansi_escapes.default.cursorDown(n7) : "";
|
273497
|
-
}
|
273498
|
-
|
273499
|
-
class ScreenManager2 {
|
273500
|
-
height = 0;
|
273501
|
-
extraLinesUnderPrompt = 0;
|
273502
|
-
cursorPos;
|
273503
|
-
rl;
|
273504
|
-
constructor(rl) {
|
273505
|
-
this.rl = rl;
|
273506
|
-
this.cursorPos = rl.getCursorPos();
|
273507
|
-
}
|
273508
|
-
write(content) {
|
273509
|
-
this.rl.output.unmute();
|
273510
|
-
this.rl.output.write(content);
|
273511
|
-
this.rl.output.mute();
|
273512
|
-
}
|
273513
|
-
render(content, bottomContent = "") {
|
273514
|
-
const promptLine = lastLine2(content);
|
273515
|
-
const rawPromptLine = stripVTControlCharacters3(promptLine);
|
273516
|
-
let prompt = rawPromptLine;
|
273517
|
-
if (this.rl.line.length > 0) {
|
273518
|
-
prompt = prompt.slice(0, -this.rl.line.length);
|
273519
|
-
}
|
273520
|
-
this.rl.setPrompt(prompt);
|
273521
|
-
this.cursorPos = this.rl.getCursorPos();
|
273522
|
-
const width = readlineWidth2();
|
273523
|
-
content = breakLines2(content, width);
|
273524
|
-
bottomContent = breakLines2(bottomContent, width);
|
273525
|
-
if (rawPromptLine.length % width === 0) {
|
273526
|
-
content += `
|
273527
|
-
`;
|
273528
|
-
}
|
273529
|
-
let output = content + (bottomContent ? `
|
273530
|
-
` + bottomContent : "");
|
273531
|
-
const promptLineUpDiff = Math.floor(rawPromptLine.length / width) - this.cursorPos.rows;
|
273532
|
-
const bottomContentHeight = promptLineUpDiff + (bottomContent ? height2(bottomContent) : 0);
|
273533
|
-
if (bottomContentHeight > 0)
|
273534
|
-
output += import_ansi_escapes.default.cursorUp(bottomContentHeight);
|
273535
|
-
output += import_ansi_escapes.default.cursorTo(this.cursorPos.cols);
|
273536
|
-
this.write(cursorDown2(this.extraLinesUnderPrompt) + import_ansi_escapes.default.eraseLines(this.height) + output);
|
273537
|
-
this.extraLinesUnderPrompt = bottomContentHeight;
|
273538
|
-
this.height = height2(output);
|
273539
|
-
}
|
273540
|
-
checkCursorPos() {
|
273541
|
-
const cursorPos = this.rl.getCursorPos();
|
273542
|
-
if (cursorPos.cols !== this.cursorPos.cols) {
|
273543
|
-
this.write(import_ansi_escapes.default.cursorTo(cursorPos.cols));
|
273544
|
-
this.cursorPos = cursorPos;
|
273545
|
-
}
|
273546
|
-
}
|
273547
|
-
done({ clearContent }) {
|
273548
|
-
this.rl.setPrompt("");
|
273549
|
-
let output = cursorDown2(this.extraLinesUnderPrompt);
|
273550
|
-
output += clearContent ? import_ansi_escapes.default.eraseLines(this.height) : `
|
273551
|
-
`;
|
273552
|
-
output += import_ansi_escapes.default.cursorShow;
|
273553
|
-
this.write(output);
|
273554
|
-
this.rl.close();
|
273555
|
-
}
|
273556
|
-
}
|
273557
|
-
|
273558
|
-
// ../../node_modules/.bun/@inquirer+core@10.2.0+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/promise-polyfill.js
|
273559
|
-
class PromisePolyfill2 extends Promise {
|
273560
|
-
static withResolver() {
|
273561
|
-
let resolve6;
|
273562
|
-
let reject;
|
273563
|
-
const promise2 = new Promise((res, rej) => {
|
273564
|
-
resolve6 = res;
|
273565
|
-
reject = rej;
|
273566
|
-
});
|
273567
|
-
return { promise: promise2, resolve: resolve6, reject };
|
273568
|
-
}
|
273569
|
-
}
|
273570
|
-
|
273571
|
-
// ../../node_modules/.bun/@inquirer+core@10.2.0+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
|
273572
|
-
function getCallSites2() {
|
273573
|
-
const _prepareStackTrace = Error.prepareStackTrace;
|
273574
|
-
let result = [];
|
273575
|
-
try {
|
273576
|
-
Error.prepareStackTrace = (_5, callSites) => {
|
273577
|
-
const callSitesWithoutCurrent = callSites.slice(1);
|
273578
|
-
result = callSitesWithoutCurrent;
|
273579
|
-
return callSitesWithoutCurrent;
|
273580
|
-
};
|
273581
|
-
new Error().stack;
|
273582
|
-
} catch {
|
273583
|
-
return result;
|
273584
|
-
}
|
273585
|
-
Error.prepareStackTrace = _prepareStackTrace;
|
273586
|
-
return result;
|
273587
|
-
}
|
273588
|
-
function createPrompt2(view) {
|
273589
|
-
const callSites = getCallSites2();
|
273590
|
-
const prompt = (config3, context = {}) => {
|
273591
|
-
const { input = process.stdin, signal } = context;
|
273592
|
-
const cleanups = new Set;
|
273593
|
-
const output = new import_mute_stream2.default;
|
273594
|
-
output.pipe(context.output ?? process.stdout);
|
273595
|
-
const rl = readline4.createInterface({
|
273596
|
-
terminal: true,
|
273597
|
-
input,
|
273598
|
-
output
|
273599
|
-
});
|
273600
|
-
const screen = new ScreenManager2(rl);
|
273601
|
-
const { promise: promise2, resolve: resolve6, reject } = PromisePolyfill2.withResolver();
|
273602
|
-
const cancel3 = () => reject(new CancelPromptError2);
|
273603
|
-
if (signal) {
|
273604
|
-
const abort = () => reject(new AbortPromptError2({ cause: signal.reason }));
|
273605
|
-
if (signal.aborted) {
|
273606
|
-
abort();
|
273607
|
-
return Object.assign(promise2, { cancel: cancel3 });
|
273608
|
-
}
|
273609
|
-
signal.addEventListener("abort", abort);
|
273610
|
-
cleanups.add(() => signal.removeEventListener("abort", abort));
|
273611
|
-
}
|
273612
|
-
cleanups.add(onExit((code2, signal2) => {
|
273613
|
-
reject(new ExitPromptError2(`User force closed the prompt with ${code2} ${signal2}`));
|
273614
|
-
}));
|
273615
|
-
const sigint = () => reject(new ExitPromptError2(`User force closed the prompt with SIGINT`));
|
273616
|
-
rl.on("SIGINT", sigint);
|
273617
|
-
cleanups.add(() => rl.removeListener("SIGINT", sigint));
|
273618
|
-
const checkCursorPos = () => screen.checkCursorPos();
|
273619
|
-
rl.input.on("keypress", checkCursorPos);
|
273620
|
-
cleanups.add(() => rl.input.removeListener("keypress", checkCursorPos));
|
273621
|
-
return withHooks2(rl, (cycle) => {
|
273622
|
-
const hooksCleanup = AsyncResource6.bind(() => effectScheduler2.clearAll());
|
273623
|
-
rl.on("close", hooksCleanup);
|
273624
|
-
cleanups.add(() => rl.removeListener("close", hooksCleanup));
|
273625
|
-
cycle(() => {
|
273626
|
-
try {
|
273627
|
-
const nextView = view(config3, (value5) => {
|
273628
|
-
setImmediate(() => resolve6(value5));
|
273629
|
-
});
|
273630
|
-
if (nextView === undefined) {
|
273631
|
-
const callerFilename = callSites[1]?.getFileName();
|
273632
|
-
throw new Error(`Prompt functions must return a string.
|
273633
|
-
at ${callerFilename}`);
|
273634
|
-
}
|
273635
|
-
const [content, bottomContent] = typeof nextView === "string" ? [nextView] : nextView;
|
273636
|
-
screen.render(content, bottomContent);
|
273637
|
-
effectScheduler2.run();
|
273638
|
-
} catch (error48) {
|
273639
|
-
reject(error48);
|
273640
|
-
}
|
273641
|
-
});
|
273642
|
-
return Object.assign(promise2.then((answer) => {
|
273643
|
-
effectScheduler2.clearAll();
|
273644
|
-
return answer;
|
273645
|
-
}, (error48) => {
|
273646
|
-
effectScheduler2.clearAll();
|
273647
|
-
throw error48;
|
273648
|
-
}).finally(() => {
|
273649
|
-
cleanups.forEach((cleanup) => cleanup());
|
273650
|
-
screen.done({ clearContent: Boolean(context.clearPromptOnDone) });
|
273651
|
-
output.end();
|
273652
|
-
}).then(() => promise2), { cancel: cancel3 });
|
273653
|
-
});
|
273654
|
-
};
|
273655
|
-
return prompt;
|
273656
|
-
}
|
273657
|
-
// ../../node_modules/.bun/@inquirer+core@10.2.0+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/Separator.js
|
273214
|
+
// ../../node_modules/.bun/@inquirer+select@4.3.4+e9dc26b4af2fda18/node_modules/@inquirer/select/dist/esm/index.js
|
273658
273215
|
var import_yoctocolors_cjs3 = __toESM(require_yoctocolors_cjs(), 1);
|
273659
|
-
class Separator {
|
273660
|
-
separator = import_yoctocolors_cjs3.default.dim(Array.from({ length: 15 }).join(esm_default.line));
|
273661
|
-
type = "separator";
|
273662
|
-
constructor(separator) {
|
273663
|
-
if (separator) {
|
273664
|
-
this.separator = separator;
|
273665
|
-
}
|
273666
|
-
}
|
273667
|
-
static isSeparator(choice) {
|
273668
|
-
return Boolean(choice && typeof choice === "object" && "type" in choice && choice.type === "separator");
|
273669
|
-
}
|
273670
|
-
}
|
273671
|
-
// ../../node_modules/.bun/@inquirer+select@4.3.2+e9dc26b4af2fda18/node_modules/@inquirer/select/dist/esm/index.js
|
273672
|
-
var import_yoctocolors_cjs4 = __toESM(require_yoctocolors_cjs(), 1);
|
273673
|
-
var import_ansi_escapes2 = __toESM(require_ansi_escapes(), 1);
|
273674
273216
|
var selectTheme = {
|
273675
273217
|
icon: { cursor: esm_default.pointer },
|
273676
273218
|
style: {
|
273677
|
-
disabled: (text2) =>
|
273678
|
-
description: (text2) =>
|
273219
|
+
disabled: (text2) => import_yoctocolors_cjs3.default.dim(`- ${text2}`),
|
273220
|
+
description: (text2) => import_yoctocolors_cjs3.default.cyan(text2)
|
273679
273221
|
},
|
273680
273222
|
helpMode: "auto",
|
273681
273223
|
indexMode: "hidden"
|
@@ -273708,19 +273250,19 @@ function normalizeChoices(choices) {
|
|
273708
273250
|
return normalizedChoice;
|
273709
273251
|
});
|
273710
273252
|
}
|
273711
|
-
var esm_default3 =
|
273253
|
+
var esm_default3 = createPrompt((config3, done) => {
|
273712
273254
|
const { loop = true, pageSize = 7 } = config3;
|
273713
|
-
const firstRender =
|
273714
|
-
const theme =
|
273715
|
-
const [status, setStatus] =
|
273716
|
-
const prefix =
|
273717
|
-
const searchTimeoutRef =
|
273255
|
+
const firstRender = useRef(true);
|
273256
|
+
const theme = makeTheme(selectTheme, config3.theme);
|
273257
|
+
const [status, setStatus] = useState("idle");
|
273258
|
+
const prefix = usePrefix({ status, theme });
|
273259
|
+
const searchTimeoutRef = useRef();
|
273718
273260
|
const items = useMemo(() => normalizeChoices(config3.choices), [config3.choices]);
|
273719
273261
|
const bounds = useMemo(() => {
|
273720
273262
|
const first = items.findIndex(isSelectable);
|
273721
273263
|
const last = items.findLastIndex(isSelectable);
|
273722
273264
|
if (first === -1) {
|
273723
|
-
throw new
|
273265
|
+
throw new ValidationError("[select prompt] No selectable choices. All choices are disabled.");
|
273724
273266
|
}
|
273725
273267
|
return { first, last };
|
273726
273268
|
}, [items]);
|
@@ -273729,24 +273271,24 @@ var esm_default3 = createPrompt2((config3, done) => {
|
|
273729
273271
|
return -1;
|
273730
273272
|
return items.findIndex((item) => isSelectable(item) && item.value === config3.default);
|
273731
273273
|
}, [config3.default, items]);
|
273732
|
-
const [active, setActive] =
|
273274
|
+
const [active, setActive] = useState(defaultItemIndex === -1 ? bounds.first : defaultItemIndex);
|
273733
273275
|
const selectedChoice = items[active];
|
273734
|
-
|
273276
|
+
useKeypress((key2, rl) => {
|
273735
273277
|
clearTimeout(searchTimeoutRef.current);
|
273736
|
-
if (
|
273278
|
+
if (isEnterKey(key2)) {
|
273737
273279
|
setStatus("done");
|
273738
273280
|
done(selectedChoice.value);
|
273739
|
-
} else if (isUpKey(
|
273281
|
+
} else if (isUpKey(key2) || isDownKey(key2)) {
|
273740
273282
|
rl.clearLine(0);
|
273741
|
-
if (loop || isUpKey(
|
273742
|
-
const offset = isUpKey(
|
273283
|
+
if (loop || isUpKey(key2) && active !== bounds.first || isDownKey(key2) && active !== bounds.last) {
|
273284
|
+
const offset = isUpKey(key2) ? -1 : 1;
|
273743
273285
|
let next = active;
|
273744
273286
|
do {
|
273745
273287
|
next = (next + offset + items.length) % items.length;
|
273746
273288
|
} while (!isSelectable(items[next]));
|
273747
273289
|
setActive(next);
|
273748
273290
|
}
|
273749
|
-
} else if (isNumberKey(
|
273291
|
+
} else if (isNumberKey(key2) && !Number.isNaN(Number(rl.line))) {
|
273750
273292
|
const selectedIndex = Number(rl.line) - 1;
|
273751
273293
|
let selectableIndex = -1;
|
273752
273294
|
const position = items.findIndex((item2) => {
|
@@ -273762,7 +273304,7 @@ var esm_default3 = createPrompt2((config3, done) => {
|
|
273762
273304
|
searchTimeoutRef.current = setTimeout(() => {
|
273763
273305
|
rl.clearLine(0);
|
273764
273306
|
}, 700);
|
273765
|
-
} else if (
|
273307
|
+
} else if (isBackspaceKey(key2)) {
|
273766
273308
|
rl.clearLine(0);
|
273767
273309
|
} else {
|
273768
273310
|
const searchTerm = rl.line.toLowerCase();
|
@@ -273779,7 +273321,7 @@ var esm_default3 = createPrompt2((config3, done) => {
|
|
273779
273321
|
}, 700);
|
273780
273322
|
}
|
273781
273323
|
});
|
273782
|
-
|
273324
|
+
useEffect(() => () => {
|
273783
273325
|
clearTimeout(searchTimeoutRef.current);
|
273784
273326
|
}, []);
|
273785
273327
|
const message = theme.style.message(config3.message, status);
|
@@ -273821,7 +273363,7 @@ ${theme.style.help(`(${config3.instructions?.pager ?? "Use arrow keys to reveal
|
|
273821
273363
|
const choiceDescription = selectedChoice.description ? `
|
273822
273364
|
${theme.style.description(selectedChoice.description)}` : ``;
|
273823
273365
|
return `${[prefix, message, helpTipTop].filter(Boolean).join(" ")}
|
273824
|
-
${page}${helpTipBottom}${choiceDescription}${
|
273366
|
+
${page}${helpTipBottom}${choiceDescription}${cursorHide}`;
|
273825
273367
|
});
|
273826
273368
|
|
273827
273369
|
// src/prompts/smart-contract-set/subgraph.prompt.ts
|
@@ -275466,14 +275008,14 @@ function includesArgs(parameters) {
|
|
275466
275008
|
});
|
275467
275009
|
}
|
275468
275010
|
if (typeof args === "object" && !Array.isArray(args) && typeof matchArgs === "object" && !Array.isArray(matchArgs))
|
275469
|
-
return Object.entries(matchArgs).every(([
|
275011
|
+
return Object.entries(matchArgs).every(([key2, value5]) => {
|
275470
275012
|
if (value5 === null || value5 === undefined)
|
275471
275013
|
return true;
|
275472
|
-
const input = inputs.find((input2) => input2.name ===
|
275014
|
+
const input = inputs.find((input2) => input2.name === key2);
|
275473
275015
|
if (!input)
|
275474
275016
|
return false;
|
275475
275017
|
const value_ = Array.isArray(value5) ? value5 : [value5];
|
275476
|
-
return value_.some((value6) => isEqual(input, value6, args[
|
275018
|
+
return value_.some((value6) => isEqual(input, value6, args[key2]));
|
275477
275019
|
});
|
275478
275020
|
return false;
|
275479
275021
|
}
|
@@ -275672,13 +275214,13 @@ function observe(observerId, callbacks, fn) {
|
|
275672
275214
|
if (listeners && listeners.length > 0)
|
275673
275215
|
return unwatch;
|
275674
275216
|
const emit = {};
|
275675
|
-
for (const
|
275676
|
-
emit[
|
275217
|
+
for (const key2 in callbacks) {
|
275218
|
+
emit[key2] = (...args) => {
|
275677
275219
|
const listeners2 = getListeners();
|
275678
275220
|
if (listeners2.length === 0)
|
275679
275221
|
return;
|
275680
275222
|
for (const listener of listeners2)
|
275681
|
-
listener.fns[
|
275223
|
+
listener.fns[key2]?.(...args);
|
275682
275224
|
};
|
275683
275225
|
}
|
275684
275226
|
const cleanup = fn(emit);
|
@@ -276058,7 +275600,7 @@ function uid(length = 11) {
|
|
276058
275600
|
|
276059
275601
|
// ../../node_modules/.bun/viem@2.37.5+50e9b7ffbf081acf/node_modules/viem/_esm/clients/createClient.js
|
276060
275602
|
function createClient(parameters) {
|
276061
|
-
const { batch, chain, ccipRead, key:
|
275603
|
+
const { batch, chain, ccipRead, key: key2 = "base", name: name4 = "Base Client", type: type5 = "base" } = parameters;
|
276062
275604
|
const experimental_blockTag = parameters.experimental_blockTag ?? (typeof chain?.experimental_preconfirmationTime === "number" ? "pending" : undefined);
|
276063
275605
|
const blockTime = chain?.blockTime ?? 12000;
|
276064
275606
|
const defaultPollingInterval = Math.min(Math.max(Math.floor(blockTime / 2), 500), 4000);
|
@@ -276076,7 +275618,7 @@ function createClient(parameters) {
|
|
276076
275618
|
cacheTime,
|
276077
275619
|
ccipRead,
|
276078
275620
|
chain,
|
276079
|
-
key:
|
275621
|
+
key: key2,
|
276080
275622
|
name: name4,
|
276081
275623
|
pollingInterval,
|
276082
275624
|
request: request2,
|
@@ -276088,8 +275630,8 @@ function createClient(parameters) {
|
|
276088
275630
|
function extend2(base2) {
|
276089
275631
|
return (extendFn) => {
|
276090
275632
|
const extended = extendFn(base2);
|
276091
|
-
for (const
|
276092
|
-
delete extended[
|
275633
|
+
for (const key3 in client)
|
275634
|
+
delete extended[key3];
|
276093
275635
|
const combined = { ...base2, ...extended };
|
276094
275636
|
return Object.assign(combined, { extend: extend2(combined) });
|
276095
275637
|
};
|
@@ -276508,7 +276050,7 @@ init_getChainContractAddress();
|
|
276508
276050
|
init_toHex();
|
276509
276051
|
init_localBatchGatewayRequest();
|
276510
276052
|
async function getEnsText(client, parameters) {
|
276511
|
-
const { blockNumber, blockTag, key:
|
276053
|
+
const { blockNumber, blockTag, key: key2, name: name4, gatewayUrls, strict } = parameters;
|
276512
276054
|
const { chain } = client;
|
276513
276055
|
const universalResolverAddress = (() => {
|
276514
276056
|
if (parameters.universalResolverAddress)
|
@@ -276533,7 +276075,7 @@ async function getEnsText(client, parameters) {
|
|
276533
276075
|
encodeFunctionData({
|
276534
276076
|
abi: textResolverAbi,
|
276535
276077
|
functionName: "text",
|
276536
|
-
args: [namehash(name4),
|
276078
|
+
args: [namehash(name4), key2]
|
276537
276079
|
}),
|
276538
276080
|
gatewayUrls ?? [localBatchGatewayUrl]
|
276539
276081
|
],
|
@@ -278602,16 +278144,16 @@ class LruMap2 extends Map {
|
|
278602
278144
|
});
|
278603
278145
|
this.maxSize = size5;
|
278604
278146
|
}
|
278605
|
-
get(
|
278606
|
-
const value5 = super.get(
|
278607
|
-
if (super.has(
|
278608
|
-
this.delete(
|
278609
|
-
super.set(
|
278147
|
+
get(key2) {
|
278148
|
+
const value5 = super.get(key2);
|
278149
|
+
if (super.has(key2) && value5 !== undefined) {
|
278150
|
+
this.delete(key2);
|
278151
|
+
super.set(key2, value5);
|
278610
278152
|
}
|
278611
278153
|
return value5;
|
278612
278154
|
}
|
278613
|
-
set(
|
278614
|
-
super.set(
|
278155
|
+
set(key2, value5) {
|
278156
|
+
super.set(key2, value5);
|
278615
278157
|
if (this.maxSize && this.size > this.maxSize) {
|
278616
278158
|
const firstKey = this.keys().next().value;
|
278617
278159
|
if (firstKey)
|
@@ -282060,21 +281602,21 @@ function publicActions(client) {
|
|
282060
281602
|
|
282061
281603
|
// ../../node_modules/.bun/viem@2.37.5+50e9b7ffbf081acf/node_modules/viem/_esm/clients/createPublicClient.js
|
282062
281604
|
function createPublicClient(parameters) {
|
282063
|
-
const { key:
|
281605
|
+
const { key: key2 = "public", name: name4 = "Public Client" } = parameters;
|
282064
281606
|
const client = createClient({
|
282065
281607
|
...parameters,
|
282066
|
-
key:
|
281608
|
+
key: key2,
|
282067
281609
|
name: name4,
|
282068
281610
|
type: "publicClient"
|
282069
281611
|
});
|
282070
281612
|
return client.extend(publicActions);
|
282071
281613
|
}
|
282072
281614
|
// ../../node_modules/.bun/viem@2.37.5+50e9b7ffbf081acf/node_modules/viem/_esm/clients/transports/createTransport.js
|
282073
|
-
function createTransport({ key:
|
281615
|
+
function createTransport({ key: key2, methods, name: name4, request: request2, retryCount = 3, retryDelay = 150, timeout, type: type5 }, value5) {
|
282074
281616
|
const uid2 = uid();
|
282075
281617
|
return {
|
282076
281618
|
config: {
|
282077
|
-
key:
|
281619
|
+
key: key2,
|
282078
281620
|
methods,
|
282079
281621
|
name: name4,
|
282080
281622
|
request: request2,
|
@@ -282106,7 +281648,7 @@ class UrlRequiredError extends BaseError2 {
|
|
282106
281648
|
// ../../node_modules/.bun/viem@2.37.5+50e9b7ffbf081acf/node_modules/viem/_esm/clients/transports/http.js
|
282107
281649
|
init_createBatchScheduler();
|
282108
281650
|
function http(url2, config3 = {}) {
|
282109
|
-
const { batch, fetchFn, fetchOptions, key:
|
281651
|
+
const { batch, fetchFn, fetchOptions, key: key2 = "http", methods, name: name4 = "HTTP JSON-RPC", onFetchRequest, onFetchResponse, retryDelay, raw } = config3;
|
282110
281652
|
return ({ chain, retryCount: retryCount_, timeout: timeout_ }) => {
|
282111
281653
|
const { batchSize = 1000, wait: wait2 = 0 } = typeof batch === "object" ? batch : {};
|
282112
281654
|
const retryCount = config3.retryCount ?? retryCount_;
|
@@ -282122,7 +281664,7 @@ function http(url2, config3 = {}) {
|
|
282122
281664
|
timeout
|
282123
281665
|
});
|
282124
281666
|
return createTransport({
|
282125
|
-
key:
|
281667
|
+
key: key2,
|
282126
281668
|
methods,
|
282127
281669
|
name: name4,
|
282128
281670
|
async request({ method, params }) {
|
@@ -299070,23 +298612,23 @@ var LRUCache3 = class {
|
|
299070
298612
|
constructor(maxSize) {
|
299071
298613
|
this.maxSize = maxSize;
|
299072
298614
|
}
|
299073
|
-
get(
|
299074
|
-
const value5 = this.cache.get(
|
298615
|
+
get(key2) {
|
298616
|
+
const value5 = this.cache.get(key2);
|
299075
298617
|
if (value5 !== undefined) {
|
299076
|
-
this.cache.delete(
|
299077
|
-
this.cache.set(
|
298618
|
+
this.cache.delete(key2);
|
298619
|
+
this.cache.set(key2, value5);
|
299078
298620
|
}
|
299079
298621
|
return value5;
|
299080
298622
|
}
|
299081
|
-
set(
|
299082
|
-
this.cache.delete(
|
298623
|
+
set(key2, value5) {
|
298624
|
+
this.cache.delete(key2);
|
299083
298625
|
if (this.cache.size >= this.maxSize) {
|
299084
298626
|
const firstKey = this.cache.keys().next().value;
|
299085
298627
|
if (firstKey !== undefined) {
|
299086
298628
|
this.cache.delete(firstKey);
|
299087
298629
|
}
|
299088
298630
|
}
|
299089
|
-
this.cache.set(
|
298631
|
+
this.cache.set(key2, value5);
|
299090
298632
|
}
|
299091
298633
|
clear() {
|
299092
298634
|
this.cache.clear();
|
@@ -299097,9 +298639,9 @@ var publicClientCache = new LRUCache3(50);
|
|
299097
298639
|
var walletClientFactoryCache = new LRUCache3(50);
|
299098
298640
|
function buildHeaders(baseHeaders, authHeaders) {
|
299099
298641
|
const filteredHeaders = {};
|
299100
|
-
for (const [
|
298642
|
+
for (const [key2, value5] of Object.entries(authHeaders)) {
|
299101
298643
|
if (value5 !== undefined) {
|
299102
|
-
filteredHeaders[
|
298644
|
+
filteredHeaders[key2] = value5;
|
299103
298645
|
}
|
299104
298646
|
}
|
299105
298647
|
return appendHeaders(baseHeaders, filteredHeaders);
|
@@ -299407,11 +298949,56 @@ function extractInfoFromBody(body) {
|
|
299407
298949
|
}
|
299408
298950
|
}
|
299409
298951
|
|
299410
|
-
// ../../node_modules/.bun/@inquirer+
|
299411
|
-
|
299412
|
-
|
299413
|
-
|
299414
|
-
|
298952
|
+
// ../../node_modules/.bun/@inquirer+confirm@5.1.18+e9dc26b4af2fda18/node_modules/@inquirer/confirm/dist/esm/index.js
|
298953
|
+
function getBooleanValue(value5, defaultValue) {
|
298954
|
+
let answer = defaultValue !== false;
|
298955
|
+
if (/^(y|yes)/i.test(value5))
|
298956
|
+
answer = true;
|
298957
|
+
else if (/^(n|no)/i.test(value5))
|
298958
|
+
answer = false;
|
298959
|
+
return answer;
|
298960
|
+
}
|
298961
|
+
function boolToString(value5) {
|
298962
|
+
return value5 ? "Yes" : "No";
|
298963
|
+
}
|
298964
|
+
var esm_default4 = createPrompt((config3, done) => {
|
298965
|
+
const { transformer = boolToString } = config3;
|
298966
|
+
const [status, setStatus] = useState("idle");
|
298967
|
+
const [value5, setValue] = useState("");
|
298968
|
+
const theme = makeTheme(config3.theme);
|
298969
|
+
const prefix = usePrefix({ status, theme });
|
298970
|
+
useKeypress((key2, rl) => {
|
298971
|
+
if (status !== "idle")
|
298972
|
+
return;
|
298973
|
+
if (isEnterKey(key2)) {
|
298974
|
+
const answer = getBooleanValue(value5, config3.default);
|
298975
|
+
setValue(transformer(answer));
|
298976
|
+
setStatus("done");
|
298977
|
+
done(answer);
|
298978
|
+
} else if (isTabKey(key2)) {
|
298979
|
+
const answer = boolToString(!getBooleanValue(value5, config3.default));
|
298980
|
+
rl.clearLine(0);
|
298981
|
+
rl.write(answer);
|
298982
|
+
setValue(answer);
|
298983
|
+
} else {
|
298984
|
+
setValue(rl.line);
|
298985
|
+
}
|
298986
|
+
});
|
298987
|
+
let formattedValue = value5;
|
298988
|
+
let defaultValue = "";
|
298989
|
+
if (status === "done") {
|
298990
|
+
formattedValue = theme.style.answer(value5);
|
298991
|
+
} else {
|
298992
|
+
defaultValue = ` ${theme.style.defaultAnswer(config3.default === false ? "y/N" : "Y/n")}`;
|
298993
|
+
}
|
298994
|
+
const message = theme.style.message(config3.message, status);
|
298995
|
+
return `${prefix} ${message}${defaultValue} ${formattedValue}`;
|
298996
|
+
});
|
298997
|
+
|
298998
|
+
// ../../node_modules/.bun/@inquirer+core@10.2.0+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/key.js
|
298999
|
+
var isEnterKey2 = (key2) => key2.name === "enter" || key2.name === "return";
|
299000
|
+
// ../../node_modules/.bun/@inquirer+core@10.2.0+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/errors.js
|
299001
|
+
class AbortPromptError2 extends Error {
|
299415
299002
|
name = "AbortPromptError";
|
299416
299003
|
message = "Prompt was aborted";
|
299417
299004
|
constructor(options) {
|
@@ -299420,29 +299007,29 @@ class AbortPromptError3 extends Error {
|
|
299420
299007
|
}
|
299421
299008
|
}
|
299422
299009
|
|
299423
|
-
class
|
299010
|
+
class CancelPromptError2 extends Error {
|
299424
299011
|
name = "CancelPromptError";
|
299425
299012
|
message = "Prompt was canceled";
|
299426
299013
|
}
|
299427
299014
|
|
299428
|
-
class
|
299015
|
+
class ExitPromptError2 extends Error {
|
299429
299016
|
name = "ExitPromptError";
|
299430
299017
|
}
|
299431
299018
|
|
299432
|
-
class
|
299019
|
+
class HookError2 extends Error {
|
299433
299020
|
name = "HookError";
|
299434
299021
|
}
|
299435
299022
|
|
299436
|
-
class
|
299023
|
+
class ValidationError2 extends Error {
|
299437
299024
|
name = "ValidationError";
|
299438
299025
|
}
|
299439
|
-
// ../../node_modules/.bun/@inquirer+core@10.2.
|
299440
|
-
import { AsyncResource as
|
299026
|
+
// ../../node_modules/.bun/@inquirer+core@10.2.0+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/use-state.js
|
299027
|
+
import { AsyncResource as AsyncResource5 } from "node:async_hooks";
|
299441
299028
|
|
299442
|
-
// ../../node_modules/.bun/@inquirer+core@10.2.
|
299443
|
-
import { AsyncLocalStorage as
|
299444
|
-
var
|
299445
|
-
function
|
299029
|
+
// ../../node_modules/.bun/@inquirer+core@10.2.0+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/hook-engine.js
|
299030
|
+
import { AsyncLocalStorage as AsyncLocalStorage2, AsyncResource as AsyncResource4 } from "node:async_hooks";
|
299031
|
+
var hookStorage2 = new AsyncLocalStorage2;
|
299032
|
+
function createStore2(rl) {
|
299446
299033
|
const store = {
|
299447
299034
|
rl,
|
299448
299035
|
hooks: [],
|
@@ -299453,9 +299040,9 @@ function createStore3(rl) {
|
|
299453
299040
|
};
|
299454
299041
|
return store;
|
299455
299042
|
}
|
299456
|
-
function
|
299457
|
-
const store =
|
299458
|
-
return
|
299043
|
+
function withHooks2(rl, cb) {
|
299044
|
+
const store = createStore2(rl);
|
299045
|
+
return hookStorage2.run(store, () => {
|
299459
299046
|
function cycle(render) {
|
299460
299047
|
store.handleChange = () => {
|
299461
299048
|
store.index = 0;
|
@@ -299466,19 +299053,19 @@ function withHooks3(rl, cb) {
|
|
299466
299053
|
return cb(cycle);
|
299467
299054
|
});
|
299468
299055
|
}
|
299469
|
-
function
|
299470
|
-
const store =
|
299056
|
+
function getStore2() {
|
299057
|
+
const store = hookStorage2.getStore();
|
299471
299058
|
if (!store) {
|
299472
|
-
throw new
|
299059
|
+
throw new HookError2("[Inquirer] Hook functions can only be called from within a prompt");
|
299473
299060
|
}
|
299474
299061
|
return store;
|
299475
299062
|
}
|
299476
|
-
function
|
299477
|
-
return
|
299063
|
+
function readline3() {
|
299064
|
+
return getStore2().rl;
|
299478
299065
|
}
|
299479
|
-
function
|
299066
|
+
function withUpdates2(fn) {
|
299480
299067
|
const wrapped = (...args) => {
|
299481
|
-
const store =
|
299068
|
+
const store = getStore2();
|
299482
299069
|
let shouldUpdate = false;
|
299483
299070
|
const oldHandleChange = store.handleChange;
|
299484
299071
|
store.handleChange = () => {
|
@@ -299491,10 +299078,10 @@ function withUpdates3(fn) {
|
|
299491
299078
|
store.handleChange = oldHandleChange;
|
299492
299079
|
return returnValue;
|
299493
299080
|
};
|
299494
|
-
return
|
299081
|
+
return AsyncResource4.bind(wrapped);
|
299495
299082
|
}
|
299496
|
-
function
|
299497
|
-
const store =
|
299083
|
+
function withPointer2(cb) {
|
299084
|
+
const store = getStore2();
|
299498
299085
|
const { index: index2 } = store;
|
299499
299086
|
const pointer = {
|
299500
299087
|
get() {
|
@@ -299509,25 +299096,25 @@ function withPointer3(cb) {
|
|
299509
299096
|
store.index++;
|
299510
299097
|
return returnValue;
|
299511
299098
|
}
|
299512
|
-
function
|
299513
|
-
|
299099
|
+
function handleChange2() {
|
299100
|
+
getStore2().handleChange();
|
299514
299101
|
}
|
299515
|
-
var
|
299102
|
+
var effectScheduler2 = {
|
299516
299103
|
queue(cb) {
|
299517
|
-
const store =
|
299104
|
+
const store = getStore2();
|
299518
299105
|
const { index: index2 } = store;
|
299519
299106
|
store.hooksEffect.push(() => {
|
299520
299107
|
store.hooksCleanup[index2]?.();
|
299521
|
-
const cleanFn = cb(
|
299108
|
+
const cleanFn = cb(readline3());
|
299522
299109
|
if (cleanFn != null && typeof cleanFn !== "function") {
|
299523
|
-
throw new
|
299110
|
+
throw new ValidationError2("useEffect return value must be a cleanup function or nothing.");
|
299524
299111
|
}
|
299525
299112
|
store.hooksCleanup[index2] = cleanFn;
|
299526
299113
|
});
|
299527
299114
|
},
|
299528
299115
|
run() {
|
299529
|
-
const store =
|
299530
|
-
|
299116
|
+
const store = getStore2();
|
299117
|
+
withUpdates2(() => {
|
299531
299118
|
store.hooksEffect.forEach((effect) => {
|
299532
299119
|
effect();
|
299533
299120
|
});
|
@@ -299535,7 +299122,7 @@ var effectScheduler3 = {
|
|
299535
299122
|
})();
|
299536
299123
|
},
|
299537
299124
|
clearAll() {
|
299538
|
-
const store =
|
299125
|
+
const store = getStore2();
|
299539
299126
|
store.hooksCleanup.forEach((cleanFn) => {
|
299540
299127
|
cleanFn?.();
|
299541
299128
|
});
|
@@ -299544,13 +299131,13 @@ var effectScheduler3 = {
|
|
299544
299131
|
}
|
299545
299132
|
};
|
299546
299133
|
|
299547
|
-
// ../../node_modules/.bun/@inquirer+core@10.2.
|
299548
|
-
function
|
299549
|
-
return
|
299550
|
-
const setState =
|
299134
|
+
// ../../node_modules/.bun/@inquirer+core@10.2.0+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/use-state.js
|
299135
|
+
function useState2(defaultValue) {
|
299136
|
+
return withPointer2((pointer) => {
|
299137
|
+
const setState = AsyncResource5.bind(function setState(newValue) {
|
299551
299138
|
if (pointer.get() !== newValue) {
|
299552
299139
|
pointer.set(newValue);
|
299553
|
-
|
299140
|
+
handleChange2();
|
299554
299141
|
}
|
299555
299142
|
});
|
299556
299143
|
if (pointer.initialized) {
|
@@ -299562,42 +299149,42 @@ function useState3(defaultValue) {
|
|
299562
299149
|
});
|
299563
299150
|
}
|
299564
299151
|
|
299565
|
-
// ../../node_modules/.bun/@inquirer+core@10.2.
|
299566
|
-
function
|
299567
|
-
|
299152
|
+
// ../../node_modules/.bun/@inquirer+core@10.2.0+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/use-effect.js
|
299153
|
+
function useEffect2(cb, depArray) {
|
299154
|
+
withPointer2((pointer) => {
|
299568
299155
|
const oldDeps = pointer.get();
|
299569
299156
|
const hasChanged = !Array.isArray(oldDeps) || depArray.some((dep, i7) => !Object.is(dep, oldDeps[i7]));
|
299570
299157
|
if (hasChanged) {
|
299571
|
-
|
299158
|
+
effectScheduler2.queue(cb);
|
299572
299159
|
}
|
299573
299160
|
pointer.set(depArray);
|
299574
299161
|
});
|
299575
299162
|
}
|
299576
299163
|
|
299577
|
-
// ../../node_modules/.bun/@inquirer+core@10.2.
|
299578
|
-
var
|
299579
|
-
var
|
299164
|
+
// ../../node_modules/.bun/@inquirer+core@10.2.0+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/theme.js
|
299165
|
+
var import_yoctocolors_cjs4 = __toESM(require_yoctocolors_cjs(), 1);
|
299166
|
+
var defaultTheme2 = {
|
299580
299167
|
prefix: {
|
299581
|
-
idle:
|
299582
|
-
done:
|
299168
|
+
idle: import_yoctocolors_cjs4.default.blue("?"),
|
299169
|
+
done: import_yoctocolors_cjs4.default.green(esm_default.tick)
|
299583
299170
|
},
|
299584
299171
|
spinner: {
|
299585
299172
|
interval: 80,
|
299586
|
-
frames: ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"].map((frame) =>
|
299173
|
+
frames: ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"].map((frame) => import_yoctocolors_cjs4.default.yellow(frame))
|
299587
299174
|
},
|
299588
299175
|
style: {
|
299589
|
-
answer:
|
299590
|
-
message:
|
299591
|
-
error: (text2) =>
|
299592
|
-
defaultAnswer: (text2) =>
|
299593
|
-
help:
|
299594
|
-
highlight:
|
299595
|
-
key: (text2) =>
|
299176
|
+
answer: import_yoctocolors_cjs4.default.cyan,
|
299177
|
+
message: import_yoctocolors_cjs4.default.bold,
|
299178
|
+
error: (text2) => import_yoctocolors_cjs4.default.red(`> ${text2}`),
|
299179
|
+
defaultAnswer: (text2) => import_yoctocolors_cjs4.default.dim(`(${text2})`),
|
299180
|
+
help: import_yoctocolors_cjs4.default.dim,
|
299181
|
+
highlight: import_yoctocolors_cjs4.default.cyan,
|
299182
|
+
key: (text2) => import_yoctocolors_cjs4.default.cyan(import_yoctocolors_cjs4.default.bold(`<${text2}>`))
|
299596
299183
|
}
|
299597
299184
|
};
|
299598
299185
|
|
299599
|
-
// ../../node_modules/.bun/@inquirer+core@10.2.
|
299600
|
-
function
|
299186
|
+
// ../../node_modules/.bun/@inquirer+core@10.2.0+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/make-theme.js
|
299187
|
+
function isPlainObject4(value5) {
|
299601
299188
|
if (typeof value5 !== "object" || value5 === null)
|
299602
299189
|
return false;
|
299603
299190
|
let proto = value5;
|
@@ -299606,30 +299193,30 @@ function isPlainObject5(value5) {
|
|
299606
299193
|
}
|
299607
299194
|
return Object.getPrototypeOf(value5) === proto;
|
299608
299195
|
}
|
299609
|
-
function
|
299196
|
+
function deepMerge3(...objects) {
|
299610
299197
|
const output = {};
|
299611
299198
|
for (const obj of objects) {
|
299612
|
-
for (const [
|
299613
|
-
const prevValue = output[
|
299614
|
-
output[
|
299199
|
+
for (const [key2, value5] of Object.entries(obj)) {
|
299200
|
+
const prevValue = output[key2];
|
299201
|
+
output[key2] = isPlainObject4(prevValue) && isPlainObject4(value5) ? deepMerge3(prevValue, value5) : value5;
|
299615
299202
|
}
|
299616
299203
|
}
|
299617
299204
|
return output;
|
299618
299205
|
}
|
299619
|
-
function
|
299206
|
+
function makeTheme2(...themes) {
|
299620
299207
|
const themesToMerge = [
|
299621
|
-
|
299208
|
+
defaultTheme2,
|
299622
299209
|
...themes.filter((theme) => theme != null)
|
299623
299210
|
];
|
299624
|
-
return
|
299211
|
+
return deepMerge3(...themesToMerge);
|
299625
299212
|
}
|
299626
299213
|
|
299627
|
-
// ../../node_modules/.bun/@inquirer+core@10.2.
|
299628
|
-
function
|
299629
|
-
const [showLoader, setShowLoader] =
|
299630
|
-
const [tick, setTick] =
|
299631
|
-
const { prefix, spinner: spinner2 } =
|
299632
|
-
|
299214
|
+
// ../../node_modules/.bun/@inquirer+core@10.2.0+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/use-prefix.js
|
299215
|
+
function usePrefix2({ status = "idle", theme }) {
|
299216
|
+
const [showLoader, setShowLoader] = useState2(false);
|
299217
|
+
const [tick, setTick] = useState2(0);
|
299218
|
+
const { prefix, spinner: spinner2 } = makeTheme2(theme);
|
299219
|
+
useEffect2(() => {
|
299633
299220
|
if (status === "loading") {
|
299634
299221
|
let tickInterval;
|
299635
299222
|
let inc = -1;
|
@@ -299654,18 +299241,18 @@ function usePrefix3({ status = "idle", theme }) {
|
|
299654
299241
|
const iconName = status === "loading" ? "idle" : status;
|
299655
299242
|
return typeof prefix === "string" ? prefix : prefix[iconName] ?? prefix["idle"];
|
299656
299243
|
}
|
299657
|
-
// ../../node_modules/.bun/@inquirer+core@10.2.
|
299658
|
-
function
|
299659
|
-
return
|
299244
|
+
// ../../node_modules/.bun/@inquirer+core@10.2.0+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/use-ref.js
|
299245
|
+
function useRef2(val) {
|
299246
|
+
return useState2({ current: val })[0];
|
299660
299247
|
}
|
299661
299248
|
|
299662
|
-
// ../../node_modules/.bun/@inquirer+core@10.2.
|
299663
|
-
function
|
299664
|
-
const signal =
|
299249
|
+
// ../../node_modules/.bun/@inquirer+core@10.2.0+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/use-keypress.js
|
299250
|
+
function useKeypress2(userHandler) {
|
299251
|
+
const signal = useRef2(userHandler);
|
299665
299252
|
signal.current = userHandler;
|
299666
|
-
|
299253
|
+
useEffect2((rl) => {
|
299667
299254
|
let ignore = false;
|
299668
|
-
const handler =
|
299255
|
+
const handler = withUpdates2((_input, event) => {
|
299669
299256
|
if (ignore)
|
299670
299257
|
return;
|
299671
299258
|
signal.current(event, rl);
|
@@ -299677,36 +299264,36 @@ function useKeypress3(userHandler) {
|
|
299677
299264
|
};
|
299678
299265
|
}, []);
|
299679
299266
|
}
|
299680
|
-
// ../../node_modules/.bun/@inquirer+core@10.2.
|
299681
|
-
var
|
299682
|
-
var
|
299683
|
-
function
|
299267
|
+
// ../../node_modules/.bun/@inquirer+core@10.2.0+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/utils.js
|
299268
|
+
var import_cli_width2 = __toESM(require_cli_width(), 1);
|
299269
|
+
var import_wrap_ansi2 = __toESM(require_wrap_ansi(), 1);
|
299270
|
+
function breakLines2(content, width) {
|
299684
299271
|
return content.split(`
|
299685
|
-
`).flatMap((line) =>
|
299272
|
+
`).flatMap((line) => import_wrap_ansi2.default(line, width, { trim: false, hard: true }).split(`
|
299686
299273
|
`).map((str) => str.trimEnd())).join(`
|
299687
299274
|
`);
|
299688
299275
|
}
|
299689
|
-
function
|
299690
|
-
return
|
299276
|
+
function readlineWidth2() {
|
299277
|
+
return import_cli_width2.default({ defaultWidth: 80, output: readline3().output });
|
299691
299278
|
}
|
299692
299279
|
|
299693
|
-
// ../../node_modules/.bun/@inquirer+core@10.2.
|
299694
|
-
var
|
299695
|
-
import * as
|
299696
|
-
import { AsyncResource as
|
299280
|
+
// ../../node_modules/.bun/@inquirer+core@10.2.0+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
|
299281
|
+
var import_mute_stream2 = __toESM(require_lib(), 1);
|
299282
|
+
import * as readline4 from "node:readline";
|
299283
|
+
import { AsyncResource as AsyncResource6 } from "node:async_hooks";
|
299697
299284
|
|
299698
|
-
// ../../node_modules/.bun/@inquirer+core@10.2.
|
299699
|
-
var
|
299700
|
-
import { stripVTControlCharacters as
|
299701
|
-
var
|
299285
|
+
// ../../node_modules/.bun/@inquirer+core@10.2.0+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/screen-manager.js
|
299286
|
+
var import_ansi_escapes = __toESM(require_ansi_escapes(), 1);
|
299287
|
+
import { stripVTControlCharacters as stripVTControlCharacters3 } from "node:util";
|
299288
|
+
var height2 = (content) => content.split(`
|
299702
299289
|
`).length;
|
299703
|
-
var
|
299290
|
+
var lastLine2 = (content) => content.split(`
|
299704
299291
|
`).pop() ?? "";
|
299705
|
-
function
|
299706
|
-
return n7 > 0 ?
|
299292
|
+
function cursorDown2(n7) {
|
299293
|
+
return n7 > 0 ? import_ansi_escapes.default.cursorDown(n7) : "";
|
299707
299294
|
}
|
299708
299295
|
|
299709
|
-
class
|
299296
|
+
class ScreenManager2 {
|
299710
299297
|
height = 0;
|
299711
299298
|
extraLinesUnderPrompt = 0;
|
299712
299299
|
cursorPos;
|
@@ -299721,17 +299308,17 @@ class ScreenManager3 {
|
|
299721
299308
|
this.rl.output.mute();
|
299722
299309
|
}
|
299723
299310
|
render(content, bottomContent = "") {
|
299724
|
-
const promptLine =
|
299725
|
-
const rawPromptLine =
|
299311
|
+
const promptLine = lastLine2(content);
|
299312
|
+
const rawPromptLine = stripVTControlCharacters3(promptLine);
|
299726
299313
|
let prompt = rawPromptLine;
|
299727
299314
|
if (this.rl.line.length > 0) {
|
299728
299315
|
prompt = prompt.slice(0, -this.rl.line.length);
|
299729
299316
|
}
|
299730
299317
|
this.rl.setPrompt(prompt);
|
299731
299318
|
this.cursorPos = this.rl.getCursorPos();
|
299732
|
-
const width =
|
299733
|
-
content =
|
299734
|
-
bottomContent =
|
299319
|
+
const width = readlineWidth2();
|
299320
|
+
content = breakLines2(content, width);
|
299321
|
+
bottomContent = breakLines2(bottomContent, width);
|
299735
299322
|
if (rawPromptLine.length % width === 0) {
|
299736
299323
|
content += `
|
299737
299324
|
`;
|
@@ -299739,34 +299326,34 @@ class ScreenManager3 {
|
|
299739
299326
|
let output = content + (bottomContent ? `
|
299740
299327
|
` + bottomContent : "");
|
299741
299328
|
const promptLineUpDiff = Math.floor(rawPromptLine.length / width) - this.cursorPos.rows;
|
299742
|
-
const bottomContentHeight = promptLineUpDiff + (bottomContent ?
|
299329
|
+
const bottomContentHeight = promptLineUpDiff + (bottomContent ? height2(bottomContent) : 0);
|
299743
299330
|
if (bottomContentHeight > 0)
|
299744
|
-
output +=
|
299745
|
-
output +=
|
299746
|
-
this.write(
|
299331
|
+
output += import_ansi_escapes.default.cursorUp(bottomContentHeight);
|
299332
|
+
output += import_ansi_escapes.default.cursorTo(this.cursorPos.cols);
|
299333
|
+
this.write(cursorDown2(this.extraLinesUnderPrompt) + import_ansi_escapes.default.eraseLines(this.height) + output);
|
299747
299334
|
this.extraLinesUnderPrompt = bottomContentHeight;
|
299748
|
-
this.height =
|
299335
|
+
this.height = height2(output);
|
299749
299336
|
}
|
299750
299337
|
checkCursorPos() {
|
299751
299338
|
const cursorPos = this.rl.getCursorPos();
|
299752
299339
|
if (cursorPos.cols !== this.cursorPos.cols) {
|
299753
|
-
this.write(
|
299340
|
+
this.write(import_ansi_escapes.default.cursorTo(cursorPos.cols));
|
299754
299341
|
this.cursorPos = cursorPos;
|
299755
299342
|
}
|
299756
299343
|
}
|
299757
299344
|
done({ clearContent }) {
|
299758
299345
|
this.rl.setPrompt("");
|
299759
|
-
let output =
|
299760
|
-
output += clearContent ?
|
299346
|
+
let output = cursorDown2(this.extraLinesUnderPrompt);
|
299347
|
+
output += clearContent ? import_ansi_escapes.default.eraseLines(this.height) : `
|
299761
299348
|
`;
|
299762
|
-
output +=
|
299349
|
+
output += import_ansi_escapes.default.cursorShow;
|
299763
299350
|
this.write(output);
|
299764
299351
|
this.rl.close();
|
299765
299352
|
}
|
299766
299353
|
}
|
299767
299354
|
|
299768
|
-
// ../../node_modules/.bun/@inquirer+core@10.2.
|
299769
|
-
class
|
299355
|
+
// ../../node_modules/.bun/@inquirer+core@10.2.0+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/promise-polyfill.js
|
299356
|
+
class PromisePolyfill2 extends Promise {
|
299770
299357
|
static withResolver() {
|
299771
299358
|
let resolve7;
|
299772
299359
|
let reject;
|
@@ -299778,8 +299365,8 @@ class PromisePolyfill3 extends Promise {
|
|
299778
299365
|
}
|
299779
299366
|
}
|
299780
299367
|
|
299781
|
-
// ../../node_modules/.bun/@inquirer+core@10.2.
|
299782
|
-
function
|
299368
|
+
// ../../node_modules/.bun/@inquirer+core@10.2.0+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
|
299369
|
+
function getCallSites2() {
|
299783
299370
|
const _prepareStackTrace = Error.prepareStackTrace;
|
299784
299371
|
let result = [];
|
299785
299372
|
try {
|
@@ -299795,23 +299382,23 @@ function getCallSites3() {
|
|
299795
299382
|
Error.prepareStackTrace = _prepareStackTrace;
|
299796
299383
|
return result;
|
299797
299384
|
}
|
299798
|
-
function
|
299799
|
-
const callSites =
|
299385
|
+
function createPrompt2(view) {
|
299386
|
+
const callSites = getCallSites2();
|
299800
299387
|
const prompt = (config3, context = {}) => {
|
299801
299388
|
const { input = process.stdin, signal } = context;
|
299802
299389
|
const cleanups = new Set;
|
299803
|
-
const output = new
|
299390
|
+
const output = new import_mute_stream2.default;
|
299804
299391
|
output.pipe(context.output ?? process.stdout);
|
299805
|
-
const rl =
|
299392
|
+
const rl = readline4.createInterface({
|
299806
299393
|
terminal: true,
|
299807
299394
|
input,
|
299808
299395
|
output
|
299809
299396
|
});
|
299810
|
-
const screen = new
|
299811
|
-
const { promise: promise2, resolve: resolve7, reject } =
|
299812
|
-
const cancel3 = () => reject(new
|
299397
|
+
const screen = new ScreenManager2(rl);
|
299398
|
+
const { promise: promise2, resolve: resolve7, reject } = PromisePolyfill2.withResolver();
|
299399
|
+
const cancel3 = () => reject(new CancelPromptError2);
|
299813
299400
|
if (signal) {
|
299814
|
-
const abort = () => reject(new
|
299401
|
+
const abort = () => reject(new AbortPromptError2({ cause: signal.reason }));
|
299815
299402
|
if (signal.aborted) {
|
299816
299403
|
abort();
|
299817
299404
|
return Object.assign(promise2, { cancel: cancel3 });
|
@@ -299820,16 +299407,16 @@ function createPrompt3(view) {
|
|
299820
299407
|
cleanups.add(() => signal.removeEventListener("abort", abort));
|
299821
299408
|
}
|
299822
299409
|
cleanups.add(onExit((code2, signal2) => {
|
299823
|
-
reject(new
|
299410
|
+
reject(new ExitPromptError2(`User force closed the prompt with ${code2} ${signal2}`));
|
299824
299411
|
}));
|
299825
|
-
const sigint = () => reject(new
|
299412
|
+
const sigint = () => reject(new ExitPromptError2(`User force closed the prompt with SIGINT`));
|
299826
299413
|
rl.on("SIGINT", sigint);
|
299827
299414
|
cleanups.add(() => rl.removeListener("SIGINT", sigint));
|
299828
299415
|
const checkCursorPos = () => screen.checkCursorPos();
|
299829
299416
|
rl.input.on("keypress", checkCursorPos);
|
299830
299417
|
cleanups.add(() => rl.input.removeListener("keypress", checkCursorPos));
|
299831
|
-
return
|
299832
|
-
const hooksCleanup =
|
299418
|
+
return withHooks2(rl, (cycle) => {
|
299419
|
+
const hooksCleanup = AsyncResource6.bind(() => effectScheduler2.clearAll());
|
299833
299420
|
rl.on("close", hooksCleanup);
|
299834
299421
|
cleanups.add(() => rl.removeListener("close", hooksCleanup));
|
299835
299422
|
cycle(() => {
|
@@ -299844,16 +299431,16 @@ function createPrompt3(view) {
|
|
299844
299431
|
}
|
299845
299432
|
const [content, bottomContent] = typeof nextView === "string" ? [nextView] : nextView;
|
299846
299433
|
screen.render(content, bottomContent);
|
299847
|
-
|
299434
|
+
effectScheduler2.run();
|
299848
299435
|
} catch (error48) {
|
299849
299436
|
reject(error48);
|
299850
299437
|
}
|
299851
299438
|
});
|
299852
299439
|
return Object.assign(promise2.then((answer) => {
|
299853
|
-
|
299440
|
+
effectScheduler2.clearAll();
|
299854
299441
|
return answer;
|
299855
299442
|
}, (error48) => {
|
299856
|
-
|
299443
|
+
effectScheduler2.clearAll();
|
299857
299444
|
throw error48;
|
299858
299445
|
}).finally(() => {
|
299859
299446
|
cleanups.forEach((cleanup) => cleanup());
|
@@ -299864,54 +299451,8 @@ function createPrompt3(view) {
|
|
299864
299451
|
};
|
299865
299452
|
return prompt;
|
299866
299453
|
}
|
299867
|
-
// ../../node_modules/.bun/@inquirer+confirm@5.1.17+e9dc26b4af2fda18/node_modules/@inquirer/confirm/dist/esm/index.js
|
299868
|
-
function getBooleanValue(value5, defaultValue) {
|
299869
|
-
let answer = defaultValue !== false;
|
299870
|
-
if (/^(y|yes)/i.test(value5))
|
299871
|
-
answer = true;
|
299872
|
-
else if (/^(n|no)/i.test(value5))
|
299873
|
-
answer = false;
|
299874
|
-
return answer;
|
299875
|
-
}
|
299876
|
-
function boolToString(value5) {
|
299877
|
-
return value5 ? "Yes" : "No";
|
299878
|
-
}
|
299879
|
-
var esm_default4 = createPrompt3((config3, done) => {
|
299880
|
-
const { transformer = boolToString } = config3;
|
299881
|
-
const [status, setStatus] = useState3("idle");
|
299882
|
-
const [value5, setValue] = useState3("");
|
299883
|
-
const theme = makeTheme3(config3.theme);
|
299884
|
-
const prefix = usePrefix3({ status, theme });
|
299885
|
-
useKeypress3((key4, rl) => {
|
299886
|
-
if (status !== "idle")
|
299887
|
-
return;
|
299888
|
-
if (isEnterKey3(key4)) {
|
299889
|
-
const answer = getBooleanValue(value5, config3.default);
|
299890
|
-
setValue(transformer(answer));
|
299891
|
-
setStatus("done");
|
299892
|
-
done(answer);
|
299893
|
-
} else if (isTabKey2(key4)) {
|
299894
|
-
const answer = boolToString(!getBooleanValue(value5, config3.default));
|
299895
|
-
rl.clearLine(0);
|
299896
|
-
rl.write(answer);
|
299897
|
-
setValue(answer);
|
299898
|
-
} else {
|
299899
|
-
setValue(rl.line);
|
299900
|
-
}
|
299901
|
-
});
|
299902
|
-
let formattedValue = value5;
|
299903
|
-
let defaultValue = "";
|
299904
|
-
if (status === "done") {
|
299905
|
-
formattedValue = theme.style.answer(value5);
|
299906
|
-
} else {
|
299907
|
-
defaultValue = ` ${theme.style.defaultAnswer(config3.default === false ? "y/N" : "Y/n")}`;
|
299908
|
-
}
|
299909
|
-
const message = theme.style.message(config3.message, status);
|
299910
|
-
return `${prefix} ${message}${defaultValue} ${formattedValue}`;
|
299911
|
-
});
|
299912
|
-
|
299913
299454
|
// ../../node_modules/.bun/@inquirer+password@4.0.18+e9dc26b4af2fda18/node_modules/@inquirer/password/dist/esm/index.js
|
299914
|
-
var
|
299455
|
+
var import_ansi_escapes2 = __toESM(require_ansi_escapes(), 1);
|
299915
299456
|
var esm_default5 = createPrompt2((config3, done) => {
|
299916
299457
|
const { validate: validate8 = () => true } = config3;
|
299917
299458
|
const theme = makeTheme2(config3.theme);
|
@@ -299919,11 +299460,11 @@ var esm_default5 = createPrompt2((config3, done) => {
|
|
299919
299460
|
const [errorMsg, setError] = useState2();
|
299920
299461
|
const [value5, setValue] = useState2("");
|
299921
299462
|
const prefix = usePrefix2({ status, theme });
|
299922
|
-
useKeypress2(async (
|
299463
|
+
useKeypress2(async (key3, rl) => {
|
299923
299464
|
if (status !== "idle") {
|
299924
299465
|
return;
|
299925
299466
|
}
|
299926
|
-
if (isEnterKey2(
|
299467
|
+
if (isEnterKey2(key3)) {
|
299927
299468
|
const answer = value5;
|
299928
299469
|
setStatus("loading");
|
299929
299470
|
const isValid = await validate8(answer);
|
@@ -299948,7 +299489,7 @@ var esm_default5 = createPrompt2((config3, done) => {
|
|
299948
299489
|
const maskChar = typeof config3.mask === "string" ? config3.mask : "*";
|
299949
299490
|
formattedValue = maskChar.repeat(value5.length);
|
299950
299491
|
} else if (status !== "done") {
|
299951
|
-
helpTip = `${theme.style.help("[input is masked]")}${
|
299492
|
+
helpTip = `${theme.style.help("[input is masked]")}${import_ansi_escapes2.default.cursorHide}`;
|
299952
299493
|
}
|
299953
299494
|
if (status === "done") {
|
299954
299495
|
formattedValue = theme.style.answer(formattedValue);
|
@@ -301626,7 +301167,7 @@ var basename2 = function(p5, extension) {
|
|
301626
301167
|
return extension && lastSegment.endsWith(extension) ? lastSegment.slice(0, -extension.length) : lastSegment;
|
301627
301168
|
};
|
301628
301169
|
// ../../node_modules/.bun/defu@6.1.4/node_modules/defu/dist/defu.mjs
|
301629
|
-
function
|
301170
|
+
function isPlainObject5(value5) {
|
301630
301171
|
if (value5 === null || typeof value5 !== "object") {
|
301631
301172
|
return false;
|
301632
301173
|
}
|
@@ -301643,27 +301184,27 @@ function isPlainObject6(value5) {
|
|
301643
301184
|
return true;
|
301644
301185
|
}
|
301645
301186
|
function _defu(baseObject, defaults2, namespace = ".", merger) {
|
301646
|
-
if (!
|
301187
|
+
if (!isPlainObject5(defaults2)) {
|
301647
301188
|
return _defu(baseObject, {}, namespace, merger);
|
301648
301189
|
}
|
301649
301190
|
const object2 = Object.assign({}, defaults2);
|
301650
|
-
for (const
|
301651
|
-
if (
|
301191
|
+
for (const key3 in baseObject) {
|
301192
|
+
if (key3 === "__proto__" || key3 === "constructor") {
|
301652
301193
|
continue;
|
301653
301194
|
}
|
301654
|
-
const value5 = baseObject[
|
301195
|
+
const value5 = baseObject[key3];
|
301655
301196
|
if (value5 === null || value5 === undefined) {
|
301656
301197
|
continue;
|
301657
301198
|
}
|
301658
|
-
if (merger && merger(object2,
|
301199
|
+
if (merger && merger(object2, key3, value5, namespace)) {
|
301659
301200
|
continue;
|
301660
301201
|
}
|
301661
|
-
if (Array.isArray(value5) && Array.isArray(object2[
|
301662
|
-
object2[
|
301663
|
-
} else if (
|
301664
|
-
object2[
|
301202
|
+
if (Array.isArray(value5) && Array.isArray(object2[key3])) {
|
301203
|
+
object2[key3] = [...value5, ...object2[key3]];
|
301204
|
+
} else if (isPlainObject5(value5) && isPlainObject5(object2[key3])) {
|
301205
|
+
object2[key3] = _defu(value5, object2[key3], (namespace ? `${namespace}.` : "") + key3.toString(), merger);
|
301665
301206
|
} else {
|
301666
|
-
object2[
|
301207
|
+
object2[key3] = value5;
|
301667
301208
|
}
|
301668
301209
|
}
|
301669
301210
|
return object2;
|
@@ -301672,15 +301213,15 @@ function createDefu(merger) {
|
|
301672
301213
|
return (...arguments_5) => arguments_5.reduce((p5, c3) => _defu(p5, c3, "", merger), {});
|
301673
301214
|
}
|
301674
301215
|
var defu = createDefu();
|
301675
|
-
var defuFn = createDefu((object2,
|
301676
|
-
if (object2[
|
301677
|
-
object2[
|
301216
|
+
var defuFn = createDefu((object2, key3, currentValue) => {
|
301217
|
+
if (object2[key3] !== undefined && typeof currentValue === "function") {
|
301218
|
+
object2[key3] = currentValue(object2[key3]);
|
301678
301219
|
return true;
|
301679
301220
|
}
|
301680
301221
|
});
|
301681
|
-
var defuArrayFn = createDefu((object2,
|
301682
|
-
if (Array.isArray(object2[
|
301683
|
-
object2[
|
301222
|
+
var defuArrayFn = createDefu((object2, key3, currentValue) => {
|
301223
|
+
if (Array.isArray(object2[key3]) && typeof currentValue === "function") {
|
301224
|
+
object2[key3] = currentValue(object2[key3]);
|
301684
301225
|
return true;
|
301685
301226
|
}
|
301686
301227
|
});
|
@@ -304386,11 +303927,11 @@ function cacheDirectory() {
|
|
304386
303927
|
}
|
304387
303928
|
function normalizeHeaders(headers = {}) {
|
304388
303929
|
const normalized = {};
|
304389
|
-
for (const [
|
303930
|
+
for (const [key3, value5] of Object.entries(headers)) {
|
304390
303931
|
if (!value5) {
|
304391
303932
|
continue;
|
304392
303933
|
}
|
304393
|
-
normalized[
|
303934
|
+
normalized[key3.toLowerCase()] = value5;
|
304394
303935
|
}
|
304395
303936
|
return normalized;
|
304396
303937
|
}
|
@@ -307639,7 +307180,7 @@ function jsonOutput(data) {
|
|
307639
307180
|
var composer = require_composer();
|
307640
307181
|
var Document = require_Document();
|
307641
307182
|
var Schema = require_Schema();
|
307642
|
-
var
|
307183
|
+
var errors5 = require_errors3();
|
307643
307184
|
var Alias = require_Alias();
|
307644
307185
|
var identity2 = require_identity();
|
307645
307186
|
var Pair = require_Pair();
|
@@ -307655,9 +307196,9 @@ var visit2 = require_visit();
|
|
307655
307196
|
var $Composer = composer.Composer;
|
307656
307197
|
var $Document = Document.Document;
|
307657
307198
|
var $Schema = Schema.Schema;
|
307658
|
-
var $YAMLError =
|
307659
|
-
var $YAMLParseError =
|
307660
|
-
var $YAMLWarning =
|
307199
|
+
var $YAMLError = errors5.YAMLError;
|
307200
|
+
var $YAMLParseError = errors5.YAMLParseError;
|
307201
|
+
var $YAMLWarning = errors5.YAMLWarning;
|
307661
307202
|
var $Alias = Alias.Alias;
|
307662
307203
|
var $isAlias = identity2.isAlias;
|
307663
307204
|
var $isCollection = identity2.isCollection;
|
@@ -308264,11 +307805,11 @@ function createCommand4() {
|
|
308264
307805
|
|
308265
307806
|
// src/utils/commands/passthrough-options.ts
|
308266
307807
|
function mapPassthroughOptions(options, command) {
|
308267
|
-
const optionArgs = Object.entries(options).map(([
|
307808
|
+
const optionArgs = Object.entries(options).map(([key3, value5]) => {
|
308268
307809
|
if (value5 === true) {
|
308269
|
-
return `--${
|
307810
|
+
return `--${key3}`;
|
308270
307811
|
}
|
308271
|
-
return `--${
|
307812
|
+
return `--${key3}=${value5}`;
|
308272
307813
|
});
|
308273
307814
|
return [...optionArgs, ...command.args];
|
308274
307815
|
}
|
@@ -309521,4 +309062,4 @@ async function sdkCliCommand(argv = process.argv) {
|
|
309521
309062
|
// src/cli.ts
|
309522
309063
|
sdkCliCommand();
|
309523
309064
|
|
309524
|
-
//# debugId=
|
309065
|
+
//# debugId=6C9DDC7444A47B4064756E2164756E21
|