@settlemint/sdk-cli 2.5.1-main1d50d683 → 2.5.1-main25184ec2
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 +731 -1187
- package/dist/cli.js.map +4 -18
- package/package.json +6 -6
package/dist/cli.js
CHANGED
@@ -232832,16 +232832,16 @@ var init_lru = __esm(() => {
|
|
232832
232832
|
});
|
232833
232833
|
this.maxSize = size2;
|
232834
232834
|
}
|
232835
|
-
get(
|
232836
|
-
const value4 = super.get(
|
232837
|
-
if (super.has(
|
232838
|
-
this.delete(
|
232839
|
-
super.set(
|
232835
|
+
get(key3) {
|
232836
|
+
const value4 = super.get(key3);
|
232837
|
+
if (super.has(key3) && value4 !== undefined) {
|
232838
|
+
this.delete(key3);
|
232839
|
+
super.set(key3, value4);
|
232840
232840
|
}
|
232841
232841
|
return value4;
|
232842
232842
|
}
|
232843
|
-
set(
|
232844
|
-
super.set(
|
232843
|
+
set(key3, value4) {
|
232844
|
+
super.set(key3, value4);
|
232845
232845
|
if (this.maxSize && this.size > this.maxSize) {
|
232846
232846
|
const firstKey = this.keys().next().value;
|
232847
232847
|
if (firstKey)
|
@@ -233883,9 +233883,9 @@ var init_decodeErrorResult = __esm(() => {
|
|
233883
233883
|
});
|
233884
233884
|
|
233885
233885
|
// ../../node_modules/viem/_esm/utils/stringify.js
|
233886
|
-
var stringify3 = (value4, replacer, space) => JSON.stringify(value4, (
|
233886
|
+
var stringify3 = (value4, replacer, space) => JSON.stringify(value4, (key3, value_) => {
|
233887
233887
|
const value5 = typeof value_ === "bigint" ? value_.toString() : value_;
|
233888
|
-
return typeof replacer === "function" ? replacer(
|
233888
|
+
return typeof replacer === "function" ? replacer(key3, value5) : value5;
|
233889
233889
|
}, space);
|
233890
233890
|
|
233891
233891
|
// ../../node_modules/viem/_esm/utils/abi/formatAbiItemWithArgs.js
|
@@ -233999,13 +233999,13 @@ var init_stateOverride = __esm(() => {
|
|
233999
233999
|
|
234000
234000
|
// ../../node_modules/viem/_esm/errors/transaction.js
|
234001
234001
|
function prettyPrint(args) {
|
234002
|
-
const entries = Object.entries(args).map(([
|
234002
|
+
const entries = Object.entries(args).map(([key3, value4]) => {
|
234003
234003
|
if (value4 === undefined || value4 === false)
|
234004
234004
|
return null;
|
234005
|
-
return [
|
234005
|
+
return [key3, value4];
|
234006
234006
|
}).filter(Boolean);
|
234007
|
-
const maxLength = entries.reduce((acc, [
|
234008
|
-
return entries.map(([
|
234007
|
+
const maxLength = entries.reduce((acc, [key3]) => Math.max(acc, key3.length), 0);
|
234008
|
+
return entries.map(([key3, value4]) => ` ${`${key3}:`.padEnd(maxLength + 1)} ${value4}`).join(`
|
234009
234009
|
`);
|
234010
234010
|
}
|
234011
234011
|
var FeeConflictError, InvalidSerializableTransactionError, TransactionNotFoundError, TransactionReceiptNotFoundError, WaitForTransactionReceiptTimeoutError;
|
@@ -235111,7 +235111,7 @@ var init_sha2 = __esm(() => {
|
|
235111
235111
|
});
|
235112
235112
|
|
235113
235113
|
// ../../node_modules/@noble/hashes/esm/hmac.js
|
235114
|
-
var HMAC, hmac = (hash2,
|
235114
|
+
var HMAC, hmac = (hash2, key3, message) => new HMAC(hash2, key3).update(message).digest();
|
235115
235115
|
var init_hmac = __esm(() => {
|
235116
235116
|
init_utils2();
|
235117
235117
|
HMAC = class HMAC extends Hash {
|
@@ -235120,7 +235120,7 @@ var init_hmac = __esm(() => {
|
|
235120
235120
|
this.finished = false;
|
235121
235121
|
this.destroyed = false;
|
235122
235122
|
ahash(hash2);
|
235123
|
-
const
|
235123
|
+
const key3 = toBytes2(_key);
|
235124
235124
|
this.iHash = hash2.create();
|
235125
235125
|
if (typeof this.iHash.update !== "function")
|
235126
235126
|
throw new Error("Expected instance of class which extends utils.Hash");
|
@@ -235128,7 +235128,7 @@ var init_hmac = __esm(() => {
|
|
235128
235128
|
this.outputLen = this.iHash.outputLen;
|
235129
235129
|
const blockLen = this.blockLen;
|
235130
235130
|
const pad2 = new Uint8Array(blockLen);
|
235131
|
-
pad2.set(
|
235131
|
+
pad2.set(key3.length > blockLen ? hash2.create().update(key3).digest() : key3);
|
235132
235132
|
for (let i6 = 0;i6 < pad2.length; i6++)
|
235133
235133
|
pad2[i6] ^= 54;
|
235134
235134
|
this.iHash.update(pad2);
|
@@ -235178,7 +235178,7 @@ var init_hmac = __esm(() => {
|
|
235178
235178
|
this.iHash.destroy();
|
235179
235179
|
}
|
235180
235180
|
};
|
235181
|
-
hmac.create = (hash2,
|
235181
|
+
hmac.create = (hash2, key3) => new HMAC(hash2, key3);
|
235182
235182
|
});
|
235183
235183
|
|
235184
235184
|
// ../../node_modules/@noble/curves/esm/utils.js
|
@@ -235579,13 +235579,13 @@ function getMinHashLength(fieldOrder) {
|
|
235579
235579
|
const length = getFieldBytesLength(fieldOrder);
|
235580
235580
|
return length + Math.ceil(length / 2);
|
235581
235581
|
}
|
235582
|
-
function mapHashToField(
|
235583
|
-
const len =
|
235582
|
+
function mapHashToField(key3, fieldOrder, isLE2 = false) {
|
235583
|
+
const len = key3.length;
|
235584
235584
|
const fieldLen = getFieldBytesLength(fieldOrder);
|
235585
235585
|
const minLen = getMinHashLength(fieldOrder);
|
235586
235586
|
if (len < 16 || len < minLen || len > 1024)
|
235587
235587
|
throw new Error("expected " + minLen + "-1024 bytes of input, got " + len);
|
235588
|
-
const num = isLE2 ? bytesToNumberLE(
|
235588
|
+
const num = isLE2 ? bytesToNumberLE(key3) : bytesToNumberBE(key3);
|
235589
235589
|
const reduced = mod(num, fieldOrder - _1n3) + _1n3;
|
235590
235590
|
return isLE2 ? numberToBytesLE(reduced, fieldLen) : numberToBytesBE(reduced, fieldLen);
|
235591
235591
|
}
|
@@ -235888,12 +235888,12 @@ function _legacyHelperEquat(Fp, a7, b4) {
|
|
235888
235888
|
}
|
235889
235889
|
function _legacyHelperNormPriv(Fn, allowedPrivateKeyLengths, wrapPrivateKey) {
|
235890
235890
|
const { BYTES: expected } = Fn;
|
235891
|
-
function normPrivateKeyToScalar(
|
235891
|
+
function normPrivateKeyToScalar(key3) {
|
235892
235892
|
let num;
|
235893
|
-
if (typeof
|
235894
|
-
num =
|
235893
|
+
if (typeof key3 === "bigint") {
|
235894
|
+
num = key3;
|
235895
235895
|
} else {
|
235896
|
-
let bytes = ensureBytes("private key",
|
235896
|
+
let bytes = ensureBytes("private key", key3);
|
235897
235897
|
if (allowedPrivateKeyLengths) {
|
235898
235898
|
if (!allowedPrivateKeyLengths.includes(bytes.length * 2))
|
235899
235899
|
throw new Error("invalid private key");
|
@@ -235904,7 +235904,7 @@ function _legacyHelperNormPriv(Fn, allowedPrivateKeyLengths, wrapPrivateKey) {
|
|
235904
235904
|
try {
|
235905
235905
|
num = Fn.fromBytes(bytes);
|
235906
235906
|
} catch (error44) {
|
235907
|
-
throw new Error(`invalid private key: expected ui8a of size ${expected}, got ${typeof
|
235907
|
+
throw new Error(`invalid private key: expected ui8a of size ${expected}, got ${typeof key3}`);
|
235908
235908
|
}
|
235909
235909
|
}
|
235910
235910
|
if (wrapPrivateKey)
|
@@ -236306,7 +236306,7 @@ function ecdsa(Point, ecdsaOpts, curveOpts = {}) {
|
|
236306
236306
|
bits2int_modN: "function"
|
236307
236307
|
});
|
236308
236308
|
const randomBytes_ = ecdsaOpts.randomBytes || randomBytes;
|
236309
|
-
const hmac_ = ecdsaOpts.hmac || ((
|
236309
|
+
const hmac_ = ecdsaOpts.hmac || ((key3, ...msgs) => hmac(ecdsaOpts.hash, key3, concatBytes(...msgs)));
|
236310
236310
|
const { Fp, Fn } = Point;
|
236311
236311
|
const { ORDER: CURVE_ORDER, BITS: fnBits } = Fn;
|
236312
236312
|
function isBiggerThanHalfOrder(number6) {
|
@@ -237464,11 +237464,11 @@ function extract2(value_, { format: format2 }) {
|
|
237464
237464
|
const value4 = {};
|
237465
237465
|
function extract_(formatted2) {
|
237466
237466
|
const keys = Object.keys(formatted2);
|
237467
|
-
for (const
|
237468
|
-
if (
|
237469
|
-
value4[
|
237470
|
-
if (formatted2[
|
237471
|
-
extract_(formatted2[
|
237467
|
+
for (const key3 of keys) {
|
237468
|
+
if (key3 in value_)
|
237469
|
+
value4[key3] = value_[key3];
|
237470
|
+
if (formatted2[key3] && typeof formatted2[key3] === "object" && !Array.isArray(formatted2[key3]))
|
237471
|
+
extract_(formatted2[key3]);
|
237472
237472
|
}
|
237473
237473
|
}
|
237474
237474
|
const formatted = format2(value_ || {});
|
@@ -237872,9 +237872,9 @@ var init_Errors = __esm(() => {
|
|
237872
237872
|
|
237873
237873
|
// ../../node_modules/ox/_esm/core/Json.js
|
237874
237874
|
function stringify4(value4, replacer, space) {
|
237875
|
-
return JSON.stringify(value4, (
|
237875
|
+
return JSON.stringify(value4, (key3, value5) => {
|
237876
237876
|
if (typeof replacer === "function")
|
237877
|
-
return replacer(
|
237877
|
+
return replacer(key3, value5);
|
237878
237878
|
if (typeof value5 === "bigint")
|
237879
237879
|
return value5.toString() + bigIntSuffix;
|
237880
237880
|
return value5;
|
@@ -239297,11 +239297,11 @@ var require_visit = __commonJS((exports) => {
|
|
239297
239297
|
visit2.BREAK = BREAK;
|
239298
239298
|
visit2.SKIP = SKIP;
|
239299
239299
|
visit2.REMOVE = REMOVE;
|
239300
|
-
function visit_(
|
239301
|
-
const ctrl = callVisitor(
|
239300
|
+
function visit_(key4, node, visitor, path7) {
|
239301
|
+
const ctrl = callVisitor(key4, node, visitor, path7);
|
239302
239302
|
if (identity2.isNode(ctrl) || identity2.isPair(ctrl)) {
|
239303
|
-
replaceNode(
|
239304
|
-
return visit_(
|
239303
|
+
replaceNode(key4, path7, ctrl);
|
239304
|
+
return visit_(key4, ctrl, visitor, path7);
|
239305
239305
|
}
|
239306
239306
|
if (typeof ctrl !== "symbol") {
|
239307
239307
|
if (identity2.isCollection(node)) {
|
@@ -239345,11 +239345,11 @@ var require_visit = __commonJS((exports) => {
|
|
239345
239345
|
visitAsync.BREAK = BREAK;
|
239346
239346
|
visitAsync.SKIP = SKIP;
|
239347
239347
|
visitAsync.REMOVE = REMOVE;
|
239348
|
-
async function visitAsync_(
|
239349
|
-
const ctrl = await callVisitor(
|
239348
|
+
async function visitAsync_(key4, node, visitor, path7) {
|
239349
|
+
const ctrl = await callVisitor(key4, node, visitor, path7);
|
239350
239350
|
if (identity2.isNode(ctrl) || identity2.isPair(ctrl)) {
|
239351
|
-
replaceNode(
|
239352
|
-
return visitAsync_(
|
239351
|
+
replaceNode(key4, path7, ctrl);
|
239352
|
+
return visitAsync_(key4, ctrl, visitor, path7);
|
239353
239353
|
}
|
239354
239354
|
if (typeof ctrl !== "symbol") {
|
239355
239355
|
if (identity2.isCollection(node)) {
|
@@ -239399,27 +239399,27 @@ var require_visit = __commonJS((exports) => {
|
|
239399
239399
|
}
|
239400
239400
|
return visitor;
|
239401
239401
|
}
|
239402
|
-
function callVisitor(
|
239402
|
+
function callVisitor(key4, node, visitor, path7) {
|
239403
239403
|
if (typeof visitor === "function")
|
239404
|
-
return visitor(
|
239404
|
+
return visitor(key4, node, path7);
|
239405
239405
|
if (identity2.isMap(node))
|
239406
|
-
return visitor.Map?.(
|
239406
|
+
return visitor.Map?.(key4, node, path7);
|
239407
239407
|
if (identity2.isSeq(node))
|
239408
|
-
return visitor.Seq?.(
|
239408
|
+
return visitor.Seq?.(key4, node, path7);
|
239409
239409
|
if (identity2.isPair(node))
|
239410
|
-
return visitor.Pair?.(
|
239410
|
+
return visitor.Pair?.(key4, node, path7);
|
239411
239411
|
if (identity2.isScalar(node))
|
239412
|
-
return visitor.Scalar?.(
|
239412
|
+
return visitor.Scalar?.(key4, node, path7);
|
239413
239413
|
if (identity2.isAlias(node))
|
239414
|
-
return visitor.Alias?.(
|
239414
|
+
return visitor.Alias?.(key4, node, path7);
|
239415
239415
|
return;
|
239416
239416
|
}
|
239417
|
-
function replaceNode(
|
239417
|
+
function replaceNode(key4, path7, node) {
|
239418
239418
|
const parent = path7[path7.length - 1];
|
239419
239419
|
if (identity2.isCollection(parent)) {
|
239420
|
-
parent.items[
|
239420
|
+
parent.items[key4] = node;
|
239421
239421
|
} else if (identity2.isPair(parent)) {
|
239422
|
-
if (
|
239422
|
+
if (key4 === "key")
|
239423
239423
|
parent.key = node;
|
239424
239424
|
else
|
239425
239425
|
parent.value = node;
|
@@ -239650,7 +239650,7 @@ var require_anchors = __commonJS((exports) => {
|
|
239650
239650
|
|
239651
239651
|
// ../../node_modules/yaml/dist/doc/applyReviver.js
|
239652
239652
|
var require_applyReviver = __commonJS((exports) => {
|
239653
|
-
function applyReviver(reviver, obj,
|
239653
|
+
function applyReviver(reviver, obj, key4, val) {
|
239654
239654
|
if (val && typeof val === "object") {
|
239655
239655
|
if (Array.isArray(val)) {
|
239656
239656
|
for (let i7 = 0, len = val.length;i7 < len; ++i7) {
|
@@ -239690,7 +239690,7 @@ var require_applyReviver = __commonJS((exports) => {
|
|
239690
239690
|
}
|
239691
239691
|
}
|
239692
239692
|
}
|
239693
|
-
return reviver.call(obj,
|
239693
|
+
return reviver.call(obj, key4, val);
|
239694
239694
|
}
|
239695
239695
|
exports.applyReviver = applyReviver;
|
239696
239696
|
});
|
@@ -240019,29 +240019,29 @@ var require_Collection = __commonJS((exports) => {
|
|
240019
240019
|
if (isEmptyPath(path7))
|
240020
240020
|
this.add(value4);
|
240021
240021
|
else {
|
240022
|
-
const [
|
240023
|
-
const node = this.get(
|
240022
|
+
const [key4, ...rest] = path7;
|
240023
|
+
const node = this.get(key4, true);
|
240024
240024
|
if (identity2.isCollection(node))
|
240025
240025
|
node.addIn(rest, value4);
|
240026
240026
|
else if (node === undefined && this.schema)
|
240027
|
-
this.set(
|
240027
|
+
this.set(key4, collectionFromPath(this.schema, rest, value4));
|
240028
240028
|
else
|
240029
|
-
throw new Error(`Expected YAML collection at ${
|
240029
|
+
throw new Error(`Expected YAML collection at ${key4}. Remaining path: ${rest}`);
|
240030
240030
|
}
|
240031
240031
|
}
|
240032
240032
|
deleteIn(path7) {
|
240033
|
-
const [
|
240033
|
+
const [key4, ...rest] = path7;
|
240034
240034
|
if (rest.length === 0)
|
240035
|
-
return this.delete(
|
240036
|
-
const node = this.get(
|
240035
|
+
return this.delete(key4);
|
240036
|
+
const node = this.get(key4, true);
|
240037
240037
|
if (identity2.isCollection(node))
|
240038
240038
|
return node.deleteIn(rest);
|
240039
240039
|
else
|
240040
|
-
throw new Error(`Expected YAML collection at ${
|
240040
|
+
throw new Error(`Expected YAML collection at ${key4}. Remaining path: ${rest}`);
|
240041
240041
|
}
|
240042
240042
|
getIn(path7, keepScalar) {
|
240043
|
-
const [
|
240044
|
-
const node = this.get(
|
240043
|
+
const [key4, ...rest] = path7;
|
240044
|
+
const node = this.get(key4, true);
|
240045
240045
|
if (rest.length === 0)
|
240046
240046
|
return !keepScalar && identity2.isScalar(node) ? node.value : node;
|
240047
240047
|
else
|
@@ -240056,24 +240056,24 @@ var require_Collection = __commonJS((exports) => {
|
|
240056
240056
|
});
|
240057
240057
|
}
|
240058
240058
|
hasIn(path7) {
|
240059
|
-
const [
|
240059
|
+
const [key4, ...rest] = path7;
|
240060
240060
|
if (rest.length === 0)
|
240061
|
-
return this.has(
|
240062
|
-
const node = this.get(
|
240061
|
+
return this.has(key4);
|
240062
|
+
const node = this.get(key4, true);
|
240063
240063
|
return identity2.isCollection(node) ? node.hasIn(rest) : false;
|
240064
240064
|
}
|
240065
240065
|
setIn(path7, value4) {
|
240066
|
-
const [
|
240066
|
+
const [key4, ...rest] = path7;
|
240067
240067
|
if (rest.length === 0) {
|
240068
|
-
this.set(
|
240068
|
+
this.set(key4, value4);
|
240069
240069
|
} else {
|
240070
|
-
const node = this.get(
|
240070
|
+
const node = this.get(key4, true);
|
240071
240071
|
if (identity2.isCollection(node))
|
240072
240072
|
node.setIn(rest, value4);
|
240073
240073
|
else if (node === undefined && this.schema)
|
240074
|
-
this.set(
|
240074
|
+
this.set(key4, collectionFromPath(this.schema, rest, value4));
|
240075
240075
|
else
|
240076
|
-
throw new Error(`Expected YAML collection at ${
|
240076
|
+
throw new Error(`Expected YAML collection at ${key4}. Remaining path: ${rest}`);
|
240077
240077
|
}
|
240078
240078
|
}
|
240079
240079
|
}
|
@@ -240660,19 +240660,19 @@ var require_stringifyPair = __commonJS((exports) => {
|
|
240660
240660
|
var Scalar = require_Scalar();
|
240661
240661
|
var stringify5 = require_stringify();
|
240662
240662
|
var stringifyComment = require_stringifyComment();
|
240663
|
-
function stringifyPair2({ key:
|
240663
|
+
function stringifyPair2({ key: key4, value: value4 }, ctx, onComment, onChompKeep) {
|
240664
240664
|
const { allNullValues, doc: doc2, indent: indent2, indentStep, options: { commentString, indentSeq, simpleKeys } } = ctx;
|
240665
|
-
let keyComment = identity2.isNode(
|
240665
|
+
let keyComment = identity2.isNode(key4) && key4.comment || null;
|
240666
240666
|
if (simpleKeys) {
|
240667
240667
|
if (keyComment) {
|
240668
240668
|
throw new Error("With simple keys, key nodes cannot have comments");
|
240669
240669
|
}
|
240670
|
-
if (identity2.isCollection(
|
240670
|
+
if (identity2.isCollection(key4) || !identity2.isNode(key4) && typeof key4 === "object") {
|
240671
240671
|
const msg = "With simple keys, collection cannot be used as a key value";
|
240672
240672
|
throw new Error(msg);
|
240673
240673
|
}
|
240674
240674
|
}
|
240675
|
-
let explicitKey = !simpleKeys && (!
|
240675
|
+
let explicitKey = !simpleKeys && (!key4 || keyComment && value4 == null && !ctx.inFlow || identity2.isCollection(key4) || (identity2.isScalar(key4) ? key4.type === Scalar.Scalar.BLOCK_FOLDED || key4.type === Scalar.Scalar.BLOCK_LITERAL : typeof key4 === "object"));
|
240676
240676
|
ctx = Object.assign({}, ctx, {
|
240677
240677
|
allNullValues: false,
|
240678
240678
|
implicitKey: !explicitKey && (simpleKeys || !allNullValues),
|
@@ -240680,7 +240680,7 @@ var require_stringifyPair = __commonJS((exports) => {
|
|
240680
240680
|
});
|
240681
240681
|
let keyCommentDone = false;
|
240682
240682
|
let chompKeep = false;
|
240683
|
-
let str = stringify5.stringify(
|
240683
|
+
let str = stringify5.stringify(key4, ctx, () => keyCommentDone = true, () => chompKeep = true);
|
240684
240684
|
if (!explicitKey && !ctx.inFlow && str.length > 1024) {
|
240685
240685
|
if (simpleKeys)
|
240686
240686
|
throw new Error("With simple keys, single line scalar must not span more than 1024 characters");
|
@@ -240824,7 +240824,7 @@ var require_merge = __commonJS((exports) => {
|
|
240824
240824
|
}),
|
240825
240825
|
stringify: () => MERGE_KEY
|
240826
240826
|
};
|
240827
|
-
var isMergeKey = (ctx,
|
240827
|
+
var isMergeKey = (ctx, key4) => (merge7.identify(key4) || identity2.isScalar(key4) && (!key4.type || key4.type === Scalar.Scalar.PLAIN) && merge7.identify(key4.value)) && ctx?.doc.schema.tags.some((tag) => tag.tag === merge7.tag && tag.default);
|
240828
240828
|
function addMergeToJSMap(ctx, map7, value4) {
|
240829
240829
|
value4 = ctx && identity2.isAlias(value4) ? value4.resolve(ctx.doc) : value4;
|
240830
240830
|
if (identity2.isSeq(value4))
|
@@ -240841,14 +240841,14 @@ var require_merge = __commonJS((exports) => {
|
|
240841
240841
|
if (!identity2.isMap(source))
|
240842
240842
|
throw new Error("Merge sources must be maps or map aliases");
|
240843
240843
|
const srcMap = source.toJSON(null, ctx, Map);
|
240844
|
-
for (const [
|
240844
|
+
for (const [key4, value5] of srcMap) {
|
240845
240845
|
if (map7 instanceof Map) {
|
240846
|
-
if (!map7.has(
|
240847
|
-
map7.set(
|
240846
|
+
if (!map7.has(key4))
|
240847
|
+
map7.set(key4, value5);
|
240848
240848
|
} else if (map7 instanceof Set) {
|
240849
|
-
map7.add(
|
240850
|
-
} else if (!Object.prototype.hasOwnProperty.call(map7,
|
240851
|
-
Object.defineProperty(map7,
|
240849
|
+
map7.add(key4);
|
240850
|
+
} else if (!Object.prototype.hasOwnProperty.call(map7, key4)) {
|
240851
|
+
Object.defineProperty(map7, key4, {
|
240852
240852
|
value: value5,
|
240853
240853
|
writable: true,
|
240854
240854
|
enumerable: true,
|
@@ -240870,19 +240870,19 @@ var require_addPairToJSMap = __commonJS((exports) => {
|
|
240870
240870
|
var stringify5 = require_stringify();
|
240871
240871
|
var identity2 = require_identity();
|
240872
240872
|
var toJS = require_toJS();
|
240873
|
-
function addPairToJSMap(ctx, map7, { key:
|
240874
|
-
if (identity2.isNode(
|
240875
|
-
|
240876
|
-
else if (merge7.isMergeKey(ctx,
|
240873
|
+
function addPairToJSMap(ctx, map7, { key: key4, value: value4 }) {
|
240874
|
+
if (identity2.isNode(key4) && key4.addToJSMap)
|
240875
|
+
key4.addToJSMap(ctx, map7, value4);
|
240876
|
+
else if (merge7.isMergeKey(ctx, key4))
|
240877
240877
|
merge7.addMergeToJSMap(ctx, map7, value4);
|
240878
240878
|
else {
|
240879
|
-
const jsKey = toJS.toJS(
|
240879
|
+
const jsKey = toJS.toJS(key4, "", ctx);
|
240880
240880
|
if (map7 instanceof Map) {
|
240881
240881
|
map7.set(jsKey, toJS.toJS(value4, jsKey, ctx));
|
240882
240882
|
} else if (map7 instanceof Set) {
|
240883
240883
|
map7.add(jsKey);
|
240884
240884
|
} else {
|
240885
|
-
const stringKey = stringifyKey(
|
240885
|
+
const stringKey = stringifyKey(key4, jsKey, ctx);
|
240886
240886
|
const jsValue = toJS.toJS(value4, stringKey, ctx);
|
240887
240887
|
if (stringKey in map7)
|
240888
240888
|
Object.defineProperty(map7, stringKey, {
|
@@ -240897,19 +240897,19 @@ var require_addPairToJSMap = __commonJS((exports) => {
|
|
240897
240897
|
}
|
240898
240898
|
return map7;
|
240899
240899
|
}
|
240900
|
-
function stringifyKey(
|
240900
|
+
function stringifyKey(key4, jsKey, ctx) {
|
240901
240901
|
if (jsKey === null)
|
240902
240902
|
return "";
|
240903
240903
|
if (typeof jsKey !== "object")
|
240904
240904
|
return String(jsKey);
|
240905
|
-
if (identity2.isNode(
|
240905
|
+
if (identity2.isNode(key4) && ctx?.doc) {
|
240906
240906
|
const strCtx = stringify5.createStringifyContext(ctx.doc, {});
|
240907
240907
|
strCtx.anchors = new Set;
|
240908
240908
|
for (const node of ctx.anchors.keys())
|
240909
240909
|
strCtx.anchors.add(node.anchor);
|
240910
240910
|
strCtx.inFlow = true;
|
240911
240911
|
strCtx.inStringifyKey = true;
|
240912
|
-
const strKey =
|
240912
|
+
const strKey = key4.toString(strCtx);
|
240913
240913
|
if (!ctx.mapKeyWarned) {
|
240914
240914
|
let jsonStr = JSON.stringify(strKey);
|
240915
240915
|
if (jsonStr.length > 40)
|
@@ -240930,25 +240930,25 @@ var require_Pair = __commonJS((exports) => {
|
|
240930
240930
|
var stringifyPair2 = require_stringifyPair();
|
240931
240931
|
var addPairToJSMap = require_addPairToJSMap();
|
240932
240932
|
var identity2 = require_identity();
|
240933
|
-
function createPair(
|
240934
|
-
const k6 = createNode.createNode(
|
240933
|
+
function createPair(key4, value4, ctx) {
|
240934
|
+
const k6 = createNode.createNode(key4, undefined, ctx);
|
240935
240935
|
const v7 = createNode.createNode(value4, undefined, ctx);
|
240936
240936
|
return new Pair(k6, v7);
|
240937
240937
|
}
|
240938
240938
|
|
240939
240939
|
class Pair {
|
240940
|
-
constructor(
|
240940
|
+
constructor(key4, value4 = null) {
|
240941
240941
|
Object.defineProperty(this, identity2.NODE_TYPE, { value: identity2.PAIR });
|
240942
|
-
this.key =
|
240942
|
+
this.key = key4;
|
240943
240943
|
this.value = value4;
|
240944
240944
|
}
|
240945
240945
|
clone(schema) {
|
240946
|
-
let { key:
|
240947
|
-
if (identity2.isNode(
|
240948
|
-
|
240946
|
+
let { key: key4, value: value4 } = this;
|
240947
|
+
if (identity2.isNode(key4))
|
240948
|
+
key4 = key4.clone(schema);
|
240949
240949
|
if (identity2.isNode(value4))
|
240950
240950
|
value4 = value4.clone(schema);
|
240951
|
-
return new Pair(
|
240951
|
+
return new Pair(key4, value4);
|
240952
240952
|
}
|
240953
240953
|
toJSON(_6, ctx) {
|
240954
240954
|
const pair = ctx?.mapAsMap ? new Map : {};
|
@@ -241115,11 +241115,11 @@ var require_YAMLMap = __commonJS((exports) => {
|
|
241115
241115
|
var identity2 = require_identity();
|
241116
241116
|
var Pair = require_Pair();
|
241117
241117
|
var Scalar = require_Scalar();
|
241118
|
-
function findPair(items,
|
241119
|
-
const k6 = identity2.isScalar(
|
241118
|
+
function findPair(items, key4) {
|
241119
|
+
const k6 = identity2.isScalar(key4) ? key4.value : key4;
|
241120
241120
|
for (const it2 of items) {
|
241121
241121
|
if (identity2.isPair(it2)) {
|
241122
|
-
if (it2.key ===
|
241122
|
+
if (it2.key === key4 || it2.key === k6)
|
241123
241123
|
return it2;
|
241124
241124
|
if (identity2.isScalar(it2.key) && it2.key.value === k6)
|
241125
241125
|
return it2;
|
@@ -241139,20 +241139,20 @@ var require_YAMLMap = __commonJS((exports) => {
|
|
241139
241139
|
static from(schema, obj, ctx) {
|
241140
241140
|
const { keepUndefined, replacer } = ctx;
|
241141
241141
|
const map7 = new this(schema);
|
241142
|
-
const add = (
|
241142
|
+
const add = (key4, value4) => {
|
241143
241143
|
if (typeof replacer === "function")
|
241144
|
-
value4 = replacer.call(obj,
|
241145
|
-
else if (Array.isArray(replacer) && !replacer.includes(
|
241144
|
+
value4 = replacer.call(obj, key4, value4);
|
241145
|
+
else if (Array.isArray(replacer) && !replacer.includes(key4))
|
241146
241146
|
return;
|
241147
241147
|
if (value4 !== undefined || keepUndefined)
|
241148
|
-
map7.items.push(Pair.createPair(
|
241148
|
+
map7.items.push(Pair.createPair(key4, value4, ctx));
|
241149
241149
|
};
|
241150
241150
|
if (obj instanceof Map) {
|
241151
|
-
for (const [
|
241152
|
-
add(
|
241151
|
+
for (const [key4, value4] of obj)
|
241152
|
+
add(key4, value4);
|
241153
241153
|
} else if (obj && typeof obj === "object") {
|
241154
|
-
for (const
|
241155
|
-
add(
|
241154
|
+
for (const key4 of Object.keys(obj))
|
241155
|
+
add(key4, obj[key4]);
|
241156
241156
|
}
|
241157
241157
|
if (typeof schema.sortMapEntries === "function") {
|
241158
241158
|
map7.items.sort(schema.sortMapEntries);
|
@@ -241186,23 +241186,23 @@ var require_YAMLMap = __commonJS((exports) => {
|
|
241186
241186
|
this.items.push(_pair);
|
241187
241187
|
}
|
241188
241188
|
}
|
241189
|
-
delete(
|
241190
|
-
const it2 = findPair(this.items,
|
241189
|
+
delete(key4) {
|
241190
|
+
const it2 = findPair(this.items, key4);
|
241191
241191
|
if (!it2)
|
241192
241192
|
return false;
|
241193
241193
|
const del = this.items.splice(this.items.indexOf(it2), 1);
|
241194
241194
|
return del.length > 0;
|
241195
241195
|
}
|
241196
|
-
get(
|
241197
|
-
const it2 = findPair(this.items,
|
241196
|
+
get(key4, keepScalar) {
|
241197
|
+
const it2 = findPair(this.items, key4);
|
241198
241198
|
const node = it2?.value;
|
241199
241199
|
return (!keepScalar && identity2.isScalar(node) ? node.value : node) ?? undefined;
|
241200
241200
|
}
|
241201
|
-
has(
|
241202
|
-
return !!findPair(this.items,
|
241201
|
+
has(key4) {
|
241202
|
+
return !!findPair(this.items, key4);
|
241203
241203
|
}
|
241204
|
-
set(
|
241205
|
-
this.add(new Pair.Pair(
|
241204
|
+
set(key4, value4) {
|
241205
|
+
this.add(new Pair.Pair(key4, value4), true);
|
241206
241206
|
}
|
241207
241207
|
toJSON(_6, ctx, Type) {
|
241208
241208
|
const map7 = Type ? new Type : ctx?.mapAsMap ? new Map : {};
|
@@ -241273,28 +241273,28 @@ var require_YAMLSeq = __commonJS((exports) => {
|
|
241273
241273
|
add(value4) {
|
241274
241274
|
this.items.push(value4);
|
241275
241275
|
}
|
241276
|
-
delete(
|
241277
|
-
const idx = asItemIndex(
|
241276
|
+
delete(key4) {
|
241277
|
+
const idx = asItemIndex(key4);
|
241278
241278
|
if (typeof idx !== "number")
|
241279
241279
|
return false;
|
241280
241280
|
const del = this.items.splice(idx, 1);
|
241281
241281
|
return del.length > 0;
|
241282
241282
|
}
|
241283
|
-
get(
|
241284
|
-
const idx = asItemIndex(
|
241283
|
+
get(key4, keepScalar) {
|
241284
|
+
const idx = asItemIndex(key4);
|
241285
241285
|
if (typeof idx !== "number")
|
241286
241286
|
return;
|
241287
241287
|
const it2 = this.items[idx];
|
241288
241288
|
return !keepScalar && identity2.isScalar(it2) ? it2.value : it2;
|
241289
241289
|
}
|
241290
|
-
has(
|
241291
|
-
const idx = asItemIndex(
|
241290
|
+
has(key4) {
|
241291
|
+
const idx = asItemIndex(key4);
|
241292
241292
|
return typeof idx === "number" && idx < this.items.length;
|
241293
241293
|
}
|
241294
|
-
set(
|
241295
|
-
const idx = asItemIndex(
|
241294
|
+
set(key4, value4) {
|
241295
|
+
const idx = asItemIndex(key4);
|
241296
241296
|
if (typeof idx !== "number")
|
241297
|
-
throw new Error(`Expected a valid index, not ${
|
241297
|
+
throw new Error(`Expected a valid index, not ${key4}.`);
|
241298
241298
|
const prev = this.items[idx];
|
241299
241299
|
if (identity2.isScalar(prev) && Scalar.isScalarValue(value4))
|
241300
241300
|
prev.value = value4;
|
@@ -241328,8 +241328,8 @@ var require_YAMLSeq = __commonJS((exports) => {
|
|
241328
241328
|
let i7 = 0;
|
241329
241329
|
for (let it2 of obj) {
|
241330
241330
|
if (typeof replacer === "function") {
|
241331
|
-
const
|
241332
|
-
it2 = replacer.call(obj,
|
241331
|
+
const key4 = obj instanceof Set ? it2 : String(i7++);
|
241332
|
+
it2 = replacer.call(obj, key4, it2);
|
241333
241333
|
}
|
241334
241334
|
seq.items.push(createNode.createNode(it2, undefined, ctx));
|
241335
241335
|
}
|
@@ -241337,8 +241337,8 @@ var require_YAMLSeq = __commonJS((exports) => {
|
|
241337
241337
|
return seq;
|
241338
241338
|
}
|
241339
241339
|
}
|
241340
|
-
function asItemIndex(
|
241341
|
-
let idx = identity2.isScalar(
|
241340
|
+
function asItemIndex(key4) {
|
241341
|
+
let idx = identity2.isScalar(key4) ? key4.value : key4;
|
241342
241342
|
if (idx && typeof idx === "string")
|
241343
241343
|
idx = Number(idx);
|
241344
241344
|
return typeof idx === "number" && Number.isInteger(idx) && idx >= 0 ? idx : null;
|
@@ -241711,25 +241711,25 @@ ${cn.comment}` : item.comment;
|
|
241711
241711
|
for (let it2 of iterable) {
|
241712
241712
|
if (typeof replacer === "function")
|
241713
241713
|
it2 = replacer.call(iterable, String(i7++), it2);
|
241714
|
-
let
|
241714
|
+
let key4, value4;
|
241715
241715
|
if (Array.isArray(it2)) {
|
241716
241716
|
if (it2.length === 2) {
|
241717
|
-
|
241717
|
+
key4 = it2[0];
|
241718
241718
|
value4 = it2[1];
|
241719
241719
|
} else
|
241720
241720
|
throw new TypeError(`Expected [key, value] tuple: ${it2}`);
|
241721
241721
|
} else if (it2 && it2 instanceof Object) {
|
241722
241722
|
const keys = Object.keys(it2);
|
241723
241723
|
if (keys.length === 1) {
|
241724
|
-
|
241725
|
-
value4 = it2[
|
241724
|
+
key4 = keys[0];
|
241725
|
+
value4 = it2[key4];
|
241726
241726
|
} else {
|
241727
241727
|
throw new TypeError(`Expected tuple with one key, not ${keys.length} keys`);
|
241728
241728
|
}
|
241729
241729
|
} else {
|
241730
|
-
|
241730
|
+
key4 = it2;
|
241731
241731
|
}
|
241732
|
-
pairs2.items.push(Pair.createPair(
|
241732
|
+
pairs2.items.push(Pair.createPair(key4, value4, ctx));
|
241733
241733
|
}
|
241734
241734
|
return pairs2;
|
241735
241735
|
}
|
@@ -241770,16 +241770,16 @@ var require_omap = __commonJS((exports) => {
|
|
241770
241770
|
if (ctx?.onCreate)
|
241771
241771
|
ctx.onCreate(map7);
|
241772
241772
|
for (const pair of this.items) {
|
241773
|
-
let
|
241773
|
+
let key4, value4;
|
241774
241774
|
if (identity2.isPair(pair)) {
|
241775
|
-
|
241776
|
-
value4 = toJS.toJS(pair.value,
|
241775
|
+
key4 = toJS.toJS(pair.key, "", ctx);
|
241776
|
+
value4 = toJS.toJS(pair.value, key4, ctx);
|
241777
241777
|
} else {
|
241778
|
-
|
241778
|
+
key4 = toJS.toJS(pair, "", ctx);
|
241779
241779
|
}
|
241780
|
-
if (map7.has(
|
241780
|
+
if (map7.has(key4))
|
241781
241781
|
throw new Error("Ordered maps must not include duplicate keys");
|
241782
|
-
map7.set(
|
241782
|
+
map7.set(key4, value4);
|
241783
241783
|
}
|
241784
241784
|
return map7;
|
241785
241785
|
}
|
@@ -241800,12 +241800,12 @@ var require_omap = __commonJS((exports) => {
|
|
241800
241800
|
resolve(seq, onError) {
|
241801
241801
|
const pairs$1 = pairs.resolvePairs(seq, onError);
|
241802
241802
|
const seenKeys = [];
|
241803
|
-
for (const { key:
|
241804
|
-
if (identity2.isScalar(
|
241805
|
-
if (seenKeys.includes(
|
241806
|
-
onError(`Ordered maps must not include duplicate keys: ${
|
241803
|
+
for (const { key: key4 } of pairs$1.items) {
|
241804
|
+
if (identity2.isScalar(key4)) {
|
241805
|
+
if (seenKeys.includes(key4.value)) {
|
241806
|
+
onError(`Ordered maps must not include duplicate keys: ${key4.value}`);
|
241807
241807
|
} else {
|
241808
|
-
seenKeys.push(
|
241808
|
+
seenKeys.push(key4.value);
|
241809
241809
|
}
|
241810
241810
|
}
|
241811
241811
|
}
|
@@ -241979,30 +241979,30 @@ var require_set = __commonJS((exports) => {
|
|
241979
241979
|
super(schema);
|
241980
241980
|
this.tag = YAMLSet.tag;
|
241981
241981
|
}
|
241982
|
-
add(
|
241982
|
+
add(key4) {
|
241983
241983
|
let pair;
|
241984
|
-
if (identity2.isPair(
|
241985
|
-
pair =
|
241986
|
-
else if (
|
241987
|
-
pair = new Pair.Pair(
|
241984
|
+
if (identity2.isPair(key4))
|
241985
|
+
pair = key4;
|
241986
|
+
else if (key4 && typeof key4 === "object" && "key" in key4 && "value" in key4 && key4.value === null)
|
241987
|
+
pair = new Pair.Pair(key4.key, null);
|
241988
241988
|
else
|
241989
|
-
pair = new Pair.Pair(
|
241989
|
+
pair = new Pair.Pair(key4, null);
|
241990
241990
|
const prev = YAMLMap.findPair(this.items, pair.key);
|
241991
241991
|
if (!prev)
|
241992
241992
|
this.items.push(pair);
|
241993
241993
|
}
|
241994
|
-
get(
|
241995
|
-
const pair = YAMLMap.findPair(this.items,
|
241994
|
+
get(key4, keepPair) {
|
241995
|
+
const pair = YAMLMap.findPair(this.items, key4);
|
241996
241996
|
return !keepPair && identity2.isPair(pair) ? identity2.isScalar(pair.key) ? pair.key.value : pair.key : pair;
|
241997
241997
|
}
|
241998
|
-
set(
|
241998
|
+
set(key4, value4) {
|
241999
241999
|
if (typeof value4 !== "boolean")
|
242000
242000
|
throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof value4}`);
|
242001
|
-
const prev = YAMLMap.findPair(this.items,
|
242001
|
+
const prev = YAMLMap.findPair(this.items, key4);
|
242002
242002
|
if (prev && !value4) {
|
242003
242003
|
this.items.splice(this.items.indexOf(prev), 1);
|
242004
242004
|
} else if (!prev && value4) {
|
242005
|
-
this.items.push(new Pair.Pair(
|
242005
|
+
this.items.push(new Pair.Pair(key4));
|
242006
242006
|
}
|
242007
242007
|
}
|
242008
242008
|
toJSON(_6, ctx) {
|
@@ -242237,7 +242237,7 @@ var require_tags = __commonJS((exports) => {
|
|
242237
242237
|
if (Array.isArray(customTags))
|
242238
242238
|
tags = [];
|
242239
242239
|
else {
|
242240
|
-
const keys = Array.from(schemas3.keys()).filter((
|
242240
|
+
const keys = Array.from(schemas3.keys()).filter((key4) => key4 !== "yaml11").map((key4) => JSON.stringify(key4)).join(", ");
|
242241
242241
|
throw new Error(`Unknown schema "${schemaName}"; use one of ${keys} or define customTags array`);
|
242242
242242
|
}
|
242243
242243
|
}
|
@@ -242253,7 +242253,7 @@ var require_tags = __commonJS((exports) => {
|
|
242253
242253
|
const tagObj = typeof tag === "string" ? tagsByName[tag] : tag;
|
242254
242254
|
if (!tagObj) {
|
242255
242255
|
const tagName = JSON.stringify(tag);
|
242256
|
-
const keys = Object.keys(tagsByName).map((
|
242256
|
+
const keys = Object.keys(tagsByName).map((key4) => JSON.stringify(key4)).join(", ");
|
242257
242257
|
throw new Error(`Unknown custom tag ${tagName}; use one of ${keys}`);
|
242258
242258
|
}
|
242259
242259
|
if (!tags2.includes(tagObj))
|
@@ -242488,13 +242488,13 @@ var require_Document = __commonJS((exports) => {
|
|
242488
242488
|
setAnchors();
|
242489
242489
|
return node;
|
242490
242490
|
}
|
242491
|
-
createPair(
|
242492
|
-
const k6 = this.createNode(
|
242491
|
+
createPair(key4, value4, options = {}) {
|
242492
|
+
const k6 = this.createNode(key4, null, options);
|
242493
242493
|
const v7 = this.createNode(value4, null, options);
|
242494
242494
|
return new Pair.Pair(k6, v7);
|
242495
242495
|
}
|
242496
|
-
delete(
|
242497
|
-
return assertCollection(this.contents) ? this.contents.delete(
|
242496
|
+
delete(key4) {
|
242497
|
+
return assertCollection(this.contents) ? this.contents.delete(key4) : false;
|
242498
242498
|
}
|
242499
242499
|
deleteIn(path7) {
|
242500
242500
|
if (Collection.isEmptyPath(path7)) {
|
@@ -242505,27 +242505,27 @@ var require_Document = __commonJS((exports) => {
|
|
242505
242505
|
}
|
242506
242506
|
return assertCollection(this.contents) ? this.contents.deleteIn(path7) : false;
|
242507
242507
|
}
|
242508
|
-
get(
|
242509
|
-
return identity2.isCollection(this.contents) ? this.contents.get(
|
242508
|
+
get(key4, keepScalar) {
|
242509
|
+
return identity2.isCollection(this.contents) ? this.contents.get(key4, keepScalar) : undefined;
|
242510
242510
|
}
|
242511
242511
|
getIn(path7, keepScalar) {
|
242512
242512
|
if (Collection.isEmptyPath(path7))
|
242513
242513
|
return !keepScalar && identity2.isScalar(this.contents) ? this.contents.value : this.contents;
|
242514
242514
|
return identity2.isCollection(this.contents) ? this.contents.getIn(path7, keepScalar) : undefined;
|
242515
242515
|
}
|
242516
|
-
has(
|
242517
|
-
return identity2.isCollection(this.contents) ? this.contents.has(
|
242516
|
+
has(key4) {
|
242517
|
+
return identity2.isCollection(this.contents) ? this.contents.has(key4) : false;
|
242518
242518
|
}
|
242519
242519
|
hasIn(path7) {
|
242520
242520
|
if (Collection.isEmptyPath(path7))
|
242521
242521
|
return this.contents !== undefined;
|
242522
242522
|
return identity2.isCollection(this.contents) ? this.contents.hasIn(path7) : false;
|
242523
242523
|
}
|
242524
|
-
set(
|
242524
|
+
set(key4, value4) {
|
242525
242525
|
if (this.contents == null) {
|
242526
|
-
this.contents = Collection.collectionFromPath(this.schema, [
|
242526
|
+
this.contents = Collection.collectionFromPath(this.schema, [key4], value4);
|
242527
242527
|
} else if (assertCollection(this.contents)) {
|
242528
|
-
this.contents.set(
|
242528
|
+
this.contents.set(key4, value4);
|
242529
242529
|
}
|
242530
242530
|
}
|
242531
242531
|
setIn(path7, value4) {
|
@@ -242807,25 +242807,25 @@ var require_resolve_props = __commonJS((exports) => {
|
|
242807
242807
|
|
242808
242808
|
// ../../node_modules/yaml/dist/compose/util-contains-newline.js
|
242809
242809
|
var require_util_contains_newline = __commonJS((exports) => {
|
242810
|
-
function containsNewline(
|
242811
|
-
if (!
|
242810
|
+
function containsNewline(key4) {
|
242811
|
+
if (!key4)
|
242812
242812
|
return null;
|
242813
|
-
switch (
|
242813
|
+
switch (key4.type) {
|
242814
242814
|
case "alias":
|
242815
242815
|
case "scalar":
|
242816
242816
|
case "double-quoted-scalar":
|
242817
242817
|
case "single-quoted-scalar":
|
242818
|
-
if (
|
242818
|
+
if (key4.source.includes(`
|
242819
242819
|
`))
|
242820
242820
|
return true;
|
242821
|
-
if (
|
242822
|
-
for (const st2 of
|
242821
|
+
if (key4.end) {
|
242822
|
+
for (const st2 of key4.end)
|
242823
242823
|
if (st2.type === "newline")
|
242824
242824
|
return true;
|
242825
242825
|
}
|
242826
242826
|
return false;
|
242827
242827
|
case "flow-collection":
|
242828
|
-
for (const it2 of
|
242828
|
+
for (const it2 of key4.items) {
|
242829
242829
|
for (const st2 of it2.start)
|
242830
242830
|
if (st2.type === "newline")
|
242831
242831
|
return true;
|
@@ -242890,10 +242890,10 @@ var require_resolve_block_map = __commonJS((exports) => {
|
|
242890
242890
|
let offset = bm.offset;
|
242891
242891
|
let commentEnd = null;
|
242892
242892
|
for (const collItem of bm.items) {
|
242893
|
-
const { start: start3, key:
|
242893
|
+
const { start: start3, key: key4, sep: sep5, value: value4 } = collItem;
|
242894
242894
|
const keyProps = resolveProps.resolveProps(start3, {
|
242895
242895
|
indicator: "explicit-key-ind",
|
242896
|
-
next:
|
242896
|
+
next: key4 ?? sep5?.[0],
|
242897
242897
|
offset,
|
242898
242898
|
onError,
|
242899
242899
|
parentIndent: bm.indent,
|
@@ -242901,10 +242901,10 @@ var require_resolve_block_map = __commonJS((exports) => {
|
|
242901
242901
|
});
|
242902
242902
|
const implicitKey = !keyProps.found;
|
242903
242903
|
if (implicitKey) {
|
242904
|
-
if (
|
242905
|
-
if (
|
242904
|
+
if (key4) {
|
242905
|
+
if (key4.type === "block-seq")
|
242906
242906
|
onError(offset, "BLOCK_AS_IMPLICIT_KEY", "A block sequence may not be used as an implicit map key");
|
242907
|
-
else if ("indent" in
|
242907
|
+
else if ("indent" in key4 && key4.indent !== bm.indent)
|
242908
242908
|
onError(offset, "BAD_INDENT", startColMsg);
|
242909
242909
|
}
|
242910
242910
|
if (!keyProps.anchor && !keyProps.tag && !sep5) {
|
@@ -242918,17 +242918,17 @@ var require_resolve_block_map = __commonJS((exports) => {
|
|
242918
242918
|
}
|
242919
242919
|
continue;
|
242920
242920
|
}
|
242921
|
-
if (keyProps.newlineAfterProp || utilContainsNewline.containsNewline(
|
242922
|
-
onError(
|
242921
|
+
if (keyProps.newlineAfterProp || utilContainsNewline.containsNewline(key4)) {
|
242922
|
+
onError(key4 ?? start3[start3.length - 1], "MULTILINE_IMPLICIT_KEY", "Implicit keys need to be on a single line");
|
242923
242923
|
}
|
242924
242924
|
} else if (keyProps.found?.indent !== bm.indent) {
|
242925
242925
|
onError(offset, "BAD_INDENT", startColMsg);
|
242926
242926
|
}
|
242927
242927
|
ctx.atKey = true;
|
242928
242928
|
const keyStart = keyProps.end;
|
242929
|
-
const keyNode =
|
242929
|
+
const keyNode = key4 ? composeNode(ctx, key4, keyProps, onError) : composeEmptyNode(ctx, keyStart, start3, null, keyProps, onError);
|
242930
242930
|
if (ctx.schema.compat)
|
242931
|
-
utilFlowIndentCheck.flowIndentCheck(bm.indent,
|
242931
|
+
utilFlowIndentCheck.flowIndentCheck(bm.indent, key4, onError);
|
242932
242932
|
ctx.atKey = false;
|
242933
242933
|
if (utilMapIncludes.mapIncludes(ctx, map7.items, keyNode))
|
242934
242934
|
onError(keyStart, "DUPLICATE_KEY", "Map keys must be unique");
|
@@ -242938,7 +242938,7 @@ var require_resolve_block_map = __commonJS((exports) => {
|
|
242938
242938
|
offset: keyNode.range[2],
|
242939
242939
|
onError,
|
242940
242940
|
parentIndent: bm.indent,
|
242941
|
-
startOnNewline: !
|
242941
|
+
startOnNewline: !key4 || key4.type === "block-scalar"
|
242942
242942
|
});
|
242943
242943
|
offset = valueProps.end;
|
242944
242944
|
if (valueProps.found) {
|
@@ -243094,11 +243094,11 @@ var require_resolve_flow_collection = __commonJS((exports) => {
|
|
243094
243094
|
let offset = fc.offset + fc.start.source.length;
|
243095
243095
|
for (let i7 = 0;i7 < fc.items.length; ++i7) {
|
243096
243096
|
const collItem = fc.items[i7];
|
243097
|
-
const { start: start3, key:
|
243097
|
+
const { start: start3, key: key4, sep: sep5, value: value4 } = collItem;
|
243098
243098
|
const props = resolveProps.resolveProps(start3, {
|
243099
243099
|
flow: fcName,
|
243100
243100
|
indicator: "explicit-key-ind",
|
243101
|
-
next:
|
243101
|
+
next: key4 ?? sep5?.[0],
|
243102
243102
|
offset,
|
243103
243103
|
onError,
|
243104
243104
|
parentIndent: fc.indent,
|
@@ -243120,8 +243120,8 @@ var require_resolve_flow_collection = __commonJS((exports) => {
|
|
243120
243120
|
offset = props.end;
|
243121
243121
|
continue;
|
243122
243122
|
}
|
243123
|
-
if (!isMap && ctx.options.strict && utilContainsNewline.containsNewline(
|
243124
|
-
onError(
|
243123
|
+
if (!isMap && ctx.options.strict && utilContainsNewline.containsNewline(key4))
|
243124
|
+
onError(key4, "MULTILINE_IMPLICIT_KEY", "Implicit keys of flow sequence pairs need to be on a single line");
|
243125
243125
|
}
|
243126
243126
|
if (i7 === 0) {
|
243127
243127
|
if (props.comma)
|
@@ -243166,8 +243166,8 @@ var require_resolve_flow_collection = __commonJS((exports) => {
|
|
243166
243166
|
} else {
|
243167
243167
|
ctx.atKey = true;
|
243168
243168
|
const keyStart = props.end;
|
243169
|
-
const keyNode =
|
243170
|
-
if (isBlock(
|
243169
|
+
const keyNode = key4 ? composeNode(ctx, key4, props, onError) : composeEmptyNode(ctx, keyStart, start3, null, props, onError);
|
243170
|
+
if (isBlock(key4))
|
243171
243171
|
onError(keyNode.range, "BLOCK_IN_FLOW", blockMsg);
|
243172
243172
|
ctx.atKey = false;
|
243173
243173
|
const valueProps = resolveProps.resolveProps(sep5 ?? [], {
|
@@ -243978,7 +243978,7 @@ var require_composer = __commonJS((exports) => {
|
|
243978
243978
|
var node_process = __require("process");
|
243979
243979
|
var directives4 = require_directives2();
|
243980
243980
|
var Document = require_Document();
|
243981
|
-
var
|
243981
|
+
var errors6 = require_errors3();
|
243982
243982
|
var identity2 = require_identity();
|
243983
243983
|
var composeDoc = require_compose_doc();
|
243984
243984
|
var resolveEnd = require_resolve_end();
|
@@ -244029,9 +244029,9 @@ var require_composer = __commonJS((exports) => {
|
|
244029
244029
|
this.onError = (source, code2, message, warning) => {
|
244030
244030
|
const pos = getErrorPos(source);
|
244031
244031
|
if (warning)
|
244032
|
-
this.warnings.push(new
|
244032
|
+
this.warnings.push(new errors6.YAMLWarning(pos, code2, message));
|
244033
244033
|
else
|
244034
|
-
this.errors.push(new
|
244034
|
+
this.errors.push(new errors6.YAMLParseError(pos, code2, message));
|
244035
244035
|
};
|
244036
244036
|
this.directives = new directives4.Directives({ version: options.version || "1.2" });
|
244037
244037
|
this.options = options;
|
@@ -244115,7 +244115,7 @@ ${cb}` : comment;
|
|
244115
244115
|
break;
|
244116
244116
|
case "error": {
|
244117
244117
|
const msg = token.source ? `${token.message}: ${JSON.stringify(token.source)}` : token.message;
|
244118
|
-
const error45 = new
|
244118
|
+
const error45 = new errors6.YAMLParseError(getErrorPos(token), "UNEXPECTED_TOKEN", msg);
|
244119
244119
|
if (this.atDirectives || !this.doc)
|
244120
244120
|
this.errors.push(error45);
|
244121
244121
|
else
|
@@ -244125,7 +244125,7 @@ ${cb}` : comment;
|
|
244125
244125
|
case "doc-end": {
|
244126
244126
|
if (!this.doc) {
|
244127
244127
|
const msg = "Unexpected doc-end without preceding document";
|
244128
|
-
this.errors.push(new
|
244128
|
+
this.errors.push(new errors6.YAMLParseError(getErrorPos(token), "UNEXPECTED_TOKEN", msg));
|
244129
244129
|
break;
|
244130
244130
|
}
|
244131
244131
|
this.doc.directives.docEnd = true;
|
@@ -244140,7 +244140,7 @@ ${end.comment}` : end.comment;
|
|
244140
244140
|
break;
|
244141
244141
|
}
|
244142
244142
|
default:
|
244143
|
-
this.errors.push(new
|
244143
|
+
this.errors.push(new errors6.YAMLParseError(getErrorPos(token), "UNEXPECTED_TOKEN", `Unsupported token ${token.type}`));
|
244144
244144
|
}
|
244145
244145
|
}
|
244146
244146
|
*end(forceDoc = false, endOffset = -1) {
|
@@ -244166,7 +244166,7 @@ ${end.comment}` : end.comment;
|
|
244166
244166
|
var require_cst_scalar = __commonJS((exports) => {
|
244167
244167
|
var resolveBlockScalar = require_resolve_block_scalar();
|
244168
244168
|
var resolveFlowScalar = require_resolve_flow_scalar();
|
244169
|
-
var
|
244169
|
+
var errors6 = require_errors3();
|
244170
244170
|
var stringifyString = require_stringifyString();
|
244171
244171
|
function resolveAsScalar(token, strict = true, onError) {
|
244172
244172
|
if (token) {
|
@@ -244175,7 +244175,7 @@ var require_cst_scalar = __commonJS((exports) => {
|
|
244175
244175
|
if (onError)
|
244176
244176
|
onError(offset, code2, message);
|
244177
244177
|
else
|
244178
|
-
throw new
|
244178
|
+
throw new errors6.YAMLParseError([offset, offset + 1], code2, message);
|
244179
244179
|
};
|
244180
244180
|
switch (token.type) {
|
244181
244181
|
case "scalar":
|
@@ -244289,9 +244289,9 @@ var require_cst_scalar = __commonJS((exports) => {
|
|
244289
244289
|
if (!addEndtoBlockProps(props, "end" in token ? token.end : undefined))
|
244290
244290
|
props.push({ type: "newline", offset: -1, indent: indent2, source: `
|
244291
244291
|
` });
|
244292
|
-
for (const
|
244293
|
-
if (
|
244294
|
-
delete token[
|
244292
|
+
for (const key4 of Object.keys(token))
|
244293
|
+
if (key4 !== "type" && key4 !== "offset")
|
244294
|
+
delete token[key4];
|
244295
244295
|
Object.assign(token, { type: "block-scalar", indent: indent2, props, source: body });
|
244296
244296
|
}
|
244297
244297
|
}
|
@@ -244340,9 +244340,9 @@ var require_cst_scalar = __commonJS((exports) => {
|
|
244340
244340
|
default: {
|
244341
244341
|
const indent2 = "indent" in token ? token.indent : -1;
|
244342
244342
|
const end = "end" in token && Array.isArray(token.end) ? token.end.filter((st2) => st2.type === "space" || st2.type === "comment" || st2.type === "newline") : [];
|
244343
|
-
for (const
|
244344
|
-
if (
|
244345
|
-
delete token[
|
244343
|
+
for (const key4 of Object.keys(token))
|
244344
|
+
if (key4 !== "type" && key4 !== "offset")
|
244345
|
+
delete token[key4];
|
244346
244346
|
Object.assign(token, { type: type4, indent: indent2, source, end });
|
244347
244347
|
}
|
244348
244348
|
}
|
@@ -244394,12 +244394,12 @@ var require_cst_stringify = __commonJS((exports) => {
|
|
244394
244394
|
}
|
244395
244395
|
}
|
244396
244396
|
}
|
244397
|
-
function stringifyItem({ start: start3, key:
|
244397
|
+
function stringifyItem({ start: start3, key: key4, sep: sep5, value: value4 }) {
|
244398
244398
|
let res = "";
|
244399
244399
|
for (const st2 of start3)
|
244400
244400
|
res += st2.source;
|
244401
|
-
if (
|
244402
|
-
res += stringifyToken(
|
244401
|
+
if (key4)
|
244402
|
+
res += stringifyToken(key4);
|
244403
244403
|
if (sep5)
|
244404
244404
|
for (const st2 of sep5)
|
244405
244405
|
res += st2.source;
|
@@ -245695,7 +245695,7 @@ var require_parser2 = __commonJS((exports) => {
|
|
245695
245695
|
});
|
245696
245696
|
} else if (isFlowToken(it2.key) && !includesToken(it2.sep, "newline")) {
|
245697
245697
|
const start4 = getFirstKeyStartProps(it2.start);
|
245698
|
-
const
|
245698
|
+
const key4 = it2.key;
|
245699
245699
|
const sep5 = it2.sep;
|
245700
245700
|
sep5.push(this.sourceToken);
|
245701
245701
|
delete it2.key;
|
@@ -245704,7 +245704,7 @@ var require_parser2 = __commonJS((exports) => {
|
|
245704
245704
|
type: "block-map",
|
245705
245705
|
offset: this.offset,
|
245706
245706
|
indent: this.indent,
|
245707
|
-
items: [{ start: start4, key:
|
245707
|
+
items: [{ start: start4, key: key4, sep: sep5 }]
|
245708
245708
|
});
|
245709
245709
|
} else if (start3.length > 0) {
|
245710
245710
|
it2.sep = it2.sep.concat(start3, this.sourceToken);
|
@@ -246037,7 +246037,7 @@ var require_parser2 = __commonJS((exports) => {
|
|
246037
246037
|
var require_public_api = __commonJS((exports) => {
|
246038
246038
|
var composer = require_composer();
|
246039
246039
|
var Document = require_Document();
|
246040
|
-
var
|
246040
|
+
var errors6 = require_errors3();
|
246041
246041
|
var log = require_log();
|
246042
246042
|
var identity2 = require_identity();
|
246043
246043
|
var lineCounter = require_line_counter();
|
@@ -246054,8 +246054,8 @@ var require_public_api = __commonJS((exports) => {
|
|
246054
246054
|
const docs = Array.from(composer$1.compose(parser$1.parse(source)));
|
246055
246055
|
if (prettyErrors && lineCounter2)
|
246056
246056
|
for (const doc2 of docs) {
|
246057
|
-
doc2.errors.forEach(
|
246058
|
-
doc2.warnings.forEach(
|
246057
|
+
doc2.errors.forEach(errors6.prettifyError(source, lineCounter2));
|
246058
|
+
doc2.warnings.forEach(errors6.prettifyError(source, lineCounter2));
|
246059
246059
|
}
|
246060
246060
|
if (docs.length > 0)
|
246061
246061
|
return docs;
|
@@ -246070,13 +246070,13 @@ var require_public_api = __commonJS((exports) => {
|
|
246070
246070
|
if (!doc2)
|
246071
246071
|
doc2 = _doc;
|
246072
246072
|
else if (doc2.options.logLevel !== "silent") {
|
246073
|
-
doc2.errors.push(new
|
246073
|
+
doc2.errors.push(new errors6.YAMLParseError(_doc.range.slice(0, 2), "MULTIPLE_DOCS", "Source contains multiple documents; please use YAML.parseAllDocuments()"));
|
246074
246074
|
break;
|
246075
246075
|
}
|
246076
246076
|
}
|
246077
246077
|
if (prettyErrors && lineCounter2) {
|
246078
|
-
doc2.errors.forEach(
|
246079
|
-
doc2.warnings.forEach(
|
246078
|
+
doc2.errors.forEach(errors6.prettifyError(source, lineCounter2));
|
246079
|
+
doc2.warnings.forEach(errors6.prettifyError(source, lineCounter2));
|
246080
246080
|
}
|
246081
246081
|
return doc2;
|
246082
246082
|
}
|
@@ -246144,6 +246144,7 @@ var {
|
|
246144
246144
|
} = import__.default;
|
246145
246145
|
|
246146
246146
|
// ../../node_modules/@inquirer/core/dist/esm/lib/key.js
|
246147
|
+
var isBackspaceKey = (key) => key.name === "backspace";
|
246147
246148
|
var isEnterKey = (key) => key.name === "enter" || key.name === "return";
|
246148
246149
|
// ../../node_modules/@inquirer/core/dist/esm/lib/errors.js
|
246149
246150
|
class AbortPromptError extends Error {
|
@@ -264988,7 +264989,7 @@ function pruneCurrentEnv(currentEnv, env2) {
|
|
264988
264989
|
var package_default = {
|
264989
264990
|
name: "@settlemint/sdk-cli",
|
264990
264991
|
description: "Command-line interface for SettleMint SDK, providing development tools and project management capabilities",
|
264991
|
-
version: "2.5.1-
|
264992
|
+
version: "2.5.1-main25184ec2",
|
264992
264993
|
type: "module",
|
264993
264994
|
private: false,
|
264994
264995
|
license: "FSL-1.1-MIT",
|
@@ -265036,13 +265037,13 @@ var package_default = {
|
|
265036
265037
|
"@commander-js/extra-typings": "14.0.0",
|
265037
265038
|
commander: "14.0.0",
|
265038
265039
|
"@inquirer/confirm": "5.1.14",
|
265039
|
-
"@inquirer/input": "4.2.
|
265040
|
+
"@inquirer/input": "4.2.1",
|
265040
265041
|
"@inquirer/password": "4.0.16",
|
265041
265042
|
"@inquirer/select": "4.2.4",
|
265042
|
-
"@settlemint/sdk-hasura": "2.5.1-
|
265043
|
-
"@settlemint/sdk-js": "2.5.1-
|
265044
|
-
"@settlemint/sdk-utils": "2.5.1-
|
265045
|
-
"@settlemint/sdk-viem": "2.5.1-
|
265043
|
+
"@settlemint/sdk-hasura": "2.5.1-main25184ec2",
|
265044
|
+
"@settlemint/sdk-js": "2.5.1-main25184ec2",
|
265045
|
+
"@settlemint/sdk-utils": "2.5.1-main25184ec2",
|
265046
|
+
"@settlemint/sdk-viem": "2.5.1-main25184ec2",
|
265046
265047
|
"@types/node": "24.0.15",
|
265047
265048
|
"@types/semver": "7.7.0",
|
265048
265049
|
"@types/which": "3.0.4",
|
@@ -303164,10 +303165,103 @@ function sanitizeName(value4, length = 35) {
|
|
303164
303165
|
}).slice(0, length).replaceAll(/(^\d*)/g, "").replaceAll(/(-$)/g, "").replaceAll(/(^-)/g, "");
|
303165
303166
|
}
|
303166
303167
|
|
303167
|
-
// ../../node_modules/@inquirer/input/
|
303168
|
-
var
|
303168
|
+
// ../../node_modules/@inquirer/input/dist/esm/index.js
|
303169
|
+
var inputTheme = {
|
303170
|
+
validationFailureMode: "keep"
|
303171
|
+
};
|
303172
|
+
var esm_default2 = createPrompt((config4, done) => {
|
303173
|
+
const { required: required4, validate: validate3 = () => true, prefill = "tab" } = config4;
|
303174
|
+
const theme = makeTheme(inputTheme, config4.theme);
|
303175
|
+
const [status, setStatus] = useState("idle");
|
303176
|
+
const [defaultValue = "", setDefaultValue] = useState(config4.default);
|
303177
|
+
const [errorMsg, setError] = useState();
|
303178
|
+
const [value4, setValue] = useState("");
|
303179
|
+
const prefix = usePrefix({ status, theme });
|
303180
|
+
useKeypress(async (key2, rl) => {
|
303181
|
+
if (status !== "idle") {
|
303182
|
+
return;
|
303183
|
+
}
|
303184
|
+
if (isEnterKey(key2)) {
|
303185
|
+
const answer = value4 || defaultValue;
|
303186
|
+
setStatus("loading");
|
303187
|
+
const isValid = required4 && !answer ? "You must provide a value" : await validate3(answer);
|
303188
|
+
if (isValid === true) {
|
303189
|
+
setValue(answer);
|
303190
|
+
setStatus("done");
|
303191
|
+
done(answer);
|
303192
|
+
} else {
|
303193
|
+
if (theme.validationFailureMode === "clear") {
|
303194
|
+
setValue("");
|
303195
|
+
} else {
|
303196
|
+
rl.write(value4);
|
303197
|
+
}
|
303198
|
+
setError(isValid || "You must provide a valid value");
|
303199
|
+
setStatus("idle");
|
303200
|
+
}
|
303201
|
+
} else if (isBackspaceKey(key2) && !value4) {
|
303202
|
+
setDefaultValue(undefined);
|
303203
|
+
} else if (key2.name === "tab" && !value4) {
|
303204
|
+
setDefaultValue(undefined);
|
303205
|
+
rl.clearLine(0);
|
303206
|
+
rl.write(defaultValue);
|
303207
|
+
setValue(defaultValue);
|
303208
|
+
} else {
|
303209
|
+
setValue(rl.line);
|
303210
|
+
setError(undefined);
|
303211
|
+
}
|
303212
|
+
});
|
303213
|
+
useEffect((rl) => {
|
303214
|
+
if (prefill === "editable" && defaultValue) {
|
303215
|
+
rl.write(defaultValue);
|
303216
|
+
setValue(defaultValue);
|
303217
|
+
}
|
303218
|
+
}, []);
|
303219
|
+
const message = theme.style.message(config4.message, status);
|
303220
|
+
let formattedValue = value4;
|
303221
|
+
if (typeof config4.transformer === "function") {
|
303222
|
+
formattedValue = config4.transformer(value4, { isFinal: status === "done" });
|
303223
|
+
} else if (status === "done") {
|
303224
|
+
formattedValue = theme.style.answer(value4);
|
303225
|
+
}
|
303226
|
+
let defaultStr;
|
303227
|
+
if (defaultValue && status !== "done" && !value4) {
|
303228
|
+
defaultStr = theme.style.defaultAnswer(defaultValue);
|
303229
|
+
}
|
303230
|
+
let error44 = "";
|
303231
|
+
if (errorMsg) {
|
303232
|
+
error44 = theme.style.error(errorMsg);
|
303233
|
+
}
|
303234
|
+
return [
|
303235
|
+
[prefix, message, defaultStr, formattedValue].filter((v6) => v6 !== undefined).join(" "),
|
303236
|
+
error44
|
303237
|
+
];
|
303238
|
+
});
|
303239
|
+
|
303240
|
+
// src/prompts/smart-contract-set/subgraph-name.prompt.ts
|
303241
|
+
async function subgraphNamePrompt({
|
303242
|
+
defaultName,
|
303243
|
+
env: env2,
|
303244
|
+
accept
|
303245
|
+
}) {
|
303246
|
+
const defaultSubgraphName = defaultName ? sanitizeName(defaultName) : undefined;
|
303247
|
+
if (accept) {
|
303248
|
+
return defaultSubgraphName ?? env2.SETTLEMINT_THEGRAPH_DEFAULT_SUBGRAPH;
|
303249
|
+
}
|
303250
|
+
const subgraphName = await esm_default2({
|
303251
|
+
message: "What is the name of your subgraph?",
|
303252
|
+
default: defaultSubgraphName,
|
303253
|
+
required: true
|
303254
|
+
});
|
303255
|
+
return sanitizeName(subgraphName);
|
303256
|
+
}
|
303257
|
+
|
303258
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/key.js
|
303259
|
+
var isUpKey = (key2) => key2.name === "up" || key2.name === "k" || key2.ctrl && key2.name === "p";
|
303260
|
+
var isDownKey = (key2) => key2.name === "down" || key2.name === "j" || key2.ctrl && key2.name === "n";
|
303261
|
+
var isBackspaceKey2 = (key2) => key2.name === "backspace";
|
303262
|
+
var isNumberKey = (key2) => "1234567890".includes(key2.name);
|
303169
303263
|
var isEnterKey2 = (key2) => key2.name === "enter" || key2.name === "return";
|
303170
|
-
// ../../node_modules/@inquirer/
|
303264
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/errors.js
|
303171
303265
|
class AbortPromptError2 extends Error {
|
303172
303266
|
name = "AbortPromptError";
|
303173
303267
|
message = "Prompt was aborted";
|
@@ -303193,10 +303287,10 @@ class HookError2 extends Error {
|
|
303193
303287
|
class ValidationError2 extends Error {
|
303194
303288
|
name = "ValidationError";
|
303195
303289
|
}
|
303196
|
-
// ../../node_modules/@inquirer/
|
303290
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/use-state.js
|
303197
303291
|
import { AsyncResource as AsyncResource5 } from "node:async_hooks";
|
303198
303292
|
|
303199
|
-
// ../../node_modules/@inquirer/
|
303293
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/hook-engine.js
|
303200
303294
|
import { AsyncLocalStorage as AsyncLocalStorage2, AsyncResource as AsyncResource4 } from "node:async_hooks";
|
303201
303295
|
var hookStorage2 = new AsyncLocalStorage2;
|
303202
303296
|
function createStore2(rl) {
|
@@ -303301,7 +303395,7 @@ var effectScheduler2 = {
|
|
303301
303395
|
}
|
303302
303396
|
};
|
303303
303397
|
|
303304
|
-
// ../../node_modules/@inquirer/
|
303398
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/use-state.js
|
303305
303399
|
function useState2(defaultValue) {
|
303306
303400
|
return withPointer2((pointer) => {
|
303307
303401
|
const setState = AsyncResource5.bind(function setState(newValue) {
|
@@ -303319,7 +303413,7 @@ function useState2(defaultValue) {
|
|
303319
303413
|
});
|
303320
303414
|
}
|
303321
303415
|
|
303322
|
-
// ../../node_modules/@inquirer/
|
303416
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/use-effect.js
|
303323
303417
|
function useEffect2(cb, depArray) {
|
303324
303418
|
withPointer2((pointer) => {
|
303325
303419
|
const oldDeps = pointer.get();
|
@@ -303331,7 +303425,7 @@ function useEffect2(cb, depArray) {
|
|
303331
303425
|
});
|
303332
303426
|
}
|
303333
303427
|
|
303334
|
-
// ../../node_modules/@inquirer/
|
303428
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/theme.js
|
303335
303429
|
var import_yoctocolors_cjs2 = __toESM(require_yoctocolors_cjs(), 1);
|
303336
303430
|
|
303337
303431
|
// ../../node_modules/@inquirer/figures/dist/esm/index.js
|
@@ -303617,14 +303711,14 @@ var fallbackSymbols2 = {
|
|
303617
303711
|
};
|
303618
303712
|
var shouldUseMain2 = isUnicodeSupported3();
|
303619
303713
|
var figures2 = shouldUseMain2 ? mainSymbols2 : fallbackSymbols2;
|
303620
|
-
var
|
303714
|
+
var esm_default3 = figures2;
|
303621
303715
|
var replacements2 = Object.entries(specialMainSymbols2);
|
303622
303716
|
|
303623
|
-
// ../../node_modules/@inquirer/
|
303717
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/theme.js
|
303624
303718
|
var defaultTheme2 = {
|
303625
303719
|
prefix: {
|
303626
303720
|
idle: import_yoctocolors_cjs2.default.blue("?"),
|
303627
|
-
done: import_yoctocolors_cjs2.default.green(
|
303721
|
+
done: import_yoctocolors_cjs2.default.green(esm_default3.tick)
|
303628
303722
|
},
|
303629
303723
|
spinner: {
|
303630
303724
|
interval: 80,
|
@@ -303641,7 +303735,7 @@ var defaultTheme2 = {
|
|
303641
303735
|
}
|
303642
303736
|
};
|
303643
303737
|
|
303644
|
-
// ../../node_modules/@inquirer/
|
303738
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/make-theme.js
|
303645
303739
|
function isPlainObject6(value4) {
|
303646
303740
|
if (typeof value4 !== "object" || value4 === null)
|
303647
303741
|
return false;
|
@@ -303669,7 +303763,7 @@ function makeTheme2(...themes) {
|
|
303669
303763
|
return deepMerge3(...themesToMerge);
|
303670
303764
|
}
|
303671
303765
|
|
303672
|
-
// ../../node_modules/@inquirer/
|
303766
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/use-prefix.js
|
303673
303767
|
function usePrefix2({ status = "idle", theme }) {
|
303674
303768
|
const [showLoader, setShowLoader] = useState2(false);
|
303675
303769
|
const [tick, setTick] = useState2(0);
|
@@ -303699,559 +303793,9 @@ function usePrefix2({ status = "idle", theme }) {
|
|
303699
303793
|
const iconName = status === "loading" ? "idle" : status;
|
303700
303794
|
return typeof prefix === "string" ? prefix : prefix[iconName] ?? prefix["idle"];
|
303701
303795
|
}
|
303702
|
-
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/use-ref.js
|
303703
|
-
function useRef2(val) {
|
303704
|
-
return useState2({ current: val })[0];
|
303705
|
-
}
|
303706
|
-
|
303707
|
-
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/use-keypress.js
|
303708
|
-
function useKeypress2(userHandler) {
|
303709
|
-
const signal = useRef2(userHandler);
|
303710
|
-
signal.current = userHandler;
|
303711
|
-
useEffect2((rl) => {
|
303712
|
-
let ignore = false;
|
303713
|
-
const handler = withUpdates2((_input, event) => {
|
303714
|
-
if (ignore)
|
303715
|
-
return;
|
303716
|
-
signal.current(event, rl);
|
303717
|
-
});
|
303718
|
-
rl.input.on("keypress", handler);
|
303719
|
-
return () => {
|
303720
|
-
ignore = true;
|
303721
|
-
rl.input.removeListener("keypress", handler);
|
303722
|
-
};
|
303723
|
-
}, []);
|
303724
|
-
}
|
303725
|
-
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/utils.js
|
303726
|
-
var import_cli_width2 = __toESM(require_cli_width(), 1);
|
303727
|
-
var import_wrap_ansi2 = __toESM(require_wrap_ansi(), 1);
|
303728
|
-
function breakLines2(content, width) {
|
303729
|
-
return content.split(`
|
303730
|
-
`).flatMap((line) => import_wrap_ansi2.default(line, width, { trim: false, hard: true }).split(`
|
303731
|
-
`).map((str) => str.trimEnd())).join(`
|
303732
|
-
`);
|
303733
|
-
}
|
303734
|
-
function readlineWidth2() {
|
303735
|
-
return import_cli_width2.default({ defaultWidth: 80, output: readline3().output });
|
303736
|
-
}
|
303737
|
-
|
303738
|
-
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
|
303739
|
-
var import_mute_stream2 = __toESM(require_lib(), 1);
|
303740
|
-
import * as readline4 from "node:readline";
|
303741
|
-
import { AsyncResource as AsyncResource6 } from "node:async_hooks";
|
303742
|
-
|
303743
|
-
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/screen-manager.js
|
303744
|
-
var import_ansi_escapes2 = __toESM(require_ansi_escapes(), 1);
|
303745
|
-
import { stripVTControlCharacters as stripVTControlCharacters3 } from "node:util";
|
303746
|
-
var height2 = (content) => content.split(`
|
303747
|
-
`).length;
|
303748
|
-
var lastLine2 = (content) => content.split(`
|
303749
|
-
`).pop() ?? "";
|
303750
|
-
function cursorDown2(n6) {
|
303751
|
-
return n6 > 0 ? import_ansi_escapes2.default.cursorDown(n6) : "";
|
303752
|
-
}
|
303753
|
-
|
303754
|
-
class ScreenManager2 {
|
303755
|
-
height = 0;
|
303756
|
-
extraLinesUnderPrompt = 0;
|
303757
|
-
cursorPos;
|
303758
|
-
rl;
|
303759
|
-
constructor(rl) {
|
303760
|
-
this.rl = rl;
|
303761
|
-
this.cursorPos = rl.getCursorPos();
|
303762
|
-
}
|
303763
|
-
write(content) {
|
303764
|
-
this.rl.output.unmute();
|
303765
|
-
this.rl.output.write(content);
|
303766
|
-
this.rl.output.mute();
|
303767
|
-
}
|
303768
|
-
render(content, bottomContent = "") {
|
303769
|
-
const promptLine = lastLine2(content);
|
303770
|
-
const rawPromptLine = stripVTControlCharacters3(promptLine);
|
303771
|
-
let prompt = rawPromptLine;
|
303772
|
-
if (this.rl.line.length > 0) {
|
303773
|
-
prompt = prompt.slice(0, -this.rl.line.length);
|
303774
|
-
}
|
303775
|
-
this.rl.setPrompt(prompt);
|
303776
|
-
this.cursorPos = this.rl.getCursorPos();
|
303777
|
-
const width = readlineWidth2();
|
303778
|
-
content = breakLines2(content, width);
|
303779
|
-
bottomContent = breakLines2(bottomContent, width);
|
303780
|
-
if (rawPromptLine.length % width === 0) {
|
303781
|
-
content += `
|
303782
|
-
`;
|
303783
|
-
}
|
303784
|
-
let output = content + (bottomContent ? `
|
303785
|
-
` + bottomContent : "");
|
303786
|
-
const promptLineUpDiff = Math.floor(rawPromptLine.length / width) - this.cursorPos.rows;
|
303787
|
-
const bottomContentHeight = promptLineUpDiff + (bottomContent ? height2(bottomContent) : 0);
|
303788
|
-
if (bottomContentHeight > 0)
|
303789
|
-
output += import_ansi_escapes2.default.cursorUp(bottomContentHeight);
|
303790
|
-
output += import_ansi_escapes2.default.cursorTo(this.cursorPos.cols);
|
303791
|
-
this.write(cursorDown2(this.extraLinesUnderPrompt) + import_ansi_escapes2.default.eraseLines(this.height) + output);
|
303792
|
-
this.extraLinesUnderPrompt = bottomContentHeight;
|
303793
|
-
this.height = height2(output);
|
303794
|
-
}
|
303795
|
-
checkCursorPos() {
|
303796
|
-
const cursorPos = this.rl.getCursorPos();
|
303797
|
-
if (cursorPos.cols !== this.cursorPos.cols) {
|
303798
|
-
this.write(import_ansi_escapes2.default.cursorTo(cursorPos.cols));
|
303799
|
-
this.cursorPos = cursorPos;
|
303800
|
-
}
|
303801
|
-
}
|
303802
|
-
done({ clearContent }) {
|
303803
|
-
this.rl.setPrompt("");
|
303804
|
-
let output = cursorDown2(this.extraLinesUnderPrompt);
|
303805
|
-
output += clearContent ? import_ansi_escapes2.default.eraseLines(this.height) : `
|
303806
|
-
`;
|
303807
|
-
output += import_ansi_escapes2.default.cursorShow;
|
303808
|
-
this.write(output);
|
303809
|
-
this.rl.close();
|
303810
|
-
}
|
303811
|
-
}
|
303812
|
-
|
303813
|
-
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/promise-polyfill.js
|
303814
|
-
class PromisePolyfill2 extends Promise {
|
303815
|
-
static withResolver() {
|
303816
|
-
let resolve5;
|
303817
|
-
let reject;
|
303818
|
-
const promise4 = new Promise((res, rej) => {
|
303819
|
-
resolve5 = res;
|
303820
|
-
reject = rej;
|
303821
|
-
});
|
303822
|
-
return { promise: promise4, resolve: resolve5, reject };
|
303823
|
-
}
|
303824
|
-
}
|
303825
|
-
|
303826
|
-
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
|
303827
|
-
function getCallSites2() {
|
303828
|
-
const _prepareStackTrace = Error.prepareStackTrace;
|
303829
|
-
let result = [];
|
303830
|
-
try {
|
303831
|
-
Error.prepareStackTrace = (_5, callSites) => {
|
303832
|
-
const callSitesWithoutCurrent = callSites.slice(1);
|
303833
|
-
result = callSitesWithoutCurrent;
|
303834
|
-
return callSitesWithoutCurrent;
|
303835
|
-
};
|
303836
|
-
new Error().stack;
|
303837
|
-
} catch {
|
303838
|
-
return result;
|
303839
|
-
}
|
303840
|
-
Error.prepareStackTrace = _prepareStackTrace;
|
303841
|
-
return result;
|
303842
|
-
}
|
303843
|
-
function createPrompt2(view) {
|
303844
|
-
const callSites = getCallSites2();
|
303845
|
-
const prompt = (config4, context = {}) => {
|
303846
|
-
const { input = process.stdin, signal } = context;
|
303847
|
-
const cleanups = new Set;
|
303848
|
-
const output = new import_mute_stream2.default;
|
303849
|
-
output.pipe(context.output ?? process.stdout);
|
303850
|
-
const rl = readline4.createInterface({
|
303851
|
-
terminal: true,
|
303852
|
-
input,
|
303853
|
-
output
|
303854
|
-
});
|
303855
|
-
const screen = new ScreenManager2(rl);
|
303856
|
-
const { promise: promise4, resolve: resolve5, reject } = PromisePolyfill2.withResolver();
|
303857
|
-
const cancel3 = () => reject(new CancelPromptError2);
|
303858
|
-
if (signal) {
|
303859
|
-
const abort = () => reject(new AbortPromptError2({ cause: signal.reason }));
|
303860
|
-
if (signal.aborted) {
|
303861
|
-
abort();
|
303862
|
-
return Object.assign(promise4, { cancel: cancel3 });
|
303863
|
-
}
|
303864
|
-
signal.addEventListener("abort", abort);
|
303865
|
-
cleanups.add(() => signal.removeEventListener("abort", abort));
|
303866
|
-
}
|
303867
|
-
cleanups.add(onExit((code2, signal2) => {
|
303868
|
-
reject(new ExitPromptError2(`User force closed the prompt with ${code2} ${signal2}`));
|
303869
|
-
}));
|
303870
|
-
const sigint = () => reject(new ExitPromptError2(`User force closed the prompt with SIGINT`));
|
303871
|
-
rl.on("SIGINT", sigint);
|
303872
|
-
cleanups.add(() => rl.removeListener("SIGINT", sigint));
|
303873
|
-
const checkCursorPos = () => screen.checkCursorPos();
|
303874
|
-
rl.input.on("keypress", checkCursorPos);
|
303875
|
-
cleanups.add(() => rl.input.removeListener("keypress", checkCursorPos));
|
303876
|
-
return withHooks2(rl, (cycle) => {
|
303877
|
-
const hooksCleanup = AsyncResource6.bind(() => effectScheduler2.clearAll());
|
303878
|
-
rl.on("close", hooksCleanup);
|
303879
|
-
cleanups.add(() => rl.removeListener("close", hooksCleanup));
|
303880
|
-
cycle(() => {
|
303881
|
-
try {
|
303882
|
-
const nextView = view(config4, (value4) => {
|
303883
|
-
setImmediate(() => resolve5(value4));
|
303884
|
-
});
|
303885
|
-
if (nextView === undefined) {
|
303886
|
-
const callerFilename = callSites[1]?.getFileName();
|
303887
|
-
throw new Error(`Prompt functions must return a string.
|
303888
|
-
at ${callerFilename}`);
|
303889
|
-
}
|
303890
|
-
const [content, bottomContent] = typeof nextView === "string" ? [nextView] : nextView;
|
303891
|
-
screen.render(content, bottomContent);
|
303892
|
-
effectScheduler2.run();
|
303893
|
-
} catch (error44) {
|
303894
|
-
reject(error44);
|
303895
|
-
}
|
303896
|
-
});
|
303897
|
-
return Object.assign(promise4.then((answer) => {
|
303898
|
-
effectScheduler2.clearAll();
|
303899
|
-
return answer;
|
303900
|
-
}, (error44) => {
|
303901
|
-
effectScheduler2.clearAll();
|
303902
|
-
throw error44;
|
303903
|
-
}).finally(() => {
|
303904
|
-
cleanups.forEach((cleanup) => cleanup());
|
303905
|
-
screen.done({ clearContent: Boolean(context.clearPromptOnDone) });
|
303906
|
-
output.end();
|
303907
|
-
}).then(() => promise4), { cancel: cancel3 });
|
303908
|
-
});
|
303909
|
-
};
|
303910
|
-
return prompt;
|
303911
|
-
}
|
303912
|
-
// ../../node_modules/@inquirer/input/dist/esm/index.js
|
303913
|
-
var inputTheme = {
|
303914
|
-
validationFailureMode: "keep"
|
303915
|
-
};
|
303916
|
-
var esm_default3 = createPrompt2((config4, done) => {
|
303917
|
-
const { required: required4, validate: validate3 = () => true, prefill = "tab" } = config4;
|
303918
|
-
const theme = makeTheme2(inputTheme, config4.theme);
|
303919
|
-
const [status, setStatus] = useState2("idle");
|
303920
|
-
const [defaultValue = "", setDefaultValue] = useState2(config4.default);
|
303921
|
-
const [errorMsg, setError] = useState2();
|
303922
|
-
const [value4, setValue] = useState2("");
|
303923
|
-
const prefix = usePrefix2({ status, theme });
|
303924
|
-
useKeypress2(async (key3, rl) => {
|
303925
|
-
if (status !== "idle") {
|
303926
|
-
return;
|
303927
|
-
}
|
303928
|
-
if (isEnterKey2(key3)) {
|
303929
|
-
const answer = value4 || defaultValue;
|
303930
|
-
setStatus("loading");
|
303931
|
-
const isValid = required4 && !answer ? "You must provide a value" : await validate3(answer);
|
303932
|
-
if (isValid === true) {
|
303933
|
-
setValue(answer);
|
303934
|
-
setStatus("done");
|
303935
|
-
done(answer);
|
303936
|
-
} else {
|
303937
|
-
if (theme.validationFailureMode === "clear") {
|
303938
|
-
setValue("");
|
303939
|
-
} else {
|
303940
|
-
rl.write(value4);
|
303941
|
-
}
|
303942
|
-
setError(isValid || "You must provide a valid value");
|
303943
|
-
setStatus("idle");
|
303944
|
-
}
|
303945
|
-
} else if (isBackspaceKey(key3) && !value4) {
|
303946
|
-
setDefaultValue(undefined);
|
303947
|
-
} else if (key3.name === "tab" && !value4) {
|
303948
|
-
setDefaultValue(undefined);
|
303949
|
-
rl.clearLine(0);
|
303950
|
-
rl.write(defaultValue);
|
303951
|
-
setValue(defaultValue);
|
303952
|
-
} else {
|
303953
|
-
setValue(rl.line);
|
303954
|
-
setError(undefined);
|
303955
|
-
}
|
303956
|
-
});
|
303957
|
-
useEffect2((rl) => {
|
303958
|
-
if (prefill === "editable" && defaultValue) {
|
303959
|
-
rl.write(defaultValue);
|
303960
|
-
setValue(defaultValue);
|
303961
|
-
}
|
303962
|
-
}, []);
|
303963
|
-
const message = theme.style.message(config4.message, status);
|
303964
|
-
let formattedValue = value4;
|
303965
|
-
if (typeof config4.transformer === "function") {
|
303966
|
-
formattedValue = config4.transformer(value4, { isFinal: status === "done" });
|
303967
|
-
} else if (status === "done") {
|
303968
|
-
formattedValue = theme.style.answer(value4);
|
303969
|
-
}
|
303970
|
-
let defaultStr;
|
303971
|
-
if (defaultValue && status !== "done" && !value4) {
|
303972
|
-
defaultStr = theme.style.defaultAnswer(defaultValue);
|
303973
|
-
}
|
303974
|
-
let error44 = "";
|
303975
|
-
if (errorMsg) {
|
303976
|
-
error44 = theme.style.error(errorMsg);
|
303977
|
-
}
|
303978
|
-
return [
|
303979
|
-
[prefix, message, defaultStr, formattedValue].filter((v6) => v6 !== undefined).join(" "),
|
303980
|
-
error44
|
303981
|
-
];
|
303982
|
-
});
|
303983
|
-
|
303984
|
-
// src/prompts/smart-contract-set/subgraph-name.prompt.ts
|
303985
|
-
async function subgraphNamePrompt({
|
303986
|
-
defaultName,
|
303987
|
-
env: env2,
|
303988
|
-
accept
|
303989
|
-
}) {
|
303990
|
-
const defaultSubgraphName = defaultName ? sanitizeName(defaultName) : undefined;
|
303991
|
-
if (accept) {
|
303992
|
-
return defaultSubgraphName ?? env2.SETTLEMINT_THEGRAPH_DEFAULT_SUBGRAPH;
|
303993
|
-
}
|
303994
|
-
const subgraphName = await esm_default3({
|
303995
|
-
message: "What is the name of your subgraph?",
|
303996
|
-
default: defaultSubgraphName,
|
303997
|
-
required: true
|
303998
|
-
});
|
303999
|
-
return sanitizeName(subgraphName);
|
304000
|
-
}
|
304001
|
-
|
304002
|
-
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/key.js
|
304003
|
-
var isUpKey = (key3) => key3.name === "up" || key3.name === "k" || key3.ctrl && key3.name === "p";
|
304004
|
-
var isDownKey = (key3) => key3.name === "down" || key3.name === "j" || key3.ctrl && key3.name === "n";
|
304005
|
-
var isBackspaceKey2 = (key3) => key3.name === "backspace";
|
304006
|
-
var isNumberKey = (key3) => "1234567890".includes(key3.name);
|
304007
|
-
var isEnterKey3 = (key3) => key3.name === "enter" || key3.name === "return";
|
304008
|
-
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/errors.js
|
304009
|
-
class AbortPromptError3 extends Error {
|
304010
|
-
name = "AbortPromptError";
|
304011
|
-
message = "Prompt was aborted";
|
304012
|
-
constructor(options) {
|
304013
|
-
super();
|
304014
|
-
this.cause = options?.cause;
|
304015
|
-
}
|
304016
|
-
}
|
304017
|
-
|
304018
|
-
class CancelPromptError3 extends Error {
|
304019
|
-
name = "CancelPromptError";
|
304020
|
-
message = "Prompt was canceled";
|
304021
|
-
}
|
304022
|
-
|
304023
|
-
class ExitPromptError3 extends Error {
|
304024
|
-
name = "ExitPromptError";
|
304025
|
-
}
|
304026
|
-
|
304027
|
-
class HookError3 extends Error {
|
304028
|
-
name = "HookError";
|
304029
|
-
}
|
304030
|
-
|
304031
|
-
class ValidationError3 extends Error {
|
304032
|
-
name = "ValidationError";
|
304033
|
-
}
|
304034
|
-
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/use-state.js
|
304035
|
-
import { AsyncResource as AsyncResource8 } from "node:async_hooks";
|
304036
|
-
|
304037
|
-
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/hook-engine.js
|
304038
|
-
import { AsyncLocalStorage as AsyncLocalStorage3, AsyncResource as AsyncResource7 } from "node:async_hooks";
|
304039
|
-
var hookStorage3 = new AsyncLocalStorage3;
|
304040
|
-
function createStore3(rl) {
|
304041
|
-
const store = {
|
304042
|
-
rl,
|
304043
|
-
hooks: [],
|
304044
|
-
hooksCleanup: [],
|
304045
|
-
hooksEffect: [],
|
304046
|
-
index: 0,
|
304047
|
-
handleChange() {}
|
304048
|
-
};
|
304049
|
-
return store;
|
304050
|
-
}
|
304051
|
-
function withHooks3(rl, cb) {
|
304052
|
-
const store = createStore3(rl);
|
304053
|
-
return hookStorage3.run(store, () => {
|
304054
|
-
function cycle(render) {
|
304055
|
-
store.handleChange = () => {
|
304056
|
-
store.index = 0;
|
304057
|
-
render();
|
304058
|
-
};
|
304059
|
-
store.handleChange();
|
304060
|
-
}
|
304061
|
-
return cb(cycle);
|
304062
|
-
});
|
304063
|
-
}
|
304064
|
-
function getStore3() {
|
304065
|
-
const store = hookStorage3.getStore();
|
304066
|
-
if (!store) {
|
304067
|
-
throw new HookError3("[Inquirer] Hook functions can only be called from within a prompt");
|
304068
|
-
}
|
304069
|
-
return store;
|
304070
|
-
}
|
304071
|
-
function readline5() {
|
304072
|
-
return getStore3().rl;
|
304073
|
-
}
|
304074
|
-
function withUpdates3(fn) {
|
304075
|
-
const wrapped = (...args) => {
|
304076
|
-
const store = getStore3();
|
304077
|
-
let shouldUpdate = false;
|
304078
|
-
const oldHandleChange = store.handleChange;
|
304079
|
-
store.handleChange = () => {
|
304080
|
-
shouldUpdate = true;
|
304081
|
-
};
|
304082
|
-
const returnValue = fn(...args);
|
304083
|
-
if (shouldUpdate) {
|
304084
|
-
oldHandleChange();
|
304085
|
-
}
|
304086
|
-
store.handleChange = oldHandleChange;
|
304087
|
-
return returnValue;
|
304088
|
-
};
|
304089
|
-
return AsyncResource7.bind(wrapped);
|
304090
|
-
}
|
304091
|
-
function withPointer3(cb) {
|
304092
|
-
const store = getStore3();
|
304093
|
-
const { index } = store;
|
304094
|
-
const pointer = {
|
304095
|
-
get() {
|
304096
|
-
return store.hooks[index];
|
304097
|
-
},
|
304098
|
-
set(value4) {
|
304099
|
-
store.hooks[index] = value4;
|
304100
|
-
},
|
304101
|
-
initialized: index in store.hooks
|
304102
|
-
};
|
304103
|
-
const returnValue = cb(pointer);
|
304104
|
-
store.index++;
|
304105
|
-
return returnValue;
|
304106
|
-
}
|
304107
|
-
function handleChange3() {
|
304108
|
-
getStore3().handleChange();
|
304109
|
-
}
|
304110
|
-
var effectScheduler3 = {
|
304111
|
-
queue(cb) {
|
304112
|
-
const store = getStore3();
|
304113
|
-
const { index } = store;
|
304114
|
-
store.hooksEffect.push(() => {
|
304115
|
-
store.hooksCleanup[index]?.();
|
304116
|
-
const cleanFn = cb(readline5());
|
304117
|
-
if (cleanFn != null && typeof cleanFn !== "function") {
|
304118
|
-
throw new ValidationError3("useEffect return value must be a cleanup function or nothing.");
|
304119
|
-
}
|
304120
|
-
store.hooksCleanup[index] = cleanFn;
|
304121
|
-
});
|
304122
|
-
},
|
304123
|
-
run() {
|
304124
|
-
const store = getStore3();
|
304125
|
-
withUpdates3(() => {
|
304126
|
-
store.hooksEffect.forEach((effect) => {
|
304127
|
-
effect();
|
304128
|
-
});
|
304129
|
-
store.hooksEffect.length = 0;
|
304130
|
-
})();
|
304131
|
-
},
|
304132
|
-
clearAll() {
|
304133
|
-
const store = getStore3();
|
304134
|
-
store.hooksCleanup.forEach((cleanFn) => {
|
304135
|
-
cleanFn?.();
|
304136
|
-
});
|
304137
|
-
store.hooksEffect.length = 0;
|
304138
|
-
store.hooksCleanup.length = 0;
|
304139
|
-
}
|
304140
|
-
};
|
304141
|
-
|
304142
|
-
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/use-state.js
|
304143
|
-
function useState3(defaultValue) {
|
304144
|
-
return withPointer3((pointer) => {
|
304145
|
-
const setState = AsyncResource8.bind(function setState(newValue) {
|
304146
|
-
if (pointer.get() !== newValue) {
|
304147
|
-
pointer.set(newValue);
|
304148
|
-
handleChange3();
|
304149
|
-
}
|
304150
|
-
});
|
304151
|
-
if (pointer.initialized) {
|
304152
|
-
return [pointer.get(), setState];
|
304153
|
-
}
|
304154
|
-
const value4 = typeof defaultValue === "function" ? defaultValue() : defaultValue;
|
304155
|
-
pointer.set(value4);
|
304156
|
-
return [value4, setState];
|
304157
|
-
});
|
304158
|
-
}
|
304159
|
-
|
304160
|
-
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/use-effect.js
|
304161
|
-
function useEffect3(cb, depArray) {
|
304162
|
-
withPointer3((pointer) => {
|
304163
|
-
const oldDeps = pointer.get();
|
304164
|
-
const hasChanged = !Array.isArray(oldDeps) || depArray.some((dep, i6) => !Object.is(dep, oldDeps[i6]));
|
304165
|
-
if (hasChanged) {
|
304166
|
-
effectScheduler3.queue(cb);
|
304167
|
-
}
|
304168
|
-
pointer.set(depArray);
|
304169
|
-
});
|
304170
|
-
}
|
304171
|
-
|
304172
|
-
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/theme.js
|
304173
|
-
var import_yoctocolors_cjs3 = __toESM(require_yoctocolors_cjs(), 1);
|
304174
|
-
var defaultTheme3 = {
|
304175
|
-
prefix: {
|
304176
|
-
idle: import_yoctocolors_cjs3.default.blue("?"),
|
304177
|
-
done: import_yoctocolors_cjs3.default.green(esm_default2.tick)
|
304178
|
-
},
|
304179
|
-
spinner: {
|
304180
|
-
interval: 80,
|
304181
|
-
frames: ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"].map((frame) => import_yoctocolors_cjs3.default.yellow(frame))
|
304182
|
-
},
|
304183
|
-
style: {
|
304184
|
-
answer: import_yoctocolors_cjs3.default.cyan,
|
304185
|
-
message: import_yoctocolors_cjs3.default.bold,
|
304186
|
-
error: (text2) => import_yoctocolors_cjs3.default.red(`> ${text2}`),
|
304187
|
-
defaultAnswer: (text2) => import_yoctocolors_cjs3.default.dim(`(${text2})`),
|
304188
|
-
help: import_yoctocolors_cjs3.default.dim,
|
304189
|
-
highlight: import_yoctocolors_cjs3.default.cyan,
|
304190
|
-
key: (text2) => import_yoctocolors_cjs3.default.cyan(import_yoctocolors_cjs3.default.bold(`<${text2}>`))
|
304191
|
-
}
|
304192
|
-
};
|
304193
|
-
|
304194
|
-
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/make-theme.js
|
304195
|
-
function isPlainObject7(value4) {
|
304196
|
-
if (typeof value4 !== "object" || value4 === null)
|
304197
|
-
return false;
|
304198
|
-
let proto = value4;
|
304199
|
-
while (Object.getPrototypeOf(proto) !== null) {
|
304200
|
-
proto = Object.getPrototypeOf(proto);
|
304201
|
-
}
|
304202
|
-
return Object.getPrototypeOf(value4) === proto;
|
304203
|
-
}
|
304204
|
-
function deepMerge4(...objects) {
|
304205
|
-
const output = {};
|
304206
|
-
for (const obj of objects) {
|
304207
|
-
for (const [key3, value4] of Object.entries(obj)) {
|
304208
|
-
const prevValue = output[key3];
|
304209
|
-
output[key3] = isPlainObject7(prevValue) && isPlainObject7(value4) ? deepMerge4(prevValue, value4) : value4;
|
304210
|
-
}
|
304211
|
-
}
|
304212
|
-
return output;
|
304213
|
-
}
|
304214
|
-
function makeTheme3(...themes) {
|
304215
|
-
const themesToMerge = [
|
304216
|
-
defaultTheme3,
|
304217
|
-
...themes.filter((theme) => theme != null)
|
304218
|
-
];
|
304219
|
-
return deepMerge4(...themesToMerge);
|
304220
|
-
}
|
304221
|
-
|
304222
|
-
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/use-prefix.js
|
304223
|
-
function usePrefix3({ status = "idle", theme }) {
|
304224
|
-
const [showLoader, setShowLoader] = useState3(false);
|
304225
|
-
const [tick, setTick] = useState3(0);
|
304226
|
-
const { prefix, spinner: spinner2 } = makeTheme3(theme);
|
304227
|
-
useEffect3(() => {
|
304228
|
-
if (status === "loading") {
|
304229
|
-
let tickInterval;
|
304230
|
-
let inc = -1;
|
304231
|
-
const delayTimeout = setTimeout(() => {
|
304232
|
-
setShowLoader(true);
|
304233
|
-
tickInterval = setInterval(() => {
|
304234
|
-
inc = inc + 1;
|
304235
|
-
setTick(inc % spinner2.frames.length);
|
304236
|
-
}, spinner2.interval);
|
304237
|
-
}, 300);
|
304238
|
-
return () => {
|
304239
|
-
clearTimeout(delayTimeout);
|
304240
|
-
clearInterval(tickInterval);
|
304241
|
-
};
|
304242
|
-
} else {
|
304243
|
-
setShowLoader(false);
|
304244
|
-
}
|
304245
|
-
}, [status]);
|
304246
|
-
if (showLoader) {
|
304247
|
-
return spinner2.frames[tick];
|
304248
|
-
}
|
304249
|
-
const iconName = status === "loading" ? "idle" : status;
|
304250
|
-
return typeof prefix === "string" ? prefix : prefix[iconName] ?? prefix["idle"];
|
304251
|
-
}
|
304252
303796
|
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/use-memo.js
|
304253
303797
|
function useMemo(fn, dependencies) {
|
304254
|
-
return
|
303798
|
+
return withPointer2((pointer) => {
|
304255
303799
|
const prev = pointer.get();
|
304256
303800
|
if (!prev || prev.dependencies.length !== dependencies.length || prev.dependencies.some((dep, i6) => dep !== dependencies[i6])) {
|
304257
303801
|
const value4 = fn();
|
@@ -304262,16 +303806,16 @@ function useMemo(fn, dependencies) {
|
|
304262
303806
|
});
|
304263
303807
|
}
|
304264
303808
|
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/use-ref.js
|
304265
|
-
function
|
304266
|
-
return
|
303809
|
+
function useRef2(val) {
|
303810
|
+
return useState2({ current: val })[0];
|
304267
303811
|
}
|
304268
303812
|
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/use-keypress.js
|
304269
|
-
function
|
304270
|
-
const signal =
|
303813
|
+
function useKeypress2(userHandler) {
|
303814
|
+
const signal = useRef2(userHandler);
|
304271
303815
|
signal.current = userHandler;
|
304272
|
-
|
303816
|
+
useEffect2((rl) => {
|
304273
303817
|
let ignore = false;
|
304274
|
-
const handler =
|
303818
|
+
const handler = withUpdates2((_input, event) => {
|
304275
303819
|
if (ignore)
|
304276
303820
|
return;
|
304277
303821
|
signal.current(event, rl);
|
@@ -304284,21 +303828,21 @@ function useKeypress3(userHandler) {
|
|
304284
303828
|
}, []);
|
304285
303829
|
}
|
304286
303830
|
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/utils.js
|
304287
|
-
var
|
304288
|
-
var
|
304289
|
-
function
|
303831
|
+
var import_cli_width2 = __toESM(require_cli_width(), 1);
|
303832
|
+
var import_wrap_ansi2 = __toESM(require_wrap_ansi(), 1);
|
303833
|
+
function breakLines2(content, width) {
|
304290
303834
|
return content.split(`
|
304291
|
-
`).flatMap((line) =>
|
303835
|
+
`).flatMap((line) => import_wrap_ansi2.default(line, width, { trim: false, hard: true }).split(`
|
304292
303836
|
`).map((str) => str.trimEnd())).join(`
|
304293
303837
|
`);
|
304294
303838
|
}
|
304295
|
-
function
|
304296
|
-
return
|
303839
|
+
function readlineWidth2() {
|
303840
|
+
return import_cli_width2.default({ defaultWidth: 80, output: readline3().output });
|
304297
303841
|
}
|
304298
303842
|
|
304299
303843
|
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/pagination/use-pagination.js
|
304300
303844
|
function usePointerPosition({ active, renderedItems, pageSize, loop }) {
|
304301
|
-
const state =
|
303845
|
+
const state = useRef2({
|
304302
303846
|
lastPointer: active,
|
304303
303847
|
lastActive: undefined
|
304304
303848
|
});
|
@@ -304323,12 +303867,12 @@ function usePointerPosition({ active, renderedItems, pageSize, loop }) {
|
|
304323
303867
|
return pointer;
|
304324
303868
|
}
|
304325
303869
|
function usePagination({ items, active, renderItem, pageSize, loop = true }) {
|
304326
|
-
const width =
|
303870
|
+
const width = readlineWidth2();
|
304327
303871
|
const bound = (num) => (num % items.length + items.length) % items.length;
|
304328
303872
|
const renderedItems = items.map((item, index) => {
|
304329
303873
|
if (item == null)
|
304330
303874
|
return [];
|
304331
|
-
return
|
303875
|
+
return breakLines2(renderItem({ item, index, isActive: index === active }), width).split(`
|
304332
303876
|
`);
|
304333
303877
|
});
|
304334
303878
|
const renderedLength = renderedItems.reduce((acc, item) => acc + item.length, 0);
|
@@ -304363,22 +303907,22 @@ function usePagination({ items, active, renderItem, pageSize, loop = true }) {
|
|
304363
303907
|
`);
|
304364
303908
|
}
|
304365
303909
|
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
|
304366
|
-
var
|
304367
|
-
import * as
|
304368
|
-
import { AsyncResource as
|
303910
|
+
var import_mute_stream2 = __toESM(require_lib(), 1);
|
303911
|
+
import * as readline4 from "node:readline";
|
303912
|
+
import { AsyncResource as AsyncResource6 } from "node:async_hooks";
|
304369
303913
|
|
304370
303914
|
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/screen-manager.js
|
304371
|
-
var
|
304372
|
-
import { stripVTControlCharacters as
|
304373
|
-
var
|
303915
|
+
var import_ansi_escapes2 = __toESM(require_ansi_escapes(), 1);
|
303916
|
+
import { stripVTControlCharacters as stripVTControlCharacters3 } from "node:util";
|
303917
|
+
var height2 = (content) => content.split(`
|
304374
303918
|
`).length;
|
304375
|
-
var
|
303919
|
+
var lastLine2 = (content) => content.split(`
|
304376
303920
|
`).pop() ?? "";
|
304377
|
-
function
|
304378
|
-
return n6 > 0 ?
|
303921
|
+
function cursorDown2(n6) {
|
303922
|
+
return n6 > 0 ? import_ansi_escapes2.default.cursorDown(n6) : "";
|
304379
303923
|
}
|
304380
303924
|
|
304381
|
-
class
|
303925
|
+
class ScreenManager2 {
|
304382
303926
|
height = 0;
|
304383
303927
|
extraLinesUnderPrompt = 0;
|
304384
303928
|
cursorPos;
|
@@ -304393,17 +303937,17 @@ class ScreenManager3 {
|
|
304393
303937
|
this.rl.output.mute();
|
304394
303938
|
}
|
304395
303939
|
render(content, bottomContent = "") {
|
304396
|
-
const promptLine =
|
304397
|
-
const rawPromptLine =
|
303940
|
+
const promptLine = lastLine2(content);
|
303941
|
+
const rawPromptLine = stripVTControlCharacters3(promptLine);
|
304398
303942
|
let prompt = rawPromptLine;
|
304399
303943
|
if (this.rl.line.length > 0) {
|
304400
303944
|
prompt = prompt.slice(0, -this.rl.line.length);
|
304401
303945
|
}
|
304402
303946
|
this.rl.setPrompt(prompt);
|
304403
303947
|
this.cursorPos = this.rl.getCursorPos();
|
304404
|
-
const width =
|
304405
|
-
content =
|
304406
|
-
bottomContent =
|
303948
|
+
const width = readlineWidth2();
|
303949
|
+
content = breakLines2(content, width);
|
303950
|
+
bottomContent = breakLines2(bottomContent, width);
|
304407
303951
|
if (rawPromptLine.length % width === 0) {
|
304408
303952
|
content += `
|
304409
303953
|
`;
|
@@ -304411,34 +303955,34 @@ class ScreenManager3 {
|
|
304411
303955
|
let output = content + (bottomContent ? `
|
304412
303956
|
` + bottomContent : "");
|
304413
303957
|
const promptLineUpDiff = Math.floor(rawPromptLine.length / width) - this.cursorPos.rows;
|
304414
|
-
const bottomContentHeight = promptLineUpDiff + (bottomContent ?
|
303958
|
+
const bottomContentHeight = promptLineUpDiff + (bottomContent ? height2(bottomContent) : 0);
|
304415
303959
|
if (bottomContentHeight > 0)
|
304416
|
-
output +=
|
304417
|
-
output +=
|
304418
|
-
this.write(
|
303960
|
+
output += import_ansi_escapes2.default.cursorUp(bottomContentHeight);
|
303961
|
+
output += import_ansi_escapes2.default.cursorTo(this.cursorPos.cols);
|
303962
|
+
this.write(cursorDown2(this.extraLinesUnderPrompt) + import_ansi_escapes2.default.eraseLines(this.height) + output);
|
304419
303963
|
this.extraLinesUnderPrompt = bottomContentHeight;
|
304420
|
-
this.height =
|
303964
|
+
this.height = height2(output);
|
304421
303965
|
}
|
304422
303966
|
checkCursorPos() {
|
304423
303967
|
const cursorPos = this.rl.getCursorPos();
|
304424
303968
|
if (cursorPos.cols !== this.cursorPos.cols) {
|
304425
|
-
this.write(
|
303969
|
+
this.write(import_ansi_escapes2.default.cursorTo(cursorPos.cols));
|
304426
303970
|
this.cursorPos = cursorPos;
|
304427
303971
|
}
|
304428
303972
|
}
|
304429
303973
|
done({ clearContent }) {
|
304430
303974
|
this.rl.setPrompt("");
|
304431
|
-
let output =
|
304432
|
-
output += clearContent ?
|
303975
|
+
let output = cursorDown2(this.extraLinesUnderPrompt);
|
303976
|
+
output += clearContent ? import_ansi_escapes2.default.eraseLines(this.height) : `
|
304433
303977
|
`;
|
304434
|
-
output +=
|
303978
|
+
output += import_ansi_escapes2.default.cursorShow;
|
304435
303979
|
this.write(output);
|
304436
303980
|
this.rl.close();
|
304437
303981
|
}
|
304438
303982
|
}
|
304439
303983
|
|
304440
303984
|
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/promise-polyfill.js
|
304441
|
-
class
|
303985
|
+
class PromisePolyfill2 extends Promise {
|
304442
303986
|
static withResolver() {
|
304443
303987
|
let resolve5;
|
304444
303988
|
let reject;
|
@@ -304451,7 +303995,7 @@ class PromisePolyfill3 extends Promise {
|
|
304451
303995
|
}
|
304452
303996
|
|
304453
303997
|
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
|
304454
|
-
function
|
303998
|
+
function getCallSites2() {
|
304455
303999
|
const _prepareStackTrace = Error.prepareStackTrace;
|
304456
304000
|
let result = [];
|
304457
304001
|
try {
|
@@ -304467,23 +304011,23 @@ function getCallSites3() {
|
|
304467
304011
|
Error.prepareStackTrace = _prepareStackTrace;
|
304468
304012
|
return result;
|
304469
304013
|
}
|
304470
|
-
function
|
304471
|
-
const callSites =
|
304014
|
+
function createPrompt2(view) {
|
304015
|
+
const callSites = getCallSites2();
|
304472
304016
|
const prompt = (config4, context = {}) => {
|
304473
304017
|
const { input = process.stdin, signal } = context;
|
304474
304018
|
const cleanups = new Set;
|
304475
|
-
const output = new
|
304019
|
+
const output = new import_mute_stream2.default;
|
304476
304020
|
output.pipe(context.output ?? process.stdout);
|
304477
|
-
const rl =
|
304021
|
+
const rl = readline4.createInterface({
|
304478
304022
|
terminal: true,
|
304479
304023
|
input,
|
304480
304024
|
output
|
304481
304025
|
});
|
304482
|
-
const screen = new
|
304483
|
-
const { promise: promise4, resolve: resolve5, reject } =
|
304484
|
-
const cancel3 = () => reject(new
|
304026
|
+
const screen = new ScreenManager2(rl);
|
304027
|
+
const { promise: promise4, resolve: resolve5, reject } = PromisePolyfill2.withResolver();
|
304028
|
+
const cancel3 = () => reject(new CancelPromptError2);
|
304485
304029
|
if (signal) {
|
304486
|
-
const abort = () => reject(new
|
304030
|
+
const abort = () => reject(new AbortPromptError2({ cause: signal.reason }));
|
304487
304031
|
if (signal.aborted) {
|
304488
304032
|
abort();
|
304489
304033
|
return Object.assign(promise4, { cancel: cancel3 });
|
@@ -304492,16 +304036,16 @@ function createPrompt3(view) {
|
|
304492
304036
|
cleanups.add(() => signal.removeEventListener("abort", abort));
|
304493
304037
|
}
|
304494
304038
|
cleanups.add(onExit((code2, signal2) => {
|
304495
|
-
reject(new
|
304039
|
+
reject(new ExitPromptError2(`User force closed the prompt with ${code2} ${signal2}`));
|
304496
304040
|
}));
|
304497
|
-
const sigint = () => reject(new
|
304041
|
+
const sigint = () => reject(new ExitPromptError2(`User force closed the prompt with SIGINT`));
|
304498
304042
|
rl.on("SIGINT", sigint);
|
304499
304043
|
cleanups.add(() => rl.removeListener("SIGINT", sigint));
|
304500
304044
|
const checkCursorPos = () => screen.checkCursorPos();
|
304501
304045
|
rl.input.on("keypress", checkCursorPos);
|
304502
304046
|
cleanups.add(() => rl.input.removeListener("keypress", checkCursorPos));
|
304503
|
-
return
|
304504
|
-
const hooksCleanup =
|
304047
|
+
return withHooks2(rl, (cycle) => {
|
304048
|
+
const hooksCleanup = AsyncResource6.bind(() => effectScheduler2.clearAll());
|
304505
304049
|
rl.on("close", hooksCleanup);
|
304506
304050
|
cleanups.add(() => rl.removeListener("close", hooksCleanup));
|
304507
304051
|
cycle(() => {
|
@@ -304516,16 +304060,16 @@ function createPrompt3(view) {
|
|
304516
304060
|
}
|
304517
304061
|
const [content, bottomContent] = typeof nextView === "string" ? [nextView] : nextView;
|
304518
304062
|
screen.render(content, bottomContent);
|
304519
|
-
|
304063
|
+
effectScheduler2.run();
|
304520
304064
|
} catch (error44) {
|
304521
304065
|
reject(error44);
|
304522
304066
|
}
|
304523
304067
|
});
|
304524
304068
|
return Object.assign(promise4.then((answer) => {
|
304525
|
-
|
304069
|
+
effectScheduler2.clearAll();
|
304526
304070
|
return answer;
|
304527
304071
|
}, (error44) => {
|
304528
|
-
|
304072
|
+
effectScheduler2.clearAll();
|
304529
304073
|
throw error44;
|
304530
304074
|
}).finally(() => {
|
304531
304075
|
cleanups.forEach((cleanup) => cleanup());
|
@@ -304537,9 +304081,9 @@ function createPrompt3(view) {
|
|
304537
304081
|
return prompt;
|
304538
304082
|
}
|
304539
304083
|
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/Separator.js
|
304540
|
-
var
|
304084
|
+
var import_yoctocolors_cjs3 = __toESM(require_yoctocolors_cjs(), 1);
|
304541
304085
|
class Separator {
|
304542
|
-
separator =
|
304086
|
+
separator = import_yoctocolors_cjs3.default.dim(Array.from({ length: 15 }).join(esm_default3.line));
|
304543
304087
|
type = "separator";
|
304544
304088
|
constructor(separator) {
|
304545
304089
|
if (separator) {
|
@@ -304551,13 +304095,13 @@ class Separator {
|
|
304551
304095
|
}
|
304552
304096
|
}
|
304553
304097
|
// ../../node_modules/@inquirer/select/dist/esm/index.js
|
304554
|
-
var
|
304555
|
-
var
|
304098
|
+
var import_yoctocolors_cjs4 = __toESM(require_yoctocolors_cjs(), 1);
|
304099
|
+
var import_ansi_escapes3 = __toESM(require_ansi_escapes(), 1);
|
304556
304100
|
var selectTheme = {
|
304557
|
-
icon: { cursor:
|
304101
|
+
icon: { cursor: esm_default3.pointer },
|
304558
304102
|
style: {
|
304559
|
-
disabled: (text2) =>
|
304560
|
-
description: (text2) =>
|
304103
|
+
disabled: (text2) => import_yoctocolors_cjs4.default.dim(`- ${text2}`),
|
304104
|
+
description: (text2) => import_yoctocolors_cjs4.default.cyan(text2)
|
304561
304105
|
},
|
304562
304106
|
helpMode: "auto",
|
304563
304107
|
indexMode: "hidden"
|
@@ -304590,19 +304134,19 @@ function normalizeChoices(choices) {
|
|
304590
304134
|
return normalizedChoice;
|
304591
304135
|
});
|
304592
304136
|
}
|
304593
|
-
var esm_default4 =
|
304137
|
+
var esm_default4 = createPrompt2((config4, done) => {
|
304594
304138
|
const { loop = true, pageSize = 7 } = config4;
|
304595
|
-
const firstRender =
|
304596
|
-
const theme =
|
304597
|
-
const [status, setStatus] =
|
304598
|
-
const prefix =
|
304599
|
-
const searchTimeoutRef =
|
304139
|
+
const firstRender = useRef2(true);
|
304140
|
+
const theme = makeTheme2(selectTheme, config4.theme);
|
304141
|
+
const [status, setStatus] = useState2("idle");
|
304142
|
+
const prefix = usePrefix2({ status, theme });
|
304143
|
+
const searchTimeoutRef = useRef2();
|
304600
304144
|
const items = useMemo(() => normalizeChoices(config4.choices), [config4.choices]);
|
304601
304145
|
const bounds = useMemo(() => {
|
304602
304146
|
const first = items.findIndex(isSelectable);
|
304603
304147
|
const last = items.findLastIndex(isSelectable);
|
304604
304148
|
if (first === -1) {
|
304605
|
-
throw new
|
304149
|
+
throw new ValidationError2("[select prompt] No selectable choices. All choices are disabled.");
|
304606
304150
|
}
|
304607
304151
|
return { first, last };
|
304608
304152
|
}, [items]);
|
@@ -304611,24 +304155,24 @@ var esm_default4 = createPrompt3((config4, done) => {
|
|
304611
304155
|
return -1;
|
304612
304156
|
return items.findIndex((item) => isSelectable(item) && item.value === config4.default);
|
304613
304157
|
}, [config4.default, items]);
|
304614
|
-
const [active, setActive] =
|
304158
|
+
const [active, setActive] = useState2(defaultItemIndex === -1 ? bounds.first : defaultItemIndex);
|
304615
304159
|
const selectedChoice = items[active];
|
304616
|
-
|
304160
|
+
useKeypress2((key3, rl) => {
|
304617
304161
|
clearTimeout(searchTimeoutRef.current);
|
304618
|
-
if (
|
304162
|
+
if (isEnterKey2(key3)) {
|
304619
304163
|
setStatus("done");
|
304620
304164
|
done(selectedChoice.value);
|
304621
|
-
} else if (isUpKey(
|
304165
|
+
} else if (isUpKey(key3) || isDownKey(key3)) {
|
304622
304166
|
rl.clearLine(0);
|
304623
|
-
if (loop || isUpKey(
|
304624
|
-
const offset = isUpKey(
|
304167
|
+
if (loop || isUpKey(key3) && active !== bounds.first || isDownKey(key3) && active !== bounds.last) {
|
304168
|
+
const offset = isUpKey(key3) ? -1 : 1;
|
304625
304169
|
let next = active;
|
304626
304170
|
do {
|
304627
304171
|
next = (next + offset + items.length) % items.length;
|
304628
304172
|
} while (!isSelectable(items[next]));
|
304629
304173
|
setActive(next);
|
304630
304174
|
}
|
304631
|
-
} else if (isNumberKey(
|
304175
|
+
} else if (isNumberKey(key3) && !Number.isNaN(Number(rl.line))) {
|
304632
304176
|
const position = Number(rl.line) - 1;
|
304633
304177
|
const item = items[position];
|
304634
304178
|
if (item != null && isSelectable(item)) {
|
@@ -304637,7 +304181,7 @@ var esm_default4 = createPrompt3((config4, done) => {
|
|
304637
304181
|
searchTimeoutRef.current = setTimeout(() => {
|
304638
304182
|
rl.clearLine(0);
|
304639
304183
|
}, 700);
|
304640
|
-
} else if (isBackspaceKey2(
|
304184
|
+
} else if (isBackspaceKey2(key3)) {
|
304641
304185
|
rl.clearLine(0);
|
304642
304186
|
} else {
|
304643
304187
|
const searchTerm = rl.line.toLowerCase();
|
@@ -304654,7 +304198,7 @@ var esm_default4 = createPrompt3((config4, done) => {
|
|
304654
304198
|
}, 700);
|
304655
304199
|
}
|
304656
304200
|
});
|
304657
|
-
|
304201
|
+
useEffect2(() => () => {
|
304658
304202
|
clearTimeout(searchTimeoutRef.current);
|
304659
304203
|
}, []);
|
304660
304204
|
const message = theme.style.message(config4.message, status);
|
@@ -304694,7 +304238,7 @@ ${theme.style.help(`(${config4.instructions?.pager ?? "Use arrow keys to reveal
|
|
304694
304238
|
const choiceDescription = selectedChoice.description ? `
|
304695
304239
|
${theme.style.description(selectedChoice.description)}` : ``;
|
304696
304240
|
return `${[prefix, message, helpTipTop].filter(Boolean).join(" ")}
|
304697
|
-
${page}${helpTipBottom}${choiceDescription}${
|
304241
|
+
${page}${helpTipBottom}${choiceDescription}${import_ansi_escapes3.default.cursorHide}`;
|
304698
304242
|
});
|
304699
304243
|
|
304700
304244
|
// src/prompts/smart-contract-set/subgraph.prompt.ts
|
@@ -306278,14 +305822,14 @@ function includesArgs(parameters) {
|
|
306278
305822
|
});
|
306279
305823
|
}
|
306280
305824
|
if (typeof args === "object" && !Array.isArray(args) && typeof matchArgs === "object" && !Array.isArray(matchArgs))
|
306281
|
-
return Object.entries(matchArgs).every(([
|
305825
|
+
return Object.entries(matchArgs).every(([key3, value4]) => {
|
306282
305826
|
if (value4 === null || value4 === undefined)
|
306283
305827
|
return true;
|
306284
|
-
const input = inputs.find((input2) => input2.name ===
|
305828
|
+
const input = inputs.find((input2) => input2.name === key3);
|
306285
305829
|
if (!input)
|
306286
305830
|
return false;
|
306287
305831
|
const value_ = Array.isArray(value4) ? value4 : [value4];
|
306288
|
-
return value_.some((value5) => isEqual(input, value5, args[
|
305832
|
+
return value_.some((value5) => isEqual(input, value5, args[key3]));
|
306289
305833
|
});
|
306290
305834
|
return false;
|
306291
305835
|
}
|
@@ -306484,13 +306028,13 @@ function observe(observerId, callbacks, fn) {
|
|
306484
306028
|
if (listeners && listeners.length > 0)
|
306485
306029
|
return unwatch;
|
306486
306030
|
const emit = {};
|
306487
|
-
for (const
|
306488
|
-
emit[
|
306031
|
+
for (const key3 in callbacks) {
|
306032
|
+
emit[key3] = (...args) => {
|
306489
306033
|
const listeners2 = getListeners();
|
306490
306034
|
if (listeners2.length === 0)
|
306491
306035
|
return;
|
306492
306036
|
for (const listener of listeners2)
|
306493
|
-
listener.fns[
|
306037
|
+
listener.fns[key3]?.(...args);
|
306494
306038
|
};
|
306495
306039
|
}
|
306496
306040
|
const cleanup = fn(emit);
|
@@ -306829,7 +306373,7 @@ function uid(length = 11) {
|
|
306829
306373
|
|
306830
306374
|
// ../../node_modules/viem/_esm/clients/createClient.js
|
306831
306375
|
function createClient(parameters) {
|
306832
|
-
const { batch, chain, ccipRead, key:
|
306376
|
+
const { batch, chain, ccipRead, key: key3 = "base", name: name3 = "Base Client", type: type4 = "base" } = parameters;
|
306833
306377
|
const experimental_blockTag = parameters.experimental_blockTag ?? (typeof chain?.experimental_preconfirmationTime === "number" ? "pending" : undefined);
|
306834
306378
|
const blockTime = chain?.blockTime ?? 12000;
|
306835
306379
|
const defaultPollingInterval = Math.min(Math.max(Math.floor(blockTime / 2), 500), 4000);
|
@@ -306847,7 +306391,7 @@ function createClient(parameters) {
|
|
306847
306391
|
cacheTime,
|
306848
306392
|
ccipRead,
|
306849
306393
|
chain,
|
306850
|
-
key:
|
306394
|
+
key: key3,
|
306851
306395
|
name: name3,
|
306852
306396
|
pollingInterval,
|
306853
306397
|
request: request2,
|
@@ -306859,8 +306403,8 @@ function createClient(parameters) {
|
|
306859
306403
|
function extend4(base2) {
|
306860
306404
|
return (extendFn) => {
|
306861
306405
|
const extended = extendFn(base2);
|
306862
|
-
for (const
|
306863
|
-
delete extended[
|
306406
|
+
for (const key4 in client)
|
306407
|
+
delete extended[key4];
|
306864
306408
|
const combined = { ...base2, ...extended };
|
306865
306409
|
return Object.assign(combined, { extend: extend4(combined) });
|
306866
306410
|
};
|
@@ -307040,11 +306584,11 @@ function shouldRetry(error44) {
|
|
307040
306584
|
}
|
307041
306585
|
|
307042
306586
|
// ../../node_modules/viem/_esm/clients/transports/createTransport.js
|
307043
|
-
function createTransport({ key:
|
306587
|
+
function createTransport({ key: key3, methods, name: name3, request: request2, retryCount = 3, retryDelay = 150, timeout, type: type4 }, value4) {
|
307044
306588
|
const uid2 = uid();
|
307045
306589
|
return {
|
307046
306590
|
config: {
|
307047
|
-
key:
|
306591
|
+
key: key3,
|
307048
306592
|
methods,
|
307049
306593
|
name: name3,
|
307050
306594
|
request: request2,
|
@@ -307201,7 +306745,7 @@ function getHttpRpcClient(url4, options = {}) {
|
|
307201
306745
|
|
307202
306746
|
// ../../node_modules/viem/_esm/clients/transports/http.js
|
307203
306747
|
function http(url4, config4 = {}) {
|
307204
|
-
const { batch, fetchOptions, key:
|
306748
|
+
const { batch, fetchOptions, key: key3 = "http", methods, name: name3 = "HTTP JSON-RPC", onFetchRequest, onFetchResponse, retryDelay, raw } = config4;
|
307205
306749
|
return ({ chain, retryCount: retryCount_, timeout: timeout_ }) => {
|
307206
306750
|
const { batchSize = 1000, wait: wait2 = 0 } = typeof batch === "object" ? batch : {};
|
307207
306751
|
const retryCount = config4.retryCount ?? retryCount_;
|
@@ -307216,7 +306760,7 @@ function http(url4, config4 = {}) {
|
|
307216
306760
|
timeout
|
307217
306761
|
});
|
307218
306762
|
return createTransport({
|
307219
|
-
key:
|
306763
|
+
key: key3,
|
307220
306764
|
methods,
|
307221
306765
|
name: name3,
|
307222
306766
|
async request({ method, params }) {
|
@@ -307667,7 +307211,7 @@ init_getChainContractAddress();
|
|
307667
307211
|
init_toHex();
|
307668
307212
|
init_localBatchGatewayRequest();
|
307669
307213
|
async function getEnsText(client, parameters) {
|
307670
|
-
const { blockNumber, blockTag, key:
|
307214
|
+
const { blockNumber, blockTag, key: key3, name: name3, gatewayUrls, strict } = parameters;
|
307671
307215
|
const { chain } = client;
|
307672
307216
|
const universalResolverAddress = (() => {
|
307673
307217
|
if (parameters.universalResolverAddress)
|
@@ -307693,7 +307237,7 @@ async function getEnsText(client, parameters) {
|
|
307693
307237
|
encodeFunctionData({
|
307694
307238
|
abi: textResolverAbi,
|
307695
307239
|
functionName: "text",
|
307696
|
-
args: [namehash(name3),
|
307240
|
+
args: [namehash(name3), key3]
|
307697
307241
|
}),
|
307698
307242
|
gatewayUrls ?? [localBatchGatewayUrl]
|
307699
307243
|
],
|
@@ -308716,16 +308260,16 @@ class LruMap2 extends Map {
|
|
308716
308260
|
});
|
308717
308261
|
this.maxSize = size5;
|
308718
308262
|
}
|
308719
|
-
get(
|
308720
|
-
const value4 = super.get(
|
308721
|
-
if (super.has(
|
308722
|
-
this.delete(
|
308723
|
-
super.set(
|
308263
|
+
get(key3) {
|
308264
|
+
const value4 = super.get(key3);
|
308265
|
+
if (super.has(key3) && value4 !== undefined) {
|
308266
|
+
this.delete(key3);
|
308267
|
+
super.set(key3, value4);
|
308724
308268
|
}
|
308725
308269
|
return value4;
|
308726
308270
|
}
|
308727
|
-
set(
|
308728
|
-
super.set(
|
308271
|
+
set(key3, value4) {
|
308272
|
+
super.set(key3, value4);
|
308729
308273
|
if (this.maxSize && this.size > this.maxSize) {
|
308730
308274
|
const firstKey = this.keys().next().value;
|
308731
308275
|
if (firstKey)
|
@@ -310585,10 +310129,10 @@ function publicActions(client) {
|
|
310585
310129
|
|
310586
310130
|
// ../../node_modules/viem/_esm/clients/createPublicClient.js
|
310587
310131
|
function createPublicClient(parameters) {
|
310588
|
-
const { key:
|
310132
|
+
const { key: key3 = "public", name: name3 = "Public Client" } = parameters;
|
310589
310133
|
const client = createClient({
|
310590
310134
|
...parameters,
|
310591
|
-
key:
|
310135
|
+
key: key3,
|
310592
310136
|
name: name3,
|
310593
310137
|
type: "publicClient"
|
310594
310138
|
});
|
@@ -310689,7 +310233,7 @@ __export4(util_exports3, {
|
|
310689
310233
|
getParsedType: () => getParsedType4,
|
310690
310234
|
getSizableOrigin: () => getSizableOrigin4,
|
310691
310235
|
isObject: () => isObject4,
|
310692
|
-
isPlainObject: () =>
|
310236
|
+
isPlainObject: () => isPlainObject7,
|
310693
310237
|
issue: () => issue4,
|
310694
310238
|
joinValues: () => joinValues4,
|
310695
310239
|
jsonStringifyReplacer: () => jsonStringifyReplacer4,
|
@@ -310761,19 +310305,19 @@ function floatSafeRemainder4(val, step) {
|
|
310761
310305
|
const stepInt = Number.parseInt(step.toFixed(decCount).replace(".", ""));
|
310762
310306
|
return valInt % stepInt / 10 ** decCount;
|
310763
310307
|
}
|
310764
|
-
function defineLazy4(object$1,
|
310308
|
+
function defineLazy4(object$1, key3, getter) {
|
310765
310309
|
const set$1 = false;
|
310766
|
-
Object.defineProperty(object$1,
|
310310
|
+
Object.defineProperty(object$1, key3, {
|
310767
310311
|
get() {
|
310768
310312
|
if (!set$1) {
|
310769
310313
|
const value4 = getter();
|
310770
|
-
object$1[
|
310314
|
+
object$1[key3] = value4;
|
310771
310315
|
return value4;
|
310772
310316
|
}
|
310773
310317
|
throw new Error("cached value already set");
|
310774
310318
|
},
|
310775
310319
|
set(v6) {
|
310776
|
-
Object.defineProperty(object$1,
|
310320
|
+
Object.defineProperty(object$1, key3, { value: v6 });
|
310777
310321
|
},
|
310778
310322
|
configurable: true
|
310779
310323
|
});
|
@@ -310789,11 +310333,11 @@ function assignProp4(target, prop, value4) {
|
|
310789
310333
|
function getElementAtPath4(obj, path7) {
|
310790
310334
|
if (!path7)
|
310791
310335
|
return obj;
|
310792
|
-
return path7.reduce((acc,
|
310336
|
+
return path7.reduce((acc, key3) => acc?.[key3], obj);
|
310793
310337
|
}
|
310794
310338
|
function promiseAllObject4(promisesObj) {
|
310795
310339
|
const keys = Object.keys(promisesObj);
|
310796
|
-
const promises = keys.map((
|
310340
|
+
const promises = keys.map((key3) => promisesObj[key3]);
|
310797
310341
|
return Promise.all(promises).then((results) => {
|
310798
310342
|
const resolvedObj = {};
|
310799
310343
|
for (let i6 = 0;i6 < keys.length; i6++) {
|
@@ -310825,7 +310369,7 @@ var allowsEval4 = cached4(() => {
|
|
310825
310369
|
return false;
|
310826
310370
|
}
|
310827
310371
|
});
|
310828
|
-
function
|
310372
|
+
function isPlainObject7(o8) {
|
310829
310373
|
if (isObject4(o8) === false)
|
310830
310374
|
return false;
|
310831
310375
|
const ctor = o8.constructor;
|
@@ -310841,8 +310385,8 @@ function isPlainObject8(o8) {
|
|
310841
310385
|
}
|
310842
310386
|
function numKeys4(data) {
|
310843
310387
|
let keyCount = 0;
|
310844
|
-
for (const
|
310845
|
-
if (Object.prototype.hasOwnProperty.call(data,
|
310388
|
+
for (const key3 in data) {
|
310389
|
+
if (Object.prototype.hasOwnProperty.call(data, key3)) {
|
310846
310390
|
keyCount++;
|
310847
310391
|
}
|
310848
310392
|
}
|
@@ -310992,13 +310536,13 @@ var BIGINT_FORMAT_RANGES4 = {
|
|
310992
310536
|
function pick4(schema, mask) {
|
310993
310537
|
const newShape = {};
|
310994
310538
|
const currDef = schema._zod.def;
|
310995
|
-
for (const
|
310996
|
-
if (!(
|
310997
|
-
throw new Error(`Unrecognized key: "${
|
310539
|
+
for (const key3 in mask) {
|
310540
|
+
if (!(key3 in currDef.shape)) {
|
310541
|
+
throw new Error(`Unrecognized key: "${key3}"`);
|
310998
310542
|
}
|
310999
|
-
if (!mask[
|
310543
|
+
if (!mask[key3])
|
311000
310544
|
continue;
|
311001
|
-
newShape[
|
310545
|
+
newShape[key3] = currDef.shape[key3];
|
311002
310546
|
}
|
311003
310547
|
return clone4(schema, {
|
311004
310548
|
...schema._zod.def,
|
@@ -311009,13 +310553,13 @@ function pick4(schema, mask) {
|
|
311009
310553
|
function omit4(schema, mask) {
|
311010
310554
|
const newShape = { ...schema._zod.def.shape };
|
311011
310555
|
const currDef = schema._zod.def;
|
311012
|
-
for (const
|
311013
|
-
if (!(
|
311014
|
-
throw new Error(`Unrecognized key: "${
|
310556
|
+
for (const key3 in mask) {
|
310557
|
+
if (!(key3 in currDef.shape)) {
|
310558
|
+
throw new Error(`Unrecognized key: "${key3}"`);
|
311015
310559
|
}
|
311016
|
-
if (!mask[
|
310560
|
+
if (!mask[key3])
|
311017
310561
|
continue;
|
311018
|
-
delete newShape[
|
310562
|
+
delete newShape[key3];
|
311019
310563
|
}
|
311020
310564
|
return clone4(schema, {
|
311021
310565
|
...schema._zod.def,
|
@@ -311057,23 +310601,23 @@ function partial4(Class$1, schema, mask) {
|
|
311057
310601
|
const oldShape = schema._zod.def.shape;
|
311058
310602
|
const shape = { ...oldShape };
|
311059
310603
|
if (mask) {
|
311060
|
-
for (const
|
311061
|
-
if (!(
|
311062
|
-
throw new Error(`Unrecognized key: "${
|
310604
|
+
for (const key3 in mask) {
|
310605
|
+
if (!(key3 in oldShape)) {
|
310606
|
+
throw new Error(`Unrecognized key: "${key3}"`);
|
311063
310607
|
}
|
311064
|
-
if (!mask[
|
310608
|
+
if (!mask[key3])
|
311065
310609
|
continue;
|
311066
|
-
shape[
|
310610
|
+
shape[key3] = Class$1 ? new Class$1({
|
311067
310611
|
type: "optional",
|
311068
|
-
innerType: oldShape[
|
311069
|
-
}) : oldShape[
|
310612
|
+
innerType: oldShape[key3]
|
310613
|
+
}) : oldShape[key3];
|
311070
310614
|
}
|
311071
310615
|
} else {
|
311072
|
-
for (const
|
311073
|
-
shape[
|
310616
|
+
for (const key3 in oldShape) {
|
310617
|
+
shape[key3] = Class$1 ? new Class$1({
|
311074
310618
|
type: "optional",
|
311075
|
-
innerType: oldShape[
|
311076
|
-
}) : oldShape[
|
310619
|
+
innerType: oldShape[key3]
|
310620
|
+
}) : oldShape[key3];
|
311077
310621
|
}
|
311078
310622
|
}
|
311079
310623
|
return clone4(schema, {
|
@@ -311086,22 +310630,22 @@ function required4(Class$1, schema, mask) {
|
|
311086
310630
|
const oldShape = schema._zod.def.shape;
|
311087
310631
|
const shape = { ...oldShape };
|
311088
310632
|
if (mask) {
|
311089
|
-
for (const
|
311090
|
-
if (!(
|
311091
|
-
throw new Error(`Unrecognized key: "${
|
310633
|
+
for (const key3 in mask) {
|
310634
|
+
if (!(key3 in shape)) {
|
310635
|
+
throw new Error(`Unrecognized key: "${key3}"`);
|
311092
310636
|
}
|
311093
|
-
if (!mask[
|
310637
|
+
if (!mask[key3])
|
311094
310638
|
continue;
|
311095
|
-
shape[
|
310639
|
+
shape[key3] = new Class$1({
|
311096
310640
|
type: "nonoptional",
|
311097
|
-
innerType: oldShape[
|
310641
|
+
innerType: oldShape[key3]
|
311098
310642
|
});
|
311099
310643
|
}
|
311100
310644
|
} else {
|
311101
|
-
for (const
|
311102
|
-
shape[
|
310645
|
+
for (const key3 in oldShape) {
|
310646
|
+
shape[key3] = new Class$1({
|
311103
310647
|
type: "nonoptional",
|
311104
|
-
innerType: oldShape[
|
310648
|
+
innerType: oldShape[key3]
|
311105
310649
|
});
|
311106
310650
|
}
|
311107
310651
|
}
|
@@ -312681,28 +312225,28 @@ var $ZodArray4 = /* @__PURE__ */ $constructor4("$ZodArray", (inst, def) => {
|
|
312681
312225
|
return payload;
|
312682
312226
|
};
|
312683
312227
|
});
|
312684
|
-
function handleObjectResult4(result, final,
|
312228
|
+
function handleObjectResult4(result, final, key3) {
|
312685
312229
|
if (result.issues.length) {
|
312686
|
-
final.issues.push(...prefixIssues4(
|
312230
|
+
final.issues.push(...prefixIssues4(key3, result.issues));
|
312687
312231
|
}
|
312688
|
-
final.value[
|
312232
|
+
final.value[key3] = result.value;
|
312689
312233
|
}
|
312690
|
-
function handleOptionalObjectResult4(result, final,
|
312234
|
+
function handleOptionalObjectResult4(result, final, key3, input) {
|
312691
312235
|
if (result.issues.length) {
|
312692
|
-
if (input[
|
312693
|
-
if (
|
312694
|
-
final.value[
|
312236
|
+
if (input[key3] === undefined) {
|
312237
|
+
if (key3 in input) {
|
312238
|
+
final.value[key3] = undefined;
|
312695
312239
|
} else {
|
312696
|
-
final.value[
|
312240
|
+
final.value[key3] = result.value;
|
312697
312241
|
}
|
312698
312242
|
} else {
|
312699
|
-
final.issues.push(...prefixIssues4(
|
312243
|
+
final.issues.push(...prefixIssues4(key3, result.issues));
|
312700
312244
|
}
|
312701
312245
|
} else if (result.value === undefined) {
|
312702
|
-
if (
|
312703
|
-
final.value[
|
312246
|
+
if (key3 in input)
|
312247
|
+
final.value[key3] = undefined;
|
312704
312248
|
} else {
|
312705
|
-
final.value[
|
312249
|
+
final.value[key3] = result.value;
|
312706
312250
|
}
|
312707
312251
|
}
|
312708
312252
|
var $ZodObject4 = /* @__PURE__ */ $constructor4("$ZodObject", (inst, def) => {
|
@@ -312726,12 +312270,12 @@ var $ZodObject4 = /* @__PURE__ */ $constructor4("$ZodObject", (inst, def) => {
|
|
312726
312270
|
defineLazy4(inst._zod, "propValues", () => {
|
312727
312271
|
const shape = def.shape;
|
312728
312272
|
const propValues = {};
|
312729
|
-
for (const
|
312730
|
-
const field2 = shape[
|
312273
|
+
for (const key3 in shape) {
|
312274
|
+
const field2 = shape[key3]._zod;
|
312731
312275
|
if (field2.values) {
|
312732
|
-
propValues[
|
312276
|
+
propValues[key3] ?? (propValues[key3] = new Set);
|
312733
312277
|
for (const v6 of field2.values)
|
312734
|
-
propValues[
|
312278
|
+
propValues[key3].add(v6);
|
312735
312279
|
}
|
312736
312280
|
}
|
312737
312281
|
return propValues;
|
@@ -312743,21 +312287,21 @@ var $ZodObject4 = /* @__PURE__ */ $constructor4("$ZodObject", (inst, def) => {
|
|
312743
312287
|
"ctx"
|
312744
312288
|
]);
|
312745
312289
|
const { keys, optionalKeys: optionalKeys$1 } = _normalized.value;
|
312746
|
-
const parseStr = (
|
312747
|
-
const k5 = esc4(
|
312290
|
+
const parseStr = (key3) => {
|
312291
|
+
const k5 = esc4(key3);
|
312748
312292
|
return `shape[${k5}]._zod.run({ value: input[${k5}], issues: [] }, ctx)`;
|
312749
312293
|
};
|
312750
312294
|
doc2.write(`const input = payload.value;`);
|
312751
312295
|
const ids = Object.create(null);
|
312752
|
-
for (const
|
312753
|
-
ids[
|
312296
|
+
for (const key3 of keys) {
|
312297
|
+
ids[key3] = randomString4(15);
|
312754
312298
|
}
|
312755
312299
|
doc2.write(`const newResult = {}`);
|
312756
|
-
for (const
|
312757
|
-
if (optionalKeys$1.has(
|
312758
|
-
const id = ids[
|
312759
|
-
doc2.write(`const ${id} = ${parseStr(
|
312760
|
-
const k5 = esc4(
|
312300
|
+
for (const key3 of keys) {
|
312301
|
+
if (optionalKeys$1.has(key3)) {
|
312302
|
+
const id = ids[key3];
|
312303
|
+
doc2.write(`const ${id} = ${parseStr(key3)};`);
|
312304
|
+
const k5 = esc4(key3);
|
312761
312305
|
doc2.write(`
|
312762
312306
|
if (${id}.issues.length) {
|
312763
312307
|
if (input[${k5}] === undefined) {
|
@@ -312779,14 +312323,14 @@ var $ZodObject4 = /* @__PURE__ */ $constructor4("$ZodObject", (inst, def) => {
|
|
312779
312323
|
}
|
312780
312324
|
`);
|
312781
312325
|
} else {
|
312782
|
-
const id = ids[
|
312783
|
-
doc2.write(`const ${id} = ${parseStr(
|
312326
|
+
const id = ids[key3];
|
312327
|
+
doc2.write(`const ${id} = ${parseStr(key3)};`);
|
312784
312328
|
doc2.write(`
|
312785
312329
|
if (${id}.issues.length) payload.issues = payload.issues.concat(${id}.issues.map(iss => ({
|
312786
312330
|
...iss,
|
312787
|
-
path: iss.path ? [${esc4(
|
312331
|
+
path: iss.path ? [${esc4(key3)}, ...iss.path] : [${esc4(key3)}]
|
312788
312332
|
})));`);
|
312789
|
-
doc2.write(`newResult[${esc4(
|
312333
|
+
doc2.write(`newResult[${esc4(key3)}] = ${id}.value`);
|
312790
312334
|
}
|
312791
312335
|
}
|
312792
312336
|
doc2.write(`payload.value = newResult;`);
|
@@ -312821,20 +312365,20 @@ var $ZodObject4 = /* @__PURE__ */ $constructor4("$ZodObject", (inst, def) => {
|
|
312821
312365
|
} else {
|
312822
312366
|
payload.value = {};
|
312823
312367
|
const shape = value4.shape;
|
312824
|
-
for (const
|
312825
|
-
const el = shape[
|
312368
|
+
for (const key3 of value4.keys) {
|
312369
|
+
const el = shape[key3];
|
312826
312370
|
const r6 = el._zod.run({
|
312827
|
-
value: input[
|
312371
|
+
value: input[key3],
|
312828
312372
|
issues: []
|
312829
312373
|
}, ctx);
|
312830
312374
|
const isOptional = el._zod.optin === "optional" && el._zod.optout === "optional";
|
312831
312375
|
if (r6 instanceof Promise) {
|
312832
|
-
proms.push(r6.then((r$1) => isOptional ? handleOptionalObjectResult4(r$1, payload,
|
312376
|
+
proms.push(r6.then((r$1) => isOptional ? handleOptionalObjectResult4(r$1, payload, key3, input) : handleObjectResult4(r$1, payload, key3)));
|
312833
312377
|
} else {
|
312834
312378
|
if (isOptional) {
|
312835
|
-
handleOptionalObjectResult4(r6, payload,
|
312379
|
+
handleOptionalObjectResult4(r6, payload, key3, input);
|
312836
312380
|
} else {
|
312837
|
-
handleObjectResult4(r6, payload,
|
312381
|
+
handleObjectResult4(r6, payload, key3);
|
312838
312382
|
}
|
312839
312383
|
}
|
312840
312384
|
}
|
@@ -312846,21 +312390,21 @@ var $ZodObject4 = /* @__PURE__ */ $constructor4("$ZodObject", (inst, def) => {
|
|
312846
312390
|
const keySet = value4.keySet;
|
312847
312391
|
const _catchall = catchall._zod;
|
312848
312392
|
const t8 = _catchall.def.type;
|
312849
|
-
for (const
|
312850
|
-
if (keySet.has(
|
312393
|
+
for (const key3 of Object.keys(input)) {
|
312394
|
+
if (keySet.has(key3))
|
312851
312395
|
continue;
|
312852
312396
|
if (t8 === "never") {
|
312853
|
-
unrecognized.push(
|
312397
|
+
unrecognized.push(key3);
|
312854
312398
|
continue;
|
312855
312399
|
}
|
312856
312400
|
const r6 = _catchall.run({
|
312857
|
-
value: input[
|
312401
|
+
value: input[key3],
|
312858
312402
|
issues: []
|
312859
312403
|
}, ctx);
|
312860
312404
|
if (r6 instanceof Promise) {
|
312861
|
-
proms.push(r6.then((r$1) => handleObjectResult4(r$1, payload,
|
312405
|
+
proms.push(r6.then((r$1) => handleObjectResult4(r$1, payload, key3)));
|
312862
312406
|
} else {
|
312863
|
-
handleObjectResult4(r6, payload,
|
312407
|
+
handleObjectResult4(r6, payload, key3);
|
312864
312408
|
}
|
312865
312409
|
}
|
312866
312410
|
if (unrecognized.length) {
|
@@ -313030,22 +312574,22 @@ function mergeValues4(a7, b4) {
|
|
313030
312574
|
data: a7
|
313031
312575
|
};
|
313032
312576
|
}
|
313033
|
-
if (
|
312577
|
+
if (isPlainObject7(a7) && isPlainObject7(b4)) {
|
313034
312578
|
const bKeys = Object.keys(b4);
|
313035
|
-
const sharedKeys = Object.keys(a7).filter((
|
312579
|
+
const sharedKeys = Object.keys(a7).filter((key3) => bKeys.indexOf(key3) !== -1);
|
313036
312580
|
const newObj = {
|
313037
312581
|
...a7,
|
313038
312582
|
...b4
|
313039
312583
|
};
|
313040
|
-
for (const
|
313041
|
-
const sharedValue = mergeValues4(a7[
|
312584
|
+
for (const key3 of sharedKeys) {
|
312585
|
+
const sharedValue = mergeValues4(a7[key3], b4[key3]);
|
313042
312586
|
if (!sharedValue.valid) {
|
313043
312587
|
return {
|
313044
312588
|
valid: false,
|
313045
|
-
mergeErrorPath: [
|
312589
|
+
mergeErrorPath: [key3, ...sharedValue.mergeErrorPath]
|
313046
312590
|
};
|
313047
312591
|
}
|
313048
|
-
newObj[
|
312592
|
+
newObj[key3] = sharedValue.data;
|
313049
312593
|
}
|
313050
312594
|
return {
|
313051
312595
|
valid: true,
|
@@ -313181,7 +312725,7 @@ var $ZodRecord4 = /* @__PURE__ */ $constructor4("$ZodRecord", (inst, def) => {
|
|
313181
312725
|
$ZodType4.init(inst, def);
|
313182
312726
|
inst._zod.parse = (payload, ctx) => {
|
313183
312727
|
const input = payload.value;
|
313184
|
-
if (!
|
312728
|
+
if (!isPlainObject7(input)) {
|
313185
312729
|
payload.issues.push({
|
313186
312730
|
expected: "record",
|
313187
312731
|
code: "invalid_type",
|
@@ -313194,32 +312738,32 @@ var $ZodRecord4 = /* @__PURE__ */ $constructor4("$ZodRecord", (inst, def) => {
|
|
313194
312738
|
if (def.keyType._zod.values) {
|
313195
312739
|
const values = def.keyType._zod.values;
|
313196
312740
|
payload.value = {};
|
313197
|
-
for (const
|
313198
|
-
if (typeof
|
312741
|
+
for (const key3 of values) {
|
312742
|
+
if (typeof key3 === "string" || typeof key3 === "number" || typeof key3 === "symbol") {
|
313199
312743
|
const result = def.valueType._zod.run({
|
313200
|
-
value: input[
|
312744
|
+
value: input[key3],
|
313201
312745
|
issues: []
|
313202
312746
|
}, ctx);
|
313203
312747
|
if (result instanceof Promise) {
|
313204
312748
|
proms.push(result.then((result$1) => {
|
313205
312749
|
if (result$1.issues.length) {
|
313206
|
-
payload.issues.push(...prefixIssues4(
|
312750
|
+
payload.issues.push(...prefixIssues4(key3, result$1.issues));
|
313207
312751
|
}
|
313208
|
-
payload.value[
|
312752
|
+
payload.value[key3] = result$1.value;
|
313209
312753
|
}));
|
313210
312754
|
} else {
|
313211
312755
|
if (result.issues.length) {
|
313212
|
-
payload.issues.push(...prefixIssues4(
|
312756
|
+
payload.issues.push(...prefixIssues4(key3, result.issues));
|
313213
312757
|
}
|
313214
|
-
payload.value[
|
312758
|
+
payload.value[key3] = result.value;
|
313215
312759
|
}
|
313216
312760
|
}
|
313217
312761
|
}
|
313218
312762
|
let unrecognized;
|
313219
|
-
for (const
|
313220
|
-
if (!values.has(
|
312763
|
+
for (const key3 in input) {
|
312764
|
+
if (!values.has(key3)) {
|
313221
312765
|
unrecognized = unrecognized ?? [];
|
313222
|
-
unrecognized.push(
|
312766
|
+
unrecognized.push(key3);
|
313223
312767
|
}
|
313224
312768
|
}
|
313225
312769
|
if (unrecognized && unrecognized.length > 0) {
|
@@ -313232,11 +312776,11 @@ var $ZodRecord4 = /* @__PURE__ */ $constructor4("$ZodRecord", (inst, def) => {
|
|
313232
312776
|
}
|
313233
312777
|
} else {
|
313234
312778
|
payload.value = {};
|
313235
|
-
for (const
|
313236
|
-
if (
|
312779
|
+
for (const key3 of Reflect.ownKeys(input)) {
|
312780
|
+
if (key3 === "__proto__")
|
313237
312781
|
continue;
|
313238
312782
|
const keyResult = def.keyType._zod.run({
|
313239
|
-
value:
|
312783
|
+
value: key3,
|
313240
312784
|
issues: []
|
313241
312785
|
}, ctx);
|
313242
312786
|
if (keyResult instanceof Promise) {
|
@@ -313247,27 +312791,27 @@ var $ZodRecord4 = /* @__PURE__ */ $constructor4("$ZodRecord", (inst, def) => {
|
|
313247
312791
|
origin: "record",
|
313248
312792
|
code: "invalid_key",
|
313249
312793
|
issues: keyResult.issues.map((iss) => finalizeIssue4(iss, ctx, config4())),
|
313250
|
-
input:
|
313251
|
-
path: [
|
312794
|
+
input: key3,
|
312795
|
+
path: [key3],
|
313252
312796
|
inst
|
313253
312797
|
});
|
313254
312798
|
payload.value[keyResult.value] = keyResult.value;
|
313255
312799
|
continue;
|
313256
312800
|
}
|
313257
312801
|
const result = def.valueType._zod.run({
|
313258
|
-
value: input[
|
312802
|
+
value: input[key3],
|
313259
312803
|
issues: []
|
313260
312804
|
}, ctx);
|
313261
312805
|
if (result instanceof Promise) {
|
313262
312806
|
proms.push(result.then((result$1) => {
|
313263
312807
|
if (result$1.issues.length) {
|
313264
|
-
payload.issues.push(...prefixIssues4(
|
312808
|
+
payload.issues.push(...prefixIssues4(key3, result$1.issues));
|
313265
312809
|
}
|
313266
312810
|
payload.value[keyResult.value] = result$1.value;
|
313267
312811
|
}));
|
313268
312812
|
} else {
|
313269
312813
|
if (result.issues.length) {
|
313270
|
-
payload.issues.push(...prefixIssues4(
|
312814
|
+
payload.issues.push(...prefixIssues4(key3, result.issues));
|
313271
312815
|
}
|
313272
312816
|
payload.value[keyResult.value] = result.value;
|
313273
312817
|
}
|
@@ -313294,9 +312838,9 @@ var $ZodMap4 = /* @__PURE__ */ $constructor4("$ZodMap", (inst, def) => {
|
|
313294
312838
|
}
|
313295
312839
|
const proms = [];
|
313296
312840
|
payload.value = new Map;
|
313297
|
-
for (const [
|
312841
|
+
for (const [key3, value4] of input) {
|
313298
312842
|
const keyResult = def.keyType._zod.run({
|
313299
|
-
value:
|
312843
|
+
value: key3,
|
313300
312844
|
issues: []
|
313301
312845
|
}, ctx);
|
313302
312846
|
const valueResult = def.valueType._zod.run({
|
@@ -313305,10 +312849,10 @@ var $ZodMap4 = /* @__PURE__ */ $constructor4("$ZodMap", (inst, def) => {
|
|
313305
312849
|
}, ctx);
|
313306
312850
|
if (keyResult instanceof Promise || valueResult instanceof Promise) {
|
313307
312851
|
proms.push(Promise.all([keyResult, valueResult]).then(([keyResult$1, valueResult$1]) => {
|
313308
|
-
handleMapResult4(keyResult$1, valueResult$1, payload,
|
312852
|
+
handleMapResult4(keyResult$1, valueResult$1, payload, key3, input, inst, ctx);
|
313309
312853
|
}));
|
313310
312854
|
} else {
|
313311
|
-
handleMapResult4(keyResult, valueResult, payload,
|
312855
|
+
handleMapResult4(keyResult, valueResult, payload, key3, input, inst, ctx);
|
313312
312856
|
}
|
313313
312857
|
}
|
313314
312858
|
if (proms.length)
|
@@ -313316,10 +312860,10 @@ var $ZodMap4 = /* @__PURE__ */ $constructor4("$ZodMap", (inst, def) => {
|
|
313316
312860
|
return payload;
|
313317
312861
|
};
|
313318
312862
|
});
|
313319
|
-
function handleMapResult4(keyResult, valueResult, final,
|
312863
|
+
function handleMapResult4(keyResult, valueResult, final, key3, input, inst, ctx) {
|
313320
312864
|
if (keyResult.issues.length) {
|
313321
|
-
if (propertyKeyTypes4.has(typeof
|
313322
|
-
final.issues.push(...prefixIssues4(
|
312865
|
+
if (propertyKeyTypes4.has(typeof key3)) {
|
312866
|
+
final.issues.push(...prefixIssues4(key3, keyResult.issues));
|
313323
312867
|
} else {
|
313324
312868
|
final.issues.push({
|
313325
312869
|
origin: "map",
|
@@ -313331,15 +312875,15 @@ function handleMapResult4(keyResult, valueResult, final, key4, input, inst, ctx)
|
|
313331
312875
|
}
|
313332
312876
|
}
|
313333
312877
|
if (valueResult.issues.length) {
|
313334
|
-
if (propertyKeyTypes4.has(typeof
|
313335
|
-
final.issues.push(...prefixIssues4(
|
312878
|
+
if (propertyKeyTypes4.has(typeof key3)) {
|
312879
|
+
final.issues.push(...prefixIssues4(key3, valueResult.issues));
|
313336
312880
|
} else {
|
313337
312881
|
final.issues.push({
|
313338
312882
|
origin: "map",
|
313339
312883
|
code: "invalid_element",
|
313340
312884
|
input,
|
313341
312885
|
inst,
|
313342
|
-
key:
|
312886
|
+
key: key3,
|
313343
312887
|
issues: valueResult.issues.map((iss) => finalizeIssue4(iss, ctx, config4()))
|
313344
312888
|
});
|
313345
312889
|
}
|
@@ -319661,19 +319205,19 @@ var JSONSchemaGenerator4 = class {
|
|
319661
319205
|
json$1.type = "object";
|
319662
319206
|
json$1.properties = {};
|
319663
319207
|
const shape = def.shape;
|
319664
|
-
for (const
|
319665
|
-
json$1.properties[
|
319208
|
+
for (const key3 in shape) {
|
319209
|
+
json$1.properties[key3] = this.process(shape[key3], {
|
319666
319210
|
...params,
|
319667
319211
|
path: [
|
319668
319212
|
...params.path,
|
319669
319213
|
"properties",
|
319670
|
-
|
319214
|
+
key3
|
319671
319215
|
]
|
319672
319216
|
});
|
319673
319217
|
}
|
319674
319218
|
const allKeys = new Set(Object.keys(shape));
|
319675
|
-
const requiredKeys = new Set([...allKeys].filter((
|
319676
|
-
const v6 = def.shape[
|
319219
|
+
const requiredKeys = new Set([...allKeys].filter((key3) => {
|
319220
|
+
const v6 = def.shape[key3]._zod;
|
319677
319221
|
if (this.io === "input") {
|
319678
319222
|
return v6.optin === undefined;
|
319679
319223
|
} else {
|
@@ -320025,8 +319569,8 @@ var JSONSchemaGenerator4 = class {
|
|
320025
319569
|
if (defId)
|
320026
319570
|
seen.defId = defId;
|
320027
319571
|
const schema$1 = seen.schema;
|
320028
|
-
for (const
|
320029
|
-
delete schema$1[
|
319572
|
+
for (const key3 in schema$1) {
|
319573
|
+
delete schema$1[key3];
|
320030
319574
|
}
|
320031
319575
|
schema$1.$ref = ref;
|
320032
319576
|
};
|
@@ -320137,8 +319681,8 @@ function toJSONSchema4(input, _params) {
|
|
320137
319681
|
defs
|
320138
319682
|
};
|
320139
319683
|
for (const entry of input._idmap.entries()) {
|
320140
|
-
const [
|
320141
|
-
schemas3[
|
319684
|
+
const [key3, schema] = entry;
|
319685
|
+
schemas3[key3] = gen$1.emit(schema, {
|
320142
319686
|
..._params,
|
320143
319687
|
external: external2
|
320144
319688
|
});
|
@@ -320183,8 +319727,8 @@ function isTransforming4(_schema, _ctx) {
|
|
320183
319727
|
return isTransforming4(def.element, ctx);
|
320184
319728
|
}
|
320185
319729
|
case "object": {
|
320186
|
-
for (const
|
320187
|
-
if (isTransforming4(def.shape[
|
319730
|
+
for (const key3 in def.shape) {
|
319731
|
+
if (isTransforming4(def.shape[key3], ctx))
|
320188
319732
|
return true;
|
320189
319733
|
}
|
320190
319734
|
return false;
|
@@ -322039,13 +321583,13 @@ var esm_default5 = createPrompt((config5, done) => {
|
|
322039
321583
|
const [value4, setValue] = useState("");
|
322040
321584
|
const theme = makeTheme(config5.theme);
|
322041
321585
|
const prefix = usePrefix({ status, theme });
|
322042
|
-
useKeypress((
|
322043
|
-
if (isEnterKey(
|
321586
|
+
useKeypress((key3, rl) => {
|
321587
|
+
if (isEnterKey(key3)) {
|
322044
321588
|
const answer = getBooleanValue(value4, config5.default);
|
322045
321589
|
setValue(transformer(answer));
|
322046
321590
|
setStatus("done");
|
322047
321591
|
done(answer);
|
322048
|
-
} else if (
|
321592
|
+
} else if (key3.name === "tab") {
|
322049
321593
|
const answer = boolToString(!getBooleanValue(value4, config5.default));
|
322050
321594
|
rl.clearLine(0);
|
322051
321595
|
rl.write(answer);
|
@@ -322066,9 +321610,9 @@ var esm_default5 = createPrompt((config5, done) => {
|
|
322066
321610
|
});
|
322067
321611
|
|
322068
321612
|
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/key.js
|
322069
|
-
var
|
321613
|
+
var isEnterKey3 = (key3) => key3.name === "enter" || key3.name === "return";
|
322070
321614
|
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/errors.js
|
322071
|
-
class
|
321615
|
+
class AbortPromptError3 extends Error {
|
322072
321616
|
name = "AbortPromptError";
|
322073
321617
|
message = "Prompt was aborted";
|
322074
321618
|
constructor(options) {
|
@@ -322077,29 +321621,29 @@ class AbortPromptError4 extends Error {
|
|
322077
321621
|
}
|
322078
321622
|
}
|
322079
321623
|
|
322080
|
-
class
|
321624
|
+
class CancelPromptError3 extends Error {
|
322081
321625
|
name = "CancelPromptError";
|
322082
321626
|
message = "Prompt was canceled";
|
322083
321627
|
}
|
322084
321628
|
|
322085
|
-
class
|
321629
|
+
class ExitPromptError3 extends Error {
|
322086
321630
|
name = "ExitPromptError";
|
322087
321631
|
}
|
322088
321632
|
|
322089
|
-
class
|
321633
|
+
class HookError3 extends Error {
|
322090
321634
|
name = "HookError";
|
322091
321635
|
}
|
322092
321636
|
|
322093
|
-
class
|
321637
|
+
class ValidationError3 extends Error {
|
322094
321638
|
name = "ValidationError";
|
322095
321639
|
}
|
322096
321640
|
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/use-state.js
|
322097
|
-
import { AsyncResource as
|
321641
|
+
import { AsyncResource as AsyncResource8 } from "node:async_hooks";
|
322098
321642
|
|
322099
321643
|
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/hook-engine.js
|
322100
|
-
import { AsyncLocalStorage as
|
322101
|
-
var
|
322102
|
-
function
|
321644
|
+
import { AsyncLocalStorage as AsyncLocalStorage3, AsyncResource as AsyncResource7 } from "node:async_hooks";
|
321645
|
+
var hookStorage3 = new AsyncLocalStorage3;
|
321646
|
+
function createStore3(rl) {
|
322103
321647
|
const store = {
|
322104
321648
|
rl,
|
322105
321649
|
hooks: [],
|
@@ -322110,9 +321654,9 @@ function createStore4(rl) {
|
|
322110
321654
|
};
|
322111
321655
|
return store;
|
322112
321656
|
}
|
322113
|
-
function
|
322114
|
-
const store =
|
322115
|
-
return
|
321657
|
+
function withHooks3(rl, cb) {
|
321658
|
+
const store = createStore3(rl);
|
321659
|
+
return hookStorage3.run(store, () => {
|
322116
321660
|
function cycle(render) {
|
322117
321661
|
store.handleChange = () => {
|
322118
321662
|
store.index = 0;
|
@@ -322123,19 +321667,19 @@ function withHooks4(rl, cb) {
|
|
322123
321667
|
return cb(cycle);
|
322124
321668
|
});
|
322125
321669
|
}
|
322126
|
-
function
|
322127
|
-
const store =
|
321670
|
+
function getStore3() {
|
321671
|
+
const store = hookStorage3.getStore();
|
322128
321672
|
if (!store) {
|
322129
|
-
throw new
|
321673
|
+
throw new HookError3("[Inquirer] Hook functions can only be called from within a prompt");
|
322130
321674
|
}
|
322131
321675
|
return store;
|
322132
321676
|
}
|
322133
|
-
function
|
322134
|
-
return
|
321677
|
+
function readline5() {
|
321678
|
+
return getStore3().rl;
|
322135
321679
|
}
|
322136
|
-
function
|
321680
|
+
function withUpdates3(fn) {
|
322137
321681
|
const wrapped = (...args) => {
|
322138
|
-
const store =
|
321682
|
+
const store = getStore3();
|
322139
321683
|
let shouldUpdate = false;
|
322140
321684
|
const oldHandleChange = store.handleChange;
|
322141
321685
|
store.handleChange = () => {
|
@@ -322148,10 +321692,10 @@ function withUpdates4(fn) {
|
|
322148
321692
|
store.handleChange = oldHandleChange;
|
322149
321693
|
return returnValue;
|
322150
321694
|
};
|
322151
|
-
return
|
321695
|
+
return AsyncResource7.bind(wrapped);
|
322152
321696
|
}
|
322153
|
-
function
|
322154
|
-
const store =
|
321697
|
+
function withPointer3(cb) {
|
321698
|
+
const store = getStore3();
|
322155
321699
|
const { index: index2 } = store;
|
322156
321700
|
const pointer = {
|
322157
321701
|
get() {
|
@@ -322166,25 +321710,25 @@ function withPointer4(cb) {
|
|
322166
321710
|
store.index++;
|
322167
321711
|
return returnValue;
|
322168
321712
|
}
|
322169
|
-
function
|
322170
|
-
|
321713
|
+
function handleChange3() {
|
321714
|
+
getStore3().handleChange();
|
322171
321715
|
}
|
322172
|
-
var
|
321716
|
+
var effectScheduler3 = {
|
322173
321717
|
queue(cb) {
|
322174
|
-
const store =
|
321718
|
+
const store = getStore3();
|
322175
321719
|
const { index: index2 } = store;
|
322176
321720
|
store.hooksEffect.push(() => {
|
322177
321721
|
store.hooksCleanup[index2]?.();
|
322178
|
-
const cleanFn = cb(
|
321722
|
+
const cleanFn = cb(readline5());
|
322179
321723
|
if (cleanFn != null && typeof cleanFn !== "function") {
|
322180
|
-
throw new
|
321724
|
+
throw new ValidationError3("useEffect return value must be a cleanup function or nothing.");
|
322181
321725
|
}
|
322182
321726
|
store.hooksCleanup[index2] = cleanFn;
|
322183
321727
|
});
|
322184
321728
|
},
|
322185
321729
|
run() {
|
322186
|
-
const store =
|
322187
|
-
|
321730
|
+
const store = getStore3();
|
321731
|
+
withUpdates3(() => {
|
322188
321732
|
store.hooksEffect.forEach((effect) => {
|
322189
321733
|
effect();
|
322190
321734
|
});
|
@@ -322192,7 +321736,7 @@ var effectScheduler4 = {
|
|
322192
321736
|
})();
|
322193
321737
|
},
|
322194
321738
|
clearAll() {
|
322195
|
-
const store =
|
321739
|
+
const store = getStore3();
|
322196
321740
|
store.hooksCleanup.forEach((cleanFn) => {
|
322197
321741
|
cleanFn?.();
|
322198
321742
|
});
|
@@ -322202,12 +321746,12 @@ var effectScheduler4 = {
|
|
322202
321746
|
};
|
322203
321747
|
|
322204
321748
|
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/use-state.js
|
322205
|
-
function
|
322206
|
-
return
|
322207
|
-
const setState =
|
321749
|
+
function useState3(defaultValue) {
|
321750
|
+
return withPointer3((pointer) => {
|
321751
|
+
const setState = AsyncResource8.bind(function setState(newValue) {
|
322208
321752
|
if (pointer.get() !== newValue) {
|
322209
321753
|
pointer.set(newValue);
|
322210
|
-
|
321754
|
+
handleChange3();
|
322211
321755
|
}
|
322212
321756
|
});
|
322213
321757
|
if (pointer.initialized) {
|
@@ -322220,41 +321764,41 @@ function useState4(defaultValue) {
|
|
322220
321764
|
}
|
322221
321765
|
|
322222
321766
|
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/use-effect.js
|
322223
|
-
function
|
322224
|
-
|
321767
|
+
function useEffect3(cb, depArray) {
|
321768
|
+
withPointer3((pointer) => {
|
322225
321769
|
const oldDeps = pointer.get();
|
322226
321770
|
const hasChanged = !Array.isArray(oldDeps) || depArray.some((dep, i6) => !Object.is(dep, oldDeps[i6]));
|
322227
321771
|
if (hasChanged) {
|
322228
|
-
|
321772
|
+
effectScheduler3.queue(cb);
|
322229
321773
|
}
|
322230
321774
|
pointer.set(depArray);
|
322231
321775
|
});
|
322232
321776
|
}
|
322233
321777
|
|
322234
321778
|
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/theme.js
|
322235
|
-
var
|
322236
|
-
var
|
321779
|
+
var import_yoctocolors_cjs5 = __toESM(require_yoctocolors_cjs(), 1);
|
321780
|
+
var defaultTheme3 = {
|
322237
321781
|
prefix: {
|
322238
|
-
idle:
|
322239
|
-
done:
|
321782
|
+
idle: import_yoctocolors_cjs5.default.blue("?"),
|
321783
|
+
done: import_yoctocolors_cjs5.default.green(esm_default3.tick)
|
322240
321784
|
},
|
322241
321785
|
spinner: {
|
322242
321786
|
interval: 80,
|
322243
|
-
frames: ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"].map((frame) =>
|
321787
|
+
frames: ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"].map((frame) => import_yoctocolors_cjs5.default.yellow(frame))
|
322244
321788
|
},
|
322245
321789
|
style: {
|
322246
|
-
answer:
|
322247
|
-
message:
|
322248
|
-
error: (text2) =>
|
322249
|
-
defaultAnswer: (text2) =>
|
322250
|
-
help:
|
322251
|
-
highlight:
|
322252
|
-
key: (text2) =>
|
321790
|
+
answer: import_yoctocolors_cjs5.default.cyan,
|
321791
|
+
message: import_yoctocolors_cjs5.default.bold,
|
321792
|
+
error: (text2) => import_yoctocolors_cjs5.default.red(`> ${text2}`),
|
321793
|
+
defaultAnswer: (text2) => import_yoctocolors_cjs5.default.dim(`(${text2})`),
|
321794
|
+
help: import_yoctocolors_cjs5.default.dim,
|
321795
|
+
highlight: import_yoctocolors_cjs5.default.cyan,
|
321796
|
+
key: (text2) => import_yoctocolors_cjs5.default.cyan(import_yoctocolors_cjs5.default.bold(`<${text2}>`))
|
322253
321797
|
}
|
322254
321798
|
};
|
322255
321799
|
|
322256
321800
|
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/make-theme.js
|
322257
|
-
function
|
321801
|
+
function isPlainObject8(value4) {
|
322258
321802
|
if (typeof value4 !== "object" || value4 === null)
|
322259
321803
|
return false;
|
322260
321804
|
let proto = value4;
|
@@ -322263,30 +321807,30 @@ function isPlainObject9(value4) {
|
|
322263
321807
|
}
|
322264
321808
|
return Object.getPrototypeOf(value4) === proto;
|
322265
321809
|
}
|
322266
|
-
function
|
321810
|
+
function deepMerge4(...objects) {
|
322267
321811
|
const output = {};
|
322268
321812
|
for (const obj of objects) {
|
322269
|
-
for (const [
|
322270
|
-
const prevValue = output[
|
322271
|
-
output[
|
321813
|
+
for (const [key3, value4] of Object.entries(obj)) {
|
321814
|
+
const prevValue = output[key3];
|
321815
|
+
output[key3] = isPlainObject8(prevValue) && isPlainObject8(value4) ? deepMerge4(prevValue, value4) : value4;
|
322272
321816
|
}
|
322273
321817
|
}
|
322274
321818
|
return output;
|
322275
321819
|
}
|
322276
|
-
function
|
321820
|
+
function makeTheme3(...themes) {
|
322277
321821
|
const themesToMerge = [
|
322278
|
-
|
321822
|
+
defaultTheme3,
|
322279
321823
|
...themes.filter((theme) => theme != null)
|
322280
321824
|
];
|
322281
|
-
return
|
321825
|
+
return deepMerge4(...themesToMerge);
|
322282
321826
|
}
|
322283
321827
|
|
322284
321828
|
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/use-prefix.js
|
322285
|
-
function
|
322286
|
-
const [showLoader, setShowLoader] =
|
322287
|
-
const [tick, setTick] =
|
322288
|
-
const { prefix, spinner: spinner2 } =
|
322289
|
-
|
321829
|
+
function usePrefix3({ status = "idle", theme }) {
|
321830
|
+
const [showLoader, setShowLoader] = useState3(false);
|
321831
|
+
const [tick, setTick] = useState3(0);
|
321832
|
+
const { prefix, spinner: spinner2 } = makeTheme3(theme);
|
321833
|
+
useEffect3(() => {
|
322290
321834
|
if (status === "loading") {
|
322291
321835
|
let tickInterval;
|
322292
321836
|
let inc = -1;
|
@@ -322312,17 +321856,17 @@ function usePrefix4({ status = "idle", theme }) {
|
|
322312
321856
|
return typeof prefix === "string" ? prefix : prefix[iconName] ?? prefix["idle"];
|
322313
321857
|
}
|
322314
321858
|
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/use-ref.js
|
322315
|
-
function
|
322316
|
-
return
|
321859
|
+
function useRef3(val) {
|
321860
|
+
return useState3({ current: val })[0];
|
322317
321861
|
}
|
322318
321862
|
|
322319
321863
|
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/use-keypress.js
|
322320
|
-
function
|
322321
|
-
const signal =
|
321864
|
+
function useKeypress3(userHandler) {
|
321865
|
+
const signal = useRef3(userHandler);
|
322322
321866
|
signal.current = userHandler;
|
322323
|
-
|
321867
|
+
useEffect3((rl) => {
|
322324
321868
|
let ignore = false;
|
322325
|
-
const handler =
|
321869
|
+
const handler = withUpdates3((_input, event) => {
|
322326
321870
|
if (ignore)
|
322327
321871
|
return;
|
322328
321872
|
signal.current(event, rl);
|
@@ -322335,35 +321879,35 @@ function useKeypress4(userHandler) {
|
|
322335
321879
|
}, []);
|
322336
321880
|
}
|
322337
321881
|
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/utils.js
|
322338
|
-
var
|
322339
|
-
var
|
322340
|
-
function
|
321882
|
+
var import_cli_width3 = __toESM(require_cli_width(), 1);
|
321883
|
+
var import_wrap_ansi3 = __toESM(require_wrap_ansi(), 1);
|
321884
|
+
function breakLines3(content, width) {
|
322341
321885
|
return content.split(`
|
322342
|
-
`).flatMap((line) =>
|
321886
|
+
`).flatMap((line) => import_wrap_ansi3.default(line, width, { trim: false, hard: true }).split(`
|
322343
321887
|
`).map((str) => str.trimEnd())).join(`
|
322344
321888
|
`);
|
322345
321889
|
}
|
322346
|
-
function
|
322347
|
-
return
|
321890
|
+
function readlineWidth3() {
|
321891
|
+
return import_cli_width3.default({ defaultWidth: 80, output: readline5().output });
|
322348
321892
|
}
|
322349
321893
|
|
322350
321894
|
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
|
322351
|
-
var
|
322352
|
-
import * as
|
322353
|
-
import { AsyncResource as
|
321895
|
+
var import_mute_stream3 = __toESM(require_lib(), 1);
|
321896
|
+
import * as readline6 from "node:readline";
|
321897
|
+
import { AsyncResource as AsyncResource9 } from "node:async_hooks";
|
322354
321898
|
|
322355
321899
|
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/screen-manager.js
|
322356
|
-
var
|
322357
|
-
import { stripVTControlCharacters as
|
322358
|
-
var
|
321900
|
+
var import_ansi_escapes4 = __toESM(require_ansi_escapes(), 1);
|
321901
|
+
import { stripVTControlCharacters as stripVTControlCharacters4 } from "node:util";
|
321902
|
+
var height3 = (content) => content.split(`
|
322359
321903
|
`).length;
|
322360
|
-
var
|
321904
|
+
var lastLine3 = (content) => content.split(`
|
322361
321905
|
`).pop() ?? "";
|
322362
|
-
function
|
322363
|
-
return n6 > 0 ?
|
321906
|
+
function cursorDown3(n6) {
|
321907
|
+
return n6 > 0 ? import_ansi_escapes4.default.cursorDown(n6) : "";
|
322364
321908
|
}
|
322365
321909
|
|
322366
|
-
class
|
321910
|
+
class ScreenManager3 {
|
322367
321911
|
height = 0;
|
322368
321912
|
extraLinesUnderPrompt = 0;
|
322369
321913
|
cursorPos;
|
@@ -322378,17 +321922,17 @@ class ScreenManager4 {
|
|
322378
321922
|
this.rl.output.mute();
|
322379
321923
|
}
|
322380
321924
|
render(content, bottomContent = "") {
|
322381
|
-
const promptLine =
|
322382
|
-
const rawPromptLine =
|
321925
|
+
const promptLine = lastLine3(content);
|
321926
|
+
const rawPromptLine = stripVTControlCharacters4(promptLine);
|
322383
321927
|
let prompt = rawPromptLine;
|
322384
321928
|
if (this.rl.line.length > 0) {
|
322385
321929
|
prompt = prompt.slice(0, -this.rl.line.length);
|
322386
321930
|
}
|
322387
321931
|
this.rl.setPrompt(prompt);
|
322388
321932
|
this.cursorPos = this.rl.getCursorPos();
|
322389
|
-
const width =
|
322390
|
-
content =
|
322391
|
-
bottomContent =
|
321933
|
+
const width = readlineWidth3();
|
321934
|
+
content = breakLines3(content, width);
|
321935
|
+
bottomContent = breakLines3(bottomContent, width);
|
322392
321936
|
if (rawPromptLine.length % width === 0) {
|
322393
321937
|
content += `
|
322394
321938
|
`;
|
@@ -322396,34 +321940,34 @@ class ScreenManager4 {
|
|
322396
321940
|
let output = content + (bottomContent ? `
|
322397
321941
|
` + bottomContent : "");
|
322398
321942
|
const promptLineUpDiff = Math.floor(rawPromptLine.length / width) - this.cursorPos.rows;
|
322399
|
-
const bottomContentHeight = promptLineUpDiff + (bottomContent ?
|
321943
|
+
const bottomContentHeight = promptLineUpDiff + (bottomContent ? height3(bottomContent) : 0);
|
322400
321944
|
if (bottomContentHeight > 0)
|
322401
|
-
output +=
|
322402
|
-
output +=
|
322403
|
-
this.write(
|
321945
|
+
output += import_ansi_escapes4.default.cursorUp(bottomContentHeight);
|
321946
|
+
output += import_ansi_escapes4.default.cursorTo(this.cursorPos.cols);
|
321947
|
+
this.write(cursorDown3(this.extraLinesUnderPrompt) + import_ansi_escapes4.default.eraseLines(this.height) + output);
|
322404
321948
|
this.extraLinesUnderPrompt = bottomContentHeight;
|
322405
|
-
this.height =
|
321949
|
+
this.height = height3(output);
|
322406
321950
|
}
|
322407
321951
|
checkCursorPos() {
|
322408
321952
|
const cursorPos = this.rl.getCursorPos();
|
322409
321953
|
if (cursorPos.cols !== this.cursorPos.cols) {
|
322410
|
-
this.write(
|
321954
|
+
this.write(import_ansi_escapes4.default.cursorTo(cursorPos.cols));
|
322411
321955
|
this.cursorPos = cursorPos;
|
322412
321956
|
}
|
322413
321957
|
}
|
322414
321958
|
done({ clearContent }) {
|
322415
321959
|
this.rl.setPrompt("");
|
322416
|
-
let output =
|
322417
|
-
output += clearContent ?
|
321960
|
+
let output = cursorDown3(this.extraLinesUnderPrompt);
|
321961
|
+
output += clearContent ? import_ansi_escapes4.default.eraseLines(this.height) : `
|
322418
321962
|
`;
|
322419
|
-
output +=
|
321963
|
+
output += import_ansi_escapes4.default.cursorShow;
|
322420
321964
|
this.write(output);
|
322421
321965
|
this.rl.close();
|
322422
321966
|
}
|
322423
321967
|
}
|
322424
321968
|
|
322425
321969
|
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/promise-polyfill.js
|
322426
|
-
class
|
321970
|
+
class PromisePolyfill3 extends Promise {
|
322427
321971
|
static withResolver() {
|
322428
321972
|
let resolve6;
|
322429
321973
|
let reject;
|
@@ -322436,7 +321980,7 @@ class PromisePolyfill4 extends Promise {
|
|
322436
321980
|
}
|
322437
321981
|
|
322438
321982
|
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
|
322439
|
-
function
|
321983
|
+
function getCallSites3() {
|
322440
321984
|
const _prepareStackTrace = Error.prepareStackTrace;
|
322441
321985
|
let result = [];
|
322442
321986
|
try {
|
@@ -322452,23 +321996,23 @@ function getCallSites4() {
|
|
322452
321996
|
Error.prepareStackTrace = _prepareStackTrace;
|
322453
321997
|
return result;
|
322454
321998
|
}
|
322455
|
-
function
|
322456
|
-
const callSites =
|
321999
|
+
function createPrompt3(view) {
|
322000
|
+
const callSites = getCallSites3();
|
322457
322001
|
const prompt = (config5, context = {}) => {
|
322458
322002
|
const { input = process.stdin, signal } = context;
|
322459
322003
|
const cleanups = new Set;
|
322460
|
-
const output = new
|
322004
|
+
const output = new import_mute_stream3.default;
|
322461
322005
|
output.pipe(context.output ?? process.stdout);
|
322462
|
-
const rl =
|
322006
|
+
const rl = readline6.createInterface({
|
322463
322007
|
terminal: true,
|
322464
322008
|
input,
|
322465
322009
|
output
|
322466
322010
|
});
|
322467
|
-
const screen = new
|
322468
|
-
const { promise: promise5, resolve: resolve6, reject } =
|
322469
|
-
const cancel3 = () => reject(new
|
322011
|
+
const screen = new ScreenManager3(rl);
|
322012
|
+
const { promise: promise5, resolve: resolve6, reject } = PromisePolyfill3.withResolver();
|
322013
|
+
const cancel3 = () => reject(new CancelPromptError3);
|
322470
322014
|
if (signal) {
|
322471
|
-
const abort = () => reject(new
|
322015
|
+
const abort = () => reject(new AbortPromptError3({ cause: signal.reason }));
|
322472
322016
|
if (signal.aborted) {
|
322473
322017
|
abort();
|
322474
322018
|
return Object.assign(promise5, { cancel: cancel3 });
|
@@ -322477,16 +322021,16 @@ function createPrompt4(view) {
|
|
322477
322021
|
cleanups.add(() => signal.removeEventListener("abort", abort));
|
322478
322022
|
}
|
322479
322023
|
cleanups.add(onExit((code2, signal2) => {
|
322480
|
-
reject(new
|
322024
|
+
reject(new ExitPromptError3(`User force closed the prompt with ${code2} ${signal2}`));
|
322481
322025
|
}));
|
322482
|
-
const sigint = () => reject(new
|
322026
|
+
const sigint = () => reject(new ExitPromptError3(`User force closed the prompt with SIGINT`));
|
322483
322027
|
rl.on("SIGINT", sigint);
|
322484
322028
|
cleanups.add(() => rl.removeListener("SIGINT", sigint));
|
322485
322029
|
const checkCursorPos = () => screen.checkCursorPos();
|
322486
322030
|
rl.input.on("keypress", checkCursorPos);
|
322487
322031
|
cleanups.add(() => rl.input.removeListener("keypress", checkCursorPos));
|
322488
|
-
return
|
322489
|
-
const hooksCleanup =
|
322032
|
+
return withHooks3(rl, (cycle) => {
|
322033
|
+
const hooksCleanup = AsyncResource9.bind(() => effectScheduler3.clearAll());
|
322490
322034
|
rl.on("close", hooksCleanup);
|
322491
322035
|
cleanups.add(() => rl.removeListener("close", hooksCleanup));
|
322492
322036
|
cycle(() => {
|
@@ -322501,16 +322045,16 @@ function createPrompt4(view) {
|
|
322501
322045
|
}
|
322502
322046
|
const [content, bottomContent] = typeof nextView === "string" ? [nextView] : nextView;
|
322503
322047
|
screen.render(content, bottomContent);
|
322504
|
-
|
322048
|
+
effectScheduler3.run();
|
322505
322049
|
} catch (error45) {
|
322506
322050
|
reject(error45);
|
322507
322051
|
}
|
322508
322052
|
});
|
322509
322053
|
return Object.assign(promise5.then((answer) => {
|
322510
|
-
|
322054
|
+
effectScheduler3.clearAll();
|
322511
322055
|
return answer;
|
322512
322056
|
}, (error45) => {
|
322513
|
-
|
322057
|
+
effectScheduler3.clearAll();
|
322514
322058
|
throw error45;
|
322515
322059
|
}).finally(() => {
|
322516
322060
|
cleanups.forEach((cleanup) => cleanup());
|
@@ -322522,19 +322066,19 @@ function createPrompt4(view) {
|
|
322522
322066
|
return prompt;
|
322523
322067
|
}
|
322524
322068
|
// ../../node_modules/@inquirer/password/dist/esm/index.js
|
322525
|
-
var
|
322526
|
-
var esm_default6 =
|
322069
|
+
var import_ansi_escapes5 = __toESM(require_ansi_escapes(), 1);
|
322070
|
+
var esm_default6 = createPrompt3((config5, done) => {
|
322527
322071
|
const { validate: validate5 = () => true } = config5;
|
322528
|
-
const theme =
|
322529
|
-
const [status, setStatus] =
|
322530
|
-
const [errorMsg, setError] =
|
322531
|
-
const [value4, setValue] =
|
322532
|
-
const prefix =
|
322533
|
-
|
322072
|
+
const theme = makeTheme3(config5.theme);
|
322073
|
+
const [status, setStatus] = useState3("idle");
|
322074
|
+
const [errorMsg, setError] = useState3();
|
322075
|
+
const [value4, setValue] = useState3("");
|
322076
|
+
const prefix = usePrefix3({ status, theme });
|
322077
|
+
useKeypress3(async (key4, rl) => {
|
322534
322078
|
if (status !== "idle") {
|
322535
322079
|
return;
|
322536
322080
|
}
|
322537
|
-
if (
|
322081
|
+
if (isEnterKey3(key4)) {
|
322538
322082
|
const answer = value4;
|
322539
322083
|
setStatus("loading");
|
322540
322084
|
const isValid = await validate5(answer);
|
@@ -322559,7 +322103,7 @@ var esm_default6 = createPrompt4((config5, done) => {
|
|
322559
322103
|
const maskChar = typeof config5.mask === "string" ? config5.mask : "*";
|
322560
322104
|
formattedValue = maskChar.repeat(value4.length);
|
322561
322105
|
} else if (status !== "done") {
|
322562
|
-
helpTip = `${theme.style.help("[input is masked]")}${
|
322106
|
+
helpTip = `${theme.style.help("[input is masked]")}${import_ansi_escapes5.default.cursorHide}`;
|
322563
322107
|
}
|
322564
322108
|
if (status === "done") {
|
322565
322109
|
formattedValue = theme.style.answer(formattedValue);
|
@@ -322594,7 +322138,7 @@ async function applicationAccessTokenPrompt(env2, application, settlemint, accep
|
|
322594
322138
|
default: false
|
322595
322139
|
});
|
322596
322140
|
if (create2) {
|
322597
|
-
const name3 = await
|
322141
|
+
const name3 = await esm_default2({
|
322598
322142
|
message: "How would you like to name this application access token?",
|
322599
322143
|
default: `SettleMint CLI (${Date.now()}${process.env.USER ? ` ${process.env.USER}` : ""})`,
|
322600
322144
|
required: true,
|
@@ -323060,7 +322604,7 @@ async function instancePrompt({
|
|
323060
322604
|
return sanitizeInstanceUrl(defaultPromptInstance);
|
323061
322605
|
}
|
323062
322606
|
if (freeTextInput) {
|
323063
|
-
const instance = await
|
322607
|
+
const instance = await esm_default2({
|
323064
322608
|
message: "What is the URL of your SettleMint instance?",
|
323065
322609
|
default: defaultPromptInstance,
|
323066
322610
|
required: true,
|
@@ -323144,7 +322688,7 @@ async function serviceUrlPrompt({
|
|
323144
322688
|
if (isCi) {
|
323145
322689
|
return defaultUrl ? new URL(defaultUrl).toString() : undefined;
|
323146
322690
|
}
|
323147
|
-
const serviceUrl = await
|
322691
|
+
const serviceUrl = await esm_default2({
|
323148
322692
|
message: example ? `${message} (eg ${example})` : message,
|
323149
322693
|
default: defaultUrl,
|
323150
322694
|
required: true,
|
@@ -323579,7 +323123,7 @@ async function serviceValuePrompt({
|
|
323579
323123
|
if (isCi) {
|
323580
323124
|
return defaultValue;
|
323581
323125
|
}
|
323582
|
-
const serviceSecret = await
|
323126
|
+
const serviceSecret = await esm_default2({
|
323583
323127
|
message: example ? `${message} (eg ${example})` : message,
|
323584
323128
|
default: defaultValue
|
323585
323129
|
});
|
@@ -324035,7 +323579,7 @@ async function projectNamePrompt(env2, argument) {
|
|
324035
323579
|
if (defaultInstance) {
|
324036
323580
|
return defaultInstance;
|
324037
323581
|
}
|
324038
|
-
return
|
323582
|
+
return esm_default2({
|
324039
323583
|
message: "What is the name of your new SettleMint project?",
|
324040
323584
|
default: defaultInstance,
|
324041
323585
|
required: true,
|
@@ -324237,7 +323781,7 @@ var basename2 = function(p5, extension) {
|
|
324237
323781
|
return extension && lastSegment.endsWith(extension) ? lastSegment.slice(0, -extension.length) : lastSegment;
|
324238
323782
|
};
|
324239
323783
|
// ../../node_modules/defu/dist/defu.mjs
|
324240
|
-
function
|
323784
|
+
function isPlainObject9(value4) {
|
324241
323785
|
if (value4 === null || typeof value4 !== "object") {
|
324242
323786
|
return false;
|
324243
323787
|
}
|
@@ -324254,27 +323798,27 @@ function isPlainObject10(value4) {
|
|
324254
323798
|
return true;
|
324255
323799
|
}
|
324256
323800
|
function _defu(baseObject, defaults4, namespace = ".", merger) {
|
324257
|
-
if (!
|
323801
|
+
if (!isPlainObject9(defaults4)) {
|
324258
323802
|
return _defu(baseObject, {}, namespace, merger);
|
324259
323803
|
}
|
324260
323804
|
const object5 = Object.assign({}, defaults4);
|
324261
|
-
for (const
|
324262
|
-
if (
|
323805
|
+
for (const key4 in baseObject) {
|
323806
|
+
if (key4 === "__proto__" || key4 === "constructor") {
|
324263
323807
|
continue;
|
324264
323808
|
}
|
324265
|
-
const value4 = baseObject[
|
323809
|
+
const value4 = baseObject[key4];
|
324266
323810
|
if (value4 === null || value4 === undefined) {
|
324267
323811
|
continue;
|
324268
323812
|
}
|
324269
|
-
if (merger && merger(object5,
|
323813
|
+
if (merger && merger(object5, key4, value4, namespace)) {
|
324270
323814
|
continue;
|
324271
323815
|
}
|
324272
|
-
if (Array.isArray(value4) && Array.isArray(object5[
|
324273
|
-
object5[
|
324274
|
-
} else if (
|
324275
|
-
object5[
|
323816
|
+
if (Array.isArray(value4) && Array.isArray(object5[key4])) {
|
323817
|
+
object5[key4] = [...value4, ...object5[key4]];
|
323818
|
+
} else if (isPlainObject9(value4) && isPlainObject9(object5[key4])) {
|
323819
|
+
object5[key4] = _defu(value4, object5[key4], (namespace ? `${namespace}.` : "") + key4.toString(), merger);
|
324276
323820
|
} else {
|
324277
|
-
object5[
|
323821
|
+
object5[key4] = value4;
|
324278
323822
|
}
|
324279
323823
|
}
|
324280
323824
|
return object5;
|
@@ -324283,15 +323827,15 @@ function createDefu(merger) {
|
|
324283
323827
|
return (...arguments_4) => arguments_4.reduce((p5, c3) => _defu(p5, c3, "", merger), {});
|
324284
323828
|
}
|
324285
323829
|
var defu = createDefu();
|
324286
|
-
var defuFn = createDefu((object5,
|
324287
|
-
if (object5[
|
324288
|
-
object5[
|
323830
|
+
var defuFn = createDefu((object5, key4, currentValue) => {
|
323831
|
+
if (object5[key4] !== undefined && typeof currentValue === "function") {
|
323832
|
+
object5[key4] = currentValue(object5[key4]);
|
324289
323833
|
return true;
|
324290
323834
|
}
|
324291
323835
|
});
|
324292
|
-
var defuArrayFn = createDefu((object5,
|
324293
|
-
if (Array.isArray(object5[
|
324294
|
-
object5[
|
323836
|
+
var defuArrayFn = createDefu((object5, key4, currentValue) => {
|
323837
|
+
if (Array.isArray(object5[key4]) && typeof currentValue === "function") {
|
323838
|
+
object5[key4] = currentValue(object5[key4]);
|
324295
323839
|
return true;
|
324296
323840
|
}
|
324297
323841
|
});
|
@@ -327501,11 +327045,11 @@ function cacheDirectory() {
|
|
327501
327045
|
}
|
327502
327046
|
function normalizeHeaders(headers = {}) {
|
327503
327047
|
const normalized = {};
|
327504
|
-
for (const [
|
327048
|
+
for (const [key4, value4] of Object.entries(headers)) {
|
327505
327049
|
if (!value4) {
|
327506
327050
|
continue;
|
327507
327051
|
}
|
327508
|
-
normalized[
|
327052
|
+
normalized[key4.toLowerCase()] = value4;
|
327509
327053
|
}
|
327510
327054
|
return normalized;
|
327511
327055
|
}
|
@@ -329890,7 +329434,7 @@ function createCommand3() {
|
|
329890
329434
|
|
329891
329435
|
// src/prompts/delete-confirmation.prompt.ts
|
329892
329436
|
async function deleteConfirmationPrompt(itemDescription) {
|
329893
|
-
const confirmation = await
|
329437
|
+
const confirmation = await esm_default2({
|
329894
329438
|
message: `Are you sure you want to delete ${itemDescription}? (yes/no)`,
|
329895
329439
|
required: true,
|
329896
329440
|
validate(value4) {
|
@@ -330750,7 +330294,7 @@ function jsonOutput(data) {
|
|
330750
330294
|
var composer = require_composer();
|
330751
330295
|
var Document = require_Document();
|
330752
330296
|
var Schema = require_Schema();
|
330753
|
-
var
|
330297
|
+
var errors6 = require_errors3();
|
330754
330298
|
var Alias = require_Alias();
|
330755
330299
|
var identity2 = require_identity();
|
330756
330300
|
var Pair = require_Pair();
|
@@ -330766,9 +330310,9 @@ var visit2 = require_visit();
|
|
330766
330310
|
var $Composer = composer.Composer;
|
330767
330311
|
var $Document = Document.Document;
|
330768
330312
|
var $Schema = Schema.Schema;
|
330769
|
-
var $YAMLError =
|
330770
|
-
var $YAMLParseError =
|
330771
|
-
var $YAMLWarning =
|
330313
|
+
var $YAMLError = errors6.YAMLError;
|
330314
|
+
var $YAMLParseError = errors6.YAMLParseError;
|
330315
|
+
var $YAMLWarning = errors6.YAMLWarning;
|
330772
330316
|
var $Alias = Alias.Alias;
|
330773
330317
|
var $isAlias = identity2.isAlias;
|
330774
330318
|
var $isCollection = identity2.isCollection;
|
@@ -331375,11 +330919,11 @@ function createCommand4() {
|
|
331375
330919
|
|
331376
330920
|
// src/utils/commands/passthrough-options.ts
|
331377
330921
|
function mapPassthroughOptions(options, command) {
|
331378
|
-
const optionArgs = Object.entries(options).map(([
|
330922
|
+
const optionArgs = Object.entries(options).map(([key4, value4]) => {
|
331379
330923
|
if (value4 === true) {
|
331380
|
-
return `--${
|
330924
|
+
return `--${key4}`;
|
331381
330925
|
}
|
331382
|
-
return `--${
|
330926
|
+
return `--${key4}=${value4}`;
|
331383
330927
|
});
|
331384
330928
|
return [...optionArgs, ...command.args];
|
331385
330929
|
}
|
@@ -331635,7 +331179,7 @@ async function addressPrompt({
|
|
331635
331179
|
hardhatConfig
|
331636
331180
|
}) {
|
331637
331181
|
if (!node) {
|
331638
|
-
return
|
331182
|
+
return esm_default2({
|
331639
331183
|
message: "Which private key address do you want to deploy from?",
|
331640
331184
|
validate: (value4) => {
|
331641
331185
|
if (!isAddress(value4)) {
|
@@ -332608,4 +332152,4 @@ async function sdkCliCommand(argv = process.argv) {
|
|
332608
332152
|
// src/cli.ts
|
332609
332153
|
sdkCliCommand();
|
332610
332154
|
|
332611
|
-
//# debugId=
|
332155
|
+
//# debugId=41B5E17E2E193AB564756E2164756E21
|