@settlemint/sdk-cli 2.4.0-pr1e769aef → 2.4.0-pr24b8b7b9
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 +471 -927
- package/dist/cli.js.map +30 -44
- package/package.json +5 -5
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(key2) {
|
232836
|
+
const value4 = super.get(key2);
|
232837
|
+
if (super.has(key2) && value4 !== undefined) {
|
232838
|
+
this.delete(key2);
|
232839
|
+
super.set(key2, value4);
|
232840
232840
|
}
|
232841
232841
|
return value4;
|
232842
232842
|
}
|
232843
|
-
set(
|
232844
|
-
super.set(
|
232843
|
+
set(key2, value4) {
|
232844
|
+
super.set(key2, 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, (key2, value_) => {
|
233887
233887
|
const value5 = typeof value_ === "bigint" ? value_.toString() : value_;
|
233888
|
-
return typeof replacer === "function" ? replacer(
|
233888
|
+
return typeof replacer === "function" ? replacer(key2, 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(([key2, value4]) => {
|
234003
234003
|
if (value4 === undefined || value4 === false)
|
234004
234004
|
return null;
|
234005
|
-
return [
|
234005
|
+
return [key2, value4];
|
234006
234006
|
}).filter(Boolean);
|
234007
|
-
const maxLength = entries.reduce((acc, [
|
234008
|
-
return entries.map(([
|
234007
|
+
const maxLength = entries.reduce((acc, [key2]) => Math.max(acc, key2.length), 0);
|
234008
|
+
return entries.map(([key2, value4]) => ` ${`${key2}:`.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, key2, message) => new HMAC(hash2, key2).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 key2 = 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(key2.length > blockLen ? hash2.create().update(key2).digest() : key2);
|
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, key2) => new HMAC(hash2, key2);
|
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(key2, fieldOrder, isLE2 = false) {
|
235583
|
+
const len = key2.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(key2) : bytesToNumberBE(key2);
|
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(key2) {
|
235892
235892
|
let num;
|
235893
|
-
if (typeof
|
235894
|
-
num =
|
235893
|
+
if (typeof key2 === "bigint") {
|
235894
|
+
num = key2;
|
235895
235895
|
} else {
|
235896
|
-
let bytes = ensureBytes("private key",
|
235896
|
+
let bytes = ensureBytes("private key", key2);
|
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 key2}`);
|
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 || ((key2, ...msgs) => hmac(ecdsaOpts.hash, key2, 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 key2 of keys) {
|
237468
|
+
if (key2 in value_)
|
237469
|
+
value4[key2] = value_[key2];
|
237470
|
+
if (formatted2[key2] && typeof formatted2[key2] === "object" && !Array.isArray(formatted2[key2]))
|
237471
|
+
extract_(formatted2[key2]);
|
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, (key2, value5) => {
|
237876
237876
|
if (typeof replacer === "function")
|
237877
|
-
return replacer(
|
237877
|
+
return replacer(key2, 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_(key2, node, visitor, path7) {
|
239301
|
+
const ctrl = callVisitor(key2, node, visitor, path7);
|
239302
239302
|
if (identity2.isNode(ctrl) || identity2.isPair(ctrl)) {
|
239303
|
-
replaceNode(
|
239304
|
-
return visit_(
|
239303
|
+
replaceNode(key2, path7, ctrl);
|
239304
|
+
return visit_(key2, 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_(key2, node, visitor, path7) {
|
239349
|
+
const ctrl = await callVisitor(key2, node, visitor, path7);
|
239350
239350
|
if (identity2.isNode(ctrl) || identity2.isPair(ctrl)) {
|
239351
|
-
replaceNode(
|
239352
|
-
return visitAsync_(
|
239351
|
+
replaceNode(key2, path7, ctrl);
|
239352
|
+
return visitAsync_(key2, 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(key2, node, visitor, path7) {
|
239403
239403
|
if (typeof visitor === "function")
|
239404
|
-
return visitor(
|
239404
|
+
return visitor(key2, node, path7);
|
239405
239405
|
if (identity2.isMap(node))
|
239406
|
-
return visitor.Map?.(
|
239406
|
+
return visitor.Map?.(key2, node, path7);
|
239407
239407
|
if (identity2.isSeq(node))
|
239408
|
-
return visitor.Seq?.(
|
239408
|
+
return visitor.Seq?.(key2, node, path7);
|
239409
239409
|
if (identity2.isPair(node))
|
239410
|
-
return visitor.Pair?.(
|
239410
|
+
return visitor.Pair?.(key2, node, path7);
|
239411
239411
|
if (identity2.isScalar(node))
|
239412
|
-
return visitor.Scalar?.(
|
239412
|
+
return visitor.Scalar?.(key2, node, path7);
|
239413
239413
|
if (identity2.isAlias(node))
|
239414
|
-
return visitor.Alias?.(
|
239414
|
+
return visitor.Alias?.(key2, node, path7);
|
239415
239415
|
return;
|
239416
239416
|
}
|
239417
|
-
function replaceNode(
|
239417
|
+
function replaceNode(key2, path7, node) {
|
239418
239418
|
const parent = path7[path7.length - 1];
|
239419
239419
|
if (identity2.isCollection(parent)) {
|
239420
|
-
parent.items[
|
239420
|
+
parent.items[key2] = node;
|
239421
239421
|
} else if (identity2.isPair(parent)) {
|
239422
|
-
if (
|
239422
|
+
if (key2 === "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, key2, 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, key2, 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 [key2, ...rest] = path7;
|
240023
|
+
const node = this.get(key2, 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(key2, collectionFromPath(this.schema, rest, value4));
|
240028
240028
|
else
|
240029
|
-
throw new Error(`Expected YAML collection at ${
|
240029
|
+
throw new Error(`Expected YAML collection at ${key2}. Remaining path: ${rest}`);
|
240030
240030
|
}
|
240031
240031
|
}
|
240032
240032
|
deleteIn(path7) {
|
240033
|
-
const [
|
240033
|
+
const [key2, ...rest] = path7;
|
240034
240034
|
if (rest.length === 0)
|
240035
|
-
return this.delete(
|
240036
|
-
const node = this.get(
|
240035
|
+
return this.delete(key2);
|
240036
|
+
const node = this.get(key2, 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 ${key2}. Remaining path: ${rest}`);
|
240041
240041
|
}
|
240042
240042
|
getIn(path7, keepScalar) {
|
240043
|
-
const [
|
240044
|
-
const node = this.get(
|
240043
|
+
const [key2, ...rest] = path7;
|
240044
|
+
const node = this.get(key2, 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 [key2, ...rest] = path7;
|
240060
240060
|
if (rest.length === 0)
|
240061
|
-
return this.has(
|
240062
|
-
const node = this.get(
|
240061
|
+
return this.has(key2);
|
240062
|
+
const node = this.get(key2, true);
|
240063
240063
|
return identity2.isCollection(node) ? node.hasIn(rest) : false;
|
240064
240064
|
}
|
240065
240065
|
setIn(path7, value4) {
|
240066
|
-
const [
|
240066
|
+
const [key2, ...rest] = path7;
|
240067
240067
|
if (rest.length === 0) {
|
240068
|
-
this.set(
|
240068
|
+
this.set(key2, value4);
|
240069
240069
|
} else {
|
240070
|
-
const node = this.get(
|
240070
|
+
const node = this.get(key2, 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(key2, collectionFromPath(this.schema, rest, value4));
|
240075
240075
|
else
|
240076
|
-
throw new Error(`Expected YAML collection at ${
|
240076
|
+
throw new Error(`Expected YAML collection at ${key2}. 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: key2, 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(key2) && key2.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(key2) || !identity2.isNode(key2) && typeof key2 === "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 && (!key2 || keyComment && value4 == null && !ctx.inFlow || identity2.isCollection(key2) || (identity2.isScalar(key2) ? key2.type === Scalar.Scalar.BLOCK_FOLDED || key2.type === Scalar.Scalar.BLOCK_LITERAL : typeof key2 === "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(key2, 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, key2) => (merge7.identify(key2) || identity2.isScalar(key2) && (!key2.type || key2.type === Scalar.Scalar.PLAIN) && merge7.identify(key2.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 [key2, value5] of srcMap) {
|
240845
240845
|
if (map7 instanceof Map) {
|
240846
|
-
if (!map7.has(
|
240847
|
-
map7.set(
|
240846
|
+
if (!map7.has(key2))
|
240847
|
+
map7.set(key2, 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(key2);
|
240850
|
+
} else if (!Object.prototype.hasOwnProperty.call(map7, key2)) {
|
240851
|
+
Object.defineProperty(map7, key2, {
|
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: key2, value: value4 }) {
|
240874
|
+
if (identity2.isNode(key2) && key2.addToJSMap)
|
240875
|
+
key2.addToJSMap(ctx, map7, value4);
|
240876
|
+
else if (merge7.isMergeKey(ctx, key2))
|
240877
240877
|
merge7.addMergeToJSMap(ctx, map7, value4);
|
240878
240878
|
else {
|
240879
|
-
const jsKey = toJS.toJS(
|
240879
|
+
const jsKey = toJS.toJS(key2, "", 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(key2, 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(key2, 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(key2) && 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 = key2.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(key2, value4, ctx) {
|
240934
|
+
const k6 = createNode.createNode(key2, 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(key2, value4 = null) {
|
240941
240941
|
Object.defineProperty(this, identity2.NODE_TYPE, { value: identity2.PAIR });
|
240942
|
-
this.key =
|
240942
|
+
this.key = key2;
|
240943
240943
|
this.value = value4;
|
240944
240944
|
}
|
240945
240945
|
clone(schema) {
|
240946
|
-
let { key:
|
240947
|
-
if (identity2.isNode(
|
240948
|
-
|
240946
|
+
let { key: key2, value: value4 } = this;
|
240947
|
+
if (identity2.isNode(key2))
|
240948
|
+
key2 = key2.clone(schema);
|
240949
240949
|
if (identity2.isNode(value4))
|
240950
240950
|
value4 = value4.clone(schema);
|
240951
|
-
return new Pair(
|
240951
|
+
return new Pair(key2, 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, key2) {
|
241119
|
+
const k6 = identity2.isScalar(key2) ? key2.value : key2;
|
241120
241120
|
for (const it2 of items) {
|
241121
241121
|
if (identity2.isPair(it2)) {
|
241122
|
-
if (it2.key ===
|
241122
|
+
if (it2.key === key2 || 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 = (key2, 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, key2, value4);
|
241145
|
+
else if (Array.isArray(replacer) && !replacer.includes(key2))
|
241146
241146
|
return;
|
241147
241147
|
if (value4 !== undefined || keepUndefined)
|
241148
|
-
map7.items.push(Pair.createPair(
|
241148
|
+
map7.items.push(Pair.createPair(key2, value4, ctx));
|
241149
241149
|
};
|
241150
241150
|
if (obj instanceof Map) {
|
241151
|
-
for (const [
|
241152
|
-
add(
|
241151
|
+
for (const [key2, value4] of obj)
|
241152
|
+
add(key2, value4);
|
241153
241153
|
} else if (obj && typeof obj === "object") {
|
241154
|
-
for (const
|
241155
|
-
add(
|
241154
|
+
for (const key2 of Object.keys(obj))
|
241155
|
+
add(key2, obj[key2]);
|
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(key2) {
|
241190
|
+
const it2 = findPair(this.items, key2);
|
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(key2, keepScalar) {
|
241197
|
+
const it2 = findPair(this.items, key2);
|
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(key2) {
|
241202
|
+
return !!findPair(this.items, key2);
|
241203
241203
|
}
|
241204
|
-
set(
|
241205
|
-
this.add(new Pair.Pair(
|
241204
|
+
set(key2, value4) {
|
241205
|
+
this.add(new Pair.Pair(key2, 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(key2) {
|
241277
|
+
const idx = asItemIndex(key2);
|
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(key2, keepScalar) {
|
241284
|
+
const idx = asItemIndex(key2);
|
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(key2) {
|
241291
|
+
const idx = asItemIndex(key2);
|
241292
241292
|
return typeof idx === "number" && idx < this.items.length;
|
241293
241293
|
}
|
241294
|
-
set(
|
241295
|
-
const idx = asItemIndex(
|
241294
|
+
set(key2, value4) {
|
241295
|
+
const idx = asItemIndex(key2);
|
241296
241296
|
if (typeof idx !== "number")
|
241297
|
-
throw new Error(`Expected a valid index, not ${
|
241297
|
+
throw new Error(`Expected a valid index, not ${key2}.`);
|
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 key2 = obj instanceof Set ? it2 : String(i7++);
|
241332
|
+
it2 = replacer.call(obj, key2, 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(key2) {
|
241341
|
+
let idx = identity2.isScalar(key2) ? key2.value : key2;
|
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 key2, value4;
|
241715
241715
|
if (Array.isArray(it2)) {
|
241716
241716
|
if (it2.length === 2) {
|
241717
|
-
|
241717
|
+
key2 = 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
|
+
key2 = keys[0];
|
241725
|
+
value4 = it2[key2];
|
241726
241726
|
} else {
|
241727
241727
|
throw new TypeError(`Expected tuple with one key, not ${keys.length} keys`);
|
241728
241728
|
}
|
241729
241729
|
} else {
|
241730
|
-
|
241730
|
+
key2 = it2;
|
241731
241731
|
}
|
241732
|
-
pairs2.items.push(Pair.createPair(
|
241732
|
+
pairs2.items.push(Pair.createPair(key2, 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 key2, value4;
|
241774
241774
|
if (identity2.isPair(pair)) {
|
241775
|
-
|
241776
|
-
value4 = toJS.toJS(pair.value,
|
241775
|
+
key2 = toJS.toJS(pair.key, "", ctx);
|
241776
|
+
value4 = toJS.toJS(pair.value, key2, ctx);
|
241777
241777
|
} else {
|
241778
|
-
|
241778
|
+
key2 = toJS.toJS(pair, "", ctx);
|
241779
241779
|
}
|
241780
|
-
if (map7.has(
|
241780
|
+
if (map7.has(key2))
|
241781
241781
|
throw new Error("Ordered maps must not include duplicate keys");
|
241782
|
-
map7.set(
|
241782
|
+
map7.set(key2, 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: key2 } of pairs$1.items) {
|
241804
|
+
if (identity2.isScalar(key2)) {
|
241805
|
+
if (seenKeys.includes(key2.value)) {
|
241806
|
+
onError(`Ordered maps must not include duplicate keys: ${key2.value}`);
|
241807
241807
|
} else {
|
241808
|
-
seenKeys.push(
|
241808
|
+
seenKeys.push(key2.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(key2) {
|
241983
241983
|
let pair;
|
241984
|
-
if (identity2.isPair(
|
241985
|
-
pair =
|
241986
|
-
else if (
|
241987
|
-
pair = new Pair.Pair(
|
241984
|
+
if (identity2.isPair(key2))
|
241985
|
+
pair = key2;
|
241986
|
+
else if (key2 && typeof key2 === "object" && "key" in key2 && "value" in key2 && key2.value === null)
|
241987
|
+
pair = new Pair.Pair(key2.key, null);
|
241988
241988
|
else
|
241989
|
-
pair = new Pair.Pair(
|
241989
|
+
pair = new Pair.Pair(key2, 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(key2, keepPair) {
|
241995
|
+
const pair = YAMLMap.findPair(this.items, key2);
|
241996
241996
|
return !keepPair && identity2.isPair(pair) ? identity2.isScalar(pair.key) ? pair.key.value : pair.key : pair;
|
241997
241997
|
}
|
241998
|
-
set(
|
241998
|
+
set(key2, 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, key2);
|
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(key2));
|
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((key2) => key2 !== "yaml11").map((key2) => JSON.stringify(key2)).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((key2) => JSON.stringify(key2)).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(key2, value4, options = {}) {
|
242492
|
+
const k6 = this.createNode(key2, 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(key2) {
|
242497
|
+
return assertCollection(this.contents) ? this.contents.delete(key2) : 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(key2, keepScalar) {
|
242509
|
+
return identity2.isCollection(this.contents) ? this.contents.get(key2, 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(key2) {
|
242517
|
+
return identity2.isCollection(this.contents) ? this.contents.has(key2) : 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(key2, value4) {
|
242525
242525
|
if (this.contents == null) {
|
242526
|
-
this.contents = Collection.collectionFromPath(this.schema, [
|
242526
|
+
this.contents = Collection.collectionFromPath(this.schema, [key2], value4);
|
242527
242527
|
} else if (assertCollection(this.contents)) {
|
242528
|
-
this.contents.set(
|
242528
|
+
this.contents.set(key2, 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(key2) {
|
242811
|
+
if (!key2)
|
242812
242812
|
return null;
|
242813
|
-
switch (
|
242813
|
+
switch (key2.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 (key2.source.includes(`
|
242819
242819
|
`))
|
242820
242820
|
return true;
|
242821
|
-
if (
|
242822
|
-
for (const st2 of
|
242821
|
+
if (key2.end) {
|
242822
|
+
for (const st2 of key2.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 key2.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: key2, sep: sep5, value: value4 } = collItem;
|
242894
242894
|
const keyProps = resolveProps.resolveProps(start3, {
|
242895
242895
|
indicator: "explicit-key-ind",
|
242896
|
-
next:
|
242896
|
+
next: key2 ?? 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 (key2) {
|
242905
|
+
if (key2.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 key2 && key2.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(key2)) {
|
242922
|
+
onError(key2 ?? 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 = key2 ? composeNode(ctx, key2, 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, key2, 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: !key2 || key2.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: key2, 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: key2 ?? 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(key2))
|
243124
|
+
onError(key2, "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 = key2 ? composeNode(ctx, key2, props, onError) : composeEmptyNode(ctx, keyStart, start3, null, props, onError);
|
243170
|
+
if (isBlock(key2))
|
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 errors4 = 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 errors4.YAMLWarning(pos, code2, message));
|
244033
244033
|
else
|
244034
|
-
this.errors.push(new
|
244034
|
+
this.errors.push(new errors4.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 errors4.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 errors4.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 errors4.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 errors4 = 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 errors4.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 key2 of Object.keys(token))
|
244293
|
+
if (key2 !== "type" && key2 !== "offset")
|
244294
|
+
delete token[key2];
|
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 key2 of Object.keys(token))
|
244344
|
+
if (key2 !== "type" && key2 !== "offset")
|
244345
|
+
delete token[key2];
|
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: key2, 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 (key2)
|
244402
|
+
res += stringifyToken(key2);
|
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 key2 = 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: key2, 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 errors4 = 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(errors4.prettifyError(source, lineCounter2));
|
246058
|
+
doc2.warnings.forEach(errors4.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 errors4.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(errors4.prettifyError(source, lineCounter2));
|
246079
|
+
doc2.warnings.forEach(errors4.prettifyError(source, lineCounter2));
|
246080
246080
|
}
|
246081
246081
|
return doc2;
|
246082
246082
|
}
|
@@ -263840,7 +263840,7 @@ function pruneCurrentEnv(currentEnv, env2) {
|
|
263840
263840
|
var package_default = {
|
263841
263841
|
name: "@settlemint/sdk-cli",
|
263842
263842
|
description: "Command-line interface for SettleMint SDK, providing development tools and project management capabilities",
|
263843
|
-
version: "2.4.0-
|
263843
|
+
version: "2.4.0-pr24b8b7b9",
|
263844
263844
|
type: "module",
|
263845
263845
|
private: false,
|
263846
263846
|
license: "FSL-1.1-MIT",
|
@@ -263888,12 +263888,12 @@ var package_default = {
|
|
263888
263888
|
"@commander-js/extra-typings": "14.0.0",
|
263889
263889
|
commander: "14.0.0",
|
263890
263890
|
"@inquirer/confirm": "5.1.12",
|
263891
|
-
"@inquirer/input": "4.
|
263891
|
+
"@inquirer/input": "4.1.12",
|
263892
263892
|
"@inquirer/password": "4.0.15",
|
263893
263893
|
"@inquirer/select": "4.2.3",
|
263894
|
-
"@settlemint/sdk-js": "2.4.0-
|
263895
|
-
"@settlemint/sdk-utils": "2.4.0-
|
263896
|
-
"@settlemint/sdk-viem": "2.4.0-
|
263894
|
+
"@settlemint/sdk-js": "2.4.0-pr24b8b7b9",
|
263895
|
+
"@settlemint/sdk-utils": "2.4.0-pr24b8b7b9",
|
263896
|
+
"@settlemint/sdk-viem": "2.4.0-pr24b8b7b9",
|
263897
263897
|
"@types/node": "24.0.8",
|
263898
263898
|
"@types/semver": "7.7.0",
|
263899
263899
|
"@types/which": "3.0.4",
|
@@ -303229,480 +303229,23 @@ function sanitizeName(value4, length = 35) {
|
|
303229
303229
|
}).slice(0, length).replaceAll(/(^\d*)/g, "").replaceAll(/(-$)/g, "").replaceAll(/(^-)/g, "");
|
303230
303230
|
}
|
303231
303231
|
|
303232
|
-
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/key.js
|
303233
|
-
var isBackspaceKey2 = (key2) => key2.name === "backspace";
|
303234
|
-
var isEnterKey2 = (key2) => key2.name === "enter" || key2.name === "return";
|
303235
|
-
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/errors.js
|
303236
|
-
class AbortPromptError2 extends Error {
|
303237
|
-
name = "AbortPromptError";
|
303238
|
-
message = "Prompt was aborted";
|
303239
|
-
constructor(options) {
|
303240
|
-
super();
|
303241
|
-
this.cause = options?.cause;
|
303242
|
-
}
|
303243
|
-
}
|
303244
|
-
|
303245
|
-
class CancelPromptError2 extends Error {
|
303246
|
-
name = "CancelPromptError";
|
303247
|
-
message = "Prompt was canceled";
|
303248
|
-
}
|
303249
|
-
|
303250
|
-
class ExitPromptError2 extends Error {
|
303251
|
-
name = "ExitPromptError";
|
303252
|
-
}
|
303253
|
-
|
303254
|
-
class HookError2 extends Error {
|
303255
|
-
name = "HookError";
|
303256
|
-
}
|
303257
|
-
|
303258
|
-
class ValidationError2 extends Error {
|
303259
|
-
name = "ValidationError";
|
303260
|
-
}
|
303261
|
-
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/use-state.js
|
303262
|
-
import { AsyncResource as AsyncResource5 } from "node:async_hooks";
|
303263
|
-
|
303264
|
-
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/hook-engine.js
|
303265
|
-
import { AsyncLocalStorage as AsyncLocalStorage2, AsyncResource as AsyncResource4 } from "node:async_hooks";
|
303266
|
-
var hookStorage2 = new AsyncLocalStorage2;
|
303267
|
-
function createStore2(rl) {
|
303268
|
-
const store = {
|
303269
|
-
rl,
|
303270
|
-
hooks: [],
|
303271
|
-
hooksCleanup: [],
|
303272
|
-
hooksEffect: [],
|
303273
|
-
index: 0,
|
303274
|
-
handleChange() {}
|
303275
|
-
};
|
303276
|
-
return store;
|
303277
|
-
}
|
303278
|
-
function withHooks2(rl, cb) {
|
303279
|
-
const store = createStore2(rl);
|
303280
|
-
return hookStorage2.run(store, () => {
|
303281
|
-
function cycle(render) {
|
303282
|
-
store.handleChange = () => {
|
303283
|
-
store.index = 0;
|
303284
|
-
render();
|
303285
|
-
};
|
303286
|
-
store.handleChange();
|
303287
|
-
}
|
303288
|
-
return cb(cycle);
|
303289
|
-
});
|
303290
|
-
}
|
303291
|
-
function getStore2() {
|
303292
|
-
const store = hookStorage2.getStore();
|
303293
|
-
if (!store) {
|
303294
|
-
throw new HookError2("[Inquirer] Hook functions can only be called from within a prompt");
|
303295
|
-
}
|
303296
|
-
return store;
|
303297
|
-
}
|
303298
|
-
function readline3() {
|
303299
|
-
return getStore2().rl;
|
303300
|
-
}
|
303301
|
-
function withUpdates2(fn) {
|
303302
|
-
const wrapped = (...args) => {
|
303303
|
-
const store = getStore2();
|
303304
|
-
let shouldUpdate = false;
|
303305
|
-
const oldHandleChange = store.handleChange;
|
303306
|
-
store.handleChange = () => {
|
303307
|
-
shouldUpdate = true;
|
303308
|
-
};
|
303309
|
-
const returnValue = fn(...args);
|
303310
|
-
if (shouldUpdate) {
|
303311
|
-
oldHandleChange();
|
303312
|
-
}
|
303313
|
-
store.handleChange = oldHandleChange;
|
303314
|
-
return returnValue;
|
303315
|
-
};
|
303316
|
-
return AsyncResource4.bind(wrapped);
|
303317
|
-
}
|
303318
|
-
function withPointer2(cb) {
|
303319
|
-
const store = getStore2();
|
303320
|
-
const { index } = store;
|
303321
|
-
const pointer = {
|
303322
|
-
get() {
|
303323
|
-
return store.hooks[index];
|
303324
|
-
},
|
303325
|
-
set(value4) {
|
303326
|
-
store.hooks[index] = value4;
|
303327
|
-
},
|
303328
|
-
initialized: index in store.hooks
|
303329
|
-
};
|
303330
|
-
const returnValue = cb(pointer);
|
303331
|
-
store.index++;
|
303332
|
-
return returnValue;
|
303333
|
-
}
|
303334
|
-
function handleChange2() {
|
303335
|
-
getStore2().handleChange();
|
303336
|
-
}
|
303337
|
-
var effectScheduler2 = {
|
303338
|
-
queue(cb) {
|
303339
|
-
const store = getStore2();
|
303340
|
-
const { index } = store;
|
303341
|
-
store.hooksEffect.push(() => {
|
303342
|
-
store.hooksCleanup[index]?.();
|
303343
|
-
const cleanFn = cb(readline3());
|
303344
|
-
if (cleanFn != null && typeof cleanFn !== "function") {
|
303345
|
-
throw new ValidationError2("useEffect return value must be a cleanup function or nothing.");
|
303346
|
-
}
|
303347
|
-
store.hooksCleanup[index] = cleanFn;
|
303348
|
-
});
|
303349
|
-
},
|
303350
|
-
run() {
|
303351
|
-
const store = getStore2();
|
303352
|
-
withUpdates2(() => {
|
303353
|
-
store.hooksEffect.forEach((effect) => {
|
303354
|
-
effect();
|
303355
|
-
});
|
303356
|
-
store.hooksEffect.length = 0;
|
303357
|
-
})();
|
303358
|
-
},
|
303359
|
-
clearAll() {
|
303360
|
-
const store = getStore2();
|
303361
|
-
store.hooksCleanup.forEach((cleanFn) => {
|
303362
|
-
cleanFn?.();
|
303363
|
-
});
|
303364
|
-
store.hooksEffect.length = 0;
|
303365
|
-
store.hooksCleanup.length = 0;
|
303366
|
-
}
|
303367
|
-
};
|
303368
|
-
|
303369
|
-
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/use-state.js
|
303370
|
-
function useState2(defaultValue) {
|
303371
|
-
return withPointer2((pointer) => {
|
303372
|
-
const setState = AsyncResource5.bind(function setState(newValue) {
|
303373
|
-
if (pointer.get() !== newValue) {
|
303374
|
-
pointer.set(newValue);
|
303375
|
-
handleChange2();
|
303376
|
-
}
|
303377
|
-
});
|
303378
|
-
if (pointer.initialized) {
|
303379
|
-
return [pointer.get(), setState];
|
303380
|
-
}
|
303381
|
-
const value4 = typeof defaultValue === "function" ? defaultValue() : defaultValue;
|
303382
|
-
pointer.set(value4);
|
303383
|
-
return [value4, setState];
|
303384
|
-
});
|
303385
|
-
}
|
303386
|
-
|
303387
|
-
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/use-effect.js
|
303388
|
-
function useEffect2(cb, depArray) {
|
303389
|
-
withPointer2((pointer) => {
|
303390
|
-
const oldDeps = pointer.get();
|
303391
|
-
const hasChanged = !Array.isArray(oldDeps) || depArray.some((dep, i6) => !Object.is(dep, oldDeps[i6]));
|
303392
|
-
if (hasChanged) {
|
303393
|
-
effectScheduler2.queue(cb);
|
303394
|
-
}
|
303395
|
-
pointer.set(depArray);
|
303396
|
-
});
|
303397
|
-
}
|
303398
|
-
|
303399
|
-
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/theme.js
|
303400
|
-
var import_yoctocolors_cjs3 = __toESM(require_yoctocolors_cjs(), 1);
|
303401
|
-
var defaultTheme2 = {
|
303402
|
-
prefix: {
|
303403
|
-
idle: import_yoctocolors_cjs3.default.blue("?"),
|
303404
|
-
done: import_yoctocolors_cjs3.default.green(esm_default.tick)
|
303405
|
-
},
|
303406
|
-
spinner: {
|
303407
|
-
interval: 80,
|
303408
|
-
frames: ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"].map((frame) => import_yoctocolors_cjs3.default.yellow(frame))
|
303409
|
-
},
|
303410
|
-
style: {
|
303411
|
-
answer: import_yoctocolors_cjs3.default.cyan,
|
303412
|
-
message: import_yoctocolors_cjs3.default.bold,
|
303413
|
-
error: (text2) => import_yoctocolors_cjs3.default.red(`> ${text2}`),
|
303414
|
-
defaultAnswer: (text2) => import_yoctocolors_cjs3.default.dim(`(${text2})`),
|
303415
|
-
help: import_yoctocolors_cjs3.default.dim,
|
303416
|
-
highlight: import_yoctocolors_cjs3.default.cyan,
|
303417
|
-
key: (text2) => import_yoctocolors_cjs3.default.cyan(import_yoctocolors_cjs3.default.bold(`<${text2}>`))
|
303418
|
-
}
|
303419
|
-
};
|
303420
|
-
|
303421
|
-
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/make-theme.js
|
303422
|
-
function isPlainObject6(value4) {
|
303423
|
-
if (typeof value4 !== "object" || value4 === null)
|
303424
|
-
return false;
|
303425
|
-
let proto = value4;
|
303426
|
-
while (Object.getPrototypeOf(proto) !== null) {
|
303427
|
-
proto = Object.getPrototypeOf(proto);
|
303428
|
-
}
|
303429
|
-
return Object.getPrototypeOf(value4) === proto;
|
303430
|
-
}
|
303431
|
-
function deepMerge3(...objects) {
|
303432
|
-
const output = {};
|
303433
|
-
for (const obj of objects) {
|
303434
|
-
for (const [key2, value4] of Object.entries(obj)) {
|
303435
|
-
const prevValue = output[key2];
|
303436
|
-
output[key2] = isPlainObject6(prevValue) && isPlainObject6(value4) ? deepMerge3(prevValue, value4) : value4;
|
303437
|
-
}
|
303438
|
-
}
|
303439
|
-
return output;
|
303440
|
-
}
|
303441
|
-
function makeTheme2(...themes) {
|
303442
|
-
const themesToMerge = [
|
303443
|
-
defaultTheme2,
|
303444
|
-
...themes.filter((theme) => theme != null)
|
303445
|
-
];
|
303446
|
-
return deepMerge3(...themesToMerge);
|
303447
|
-
}
|
303448
|
-
|
303449
|
-
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/use-prefix.js
|
303450
|
-
function usePrefix2({ status = "idle", theme }) {
|
303451
|
-
const [showLoader, setShowLoader] = useState2(false);
|
303452
|
-
const [tick, setTick] = useState2(0);
|
303453
|
-
const { prefix, spinner: spinner2 } = makeTheme2(theme);
|
303454
|
-
useEffect2(() => {
|
303455
|
-
if (status === "loading") {
|
303456
|
-
let tickInterval;
|
303457
|
-
let inc = -1;
|
303458
|
-
const delayTimeout = setTimeout(() => {
|
303459
|
-
setShowLoader(true);
|
303460
|
-
tickInterval = setInterval(() => {
|
303461
|
-
inc = inc + 1;
|
303462
|
-
setTick(inc % spinner2.frames.length);
|
303463
|
-
}, spinner2.interval);
|
303464
|
-
}, 300);
|
303465
|
-
return () => {
|
303466
|
-
clearTimeout(delayTimeout);
|
303467
|
-
clearInterval(tickInterval);
|
303468
|
-
};
|
303469
|
-
} else {
|
303470
|
-
setShowLoader(false);
|
303471
|
-
}
|
303472
|
-
}, [status]);
|
303473
|
-
if (showLoader) {
|
303474
|
-
return spinner2.frames[tick];
|
303475
|
-
}
|
303476
|
-
const iconName = status === "loading" ? "idle" : status;
|
303477
|
-
return typeof prefix === "string" ? prefix : prefix[iconName] ?? prefix["idle"];
|
303478
|
-
}
|
303479
|
-
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/use-ref.js
|
303480
|
-
function useRef2(val) {
|
303481
|
-
return useState2({ current: val })[0];
|
303482
|
-
}
|
303483
|
-
|
303484
|
-
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/use-keypress.js
|
303485
|
-
function useKeypress2(userHandler) {
|
303486
|
-
const signal = useRef2(userHandler);
|
303487
|
-
signal.current = userHandler;
|
303488
|
-
useEffect2((rl) => {
|
303489
|
-
let ignore = false;
|
303490
|
-
const handler = withUpdates2((_input, event) => {
|
303491
|
-
if (ignore)
|
303492
|
-
return;
|
303493
|
-
signal.current(event, rl);
|
303494
|
-
});
|
303495
|
-
rl.input.on("keypress", handler);
|
303496
|
-
return () => {
|
303497
|
-
ignore = true;
|
303498
|
-
rl.input.removeListener("keypress", handler);
|
303499
|
-
};
|
303500
|
-
}, []);
|
303501
|
-
}
|
303502
|
-
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/utils.js
|
303503
|
-
var import_cli_width2 = __toESM(require_cli_width(), 1);
|
303504
|
-
var import_wrap_ansi2 = __toESM(require_wrap_ansi(), 1);
|
303505
|
-
function breakLines2(content, width) {
|
303506
|
-
return content.split(`
|
303507
|
-
`).flatMap((line) => import_wrap_ansi2.default(line, width, { trim: false, hard: true }).split(`
|
303508
|
-
`).map((str) => str.trimEnd())).join(`
|
303509
|
-
`);
|
303510
|
-
}
|
303511
|
-
function readlineWidth2() {
|
303512
|
-
return import_cli_width2.default({ defaultWidth: 80, output: readline3().output });
|
303513
|
-
}
|
303514
|
-
|
303515
|
-
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
|
303516
|
-
var import_mute_stream2 = __toESM(require_lib(), 1);
|
303517
|
-
import * as readline4 from "node:readline";
|
303518
|
-
import { AsyncResource as AsyncResource6 } from "node:async_hooks";
|
303519
|
-
|
303520
|
-
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/screen-manager.js
|
303521
|
-
var import_ansi_escapes2 = __toESM(require_ansi_escapes(), 1);
|
303522
|
-
import { stripVTControlCharacters as stripVTControlCharacters3 } from "node:util";
|
303523
|
-
var height2 = (content) => content.split(`
|
303524
|
-
`).length;
|
303525
|
-
var lastLine2 = (content) => content.split(`
|
303526
|
-
`).pop() ?? "";
|
303527
|
-
function cursorDown2(n6) {
|
303528
|
-
return n6 > 0 ? import_ansi_escapes2.default.cursorDown(n6) : "";
|
303529
|
-
}
|
303530
|
-
|
303531
|
-
class ScreenManager2 {
|
303532
|
-
height = 0;
|
303533
|
-
extraLinesUnderPrompt = 0;
|
303534
|
-
cursorPos;
|
303535
|
-
rl;
|
303536
|
-
constructor(rl) {
|
303537
|
-
this.rl = rl;
|
303538
|
-
this.cursorPos = rl.getCursorPos();
|
303539
|
-
}
|
303540
|
-
write(content) {
|
303541
|
-
this.rl.output.unmute();
|
303542
|
-
this.rl.output.write(content);
|
303543
|
-
this.rl.output.mute();
|
303544
|
-
}
|
303545
|
-
render(content, bottomContent = "") {
|
303546
|
-
const promptLine = lastLine2(content);
|
303547
|
-
const rawPromptLine = stripVTControlCharacters3(promptLine);
|
303548
|
-
let prompt = rawPromptLine;
|
303549
|
-
if (this.rl.line.length > 0) {
|
303550
|
-
prompt = prompt.slice(0, -this.rl.line.length);
|
303551
|
-
}
|
303552
|
-
this.rl.setPrompt(prompt);
|
303553
|
-
this.cursorPos = this.rl.getCursorPos();
|
303554
|
-
const width = readlineWidth2();
|
303555
|
-
content = breakLines2(content, width);
|
303556
|
-
bottomContent = breakLines2(bottomContent, width);
|
303557
|
-
if (rawPromptLine.length % width === 0) {
|
303558
|
-
content += `
|
303559
|
-
`;
|
303560
|
-
}
|
303561
|
-
let output = content + (bottomContent ? `
|
303562
|
-
` + bottomContent : "");
|
303563
|
-
const promptLineUpDiff = Math.floor(rawPromptLine.length / width) - this.cursorPos.rows;
|
303564
|
-
const bottomContentHeight = promptLineUpDiff + (bottomContent ? height2(bottomContent) : 0);
|
303565
|
-
if (bottomContentHeight > 0)
|
303566
|
-
output += import_ansi_escapes2.default.cursorUp(bottomContentHeight);
|
303567
|
-
output += import_ansi_escapes2.default.cursorTo(this.cursorPos.cols);
|
303568
|
-
this.write(cursorDown2(this.extraLinesUnderPrompt) + import_ansi_escapes2.default.eraseLines(this.height) + output);
|
303569
|
-
this.extraLinesUnderPrompt = bottomContentHeight;
|
303570
|
-
this.height = height2(output);
|
303571
|
-
}
|
303572
|
-
checkCursorPos() {
|
303573
|
-
const cursorPos = this.rl.getCursorPos();
|
303574
|
-
if (cursorPos.cols !== this.cursorPos.cols) {
|
303575
|
-
this.write(import_ansi_escapes2.default.cursorTo(cursorPos.cols));
|
303576
|
-
this.cursorPos = cursorPos;
|
303577
|
-
}
|
303578
|
-
}
|
303579
|
-
done({ clearContent }) {
|
303580
|
-
this.rl.setPrompt("");
|
303581
|
-
let output = cursorDown2(this.extraLinesUnderPrompt);
|
303582
|
-
output += clearContent ? import_ansi_escapes2.default.eraseLines(this.height) : `
|
303583
|
-
`;
|
303584
|
-
output += import_ansi_escapes2.default.cursorShow;
|
303585
|
-
this.write(output);
|
303586
|
-
this.rl.close();
|
303587
|
-
}
|
303588
|
-
}
|
303589
|
-
|
303590
|
-
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/promise-polyfill.js
|
303591
|
-
class PromisePolyfill2 extends Promise {
|
303592
|
-
static withResolver() {
|
303593
|
-
let resolve5;
|
303594
|
-
let reject;
|
303595
|
-
const promise4 = new Promise((res, rej) => {
|
303596
|
-
resolve5 = res;
|
303597
|
-
reject = rej;
|
303598
|
-
});
|
303599
|
-
return { promise: promise4, resolve: resolve5, reject };
|
303600
|
-
}
|
303601
|
-
}
|
303602
|
-
|
303603
|
-
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
|
303604
|
-
function getCallSites2() {
|
303605
|
-
const _prepareStackTrace = Error.prepareStackTrace;
|
303606
|
-
let result = [];
|
303607
|
-
try {
|
303608
|
-
Error.prepareStackTrace = (_5, callSites) => {
|
303609
|
-
const callSitesWithoutCurrent = callSites.slice(1);
|
303610
|
-
result = callSitesWithoutCurrent;
|
303611
|
-
return callSitesWithoutCurrent;
|
303612
|
-
};
|
303613
|
-
new Error().stack;
|
303614
|
-
} catch {
|
303615
|
-
return result;
|
303616
|
-
}
|
303617
|
-
Error.prepareStackTrace = _prepareStackTrace;
|
303618
|
-
return result;
|
303619
|
-
}
|
303620
|
-
function createPrompt2(view) {
|
303621
|
-
const callSites = getCallSites2();
|
303622
|
-
const prompt = (config4, context = {}) => {
|
303623
|
-
const { input = process.stdin, signal } = context;
|
303624
|
-
const cleanups = new Set;
|
303625
|
-
const output = new import_mute_stream2.default;
|
303626
|
-
output.pipe(context.output ?? process.stdout);
|
303627
|
-
const rl = readline4.createInterface({
|
303628
|
-
terminal: true,
|
303629
|
-
input,
|
303630
|
-
output
|
303631
|
-
});
|
303632
|
-
const screen = new ScreenManager2(rl);
|
303633
|
-
const { promise: promise4, resolve: resolve5, reject } = PromisePolyfill2.withResolver();
|
303634
|
-
const cancel3 = () => reject(new CancelPromptError2);
|
303635
|
-
if (signal) {
|
303636
|
-
const abort = () => reject(new AbortPromptError2({ cause: signal.reason }));
|
303637
|
-
if (signal.aborted) {
|
303638
|
-
abort();
|
303639
|
-
return Object.assign(promise4, { cancel: cancel3 });
|
303640
|
-
}
|
303641
|
-
signal.addEventListener("abort", abort);
|
303642
|
-
cleanups.add(() => signal.removeEventListener("abort", abort));
|
303643
|
-
}
|
303644
|
-
cleanups.add(onExit((code2, signal2) => {
|
303645
|
-
reject(new ExitPromptError2(`User force closed the prompt with ${code2} ${signal2}`));
|
303646
|
-
}));
|
303647
|
-
const sigint = () => reject(new ExitPromptError2(`User force closed the prompt with SIGINT`));
|
303648
|
-
rl.on("SIGINT", sigint);
|
303649
|
-
cleanups.add(() => rl.removeListener("SIGINT", sigint));
|
303650
|
-
const checkCursorPos = () => screen.checkCursorPos();
|
303651
|
-
rl.input.on("keypress", checkCursorPos);
|
303652
|
-
cleanups.add(() => rl.input.removeListener("keypress", checkCursorPos));
|
303653
|
-
return withHooks2(rl, (cycle) => {
|
303654
|
-
const hooksCleanup = AsyncResource6.bind(() => effectScheduler2.clearAll());
|
303655
|
-
rl.on("close", hooksCleanup);
|
303656
|
-
cleanups.add(() => rl.removeListener("close", hooksCleanup));
|
303657
|
-
cycle(() => {
|
303658
|
-
try {
|
303659
|
-
const nextView = view(config4, (value4) => {
|
303660
|
-
setImmediate(() => resolve5(value4));
|
303661
|
-
});
|
303662
|
-
if (nextView === undefined) {
|
303663
|
-
const callerFilename = callSites[1]?.getFileName();
|
303664
|
-
throw new Error(`Prompt functions must return a string.
|
303665
|
-
at ${callerFilename}`);
|
303666
|
-
}
|
303667
|
-
const [content, bottomContent] = typeof nextView === "string" ? [nextView] : nextView;
|
303668
|
-
screen.render(content, bottomContent);
|
303669
|
-
effectScheduler2.run();
|
303670
|
-
} catch (error44) {
|
303671
|
-
reject(error44);
|
303672
|
-
}
|
303673
|
-
});
|
303674
|
-
return Object.assign(promise4.then((answer) => {
|
303675
|
-
effectScheduler2.clearAll();
|
303676
|
-
return answer;
|
303677
|
-
}, (error44) => {
|
303678
|
-
effectScheduler2.clearAll();
|
303679
|
-
throw error44;
|
303680
|
-
}).finally(() => {
|
303681
|
-
cleanups.forEach((cleanup) => cleanup());
|
303682
|
-
screen.done({ clearContent: Boolean(context.clearPromptOnDone) });
|
303683
|
-
output.end();
|
303684
|
-
}).then(() => promise4), { cancel: cancel3 });
|
303685
|
-
});
|
303686
|
-
};
|
303687
|
-
return prompt;
|
303688
|
-
}
|
303689
303232
|
// ../../node_modules/@inquirer/input/dist/esm/index.js
|
303690
303233
|
var inputTheme = {
|
303691
303234
|
validationFailureMode: "keep"
|
303692
303235
|
};
|
303693
|
-
var esm_default2 =
|
303694
|
-
const { required: required4, validate: validate3 = () => true
|
303695
|
-
const theme =
|
303696
|
-
const [status, setStatus] =
|
303697
|
-
const [defaultValue = "", setDefaultValue] =
|
303698
|
-
const [errorMsg, setError] =
|
303699
|
-
const [value4, setValue] =
|
303700
|
-
const prefix =
|
303701
|
-
|
303236
|
+
var esm_default2 = createPrompt((config4, done) => {
|
303237
|
+
const { required: required4, validate: validate3 = () => true } = config4;
|
303238
|
+
const theme = makeTheme(inputTheme, config4.theme);
|
303239
|
+
const [status, setStatus] = useState("idle");
|
303240
|
+
const [defaultValue = "", setDefaultValue] = useState(config4.default);
|
303241
|
+
const [errorMsg, setError] = useState();
|
303242
|
+
const [value4, setValue] = useState("");
|
303243
|
+
const prefix = usePrefix({ status, theme });
|
303244
|
+
useKeypress(async (key2, rl) => {
|
303702
303245
|
if (status !== "idle") {
|
303703
303246
|
return;
|
303704
303247
|
}
|
303705
|
-
if (
|
303248
|
+
if (isEnterKey(key2)) {
|
303706
303249
|
const answer = value4 || defaultValue;
|
303707
303250
|
setStatus("loading");
|
303708
303251
|
const isValid = required4 && !answer ? "You must provide a value" : await validate3(answer);
|
@@ -303719,9 +303262,9 @@ var esm_default2 = createPrompt2((config4, done) => {
|
|
303719
303262
|
setError(isValid || "You must provide a valid value");
|
303720
303263
|
setStatus("idle");
|
303721
303264
|
}
|
303722
|
-
} else if (
|
303265
|
+
} else if (isBackspaceKey(key2) && !value4) {
|
303723
303266
|
setDefaultValue(undefined);
|
303724
|
-
} else if (
|
303267
|
+
} else if (key2.name === "tab" && !value4) {
|
303725
303268
|
setDefaultValue(undefined);
|
303726
303269
|
rl.clearLine(0);
|
303727
303270
|
rl.write(defaultValue);
|
@@ -303731,12 +303274,6 @@ var esm_default2 = createPrompt2((config4, done) => {
|
|
303731
303274
|
setError(undefined);
|
303732
303275
|
}
|
303733
303276
|
});
|
303734
|
-
useEffect2((rl) => {
|
303735
|
-
if (prefill === "editable" && defaultValue) {
|
303736
|
-
rl.write(defaultValue);
|
303737
|
-
setValue(defaultValue);
|
303738
|
-
}
|
303739
|
-
}, []);
|
303740
303277
|
const message = theme.style.message(config4.message, status);
|
303741
303278
|
let formattedValue = value4;
|
303742
303279
|
if (typeof config4.transformer === "function") {
|
@@ -303777,13 +303314,13 @@ async function subgraphNamePrompt({
|
|
303777
303314
|
}
|
303778
303315
|
|
303779
303316
|
// ../../node_modules/@inquirer/select/dist/esm/index.js
|
303780
|
-
var
|
303781
|
-
var
|
303317
|
+
var import_yoctocolors_cjs3 = __toESM(require_yoctocolors_cjs(), 1);
|
303318
|
+
var import_ansi_escapes2 = __toESM(require_ansi_escapes(), 1);
|
303782
303319
|
var selectTheme = {
|
303783
303320
|
icon: { cursor: esm_default.pointer },
|
303784
303321
|
style: {
|
303785
|
-
disabled: (text2) =>
|
303786
|
-
description: (text2) =>
|
303322
|
+
disabled: (text2) => import_yoctocolors_cjs3.default.dim(`- ${text2}`),
|
303323
|
+
description: (text2) => import_yoctocolors_cjs3.default.cyan(text2)
|
303787
303324
|
},
|
303788
303325
|
helpMode: "auto",
|
303789
303326
|
indexMode: "hidden"
|
@@ -303839,22 +303376,22 @@ var esm_default3 = createPrompt((config4, done) => {
|
|
303839
303376
|
}, [config4.default, items]);
|
303840
303377
|
const [active, setActive] = useState(defaultItemIndex === -1 ? bounds.first : defaultItemIndex);
|
303841
303378
|
const selectedChoice = items[active];
|
303842
|
-
useKeypress((
|
303379
|
+
useKeypress((key2, rl) => {
|
303843
303380
|
clearTimeout(searchTimeoutRef.current);
|
303844
|
-
if (isEnterKey(
|
303381
|
+
if (isEnterKey(key2)) {
|
303845
303382
|
setStatus("done");
|
303846
303383
|
done(selectedChoice.value);
|
303847
|
-
} else if (isUpKey(
|
303384
|
+
} else if (isUpKey(key2) || isDownKey(key2)) {
|
303848
303385
|
rl.clearLine(0);
|
303849
|
-
if (loop || isUpKey(
|
303850
|
-
const offset = isUpKey(
|
303386
|
+
if (loop || isUpKey(key2) && active !== bounds.first || isDownKey(key2) && active !== bounds.last) {
|
303387
|
+
const offset = isUpKey(key2) ? -1 : 1;
|
303851
303388
|
let next = active;
|
303852
303389
|
do {
|
303853
303390
|
next = (next + offset + items.length) % items.length;
|
303854
303391
|
} while (!isSelectable(items[next]));
|
303855
303392
|
setActive(next);
|
303856
303393
|
}
|
303857
|
-
} else if (isNumberKey(
|
303394
|
+
} else if (isNumberKey(key2) && !Number.isNaN(Number(rl.line))) {
|
303858
303395
|
const position = Number(rl.line) - 1;
|
303859
303396
|
const item = items[position];
|
303860
303397
|
if (item != null && isSelectable(item)) {
|
@@ -303863,7 +303400,7 @@ var esm_default3 = createPrompt((config4, done) => {
|
|
303863
303400
|
searchTimeoutRef.current = setTimeout(() => {
|
303864
303401
|
rl.clearLine(0);
|
303865
303402
|
}, 700);
|
303866
|
-
} else if (isBackspaceKey(
|
303403
|
+
} else if (isBackspaceKey(key2)) {
|
303867
303404
|
rl.clearLine(0);
|
303868
303405
|
} else {
|
303869
303406
|
const searchTerm = rl.line.toLowerCase();
|
@@ -303920,7 +303457,7 @@ ${theme.style.help(`(${config4.instructions?.pager ?? "Use arrow keys to reveal
|
|
303920
303457
|
const choiceDescription = selectedChoice.description ? `
|
303921
303458
|
${theme.style.description(selectedChoice.description)}` : ``;
|
303922
303459
|
return `${[prefix, message, helpTipTop].filter(Boolean).join(" ")}
|
303923
|
-
${page}${helpTipBottom}${choiceDescription}${
|
303460
|
+
${page}${helpTipBottom}${choiceDescription}${import_ansi_escapes2.default.cursorHide}`;
|
303924
303461
|
});
|
303925
303462
|
|
303926
303463
|
// src/prompts/smart-contract-set/subgraph.prompt.ts
|
@@ -305501,14 +305038,14 @@ function includesArgs(parameters) {
|
|
305501
305038
|
});
|
305502
305039
|
}
|
305503
305040
|
if (typeof args === "object" && !Array.isArray(args) && typeof matchArgs === "object" && !Array.isArray(matchArgs))
|
305504
|
-
return Object.entries(matchArgs).every(([
|
305041
|
+
return Object.entries(matchArgs).every(([key2, value4]) => {
|
305505
305042
|
if (value4 === null || value4 === undefined)
|
305506
305043
|
return true;
|
305507
|
-
const input = inputs.find((input2) => input2.name ===
|
305044
|
+
const input = inputs.find((input2) => input2.name === key2);
|
305508
305045
|
if (!input)
|
305509
305046
|
return false;
|
305510
305047
|
const value_ = Array.isArray(value4) ? value4 : [value4];
|
305511
|
-
return value_.some((value5) => isEqual(input, value5, args[
|
305048
|
+
return value_.some((value5) => isEqual(input, value5, args[key2]));
|
305512
305049
|
});
|
305513
305050
|
return false;
|
305514
305051
|
}
|
@@ -305707,13 +305244,13 @@ function observe(observerId, callbacks, fn) {
|
|
305707
305244
|
if (listeners && listeners.length > 0)
|
305708
305245
|
return unwatch;
|
305709
305246
|
const emit = {};
|
305710
|
-
for (const
|
305711
|
-
emit[
|
305247
|
+
for (const key2 in callbacks) {
|
305248
|
+
emit[key2] = (...args) => {
|
305712
305249
|
const listeners2 = getListeners();
|
305713
305250
|
if (listeners2.length === 0)
|
305714
305251
|
return;
|
305715
305252
|
for (const listener of listeners2)
|
305716
|
-
listener.fns[
|
305253
|
+
listener.fns[key2]?.(...args);
|
305717
305254
|
};
|
305718
305255
|
}
|
305719
305256
|
const cleanup = fn(emit);
|
@@ -306052,7 +305589,7 @@ function uid(length = 11) {
|
|
306052
305589
|
|
306053
305590
|
// ../../node_modules/viem/_esm/clients/createClient.js
|
306054
305591
|
function createClient(parameters) {
|
306055
|
-
const { batch, chain, ccipRead, key:
|
305592
|
+
const { batch, chain, ccipRead, key: key2 = "base", name: name3 = "Base Client", type: type4 = "base" } = parameters;
|
306056
305593
|
const blockTime = chain?.blockTime ?? 12000;
|
306057
305594
|
const defaultPollingInterval = Math.min(Math.max(Math.floor(blockTime / 2), 500), 4000);
|
306058
305595
|
const pollingInterval = parameters.pollingInterval ?? defaultPollingInterval;
|
@@ -306069,7 +305606,7 @@ function createClient(parameters) {
|
|
306069
305606
|
cacheTime,
|
306070
305607
|
ccipRead,
|
306071
305608
|
chain,
|
306072
|
-
key:
|
305609
|
+
key: key2,
|
306073
305610
|
name: name3,
|
306074
305611
|
pollingInterval,
|
306075
305612
|
request: request2,
|
@@ -306080,8 +305617,8 @@ function createClient(parameters) {
|
|
306080
305617
|
function extend4(base2) {
|
306081
305618
|
return (extendFn) => {
|
306082
305619
|
const extended = extendFn(base2);
|
306083
|
-
for (const
|
306084
|
-
delete extended[
|
305620
|
+
for (const key3 in client)
|
305621
|
+
delete extended[key3];
|
306085
305622
|
const combined = { ...base2, ...extended };
|
306086
305623
|
return Object.assign(combined, { extend: extend4(combined) });
|
306087
305624
|
};
|
@@ -306261,11 +305798,11 @@ function shouldRetry(error44) {
|
|
306261
305798
|
}
|
306262
305799
|
|
306263
305800
|
// ../../node_modules/viem/_esm/clients/transports/createTransport.js
|
306264
|
-
function createTransport({ key:
|
305801
|
+
function createTransport({ key: key2, methods, name: name3, request: request2, retryCount = 3, retryDelay = 150, timeout, type: type4 }, value4) {
|
306265
305802
|
const uid2 = uid();
|
306266
305803
|
return {
|
306267
305804
|
config: {
|
306268
|
-
key:
|
305805
|
+
key: key2,
|
306269
305806
|
methods,
|
306270
305807
|
name: name3,
|
306271
305808
|
request: request2,
|
@@ -306422,7 +305959,7 @@ function getHttpRpcClient(url4, options = {}) {
|
|
306422
305959
|
|
306423
305960
|
// ../../node_modules/viem/_esm/clients/transports/http.js
|
306424
305961
|
function http(url4, config4 = {}) {
|
306425
|
-
const { batch, fetchOptions, key:
|
305962
|
+
const { batch, fetchOptions, key: key2 = "http", methods, name: name3 = "HTTP JSON-RPC", onFetchRequest, onFetchResponse, retryDelay, raw } = config4;
|
306426
305963
|
return ({ chain, retryCount: retryCount_, timeout: timeout_ }) => {
|
306427
305964
|
const { batchSize = 1000, wait: wait2 = 0 } = typeof batch === "object" ? batch : {};
|
306428
305965
|
const retryCount = config4.retryCount ?? retryCount_;
|
@@ -306437,7 +305974,7 @@ function http(url4, config4 = {}) {
|
|
306437
305974
|
timeout
|
306438
305975
|
});
|
306439
305976
|
return createTransport({
|
306440
|
-
key:
|
305977
|
+
key: key2,
|
306441
305978
|
methods,
|
306442
305979
|
name: name3,
|
306443
305980
|
async request({ method, params }) {
|
@@ -306888,7 +306425,7 @@ init_getChainContractAddress();
|
|
306888
306425
|
init_toHex();
|
306889
306426
|
init_localBatchGatewayRequest();
|
306890
306427
|
async function getEnsText(client, parameters) {
|
306891
|
-
const { blockNumber, blockTag, key:
|
306428
|
+
const { blockNumber, blockTag, key: key2, name: name3, gatewayUrls, strict } = parameters;
|
306892
306429
|
const { chain } = client;
|
306893
306430
|
const universalResolverAddress = (() => {
|
306894
306431
|
if (parameters.universalResolverAddress)
|
@@ -306914,7 +306451,7 @@ async function getEnsText(client, parameters) {
|
|
306914
306451
|
encodeFunctionData({
|
306915
306452
|
abi: textResolverAbi,
|
306916
306453
|
functionName: "text",
|
306917
|
-
args: [namehash(name3),
|
306454
|
+
args: [namehash(name3), key2]
|
306918
306455
|
}),
|
306919
306456
|
gatewayUrls ?? [localBatchGatewayUrl]
|
306920
306457
|
],
|
@@ -307937,16 +307474,16 @@ class LruMap2 extends Map {
|
|
307937
307474
|
});
|
307938
307475
|
this.maxSize = size5;
|
307939
307476
|
}
|
307940
|
-
get(
|
307941
|
-
const value4 = super.get(
|
307942
|
-
if (super.has(
|
307943
|
-
this.delete(
|
307944
|
-
super.set(
|
307477
|
+
get(key2) {
|
307478
|
+
const value4 = super.get(key2);
|
307479
|
+
if (super.has(key2) && value4 !== undefined) {
|
307480
|
+
this.delete(key2);
|
307481
|
+
super.set(key2, value4);
|
307945
307482
|
}
|
307946
307483
|
return value4;
|
307947
307484
|
}
|
307948
|
-
set(
|
307949
|
-
super.set(
|
307485
|
+
set(key2, value4) {
|
307486
|
+
super.set(key2, value4);
|
307950
307487
|
if (this.maxSize && this.size > this.maxSize) {
|
307951
307488
|
const firstKey = this.keys().next().value;
|
307952
307489
|
if (firstKey)
|
@@ -309789,10 +309326,10 @@ function publicActions(client) {
|
|
309789
309326
|
|
309790
309327
|
// ../../node_modules/viem/_esm/clients/createPublicClient.js
|
309791
309328
|
function createPublicClient(parameters) {
|
309792
|
-
const { key:
|
309329
|
+
const { key: key2 = "public", name: name3 = "Public Client" } = parameters;
|
309793
309330
|
const client = createClient({
|
309794
309331
|
...parameters,
|
309795
|
-
key:
|
309332
|
+
key: key2,
|
309796
309333
|
name: name3,
|
309797
309334
|
type: "publicClient"
|
309798
309335
|
});
|
@@ -309893,7 +309430,7 @@ __export4(util_exports3, {
|
|
309893
309430
|
getParsedType: () => getParsedType4,
|
309894
309431
|
getSizableOrigin: () => getSizableOrigin4,
|
309895
309432
|
isObject: () => isObject4,
|
309896
|
-
isPlainObject: () =>
|
309433
|
+
isPlainObject: () => isPlainObject6,
|
309897
309434
|
issue: () => issue4,
|
309898
309435
|
joinValues: () => joinValues4,
|
309899
309436
|
jsonStringifyReplacer: () => jsonStringifyReplacer4,
|
@@ -309965,19 +309502,19 @@ function floatSafeRemainder4(val, step) {
|
|
309965
309502
|
const stepInt = Number.parseInt(step.toFixed(decCount).replace(".", ""));
|
309966
309503
|
return valInt % stepInt / 10 ** decCount;
|
309967
309504
|
}
|
309968
|
-
function defineLazy4(object$1,
|
309505
|
+
function defineLazy4(object$1, key2, getter) {
|
309969
309506
|
const set$1 = false;
|
309970
|
-
Object.defineProperty(object$1,
|
309507
|
+
Object.defineProperty(object$1, key2, {
|
309971
309508
|
get() {
|
309972
309509
|
if (!set$1) {
|
309973
309510
|
const value4 = getter();
|
309974
|
-
object$1[
|
309511
|
+
object$1[key2] = value4;
|
309975
309512
|
return value4;
|
309976
309513
|
}
|
309977
309514
|
throw new Error("cached value already set");
|
309978
309515
|
},
|
309979
309516
|
set(v6) {
|
309980
|
-
Object.defineProperty(object$1,
|
309517
|
+
Object.defineProperty(object$1, key2, { value: v6 });
|
309981
309518
|
},
|
309982
309519
|
configurable: true
|
309983
309520
|
});
|
@@ -309993,11 +309530,11 @@ function assignProp4(target, prop, value4) {
|
|
309993
309530
|
function getElementAtPath4(obj, path7) {
|
309994
309531
|
if (!path7)
|
309995
309532
|
return obj;
|
309996
|
-
return path7.reduce((acc,
|
309533
|
+
return path7.reduce((acc, key2) => acc?.[key2], obj);
|
309997
309534
|
}
|
309998
309535
|
function promiseAllObject4(promisesObj) {
|
309999
309536
|
const keys = Object.keys(promisesObj);
|
310000
|
-
const promises = keys.map((
|
309537
|
+
const promises = keys.map((key2) => promisesObj[key2]);
|
310001
309538
|
return Promise.all(promises).then((results) => {
|
310002
309539
|
const resolvedObj = {};
|
310003
309540
|
for (let i6 = 0;i6 < keys.length; i6++) {
|
@@ -310029,7 +309566,7 @@ var allowsEval4 = cached4(() => {
|
|
310029
309566
|
return false;
|
310030
309567
|
}
|
310031
309568
|
});
|
310032
|
-
function
|
309569
|
+
function isPlainObject6(o8) {
|
310033
309570
|
if (isObject4(o8) === false)
|
310034
309571
|
return false;
|
310035
309572
|
const ctor = o8.constructor;
|
@@ -310045,8 +309582,8 @@ function isPlainObject7(o8) {
|
|
310045
309582
|
}
|
310046
309583
|
function numKeys4(data) {
|
310047
309584
|
let keyCount = 0;
|
310048
|
-
for (const
|
310049
|
-
if (Object.prototype.hasOwnProperty.call(data,
|
309585
|
+
for (const key2 in data) {
|
309586
|
+
if (Object.prototype.hasOwnProperty.call(data, key2)) {
|
310050
309587
|
keyCount++;
|
310051
309588
|
}
|
310052
309589
|
}
|
@@ -310196,13 +309733,13 @@ var BIGINT_FORMAT_RANGES4 = {
|
|
310196
309733
|
function pick4(schema, mask) {
|
310197
309734
|
const newShape = {};
|
310198
309735
|
const currDef = schema._zod.def;
|
310199
|
-
for (const
|
310200
|
-
if (!(
|
310201
|
-
throw new Error(`Unrecognized key: "${
|
309736
|
+
for (const key2 in mask) {
|
309737
|
+
if (!(key2 in currDef.shape)) {
|
309738
|
+
throw new Error(`Unrecognized key: "${key2}"`);
|
310202
309739
|
}
|
310203
|
-
if (!mask[
|
309740
|
+
if (!mask[key2])
|
310204
309741
|
continue;
|
310205
|
-
newShape[
|
309742
|
+
newShape[key2] = currDef.shape[key2];
|
310206
309743
|
}
|
310207
309744
|
return clone4(schema, {
|
310208
309745
|
...schema._zod.def,
|
@@ -310213,13 +309750,13 @@ function pick4(schema, mask) {
|
|
310213
309750
|
function omit4(schema, mask) {
|
310214
309751
|
const newShape = { ...schema._zod.def.shape };
|
310215
309752
|
const currDef = schema._zod.def;
|
310216
|
-
for (const
|
310217
|
-
if (!(
|
310218
|
-
throw new Error(`Unrecognized key: "${
|
309753
|
+
for (const key2 in mask) {
|
309754
|
+
if (!(key2 in currDef.shape)) {
|
309755
|
+
throw new Error(`Unrecognized key: "${key2}"`);
|
310219
309756
|
}
|
310220
|
-
if (!mask[
|
309757
|
+
if (!mask[key2])
|
310221
309758
|
continue;
|
310222
|
-
delete newShape[
|
309759
|
+
delete newShape[key2];
|
310223
309760
|
}
|
310224
309761
|
return clone4(schema, {
|
310225
309762
|
...schema._zod.def,
|
@@ -310261,23 +309798,23 @@ function partial4(Class$1, schema, mask) {
|
|
310261
309798
|
const oldShape = schema._zod.def.shape;
|
310262
309799
|
const shape = { ...oldShape };
|
310263
309800
|
if (mask) {
|
310264
|
-
for (const
|
310265
|
-
if (!(
|
310266
|
-
throw new Error(`Unrecognized key: "${
|
309801
|
+
for (const key2 in mask) {
|
309802
|
+
if (!(key2 in oldShape)) {
|
309803
|
+
throw new Error(`Unrecognized key: "${key2}"`);
|
310267
309804
|
}
|
310268
|
-
if (!mask[
|
309805
|
+
if (!mask[key2])
|
310269
309806
|
continue;
|
310270
|
-
shape[
|
309807
|
+
shape[key2] = Class$1 ? new Class$1({
|
310271
309808
|
type: "optional",
|
310272
|
-
innerType: oldShape[
|
310273
|
-
}) : oldShape[
|
309809
|
+
innerType: oldShape[key2]
|
309810
|
+
}) : oldShape[key2];
|
310274
309811
|
}
|
310275
309812
|
} else {
|
310276
|
-
for (const
|
310277
|
-
shape[
|
309813
|
+
for (const key2 in oldShape) {
|
309814
|
+
shape[key2] = Class$1 ? new Class$1({
|
310278
309815
|
type: "optional",
|
310279
|
-
innerType: oldShape[
|
310280
|
-
}) : oldShape[
|
309816
|
+
innerType: oldShape[key2]
|
309817
|
+
}) : oldShape[key2];
|
310281
309818
|
}
|
310282
309819
|
}
|
310283
309820
|
return clone4(schema, {
|
@@ -310290,22 +309827,22 @@ function required4(Class$1, schema, mask) {
|
|
310290
309827
|
const oldShape = schema._zod.def.shape;
|
310291
309828
|
const shape = { ...oldShape };
|
310292
309829
|
if (mask) {
|
310293
|
-
for (const
|
310294
|
-
if (!(
|
310295
|
-
throw new Error(`Unrecognized key: "${
|
309830
|
+
for (const key2 in mask) {
|
309831
|
+
if (!(key2 in shape)) {
|
309832
|
+
throw new Error(`Unrecognized key: "${key2}"`);
|
310296
309833
|
}
|
310297
|
-
if (!mask[
|
309834
|
+
if (!mask[key2])
|
310298
309835
|
continue;
|
310299
|
-
shape[
|
309836
|
+
shape[key2] = new Class$1({
|
310300
309837
|
type: "nonoptional",
|
310301
|
-
innerType: oldShape[
|
309838
|
+
innerType: oldShape[key2]
|
310302
309839
|
});
|
310303
309840
|
}
|
310304
309841
|
} else {
|
310305
|
-
for (const
|
310306
|
-
shape[
|
309842
|
+
for (const key2 in oldShape) {
|
309843
|
+
shape[key2] = new Class$1({
|
310307
309844
|
type: "nonoptional",
|
310308
|
-
innerType: oldShape[
|
309845
|
+
innerType: oldShape[key2]
|
310309
309846
|
});
|
310310
309847
|
}
|
310311
309848
|
}
|
@@ -311885,28 +311422,28 @@ var $ZodArray4 = /* @__PURE__ */ $constructor4("$ZodArray", (inst, def) => {
|
|
311885
311422
|
return payload;
|
311886
311423
|
};
|
311887
311424
|
});
|
311888
|
-
function handleObjectResult4(result, final,
|
311425
|
+
function handleObjectResult4(result, final, key2) {
|
311889
311426
|
if (result.issues.length) {
|
311890
|
-
final.issues.push(...prefixIssues4(
|
311427
|
+
final.issues.push(...prefixIssues4(key2, result.issues));
|
311891
311428
|
}
|
311892
|
-
final.value[
|
311429
|
+
final.value[key2] = result.value;
|
311893
311430
|
}
|
311894
|
-
function handleOptionalObjectResult4(result, final,
|
311431
|
+
function handleOptionalObjectResult4(result, final, key2, input) {
|
311895
311432
|
if (result.issues.length) {
|
311896
|
-
if (input[
|
311897
|
-
if (
|
311898
|
-
final.value[
|
311433
|
+
if (input[key2] === undefined) {
|
311434
|
+
if (key2 in input) {
|
311435
|
+
final.value[key2] = undefined;
|
311899
311436
|
} else {
|
311900
|
-
final.value[
|
311437
|
+
final.value[key2] = result.value;
|
311901
311438
|
}
|
311902
311439
|
} else {
|
311903
|
-
final.issues.push(...prefixIssues4(
|
311440
|
+
final.issues.push(...prefixIssues4(key2, result.issues));
|
311904
311441
|
}
|
311905
311442
|
} else if (result.value === undefined) {
|
311906
|
-
if (
|
311907
|
-
final.value[
|
311443
|
+
if (key2 in input)
|
311444
|
+
final.value[key2] = undefined;
|
311908
311445
|
} else {
|
311909
|
-
final.value[
|
311446
|
+
final.value[key2] = result.value;
|
311910
311447
|
}
|
311911
311448
|
}
|
311912
311449
|
var $ZodObject4 = /* @__PURE__ */ $constructor4("$ZodObject", (inst, def) => {
|
@@ -311930,12 +311467,12 @@ var $ZodObject4 = /* @__PURE__ */ $constructor4("$ZodObject", (inst, def) => {
|
|
311930
311467
|
defineLazy4(inst._zod, "propValues", () => {
|
311931
311468
|
const shape = def.shape;
|
311932
311469
|
const propValues = {};
|
311933
|
-
for (const
|
311934
|
-
const field2 = shape[
|
311470
|
+
for (const key2 in shape) {
|
311471
|
+
const field2 = shape[key2]._zod;
|
311935
311472
|
if (field2.values) {
|
311936
|
-
propValues[
|
311473
|
+
propValues[key2] ?? (propValues[key2] = new Set);
|
311937
311474
|
for (const v6 of field2.values)
|
311938
|
-
propValues[
|
311475
|
+
propValues[key2].add(v6);
|
311939
311476
|
}
|
311940
311477
|
}
|
311941
311478
|
return propValues;
|
@@ -311947,21 +311484,21 @@ var $ZodObject4 = /* @__PURE__ */ $constructor4("$ZodObject", (inst, def) => {
|
|
311947
311484
|
"ctx"
|
311948
311485
|
]);
|
311949
311486
|
const { keys, optionalKeys: optionalKeys$1 } = _normalized.value;
|
311950
|
-
const parseStr = (
|
311951
|
-
const k5 = esc4(
|
311487
|
+
const parseStr = (key2) => {
|
311488
|
+
const k5 = esc4(key2);
|
311952
311489
|
return `shape[${k5}]._zod.run({ value: input[${k5}], issues: [] }, ctx)`;
|
311953
311490
|
};
|
311954
311491
|
doc2.write(`const input = payload.value;`);
|
311955
311492
|
const ids = Object.create(null);
|
311956
|
-
for (const
|
311957
|
-
ids[
|
311493
|
+
for (const key2 of keys) {
|
311494
|
+
ids[key2] = randomString4(15);
|
311958
311495
|
}
|
311959
311496
|
doc2.write(`const newResult = {}`);
|
311960
|
-
for (const
|
311961
|
-
if (optionalKeys$1.has(
|
311962
|
-
const id = ids[
|
311963
|
-
doc2.write(`const ${id} = ${parseStr(
|
311964
|
-
const k5 = esc4(
|
311497
|
+
for (const key2 of keys) {
|
311498
|
+
if (optionalKeys$1.has(key2)) {
|
311499
|
+
const id = ids[key2];
|
311500
|
+
doc2.write(`const ${id} = ${parseStr(key2)};`);
|
311501
|
+
const k5 = esc4(key2);
|
311965
311502
|
doc2.write(`
|
311966
311503
|
if (${id}.issues.length) {
|
311967
311504
|
if (input[${k5}] === undefined) {
|
@@ -311983,14 +311520,14 @@ var $ZodObject4 = /* @__PURE__ */ $constructor4("$ZodObject", (inst, def) => {
|
|
311983
311520
|
}
|
311984
311521
|
`);
|
311985
311522
|
} else {
|
311986
|
-
const id = ids[
|
311987
|
-
doc2.write(`const ${id} = ${parseStr(
|
311523
|
+
const id = ids[key2];
|
311524
|
+
doc2.write(`const ${id} = ${parseStr(key2)};`);
|
311988
311525
|
doc2.write(`
|
311989
311526
|
if (${id}.issues.length) payload.issues = payload.issues.concat(${id}.issues.map(iss => ({
|
311990
311527
|
...iss,
|
311991
|
-
path: iss.path ? [${esc4(
|
311528
|
+
path: iss.path ? [${esc4(key2)}, ...iss.path] : [${esc4(key2)}]
|
311992
311529
|
})));`);
|
311993
|
-
doc2.write(`newResult[${esc4(
|
311530
|
+
doc2.write(`newResult[${esc4(key2)}] = ${id}.value`);
|
311994
311531
|
}
|
311995
311532
|
}
|
311996
311533
|
doc2.write(`payload.value = newResult;`);
|
@@ -312025,20 +311562,20 @@ var $ZodObject4 = /* @__PURE__ */ $constructor4("$ZodObject", (inst, def) => {
|
|
312025
311562
|
} else {
|
312026
311563
|
payload.value = {};
|
312027
311564
|
const shape = value4.shape;
|
312028
|
-
for (const
|
312029
|
-
const el = shape[
|
311565
|
+
for (const key2 of value4.keys) {
|
311566
|
+
const el = shape[key2];
|
312030
311567
|
const r6 = el._zod.run({
|
312031
|
-
value: input[
|
311568
|
+
value: input[key2],
|
312032
311569
|
issues: []
|
312033
311570
|
}, ctx);
|
312034
311571
|
const isOptional = el._zod.optin === "optional" && el._zod.optout === "optional";
|
312035
311572
|
if (r6 instanceof Promise) {
|
312036
|
-
proms.push(r6.then((r$1) => isOptional ? handleOptionalObjectResult4(r$1, payload,
|
311573
|
+
proms.push(r6.then((r$1) => isOptional ? handleOptionalObjectResult4(r$1, payload, key2, input) : handleObjectResult4(r$1, payload, key2)));
|
312037
311574
|
} else {
|
312038
311575
|
if (isOptional) {
|
312039
|
-
handleOptionalObjectResult4(r6, payload,
|
311576
|
+
handleOptionalObjectResult4(r6, payload, key2, input);
|
312040
311577
|
} else {
|
312041
|
-
handleObjectResult4(r6, payload,
|
311578
|
+
handleObjectResult4(r6, payload, key2);
|
312042
311579
|
}
|
312043
311580
|
}
|
312044
311581
|
}
|
@@ -312050,21 +311587,21 @@ var $ZodObject4 = /* @__PURE__ */ $constructor4("$ZodObject", (inst, def) => {
|
|
312050
311587
|
const keySet = value4.keySet;
|
312051
311588
|
const _catchall = catchall._zod;
|
312052
311589
|
const t8 = _catchall.def.type;
|
312053
|
-
for (const
|
312054
|
-
if (keySet.has(
|
311590
|
+
for (const key2 of Object.keys(input)) {
|
311591
|
+
if (keySet.has(key2))
|
312055
311592
|
continue;
|
312056
311593
|
if (t8 === "never") {
|
312057
|
-
unrecognized.push(
|
311594
|
+
unrecognized.push(key2);
|
312058
311595
|
continue;
|
312059
311596
|
}
|
312060
311597
|
const r6 = _catchall.run({
|
312061
|
-
value: input[
|
311598
|
+
value: input[key2],
|
312062
311599
|
issues: []
|
312063
311600
|
}, ctx);
|
312064
311601
|
if (r6 instanceof Promise) {
|
312065
|
-
proms.push(r6.then((r$1) => handleObjectResult4(r$1, payload,
|
311602
|
+
proms.push(r6.then((r$1) => handleObjectResult4(r$1, payload, key2)));
|
312066
311603
|
} else {
|
312067
|
-
handleObjectResult4(r6, payload,
|
311604
|
+
handleObjectResult4(r6, payload, key2);
|
312068
311605
|
}
|
312069
311606
|
}
|
312070
311607
|
if (unrecognized.length) {
|
@@ -312234,22 +311771,22 @@ function mergeValues4(a7, b4) {
|
|
312234
311771
|
data: a7
|
312235
311772
|
};
|
312236
311773
|
}
|
312237
|
-
if (
|
311774
|
+
if (isPlainObject6(a7) && isPlainObject6(b4)) {
|
312238
311775
|
const bKeys = Object.keys(b4);
|
312239
|
-
const sharedKeys = Object.keys(a7).filter((
|
311776
|
+
const sharedKeys = Object.keys(a7).filter((key2) => bKeys.indexOf(key2) !== -1);
|
312240
311777
|
const newObj = {
|
312241
311778
|
...a7,
|
312242
311779
|
...b4
|
312243
311780
|
};
|
312244
|
-
for (const
|
312245
|
-
const sharedValue = mergeValues4(a7[
|
311781
|
+
for (const key2 of sharedKeys) {
|
311782
|
+
const sharedValue = mergeValues4(a7[key2], b4[key2]);
|
312246
311783
|
if (!sharedValue.valid) {
|
312247
311784
|
return {
|
312248
311785
|
valid: false,
|
312249
|
-
mergeErrorPath: [
|
311786
|
+
mergeErrorPath: [key2, ...sharedValue.mergeErrorPath]
|
312250
311787
|
};
|
312251
311788
|
}
|
312252
|
-
newObj[
|
311789
|
+
newObj[key2] = sharedValue.data;
|
312253
311790
|
}
|
312254
311791
|
return {
|
312255
311792
|
valid: true,
|
@@ -312385,7 +311922,7 @@ var $ZodRecord4 = /* @__PURE__ */ $constructor4("$ZodRecord", (inst, def) => {
|
|
312385
311922
|
$ZodType4.init(inst, def);
|
312386
311923
|
inst._zod.parse = (payload, ctx) => {
|
312387
311924
|
const input = payload.value;
|
312388
|
-
if (!
|
311925
|
+
if (!isPlainObject6(input)) {
|
312389
311926
|
payload.issues.push({
|
312390
311927
|
expected: "record",
|
312391
311928
|
code: "invalid_type",
|
@@ -312398,32 +311935,32 @@ var $ZodRecord4 = /* @__PURE__ */ $constructor4("$ZodRecord", (inst, def) => {
|
|
312398
311935
|
if (def.keyType._zod.values) {
|
312399
311936
|
const values = def.keyType._zod.values;
|
312400
311937
|
payload.value = {};
|
312401
|
-
for (const
|
312402
|
-
if (typeof
|
311938
|
+
for (const key2 of values) {
|
311939
|
+
if (typeof key2 === "string" || typeof key2 === "number" || typeof key2 === "symbol") {
|
312403
311940
|
const result = def.valueType._zod.run({
|
312404
|
-
value: input[
|
311941
|
+
value: input[key2],
|
312405
311942
|
issues: []
|
312406
311943
|
}, ctx);
|
312407
311944
|
if (result instanceof Promise) {
|
312408
311945
|
proms.push(result.then((result$1) => {
|
312409
311946
|
if (result$1.issues.length) {
|
312410
|
-
payload.issues.push(...prefixIssues4(
|
311947
|
+
payload.issues.push(...prefixIssues4(key2, result$1.issues));
|
312411
311948
|
}
|
312412
|
-
payload.value[
|
311949
|
+
payload.value[key2] = result$1.value;
|
312413
311950
|
}));
|
312414
311951
|
} else {
|
312415
311952
|
if (result.issues.length) {
|
312416
|
-
payload.issues.push(...prefixIssues4(
|
311953
|
+
payload.issues.push(...prefixIssues4(key2, result.issues));
|
312417
311954
|
}
|
312418
|
-
payload.value[
|
311955
|
+
payload.value[key2] = result.value;
|
312419
311956
|
}
|
312420
311957
|
}
|
312421
311958
|
}
|
312422
311959
|
let unrecognized;
|
312423
|
-
for (const
|
312424
|
-
if (!values.has(
|
311960
|
+
for (const key2 in input) {
|
311961
|
+
if (!values.has(key2)) {
|
312425
311962
|
unrecognized = unrecognized ?? [];
|
312426
|
-
unrecognized.push(
|
311963
|
+
unrecognized.push(key2);
|
312427
311964
|
}
|
312428
311965
|
}
|
312429
311966
|
if (unrecognized && unrecognized.length > 0) {
|
@@ -312436,11 +311973,11 @@ var $ZodRecord4 = /* @__PURE__ */ $constructor4("$ZodRecord", (inst, def) => {
|
|
312436
311973
|
}
|
312437
311974
|
} else {
|
312438
311975
|
payload.value = {};
|
312439
|
-
for (const
|
312440
|
-
if (
|
311976
|
+
for (const key2 of Reflect.ownKeys(input)) {
|
311977
|
+
if (key2 === "__proto__")
|
312441
311978
|
continue;
|
312442
311979
|
const keyResult = def.keyType._zod.run({
|
312443
|
-
value:
|
311980
|
+
value: key2,
|
312444
311981
|
issues: []
|
312445
311982
|
}, ctx);
|
312446
311983
|
if (keyResult instanceof Promise) {
|
@@ -312451,27 +311988,27 @@ var $ZodRecord4 = /* @__PURE__ */ $constructor4("$ZodRecord", (inst, def) => {
|
|
312451
311988
|
origin: "record",
|
312452
311989
|
code: "invalid_key",
|
312453
311990
|
issues: keyResult.issues.map((iss) => finalizeIssue4(iss, ctx, config4())),
|
312454
|
-
input:
|
312455
|
-
path: [
|
311991
|
+
input: key2,
|
311992
|
+
path: [key2],
|
312456
311993
|
inst
|
312457
311994
|
});
|
312458
311995
|
payload.value[keyResult.value] = keyResult.value;
|
312459
311996
|
continue;
|
312460
311997
|
}
|
312461
311998
|
const result = def.valueType._zod.run({
|
312462
|
-
value: input[
|
311999
|
+
value: input[key2],
|
312463
312000
|
issues: []
|
312464
312001
|
}, ctx);
|
312465
312002
|
if (result instanceof Promise) {
|
312466
312003
|
proms.push(result.then((result$1) => {
|
312467
312004
|
if (result$1.issues.length) {
|
312468
|
-
payload.issues.push(...prefixIssues4(
|
312005
|
+
payload.issues.push(...prefixIssues4(key2, result$1.issues));
|
312469
312006
|
}
|
312470
312007
|
payload.value[keyResult.value] = result$1.value;
|
312471
312008
|
}));
|
312472
312009
|
} else {
|
312473
312010
|
if (result.issues.length) {
|
312474
|
-
payload.issues.push(...prefixIssues4(
|
312011
|
+
payload.issues.push(...prefixIssues4(key2, result.issues));
|
312475
312012
|
}
|
312476
312013
|
payload.value[keyResult.value] = result.value;
|
312477
312014
|
}
|
@@ -312498,9 +312035,9 @@ var $ZodMap4 = /* @__PURE__ */ $constructor4("$ZodMap", (inst, def) => {
|
|
312498
312035
|
}
|
312499
312036
|
const proms = [];
|
312500
312037
|
payload.value = new Map;
|
312501
|
-
for (const [
|
312038
|
+
for (const [key2, value4] of input) {
|
312502
312039
|
const keyResult = def.keyType._zod.run({
|
312503
|
-
value:
|
312040
|
+
value: key2,
|
312504
312041
|
issues: []
|
312505
312042
|
}, ctx);
|
312506
312043
|
const valueResult = def.valueType._zod.run({
|
@@ -312509,10 +312046,10 @@ var $ZodMap4 = /* @__PURE__ */ $constructor4("$ZodMap", (inst, def) => {
|
|
312509
312046
|
}, ctx);
|
312510
312047
|
if (keyResult instanceof Promise || valueResult instanceof Promise) {
|
312511
312048
|
proms.push(Promise.all([keyResult, valueResult]).then(([keyResult$1, valueResult$1]) => {
|
312512
|
-
handleMapResult4(keyResult$1, valueResult$1, payload,
|
312049
|
+
handleMapResult4(keyResult$1, valueResult$1, payload, key2, input, inst, ctx);
|
312513
312050
|
}));
|
312514
312051
|
} else {
|
312515
|
-
handleMapResult4(keyResult, valueResult, payload,
|
312052
|
+
handleMapResult4(keyResult, valueResult, payload, key2, input, inst, ctx);
|
312516
312053
|
}
|
312517
312054
|
}
|
312518
312055
|
if (proms.length)
|
@@ -312520,10 +312057,10 @@ var $ZodMap4 = /* @__PURE__ */ $constructor4("$ZodMap", (inst, def) => {
|
|
312520
312057
|
return payload;
|
312521
312058
|
};
|
312522
312059
|
});
|
312523
|
-
function handleMapResult4(keyResult, valueResult, final,
|
312060
|
+
function handleMapResult4(keyResult, valueResult, final, key2, input, inst, ctx) {
|
312524
312061
|
if (keyResult.issues.length) {
|
312525
|
-
if (propertyKeyTypes4.has(typeof
|
312526
|
-
final.issues.push(...prefixIssues4(
|
312062
|
+
if (propertyKeyTypes4.has(typeof key2)) {
|
312063
|
+
final.issues.push(...prefixIssues4(key2, keyResult.issues));
|
312527
312064
|
} else {
|
312528
312065
|
final.issues.push({
|
312529
312066
|
origin: "map",
|
@@ -312535,15 +312072,15 @@ function handleMapResult4(keyResult, valueResult, final, key3, input, inst, ctx)
|
|
312535
312072
|
}
|
312536
312073
|
}
|
312537
312074
|
if (valueResult.issues.length) {
|
312538
|
-
if (propertyKeyTypes4.has(typeof
|
312539
|
-
final.issues.push(...prefixIssues4(
|
312075
|
+
if (propertyKeyTypes4.has(typeof key2)) {
|
312076
|
+
final.issues.push(...prefixIssues4(key2, valueResult.issues));
|
312540
312077
|
} else {
|
312541
312078
|
final.issues.push({
|
312542
312079
|
origin: "map",
|
312543
312080
|
code: "invalid_element",
|
312544
312081
|
input,
|
312545
312082
|
inst,
|
312546
|
-
key:
|
312083
|
+
key: key2,
|
312547
312084
|
issues: valueResult.issues.map((iss) => finalizeIssue4(iss, ctx, config4()))
|
312548
312085
|
});
|
312549
312086
|
}
|
@@ -318865,19 +318402,19 @@ var JSONSchemaGenerator4 = class {
|
|
318865
318402
|
json$1.type = "object";
|
318866
318403
|
json$1.properties = {};
|
318867
318404
|
const shape = def.shape;
|
318868
|
-
for (const
|
318869
|
-
json$1.properties[
|
318405
|
+
for (const key2 in shape) {
|
318406
|
+
json$1.properties[key2] = this.process(shape[key2], {
|
318870
318407
|
...params,
|
318871
318408
|
path: [
|
318872
318409
|
...params.path,
|
318873
318410
|
"properties",
|
318874
|
-
|
318411
|
+
key2
|
318875
318412
|
]
|
318876
318413
|
});
|
318877
318414
|
}
|
318878
318415
|
const allKeys = new Set(Object.keys(shape));
|
318879
|
-
const requiredKeys = new Set([...allKeys].filter((
|
318880
|
-
const v6 = def.shape[
|
318416
|
+
const requiredKeys = new Set([...allKeys].filter((key2) => {
|
318417
|
+
const v6 = def.shape[key2]._zod;
|
318881
318418
|
if (this.io === "input") {
|
318882
318419
|
return v6.optin === undefined;
|
318883
318420
|
} else {
|
@@ -319229,8 +318766,8 @@ var JSONSchemaGenerator4 = class {
|
|
319229
318766
|
if (defId)
|
319230
318767
|
seen.defId = defId;
|
319231
318768
|
const schema$1 = seen.schema;
|
319232
|
-
for (const
|
319233
|
-
delete schema$1[
|
318769
|
+
for (const key2 in schema$1) {
|
318770
|
+
delete schema$1[key2];
|
319234
318771
|
}
|
319235
318772
|
schema$1.$ref = ref;
|
319236
318773
|
};
|
@@ -319341,8 +318878,8 @@ function toJSONSchema4(input, _params) {
|
|
319341
318878
|
defs
|
319342
318879
|
};
|
319343
318880
|
for (const entry of input._idmap.entries()) {
|
319344
|
-
const [
|
319345
|
-
schemas3[
|
318881
|
+
const [key2, schema] = entry;
|
318882
|
+
schemas3[key2] = gen$1.emit(schema, {
|
319346
318883
|
..._params,
|
319347
318884
|
external: external2
|
319348
318885
|
});
|
@@ -319387,8 +318924,8 @@ function isTransforming4(_schema, _ctx) {
|
|
319387
318924
|
return isTransforming4(def.element, ctx);
|
319388
318925
|
}
|
319389
318926
|
case "object": {
|
319390
|
-
for (const
|
319391
|
-
if (isTransforming4(def.shape[
|
318927
|
+
for (const key2 in def.shape) {
|
318928
|
+
if (isTransforming4(def.shape[key2], ctx))
|
319392
318929
|
return true;
|
319393
318930
|
}
|
319394
318931
|
return false;
|
@@ -321131,13 +320668,13 @@ var esm_default4 = createPrompt((config5, done) => {
|
|
321131
320668
|
const [value4, setValue] = useState("");
|
321132
320669
|
const theme = makeTheme(config5.theme);
|
321133
320670
|
const prefix = usePrefix({ status, theme });
|
321134
|
-
useKeypress((
|
321135
|
-
if (isEnterKey(
|
320671
|
+
useKeypress((key2, rl) => {
|
320672
|
+
if (isEnterKey(key2)) {
|
321136
320673
|
const answer = getBooleanValue(value4, config5.default);
|
321137
320674
|
setValue(transformer(answer));
|
321138
320675
|
setStatus("done");
|
321139
320676
|
done(answer);
|
321140
|
-
} else if (
|
320677
|
+
} else if (key2.name === "tab") {
|
321141
320678
|
const answer = boolToString(!getBooleanValue(value4, config5.default));
|
321142
320679
|
rl.clearLine(0);
|
321143
320680
|
rl.write(answer);
|
@@ -321158,7 +320695,7 @@ var esm_default4 = createPrompt((config5, done) => {
|
|
321158
320695
|
});
|
321159
320696
|
|
321160
320697
|
// ../../node_modules/@inquirer/password/dist/esm/index.js
|
321161
|
-
var
|
320698
|
+
var import_ansi_escapes3 = __toESM(require_ansi_escapes(), 1);
|
321162
320699
|
var esm_default5 = createPrompt((config5, done) => {
|
321163
320700
|
const { validate: validate5 = () => true } = config5;
|
321164
320701
|
const theme = makeTheme(config5.theme);
|
@@ -321166,11 +320703,11 @@ var esm_default5 = createPrompt((config5, done) => {
|
|
321166
320703
|
const [errorMsg, setError] = useState();
|
321167
320704
|
const [value4, setValue] = useState("");
|
321168
320705
|
const prefix = usePrefix({ status, theme });
|
321169
|
-
useKeypress(async (
|
320706
|
+
useKeypress(async (key2, rl) => {
|
321170
320707
|
if (status !== "idle") {
|
321171
320708
|
return;
|
321172
320709
|
}
|
321173
|
-
if (isEnterKey(
|
320710
|
+
if (isEnterKey(key2)) {
|
321174
320711
|
const answer = value4;
|
321175
320712
|
setStatus("loading");
|
321176
320713
|
const isValid = await validate5(answer);
|
@@ -321195,7 +320732,7 @@ var esm_default5 = createPrompt((config5, done) => {
|
|
321195
320732
|
const maskChar = typeof config5.mask === "string" ? config5.mask : "*";
|
321196
320733
|
formattedValue = maskChar.repeat(value4.length);
|
321197
320734
|
} else if (status !== "done") {
|
321198
|
-
helpTip = `${theme.style.help("[input is masked]")}${
|
320735
|
+
helpTip = `${theme.style.help("[input is masked]")}${import_ansi_escapes3.default.cursorHide}`;
|
321199
320736
|
}
|
321200
320737
|
if (status === "done") {
|
321201
320738
|
formattedValue = theme.style.answer(formattedValue);
|
@@ -322926,7 +322463,7 @@ var basename2 = function(p5, extension) {
|
|
322926
322463
|
return extension && lastSegment.endsWith(extension) ? lastSegment.slice(0, -extension.length) : lastSegment;
|
322927
322464
|
};
|
322928
322465
|
// ../../node_modules/defu/dist/defu.mjs
|
322929
|
-
function
|
322466
|
+
function isPlainObject7(value4) {
|
322930
322467
|
if (value4 === null || typeof value4 !== "object") {
|
322931
322468
|
return false;
|
322932
322469
|
}
|
@@ -322943,27 +322480,27 @@ function isPlainObject8(value4) {
|
|
322943
322480
|
return true;
|
322944
322481
|
}
|
322945
322482
|
function _defu(baseObject, defaults4, namespace = ".", merger) {
|
322946
|
-
if (!
|
322483
|
+
if (!isPlainObject7(defaults4)) {
|
322947
322484
|
return _defu(baseObject, {}, namespace, merger);
|
322948
322485
|
}
|
322949
322486
|
const object5 = Object.assign({}, defaults4);
|
322950
|
-
for (const
|
322951
|
-
if (
|
322487
|
+
for (const key2 in baseObject) {
|
322488
|
+
if (key2 === "__proto__" || key2 === "constructor") {
|
322952
322489
|
continue;
|
322953
322490
|
}
|
322954
|
-
const value4 = baseObject[
|
322491
|
+
const value4 = baseObject[key2];
|
322955
322492
|
if (value4 === null || value4 === undefined) {
|
322956
322493
|
continue;
|
322957
322494
|
}
|
322958
|
-
if (merger && merger(object5,
|
322495
|
+
if (merger && merger(object5, key2, value4, namespace)) {
|
322959
322496
|
continue;
|
322960
322497
|
}
|
322961
|
-
if (Array.isArray(value4) && Array.isArray(object5[
|
322962
|
-
object5[
|
322963
|
-
} else if (
|
322964
|
-
object5[
|
322498
|
+
if (Array.isArray(value4) && Array.isArray(object5[key2])) {
|
322499
|
+
object5[key2] = [...value4, ...object5[key2]];
|
322500
|
+
} else if (isPlainObject7(value4) && isPlainObject7(object5[key2])) {
|
322501
|
+
object5[key2] = _defu(value4, object5[key2], (namespace ? `${namespace}.` : "") + key2.toString(), merger);
|
322965
322502
|
} else {
|
322966
|
-
object5[
|
322503
|
+
object5[key2] = value4;
|
322967
322504
|
}
|
322968
322505
|
}
|
322969
322506
|
return object5;
|
@@ -322972,15 +322509,15 @@ function createDefu(merger) {
|
|
322972
322509
|
return (...arguments_4) => arguments_4.reduce((p5, c3) => _defu(p5, c3, "", merger), {});
|
322973
322510
|
}
|
322974
322511
|
var defu = createDefu();
|
322975
|
-
var defuFn = createDefu((object5,
|
322976
|
-
if (object5[
|
322977
|
-
object5[
|
322512
|
+
var defuFn = createDefu((object5, key2, currentValue) => {
|
322513
|
+
if (object5[key2] !== undefined && typeof currentValue === "function") {
|
322514
|
+
object5[key2] = currentValue(object5[key2]);
|
322978
322515
|
return true;
|
322979
322516
|
}
|
322980
322517
|
});
|
322981
|
-
var defuArrayFn = createDefu((object5,
|
322982
|
-
if (Array.isArray(object5[
|
322983
|
-
object5[
|
322518
|
+
var defuArrayFn = createDefu((object5, key2, currentValue) => {
|
322519
|
+
if (Array.isArray(object5[key2]) && typeof currentValue === "function") {
|
322520
|
+
object5[key2] = currentValue(object5[key2]);
|
322984
322521
|
return true;
|
322985
322522
|
}
|
322986
322523
|
});
|
@@ -326190,11 +325727,11 @@ function cacheDirectory() {
|
|
326190
325727
|
}
|
326191
325728
|
function normalizeHeaders(headers = {}) {
|
326192
325729
|
const normalized = {};
|
326193
|
-
for (const [
|
325730
|
+
for (const [key2, value4] of Object.entries(headers)) {
|
326194
325731
|
if (!value4) {
|
326195
325732
|
continue;
|
326196
325733
|
}
|
326197
|
-
normalized[
|
325734
|
+
normalized[key2.toLowerCase()] = value4;
|
326198
325735
|
}
|
326199
325736
|
return normalized;
|
326200
325737
|
}
|
@@ -326951,9 +326488,6 @@ function addClusterServiceArgs(cmd2) {
|
|
326951
326488
|
// src/commands/platform/utils/wait-for-completion.ts
|
326952
326489
|
class TimeoutError2 extends Error {
|
326953
326490
|
}
|
326954
|
-
|
326955
|
-
class DeploymentFailedError extends Error {
|
326956
|
-
}
|
326957
326491
|
async function waitForCompletion({
|
326958
326492
|
settlemint,
|
326959
326493
|
type: type4,
|
@@ -326971,7 +326505,6 @@ async function waitForCompletion({
|
|
326971
326505
|
if (!service || !("read" in service)) {
|
326972
326506
|
throw new Error(`Service ${serviceType} does not support status checking`);
|
326973
326507
|
}
|
326974
|
-
let hasRestarted = false;
|
326975
326508
|
function showSpinner() {
|
326976
326509
|
return spinner({
|
326977
326510
|
startMessage: `Waiting for ${type4} to be ${getActionLabel(action)}`,
|
@@ -326984,7 +326517,8 @@ async function waitForCompletion({
|
|
326984
326517
|
if (resource.status === "FAILED") {
|
326985
326518
|
updateStatus(spinner2, `${capitalizeFirstLetter2(type4)} failed to ${getActionLabel(action)}`);
|
326986
326519
|
if (restartOnError) {
|
326987
|
-
|
326520
|
+
note(`Restarting ${capitalizeFirstLetter2(type4)}`);
|
326521
|
+
await service.restart(uniqueName);
|
326988
326522
|
}
|
326989
326523
|
return false;
|
326990
326524
|
}
|
@@ -327007,24 +326541,15 @@ async function waitForCompletion({
|
|
327007
326541
|
try {
|
327008
326542
|
return await showSpinner();
|
327009
326543
|
} catch (error45) {
|
327010
|
-
|
326544
|
+
const isTimeoutError = error45 instanceof SpinnerError && error45.originalError instanceof TimeoutError2;
|
326545
|
+
if (restartIfTimeout && isTimeoutError) {
|
327011
326546
|
note(`Restarting ${capitalizeFirstLetter2(type4)}`);
|
327012
|
-
hasRestarted = true;
|
327013
326547
|
await service.restart(uniqueName);
|
327014
326548
|
return showSpinner();
|
327015
326549
|
}
|
327016
326550
|
throw error45;
|
327017
326551
|
}
|
327018
326552
|
}
|
327019
|
-
function shouldRestart(error45, restartIfTimeout) {
|
327020
|
-
const isSpinnerError = error45 instanceof SpinnerError;
|
327021
|
-
const isDeploymentFailedError = error45 instanceof DeploymentFailedError || isSpinnerError && error45.originalError instanceof DeploymentFailedError;
|
327022
|
-
if (isDeploymentFailedError) {
|
327023
|
-
return true;
|
327024
|
-
}
|
327025
|
-
const isTimeoutError = error45 instanceof TimeoutError2 || isSpinnerError && error45.originalError instanceof TimeoutError2;
|
327026
|
-
return restartIfTimeout && isTimeoutError;
|
327027
|
-
}
|
327028
326553
|
function updateStatus(spinner2, message) {
|
327029
326554
|
if (spinner2) {
|
327030
326555
|
spinner2.text = message;
|
@@ -328662,22 +328187,21 @@ function deleteCommand() {
|
|
328662
328187
|
function getPauseCommand({
|
328663
328188
|
name: name3,
|
328664
328189
|
type: type4,
|
328190
|
+
subType,
|
328665
328191
|
alias,
|
328666
328192
|
envKey,
|
328667
328193
|
pauseFunction,
|
328668
328194
|
usePersonalAccessToken = true
|
328669
328195
|
}) {
|
328670
328196
|
const commandName = sanitizeCommandName(name3);
|
328671
|
-
const typeCommandName = sanitizeCommandName(type4);
|
328672
|
-
const exampleCommandPrefix = `platform pause ${typeCommandName !== commandName ? `${typeCommandName} ` : ""}${commandName}`;
|
328673
328197
|
return new Command(commandName).alias(alias).description(`Pause a ${type4} in the SettleMint platform. Provide the ${type4} unique name or use 'default' to pause the default ${type4} from your .env file.`).usage(createExamples([
|
328674
328198
|
{
|
328675
328199
|
description: `Pauses the specified ${type4} by unique name`,
|
328676
|
-
command:
|
328200
|
+
command: `platform pause ${commandName} <${type4}-id>`
|
328677
328201
|
},
|
328678
328202
|
{
|
328679
328203
|
description: `Pauses the default ${type4} in the production environment`,
|
328680
|
-
command:
|
328204
|
+
command: `platform pause ${commandName} default --prod`
|
328681
328205
|
}
|
328682
328206
|
])).argument("<unique-name>", `The unique name of the ${type4}, use 'default' to pause the default one from your .env file`).option("-a, --accept-defaults", "Accept the default and previously set values").option("--prod", "Connect to your production environment").option("-w, --wait", "Wait until paused").action(async (uniqueName, { acceptDefaults, prod, wait: wait2 }) => {
|
328683
328207
|
intro(`Pausing ${type4} in the SettleMint platform`);
|
@@ -328763,6 +328287,7 @@ function blockscoutPauseCommand() {
|
|
328763
328287
|
return getPauseCommand({
|
328764
328288
|
name: "blockscout",
|
328765
328289
|
type: "insights",
|
328290
|
+
subType: "blockscout",
|
328766
328291
|
alias: "bs",
|
328767
328292
|
envKey: "SETTLEMINT_BLOCKSCOUT",
|
328768
328293
|
pauseFunction: async (settlemint, id) => {
|
@@ -328776,6 +328301,7 @@ function hasuraPauseCommand() {
|
|
328776
328301
|
return getPauseCommand({
|
328777
328302
|
name: "hasura",
|
328778
328303
|
type: "integration tool",
|
328304
|
+
subType: "hasura",
|
328779
328305
|
alias: "ha",
|
328780
328306
|
envKey: "SETTLEMINT_HASURA",
|
328781
328307
|
pauseFunction: async (settlemint, id) => {
|
@@ -328789,6 +328315,7 @@ function evmLoadBalancerPauseCommand() {
|
|
328789
328315
|
return getPauseCommand({
|
328790
328316
|
name: "evm",
|
328791
328317
|
type: "load balancer",
|
328318
|
+
subType: "evm",
|
328792
328319
|
alias: "lb",
|
328793
328320
|
envKey: "SETTLEMINT_BLOCKCHAIN_NODE_OR_LOAD_BALANCER",
|
328794
328321
|
pauseFunction: async (settlemint, id) => {
|
@@ -328802,6 +328329,7 @@ function graphMiddlewarePauseCommand() {
|
|
328802
328329
|
return getPauseCommand({
|
328803
328330
|
name: "graph",
|
328804
328331
|
type: "middleware",
|
328332
|
+
subType: "graph",
|
328805
328333
|
alias: "gr",
|
328806
328334
|
envKey: "SETTLEMINT_THEGRAPH",
|
328807
328335
|
pauseFunction: async (settlemint, id) => {
|
@@ -328815,6 +328343,7 @@ function smartContractPortalMiddlewarePauseCommand() {
|
|
328815
328343
|
return getPauseCommand({
|
328816
328344
|
name: "smart-contract-portal",
|
328817
328345
|
type: "middleware",
|
328346
|
+
subType: "smart-contract-portal",
|
328818
328347
|
alias: "scp",
|
328819
328348
|
envKey: "SETTLEMINT_PORTAL",
|
328820
328349
|
pauseFunction: async (settlemint, id) => {
|
@@ -328828,6 +328357,7 @@ function accessibleEcdsaP256PrivateKeyPauseCommand() {
|
|
328828
328357
|
return getPauseCommand({
|
328829
328358
|
name: "accessible-ecdsa-p256",
|
328830
328359
|
type: "private key",
|
328360
|
+
subType: "accessible-ecdsa-p256",
|
328831
328361
|
alias: "acc",
|
328832
328362
|
envKey: "SETTLEMINT_ACCESSIBLE_PRIVATE_KEY",
|
328833
328363
|
pauseFunction: async (settlemint, id) => {
|
@@ -328841,6 +328371,7 @@ function hdEcdsaP256PrivateKeyPauseCommand() {
|
|
328841
328371
|
return getPauseCommand({
|
328842
328372
|
name: "hd-ecdsa-p256",
|
328843
328373
|
type: "private key",
|
328374
|
+
subType: "hd-ecdsa-p256",
|
328844
328375
|
alias: "hd",
|
328845
328376
|
envKey: "SETTLEMINT_HD_PRIVATE_KEY",
|
328846
328377
|
pauseFunction: async (settlemint, id) => {
|
@@ -328854,6 +328385,7 @@ function ipfsStoragePauseCommand() {
|
|
328854
328385
|
return getPauseCommand({
|
328855
328386
|
name: "ipfs",
|
328856
328387
|
type: "storage",
|
328388
|
+
subType: "ipfs",
|
328857
328389
|
alias: "ip",
|
328858
328390
|
envKey: "SETTLEMINT_IPFS",
|
328859
328391
|
pauseFunction: async (settlemint, id) => {
|
@@ -328867,6 +328399,7 @@ function minioStoragePauseCommand() {
|
|
328867
328399
|
return getPauseCommand({
|
328868
328400
|
name: "minio",
|
328869
328401
|
type: "storage",
|
328402
|
+
subType: "minio",
|
328870
328403
|
alias: "m",
|
328871
328404
|
envKey: "SETTLEMINT_MINIO",
|
328872
328405
|
pauseFunction: async (settlemint, id) => {
|
@@ -328885,22 +328418,21 @@ function pauseCommand() {
|
|
328885
328418
|
function getRestartCommand({
|
328886
328419
|
name: name3,
|
328887
328420
|
type: type4,
|
328421
|
+
subType,
|
328888
328422
|
alias,
|
328889
328423
|
envKey,
|
328890
328424
|
restartFunction,
|
328891
328425
|
usePersonalAccessToken = true
|
328892
328426
|
}) {
|
328893
328427
|
const commandName = sanitizeCommandName(name3);
|
328894
|
-
const typeCommandName = sanitizeCommandName(type4);
|
328895
|
-
const exampleCommandPrefix = `platform restart ${typeCommandName !== commandName ? `${typeCommandName} ` : ""}${commandName}`;
|
328896
328428
|
return new Command(commandName).alias(alias).description(`Restart a ${type4} in the SettleMint platform. Provide the ${type4} unique name or use 'default' to restart the default ${type4} from your .env file.`).usage(createExamples([
|
328897
328429
|
{
|
328898
328430
|
description: `Restarts the specified ${type4} by unique name`,
|
328899
|
-
command:
|
328431
|
+
command: `platform restart ${commandName}${subType ? ` ${subType}` : ""} <${type4}-id>`
|
328900
328432
|
},
|
328901
328433
|
{
|
328902
328434
|
description: `Restarts the default ${type4} in the production environment`,
|
328903
|
-
command:
|
328435
|
+
command: `platform restart ${commandName}${subType ? ` ${subType}` : ""} default --prod`
|
328904
328436
|
}
|
328905
328437
|
])).argument("<unique-name>", `The unique name of the ${type4}, use 'default' to restart the default one from your .env file`).option("-a, --accept-defaults", "Accept the default and previously set values").option("--prod", "Connect to your production environment").option("-w, --wait", "Wait until restarted").action(async (uniqueName, { acceptDefaults, prod, wait: wait2 }) => {
|
328906
328438
|
intro(`Restarting ${type4} in the SettleMint platform`);
|
@@ -328987,6 +328519,7 @@ function blockscoutRestartCommand() {
|
|
328987
328519
|
return getRestartCommand({
|
328988
328520
|
name: "blockscout",
|
328989
328521
|
type: "insights",
|
328522
|
+
subType: "blockscout",
|
328990
328523
|
alias: "bs",
|
328991
328524
|
envKey: "SETTLEMINT_BLOCKSCOUT",
|
328992
328525
|
restartFunction: async (settlemint, uniqueName) => {
|
@@ -329005,6 +328538,7 @@ function hasuraRestartCommand() {
|
|
329005
328538
|
return getRestartCommand({
|
329006
328539
|
name: "hasura",
|
329007
328540
|
type: "integration tool",
|
328541
|
+
subType: "hasura",
|
329008
328542
|
alias: "ha",
|
329009
328543
|
envKey: "SETTLEMINT_HASURA",
|
329010
328544
|
restartFunction: async (settlemint, uniqueName) => {
|
@@ -329036,6 +328570,7 @@ function graphRestartCommand() {
|
|
329036
328570
|
return getRestartCommand({
|
329037
328571
|
name: "graph",
|
329038
328572
|
type: "middleware",
|
328573
|
+
subType: "graph",
|
329039
328574
|
alias: "gr",
|
329040
328575
|
envKey: "SETTLEMINT_THEGRAPH",
|
329041
328576
|
restartFunction: async (settlemint, id) => {
|
@@ -329049,6 +328584,7 @@ function smartContractPortalRestartCommand() {
|
|
329049
328584
|
return getRestartCommand({
|
329050
328585
|
name: "smart-contract-portal",
|
329051
328586
|
type: "middleware",
|
328587
|
+
subType: "smart-contract-portal",
|
329052
328588
|
alias: "scp",
|
329053
328589
|
envKey: "SETTLEMINT_PORTAL",
|
329054
328590
|
restartFunction: async (settlemint, uniqueName) => {
|
@@ -329103,22 +328639,21 @@ function restartCommand() {
|
|
329103
328639
|
function getResumeCommand({
|
329104
328640
|
name: name3,
|
329105
328641
|
type: type4,
|
328642
|
+
subType,
|
329106
328643
|
alias,
|
329107
328644
|
envKey,
|
329108
328645
|
resumeFunction,
|
329109
328646
|
usePersonalAccessToken = true
|
329110
328647
|
}) {
|
329111
328648
|
const commandName = sanitizeCommandName(name3);
|
329112
|
-
const typeCommandName = sanitizeCommandName(type4);
|
329113
|
-
const exampleCommandPrefix = `platform resume ${typeCommandName !== commandName ? `${typeCommandName} ` : ""}${commandName}`;
|
329114
328649
|
return new Command(commandName).alias(alias).description(`Resume a ${type4} in the SettleMint platform. Provide the ${type4} unique name or use 'default' to resume the default ${type4} from your .env file.`).usage(createExamples([
|
329115
328650
|
{
|
329116
328651
|
description: `Resumes the specified ${type4} by unique name`,
|
329117
|
-
command:
|
328652
|
+
command: `platform resume ${commandName} <${type4}-id>`
|
329118
328653
|
},
|
329119
328654
|
{
|
329120
328655
|
description: `Resumes the default ${type4} in the production environment`,
|
329121
|
-
command:
|
328656
|
+
command: `platform resume ${commandName} default --prod`
|
329122
328657
|
}
|
329123
328658
|
])).argument("<unique-name>", `The unique name of the ${type4}, use 'default' to resume the default one from your .env file`).option("-a, --accept-defaults", "Accept the default and previously set values").option("--prod", "Connect to your production environment").option("-w, --wait", "Wait until resumed").action(async (uniqueName, { acceptDefaults, prod, wait: wait2 }) => {
|
329124
328659
|
intro(`Resuming ${type4} in the SettleMint platform`);
|
@@ -329204,6 +328739,7 @@ function blockscoutResumeCommand() {
|
|
329204
328739
|
return getResumeCommand({
|
329205
328740
|
name: "blockscout",
|
329206
328741
|
type: "insights",
|
328742
|
+
subType: "blockscout",
|
329207
328743
|
alias: "bs",
|
329208
328744
|
envKey: "SETTLEMINT_BLOCKSCOUT",
|
329209
328745
|
resumeFunction: async (settlemint, id) => {
|
@@ -329217,6 +328753,7 @@ function hasuraResumeCommand() {
|
|
329217
328753
|
return getResumeCommand({
|
329218
328754
|
name: "hasura",
|
329219
328755
|
type: "integration tool",
|
328756
|
+
subType: "hasura",
|
329220
328757
|
alias: "ha",
|
329221
328758
|
envKey: "SETTLEMINT_HASURA",
|
329222
328759
|
resumeFunction: async (settlemint, id) => {
|
@@ -329230,6 +328767,7 @@ function evmLoadBalancerResumeCommand() {
|
|
329230
328767
|
return getResumeCommand({
|
329231
328768
|
name: "evm",
|
329232
328769
|
type: "load balancer",
|
328770
|
+
subType: "evm",
|
329233
328771
|
alias: "lb",
|
329234
328772
|
envKey: "SETTLEMINT_BLOCKCHAIN_NODE_OR_LOAD_BALANCER",
|
329235
328773
|
resumeFunction: async (settlemint, id) => {
|
@@ -329243,6 +328781,7 @@ function graphMiddlewareResumeCommand() {
|
|
329243
328781
|
return getResumeCommand({
|
329244
328782
|
name: "graph",
|
329245
328783
|
type: "middleware",
|
328784
|
+
subType: "graph",
|
329246
328785
|
alias: "gr",
|
329247
328786
|
envKey: "SETTLEMINT_THEGRAPH",
|
329248
328787
|
resumeFunction: async (settlemint, id) => {
|
@@ -329256,6 +328795,7 @@ function smartContractPortalMiddlewareResumeCommand() {
|
|
329256
328795
|
return getResumeCommand({
|
329257
328796
|
name: "smart-contract-portal",
|
329258
328797
|
type: "middleware",
|
328798
|
+
subType: "smart-contract-portal",
|
329259
328799
|
alias: "scp",
|
329260
328800
|
envKey: "SETTLEMINT_PORTAL",
|
329261
328801
|
resumeFunction: async (settlemint, id) => {
|
@@ -329269,6 +328809,7 @@ function accessibleEcdsaP256PrivateKeyResumeCommand() {
|
|
329269
328809
|
return getResumeCommand({
|
329270
328810
|
name: "accessible-ecdsa-p256",
|
329271
328811
|
type: "private key",
|
328812
|
+
subType: "accessible-ecdsa-p256",
|
329272
328813
|
alias: "acc",
|
329273
328814
|
envKey: "SETTLEMINT_ACCESSIBLE_PRIVATE_KEY",
|
329274
328815
|
resumeFunction: async (settlemint, id) => {
|
@@ -329282,6 +328823,7 @@ function hdEcdsaP256PrivateKeyResumeCommand() {
|
|
329282
328823
|
return getResumeCommand({
|
329283
328824
|
name: "hd-ecdsa-p256",
|
329284
328825
|
type: "private key",
|
328826
|
+
subType: "hd-ecdsa-p256",
|
329285
328827
|
alias: "hd",
|
329286
328828
|
envKey: "SETTLEMINT_HD_PRIVATE_KEY",
|
329287
328829
|
resumeFunction: async (settlemint, id) => {
|
@@ -329295,6 +328837,7 @@ function ipfsStorageResumeCommand() {
|
|
329295
328837
|
return getResumeCommand({
|
329296
328838
|
name: "ipfs",
|
329297
328839
|
type: "storage",
|
328840
|
+
subType: "ipfs",
|
329298
328841
|
alias: "ip",
|
329299
328842
|
envKey: "SETTLEMINT_IPFS",
|
329300
328843
|
resumeFunction: async (settlemint, id) => {
|
@@ -329308,6 +328851,7 @@ function minioStorageResumeCommand() {
|
|
329308
328851
|
return getResumeCommand({
|
329309
328852
|
name: "minio",
|
329310
328853
|
type: "storage",
|
328854
|
+
subType: "minio",
|
329311
328855
|
alias: "m",
|
329312
328856
|
envKey: "SETTLEMINT_MINIO",
|
329313
328857
|
resumeFunction: async (settlemint, id) => {
|
@@ -329386,7 +328930,7 @@ function jsonOutput(data) {
|
|
329386
328930
|
var composer = require_composer();
|
329387
328931
|
var Document = require_Document();
|
329388
328932
|
var Schema = require_Schema();
|
329389
|
-
var
|
328933
|
+
var errors4 = require_errors3();
|
329390
328934
|
var Alias = require_Alias();
|
329391
328935
|
var identity2 = require_identity();
|
329392
328936
|
var Pair = require_Pair();
|
@@ -329402,9 +328946,9 @@ var visit2 = require_visit();
|
|
329402
328946
|
var $Composer = composer.Composer;
|
329403
328947
|
var $Document = Document.Document;
|
329404
328948
|
var $Schema = Schema.Schema;
|
329405
|
-
var $YAMLError =
|
329406
|
-
var $YAMLParseError =
|
329407
|
-
var $YAMLWarning =
|
328949
|
+
var $YAMLError = errors4.YAMLError;
|
328950
|
+
var $YAMLParseError = errors4.YAMLParseError;
|
328951
|
+
var $YAMLWarning = errors4.YAMLWarning;
|
329408
328952
|
var $Alias = Alias.Alias;
|
329409
328953
|
var $isAlias = identity2.isAlias;
|
329410
328954
|
var $isCollection = identity2.isCollection;
|
@@ -330011,11 +329555,11 @@ function createCommand4() {
|
|
330011
329555
|
|
330012
329556
|
// src/utils/commands/passthrough-options.ts
|
330013
329557
|
function mapPassthroughOptions(options, command) {
|
330014
|
-
const optionArgs = Object.entries(options).map(([
|
329558
|
+
const optionArgs = Object.entries(options).map(([key2, value4]) => {
|
330015
329559
|
if (value4 === true) {
|
330016
|
-
return `--${
|
329560
|
+
return `--${key2}`;
|
330017
329561
|
}
|
330018
|
-
return `--${
|
329562
|
+
return `--${key2}=${value4}`;
|
330019
329563
|
});
|
330020
329564
|
return [...optionArgs, ...command.args];
|
330021
329565
|
}
|
@@ -331243,4 +330787,4 @@ async function sdkCliCommand(argv = process.argv) {
|
|
331243
330787
|
// src/cli.ts
|
331244
330788
|
sdkCliCommand();
|
331245
330789
|
|
331246
|
-
//# debugId=
|
330790
|
+
//# debugId=C2B9A9B15C808C9764756E2164756E21
|