@settlemint/sdk-cli 2.6.0-prdf8fb8a1 → 2.6.0-pre8a95765
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 +881 -424
- package/dist/cli.js.map +20 -6
- package/package.json +7 -7
package/dist/cli.js
CHANGED
@@ -159681,7 +159681,7 @@ ${lanes.join(`
|
|
159681
159681
|
function generateOptionOutput(sys2, option, rightAlignOfLeft, leftAlignOfRight) {
|
159682
159682
|
var _a;
|
159683
159683
|
const text = [];
|
159684
|
-
const
|
159684
|
+
const colors2 = createColors(sys2);
|
159685
159685
|
const name2 = getDisplayNameTextOfOption(option);
|
159686
159686
|
const valueCandidates = getValueCandidate(option);
|
159687
159687
|
const defaultValueDescription = typeof option.defaultValueDescription === "object" ? getDiagnosticText(option.defaultValueDescription) : formatDefaultValue(option.defaultValueDescription, option.type === "list" || option.type === "listOrElement" ? option.element.type : option.type);
|
@@ -159702,7 +159702,7 @@ ${lanes.join(`
|
|
159702
159702
|
}
|
159703
159703
|
text.push(sys2.newLine);
|
159704
159704
|
} else {
|
159705
|
-
text.push(
|
159705
|
+
text.push(colors2.blue(name2), sys2.newLine);
|
159706
159706
|
if (option.description) {
|
159707
159707
|
const description3 = getDiagnosticText(option.description);
|
159708
159708
|
text.push(description3);
|
@@ -159747,7 +159747,7 @@ ${lanes.join(`
|
|
159747
159747
|
if (isFirstLine) {
|
159748
159748
|
curLeft = left.padStart(rightAlignOfLeft2);
|
159749
159749
|
curLeft = curLeft.padEnd(leftAlignOfRight2);
|
159750
|
-
curLeft = colorLeft ?
|
159750
|
+
curLeft = colorLeft ? colors2.blue(curLeft) : curLeft;
|
159751
159751
|
} else {
|
159752
159752
|
curLeft = "".padStart(leftAlignOfRight2);
|
159753
159753
|
}
|
@@ -159859,9 +159859,9 @@ ${lanes.join(`
|
|
159859
159859
|
return res;
|
159860
159860
|
}
|
159861
159861
|
function printEasyHelp(sys2, simpleOptions) {
|
159862
|
-
const
|
159862
|
+
const colors2 = createColors(sys2);
|
159863
159863
|
let output = [...getHeader(sys2, `${getDiagnosticText(Diagnostics.tsc_Colon_The_TypeScript_Compiler)} - ${getDiagnosticText(Diagnostics.Version_0, version2)}`)];
|
159864
|
-
output.push(
|
159864
|
+
output.push(colors2.bold(getDiagnosticText(Diagnostics.COMMON_COMMANDS)) + sys2.newLine + sys2.newLine);
|
159865
159865
|
example("tsc", Diagnostics.Compiles_the_current_project_tsconfig_json_in_the_working_directory);
|
159866
159866
|
example("tsc app.ts util.ts", Diagnostics.Ignoring_tsconfig_json_compiles_the_specified_files_with_default_compiler_options);
|
159867
159867
|
example("tsc -b", Diagnostics.Build_a_composite_project_in_the_working_directory);
|
@@ -159882,7 +159882,7 @@ ${lanes.join(`
|
|
159882
159882
|
function example(ex, desc) {
|
159883
159883
|
const examples = typeof ex === "string" ? [ex] : ex;
|
159884
159884
|
for (const example2 of examples) {
|
159885
|
-
output.push(" " +
|
159885
|
+
output.push(" " + colors2.blue(example2) + sys2.newLine);
|
159886
159886
|
}
|
159887
159887
|
output.push(" " + getDiagnosticText(desc) + sys2.newLine + sys2.newLine);
|
159888
159888
|
}
|
@@ -159905,12 +159905,12 @@ ${lanes.join(`
|
|
159905
159905
|
}
|
159906
159906
|
function getHeader(sys2, message) {
|
159907
159907
|
var _a;
|
159908
|
-
const
|
159908
|
+
const colors2 = createColors(sys2);
|
159909
159909
|
const header = [];
|
159910
159910
|
const terminalWidth = ((_a = sys2.getWidthOfTerminal) == null ? undefined : _a.call(sys2)) ?? 0;
|
159911
159911
|
const tsIconLength = 5;
|
159912
|
-
const tsIconFirstLine =
|
159913
|
-
const tsIconSecondLine =
|
159912
|
+
const tsIconFirstLine = colors2.blueBackground("".padStart(tsIconLength));
|
159913
|
+
const tsIconSecondLine = colors2.blueBackground(colors2.brightWhite("TS ".padStart(tsIconLength)));
|
159914
159914
|
if (terminalWidth >= message.length + tsIconLength) {
|
159915
159915
|
const rightAlign = terminalWidth > 120 ? 120 : terminalWidth;
|
159916
159916
|
const leftAlign = rightAlign - tsIconLength;
|
@@ -232045,16 +232045,16 @@ var init_lru = __esm(() => {
|
|
232045
232045
|
});
|
232046
232046
|
this.maxSize = size2;
|
232047
232047
|
}
|
232048
|
-
get(
|
232049
|
-
const value5 = super.get(
|
232050
|
-
if (super.has(
|
232051
|
-
this.delete(
|
232052
|
-
super.set(
|
232048
|
+
get(key3) {
|
232049
|
+
const value5 = super.get(key3);
|
232050
|
+
if (super.has(key3) && value5 !== undefined) {
|
232051
|
+
this.delete(key3);
|
232052
|
+
super.set(key3, value5);
|
232053
232053
|
}
|
232054
232054
|
return value5;
|
232055
232055
|
}
|
232056
|
-
set(
|
232057
|
-
super.set(
|
232056
|
+
set(key3, value5) {
|
232057
|
+
super.set(key3, value5);
|
232058
232058
|
if (this.maxSize && this.size > this.maxSize) {
|
232059
232059
|
const firstKey = this.keys().next().value;
|
232060
232060
|
if (firstKey)
|
@@ -233096,9 +233096,9 @@ var init_decodeErrorResult = __esm(() => {
|
|
233096
233096
|
});
|
233097
233097
|
|
233098
233098
|
// ../../node_modules/.bun/viem@2.34.0+f2e3f0548df57a15/node_modules/viem/_esm/utils/stringify.js
|
233099
|
-
var stringify3 = (value5, replacer, space) => JSON.stringify(value5, (
|
233099
|
+
var stringify3 = (value5, replacer, space) => JSON.stringify(value5, (key3, value_) => {
|
233100
233100
|
const value6 = typeof value_ === "bigint" ? value_.toString() : value_;
|
233101
|
-
return typeof replacer === "function" ? replacer(
|
233101
|
+
return typeof replacer === "function" ? replacer(key3, value6) : value6;
|
233102
233102
|
}, space);
|
233103
233103
|
|
233104
233104
|
// ../../node_modules/.bun/viem@2.34.0+f2e3f0548df57a15/node_modules/viem/_esm/utils/abi/formatAbiItemWithArgs.js
|
@@ -233212,13 +233212,13 @@ var init_stateOverride = __esm(() => {
|
|
233212
233212
|
|
233213
233213
|
// ../../node_modules/.bun/viem@2.34.0+f2e3f0548df57a15/node_modules/viem/_esm/errors/transaction.js
|
233214
233214
|
function prettyPrint(args) {
|
233215
|
-
const entries = Object.entries(args).map(([
|
233215
|
+
const entries = Object.entries(args).map(([key3, value5]) => {
|
233216
233216
|
if (value5 === undefined || value5 === false)
|
233217
233217
|
return null;
|
233218
|
-
return [
|
233218
|
+
return [key3, value5];
|
233219
233219
|
}).filter(Boolean);
|
233220
|
-
const maxLength = entries.reduce((acc, [
|
233221
|
-
return entries.map(([
|
233220
|
+
const maxLength = entries.reduce((acc, [key3]) => Math.max(acc, key3.length), 0);
|
233221
|
+
return entries.map(([key3, value5]) => ` ${`${key3}:`.padEnd(maxLength + 1)} ${value5}`).join(`
|
233222
233222
|
`);
|
233223
233223
|
}
|
233224
233224
|
var FeeConflictError, InvalidLegacyVError, InvalidSerializableTransactionError, InvalidStorageKeySizeError, TransactionNotFoundError, TransactionReceiptNotFoundError, WaitForTransactionReceiptTimeoutError;
|
@@ -234336,7 +234336,7 @@ var init_sha2 = __esm(() => {
|
|
234336
234336
|
});
|
234337
234337
|
|
234338
234338
|
// ../../node_modules/.bun/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/hmac.js
|
234339
|
-
var HMAC, hmac = (hash2,
|
234339
|
+
var HMAC, hmac = (hash2, key3, message) => new HMAC(hash2, key3).update(message).digest();
|
234340
234340
|
var init_hmac = __esm(() => {
|
234341
234341
|
init_utils2();
|
234342
234342
|
HMAC = class HMAC extends Hash {
|
@@ -234345,7 +234345,7 @@ var init_hmac = __esm(() => {
|
|
234345
234345
|
this.finished = false;
|
234346
234346
|
this.destroyed = false;
|
234347
234347
|
ahash(hash2);
|
234348
|
-
const
|
234348
|
+
const key3 = toBytes2(_key);
|
234349
234349
|
this.iHash = hash2.create();
|
234350
234350
|
if (typeof this.iHash.update !== "function")
|
234351
234351
|
throw new Error("Expected instance of class which extends utils.Hash");
|
@@ -234353,7 +234353,7 @@ var init_hmac = __esm(() => {
|
|
234353
234353
|
this.outputLen = this.iHash.outputLen;
|
234354
234354
|
const blockLen = this.blockLen;
|
234355
234355
|
const pad2 = new Uint8Array(blockLen);
|
234356
|
-
pad2.set(
|
234356
|
+
pad2.set(key3.length > blockLen ? hash2.create().update(key3).digest() : key3);
|
234357
234357
|
for (let i7 = 0;i7 < pad2.length; i7++)
|
234358
234358
|
pad2[i7] ^= 54;
|
234359
234359
|
this.iHash.update(pad2);
|
@@ -234403,7 +234403,7 @@ var init_hmac = __esm(() => {
|
|
234403
234403
|
this.iHash.destroy();
|
234404
234404
|
}
|
234405
234405
|
};
|
234406
|
-
hmac.create = (hash2,
|
234406
|
+
hmac.create = (hash2, key3) => new HMAC(hash2, key3);
|
234407
234407
|
});
|
234408
234408
|
|
234409
234409
|
// ../../node_modules/.bun/@noble+curves@1.9.6/node_modules/@noble/curves/esm/utils.js
|
@@ -234866,13 +234866,13 @@ function getMinHashLength(fieldOrder) {
|
|
234866
234866
|
const length = getFieldBytesLength(fieldOrder);
|
234867
234867
|
return length + Math.ceil(length / 2);
|
234868
234868
|
}
|
234869
|
-
function mapHashToField(
|
234870
|
-
const len =
|
234869
|
+
function mapHashToField(key3, fieldOrder, isLE2 = false) {
|
234870
|
+
const len = key3.length;
|
234871
234871
|
const fieldLen = getFieldBytesLength(fieldOrder);
|
234872
234872
|
const minLen = getMinHashLength(fieldOrder);
|
234873
234873
|
if (len < 16 || len < minLen || len > 1024)
|
234874
234874
|
throw new Error("expected " + minLen + "-1024 bytes of input, got " + len);
|
234875
|
-
const num = isLE2 ? bytesToNumberLE(
|
234875
|
+
const num = isLE2 ? bytesToNumberLE(key3) : bytesToNumberBE(key3);
|
234876
234876
|
const reduced = mod(num, fieldOrder - _1n3) + _1n3;
|
234877
234877
|
return isLE2 ? numberToBytesLE(reduced, fieldLen) : numberToBytesBE(reduced, fieldLen);
|
234878
234878
|
}
|
@@ -235203,17 +235203,17 @@ function validateSigOpts(opts, def) {
|
|
235203
235203
|
validateSigFormat(optsn.format);
|
235204
235204
|
return optsn;
|
235205
235205
|
}
|
235206
|
-
function _normFnElement(Fn,
|
235206
|
+
function _normFnElement(Fn, key3) {
|
235207
235207
|
const { BYTES: expected } = Fn;
|
235208
235208
|
let num;
|
235209
|
-
if (typeof
|
235210
|
-
num =
|
235209
|
+
if (typeof key3 === "bigint") {
|
235210
|
+
num = key3;
|
235211
235211
|
} else {
|
235212
|
-
let bytes = ensureBytes("private key",
|
235212
|
+
let bytes = ensureBytes("private key", key3);
|
235213
235213
|
try {
|
235214
235214
|
num = Fn.fromBytes(bytes);
|
235215
235215
|
} catch (error48) {
|
235216
|
-
throw new Error(`invalid private key: expected ui8a of size ${expected}, got ${typeof
|
235216
|
+
throw new Error(`invalid private key: expected ui8a of size ${expected}, got ${typeof key3}`);
|
235217
235217
|
}
|
235218
235218
|
}
|
235219
235219
|
if (!Fn.isValidNot0(num))
|
@@ -235797,7 +235797,7 @@ function ecdh(Point, ecdhOpts = {}) {
|
|
235797
235797
|
randomSecretKey,
|
235798
235798
|
isValidPrivateKey: isValidSecretKey,
|
235799
235799
|
randomPrivateKey: randomSecretKey,
|
235800
|
-
normPrivateKeyToScalar: (
|
235800
|
+
normPrivateKeyToScalar: (key3) => _normFnElement(Fn, key3),
|
235801
235801
|
precompute(windowSize = 8, point = Point.BASE) {
|
235802
235802
|
return point.precompute(windowSize, false);
|
235803
235803
|
}
|
@@ -235814,7 +235814,7 @@ function ecdsa(Point, hash2, ecdsaOpts = {}) {
|
|
235814
235814
|
bits2int_modN: "function"
|
235815
235815
|
});
|
235816
235816
|
const randomBytes2 = ecdsaOpts.randomBytes || randomBytes;
|
235817
|
-
const hmac2 = ecdsaOpts.hmac || ((
|
235817
|
+
const hmac2 = ecdsaOpts.hmac || ((key3, ...msgs) => hmac(hash2, key3, concatBytes(...msgs)));
|
235818
235818
|
const { Fp, Fn } = Point;
|
235819
235819
|
const { ORDER: CURVE_ORDER, BITS: fnBits } = Fn;
|
235820
235820
|
const { keygen, getPublicKey, getSharedSecret, utils, lengths } = ecdh(Point, ecdsaOpts);
|
@@ -236879,11 +236879,11 @@ function extract2(value_, { format: format3 }) {
|
|
236879
236879
|
const value5 = {};
|
236880
236880
|
function extract_(formatted2) {
|
236881
236881
|
const keys = Object.keys(formatted2);
|
236882
|
-
for (const
|
236883
|
-
if (
|
236884
|
-
value5[
|
236885
|
-
if (formatted2[
|
236886
|
-
extract_(formatted2[
|
236882
|
+
for (const key3 of keys) {
|
236883
|
+
if (key3 in value_)
|
236884
|
+
value5[key3] = value_[key3];
|
236885
|
+
if (formatted2[key3] && typeof formatted2[key3] === "object" && !Array.isArray(formatted2[key3]))
|
236886
|
+
extract_(formatted2[key3]);
|
236887
236887
|
}
|
236888
236888
|
}
|
236889
236889
|
const formatted = format3(value_ || {});
|
@@ -236899,8 +236899,8 @@ function defineFormatter(type5, format3) {
|
|
236899
236899
|
format: (args) => {
|
236900
236900
|
const formatted = format3(args);
|
236901
236901
|
if (exclude) {
|
236902
|
-
for (const
|
236903
|
-
delete formatted[
|
236902
|
+
for (const key3 of exclude) {
|
236903
|
+
delete formatted[key3];
|
236904
236904
|
}
|
236905
236905
|
}
|
236906
236906
|
return {
|
@@ -237310,9 +237310,9 @@ var init_Errors = __esm(() => {
|
|
237310
237310
|
|
237311
237311
|
// ../../node_modules/.bun/ox@0.8.7+f2e3f0548df57a15/node_modules/ox/_esm/core/Json.js
|
237312
237312
|
function stringify4(value5, replacer, space) {
|
237313
|
-
return JSON.stringify(value5, (
|
237313
|
+
return JSON.stringify(value5, (key3, value6) => {
|
237314
237314
|
if (typeof replacer === "function")
|
237315
|
-
return replacer(
|
237315
|
+
return replacer(key3, value6);
|
237316
237316
|
if (typeof value6 === "bigint")
|
237317
237317
|
return value6.toString() + bigIntSuffix;
|
237318
237318
|
return value6;
|
@@ -238740,11 +238740,11 @@ var require_visit = __commonJS((exports) => {
|
|
238740
238740
|
visit2.BREAK = BREAK;
|
238741
238741
|
visit2.SKIP = SKIP;
|
238742
238742
|
visit2.REMOVE = REMOVE;
|
238743
|
-
function visit_(
|
238744
|
-
const ctrl = callVisitor(
|
238743
|
+
function visit_(key3, node, visitor, path5) {
|
238744
|
+
const ctrl = callVisitor(key3, node, visitor, path5);
|
238745
238745
|
if (identity2.isNode(ctrl) || identity2.isPair(ctrl)) {
|
238746
|
-
replaceNode(
|
238747
|
-
return visit_(
|
238746
|
+
replaceNode(key3, path5, ctrl);
|
238747
|
+
return visit_(key3, ctrl, visitor, path5);
|
238748
238748
|
}
|
238749
238749
|
if (typeof ctrl !== "symbol") {
|
238750
238750
|
if (identity2.isCollection(node)) {
|
@@ -238788,11 +238788,11 @@ var require_visit = __commonJS((exports) => {
|
|
238788
238788
|
visitAsync.BREAK = BREAK;
|
238789
238789
|
visitAsync.SKIP = SKIP;
|
238790
238790
|
visitAsync.REMOVE = REMOVE;
|
238791
|
-
async function visitAsync_(
|
238792
|
-
const ctrl = await callVisitor(
|
238791
|
+
async function visitAsync_(key3, node, visitor, path5) {
|
238792
|
+
const ctrl = await callVisitor(key3, node, visitor, path5);
|
238793
238793
|
if (identity2.isNode(ctrl) || identity2.isPair(ctrl)) {
|
238794
|
-
replaceNode(
|
238795
|
-
return visitAsync_(
|
238794
|
+
replaceNode(key3, path5, ctrl);
|
238795
|
+
return visitAsync_(key3, ctrl, visitor, path5);
|
238796
238796
|
}
|
238797
238797
|
if (typeof ctrl !== "symbol") {
|
238798
238798
|
if (identity2.isCollection(node)) {
|
@@ -238842,27 +238842,27 @@ var require_visit = __commonJS((exports) => {
|
|
238842
238842
|
}
|
238843
238843
|
return visitor;
|
238844
238844
|
}
|
238845
|
-
function callVisitor(
|
238845
|
+
function callVisitor(key3, node, visitor, path5) {
|
238846
238846
|
if (typeof visitor === "function")
|
238847
|
-
return visitor(
|
238847
|
+
return visitor(key3, node, path5);
|
238848
238848
|
if (identity2.isMap(node))
|
238849
|
-
return visitor.Map?.(
|
238849
|
+
return visitor.Map?.(key3, node, path5);
|
238850
238850
|
if (identity2.isSeq(node))
|
238851
|
-
return visitor.Seq?.(
|
238851
|
+
return visitor.Seq?.(key3, node, path5);
|
238852
238852
|
if (identity2.isPair(node))
|
238853
|
-
return visitor.Pair?.(
|
238853
|
+
return visitor.Pair?.(key3, node, path5);
|
238854
238854
|
if (identity2.isScalar(node))
|
238855
|
-
return visitor.Scalar?.(
|
238855
|
+
return visitor.Scalar?.(key3, node, path5);
|
238856
238856
|
if (identity2.isAlias(node))
|
238857
|
-
return visitor.Alias?.(
|
238857
|
+
return visitor.Alias?.(key3, node, path5);
|
238858
238858
|
return;
|
238859
238859
|
}
|
238860
|
-
function replaceNode(
|
238860
|
+
function replaceNode(key3, path5, node) {
|
238861
238861
|
const parent = path5[path5.length - 1];
|
238862
238862
|
if (identity2.isCollection(parent)) {
|
238863
|
-
parent.items[
|
238863
|
+
parent.items[key3] = node;
|
238864
238864
|
} else if (identity2.isPair(parent)) {
|
238865
|
-
if (
|
238865
|
+
if (key3 === "key")
|
238866
238866
|
parent.key = node;
|
238867
238867
|
else
|
238868
238868
|
parent.value = node;
|
@@ -239093,7 +239093,7 @@ var require_anchors = __commonJS((exports) => {
|
|
239093
239093
|
|
239094
239094
|
// ../../node_modules/.bun/yaml@2.8.1/node_modules/yaml/dist/doc/applyReviver.js
|
239095
239095
|
var require_applyReviver = __commonJS((exports) => {
|
239096
|
-
function applyReviver(reviver, obj,
|
239096
|
+
function applyReviver(reviver, obj, key3, val) {
|
239097
239097
|
if (val && typeof val === "object") {
|
239098
239098
|
if (Array.isArray(val)) {
|
239099
239099
|
for (let i8 = 0, len = val.length;i8 < len; ++i8) {
|
@@ -239133,7 +239133,7 @@ var require_applyReviver = __commonJS((exports) => {
|
|
239133
239133
|
}
|
239134
239134
|
}
|
239135
239135
|
}
|
239136
|
-
return reviver.call(obj,
|
239136
|
+
return reviver.call(obj, key3, val);
|
239137
239137
|
}
|
239138
239138
|
exports.applyReviver = applyReviver;
|
239139
239139
|
});
|
@@ -239462,29 +239462,29 @@ var require_Collection = __commonJS((exports) => {
|
|
239462
239462
|
if (isEmptyPath(path5))
|
239463
239463
|
this.add(value5);
|
239464
239464
|
else {
|
239465
|
-
const [
|
239466
|
-
const node = this.get(
|
239465
|
+
const [key3, ...rest] = path5;
|
239466
|
+
const node = this.get(key3, true);
|
239467
239467
|
if (identity2.isCollection(node))
|
239468
239468
|
node.addIn(rest, value5);
|
239469
239469
|
else if (node === undefined && this.schema)
|
239470
|
-
this.set(
|
239470
|
+
this.set(key3, collectionFromPath(this.schema, rest, value5));
|
239471
239471
|
else
|
239472
|
-
throw new Error(`Expected YAML collection at ${
|
239472
|
+
throw new Error(`Expected YAML collection at ${key3}. Remaining path: ${rest}`);
|
239473
239473
|
}
|
239474
239474
|
}
|
239475
239475
|
deleteIn(path5) {
|
239476
|
-
const [
|
239476
|
+
const [key3, ...rest] = path5;
|
239477
239477
|
if (rest.length === 0)
|
239478
|
-
return this.delete(
|
239479
|
-
const node = this.get(
|
239478
|
+
return this.delete(key3);
|
239479
|
+
const node = this.get(key3, true);
|
239480
239480
|
if (identity2.isCollection(node))
|
239481
239481
|
return node.deleteIn(rest);
|
239482
239482
|
else
|
239483
|
-
throw new Error(`Expected YAML collection at ${
|
239483
|
+
throw new Error(`Expected YAML collection at ${key3}. Remaining path: ${rest}`);
|
239484
239484
|
}
|
239485
239485
|
getIn(path5, keepScalar) {
|
239486
|
-
const [
|
239487
|
-
const node = this.get(
|
239486
|
+
const [key3, ...rest] = path5;
|
239487
|
+
const node = this.get(key3, true);
|
239488
239488
|
if (rest.length === 0)
|
239489
239489
|
return !keepScalar && identity2.isScalar(node) ? node.value : node;
|
239490
239490
|
else
|
@@ -239499,24 +239499,24 @@ var require_Collection = __commonJS((exports) => {
|
|
239499
239499
|
});
|
239500
239500
|
}
|
239501
239501
|
hasIn(path5) {
|
239502
|
-
const [
|
239502
|
+
const [key3, ...rest] = path5;
|
239503
239503
|
if (rest.length === 0)
|
239504
|
-
return this.has(
|
239505
|
-
const node = this.get(
|
239504
|
+
return this.has(key3);
|
239505
|
+
const node = this.get(key3, true);
|
239506
239506
|
return identity2.isCollection(node) ? node.hasIn(rest) : false;
|
239507
239507
|
}
|
239508
239508
|
setIn(path5, value5) {
|
239509
|
-
const [
|
239509
|
+
const [key3, ...rest] = path5;
|
239510
239510
|
if (rest.length === 0) {
|
239511
|
-
this.set(
|
239511
|
+
this.set(key3, value5);
|
239512
239512
|
} else {
|
239513
|
-
const node = this.get(
|
239513
|
+
const node = this.get(key3, true);
|
239514
239514
|
if (identity2.isCollection(node))
|
239515
239515
|
node.setIn(rest, value5);
|
239516
239516
|
else if (node === undefined && this.schema)
|
239517
|
-
this.set(
|
239517
|
+
this.set(key3, collectionFromPath(this.schema, rest, value5));
|
239518
239518
|
else
|
239519
|
-
throw new Error(`Expected YAML collection at ${
|
239519
|
+
throw new Error(`Expected YAML collection at ${key3}. Remaining path: ${rest}`);
|
239520
239520
|
}
|
239521
239521
|
}
|
239522
239522
|
}
|
@@ -240103,19 +240103,19 @@ var require_stringifyPair = __commonJS((exports) => {
|
|
240103
240103
|
var Scalar = require_Scalar();
|
240104
240104
|
var stringify5 = require_stringify();
|
240105
240105
|
var stringifyComment = require_stringifyComment();
|
240106
|
-
function stringifyPair2({ key:
|
240106
|
+
function stringifyPair2({ key: key3, value: value5 }, ctx, onComment, onChompKeep) {
|
240107
240107
|
const { allNullValues, doc: doc2, indent: indent2, indentStep, options: { commentString, indentSeq, simpleKeys } } = ctx;
|
240108
|
-
let keyComment = identity2.isNode(
|
240108
|
+
let keyComment = identity2.isNode(key3) && key3.comment || null;
|
240109
240109
|
if (simpleKeys) {
|
240110
240110
|
if (keyComment) {
|
240111
240111
|
throw new Error("With simple keys, key nodes cannot have comments");
|
240112
240112
|
}
|
240113
|
-
if (identity2.isCollection(
|
240113
|
+
if (identity2.isCollection(key3) || !identity2.isNode(key3) && typeof key3 === "object") {
|
240114
240114
|
const msg = "With simple keys, collection cannot be used as a key value";
|
240115
240115
|
throw new Error(msg);
|
240116
240116
|
}
|
240117
240117
|
}
|
240118
|
-
let explicitKey = !simpleKeys && (!
|
240118
|
+
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"));
|
240119
240119
|
ctx = Object.assign({}, ctx, {
|
240120
240120
|
allNullValues: false,
|
240121
240121
|
implicitKey: !explicitKey && (simpleKeys || !allNullValues),
|
@@ -240123,7 +240123,7 @@ var require_stringifyPair = __commonJS((exports) => {
|
|
240123
240123
|
});
|
240124
240124
|
let keyCommentDone = false;
|
240125
240125
|
let chompKeep = false;
|
240126
|
-
let str = stringify5.stringify(
|
240126
|
+
let str = stringify5.stringify(key3, ctx, () => keyCommentDone = true, () => chompKeep = true);
|
240127
240127
|
if (!explicitKey && !ctx.inFlow && str.length > 1024) {
|
240128
240128
|
if (simpleKeys)
|
240129
240129
|
throw new Error("With simple keys, single line scalar must not span more than 1024 characters");
|
@@ -240267,7 +240267,7 @@ var require_merge = __commonJS((exports) => {
|
|
240267
240267
|
}),
|
240268
240268
|
stringify: () => MERGE_KEY
|
240269
240269
|
};
|
240270
|
-
var isMergeKey = (ctx,
|
240270
|
+
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);
|
240271
240271
|
function addMergeToJSMap(ctx, map4, value5) {
|
240272
240272
|
value5 = ctx && identity2.isAlias(value5) ? value5.resolve(ctx.doc) : value5;
|
240273
240273
|
if (identity2.isSeq(value5))
|
@@ -240284,14 +240284,14 @@ var require_merge = __commonJS((exports) => {
|
|
240284
240284
|
if (!identity2.isMap(source))
|
240285
240285
|
throw new Error("Merge sources must be maps or map aliases");
|
240286
240286
|
const srcMap = source.toJSON(null, ctx, Map);
|
240287
|
-
for (const [
|
240287
|
+
for (const [key3, value6] of srcMap) {
|
240288
240288
|
if (map4 instanceof Map) {
|
240289
|
-
if (!map4.has(
|
240290
|
-
map4.set(
|
240289
|
+
if (!map4.has(key3))
|
240290
|
+
map4.set(key3, value6);
|
240291
240291
|
} else if (map4 instanceof Set) {
|
240292
|
-
map4.add(
|
240293
|
-
} else if (!Object.prototype.hasOwnProperty.call(map4,
|
240294
|
-
Object.defineProperty(map4,
|
240292
|
+
map4.add(key3);
|
240293
|
+
} else if (!Object.prototype.hasOwnProperty.call(map4, key3)) {
|
240294
|
+
Object.defineProperty(map4, key3, {
|
240295
240295
|
value: value6,
|
240296
240296
|
writable: true,
|
240297
240297
|
enumerable: true,
|
@@ -240313,19 +240313,19 @@ var require_addPairToJSMap = __commonJS((exports) => {
|
|
240313
240313
|
var stringify5 = require_stringify();
|
240314
240314
|
var identity2 = require_identity();
|
240315
240315
|
var toJS = require_toJS();
|
240316
|
-
function addPairToJSMap(ctx, map4, { key:
|
240317
|
-
if (identity2.isNode(
|
240318
|
-
|
240319
|
-
else if (merge4.isMergeKey(ctx,
|
240316
|
+
function addPairToJSMap(ctx, map4, { key: key3, value: value5 }) {
|
240317
|
+
if (identity2.isNode(key3) && key3.addToJSMap)
|
240318
|
+
key3.addToJSMap(ctx, map4, value5);
|
240319
|
+
else if (merge4.isMergeKey(ctx, key3))
|
240320
240320
|
merge4.addMergeToJSMap(ctx, map4, value5);
|
240321
240321
|
else {
|
240322
|
-
const jsKey = toJS.toJS(
|
240322
|
+
const jsKey = toJS.toJS(key3, "", ctx);
|
240323
240323
|
if (map4 instanceof Map) {
|
240324
240324
|
map4.set(jsKey, toJS.toJS(value5, jsKey, ctx));
|
240325
240325
|
} else if (map4 instanceof Set) {
|
240326
240326
|
map4.add(jsKey);
|
240327
240327
|
} else {
|
240328
|
-
const stringKey = stringifyKey(
|
240328
|
+
const stringKey = stringifyKey(key3, jsKey, ctx);
|
240329
240329
|
const jsValue = toJS.toJS(value5, stringKey, ctx);
|
240330
240330
|
if (stringKey in map4)
|
240331
240331
|
Object.defineProperty(map4, stringKey, {
|
@@ -240340,19 +240340,19 @@ var require_addPairToJSMap = __commonJS((exports) => {
|
|
240340
240340
|
}
|
240341
240341
|
return map4;
|
240342
240342
|
}
|
240343
|
-
function stringifyKey(
|
240343
|
+
function stringifyKey(key3, jsKey, ctx) {
|
240344
240344
|
if (jsKey === null)
|
240345
240345
|
return "";
|
240346
240346
|
if (typeof jsKey !== "object")
|
240347
240347
|
return String(jsKey);
|
240348
|
-
if (identity2.isNode(
|
240348
|
+
if (identity2.isNode(key3) && ctx?.doc) {
|
240349
240349
|
const strCtx = stringify5.createStringifyContext(ctx.doc, {});
|
240350
240350
|
strCtx.anchors = new Set;
|
240351
240351
|
for (const node of ctx.anchors.keys())
|
240352
240352
|
strCtx.anchors.add(node.anchor);
|
240353
240353
|
strCtx.inFlow = true;
|
240354
240354
|
strCtx.inStringifyKey = true;
|
240355
|
-
const strKey =
|
240355
|
+
const strKey = key3.toString(strCtx);
|
240356
240356
|
if (!ctx.mapKeyWarned) {
|
240357
240357
|
let jsonStr = JSON.stringify(strKey);
|
240358
240358
|
if (jsonStr.length > 40)
|
@@ -240373,25 +240373,25 @@ var require_Pair = __commonJS((exports) => {
|
|
240373
240373
|
var stringifyPair2 = require_stringifyPair();
|
240374
240374
|
var addPairToJSMap = require_addPairToJSMap();
|
240375
240375
|
var identity2 = require_identity();
|
240376
|
-
function createPair(
|
240377
|
-
const k6 = createNode.createNode(
|
240376
|
+
function createPair(key3, value5, ctx) {
|
240377
|
+
const k6 = createNode.createNode(key3, undefined, ctx);
|
240378
240378
|
const v7 = createNode.createNode(value5, undefined, ctx);
|
240379
240379
|
return new Pair(k6, v7);
|
240380
240380
|
}
|
240381
240381
|
|
240382
240382
|
class Pair {
|
240383
|
-
constructor(
|
240383
|
+
constructor(key3, value5 = null) {
|
240384
240384
|
Object.defineProperty(this, identity2.NODE_TYPE, { value: identity2.PAIR });
|
240385
|
-
this.key =
|
240385
|
+
this.key = key3;
|
240386
240386
|
this.value = value5;
|
240387
240387
|
}
|
240388
240388
|
clone(schema) {
|
240389
|
-
let { key:
|
240390
|
-
if (identity2.isNode(
|
240391
|
-
|
240389
|
+
let { key: key3, value: value5 } = this;
|
240390
|
+
if (identity2.isNode(key3))
|
240391
|
+
key3 = key3.clone(schema);
|
240392
240392
|
if (identity2.isNode(value5))
|
240393
240393
|
value5 = value5.clone(schema);
|
240394
|
-
return new Pair(
|
240394
|
+
return new Pair(key3, value5);
|
240395
240395
|
}
|
240396
240396
|
toJSON(_6, ctx) {
|
240397
240397
|
const pair = ctx?.mapAsMap ? new Map : {};
|
@@ -240558,11 +240558,11 @@ var require_YAMLMap = __commonJS((exports) => {
|
|
240558
240558
|
var identity2 = require_identity();
|
240559
240559
|
var Pair = require_Pair();
|
240560
240560
|
var Scalar = require_Scalar();
|
240561
|
-
function findPair(items,
|
240562
|
-
const k6 = identity2.isScalar(
|
240561
|
+
function findPair(items, key3) {
|
240562
|
+
const k6 = identity2.isScalar(key3) ? key3.value : key3;
|
240563
240563
|
for (const it2 of items) {
|
240564
240564
|
if (identity2.isPair(it2)) {
|
240565
|
-
if (it2.key ===
|
240565
|
+
if (it2.key === key3 || it2.key === k6)
|
240566
240566
|
return it2;
|
240567
240567
|
if (identity2.isScalar(it2.key) && it2.key.value === k6)
|
240568
240568
|
return it2;
|
@@ -240582,20 +240582,20 @@ var require_YAMLMap = __commonJS((exports) => {
|
|
240582
240582
|
static from(schema, obj, ctx) {
|
240583
240583
|
const { keepUndefined, replacer } = ctx;
|
240584
240584
|
const map4 = new this(schema);
|
240585
|
-
const add = (
|
240585
|
+
const add = (key3, value5) => {
|
240586
240586
|
if (typeof replacer === "function")
|
240587
|
-
value5 = replacer.call(obj,
|
240588
|
-
else if (Array.isArray(replacer) && !replacer.includes(
|
240587
|
+
value5 = replacer.call(obj, key3, value5);
|
240588
|
+
else if (Array.isArray(replacer) && !replacer.includes(key3))
|
240589
240589
|
return;
|
240590
240590
|
if (value5 !== undefined || keepUndefined)
|
240591
|
-
map4.items.push(Pair.createPair(
|
240591
|
+
map4.items.push(Pair.createPair(key3, value5, ctx));
|
240592
240592
|
};
|
240593
240593
|
if (obj instanceof Map) {
|
240594
|
-
for (const [
|
240595
|
-
add(
|
240594
|
+
for (const [key3, value5] of obj)
|
240595
|
+
add(key3, value5);
|
240596
240596
|
} else if (obj && typeof obj === "object") {
|
240597
|
-
for (const
|
240598
|
-
add(
|
240597
|
+
for (const key3 of Object.keys(obj))
|
240598
|
+
add(key3, obj[key3]);
|
240599
240599
|
}
|
240600
240600
|
if (typeof schema.sortMapEntries === "function") {
|
240601
240601
|
map4.items.sort(schema.sortMapEntries);
|
@@ -240629,23 +240629,23 @@ var require_YAMLMap = __commonJS((exports) => {
|
|
240629
240629
|
this.items.push(_pair);
|
240630
240630
|
}
|
240631
240631
|
}
|
240632
|
-
delete(
|
240633
|
-
const it2 = findPair(this.items,
|
240632
|
+
delete(key3) {
|
240633
|
+
const it2 = findPair(this.items, key3);
|
240634
240634
|
if (!it2)
|
240635
240635
|
return false;
|
240636
240636
|
const del = this.items.splice(this.items.indexOf(it2), 1);
|
240637
240637
|
return del.length > 0;
|
240638
240638
|
}
|
240639
|
-
get(
|
240640
|
-
const it2 = findPair(this.items,
|
240639
|
+
get(key3, keepScalar) {
|
240640
|
+
const it2 = findPair(this.items, key3);
|
240641
240641
|
const node = it2?.value;
|
240642
240642
|
return (!keepScalar && identity2.isScalar(node) ? node.value : node) ?? undefined;
|
240643
240643
|
}
|
240644
|
-
has(
|
240645
|
-
return !!findPair(this.items,
|
240644
|
+
has(key3) {
|
240645
|
+
return !!findPair(this.items, key3);
|
240646
240646
|
}
|
240647
|
-
set(
|
240648
|
-
this.add(new Pair.Pair(
|
240647
|
+
set(key3, value5) {
|
240648
|
+
this.add(new Pair.Pair(key3, value5), true);
|
240649
240649
|
}
|
240650
240650
|
toJSON(_6, ctx, Type) {
|
240651
240651
|
const map4 = Type ? new Type : ctx?.mapAsMap ? new Map : {};
|
@@ -240716,28 +240716,28 @@ var require_YAMLSeq = __commonJS((exports) => {
|
|
240716
240716
|
add(value5) {
|
240717
240717
|
this.items.push(value5);
|
240718
240718
|
}
|
240719
|
-
delete(
|
240720
|
-
const idx = asItemIndex(
|
240719
|
+
delete(key3) {
|
240720
|
+
const idx = asItemIndex(key3);
|
240721
240721
|
if (typeof idx !== "number")
|
240722
240722
|
return false;
|
240723
240723
|
const del = this.items.splice(idx, 1);
|
240724
240724
|
return del.length > 0;
|
240725
240725
|
}
|
240726
|
-
get(
|
240727
|
-
const idx = asItemIndex(
|
240726
|
+
get(key3, keepScalar) {
|
240727
|
+
const idx = asItemIndex(key3);
|
240728
240728
|
if (typeof idx !== "number")
|
240729
240729
|
return;
|
240730
240730
|
const it2 = this.items[idx];
|
240731
240731
|
return !keepScalar && identity2.isScalar(it2) ? it2.value : it2;
|
240732
240732
|
}
|
240733
|
-
has(
|
240734
|
-
const idx = asItemIndex(
|
240733
|
+
has(key3) {
|
240734
|
+
const idx = asItemIndex(key3);
|
240735
240735
|
return typeof idx === "number" && idx < this.items.length;
|
240736
240736
|
}
|
240737
|
-
set(
|
240738
|
-
const idx = asItemIndex(
|
240737
|
+
set(key3, value5) {
|
240738
|
+
const idx = asItemIndex(key3);
|
240739
240739
|
if (typeof idx !== "number")
|
240740
|
-
throw new Error(`Expected a valid index, not ${
|
240740
|
+
throw new Error(`Expected a valid index, not ${key3}.`);
|
240741
240741
|
const prev = this.items[idx];
|
240742
240742
|
if (identity2.isScalar(prev) && Scalar.isScalarValue(value5))
|
240743
240743
|
prev.value = value5;
|
@@ -240771,8 +240771,8 @@ var require_YAMLSeq = __commonJS((exports) => {
|
|
240771
240771
|
let i8 = 0;
|
240772
240772
|
for (let it2 of obj) {
|
240773
240773
|
if (typeof replacer === "function") {
|
240774
|
-
const
|
240775
|
-
it2 = replacer.call(obj,
|
240774
|
+
const key3 = obj instanceof Set ? it2 : String(i8++);
|
240775
|
+
it2 = replacer.call(obj, key3, it2);
|
240776
240776
|
}
|
240777
240777
|
seq.items.push(createNode.createNode(it2, undefined, ctx));
|
240778
240778
|
}
|
@@ -240780,8 +240780,8 @@ var require_YAMLSeq = __commonJS((exports) => {
|
|
240780
240780
|
return seq;
|
240781
240781
|
}
|
240782
240782
|
}
|
240783
|
-
function asItemIndex(
|
240784
|
-
let idx = identity2.isScalar(
|
240783
|
+
function asItemIndex(key3) {
|
240784
|
+
let idx = identity2.isScalar(key3) ? key3.value : key3;
|
240785
240785
|
if (idx && typeof idx === "string")
|
240786
240786
|
idx = Number(idx);
|
240787
240787
|
return typeof idx === "number" && Number.isInteger(idx) && idx >= 0 ? idx : null;
|
@@ -241154,25 +241154,25 @@ ${cn.comment}` : item.comment;
|
|
241154
241154
|
for (let it2 of iterable) {
|
241155
241155
|
if (typeof replacer === "function")
|
241156
241156
|
it2 = replacer.call(iterable, String(i8++), it2);
|
241157
|
-
let
|
241157
|
+
let key3, value5;
|
241158
241158
|
if (Array.isArray(it2)) {
|
241159
241159
|
if (it2.length === 2) {
|
241160
|
-
|
241160
|
+
key3 = it2[0];
|
241161
241161
|
value5 = it2[1];
|
241162
241162
|
} else
|
241163
241163
|
throw new TypeError(`Expected [key, value] tuple: ${it2}`);
|
241164
241164
|
} else if (it2 && it2 instanceof Object) {
|
241165
241165
|
const keys = Object.keys(it2);
|
241166
241166
|
if (keys.length === 1) {
|
241167
|
-
|
241168
|
-
value5 = it2[
|
241167
|
+
key3 = keys[0];
|
241168
|
+
value5 = it2[key3];
|
241169
241169
|
} else {
|
241170
241170
|
throw new TypeError(`Expected tuple with one key, not ${keys.length} keys`);
|
241171
241171
|
}
|
241172
241172
|
} else {
|
241173
|
-
|
241173
|
+
key3 = it2;
|
241174
241174
|
}
|
241175
|
-
pairs2.items.push(Pair.createPair(
|
241175
|
+
pairs2.items.push(Pair.createPair(key3, value5, ctx));
|
241176
241176
|
}
|
241177
241177
|
return pairs2;
|
241178
241178
|
}
|
@@ -241213,16 +241213,16 @@ var require_omap = __commonJS((exports) => {
|
|
241213
241213
|
if (ctx?.onCreate)
|
241214
241214
|
ctx.onCreate(map4);
|
241215
241215
|
for (const pair of this.items) {
|
241216
|
-
let
|
241216
|
+
let key3, value5;
|
241217
241217
|
if (identity2.isPair(pair)) {
|
241218
|
-
|
241219
|
-
value5 = toJS.toJS(pair.value,
|
241218
|
+
key3 = toJS.toJS(pair.key, "", ctx);
|
241219
|
+
value5 = toJS.toJS(pair.value, key3, ctx);
|
241220
241220
|
} else {
|
241221
|
-
|
241221
|
+
key3 = toJS.toJS(pair, "", ctx);
|
241222
241222
|
}
|
241223
|
-
if (map4.has(
|
241223
|
+
if (map4.has(key3))
|
241224
241224
|
throw new Error("Ordered maps must not include duplicate keys");
|
241225
|
-
map4.set(
|
241225
|
+
map4.set(key3, value5);
|
241226
241226
|
}
|
241227
241227
|
return map4;
|
241228
241228
|
}
|
@@ -241243,12 +241243,12 @@ var require_omap = __commonJS((exports) => {
|
|
241243
241243
|
resolve(seq, onError) {
|
241244
241244
|
const pairs$1 = pairs.resolvePairs(seq, onError);
|
241245
241245
|
const seenKeys = [];
|
241246
|
-
for (const { key:
|
241247
|
-
if (identity2.isScalar(
|
241248
|
-
if (seenKeys.includes(
|
241249
|
-
onError(`Ordered maps must not include duplicate keys: ${
|
241246
|
+
for (const { key: key3 } of pairs$1.items) {
|
241247
|
+
if (identity2.isScalar(key3)) {
|
241248
|
+
if (seenKeys.includes(key3.value)) {
|
241249
|
+
onError(`Ordered maps must not include duplicate keys: ${key3.value}`);
|
241250
241250
|
} else {
|
241251
|
-
seenKeys.push(
|
241251
|
+
seenKeys.push(key3.value);
|
241252
241252
|
}
|
241253
241253
|
}
|
241254
241254
|
}
|
@@ -241422,30 +241422,30 @@ var require_set = __commonJS((exports) => {
|
|
241422
241422
|
super(schema);
|
241423
241423
|
this.tag = YAMLSet.tag;
|
241424
241424
|
}
|
241425
|
-
add(
|
241425
|
+
add(key3) {
|
241426
241426
|
let pair;
|
241427
|
-
if (identity2.isPair(
|
241428
|
-
pair =
|
241429
|
-
else if (
|
241430
|
-
pair = new Pair.Pair(
|
241427
|
+
if (identity2.isPair(key3))
|
241428
|
+
pair = key3;
|
241429
|
+
else if (key3 && typeof key3 === "object" && "key" in key3 && "value" in key3 && key3.value === null)
|
241430
|
+
pair = new Pair.Pair(key3.key, null);
|
241431
241431
|
else
|
241432
|
-
pair = new Pair.Pair(
|
241432
|
+
pair = new Pair.Pair(key3, null);
|
241433
241433
|
const prev = YAMLMap.findPair(this.items, pair.key);
|
241434
241434
|
if (!prev)
|
241435
241435
|
this.items.push(pair);
|
241436
241436
|
}
|
241437
|
-
get(
|
241438
|
-
const pair = YAMLMap.findPair(this.items,
|
241437
|
+
get(key3, keepPair) {
|
241438
|
+
const pair = YAMLMap.findPair(this.items, key3);
|
241439
241439
|
return !keepPair && identity2.isPair(pair) ? identity2.isScalar(pair.key) ? pair.key.value : pair.key : pair;
|
241440
241440
|
}
|
241441
|
-
set(
|
241441
|
+
set(key3, value5) {
|
241442
241442
|
if (typeof value5 !== "boolean")
|
241443
241443
|
throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof value5}`);
|
241444
|
-
const prev = YAMLMap.findPair(this.items,
|
241444
|
+
const prev = YAMLMap.findPair(this.items, key3);
|
241445
241445
|
if (prev && !value5) {
|
241446
241446
|
this.items.splice(this.items.indexOf(prev), 1);
|
241447
241447
|
} else if (!prev && value5) {
|
241448
|
-
this.items.push(new Pair.Pair(
|
241448
|
+
this.items.push(new Pair.Pair(key3));
|
241449
241449
|
}
|
241450
241450
|
}
|
241451
241451
|
toJSON(_6, ctx) {
|
@@ -241680,7 +241680,7 @@ var require_tags = __commonJS((exports) => {
|
|
241680
241680
|
if (Array.isArray(customTags))
|
241681
241681
|
tags = [];
|
241682
241682
|
else {
|
241683
|
-
const keys = Array.from(schemas3.keys()).filter((
|
241683
|
+
const keys = Array.from(schemas3.keys()).filter((key3) => key3 !== "yaml11").map((key3) => JSON.stringify(key3)).join(", ");
|
241684
241684
|
throw new Error(`Unknown schema "${schemaName}"; use one of ${keys} or define customTags array`);
|
241685
241685
|
}
|
241686
241686
|
}
|
@@ -241696,7 +241696,7 @@ var require_tags = __commonJS((exports) => {
|
|
241696
241696
|
const tagObj = typeof tag === "string" ? tagsByName[tag] : tag;
|
241697
241697
|
if (!tagObj) {
|
241698
241698
|
const tagName = JSON.stringify(tag);
|
241699
|
-
const keys = Object.keys(tagsByName).map((
|
241699
|
+
const keys = Object.keys(tagsByName).map((key3) => JSON.stringify(key3)).join(", ");
|
241700
241700
|
throw new Error(`Unknown custom tag ${tagName}; use one of ${keys}`);
|
241701
241701
|
}
|
241702
241702
|
if (!tags2.includes(tagObj))
|
@@ -241931,13 +241931,13 @@ var require_Document = __commonJS((exports) => {
|
|
241931
241931
|
setAnchors();
|
241932
241932
|
return node;
|
241933
241933
|
}
|
241934
|
-
createPair(
|
241935
|
-
const k6 = this.createNode(
|
241934
|
+
createPair(key3, value5, options = {}) {
|
241935
|
+
const k6 = this.createNode(key3, null, options);
|
241936
241936
|
const v7 = this.createNode(value5, null, options);
|
241937
241937
|
return new Pair.Pair(k6, v7);
|
241938
241938
|
}
|
241939
|
-
delete(
|
241940
|
-
return assertCollection(this.contents) ? this.contents.delete(
|
241939
|
+
delete(key3) {
|
241940
|
+
return assertCollection(this.contents) ? this.contents.delete(key3) : false;
|
241941
241941
|
}
|
241942
241942
|
deleteIn(path5) {
|
241943
241943
|
if (Collection.isEmptyPath(path5)) {
|
@@ -241948,27 +241948,27 @@ var require_Document = __commonJS((exports) => {
|
|
241948
241948
|
}
|
241949
241949
|
return assertCollection(this.contents) ? this.contents.deleteIn(path5) : false;
|
241950
241950
|
}
|
241951
|
-
get(
|
241952
|
-
return identity2.isCollection(this.contents) ? this.contents.get(
|
241951
|
+
get(key3, keepScalar) {
|
241952
|
+
return identity2.isCollection(this.contents) ? this.contents.get(key3, keepScalar) : undefined;
|
241953
241953
|
}
|
241954
241954
|
getIn(path5, keepScalar) {
|
241955
241955
|
if (Collection.isEmptyPath(path5))
|
241956
241956
|
return !keepScalar && identity2.isScalar(this.contents) ? this.contents.value : this.contents;
|
241957
241957
|
return identity2.isCollection(this.contents) ? this.contents.getIn(path5, keepScalar) : undefined;
|
241958
241958
|
}
|
241959
|
-
has(
|
241960
|
-
return identity2.isCollection(this.contents) ? this.contents.has(
|
241959
|
+
has(key3) {
|
241960
|
+
return identity2.isCollection(this.contents) ? this.contents.has(key3) : false;
|
241961
241961
|
}
|
241962
241962
|
hasIn(path5) {
|
241963
241963
|
if (Collection.isEmptyPath(path5))
|
241964
241964
|
return this.contents !== undefined;
|
241965
241965
|
return identity2.isCollection(this.contents) ? this.contents.hasIn(path5) : false;
|
241966
241966
|
}
|
241967
|
-
set(
|
241967
|
+
set(key3, value5) {
|
241968
241968
|
if (this.contents == null) {
|
241969
|
-
this.contents = Collection.collectionFromPath(this.schema, [
|
241969
|
+
this.contents = Collection.collectionFromPath(this.schema, [key3], value5);
|
241970
241970
|
} else if (assertCollection(this.contents)) {
|
241971
|
-
this.contents.set(
|
241971
|
+
this.contents.set(key3, value5);
|
241972
241972
|
}
|
241973
241973
|
}
|
241974
241974
|
setIn(path5, value5) {
|
@@ -242250,25 +242250,25 @@ var require_resolve_props = __commonJS((exports) => {
|
|
242250
242250
|
|
242251
242251
|
// ../../node_modules/.bun/yaml@2.8.1/node_modules/yaml/dist/compose/util-contains-newline.js
|
242252
242252
|
var require_util_contains_newline = __commonJS((exports) => {
|
242253
|
-
function containsNewline(
|
242254
|
-
if (!
|
242253
|
+
function containsNewline(key3) {
|
242254
|
+
if (!key3)
|
242255
242255
|
return null;
|
242256
|
-
switch (
|
242256
|
+
switch (key3.type) {
|
242257
242257
|
case "alias":
|
242258
242258
|
case "scalar":
|
242259
242259
|
case "double-quoted-scalar":
|
242260
242260
|
case "single-quoted-scalar":
|
242261
|
-
if (
|
242261
|
+
if (key3.source.includes(`
|
242262
242262
|
`))
|
242263
242263
|
return true;
|
242264
|
-
if (
|
242265
|
-
for (const st2 of
|
242264
|
+
if (key3.end) {
|
242265
|
+
for (const st2 of key3.end)
|
242266
242266
|
if (st2.type === "newline")
|
242267
242267
|
return true;
|
242268
242268
|
}
|
242269
242269
|
return false;
|
242270
242270
|
case "flow-collection":
|
242271
|
-
for (const it2 of
|
242271
|
+
for (const it2 of key3.items) {
|
242272
242272
|
for (const st2 of it2.start)
|
242273
242273
|
if (st2.type === "newline")
|
242274
242274
|
return true;
|
@@ -242333,10 +242333,10 @@ var require_resolve_block_map = __commonJS((exports) => {
|
|
242333
242333
|
let offset = bm.offset;
|
242334
242334
|
let commentEnd = null;
|
242335
242335
|
for (const collItem of bm.items) {
|
242336
|
-
const { start: start3, key:
|
242336
|
+
const { start: start3, key: key3, sep: sep4, value: value5 } = collItem;
|
242337
242337
|
const keyProps = resolveProps.resolveProps(start3, {
|
242338
242338
|
indicator: "explicit-key-ind",
|
242339
|
-
next:
|
242339
|
+
next: key3 ?? sep4?.[0],
|
242340
242340
|
offset,
|
242341
242341
|
onError,
|
242342
242342
|
parentIndent: bm.indent,
|
@@ -242344,10 +242344,10 @@ var require_resolve_block_map = __commonJS((exports) => {
|
|
242344
242344
|
});
|
242345
242345
|
const implicitKey = !keyProps.found;
|
242346
242346
|
if (implicitKey) {
|
242347
|
-
if (
|
242348
|
-
if (
|
242347
|
+
if (key3) {
|
242348
|
+
if (key3.type === "block-seq")
|
242349
242349
|
onError(offset, "BLOCK_AS_IMPLICIT_KEY", "A block sequence may not be used as an implicit map key");
|
242350
|
-
else if ("indent" in
|
242350
|
+
else if ("indent" in key3 && key3.indent !== bm.indent)
|
242351
242351
|
onError(offset, "BAD_INDENT", startColMsg);
|
242352
242352
|
}
|
242353
242353
|
if (!keyProps.anchor && !keyProps.tag && !sep4) {
|
@@ -242361,17 +242361,17 @@ var require_resolve_block_map = __commonJS((exports) => {
|
|
242361
242361
|
}
|
242362
242362
|
continue;
|
242363
242363
|
}
|
242364
|
-
if (keyProps.newlineAfterProp || utilContainsNewline.containsNewline(
|
242365
|
-
onError(
|
242364
|
+
if (keyProps.newlineAfterProp || utilContainsNewline.containsNewline(key3)) {
|
242365
|
+
onError(key3 ?? start3[start3.length - 1], "MULTILINE_IMPLICIT_KEY", "Implicit keys need to be on a single line");
|
242366
242366
|
}
|
242367
242367
|
} else if (keyProps.found?.indent !== bm.indent) {
|
242368
242368
|
onError(offset, "BAD_INDENT", startColMsg);
|
242369
242369
|
}
|
242370
242370
|
ctx.atKey = true;
|
242371
242371
|
const keyStart = keyProps.end;
|
242372
|
-
const keyNode =
|
242372
|
+
const keyNode = key3 ? composeNode(ctx, key3, keyProps, onError) : composeEmptyNode(ctx, keyStart, start3, null, keyProps, onError);
|
242373
242373
|
if (ctx.schema.compat)
|
242374
|
-
utilFlowIndentCheck.flowIndentCheck(bm.indent,
|
242374
|
+
utilFlowIndentCheck.flowIndentCheck(bm.indent, key3, onError);
|
242375
242375
|
ctx.atKey = false;
|
242376
242376
|
if (utilMapIncludes.mapIncludes(ctx, map4.items, keyNode))
|
242377
242377
|
onError(keyStart, "DUPLICATE_KEY", "Map keys must be unique");
|
@@ -242381,7 +242381,7 @@ var require_resolve_block_map = __commonJS((exports) => {
|
|
242381
242381
|
offset: keyNode.range[2],
|
242382
242382
|
onError,
|
242383
242383
|
parentIndent: bm.indent,
|
242384
|
-
startOnNewline: !
|
242384
|
+
startOnNewline: !key3 || key3.type === "block-scalar"
|
242385
242385
|
});
|
242386
242386
|
offset = valueProps.end;
|
242387
242387
|
if (valueProps.found) {
|
@@ -242537,11 +242537,11 @@ var require_resolve_flow_collection = __commonJS((exports) => {
|
|
242537
242537
|
let offset = fc.offset + fc.start.source.length;
|
242538
242538
|
for (let i8 = 0;i8 < fc.items.length; ++i8) {
|
242539
242539
|
const collItem = fc.items[i8];
|
242540
|
-
const { start: start3, key:
|
242540
|
+
const { start: start3, key: key3, sep: sep4, value: value5 } = collItem;
|
242541
242541
|
const props = resolveProps.resolveProps(start3, {
|
242542
242542
|
flow: fcName,
|
242543
242543
|
indicator: "explicit-key-ind",
|
242544
|
-
next:
|
242544
|
+
next: key3 ?? sep4?.[0],
|
242545
242545
|
offset,
|
242546
242546
|
onError,
|
242547
242547
|
parentIndent: fc.indent,
|
@@ -242563,8 +242563,8 @@ var require_resolve_flow_collection = __commonJS((exports) => {
|
|
242563
242563
|
offset = props.end;
|
242564
242564
|
continue;
|
242565
242565
|
}
|
242566
|
-
if (!isMap && ctx.options.strict && utilContainsNewline.containsNewline(
|
242567
|
-
onError(
|
242566
|
+
if (!isMap && ctx.options.strict && utilContainsNewline.containsNewline(key3))
|
242567
|
+
onError(key3, "MULTILINE_IMPLICIT_KEY", "Implicit keys of flow sequence pairs need to be on a single line");
|
242568
242568
|
}
|
242569
242569
|
if (i8 === 0) {
|
242570
242570
|
if (props.comma)
|
@@ -242609,8 +242609,8 @@ var require_resolve_flow_collection = __commonJS((exports) => {
|
|
242609
242609
|
} else {
|
242610
242610
|
ctx.atKey = true;
|
242611
242611
|
const keyStart = props.end;
|
242612
|
-
const keyNode =
|
242613
|
-
if (isBlock(
|
242612
|
+
const keyNode = key3 ? composeNode(ctx, key3, props, onError) : composeEmptyNode(ctx, keyStart, start3, null, props, onError);
|
242613
|
+
if (isBlock(key3))
|
242614
242614
|
onError(keyNode.range, "BLOCK_IN_FLOW", blockMsg);
|
242615
242615
|
ctx.atKey = false;
|
242616
242616
|
const valueProps = resolveProps.resolveProps(sep4 ?? [], {
|
@@ -243421,7 +243421,7 @@ var require_composer = __commonJS((exports) => {
|
|
243421
243421
|
var node_process = __require("process");
|
243422
243422
|
var directives5 = require_directives2();
|
243423
243423
|
var Document = require_Document();
|
243424
|
-
var
|
243424
|
+
var errors5 = require_errors3();
|
243425
243425
|
var identity2 = require_identity();
|
243426
243426
|
var composeDoc = require_compose_doc();
|
243427
243427
|
var resolveEnd = require_resolve_end();
|
@@ -243472,9 +243472,9 @@ var require_composer = __commonJS((exports) => {
|
|
243472
243472
|
this.onError = (source, code2, message, warning) => {
|
243473
243473
|
const pos = getErrorPos(source);
|
243474
243474
|
if (warning)
|
243475
|
-
this.warnings.push(new
|
243475
|
+
this.warnings.push(new errors5.YAMLWarning(pos, code2, message));
|
243476
243476
|
else
|
243477
|
-
this.errors.push(new
|
243477
|
+
this.errors.push(new errors5.YAMLParseError(pos, code2, message));
|
243478
243478
|
};
|
243479
243479
|
this.directives = new directives5.Directives({ version: options.version || "1.2" });
|
243480
243480
|
this.options = options;
|
@@ -243558,7 +243558,7 @@ ${cb}` : comment;
|
|
243558
243558
|
break;
|
243559
243559
|
case "error": {
|
243560
243560
|
const msg = token.source ? `${token.message}: ${JSON.stringify(token.source)}` : token.message;
|
243561
|
-
const error48 = new
|
243561
|
+
const error48 = new errors5.YAMLParseError(getErrorPos(token), "UNEXPECTED_TOKEN", msg);
|
243562
243562
|
if (this.atDirectives || !this.doc)
|
243563
243563
|
this.errors.push(error48);
|
243564
243564
|
else
|
@@ -243568,7 +243568,7 @@ ${cb}` : comment;
|
|
243568
243568
|
case "doc-end": {
|
243569
243569
|
if (!this.doc) {
|
243570
243570
|
const msg = "Unexpected doc-end without preceding document";
|
243571
|
-
this.errors.push(new
|
243571
|
+
this.errors.push(new errors5.YAMLParseError(getErrorPos(token), "UNEXPECTED_TOKEN", msg));
|
243572
243572
|
break;
|
243573
243573
|
}
|
243574
243574
|
this.doc.directives.docEnd = true;
|
@@ -243583,7 +243583,7 @@ ${end.comment}` : end.comment;
|
|
243583
243583
|
break;
|
243584
243584
|
}
|
243585
243585
|
default:
|
243586
|
-
this.errors.push(new
|
243586
|
+
this.errors.push(new errors5.YAMLParseError(getErrorPos(token), "UNEXPECTED_TOKEN", `Unsupported token ${token.type}`));
|
243587
243587
|
}
|
243588
243588
|
}
|
243589
243589
|
*end(forceDoc = false, endOffset = -1) {
|
@@ -243609,7 +243609,7 @@ ${end.comment}` : end.comment;
|
|
243609
243609
|
var require_cst_scalar = __commonJS((exports) => {
|
243610
243610
|
var resolveBlockScalar = require_resolve_block_scalar();
|
243611
243611
|
var resolveFlowScalar = require_resolve_flow_scalar();
|
243612
|
-
var
|
243612
|
+
var errors5 = require_errors3();
|
243613
243613
|
var stringifyString = require_stringifyString();
|
243614
243614
|
function resolveAsScalar(token, strict = true, onError) {
|
243615
243615
|
if (token) {
|
@@ -243618,7 +243618,7 @@ var require_cst_scalar = __commonJS((exports) => {
|
|
243618
243618
|
if (onError)
|
243619
243619
|
onError(offset, code2, message);
|
243620
243620
|
else
|
243621
|
-
throw new
|
243621
|
+
throw new errors5.YAMLParseError([offset, offset + 1], code2, message);
|
243622
243622
|
};
|
243623
243623
|
switch (token.type) {
|
243624
243624
|
case "scalar":
|
@@ -243732,9 +243732,9 @@ var require_cst_scalar = __commonJS((exports) => {
|
|
243732
243732
|
if (!addEndtoBlockProps(props, "end" in token ? token.end : undefined))
|
243733
243733
|
props.push({ type: "newline", offset: -1, indent: indent2, source: `
|
243734
243734
|
` });
|
243735
|
-
for (const
|
243736
|
-
if (
|
243737
|
-
delete token[
|
243735
|
+
for (const key3 of Object.keys(token))
|
243736
|
+
if (key3 !== "type" && key3 !== "offset")
|
243737
|
+
delete token[key3];
|
243738
243738
|
Object.assign(token, { type: "block-scalar", indent: indent2, props, source: body });
|
243739
243739
|
}
|
243740
243740
|
}
|
@@ -243783,9 +243783,9 @@ var require_cst_scalar = __commonJS((exports) => {
|
|
243783
243783
|
default: {
|
243784
243784
|
const indent2 = "indent" in token ? token.indent : -1;
|
243785
243785
|
const end = "end" in token && Array.isArray(token.end) ? token.end.filter((st2) => st2.type === "space" || st2.type === "comment" || st2.type === "newline") : [];
|
243786
|
-
for (const
|
243787
|
-
if (
|
243788
|
-
delete token[
|
243786
|
+
for (const key3 of Object.keys(token))
|
243787
|
+
if (key3 !== "type" && key3 !== "offset")
|
243788
|
+
delete token[key3];
|
243789
243789
|
Object.assign(token, { type: type5, indent: indent2, source, end });
|
243790
243790
|
}
|
243791
243791
|
}
|
@@ -243837,12 +243837,12 @@ var require_cst_stringify = __commonJS((exports) => {
|
|
243837
243837
|
}
|
243838
243838
|
}
|
243839
243839
|
}
|
243840
|
-
function stringifyItem({ start: start3, key:
|
243840
|
+
function stringifyItem({ start: start3, key: key3, sep: sep4, value: value5 }) {
|
243841
243841
|
let res = "";
|
243842
243842
|
for (const st2 of start3)
|
243843
243843
|
res += st2.source;
|
243844
|
-
if (
|
243845
|
-
res += stringifyToken(
|
243844
|
+
if (key3)
|
243845
|
+
res += stringifyToken(key3);
|
243846
243846
|
if (sep4)
|
243847
243847
|
for (const st2 of sep4)
|
243848
243848
|
res += st2.source;
|
@@ -245138,7 +245138,7 @@ var require_parser2 = __commonJS((exports) => {
|
|
245138
245138
|
});
|
245139
245139
|
} else if (isFlowToken(it2.key) && !includesToken(it2.sep, "newline")) {
|
245140
245140
|
const start4 = getFirstKeyStartProps(it2.start);
|
245141
|
-
const
|
245141
|
+
const key3 = it2.key;
|
245142
245142
|
const sep4 = it2.sep;
|
245143
245143
|
sep4.push(this.sourceToken);
|
245144
245144
|
delete it2.key;
|
@@ -245147,7 +245147,7 @@ var require_parser2 = __commonJS((exports) => {
|
|
245147
245147
|
type: "block-map",
|
245148
245148
|
offset: this.offset,
|
245149
245149
|
indent: this.indent,
|
245150
|
-
items: [{ start: start4, key:
|
245150
|
+
items: [{ start: start4, key: key3, sep: sep4 }]
|
245151
245151
|
});
|
245152
245152
|
} else if (start3.length > 0) {
|
245153
245153
|
it2.sep = it2.sep.concat(start3, this.sourceToken);
|
@@ -245480,7 +245480,7 @@ var require_parser2 = __commonJS((exports) => {
|
|
245480
245480
|
var require_public_api = __commonJS((exports) => {
|
245481
245481
|
var composer = require_composer();
|
245482
245482
|
var Document = require_Document();
|
245483
|
-
var
|
245483
|
+
var errors5 = require_errors3();
|
245484
245484
|
var log = require_log();
|
245485
245485
|
var identity2 = require_identity();
|
245486
245486
|
var lineCounter = require_line_counter();
|
@@ -245497,8 +245497,8 @@ var require_public_api = __commonJS((exports) => {
|
|
245497
245497
|
const docs = Array.from(composer$1.compose(parser$1.parse(source)));
|
245498
245498
|
if (prettyErrors && lineCounter2)
|
245499
245499
|
for (const doc2 of docs) {
|
245500
|
-
doc2.errors.forEach(
|
245501
|
-
doc2.warnings.forEach(
|
245500
|
+
doc2.errors.forEach(errors5.prettifyError(source, lineCounter2));
|
245501
|
+
doc2.warnings.forEach(errors5.prettifyError(source, lineCounter2));
|
245502
245502
|
}
|
245503
245503
|
if (docs.length > 0)
|
245504
245504
|
return docs;
|
@@ -245513,13 +245513,13 @@ var require_public_api = __commonJS((exports) => {
|
|
245513
245513
|
if (!doc2)
|
245514
245514
|
doc2 = _doc;
|
245515
245515
|
else if (doc2.options.logLevel !== "silent") {
|
245516
|
-
doc2.errors.push(new
|
245516
|
+
doc2.errors.push(new errors5.YAMLParseError(_doc.range.slice(0, 2), "MULTIPLE_DOCS", "Source contains multiple documents; please use YAML.parseAllDocuments()"));
|
245517
245517
|
break;
|
245518
245518
|
}
|
245519
245519
|
}
|
245520
245520
|
if (prettyErrors && lineCounter2) {
|
245521
|
-
doc2.errors.forEach(
|
245522
|
-
doc2.warnings.forEach(
|
245521
|
+
doc2.errors.forEach(errors5.prettifyError(source, lineCounter2));
|
245522
|
+
doc2.warnings.forEach(errors5.prettifyError(source, lineCounter2));
|
245523
245523
|
}
|
245524
245524
|
return doc2;
|
245525
245525
|
}
|
@@ -245587,10 +245587,7 @@ var {
|
|
245587
245587
|
} = import__.default;
|
245588
245588
|
|
245589
245589
|
// ../../node_modules/.bun/@inquirer+core@10.1.15+be14e1ce904ed1ef/node_modules/@inquirer/core/dist/esm/lib/key.js
|
245590
|
-
var isUpKey = (key) => key.name === "up" || key.name === "k" || key.ctrl && key.name === "p";
|
245591
|
-
var isDownKey = (key) => key.name === "down" || key.name === "j" || key.ctrl && key.name === "n";
|
245592
245590
|
var isBackspaceKey = (key) => key.name === "backspace";
|
245593
|
-
var isNumberKey = (key) => "1234567890".includes(key.name);
|
245594
245591
|
var isEnterKey = (key) => key.name === "enter" || key.name === "return";
|
245595
245592
|
// ../../node_modules/.bun/@inquirer+core@10.1.15+be14e1ce904ed1ef/node_modules/@inquirer/core/dist/esm/lib/errors.js
|
245596
245593
|
class AbortPromptError extends Error {
|
@@ -246124,22 +246121,11 @@ function usePrefix({ status = "idle", theme }) {
|
|
246124
246121
|
const iconName = status === "loading" ? "idle" : status;
|
246125
246122
|
return typeof prefix === "string" ? prefix : prefix[iconName] ?? prefix["idle"];
|
246126
246123
|
}
|
246127
|
-
// ../../node_modules/.bun/@inquirer+core@10.1.15+be14e1ce904ed1ef/node_modules/@inquirer/core/dist/esm/lib/use-memo.js
|
246128
|
-
function useMemo(fn, dependencies) {
|
246129
|
-
return withPointer((pointer) => {
|
246130
|
-
const prev = pointer.get();
|
246131
|
-
if (!prev || prev.dependencies.length !== dependencies.length || prev.dependencies.some((dep, i) => dep !== dependencies[i])) {
|
246132
|
-
const value = fn();
|
246133
|
-
pointer.set({ value, dependencies });
|
246134
|
-
return value;
|
246135
|
-
}
|
246136
|
-
return prev.value;
|
246137
|
-
});
|
246138
|
-
}
|
246139
246124
|
// ../../node_modules/.bun/@inquirer+core@10.1.15+be14e1ce904ed1ef/node_modules/@inquirer/core/dist/esm/lib/use-ref.js
|
246140
246125
|
function useRef(val) {
|
246141
246126
|
return useState({ current: val })[0];
|
246142
246127
|
}
|
246128
|
+
|
246143
246129
|
// ../../node_modules/.bun/@inquirer+core@10.1.15+be14e1ce904ed1ef/node_modules/@inquirer/core/dist/esm/lib/use-keypress.js
|
246144
246130
|
function useKeypress(userHandler) {
|
246145
246131
|
const signal = useRef(userHandler);
|
@@ -246171,72 +246157,6 @@ function readlineWidth() {
|
|
246171
246157
|
return import_cli_width.default({ defaultWidth: 80, output: readline().output });
|
246172
246158
|
}
|
246173
246159
|
|
246174
|
-
// ../../node_modules/.bun/@inquirer+core@10.1.15+be14e1ce904ed1ef/node_modules/@inquirer/core/dist/esm/lib/pagination/use-pagination.js
|
246175
|
-
function usePointerPosition({ active, renderedItems, pageSize, loop }) {
|
246176
|
-
const state = useRef({
|
246177
|
-
lastPointer: active,
|
246178
|
-
lastActive: undefined
|
246179
|
-
});
|
246180
|
-
const { lastPointer, lastActive } = state.current;
|
246181
|
-
const middle = Math.floor(pageSize / 2);
|
246182
|
-
const renderedLength = renderedItems.reduce((acc, item) => acc + item.length, 0);
|
246183
|
-
const defaultPointerPosition = renderedItems.slice(0, active).reduce((acc, item) => acc + item.length, 0);
|
246184
|
-
let pointer = defaultPointerPosition;
|
246185
|
-
if (renderedLength > pageSize) {
|
246186
|
-
if (loop) {
|
246187
|
-
pointer = lastPointer;
|
246188
|
-
if (lastActive != null && lastActive < active && active - lastActive < pageSize) {
|
246189
|
-
pointer = Math.min(middle, Math.abs(active - lastActive) === 1 ? Math.min(lastPointer + (renderedItems[lastActive]?.length ?? 0), Math.max(defaultPointerPosition, lastPointer)) : lastPointer + active - lastActive);
|
246190
|
-
}
|
246191
|
-
} else {
|
246192
|
-
const spaceUnderActive = renderedItems.slice(active).reduce((acc, item) => acc + item.length, 0);
|
246193
|
-
pointer = spaceUnderActive < pageSize - middle ? pageSize - spaceUnderActive : Math.min(defaultPointerPosition, middle);
|
246194
|
-
}
|
246195
|
-
}
|
246196
|
-
state.current.lastPointer = pointer;
|
246197
|
-
state.current.lastActive = active;
|
246198
|
-
return pointer;
|
246199
|
-
}
|
246200
|
-
function usePagination({ items, active, renderItem, pageSize, loop = true }) {
|
246201
|
-
const width = readlineWidth();
|
246202
|
-
const bound = (num) => (num % items.length + items.length) % items.length;
|
246203
|
-
const renderedItems = items.map((item, index) => {
|
246204
|
-
if (item == null)
|
246205
|
-
return [];
|
246206
|
-
return breakLines(renderItem({ item, index, isActive: index === active }), width).split(`
|
246207
|
-
`);
|
246208
|
-
});
|
246209
|
-
const renderedLength = renderedItems.reduce((acc, item) => acc + item.length, 0);
|
246210
|
-
const renderItemAtIndex = (index) => renderedItems[index] ?? [];
|
246211
|
-
const pointer = usePointerPosition({ active, renderedItems, pageSize, loop });
|
246212
|
-
const activeItem = renderItemAtIndex(active).slice(0, pageSize);
|
246213
|
-
const activeItemPosition = pointer + activeItem.length <= pageSize ? pointer : pageSize - activeItem.length;
|
246214
|
-
const pageBuffer = Array.from({ length: pageSize });
|
246215
|
-
pageBuffer.splice(activeItemPosition, activeItem.length, ...activeItem);
|
246216
|
-
const itemVisited = new Set([active]);
|
246217
|
-
let bufferPointer = activeItemPosition + activeItem.length;
|
246218
|
-
let itemPointer = bound(active + 1);
|
246219
|
-
while (bufferPointer < pageSize && !itemVisited.has(itemPointer) && (loop && renderedLength > pageSize ? itemPointer !== active : itemPointer > active)) {
|
246220
|
-
const lines = renderItemAtIndex(itemPointer);
|
246221
|
-
const linesToAdd = lines.slice(0, pageSize - bufferPointer);
|
246222
|
-
pageBuffer.splice(bufferPointer, linesToAdd.length, ...linesToAdd);
|
246223
|
-
itemVisited.add(itemPointer);
|
246224
|
-
bufferPointer += linesToAdd.length;
|
246225
|
-
itemPointer = bound(itemPointer + 1);
|
246226
|
-
}
|
246227
|
-
bufferPointer = activeItemPosition - 1;
|
246228
|
-
itemPointer = bound(active - 1);
|
246229
|
-
while (bufferPointer >= 0 && !itemVisited.has(itemPointer) && (loop && renderedLength > pageSize ? itemPointer !== active : itemPointer < active)) {
|
246230
|
-
const lines = renderItemAtIndex(itemPointer);
|
246231
|
-
const linesToAdd = lines.slice(Math.max(0, lines.length - bufferPointer - 1));
|
246232
|
-
pageBuffer.splice(bufferPointer - linesToAdd.length + 1, linesToAdd.length, ...linesToAdd);
|
246233
|
-
itemVisited.add(itemPointer);
|
246234
|
-
bufferPointer -= linesToAdd.length;
|
246235
|
-
itemPointer = bound(itemPointer - 1);
|
246236
|
-
}
|
246237
|
-
return pageBuffer.filter((line) => typeof line === "string").join(`
|
246238
|
-
`);
|
246239
|
-
}
|
246240
246160
|
// ../../node_modules/.bun/@inquirer+core@10.1.15+be14e1ce904ed1ef/node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
|
246241
246161
|
var import_mute_stream = __toESM(require_lib(), 1);
|
246242
246162
|
import * as readline2 from "node:readline";
|
@@ -246619,20 +246539,6 @@ function createPrompt(view) {
|
|
246619
246539
|
};
|
246620
246540
|
return prompt;
|
246621
246541
|
}
|
246622
|
-
// ../../node_modules/.bun/@inquirer+core@10.1.15+be14e1ce904ed1ef/node_modules/@inquirer/core/dist/esm/lib/Separator.js
|
246623
|
-
var import_yoctocolors_cjs2 = __toESM(require_yoctocolors_cjs(), 1);
|
246624
|
-
class Separator {
|
246625
|
-
separator = import_yoctocolors_cjs2.default.dim(Array.from({ length: 15 }).join(esm_default.line));
|
246626
|
-
type = "separator";
|
246627
|
-
constructor(separator) {
|
246628
|
-
if (separator) {
|
246629
|
-
this.separator = separator;
|
246630
|
-
}
|
246631
|
-
}
|
246632
|
-
static isSeparator(choice) {
|
246633
|
-
return Boolean(choice && typeof choice === "object" && "type" in choice && choice.type === "separator");
|
246634
|
-
}
|
246635
|
-
}
|
246636
246542
|
// ../../node_modules/.bun/yoctocolors@2.1.2/node_modules/yoctocolors/base.js
|
246637
246543
|
import tty from "node:tty";
|
246638
246544
|
var hasColors = tty?.WriteStream?.prototype?.hasColors?.() ?? false;
|
@@ -264945,7 +264851,7 @@ function pruneCurrentEnv(currentEnv, env2) {
|
|
264945
264851
|
var package_default = {
|
264946
264852
|
name: "@settlemint/sdk-cli",
|
264947
264853
|
description: "Command-line interface for SettleMint SDK, providing development tools and project management capabilities",
|
264948
|
-
version: "2.6.0-
|
264854
|
+
version: "2.6.0-pre8a95765",
|
264949
264855
|
type: "module",
|
264950
264856
|
private: false,
|
264951
264857
|
license: "FSL-1.1-MIT",
|
@@ -264998,11 +264904,11 @@ var package_default = {
|
|
264998
264904
|
"@inquirer/confirm": "5.1.15",
|
264999
264905
|
"@inquirer/input": "4.2.1",
|
265000
264906
|
"@inquirer/password": "4.0.17",
|
265001
|
-
"@inquirer/select": "4.3.
|
265002
|
-
"@settlemint/sdk-hasura": "2.6.0-
|
265003
|
-
"@settlemint/sdk-js": "2.6.0-
|
265004
|
-
"@settlemint/sdk-utils": "2.6.0-
|
265005
|
-
"@settlemint/sdk-viem": "2.6.0-
|
264907
|
+
"@inquirer/select": "4.3.2",
|
264908
|
+
"@settlemint/sdk-hasura": "2.6.0-pre8a95765",
|
264909
|
+
"@settlemint/sdk-js": "2.6.0-pre8a95765",
|
264910
|
+
"@settlemint/sdk-utils": "2.6.0-pre8a95765",
|
264911
|
+
"@settlemint/sdk-viem": "2.6.0-pre8a95765",
|
265006
264912
|
"@types/node": "24.3.0",
|
265007
264913
|
"@types/semver": "7.7.0",
|
265008
264914
|
"@types/which": "3.0.4",
|
@@ -265019,7 +264925,7 @@ var package_default = {
|
|
265019
264925
|
},
|
265020
264926
|
peerDependencies: {
|
265021
264927
|
hardhat: "<= 4",
|
265022
|
-
"@settlemint/sdk-js": "2.6.0-
|
264928
|
+
"@settlemint/sdk-js": "2.6.0-pre8a95765"
|
265023
264929
|
},
|
265024
264930
|
peerDependenciesMeta: {
|
265025
264931
|
hardhat: {
|
@@ -270979,14 +270885,565 @@ async function subgraphNamePrompt({
|
|
270979
270885
|
return sanitizeName(subgraphName);
|
270980
270886
|
}
|
270981
270887
|
|
270982
|
-
// ../../node_modules/.bun/@inquirer+
|
270983
|
-
var
|
270888
|
+
// ../../node_modules/.bun/@inquirer+core@10.2.0+be14e1ce904ed1ef/node_modules/@inquirer/core/dist/esm/lib/key.js
|
270889
|
+
var isUpKey = (key2) => key2.name === "up";
|
270890
|
+
var isDownKey = (key2) => key2.name === "down";
|
270891
|
+
var isBackspaceKey2 = (key2) => key2.name === "backspace";
|
270892
|
+
var isNumberKey = (key2) => "1234567890".includes(key2.name);
|
270893
|
+
var isEnterKey2 = (key2) => key2.name === "enter" || key2.name === "return";
|
270894
|
+
// ../../node_modules/.bun/@inquirer+core@10.2.0+be14e1ce904ed1ef/node_modules/@inquirer/core/dist/esm/lib/errors.js
|
270895
|
+
class AbortPromptError2 extends Error {
|
270896
|
+
name = "AbortPromptError";
|
270897
|
+
message = "Prompt was aborted";
|
270898
|
+
constructor(options) {
|
270899
|
+
super();
|
270900
|
+
this.cause = options?.cause;
|
270901
|
+
}
|
270902
|
+
}
|
270903
|
+
|
270904
|
+
class CancelPromptError2 extends Error {
|
270905
|
+
name = "CancelPromptError";
|
270906
|
+
message = "Prompt was canceled";
|
270907
|
+
}
|
270908
|
+
|
270909
|
+
class ExitPromptError2 extends Error {
|
270910
|
+
name = "ExitPromptError";
|
270911
|
+
}
|
270912
|
+
|
270913
|
+
class HookError2 extends Error {
|
270914
|
+
name = "HookError";
|
270915
|
+
}
|
270916
|
+
|
270917
|
+
class ValidationError2 extends Error {
|
270918
|
+
name = "ValidationError";
|
270919
|
+
}
|
270920
|
+
// ../../node_modules/.bun/@inquirer+core@10.2.0+be14e1ce904ed1ef/node_modules/@inquirer/core/dist/esm/lib/use-state.js
|
270921
|
+
import { AsyncResource as AsyncResource5 } from "node:async_hooks";
|
270922
|
+
|
270923
|
+
// ../../node_modules/.bun/@inquirer+core@10.2.0+be14e1ce904ed1ef/node_modules/@inquirer/core/dist/esm/lib/hook-engine.js
|
270924
|
+
import { AsyncLocalStorage as AsyncLocalStorage2, AsyncResource as AsyncResource4 } from "node:async_hooks";
|
270925
|
+
var hookStorage2 = new AsyncLocalStorage2;
|
270926
|
+
function createStore2(rl) {
|
270927
|
+
const store = {
|
270928
|
+
rl,
|
270929
|
+
hooks: [],
|
270930
|
+
hooksCleanup: [],
|
270931
|
+
hooksEffect: [],
|
270932
|
+
index: 0,
|
270933
|
+
handleChange() {}
|
270934
|
+
};
|
270935
|
+
return store;
|
270936
|
+
}
|
270937
|
+
function withHooks2(rl, cb) {
|
270938
|
+
const store = createStore2(rl);
|
270939
|
+
return hookStorage2.run(store, () => {
|
270940
|
+
function cycle(render) {
|
270941
|
+
store.handleChange = () => {
|
270942
|
+
store.index = 0;
|
270943
|
+
render();
|
270944
|
+
};
|
270945
|
+
store.handleChange();
|
270946
|
+
}
|
270947
|
+
return cb(cycle);
|
270948
|
+
});
|
270949
|
+
}
|
270950
|
+
function getStore2() {
|
270951
|
+
const store = hookStorage2.getStore();
|
270952
|
+
if (!store) {
|
270953
|
+
throw new HookError2("[Inquirer] Hook functions can only be called from within a prompt");
|
270954
|
+
}
|
270955
|
+
return store;
|
270956
|
+
}
|
270957
|
+
function readline3() {
|
270958
|
+
return getStore2().rl;
|
270959
|
+
}
|
270960
|
+
function withUpdates2(fn) {
|
270961
|
+
const wrapped = (...args) => {
|
270962
|
+
const store = getStore2();
|
270963
|
+
let shouldUpdate = false;
|
270964
|
+
const oldHandleChange = store.handleChange;
|
270965
|
+
store.handleChange = () => {
|
270966
|
+
shouldUpdate = true;
|
270967
|
+
};
|
270968
|
+
const returnValue = fn(...args);
|
270969
|
+
if (shouldUpdate) {
|
270970
|
+
oldHandleChange();
|
270971
|
+
}
|
270972
|
+
store.handleChange = oldHandleChange;
|
270973
|
+
return returnValue;
|
270974
|
+
};
|
270975
|
+
return AsyncResource4.bind(wrapped);
|
270976
|
+
}
|
270977
|
+
function withPointer2(cb) {
|
270978
|
+
const store = getStore2();
|
270979
|
+
const { index } = store;
|
270980
|
+
const pointer = {
|
270981
|
+
get() {
|
270982
|
+
return store.hooks[index];
|
270983
|
+
},
|
270984
|
+
set(value5) {
|
270985
|
+
store.hooks[index] = value5;
|
270986
|
+
},
|
270987
|
+
initialized: index in store.hooks
|
270988
|
+
};
|
270989
|
+
const returnValue = cb(pointer);
|
270990
|
+
store.index++;
|
270991
|
+
return returnValue;
|
270992
|
+
}
|
270993
|
+
function handleChange2() {
|
270994
|
+
getStore2().handleChange();
|
270995
|
+
}
|
270996
|
+
var effectScheduler2 = {
|
270997
|
+
queue(cb) {
|
270998
|
+
const store = getStore2();
|
270999
|
+
const { index } = store;
|
271000
|
+
store.hooksEffect.push(() => {
|
271001
|
+
store.hooksCleanup[index]?.();
|
271002
|
+
const cleanFn = cb(readline3());
|
271003
|
+
if (cleanFn != null && typeof cleanFn !== "function") {
|
271004
|
+
throw new ValidationError2("useEffect return value must be a cleanup function or nothing.");
|
271005
|
+
}
|
271006
|
+
store.hooksCleanup[index] = cleanFn;
|
271007
|
+
});
|
271008
|
+
},
|
271009
|
+
run() {
|
271010
|
+
const store = getStore2();
|
271011
|
+
withUpdates2(() => {
|
271012
|
+
store.hooksEffect.forEach((effect) => {
|
271013
|
+
effect();
|
271014
|
+
});
|
271015
|
+
store.hooksEffect.length = 0;
|
271016
|
+
})();
|
271017
|
+
},
|
271018
|
+
clearAll() {
|
271019
|
+
const store = getStore2();
|
271020
|
+
store.hooksCleanup.forEach((cleanFn) => {
|
271021
|
+
cleanFn?.();
|
271022
|
+
});
|
271023
|
+
store.hooksEffect.length = 0;
|
271024
|
+
store.hooksCleanup.length = 0;
|
271025
|
+
}
|
271026
|
+
};
|
271027
|
+
|
271028
|
+
// ../../node_modules/.bun/@inquirer+core@10.2.0+be14e1ce904ed1ef/node_modules/@inquirer/core/dist/esm/lib/use-state.js
|
271029
|
+
function useState2(defaultValue) {
|
271030
|
+
return withPointer2((pointer) => {
|
271031
|
+
const setState = AsyncResource5.bind(function setState(newValue) {
|
271032
|
+
if (pointer.get() !== newValue) {
|
271033
|
+
pointer.set(newValue);
|
271034
|
+
handleChange2();
|
271035
|
+
}
|
271036
|
+
});
|
271037
|
+
if (pointer.initialized) {
|
271038
|
+
return [pointer.get(), setState];
|
271039
|
+
}
|
271040
|
+
const value5 = typeof defaultValue === "function" ? defaultValue() : defaultValue;
|
271041
|
+
pointer.set(value5);
|
271042
|
+
return [value5, setState];
|
271043
|
+
});
|
271044
|
+
}
|
271045
|
+
|
271046
|
+
// ../../node_modules/.bun/@inquirer+core@10.2.0+be14e1ce904ed1ef/node_modules/@inquirer/core/dist/esm/lib/use-effect.js
|
271047
|
+
function useEffect2(cb, depArray) {
|
271048
|
+
withPointer2((pointer) => {
|
271049
|
+
const oldDeps = pointer.get();
|
271050
|
+
const hasChanged = !Array.isArray(oldDeps) || depArray.some((dep, i7) => !Object.is(dep, oldDeps[i7]));
|
271051
|
+
if (hasChanged) {
|
271052
|
+
effectScheduler2.queue(cb);
|
271053
|
+
}
|
271054
|
+
pointer.set(depArray);
|
271055
|
+
});
|
271056
|
+
}
|
271057
|
+
|
271058
|
+
// ../../node_modules/.bun/@inquirer+core@10.2.0+be14e1ce904ed1ef/node_modules/@inquirer/core/dist/esm/lib/theme.js
|
271059
|
+
var import_yoctocolors_cjs2 = __toESM(require_yoctocolors_cjs(), 1);
|
271060
|
+
var defaultTheme2 = {
|
271061
|
+
prefix: {
|
271062
|
+
idle: import_yoctocolors_cjs2.default.blue("?"),
|
271063
|
+
done: import_yoctocolors_cjs2.default.green(esm_default.tick)
|
271064
|
+
},
|
271065
|
+
spinner: {
|
271066
|
+
interval: 80,
|
271067
|
+
frames: ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"].map((frame) => import_yoctocolors_cjs2.default.yellow(frame))
|
271068
|
+
},
|
271069
|
+
style: {
|
271070
|
+
answer: import_yoctocolors_cjs2.default.cyan,
|
271071
|
+
message: import_yoctocolors_cjs2.default.bold,
|
271072
|
+
error: (text2) => import_yoctocolors_cjs2.default.red(`> ${text2}`),
|
271073
|
+
defaultAnswer: (text2) => import_yoctocolors_cjs2.default.dim(`(${text2})`),
|
271074
|
+
help: import_yoctocolors_cjs2.default.dim,
|
271075
|
+
highlight: import_yoctocolors_cjs2.default.cyan,
|
271076
|
+
key: (text2) => import_yoctocolors_cjs2.default.cyan(import_yoctocolors_cjs2.default.bold(`<${text2}>`))
|
271077
|
+
}
|
271078
|
+
};
|
271079
|
+
|
271080
|
+
// ../../node_modules/.bun/@inquirer+core@10.2.0+be14e1ce904ed1ef/node_modules/@inquirer/core/dist/esm/lib/make-theme.js
|
271081
|
+
function isPlainObject4(value5) {
|
271082
|
+
if (typeof value5 !== "object" || value5 === null)
|
271083
|
+
return false;
|
271084
|
+
let proto = value5;
|
271085
|
+
while (Object.getPrototypeOf(proto) !== null) {
|
271086
|
+
proto = Object.getPrototypeOf(proto);
|
271087
|
+
}
|
271088
|
+
return Object.getPrototypeOf(value5) === proto;
|
271089
|
+
}
|
271090
|
+
function deepMerge3(...objects) {
|
271091
|
+
const output = {};
|
271092
|
+
for (const obj of objects) {
|
271093
|
+
for (const [key2, value5] of Object.entries(obj)) {
|
271094
|
+
const prevValue = output[key2];
|
271095
|
+
output[key2] = isPlainObject4(prevValue) && isPlainObject4(value5) ? deepMerge3(prevValue, value5) : value5;
|
271096
|
+
}
|
271097
|
+
}
|
271098
|
+
return output;
|
271099
|
+
}
|
271100
|
+
function makeTheme2(...themes) {
|
271101
|
+
const themesToMerge = [
|
271102
|
+
defaultTheme2,
|
271103
|
+
...themes.filter((theme) => theme != null)
|
271104
|
+
];
|
271105
|
+
return deepMerge3(...themesToMerge);
|
271106
|
+
}
|
271107
|
+
|
271108
|
+
// ../../node_modules/.bun/@inquirer+core@10.2.0+be14e1ce904ed1ef/node_modules/@inquirer/core/dist/esm/lib/use-prefix.js
|
271109
|
+
function usePrefix2({ status = "idle", theme }) {
|
271110
|
+
const [showLoader, setShowLoader] = useState2(false);
|
271111
|
+
const [tick, setTick] = useState2(0);
|
271112
|
+
const { prefix, spinner: spinner2 } = makeTheme2(theme);
|
271113
|
+
useEffect2(() => {
|
271114
|
+
if (status === "loading") {
|
271115
|
+
let tickInterval;
|
271116
|
+
let inc = -1;
|
271117
|
+
const delayTimeout = setTimeout(() => {
|
271118
|
+
setShowLoader(true);
|
271119
|
+
tickInterval = setInterval(() => {
|
271120
|
+
inc = inc + 1;
|
271121
|
+
setTick(inc % spinner2.frames.length);
|
271122
|
+
}, spinner2.interval);
|
271123
|
+
}, 300);
|
271124
|
+
return () => {
|
271125
|
+
clearTimeout(delayTimeout);
|
271126
|
+
clearInterval(tickInterval);
|
271127
|
+
};
|
271128
|
+
} else {
|
271129
|
+
setShowLoader(false);
|
271130
|
+
}
|
271131
|
+
}, [status]);
|
271132
|
+
if (showLoader) {
|
271133
|
+
return spinner2.frames[tick];
|
271134
|
+
}
|
271135
|
+
const iconName = status === "loading" ? "idle" : status;
|
271136
|
+
return typeof prefix === "string" ? prefix : prefix[iconName] ?? prefix["idle"];
|
271137
|
+
}
|
271138
|
+
// ../../node_modules/.bun/@inquirer+core@10.2.0+be14e1ce904ed1ef/node_modules/@inquirer/core/dist/esm/lib/use-memo.js
|
271139
|
+
function useMemo(fn, dependencies) {
|
271140
|
+
return withPointer2((pointer) => {
|
271141
|
+
const prev = pointer.get();
|
271142
|
+
if (!prev || prev.dependencies.length !== dependencies.length || prev.dependencies.some((dep, i7) => dep !== dependencies[i7])) {
|
271143
|
+
const value5 = fn();
|
271144
|
+
pointer.set({ value: value5, dependencies });
|
271145
|
+
return value5;
|
271146
|
+
}
|
271147
|
+
return prev.value;
|
271148
|
+
});
|
271149
|
+
}
|
271150
|
+
// ../../node_modules/.bun/@inquirer+core@10.2.0+be14e1ce904ed1ef/node_modules/@inquirer/core/dist/esm/lib/use-ref.js
|
271151
|
+
function useRef2(val) {
|
271152
|
+
return useState2({ current: val })[0];
|
271153
|
+
}
|
271154
|
+
// ../../node_modules/.bun/@inquirer+core@10.2.0+be14e1ce904ed1ef/node_modules/@inquirer/core/dist/esm/lib/use-keypress.js
|
271155
|
+
function useKeypress2(userHandler) {
|
271156
|
+
const signal = useRef2(userHandler);
|
271157
|
+
signal.current = userHandler;
|
271158
|
+
useEffect2((rl) => {
|
271159
|
+
let ignore = false;
|
271160
|
+
const handler = withUpdates2((_input, event) => {
|
271161
|
+
if (ignore)
|
271162
|
+
return;
|
271163
|
+
signal.current(event, rl);
|
271164
|
+
});
|
271165
|
+
rl.input.on("keypress", handler);
|
271166
|
+
return () => {
|
271167
|
+
ignore = true;
|
271168
|
+
rl.input.removeListener("keypress", handler);
|
271169
|
+
};
|
271170
|
+
}, []);
|
271171
|
+
}
|
271172
|
+
// ../../node_modules/.bun/@inquirer+core@10.2.0+be14e1ce904ed1ef/node_modules/@inquirer/core/dist/esm/lib/utils.js
|
271173
|
+
var import_cli_width2 = __toESM(require_cli_width(), 1);
|
271174
|
+
var import_wrap_ansi2 = __toESM(require_wrap_ansi(), 1);
|
271175
|
+
function breakLines2(content, width) {
|
271176
|
+
return content.split(`
|
271177
|
+
`).flatMap((line) => import_wrap_ansi2.default(line, width, { trim: false, hard: true }).split(`
|
271178
|
+
`).map((str) => str.trimEnd())).join(`
|
271179
|
+
`);
|
271180
|
+
}
|
271181
|
+
function readlineWidth2() {
|
271182
|
+
return import_cli_width2.default({ defaultWidth: 80, output: readline3().output });
|
271183
|
+
}
|
271184
|
+
|
271185
|
+
// ../../node_modules/.bun/@inquirer+core@10.2.0+be14e1ce904ed1ef/node_modules/@inquirer/core/dist/esm/lib/pagination/use-pagination.js
|
271186
|
+
function usePointerPosition({ active, renderedItems, pageSize, loop }) {
|
271187
|
+
const state = useRef2({
|
271188
|
+
lastPointer: active,
|
271189
|
+
lastActive: undefined
|
271190
|
+
});
|
271191
|
+
const { lastPointer, lastActive } = state.current;
|
271192
|
+
const middle = Math.floor(pageSize / 2);
|
271193
|
+
const renderedLength = renderedItems.reduce((acc, item) => acc + item.length, 0);
|
271194
|
+
const defaultPointerPosition = renderedItems.slice(0, active).reduce((acc, item) => acc + item.length, 0);
|
271195
|
+
let pointer = defaultPointerPosition;
|
271196
|
+
if (renderedLength > pageSize) {
|
271197
|
+
if (loop) {
|
271198
|
+
pointer = lastPointer;
|
271199
|
+
if (lastActive != null && lastActive < active && active - lastActive < pageSize) {
|
271200
|
+
pointer = Math.min(middle, Math.abs(active - lastActive) === 1 ? Math.min(lastPointer + (renderedItems[lastActive]?.length ?? 0), Math.max(defaultPointerPosition, lastPointer)) : lastPointer + active - lastActive);
|
271201
|
+
}
|
271202
|
+
} else {
|
271203
|
+
const spaceUnderActive = renderedItems.slice(active).reduce((acc, item) => acc + item.length, 0);
|
271204
|
+
pointer = spaceUnderActive < pageSize - middle ? pageSize - spaceUnderActive : Math.min(defaultPointerPosition, middle);
|
271205
|
+
}
|
271206
|
+
}
|
271207
|
+
state.current.lastPointer = pointer;
|
271208
|
+
state.current.lastActive = active;
|
271209
|
+
return pointer;
|
271210
|
+
}
|
271211
|
+
function usePagination({ items, active, renderItem, pageSize, loop = true }) {
|
271212
|
+
const width = readlineWidth2();
|
271213
|
+
const bound = (num) => (num % items.length + items.length) % items.length;
|
271214
|
+
const renderedItems = items.map((item, index) => {
|
271215
|
+
if (item == null)
|
271216
|
+
return [];
|
271217
|
+
return breakLines2(renderItem({ item, index, isActive: index === active }), width).split(`
|
271218
|
+
`);
|
271219
|
+
});
|
271220
|
+
const renderedLength = renderedItems.reduce((acc, item) => acc + item.length, 0);
|
271221
|
+
const renderItemAtIndex = (index) => renderedItems[index] ?? [];
|
271222
|
+
const pointer = usePointerPosition({ active, renderedItems, pageSize, loop });
|
271223
|
+
const activeItem = renderItemAtIndex(active).slice(0, pageSize);
|
271224
|
+
const activeItemPosition = pointer + activeItem.length <= pageSize ? pointer : pageSize - activeItem.length;
|
271225
|
+
const pageBuffer = Array.from({ length: pageSize });
|
271226
|
+
pageBuffer.splice(activeItemPosition, activeItem.length, ...activeItem);
|
271227
|
+
const itemVisited = new Set([active]);
|
271228
|
+
let bufferPointer = activeItemPosition + activeItem.length;
|
271229
|
+
let itemPointer = bound(active + 1);
|
271230
|
+
while (bufferPointer < pageSize && !itemVisited.has(itemPointer) && (loop && renderedLength > pageSize ? itemPointer !== active : itemPointer > active)) {
|
271231
|
+
const lines = renderItemAtIndex(itemPointer);
|
271232
|
+
const linesToAdd = lines.slice(0, pageSize - bufferPointer);
|
271233
|
+
pageBuffer.splice(bufferPointer, linesToAdd.length, ...linesToAdd);
|
271234
|
+
itemVisited.add(itemPointer);
|
271235
|
+
bufferPointer += linesToAdd.length;
|
271236
|
+
itemPointer = bound(itemPointer + 1);
|
271237
|
+
}
|
271238
|
+
bufferPointer = activeItemPosition - 1;
|
271239
|
+
itemPointer = bound(active - 1);
|
271240
|
+
while (bufferPointer >= 0 && !itemVisited.has(itemPointer) && (loop && renderedLength > pageSize ? itemPointer !== active : itemPointer < active)) {
|
271241
|
+
const lines = renderItemAtIndex(itemPointer);
|
271242
|
+
const linesToAdd = lines.slice(Math.max(0, lines.length - bufferPointer - 1));
|
271243
|
+
pageBuffer.splice(bufferPointer - linesToAdd.length + 1, linesToAdd.length, ...linesToAdd);
|
271244
|
+
itemVisited.add(itemPointer);
|
271245
|
+
bufferPointer -= linesToAdd.length;
|
271246
|
+
itemPointer = bound(itemPointer - 1);
|
271247
|
+
}
|
271248
|
+
return pageBuffer.filter((line) => typeof line === "string").join(`
|
271249
|
+
`);
|
271250
|
+
}
|
271251
|
+
// ../../node_modules/.bun/@inquirer+core@10.2.0+be14e1ce904ed1ef/node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
|
271252
|
+
var import_mute_stream2 = __toESM(require_lib(), 1);
|
271253
|
+
import * as readline4 from "node:readline";
|
271254
|
+
import { AsyncResource as AsyncResource6 } from "node:async_hooks";
|
271255
|
+
|
271256
|
+
// ../../node_modules/.bun/@inquirer+core@10.2.0+be14e1ce904ed1ef/node_modules/@inquirer/core/dist/esm/lib/screen-manager.js
|
270984
271257
|
var import_ansi_escapes2 = __toESM(require_ansi_escapes(), 1);
|
271258
|
+
import { stripVTControlCharacters as stripVTControlCharacters3 } from "node:util";
|
271259
|
+
var height2 = (content) => content.split(`
|
271260
|
+
`).length;
|
271261
|
+
var lastLine2 = (content) => content.split(`
|
271262
|
+
`).pop() ?? "";
|
271263
|
+
function cursorDown2(n7) {
|
271264
|
+
return n7 > 0 ? import_ansi_escapes2.default.cursorDown(n7) : "";
|
271265
|
+
}
|
271266
|
+
|
271267
|
+
class ScreenManager2 {
|
271268
|
+
height = 0;
|
271269
|
+
extraLinesUnderPrompt = 0;
|
271270
|
+
cursorPos;
|
271271
|
+
rl;
|
271272
|
+
constructor(rl) {
|
271273
|
+
this.rl = rl;
|
271274
|
+
this.cursorPos = rl.getCursorPos();
|
271275
|
+
}
|
271276
|
+
write(content) {
|
271277
|
+
this.rl.output.unmute();
|
271278
|
+
this.rl.output.write(content);
|
271279
|
+
this.rl.output.mute();
|
271280
|
+
}
|
271281
|
+
render(content, bottomContent = "") {
|
271282
|
+
const promptLine = lastLine2(content);
|
271283
|
+
const rawPromptLine = stripVTControlCharacters3(promptLine);
|
271284
|
+
let prompt = rawPromptLine;
|
271285
|
+
if (this.rl.line.length > 0) {
|
271286
|
+
prompt = prompt.slice(0, -this.rl.line.length);
|
271287
|
+
}
|
271288
|
+
this.rl.setPrompt(prompt);
|
271289
|
+
this.cursorPos = this.rl.getCursorPos();
|
271290
|
+
const width = readlineWidth2();
|
271291
|
+
content = breakLines2(content, width);
|
271292
|
+
bottomContent = breakLines2(bottomContent, width);
|
271293
|
+
if (rawPromptLine.length % width === 0) {
|
271294
|
+
content += `
|
271295
|
+
`;
|
271296
|
+
}
|
271297
|
+
let output = content + (bottomContent ? `
|
271298
|
+
` + bottomContent : "");
|
271299
|
+
const promptLineUpDiff = Math.floor(rawPromptLine.length / width) - this.cursorPos.rows;
|
271300
|
+
const bottomContentHeight = promptLineUpDiff + (bottomContent ? height2(bottomContent) : 0);
|
271301
|
+
if (bottomContentHeight > 0)
|
271302
|
+
output += import_ansi_escapes2.default.cursorUp(bottomContentHeight);
|
271303
|
+
output += import_ansi_escapes2.default.cursorTo(this.cursorPos.cols);
|
271304
|
+
this.write(cursorDown2(this.extraLinesUnderPrompt) + import_ansi_escapes2.default.eraseLines(this.height) + output);
|
271305
|
+
this.extraLinesUnderPrompt = bottomContentHeight;
|
271306
|
+
this.height = height2(output);
|
271307
|
+
}
|
271308
|
+
checkCursorPos() {
|
271309
|
+
const cursorPos = this.rl.getCursorPos();
|
271310
|
+
if (cursorPos.cols !== this.cursorPos.cols) {
|
271311
|
+
this.write(import_ansi_escapes2.default.cursorTo(cursorPos.cols));
|
271312
|
+
this.cursorPos = cursorPos;
|
271313
|
+
}
|
271314
|
+
}
|
271315
|
+
done({ clearContent }) {
|
271316
|
+
this.rl.setPrompt("");
|
271317
|
+
let output = cursorDown2(this.extraLinesUnderPrompt);
|
271318
|
+
output += clearContent ? import_ansi_escapes2.default.eraseLines(this.height) : `
|
271319
|
+
`;
|
271320
|
+
output += import_ansi_escapes2.default.cursorShow;
|
271321
|
+
this.write(output);
|
271322
|
+
this.rl.close();
|
271323
|
+
}
|
271324
|
+
}
|
271325
|
+
|
271326
|
+
// ../../node_modules/.bun/@inquirer+core@10.2.0+be14e1ce904ed1ef/node_modules/@inquirer/core/dist/esm/lib/promise-polyfill.js
|
271327
|
+
class PromisePolyfill2 extends Promise {
|
271328
|
+
static withResolver() {
|
271329
|
+
let resolve6;
|
271330
|
+
let reject;
|
271331
|
+
const promise2 = new Promise((res, rej) => {
|
271332
|
+
resolve6 = res;
|
271333
|
+
reject = rej;
|
271334
|
+
});
|
271335
|
+
return { promise: promise2, resolve: resolve6, reject };
|
271336
|
+
}
|
271337
|
+
}
|
271338
|
+
|
271339
|
+
// ../../node_modules/.bun/@inquirer+core@10.2.0+be14e1ce904ed1ef/node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
|
271340
|
+
function getCallSites2() {
|
271341
|
+
const _prepareStackTrace = Error.prepareStackTrace;
|
271342
|
+
let result = [];
|
271343
|
+
try {
|
271344
|
+
Error.prepareStackTrace = (_5, callSites) => {
|
271345
|
+
const callSitesWithoutCurrent = callSites.slice(1);
|
271346
|
+
result = callSitesWithoutCurrent;
|
271347
|
+
return callSitesWithoutCurrent;
|
271348
|
+
};
|
271349
|
+
new Error().stack;
|
271350
|
+
} catch {
|
271351
|
+
return result;
|
271352
|
+
}
|
271353
|
+
Error.prepareStackTrace = _prepareStackTrace;
|
271354
|
+
return result;
|
271355
|
+
}
|
271356
|
+
function createPrompt2(view) {
|
271357
|
+
const callSites = getCallSites2();
|
271358
|
+
const prompt = (config3, context = {}) => {
|
271359
|
+
const { input = process.stdin, signal } = context;
|
271360
|
+
const cleanups = new Set;
|
271361
|
+
const output = new import_mute_stream2.default;
|
271362
|
+
output.pipe(context.output ?? process.stdout);
|
271363
|
+
const rl = readline4.createInterface({
|
271364
|
+
terminal: true,
|
271365
|
+
input,
|
271366
|
+
output
|
271367
|
+
});
|
271368
|
+
const screen = new ScreenManager2(rl);
|
271369
|
+
const { promise: promise2, resolve: resolve6, reject } = PromisePolyfill2.withResolver();
|
271370
|
+
const cancel3 = () => reject(new CancelPromptError2);
|
271371
|
+
if (signal) {
|
271372
|
+
const abort = () => reject(new AbortPromptError2({ cause: signal.reason }));
|
271373
|
+
if (signal.aborted) {
|
271374
|
+
abort();
|
271375
|
+
return Object.assign(promise2, { cancel: cancel3 });
|
271376
|
+
}
|
271377
|
+
signal.addEventListener("abort", abort);
|
271378
|
+
cleanups.add(() => signal.removeEventListener("abort", abort));
|
271379
|
+
}
|
271380
|
+
cleanups.add(onExit((code2, signal2) => {
|
271381
|
+
reject(new ExitPromptError2(`User force closed the prompt with ${code2} ${signal2}`));
|
271382
|
+
}));
|
271383
|
+
const sigint = () => reject(new ExitPromptError2(`User force closed the prompt with SIGINT`));
|
271384
|
+
rl.on("SIGINT", sigint);
|
271385
|
+
cleanups.add(() => rl.removeListener("SIGINT", sigint));
|
271386
|
+
const checkCursorPos = () => screen.checkCursorPos();
|
271387
|
+
rl.input.on("keypress", checkCursorPos);
|
271388
|
+
cleanups.add(() => rl.input.removeListener("keypress", checkCursorPos));
|
271389
|
+
return withHooks2(rl, (cycle) => {
|
271390
|
+
const hooksCleanup = AsyncResource6.bind(() => effectScheduler2.clearAll());
|
271391
|
+
rl.on("close", hooksCleanup);
|
271392
|
+
cleanups.add(() => rl.removeListener("close", hooksCleanup));
|
271393
|
+
cycle(() => {
|
271394
|
+
try {
|
271395
|
+
const nextView = view(config3, (value5) => {
|
271396
|
+
setImmediate(() => resolve6(value5));
|
271397
|
+
});
|
271398
|
+
if (nextView === undefined) {
|
271399
|
+
const callerFilename = callSites[1]?.getFileName();
|
271400
|
+
throw new Error(`Prompt functions must return a string.
|
271401
|
+
at ${callerFilename}`);
|
271402
|
+
}
|
271403
|
+
const [content, bottomContent] = typeof nextView === "string" ? [nextView] : nextView;
|
271404
|
+
screen.render(content, bottomContent);
|
271405
|
+
effectScheduler2.run();
|
271406
|
+
} catch (error48) {
|
271407
|
+
reject(error48);
|
271408
|
+
}
|
271409
|
+
});
|
271410
|
+
return Object.assign(promise2.then((answer) => {
|
271411
|
+
effectScheduler2.clearAll();
|
271412
|
+
return answer;
|
271413
|
+
}, (error48) => {
|
271414
|
+
effectScheduler2.clearAll();
|
271415
|
+
throw error48;
|
271416
|
+
}).finally(() => {
|
271417
|
+
cleanups.forEach((cleanup) => cleanup());
|
271418
|
+
screen.done({ clearContent: Boolean(context.clearPromptOnDone) });
|
271419
|
+
output.end();
|
271420
|
+
}).then(() => promise2), { cancel: cancel3 });
|
271421
|
+
});
|
271422
|
+
};
|
271423
|
+
return prompt;
|
271424
|
+
}
|
271425
|
+
// ../../node_modules/.bun/@inquirer+core@10.2.0+be14e1ce904ed1ef/node_modules/@inquirer/core/dist/esm/lib/Separator.js
|
271426
|
+
var import_yoctocolors_cjs3 = __toESM(require_yoctocolors_cjs(), 1);
|
271427
|
+
class Separator {
|
271428
|
+
separator = import_yoctocolors_cjs3.default.dim(Array.from({ length: 15 }).join(esm_default.line));
|
271429
|
+
type = "separator";
|
271430
|
+
constructor(separator) {
|
271431
|
+
if (separator) {
|
271432
|
+
this.separator = separator;
|
271433
|
+
}
|
271434
|
+
}
|
271435
|
+
static isSeparator(choice) {
|
271436
|
+
return Boolean(choice && typeof choice === "object" && "type" in choice && choice.type === "separator");
|
271437
|
+
}
|
271438
|
+
}
|
271439
|
+
// ../../node_modules/.bun/@inquirer+select@4.3.2+be14e1ce904ed1ef/node_modules/@inquirer/select/dist/esm/index.js
|
271440
|
+
var import_yoctocolors_cjs4 = __toESM(require_yoctocolors_cjs(), 1);
|
271441
|
+
var import_ansi_escapes3 = __toESM(require_ansi_escapes(), 1);
|
270985
271442
|
var selectTheme = {
|
270986
271443
|
icon: { cursor: esm_default.pointer },
|
270987
271444
|
style: {
|
270988
|
-
disabled: (text2) =>
|
270989
|
-
description: (text2) =>
|
271445
|
+
disabled: (text2) => import_yoctocolors_cjs4.default.dim(`- ${text2}`),
|
271446
|
+
description: (text2) => import_yoctocolors_cjs4.default.cyan(text2)
|
270990
271447
|
},
|
270991
271448
|
helpMode: "auto",
|
270992
271449
|
indexMode: "hidden"
|
@@ -271019,19 +271476,19 @@ function normalizeChoices(choices) {
|
|
271019
271476
|
return normalizedChoice;
|
271020
271477
|
});
|
271021
271478
|
}
|
271022
|
-
var esm_default3 =
|
271479
|
+
var esm_default3 = createPrompt2((config3, done) => {
|
271023
271480
|
const { loop = true, pageSize = 7 } = config3;
|
271024
|
-
const firstRender =
|
271025
|
-
const theme =
|
271026
|
-
const [status, setStatus] =
|
271027
|
-
const prefix =
|
271028
|
-
const searchTimeoutRef =
|
271481
|
+
const firstRender = useRef2(true);
|
271482
|
+
const theme = makeTheme2(selectTheme, config3.theme);
|
271483
|
+
const [status, setStatus] = useState2("idle");
|
271484
|
+
const prefix = usePrefix2({ status, theme });
|
271485
|
+
const searchTimeoutRef = useRef2();
|
271029
271486
|
const items = useMemo(() => normalizeChoices(config3.choices), [config3.choices]);
|
271030
271487
|
const bounds = useMemo(() => {
|
271031
271488
|
const first = items.findIndex(isSelectable);
|
271032
271489
|
const last = items.findLastIndex(isSelectable);
|
271033
271490
|
if (first === -1) {
|
271034
|
-
throw new
|
271491
|
+
throw new ValidationError2("[select prompt] No selectable choices. All choices are disabled.");
|
271035
271492
|
}
|
271036
271493
|
return { first, last };
|
271037
271494
|
}, [items]);
|
@@ -271040,24 +271497,24 @@ var esm_default3 = createPrompt((config3, done) => {
|
|
271040
271497
|
return -1;
|
271041
271498
|
return items.findIndex((item) => isSelectable(item) && item.value === config3.default);
|
271042
271499
|
}, [config3.default, items]);
|
271043
|
-
const [active, setActive] =
|
271500
|
+
const [active, setActive] = useState2(defaultItemIndex === -1 ? bounds.first : defaultItemIndex);
|
271044
271501
|
const selectedChoice = items[active];
|
271045
|
-
|
271502
|
+
useKeypress2((key3, rl) => {
|
271046
271503
|
clearTimeout(searchTimeoutRef.current);
|
271047
|
-
if (
|
271504
|
+
if (isEnterKey2(key3)) {
|
271048
271505
|
setStatus("done");
|
271049
271506
|
done(selectedChoice.value);
|
271050
|
-
} else if (isUpKey(
|
271507
|
+
} else if (isUpKey(key3) || isDownKey(key3)) {
|
271051
271508
|
rl.clearLine(0);
|
271052
|
-
if (loop || isUpKey(
|
271053
|
-
const offset = isUpKey(
|
271509
|
+
if (loop || isUpKey(key3) && active !== bounds.first || isDownKey(key3) && active !== bounds.last) {
|
271510
|
+
const offset = isUpKey(key3) ? -1 : 1;
|
271054
271511
|
let next = active;
|
271055
271512
|
do {
|
271056
271513
|
next = (next + offset + items.length) % items.length;
|
271057
271514
|
} while (!isSelectable(items[next]));
|
271058
271515
|
setActive(next);
|
271059
271516
|
}
|
271060
|
-
} else if (isNumberKey(
|
271517
|
+
} else if (isNumberKey(key3) && !Number.isNaN(Number(rl.line))) {
|
271061
271518
|
const selectedIndex = Number(rl.line) - 1;
|
271062
271519
|
let selectableIndex = -1;
|
271063
271520
|
const position = items.findIndex((item2) => {
|
@@ -271073,7 +271530,7 @@ var esm_default3 = createPrompt((config3, done) => {
|
|
271073
271530
|
searchTimeoutRef.current = setTimeout(() => {
|
271074
271531
|
rl.clearLine(0);
|
271075
271532
|
}, 700);
|
271076
|
-
} else if (
|
271533
|
+
} else if (isBackspaceKey2(key3)) {
|
271077
271534
|
rl.clearLine(0);
|
271078
271535
|
} else {
|
271079
271536
|
const searchTerm = rl.line.toLowerCase();
|
@@ -271090,7 +271547,7 @@ var esm_default3 = createPrompt((config3, done) => {
|
|
271090
271547
|
}, 700);
|
271091
271548
|
}
|
271092
271549
|
});
|
271093
|
-
|
271550
|
+
useEffect2(() => () => {
|
271094
271551
|
clearTimeout(searchTimeoutRef.current);
|
271095
271552
|
}, []);
|
271096
271553
|
const message = theme.style.message(config3.message, status);
|
@@ -271132,7 +271589,7 @@ ${theme.style.help(`(${config3.instructions?.pager ?? "Use arrow keys to reveal
|
|
271132
271589
|
const choiceDescription = selectedChoice.description ? `
|
271133
271590
|
${theme.style.description(selectedChoice.description)}` : ``;
|
271134
271591
|
return `${[prefix, message, helpTipTop].filter(Boolean).join(" ")}
|
271135
|
-
${page}${helpTipBottom}${choiceDescription}${
|
271592
|
+
${page}${helpTipBottom}${choiceDescription}${import_ansi_escapes3.default.cursorHide}`;
|
271136
271593
|
});
|
271137
271594
|
|
271138
271595
|
// src/prompts/smart-contract-set/subgraph.prompt.ts
|
@@ -272777,14 +273234,14 @@ function includesArgs(parameters) {
|
|
272777
273234
|
});
|
272778
273235
|
}
|
272779
273236
|
if (typeof args === "object" && !Array.isArray(args) && typeof matchArgs === "object" && !Array.isArray(matchArgs))
|
272780
|
-
return Object.entries(matchArgs).every(([
|
273237
|
+
return Object.entries(matchArgs).every(([key3, value5]) => {
|
272781
273238
|
if (value5 === null || value5 === undefined)
|
272782
273239
|
return true;
|
272783
|
-
const input = inputs.find((input2) => input2.name ===
|
273240
|
+
const input = inputs.find((input2) => input2.name === key3);
|
272784
273241
|
if (!input)
|
272785
273242
|
return false;
|
272786
273243
|
const value_ = Array.isArray(value5) ? value5 : [value5];
|
272787
|
-
return value_.some((value6) => isEqual(input, value6, args[
|
273244
|
+
return value_.some((value6) => isEqual(input, value6, args[key3]));
|
272788
273245
|
});
|
272789
273246
|
return false;
|
272790
273247
|
}
|
@@ -272983,13 +273440,13 @@ function observe(observerId, callbacks, fn) {
|
|
272983
273440
|
if (listeners && listeners.length > 0)
|
272984
273441
|
return unwatch;
|
272985
273442
|
const emit = {};
|
272986
|
-
for (const
|
272987
|
-
emit[
|
273443
|
+
for (const key3 in callbacks) {
|
273444
|
+
emit[key3] = (...args) => {
|
272988
273445
|
const listeners2 = getListeners();
|
272989
273446
|
if (listeners2.length === 0)
|
272990
273447
|
return;
|
272991
273448
|
for (const listener of listeners2)
|
272992
|
-
listener.fns[
|
273449
|
+
listener.fns[key3]?.(...args);
|
272993
273450
|
};
|
272994
273451
|
}
|
272995
273452
|
const cleanup = fn(emit);
|
@@ -273369,7 +273826,7 @@ function uid(length = 11) {
|
|
273369
273826
|
|
273370
273827
|
// ../../node_modules/.bun/viem@2.34.0+f2e3f0548df57a15/node_modules/viem/_esm/clients/createClient.js
|
273371
273828
|
function createClient(parameters) {
|
273372
|
-
const { batch, chain, ccipRead, key:
|
273829
|
+
const { batch, chain, ccipRead, key: key3 = "base", name: name4 = "Base Client", type: type5 = "base" } = parameters;
|
273373
273830
|
const experimental_blockTag = parameters.experimental_blockTag ?? (typeof chain?.experimental_preconfirmationTime === "number" ? "pending" : undefined);
|
273374
273831
|
const blockTime = chain?.blockTime ?? 12000;
|
273375
273832
|
const defaultPollingInterval = Math.min(Math.max(Math.floor(blockTime / 2), 500), 4000);
|
@@ -273387,7 +273844,7 @@ function createClient(parameters) {
|
|
273387
273844
|
cacheTime,
|
273388
273845
|
ccipRead,
|
273389
273846
|
chain,
|
273390
|
-
key:
|
273847
|
+
key: key3,
|
273391
273848
|
name: name4,
|
273392
273849
|
pollingInterval,
|
273393
273850
|
request: request2,
|
@@ -273399,8 +273856,8 @@ function createClient(parameters) {
|
|
273399
273856
|
function extend2(base2) {
|
273400
273857
|
return (extendFn) => {
|
273401
273858
|
const extended = extendFn(base2);
|
273402
|
-
for (const
|
273403
|
-
delete extended[
|
273859
|
+
for (const key4 in client)
|
273860
|
+
delete extended[key4];
|
273404
273861
|
const combined = { ...base2, ...extended };
|
273405
273862
|
return Object.assign(combined, { extend: extend2(combined) });
|
273406
273863
|
};
|
@@ -273557,11 +274014,11 @@ function shouldRetry(error48) {
|
|
273557
274014
|
}
|
273558
274015
|
|
273559
274016
|
// ../../node_modules/.bun/viem@2.34.0+f2e3f0548df57a15/node_modules/viem/_esm/clients/transports/createTransport.js
|
273560
|
-
function createTransport({ key:
|
274017
|
+
function createTransport({ key: key3, methods, name: name4, request: request2, retryCount = 3, retryDelay = 150, timeout, type: type5 }, value5) {
|
273561
274018
|
const uid2 = uid();
|
273562
274019
|
return {
|
273563
274020
|
config: {
|
273564
|
-
key:
|
274021
|
+
key: key3,
|
273565
274022
|
methods,
|
273566
274023
|
name: name4,
|
273567
274024
|
request: request2,
|
@@ -273718,7 +274175,7 @@ function getHttpRpcClient(url2, options = {}) {
|
|
273718
274175
|
|
273719
274176
|
// ../../node_modules/.bun/viem@2.34.0+f2e3f0548df57a15/node_modules/viem/_esm/clients/transports/http.js
|
273720
274177
|
function http(url2, config3 = {}) {
|
273721
|
-
const { batch, fetchOptions, key:
|
274178
|
+
const { batch, fetchOptions, key: key3 = "http", methods, name: name4 = "HTTP JSON-RPC", onFetchRequest, onFetchResponse, retryDelay, raw } = config3;
|
273722
274179
|
return ({ chain, retryCount: retryCount_, timeout: timeout_ }) => {
|
273723
274180
|
const { batchSize = 1000, wait: wait2 = 0 } = typeof batch === "object" ? batch : {};
|
273724
274181
|
const retryCount = config3.retryCount ?? retryCount_;
|
@@ -273733,7 +274190,7 @@ function http(url2, config3 = {}) {
|
|
273733
274190
|
timeout
|
273734
274191
|
});
|
273735
274192
|
return createTransport({
|
273736
|
-
key:
|
274193
|
+
key: key3,
|
273737
274194
|
methods,
|
273738
274195
|
name: name4,
|
273739
274196
|
async request({ method, params }) {
|
@@ -274184,7 +274641,7 @@ init_getChainContractAddress();
|
|
274184
274641
|
init_toHex();
|
274185
274642
|
init_localBatchGatewayRequest();
|
274186
274643
|
async function getEnsText(client, parameters) {
|
274187
|
-
const { blockNumber, blockTag, key:
|
274644
|
+
const { blockNumber, blockTag, key: key3, name: name4, gatewayUrls, strict } = parameters;
|
274188
274645
|
const { chain } = client;
|
274189
274646
|
const universalResolverAddress = (() => {
|
274190
274647
|
if (parameters.universalResolverAddress)
|
@@ -274210,7 +274667,7 @@ async function getEnsText(client, parameters) {
|
|
274210
274667
|
encodeFunctionData({
|
274211
274668
|
abi: textResolverAbi,
|
274212
274669
|
functionName: "text",
|
274213
|
-
args: [namehash(name4),
|
274670
|
+
args: [namehash(name4), key3]
|
274214
274671
|
}),
|
274215
274672
|
gatewayUrls ?? [localBatchGatewayUrl]
|
274216
274673
|
],
|
@@ -275564,16 +276021,16 @@ class LruMap2 extends Map {
|
|
275564
276021
|
});
|
275565
276022
|
this.maxSize = size5;
|
275566
276023
|
}
|
275567
|
-
get(
|
275568
|
-
const value5 = super.get(
|
275569
|
-
if (super.has(
|
275570
|
-
this.delete(
|
275571
|
-
super.set(
|
276024
|
+
get(key3) {
|
276025
|
+
const value5 = super.get(key3);
|
276026
|
+
if (super.has(key3) && value5 !== undefined) {
|
276027
|
+
this.delete(key3);
|
276028
|
+
super.set(key3, value5);
|
275572
276029
|
}
|
275573
276030
|
return value5;
|
275574
276031
|
}
|
275575
|
-
set(
|
275576
|
-
super.set(
|
276032
|
+
set(key3, value5) {
|
276033
|
+
super.set(key3, value5);
|
275577
276034
|
if (this.maxSize && this.size > this.maxSize) {
|
275578
276035
|
const firstKey = this.keys().next().value;
|
275579
276036
|
if (firstKey)
|
@@ -277433,10 +277890,10 @@ function publicActions(client) {
|
|
277433
277890
|
|
277434
277891
|
// ../../node_modules/.bun/viem@2.34.0+f2e3f0548df57a15/node_modules/viem/_esm/clients/createPublicClient.js
|
277435
277892
|
function createPublicClient(parameters) {
|
277436
|
-
const { key:
|
277893
|
+
const { key: key3 = "public", name: name4 = "Public Client" } = parameters;
|
277437
277894
|
const client = createClient({
|
277438
277895
|
...parameters,
|
277439
|
-
key:
|
277896
|
+
key: key3,
|
277440
277897
|
name: name4,
|
277441
277898
|
type: "publicClient"
|
277442
277899
|
});
|
@@ -294188,23 +294645,23 @@ var LRUCache3 = class {
|
|
294188
294645
|
constructor(maxSize) {
|
294189
294646
|
this.maxSize = maxSize;
|
294190
294647
|
}
|
294191
|
-
get(
|
294192
|
-
const value5 = this.cache.get(
|
294648
|
+
get(key3) {
|
294649
|
+
const value5 = this.cache.get(key3);
|
294193
294650
|
if (value5 !== undefined) {
|
294194
|
-
this.cache.delete(
|
294195
|
-
this.cache.set(
|
294651
|
+
this.cache.delete(key3);
|
294652
|
+
this.cache.set(key3, value5);
|
294196
294653
|
}
|
294197
294654
|
return value5;
|
294198
294655
|
}
|
294199
|
-
set(
|
294200
|
-
this.cache.delete(
|
294656
|
+
set(key3, value5) {
|
294657
|
+
this.cache.delete(key3);
|
294201
294658
|
if (this.cache.size >= this.maxSize) {
|
294202
294659
|
const firstKey = this.cache.keys().next().value;
|
294203
294660
|
if (firstKey !== undefined) {
|
294204
294661
|
this.cache.delete(firstKey);
|
294205
294662
|
}
|
294206
294663
|
}
|
294207
|
-
this.cache.set(
|
294664
|
+
this.cache.set(key3, value5);
|
294208
294665
|
}
|
294209
294666
|
clear() {
|
294210
294667
|
this.cache.clear();
|
@@ -294215,9 +294672,9 @@ var publicClientCache = new LRUCache3(50);
|
|
294215
294672
|
var walletClientFactoryCache = new LRUCache3(50);
|
294216
294673
|
function buildHeaders(baseHeaders, authHeaders) {
|
294217
294674
|
const filteredHeaders = {};
|
294218
|
-
for (const [
|
294675
|
+
for (const [key3, value5] of Object.entries(authHeaders)) {
|
294219
294676
|
if (value5 !== undefined) {
|
294220
|
-
filteredHeaders[
|
294677
|
+
filteredHeaders[key3] = value5;
|
294221
294678
|
}
|
294222
294679
|
}
|
294223
294680
|
return appendHeaders(baseHeaders, filteredHeaders);
|
@@ -294543,15 +295000,15 @@ var esm_default4 = createPrompt((config3, done) => {
|
|
294543
295000
|
const [value5, setValue] = useState("");
|
294544
295001
|
const theme = makeTheme(config3.theme);
|
294545
295002
|
const prefix = usePrefix({ status, theme });
|
294546
|
-
useKeypress((
|
295003
|
+
useKeypress((key3, rl) => {
|
294547
295004
|
if (status !== "idle")
|
294548
295005
|
return;
|
294549
|
-
if (isEnterKey(
|
295006
|
+
if (isEnterKey(key3)) {
|
294550
295007
|
const answer = getBooleanValue(value5, config3.default);
|
294551
295008
|
setValue(transformer(answer));
|
294552
295009
|
setStatus("done");
|
294553
295010
|
done(answer);
|
294554
|
-
} else if (
|
295011
|
+
} else if (key3.name === "tab") {
|
294555
295012
|
const answer = boolToString(!getBooleanValue(value5, config3.default));
|
294556
295013
|
rl.clearLine(0);
|
294557
295014
|
rl.write(answer);
|
@@ -294572,7 +295029,7 @@ var esm_default4 = createPrompt((config3, done) => {
|
|
294572
295029
|
});
|
294573
295030
|
|
294574
295031
|
// ../../node_modules/.bun/@inquirer+password@4.0.17+be14e1ce904ed1ef/node_modules/@inquirer/password/dist/esm/index.js
|
294575
|
-
var
|
295032
|
+
var import_ansi_escapes4 = __toESM(require_ansi_escapes(), 1);
|
294576
295033
|
var esm_default5 = createPrompt((config3, done) => {
|
294577
295034
|
const { validate: validate5 = () => true } = config3;
|
294578
295035
|
const theme = makeTheme(config3.theme);
|
@@ -294580,11 +295037,11 @@ var esm_default5 = createPrompt((config3, done) => {
|
|
294580
295037
|
const [errorMsg, setError] = useState();
|
294581
295038
|
const [value5, setValue] = useState("");
|
294582
295039
|
const prefix = usePrefix({ status, theme });
|
294583
|
-
useKeypress(async (
|
295040
|
+
useKeypress(async (key3, rl) => {
|
294584
295041
|
if (status !== "idle") {
|
294585
295042
|
return;
|
294586
295043
|
}
|
294587
|
-
if (isEnterKey(
|
295044
|
+
if (isEnterKey(key3)) {
|
294588
295045
|
const answer = value5;
|
294589
295046
|
setStatus("loading");
|
294590
295047
|
const isValid = await validate5(answer);
|
@@ -294609,7 +295066,7 @@ var esm_default5 = createPrompt((config3, done) => {
|
|
294609
295066
|
const maskChar = typeof config3.mask === "string" ? config3.mask : "*";
|
294610
295067
|
formattedValue = maskChar.repeat(value5.length);
|
294611
295068
|
} else if (status !== "done") {
|
294612
|
-
helpTip = `${theme.style.help("[input is masked]")}${
|
295069
|
+
helpTip = `${theme.style.help("[input is masked]")}${import_ansi_escapes4.default.cursorHide}`;
|
294613
295070
|
}
|
294614
295071
|
if (status === "done") {
|
294615
295072
|
formattedValue = theme.style.answer(formattedValue);
|
@@ -296287,7 +296744,7 @@ var basename2 = function(p5, extension) {
|
|
296287
296744
|
return extension && lastSegment.endsWith(extension) ? lastSegment.slice(0, -extension.length) : lastSegment;
|
296288
296745
|
};
|
296289
296746
|
// ../../node_modules/.bun/defu@6.1.4/node_modules/defu/dist/defu.mjs
|
296290
|
-
function
|
296747
|
+
function isPlainObject5(value5) {
|
296291
296748
|
if (value5 === null || typeof value5 !== "object") {
|
296292
296749
|
return false;
|
296293
296750
|
}
|
@@ -296304,27 +296761,27 @@ function isPlainObject4(value5) {
|
|
296304
296761
|
return true;
|
296305
296762
|
}
|
296306
296763
|
function _defu(baseObject, defaults2, namespace = ".", merger) {
|
296307
|
-
if (!
|
296764
|
+
if (!isPlainObject5(defaults2)) {
|
296308
296765
|
return _defu(baseObject, {}, namespace, merger);
|
296309
296766
|
}
|
296310
296767
|
const object2 = Object.assign({}, defaults2);
|
296311
|
-
for (const
|
296312
|
-
if (
|
296768
|
+
for (const key3 in baseObject) {
|
296769
|
+
if (key3 === "__proto__" || key3 === "constructor") {
|
296313
296770
|
continue;
|
296314
296771
|
}
|
296315
|
-
const value5 = baseObject[
|
296772
|
+
const value5 = baseObject[key3];
|
296316
296773
|
if (value5 === null || value5 === undefined) {
|
296317
296774
|
continue;
|
296318
296775
|
}
|
296319
|
-
if (merger && merger(object2,
|
296776
|
+
if (merger && merger(object2, key3, value5, namespace)) {
|
296320
296777
|
continue;
|
296321
296778
|
}
|
296322
|
-
if (Array.isArray(value5) && Array.isArray(object2[
|
296323
|
-
object2[
|
296324
|
-
} else if (
|
296325
|
-
object2[
|
296779
|
+
if (Array.isArray(value5) && Array.isArray(object2[key3])) {
|
296780
|
+
object2[key3] = [...value5, ...object2[key3]];
|
296781
|
+
} else if (isPlainObject5(value5) && isPlainObject5(object2[key3])) {
|
296782
|
+
object2[key3] = _defu(value5, object2[key3], (namespace ? `${namespace}.` : "") + key3.toString(), merger);
|
296326
296783
|
} else {
|
296327
|
-
object2[
|
296784
|
+
object2[key3] = value5;
|
296328
296785
|
}
|
296329
296786
|
}
|
296330
296787
|
return object2;
|
@@ -296333,15 +296790,15 @@ function createDefu(merger) {
|
|
296333
296790
|
return (...arguments_5) => arguments_5.reduce((p5, c3) => _defu(p5, c3, "", merger), {});
|
296334
296791
|
}
|
296335
296792
|
var defu = createDefu();
|
296336
|
-
var defuFn = createDefu((object2,
|
296337
|
-
if (object2[
|
296338
|
-
object2[
|
296793
|
+
var defuFn = createDefu((object2, key3, currentValue) => {
|
296794
|
+
if (object2[key3] !== undefined && typeof currentValue === "function") {
|
296795
|
+
object2[key3] = currentValue(object2[key3]);
|
296339
296796
|
return true;
|
296340
296797
|
}
|
296341
296798
|
});
|
296342
|
-
var defuArrayFn = createDefu((object2,
|
296343
|
-
if (Array.isArray(object2[
|
296344
|
-
object2[
|
296799
|
+
var defuArrayFn = createDefu((object2, key3, currentValue) => {
|
296800
|
+
if (Array.isArray(object2[key3]) && typeof currentValue === "function") {
|
296801
|
+
object2[key3] = currentValue(object2[key3]);
|
296345
296802
|
return true;
|
296346
296803
|
}
|
296347
296804
|
});
|
@@ -299047,11 +299504,11 @@ function cacheDirectory() {
|
|
299047
299504
|
}
|
299048
299505
|
function normalizeHeaders(headers = {}) {
|
299049
299506
|
const normalized = {};
|
299050
|
-
for (const [
|
299507
|
+
for (const [key3, value5] of Object.entries(headers)) {
|
299051
299508
|
if (!value5) {
|
299052
299509
|
continue;
|
299053
299510
|
}
|
299054
|
-
normalized[
|
299511
|
+
normalized[key3.toLowerCase()] = value5;
|
299055
299512
|
}
|
299056
299513
|
return normalized;
|
299057
299514
|
}
|
@@ -302296,7 +302753,7 @@ function jsonOutput(data) {
|
|
302296
302753
|
var composer = require_composer();
|
302297
302754
|
var Document = require_Document();
|
302298
302755
|
var Schema = require_Schema();
|
302299
|
-
var
|
302756
|
+
var errors5 = require_errors3();
|
302300
302757
|
var Alias = require_Alias();
|
302301
302758
|
var identity2 = require_identity();
|
302302
302759
|
var Pair = require_Pair();
|
@@ -302312,9 +302769,9 @@ var visit2 = require_visit();
|
|
302312
302769
|
var $Composer = composer.Composer;
|
302313
302770
|
var $Document = Document.Document;
|
302314
302771
|
var $Schema = Schema.Schema;
|
302315
|
-
var $YAMLError =
|
302316
|
-
var $YAMLParseError =
|
302317
|
-
var $YAMLWarning =
|
302772
|
+
var $YAMLError = errors5.YAMLError;
|
302773
|
+
var $YAMLParseError = errors5.YAMLParseError;
|
302774
|
+
var $YAMLWarning = errors5.YAMLWarning;
|
302318
302775
|
var $Alias = Alias.Alias;
|
302319
302776
|
var $isAlias = identity2.isAlias;
|
302320
302777
|
var $isCollection = identity2.isCollection;
|
@@ -302921,11 +303378,11 @@ function createCommand4() {
|
|
302921
303378
|
|
302922
303379
|
// src/utils/commands/passthrough-options.ts
|
302923
303380
|
function mapPassthroughOptions(options, command) {
|
302924
|
-
const optionArgs = Object.entries(options).map(([
|
303381
|
+
const optionArgs = Object.entries(options).map(([key3, value5]) => {
|
302925
303382
|
if (value5 === true) {
|
302926
|
-
return `--${
|
303383
|
+
return `--${key3}`;
|
302927
303384
|
}
|
302928
|
-
return `--${
|
303385
|
+
return `--${key3}=${value5}`;
|
302929
303386
|
});
|
302930
303387
|
return [...optionArgs, ...command.args];
|
302931
303388
|
}
|
@@ -304178,4 +304635,4 @@ async function sdkCliCommand(argv = process.argv) {
|
|
304178
304635
|
// src/cli.ts
|
304179
304636
|
sdkCliCommand();
|
304180
304637
|
|
304181
|
-
//# debugId=
|
304638
|
+
//# debugId=55C8834DE276017C64756E2164756E21
|