@settlemint/sdk-cli 2.5.1-pr2f1bef4c → 2.5.1-pr5f3d70bb
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 +2301 -622
- package/dist/cli.js.map +58 -15
- package/package.json +7 -7
package/dist/cli.js
CHANGED
@@ -161742,7 +161742,7 @@ ${lanes.join(`
|
|
161742
161742
|
function generateOptionOutput(sys2, option, rightAlignOfLeft, leftAlignOfRight) {
|
161743
161743
|
var _a;
|
161744
161744
|
const text = [];
|
161745
|
-
const
|
161745
|
+
const colors2 = createColors(sys2);
|
161746
161746
|
const name2 = getDisplayNameTextOfOption(option);
|
161747
161747
|
const valueCandidates = getValueCandidate(option);
|
161748
161748
|
const defaultValueDescription = typeof option.defaultValueDescription === "object" ? getDiagnosticText(option.defaultValueDescription) : formatDefaultValue(option.defaultValueDescription, option.type === "list" || option.type === "listOrElement" ? option.element.type : option.type);
|
@@ -161763,7 +161763,7 @@ ${lanes.join(`
|
|
161763
161763
|
}
|
161764
161764
|
text.push(sys2.newLine);
|
161765
161765
|
} else {
|
161766
|
-
text.push(
|
161766
|
+
text.push(colors2.blue(name2), sys2.newLine);
|
161767
161767
|
if (option.description) {
|
161768
161768
|
const description3 = getDiagnosticText(option.description);
|
161769
161769
|
text.push(description3);
|
@@ -161808,7 +161808,7 @@ ${lanes.join(`
|
|
161808
161808
|
if (isFirstLine) {
|
161809
161809
|
curLeft = left.padStart(rightAlignOfLeft2);
|
161810
161810
|
curLeft = curLeft.padEnd(leftAlignOfRight2);
|
161811
|
-
curLeft = colorLeft ?
|
161811
|
+
curLeft = colorLeft ? colors2.blue(curLeft) : curLeft;
|
161812
161812
|
} else {
|
161813
161813
|
curLeft = "".padStart(leftAlignOfRight2);
|
161814
161814
|
}
|
@@ -161920,9 +161920,9 @@ ${lanes.join(`
|
|
161920
161920
|
return res;
|
161921
161921
|
}
|
161922
161922
|
function printEasyHelp(sys2, simpleOptions) {
|
161923
|
-
const
|
161923
|
+
const colors2 = createColors(sys2);
|
161924
161924
|
let output = [...getHeader(sys2, `${getDiagnosticText(Diagnostics.tsc_Colon_The_TypeScript_Compiler)} - ${getDiagnosticText(Diagnostics.Version_0, version4)}`)];
|
161925
|
-
output.push(
|
161925
|
+
output.push(colors2.bold(getDiagnosticText(Diagnostics.COMMON_COMMANDS)) + sys2.newLine + sys2.newLine);
|
161926
161926
|
example("tsc", Diagnostics.Compiles_the_current_project_tsconfig_json_in_the_working_directory);
|
161927
161927
|
example("tsc app.ts util.ts", Diagnostics.Ignoring_tsconfig_json_compiles_the_specified_files_with_default_compiler_options);
|
161928
161928
|
example("tsc -b", Diagnostics.Build_a_composite_project_in_the_working_directory);
|
@@ -161943,7 +161943,7 @@ ${lanes.join(`
|
|
161943
161943
|
function example(ex, desc) {
|
161944
161944
|
const examples = typeof ex === "string" ? [ex] : ex;
|
161945
161945
|
for (const example2 of examples) {
|
161946
|
-
output.push(" " +
|
161946
|
+
output.push(" " + colors2.blue(example2) + sys2.newLine);
|
161947
161947
|
}
|
161948
161948
|
output.push(" " + getDiagnosticText(desc) + sys2.newLine + sys2.newLine);
|
161949
161949
|
}
|
@@ -161966,12 +161966,12 @@ ${lanes.join(`
|
|
161966
161966
|
}
|
161967
161967
|
function getHeader(sys2, message) {
|
161968
161968
|
var _a;
|
161969
|
-
const
|
161969
|
+
const colors2 = createColors(sys2);
|
161970
161970
|
const header = [];
|
161971
161971
|
const terminalWidth = ((_a = sys2.getWidthOfTerminal) == null ? undefined : _a.call(sys2)) ?? 0;
|
161972
161972
|
const tsIconLength = 5;
|
161973
|
-
const tsIconFirstLine =
|
161974
|
-
const tsIconSecondLine =
|
161973
|
+
const tsIconFirstLine = colors2.blueBackground("".padStart(tsIconLength));
|
161974
|
+
const tsIconSecondLine = colors2.blueBackground(colors2.brightWhite("TS ".padStart(tsIconLength)));
|
161975
161975
|
if (terminalWidth >= message.length + tsIconLength) {
|
161976
161976
|
const rightAlign = terminalWidth > 120 ? 120 : terminalWidth;
|
161977
161977
|
const leftAlign = rightAlign - tsIconLength;
|
@@ -231623,7 +231623,7 @@ function size(value4) {
|
|
231623
231623
|
var init_size = () => {};
|
231624
231624
|
|
231625
231625
|
// ../../node_modules/viem/_esm/errors/version.js
|
231626
|
-
var version5 = "2.
|
231626
|
+
var version5 = "2.33.0";
|
231627
231627
|
|
231628
231628
|
// ../../node_modules/viem/_esm/errors/base.js
|
231629
231629
|
function walk(err, fn) {
|
@@ -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(key4) {
|
232836
|
+
const value4 = super.get(key4);
|
232837
|
+
if (super.has(key4) && value4 !== undefined) {
|
232838
|
+
this.delete(key4);
|
232839
|
+
super.set(key4, value4);
|
232840
232840
|
}
|
232841
232841
|
return value4;
|
232842
232842
|
}
|
232843
|
-
set(
|
232844
|
-
super.set(
|
232843
|
+
set(key4, value4) {
|
232844
|
+
super.set(key4, 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, (key4, value_) => {
|
233887
233887
|
const value5 = typeof value_ === "bigint" ? value_.toString() : value_;
|
233888
|
-
return typeof replacer === "function" ? replacer(
|
233888
|
+
return typeof replacer === "function" ? replacer(key4, 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(([key4, value4]) => {
|
234003
234003
|
if (value4 === undefined || value4 === false)
|
234004
234004
|
return null;
|
234005
|
-
return [
|
234005
|
+
return [key4, value4];
|
234006
234006
|
}).filter(Boolean);
|
234007
|
-
const maxLength = entries.reduce((acc, [
|
234008
|
-
return entries.map(([
|
234007
|
+
const maxLength = entries.reduce((acc, [key4]) => Math.max(acc, key4.length), 0);
|
234008
|
+
return entries.map(([key4, value4]) => ` ${`${key4}:`.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, key4, message) => new HMAC(hash2, key4).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 key4 = 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(key4.length > blockLen ? hash2.create().update(key4).digest() : key4);
|
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, key4) => new HMAC(hash2, key4);
|
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(key4, fieldOrder, isLE2 = false) {
|
235583
|
+
const len = key4.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(key4) : bytesToNumberBE(key4);
|
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(key4) {
|
235892
235892
|
let num;
|
235893
|
-
if (typeof
|
235894
|
-
num =
|
235893
|
+
if (typeof key4 === "bigint") {
|
235894
|
+
num = key4;
|
235895
235895
|
} else {
|
235896
|
-
let bytes = ensureBytes("private key",
|
235896
|
+
let bytes = ensureBytes("private key", key4);
|
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 key4}`);
|
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 || ((key4, ...msgs) => hmac(ecdsaOpts.hash, key4, 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 key4 of keys) {
|
237468
|
+
if (key4 in value_)
|
237469
|
+
value4[key4] = value_[key4];
|
237470
|
+
if (formatted2[key4] && typeof formatted2[key4] === "object" && !Array.isArray(formatted2[key4]))
|
237471
|
+
extract_(formatted2[key4]);
|
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, (key4, value5) => {
|
237876
237876
|
if (typeof replacer === "function")
|
237877
|
-
return replacer(
|
237877
|
+
return replacer(key4, value5);
|
237878
237878
|
if (typeof value5 === "bigint")
|
237879
237879
|
return value5.toString() + bigIntSuffix;
|
237880
237880
|
return value5;
|
@@ -239020,7 +239020,7 @@ var init_ccip2 = __esm(() => {
|
|
239020
239020
|
|
239021
239021
|
// ../../node_modules/viem/_esm/actions/public/call.js
|
239022
239022
|
async function call(client, args) {
|
239023
|
-
const { account: account_ = client.account, authorizationList, batch = Boolean(client.batch?.multicall), blockNumber, blockTag = "latest", accessList, blobs, blockOverrides, code: code2, data: data_, factory, factoryData, gas, gasPrice, maxFeePerBlobGas, maxFeePerGas, maxPriorityFeePerGas, nonce, to, value: value4, stateOverride, ...rest } = args;
|
239023
|
+
const { account: account_ = client.account, authorizationList, batch = Boolean(client.batch?.multicall), blockNumber, blockTag = client.experimental_blockTag ?? "latest", accessList, blobs, blockOverrides, code: code2, data: data_, factory, factoryData, gas, gasPrice, maxFeePerBlobGas, maxFeePerGas, maxPriorityFeePerGas, nonce, to, value: value4, stateOverride, ...rest } = args;
|
239024
239024
|
const account = account_ ? parseAccount(account_) : undefined;
|
239025
239025
|
if (code2 && (factory || factoryData))
|
239026
239026
|
throw new BaseError2("Cannot provide both `code` & `factory`/`factoryData` as parameters.");
|
@@ -239128,7 +239128,7 @@ function shouldPerformMulticall({ request: request2 }) {
|
|
239128
239128
|
}
|
239129
239129
|
async function scheduleMulticall(client, args) {
|
239130
239130
|
const { batchSize = 1024, wait = 0 } = typeof client.batch?.multicall === "object" ? client.batch.multicall : {};
|
239131
|
-
const { blockNumber, blockTag = "latest", data, multicallAddress: multicallAddress_, to } = args;
|
239131
|
+
const { blockNumber, blockTag = client.experimental_blockTag ?? "latest", data, multicallAddress: multicallAddress_, to } = args;
|
239132
239132
|
let multicallAddress = multicallAddress_;
|
239133
239133
|
if (!multicallAddress) {
|
239134
239134
|
if (!client.chain)
|
@@ -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_(key5, node, visitor, path7) {
|
239301
|
+
const ctrl = callVisitor(key5, node, visitor, path7);
|
239302
239302
|
if (identity2.isNode(ctrl) || identity2.isPair(ctrl)) {
|
239303
|
-
replaceNode(
|
239304
|
-
return visit_(
|
239303
|
+
replaceNode(key5, path7, ctrl);
|
239304
|
+
return visit_(key5, 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_(key5, node, visitor, path7) {
|
239349
|
+
const ctrl = await callVisitor(key5, node, visitor, path7);
|
239350
239350
|
if (identity2.isNode(ctrl) || identity2.isPair(ctrl)) {
|
239351
|
-
replaceNode(
|
239352
|
-
return visitAsync_(
|
239351
|
+
replaceNode(key5, path7, ctrl);
|
239352
|
+
return visitAsync_(key5, 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(key5, node, visitor, path7) {
|
239403
239403
|
if (typeof visitor === "function")
|
239404
|
-
return visitor(
|
239404
|
+
return visitor(key5, node, path7);
|
239405
239405
|
if (identity2.isMap(node))
|
239406
|
-
return visitor.Map?.(
|
239406
|
+
return visitor.Map?.(key5, node, path7);
|
239407
239407
|
if (identity2.isSeq(node))
|
239408
|
-
return visitor.Seq?.(
|
239408
|
+
return visitor.Seq?.(key5, node, path7);
|
239409
239409
|
if (identity2.isPair(node))
|
239410
|
-
return visitor.Pair?.(
|
239410
|
+
return visitor.Pair?.(key5, node, path7);
|
239411
239411
|
if (identity2.isScalar(node))
|
239412
|
-
return visitor.Scalar?.(
|
239412
|
+
return visitor.Scalar?.(key5, node, path7);
|
239413
239413
|
if (identity2.isAlias(node))
|
239414
|
-
return visitor.Alias?.(
|
239414
|
+
return visitor.Alias?.(key5, node, path7);
|
239415
239415
|
return;
|
239416
239416
|
}
|
239417
|
-
function replaceNode(
|
239417
|
+
function replaceNode(key5, path7, node) {
|
239418
239418
|
const parent = path7[path7.length - 1];
|
239419
239419
|
if (identity2.isCollection(parent)) {
|
239420
|
-
parent.items[
|
239420
|
+
parent.items[key5] = node;
|
239421
239421
|
} else if (identity2.isPair(parent)) {
|
239422
|
-
if (
|
239422
|
+
if (key5 === "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, key5, 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, key5, 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 [key5, ...rest] = path7;
|
240023
|
+
const node = this.get(key5, 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(key5, collectionFromPath(this.schema, rest, value4));
|
240028
240028
|
else
|
240029
|
-
throw new Error(`Expected YAML collection at ${
|
240029
|
+
throw new Error(`Expected YAML collection at ${key5}. Remaining path: ${rest}`);
|
240030
240030
|
}
|
240031
240031
|
}
|
240032
240032
|
deleteIn(path7) {
|
240033
|
-
const [
|
240033
|
+
const [key5, ...rest] = path7;
|
240034
240034
|
if (rest.length === 0)
|
240035
|
-
return this.delete(
|
240036
|
-
const node = this.get(
|
240035
|
+
return this.delete(key5);
|
240036
|
+
const node = this.get(key5, 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 ${key5}. Remaining path: ${rest}`);
|
240041
240041
|
}
|
240042
240042
|
getIn(path7, keepScalar) {
|
240043
|
-
const [
|
240044
|
-
const node = this.get(
|
240043
|
+
const [key5, ...rest] = path7;
|
240044
|
+
const node = this.get(key5, 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 [key5, ...rest] = path7;
|
240060
240060
|
if (rest.length === 0)
|
240061
|
-
return this.has(
|
240062
|
-
const node = this.get(
|
240061
|
+
return this.has(key5);
|
240062
|
+
const node = this.get(key5, true);
|
240063
240063
|
return identity2.isCollection(node) ? node.hasIn(rest) : false;
|
240064
240064
|
}
|
240065
240065
|
setIn(path7, value4) {
|
240066
|
-
const [
|
240066
|
+
const [key5, ...rest] = path7;
|
240067
240067
|
if (rest.length === 0) {
|
240068
|
-
this.set(
|
240068
|
+
this.set(key5, value4);
|
240069
240069
|
} else {
|
240070
|
-
const node = this.get(
|
240070
|
+
const node = this.get(key5, 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(key5, collectionFromPath(this.schema, rest, value4));
|
240075
240075
|
else
|
240076
|
-
throw new Error(`Expected YAML collection at ${
|
240076
|
+
throw new Error(`Expected YAML collection at ${key5}. 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: key5, 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(key5) && key5.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(key5) || !identity2.isNode(key5) && typeof key5 === "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 && (!key5 || keyComment && value4 == null && !ctx.inFlow || identity2.isCollection(key5) || (identity2.isScalar(key5) ? key5.type === Scalar.Scalar.BLOCK_FOLDED || key5.type === Scalar.Scalar.BLOCK_LITERAL : typeof key5 === "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(key5, 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, key5) => (merge7.identify(key5) || identity2.isScalar(key5) && (!key5.type || key5.type === Scalar.Scalar.PLAIN) && merge7.identify(key5.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 [key5, value5] of srcMap) {
|
240845
240845
|
if (map7 instanceof Map) {
|
240846
|
-
if (!map7.has(
|
240847
|
-
map7.set(
|
240846
|
+
if (!map7.has(key5))
|
240847
|
+
map7.set(key5, 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(key5);
|
240850
|
+
} else if (!Object.prototype.hasOwnProperty.call(map7, key5)) {
|
240851
|
+
Object.defineProperty(map7, key5, {
|
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: key5, value: value4 }) {
|
240874
|
+
if (identity2.isNode(key5) && key5.addToJSMap)
|
240875
|
+
key5.addToJSMap(ctx, map7, value4);
|
240876
|
+
else if (merge7.isMergeKey(ctx, key5))
|
240877
240877
|
merge7.addMergeToJSMap(ctx, map7, value4);
|
240878
240878
|
else {
|
240879
|
-
const jsKey = toJS.toJS(
|
240879
|
+
const jsKey = toJS.toJS(key5, "", 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(key5, 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(key5, 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(key5) && 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 = key5.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(key5, value4, ctx) {
|
240934
|
+
const k6 = createNode.createNode(key5, 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(key5, value4 = null) {
|
240941
240941
|
Object.defineProperty(this, identity2.NODE_TYPE, { value: identity2.PAIR });
|
240942
|
-
this.key =
|
240942
|
+
this.key = key5;
|
240943
240943
|
this.value = value4;
|
240944
240944
|
}
|
240945
240945
|
clone(schema) {
|
240946
|
-
let { key:
|
240947
|
-
if (identity2.isNode(
|
240948
|
-
|
240946
|
+
let { key: key5, value: value4 } = this;
|
240947
|
+
if (identity2.isNode(key5))
|
240948
|
+
key5 = key5.clone(schema);
|
240949
240949
|
if (identity2.isNode(value4))
|
240950
240950
|
value4 = value4.clone(schema);
|
240951
|
-
return new Pair(
|
240951
|
+
return new Pair(key5, 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, key5) {
|
241119
|
+
const k6 = identity2.isScalar(key5) ? key5.value : key5;
|
241120
241120
|
for (const it2 of items) {
|
241121
241121
|
if (identity2.isPair(it2)) {
|
241122
|
-
if (it2.key ===
|
241122
|
+
if (it2.key === key5 || 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 = (key5, 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, key5, value4);
|
241145
|
+
else if (Array.isArray(replacer) && !replacer.includes(key5))
|
241146
241146
|
return;
|
241147
241147
|
if (value4 !== undefined || keepUndefined)
|
241148
|
-
map7.items.push(Pair.createPair(
|
241148
|
+
map7.items.push(Pair.createPair(key5, value4, ctx));
|
241149
241149
|
};
|
241150
241150
|
if (obj instanceof Map) {
|
241151
|
-
for (const [
|
241152
|
-
add(
|
241151
|
+
for (const [key5, value4] of obj)
|
241152
|
+
add(key5, value4);
|
241153
241153
|
} else if (obj && typeof obj === "object") {
|
241154
|
-
for (const
|
241155
|
-
add(
|
241154
|
+
for (const key5 of Object.keys(obj))
|
241155
|
+
add(key5, obj[key5]);
|
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(key5) {
|
241190
|
+
const it2 = findPair(this.items, key5);
|
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(key5, keepScalar) {
|
241197
|
+
const it2 = findPair(this.items, key5);
|
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(key5) {
|
241202
|
+
return !!findPair(this.items, key5);
|
241203
241203
|
}
|
241204
|
-
set(
|
241205
|
-
this.add(new Pair.Pair(
|
241204
|
+
set(key5, value4) {
|
241205
|
+
this.add(new Pair.Pair(key5, 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(key5) {
|
241277
|
+
const idx = asItemIndex(key5);
|
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(key5, keepScalar) {
|
241284
|
+
const idx = asItemIndex(key5);
|
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(key5) {
|
241291
|
+
const idx = asItemIndex(key5);
|
241292
241292
|
return typeof idx === "number" && idx < this.items.length;
|
241293
241293
|
}
|
241294
|
-
set(
|
241295
|
-
const idx = asItemIndex(
|
241294
|
+
set(key5, value4) {
|
241295
|
+
const idx = asItemIndex(key5);
|
241296
241296
|
if (typeof idx !== "number")
|
241297
|
-
throw new Error(`Expected a valid index, not ${
|
241297
|
+
throw new Error(`Expected a valid index, not ${key5}.`);
|
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 key5 = obj instanceof Set ? it2 : String(i7++);
|
241332
|
+
it2 = replacer.call(obj, key5, 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(key5) {
|
241341
|
+
let idx = identity2.isScalar(key5) ? key5.value : key5;
|
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 key5, value4;
|
241715
241715
|
if (Array.isArray(it2)) {
|
241716
241716
|
if (it2.length === 2) {
|
241717
|
-
|
241717
|
+
key5 = 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
|
+
key5 = keys[0];
|
241725
|
+
value4 = it2[key5];
|
241726
241726
|
} else {
|
241727
241727
|
throw new TypeError(`Expected tuple with one key, not ${keys.length} keys`);
|
241728
241728
|
}
|
241729
241729
|
} else {
|
241730
|
-
|
241730
|
+
key5 = it2;
|
241731
241731
|
}
|
241732
|
-
pairs2.items.push(Pair.createPair(
|
241732
|
+
pairs2.items.push(Pair.createPair(key5, 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 key5, value4;
|
241774
241774
|
if (identity2.isPair(pair)) {
|
241775
|
-
|
241776
|
-
value4 = toJS.toJS(pair.value,
|
241775
|
+
key5 = toJS.toJS(pair.key, "", ctx);
|
241776
|
+
value4 = toJS.toJS(pair.value, key5, ctx);
|
241777
241777
|
} else {
|
241778
|
-
|
241778
|
+
key5 = toJS.toJS(pair, "", ctx);
|
241779
241779
|
}
|
241780
|
-
if (map7.has(
|
241780
|
+
if (map7.has(key5))
|
241781
241781
|
throw new Error("Ordered maps must not include duplicate keys");
|
241782
|
-
map7.set(
|
241782
|
+
map7.set(key5, 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: key5 } of pairs$1.items) {
|
241804
|
+
if (identity2.isScalar(key5)) {
|
241805
|
+
if (seenKeys.includes(key5.value)) {
|
241806
|
+
onError(`Ordered maps must not include duplicate keys: ${key5.value}`);
|
241807
241807
|
} else {
|
241808
|
-
seenKeys.push(
|
241808
|
+
seenKeys.push(key5.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(key5) {
|
241983
241983
|
let pair;
|
241984
|
-
if (identity2.isPair(
|
241985
|
-
pair =
|
241986
|
-
else if (
|
241987
|
-
pair = new Pair.Pair(
|
241984
|
+
if (identity2.isPair(key5))
|
241985
|
+
pair = key5;
|
241986
|
+
else if (key5 && typeof key5 === "object" && "key" in key5 && "value" in key5 && key5.value === null)
|
241987
|
+
pair = new Pair.Pair(key5.key, null);
|
241988
241988
|
else
|
241989
|
-
pair = new Pair.Pair(
|
241989
|
+
pair = new Pair.Pair(key5, 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(key5, keepPair) {
|
241995
|
+
const pair = YAMLMap.findPair(this.items, key5);
|
241996
241996
|
return !keepPair && identity2.isPair(pair) ? identity2.isScalar(pair.key) ? pair.key.value : pair.key : pair;
|
241997
241997
|
}
|
241998
|
-
set(
|
241998
|
+
set(key5, 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, key5);
|
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(key5));
|
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((key5) => key5 !== "yaml11").map((key5) => JSON.stringify(key5)).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((key5) => JSON.stringify(key5)).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(key5, value4, options = {}) {
|
242492
|
+
const k6 = this.createNode(key5, 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(key5) {
|
242497
|
+
return assertCollection(this.contents) ? this.contents.delete(key5) : 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(key5, keepScalar) {
|
242509
|
+
return identity2.isCollection(this.contents) ? this.contents.get(key5, 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(key5) {
|
242517
|
+
return identity2.isCollection(this.contents) ? this.contents.has(key5) : 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(key5, value4) {
|
242525
242525
|
if (this.contents == null) {
|
242526
|
-
this.contents = Collection.collectionFromPath(this.schema, [
|
242526
|
+
this.contents = Collection.collectionFromPath(this.schema, [key5], value4);
|
242527
242527
|
} else if (assertCollection(this.contents)) {
|
242528
|
-
this.contents.set(
|
242528
|
+
this.contents.set(key5, 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(key5) {
|
242811
|
+
if (!key5)
|
242812
242812
|
return null;
|
242813
|
-
switch (
|
242813
|
+
switch (key5.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 (key5.source.includes(`
|
242819
242819
|
`))
|
242820
242820
|
return true;
|
242821
|
-
if (
|
242822
|
-
for (const st2 of
|
242821
|
+
if (key5.end) {
|
242822
|
+
for (const st2 of key5.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 key5.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: key5, sep: sep5, value: value4 } = collItem;
|
242894
242894
|
const keyProps = resolveProps.resolveProps(start3, {
|
242895
242895
|
indicator: "explicit-key-ind",
|
242896
|
-
next:
|
242896
|
+
next: key5 ?? 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 (key5) {
|
242905
|
+
if (key5.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 key5 && key5.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(key5)) {
|
242922
|
+
onError(key5 ?? 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 = key5 ? composeNode(ctx, key5, 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, key5, 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: !key5 || key5.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: key5, 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: key5 ?? 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(key5))
|
243124
|
+
onError(key5, "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 = key5 ? composeNode(ctx, key5, props, onError) : composeEmptyNode(ctx, keyStart, start3, null, props, onError);
|
243170
|
+
if (isBlock(key5))
|
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 errors7 = 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 errors7.YAMLWarning(pos, code2, message));
|
244033
244033
|
else
|
244034
|
-
this.errors.push(new
|
244034
|
+
this.errors.push(new errors7.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 errors7.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 errors7.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 errors7.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 errors7 = 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 errors7.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 key5 of Object.keys(token))
|
244293
|
+
if (key5 !== "type" && key5 !== "offset")
|
244294
|
+
delete token[key5];
|
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 key5 of Object.keys(token))
|
244344
|
+
if (key5 !== "type" && key5 !== "offset")
|
244345
|
+
delete token[key5];
|
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: key5, 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 (key5)
|
244402
|
+
res += stringifyToken(key5);
|
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 key5 = 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: key5, 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 errors7 = 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(errors7.prettifyError(source, lineCounter2));
|
246058
|
+
doc2.warnings.forEach(errors7.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 errors7.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(errors7.prettifyError(source, lineCounter2));
|
246079
|
+
doc2.warnings.forEach(errors7.prettifyError(source, lineCounter2));
|
246080
246080
|
}
|
246081
246081
|
return doc2;
|
246082
246082
|
}
|
@@ -246144,10 +246144,6 @@ var {
|
|
246144
246144
|
} = import__.default;
|
246145
246145
|
|
246146
246146
|
// ../../node_modules/@inquirer/core/dist/esm/lib/key.js
|
246147
|
-
var isUpKey = (key) => key.name === "up" || key.name === "k" || key.ctrl && key.name === "p";
|
246148
|
-
var isDownKey = (key) => key.name === "down" || key.name === "j" || key.ctrl && key.name === "n";
|
246149
|
-
var isBackspaceKey = (key) => key.name === "backspace";
|
246150
|
-
var isNumberKey = (key) => "1234567890".includes(key.name);
|
246151
246147
|
var isEnterKey = (key) => key.name === "enter" || key.name === "return";
|
246152
246148
|
// ../../node_modules/@inquirer/core/dist/esm/lib/errors.js
|
246153
246149
|
class AbortPromptError extends Error {
|
@@ -246316,7 +246312,7 @@ function useEffect(cb, depArray) {
|
|
246316
246312
|
// ../../node_modules/@inquirer/core/dist/esm/lib/theme.js
|
246317
246313
|
var import_yoctocolors_cjs = __toESM(require_yoctocolors_cjs(), 1);
|
246318
246314
|
|
246319
|
-
// ../../node_modules/@inquirer/figures/dist/esm/index.js
|
246315
|
+
// ../../node_modules/@inquirer/core/node_modules/@inquirer/figures/dist/esm/index.js
|
246320
246316
|
import process2 from "node:process";
|
246321
246317
|
function isUnicodeSupported() {
|
246322
246318
|
if (process2.platform !== "win32") {
|
@@ -246681,22 +246677,11 @@ function usePrefix({ status = "idle", theme }) {
|
|
246681
246677
|
const iconName = status === "loading" ? "idle" : status;
|
246682
246678
|
return typeof prefix === "string" ? prefix : prefix[iconName] ?? prefix["idle"];
|
246683
246679
|
}
|
246684
|
-
// ../../node_modules/@inquirer/core/dist/esm/lib/use-memo.js
|
246685
|
-
function useMemo(fn, dependencies) {
|
246686
|
-
return withPointer((pointer) => {
|
246687
|
-
const prev = pointer.get();
|
246688
|
-
if (!prev || prev.dependencies.length !== dependencies.length || prev.dependencies.some((dep, i) => dep !== dependencies[i])) {
|
246689
|
-
const value = fn();
|
246690
|
-
pointer.set({ value, dependencies });
|
246691
|
-
return value;
|
246692
|
-
}
|
246693
|
-
return prev.value;
|
246694
|
-
});
|
246695
|
-
}
|
246696
246680
|
// ../../node_modules/@inquirer/core/dist/esm/lib/use-ref.js
|
246697
246681
|
function useRef(val) {
|
246698
246682
|
return useState({ current: val })[0];
|
246699
246683
|
}
|
246684
|
+
|
246700
246685
|
// ../../node_modules/@inquirer/core/dist/esm/lib/use-keypress.js
|
246701
246686
|
function useKeypress(userHandler) {
|
246702
246687
|
const signal = useRef(userHandler);
|
@@ -246728,72 +246713,6 @@ function readlineWidth() {
|
|
246728
246713
|
return import_cli_width.default({ defaultWidth: 80, output: readline().output });
|
246729
246714
|
}
|
246730
246715
|
|
246731
|
-
// ../../node_modules/@inquirer/core/dist/esm/lib/pagination/use-pagination.js
|
246732
|
-
function usePointerPosition({ active, renderedItems, pageSize, loop }) {
|
246733
|
-
const state = useRef({
|
246734
|
-
lastPointer: active,
|
246735
|
-
lastActive: undefined
|
246736
|
-
});
|
246737
|
-
const { lastPointer, lastActive } = state.current;
|
246738
|
-
const middle = Math.floor(pageSize / 2);
|
246739
|
-
const renderedLength = renderedItems.reduce((acc, item) => acc + item.length, 0);
|
246740
|
-
const defaultPointerPosition = renderedItems.slice(0, active).reduce((acc, item) => acc + item.length, 0);
|
246741
|
-
let pointer = defaultPointerPosition;
|
246742
|
-
if (renderedLength > pageSize) {
|
246743
|
-
if (loop) {
|
246744
|
-
pointer = lastPointer;
|
246745
|
-
if (lastActive != null && lastActive < active && active - lastActive < pageSize) {
|
246746
|
-
pointer = Math.min(middle, Math.abs(active - lastActive) === 1 ? Math.min(lastPointer + (renderedItems[lastActive]?.length ?? 0), Math.max(defaultPointerPosition, lastPointer)) : lastPointer + active - lastActive);
|
246747
|
-
}
|
246748
|
-
} else {
|
246749
|
-
const spaceUnderActive = renderedItems.slice(active).reduce((acc, item) => acc + item.length, 0);
|
246750
|
-
pointer = spaceUnderActive < pageSize - middle ? pageSize - spaceUnderActive : Math.min(defaultPointerPosition, middle);
|
246751
|
-
}
|
246752
|
-
}
|
246753
|
-
state.current.lastPointer = pointer;
|
246754
|
-
state.current.lastActive = active;
|
246755
|
-
return pointer;
|
246756
|
-
}
|
246757
|
-
function usePagination({ items, active, renderItem, pageSize, loop = true }) {
|
246758
|
-
const width = readlineWidth();
|
246759
|
-
const bound = (num) => (num % items.length + items.length) % items.length;
|
246760
|
-
const renderedItems = items.map((item, index) => {
|
246761
|
-
if (item == null)
|
246762
|
-
return [];
|
246763
|
-
return breakLines(renderItem({ item, index, isActive: index === active }), width).split(`
|
246764
|
-
`);
|
246765
|
-
});
|
246766
|
-
const renderedLength = renderedItems.reduce((acc, item) => acc + item.length, 0);
|
246767
|
-
const renderItemAtIndex = (index) => renderedItems[index] ?? [];
|
246768
|
-
const pointer = usePointerPosition({ active, renderedItems, pageSize, loop });
|
246769
|
-
const activeItem = renderItemAtIndex(active).slice(0, pageSize);
|
246770
|
-
const activeItemPosition = pointer + activeItem.length <= pageSize ? pointer : pageSize - activeItem.length;
|
246771
|
-
const pageBuffer = Array.from({ length: pageSize });
|
246772
|
-
pageBuffer.splice(activeItemPosition, activeItem.length, ...activeItem);
|
246773
|
-
const itemVisited = new Set([active]);
|
246774
|
-
let bufferPointer = activeItemPosition + activeItem.length;
|
246775
|
-
let itemPointer = bound(active + 1);
|
246776
|
-
while (bufferPointer < pageSize && !itemVisited.has(itemPointer) && (loop && renderedLength > pageSize ? itemPointer !== active : itemPointer > active)) {
|
246777
|
-
const lines = renderItemAtIndex(itemPointer);
|
246778
|
-
const linesToAdd = lines.slice(0, pageSize - bufferPointer);
|
246779
|
-
pageBuffer.splice(bufferPointer, linesToAdd.length, ...linesToAdd);
|
246780
|
-
itemVisited.add(itemPointer);
|
246781
|
-
bufferPointer += linesToAdd.length;
|
246782
|
-
itemPointer = bound(itemPointer + 1);
|
246783
|
-
}
|
246784
|
-
bufferPointer = activeItemPosition - 1;
|
246785
|
-
itemPointer = bound(active - 1);
|
246786
|
-
while (bufferPointer >= 0 && !itemVisited.has(itemPointer) && (loop && renderedLength > pageSize ? itemPointer !== active : itemPointer < active)) {
|
246787
|
-
const lines = renderItemAtIndex(itemPointer);
|
246788
|
-
const linesToAdd = lines.slice(Math.max(0, lines.length - bufferPointer - 1));
|
246789
|
-
pageBuffer.splice(bufferPointer - linesToAdd.length + 1, linesToAdd.length, ...linesToAdd);
|
246790
|
-
itemVisited.add(itemPointer);
|
246791
|
-
bufferPointer -= linesToAdd.length;
|
246792
|
-
itemPointer = bound(itemPointer - 1);
|
246793
|
-
}
|
246794
|
-
return pageBuffer.filter((line) => typeof line === "string").join(`
|
246795
|
-
`);
|
246796
|
-
}
|
246797
246716
|
// ../../node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
|
246798
246717
|
var import_mute_stream = __toESM(require_lib(), 1);
|
246799
246718
|
import * as readline2 from "node:readline";
|
@@ -247176,20 +247095,6 @@ function createPrompt(view) {
|
|
247176
247095
|
};
|
247177
247096
|
return prompt;
|
247178
247097
|
}
|
247179
|
-
// ../../node_modules/@inquirer/core/dist/esm/lib/Separator.js
|
247180
|
-
var import_yoctocolors_cjs2 = __toESM(require_yoctocolors_cjs(), 1);
|
247181
|
-
class Separator {
|
247182
|
-
separator = import_yoctocolors_cjs2.default.dim(Array.from({ length: 15 }).join(esm_default.line));
|
247183
|
-
type = "separator";
|
247184
|
-
constructor(separator) {
|
247185
|
-
if (separator) {
|
247186
|
-
this.separator = separator;
|
247187
|
-
}
|
247188
|
-
}
|
247189
|
-
static isSeparator(choice) {
|
247190
|
-
return Boolean(choice && typeof choice === "object" && "type" in choice && choice.type === "separator");
|
247191
|
-
}
|
247192
|
-
}
|
247193
247098
|
// ../../node_modules/yoctocolors/base.js
|
247194
247099
|
var exports_base = {};
|
247195
247100
|
__export(exports_base, {
|
@@ -265083,7 +264988,7 @@ function pruneCurrentEnv(currentEnv, env2) {
|
|
265083
264988
|
var package_default = {
|
265084
264989
|
name: "@settlemint/sdk-cli",
|
265085
264990
|
description: "Command-line interface for SettleMint SDK, providing development tools and project management capabilities",
|
265086
|
-
version: "2.5.1-
|
264991
|
+
version: "2.5.1-pr5f3d70bb",
|
265087
264992
|
type: "module",
|
265088
264993
|
private: false,
|
265089
264994
|
license: "FSL-1.1-MIT",
|
@@ -265130,14 +265035,14 @@ var package_default = {
|
|
265130
265035
|
devDependencies: {
|
265131
265036
|
"@commander-js/extra-typings": "14.0.0",
|
265132
265037
|
commander: "14.0.0",
|
265133
|
-
"@inquirer/confirm": "5.1.
|
265038
|
+
"@inquirer/confirm": "5.1.14",
|
265134
265039
|
"@inquirer/input": "4.2.0",
|
265135
265040
|
"@inquirer/password": "4.0.16",
|
265136
265041
|
"@inquirer/select": "4.2.4",
|
265137
|
-
"@settlemint/sdk-hasura": "2.5.1-
|
265138
|
-
"@settlemint/sdk-js": "2.5.1-
|
265139
|
-
"@settlemint/sdk-utils": "2.5.1-
|
265140
|
-
"@settlemint/sdk-viem": "2.5.1-
|
265042
|
+
"@settlemint/sdk-hasura": "2.5.1-pr5f3d70bb",
|
265043
|
+
"@settlemint/sdk-js": "2.5.1-pr5f3d70bb",
|
265044
|
+
"@settlemint/sdk-utils": "2.5.1-pr5f3d70bb",
|
265045
|
+
"@settlemint/sdk-viem": "2.5.1-pr5f3d70bb",
|
265141
265046
|
"@types/node": "24.0.15",
|
265142
265047
|
"@types/semver": "7.7.0",
|
265143
265048
|
"@types/which": "3.0.4",
|
@@ -265146,7 +265051,7 @@ var package_default = {
|
|
265146
265051
|
"is-in-ci": "1.0.0",
|
265147
265052
|
semver: "7.7.2",
|
265148
265053
|
slugify: "1.6.6",
|
265149
|
-
viem: "2.
|
265054
|
+
viem: "2.33.0",
|
265150
265055
|
which: "5.0.0",
|
265151
265056
|
yaml: "2.8.0",
|
265152
265057
|
yoctocolors: "2.1.1"
|
@@ -303259,23 +303164,768 @@ function sanitizeName(value4, length = 35) {
|
|
303259
303164
|
}).slice(0, length).replaceAll(/(^\d*)/g, "").replaceAll(/(-$)/g, "").replaceAll(/(^-)/g, "");
|
303260
303165
|
}
|
303261
303166
|
|
303167
|
+
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/key.js
|
303168
|
+
var isBackspaceKey = (key2) => key2.name === "backspace";
|
303169
|
+
var isEnterKey2 = (key2) => key2.name === "enter" || key2.name === "return";
|
303170
|
+
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/errors.js
|
303171
|
+
class AbortPromptError2 extends Error {
|
303172
|
+
name = "AbortPromptError";
|
303173
|
+
message = "Prompt was aborted";
|
303174
|
+
constructor(options) {
|
303175
|
+
super();
|
303176
|
+
this.cause = options?.cause;
|
303177
|
+
}
|
303178
|
+
}
|
303179
|
+
|
303180
|
+
class CancelPromptError2 extends Error {
|
303181
|
+
name = "CancelPromptError";
|
303182
|
+
message = "Prompt was canceled";
|
303183
|
+
}
|
303184
|
+
|
303185
|
+
class ExitPromptError2 extends Error {
|
303186
|
+
name = "ExitPromptError";
|
303187
|
+
}
|
303188
|
+
|
303189
|
+
class HookError2 extends Error {
|
303190
|
+
name = "HookError";
|
303191
|
+
}
|
303192
|
+
|
303193
|
+
class ValidationError2 extends Error {
|
303194
|
+
name = "ValidationError";
|
303195
|
+
}
|
303196
|
+
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/use-state.js
|
303197
|
+
import { AsyncResource as AsyncResource5 } from "node:async_hooks";
|
303198
|
+
|
303199
|
+
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/hook-engine.js
|
303200
|
+
import { AsyncLocalStorage as AsyncLocalStorage2, AsyncResource as AsyncResource4 } from "node:async_hooks";
|
303201
|
+
var hookStorage2 = new AsyncLocalStorage2;
|
303202
|
+
function createStore2(rl) {
|
303203
|
+
const store = {
|
303204
|
+
rl,
|
303205
|
+
hooks: [],
|
303206
|
+
hooksCleanup: [],
|
303207
|
+
hooksEffect: [],
|
303208
|
+
index: 0,
|
303209
|
+
handleChange() {}
|
303210
|
+
};
|
303211
|
+
return store;
|
303212
|
+
}
|
303213
|
+
function withHooks2(rl, cb) {
|
303214
|
+
const store = createStore2(rl);
|
303215
|
+
return hookStorage2.run(store, () => {
|
303216
|
+
function cycle(render) {
|
303217
|
+
store.handleChange = () => {
|
303218
|
+
store.index = 0;
|
303219
|
+
render();
|
303220
|
+
};
|
303221
|
+
store.handleChange();
|
303222
|
+
}
|
303223
|
+
return cb(cycle);
|
303224
|
+
});
|
303225
|
+
}
|
303226
|
+
function getStore2() {
|
303227
|
+
const store = hookStorage2.getStore();
|
303228
|
+
if (!store) {
|
303229
|
+
throw new HookError2("[Inquirer] Hook functions can only be called from within a prompt");
|
303230
|
+
}
|
303231
|
+
return store;
|
303232
|
+
}
|
303233
|
+
function readline3() {
|
303234
|
+
return getStore2().rl;
|
303235
|
+
}
|
303236
|
+
function withUpdates2(fn) {
|
303237
|
+
const wrapped = (...args) => {
|
303238
|
+
const store = getStore2();
|
303239
|
+
let shouldUpdate = false;
|
303240
|
+
const oldHandleChange = store.handleChange;
|
303241
|
+
store.handleChange = () => {
|
303242
|
+
shouldUpdate = true;
|
303243
|
+
};
|
303244
|
+
const returnValue = fn(...args);
|
303245
|
+
if (shouldUpdate) {
|
303246
|
+
oldHandleChange();
|
303247
|
+
}
|
303248
|
+
store.handleChange = oldHandleChange;
|
303249
|
+
return returnValue;
|
303250
|
+
};
|
303251
|
+
return AsyncResource4.bind(wrapped);
|
303252
|
+
}
|
303253
|
+
function withPointer2(cb) {
|
303254
|
+
const store = getStore2();
|
303255
|
+
const { index } = store;
|
303256
|
+
const pointer = {
|
303257
|
+
get() {
|
303258
|
+
return store.hooks[index];
|
303259
|
+
},
|
303260
|
+
set(value4) {
|
303261
|
+
store.hooks[index] = value4;
|
303262
|
+
},
|
303263
|
+
initialized: index in store.hooks
|
303264
|
+
};
|
303265
|
+
const returnValue = cb(pointer);
|
303266
|
+
store.index++;
|
303267
|
+
return returnValue;
|
303268
|
+
}
|
303269
|
+
function handleChange2() {
|
303270
|
+
getStore2().handleChange();
|
303271
|
+
}
|
303272
|
+
var effectScheduler2 = {
|
303273
|
+
queue(cb) {
|
303274
|
+
const store = getStore2();
|
303275
|
+
const { index } = store;
|
303276
|
+
store.hooksEffect.push(() => {
|
303277
|
+
store.hooksCleanup[index]?.();
|
303278
|
+
const cleanFn = cb(readline3());
|
303279
|
+
if (cleanFn != null && typeof cleanFn !== "function") {
|
303280
|
+
throw new ValidationError2("useEffect return value must be a cleanup function or nothing.");
|
303281
|
+
}
|
303282
|
+
store.hooksCleanup[index] = cleanFn;
|
303283
|
+
});
|
303284
|
+
},
|
303285
|
+
run() {
|
303286
|
+
const store = getStore2();
|
303287
|
+
withUpdates2(() => {
|
303288
|
+
store.hooksEffect.forEach((effect) => {
|
303289
|
+
effect();
|
303290
|
+
});
|
303291
|
+
store.hooksEffect.length = 0;
|
303292
|
+
})();
|
303293
|
+
},
|
303294
|
+
clearAll() {
|
303295
|
+
const store = getStore2();
|
303296
|
+
store.hooksCleanup.forEach((cleanFn) => {
|
303297
|
+
cleanFn?.();
|
303298
|
+
});
|
303299
|
+
store.hooksEffect.length = 0;
|
303300
|
+
store.hooksCleanup.length = 0;
|
303301
|
+
}
|
303302
|
+
};
|
303303
|
+
|
303304
|
+
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/use-state.js
|
303305
|
+
function useState2(defaultValue) {
|
303306
|
+
return withPointer2((pointer) => {
|
303307
|
+
const setState = AsyncResource5.bind(function setState(newValue) {
|
303308
|
+
if (pointer.get() !== newValue) {
|
303309
|
+
pointer.set(newValue);
|
303310
|
+
handleChange2();
|
303311
|
+
}
|
303312
|
+
});
|
303313
|
+
if (pointer.initialized) {
|
303314
|
+
return [pointer.get(), setState];
|
303315
|
+
}
|
303316
|
+
const value4 = typeof defaultValue === "function" ? defaultValue() : defaultValue;
|
303317
|
+
pointer.set(value4);
|
303318
|
+
return [value4, setState];
|
303319
|
+
});
|
303320
|
+
}
|
303321
|
+
|
303322
|
+
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/use-effect.js
|
303323
|
+
function useEffect2(cb, depArray) {
|
303324
|
+
withPointer2((pointer) => {
|
303325
|
+
const oldDeps = pointer.get();
|
303326
|
+
const hasChanged = !Array.isArray(oldDeps) || depArray.some((dep, i6) => !Object.is(dep, oldDeps[i6]));
|
303327
|
+
if (hasChanged) {
|
303328
|
+
effectScheduler2.queue(cb);
|
303329
|
+
}
|
303330
|
+
pointer.set(depArray);
|
303331
|
+
});
|
303332
|
+
}
|
303333
|
+
|
303334
|
+
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/theme.js
|
303335
|
+
var import_yoctocolors_cjs2 = __toESM(require_yoctocolors_cjs(), 1);
|
303336
|
+
|
303337
|
+
// ../../node_modules/@inquirer/figures/dist/esm/index.js
|
303338
|
+
import process8 from "node:process";
|
303339
|
+
function isUnicodeSupported3() {
|
303340
|
+
if (process8.platform !== "win32") {
|
303341
|
+
return process8.env["TERM"] !== "linux";
|
303342
|
+
}
|
303343
|
+
return Boolean(process8.env["WT_SESSION"]) || Boolean(process8.env["TERMINUS_SUBLIME"]) || process8.env["ConEmuTask"] === "{cmd::Cmder}" || process8.env["TERM_PROGRAM"] === "Terminus-Sublime" || process8.env["TERM_PROGRAM"] === "vscode" || process8.env["TERM"] === "xterm-256color" || process8.env["TERM"] === "alacritty" || process8.env["TERMINAL_EMULATOR"] === "JetBrains-JediTerm";
|
303344
|
+
}
|
303345
|
+
var common2 = {
|
303346
|
+
circleQuestionMark: "(?)",
|
303347
|
+
questionMarkPrefix: "(?)",
|
303348
|
+
square: "█",
|
303349
|
+
squareDarkShade: "▓",
|
303350
|
+
squareMediumShade: "▒",
|
303351
|
+
squareLightShade: "░",
|
303352
|
+
squareTop: "▀",
|
303353
|
+
squareBottom: "▄",
|
303354
|
+
squareLeft: "▌",
|
303355
|
+
squareRight: "▐",
|
303356
|
+
squareCenter: "■",
|
303357
|
+
bullet: "●",
|
303358
|
+
dot: "․",
|
303359
|
+
ellipsis: "…",
|
303360
|
+
pointerSmall: "›",
|
303361
|
+
triangleUp: "▲",
|
303362
|
+
triangleUpSmall: "▴",
|
303363
|
+
triangleDown: "▼",
|
303364
|
+
triangleDownSmall: "▾",
|
303365
|
+
triangleLeftSmall: "◂",
|
303366
|
+
triangleRightSmall: "▸",
|
303367
|
+
home: "⌂",
|
303368
|
+
heart: "♥",
|
303369
|
+
musicNote: "♪",
|
303370
|
+
musicNoteBeamed: "♫",
|
303371
|
+
arrowUp: "↑",
|
303372
|
+
arrowDown: "↓",
|
303373
|
+
arrowLeft: "←",
|
303374
|
+
arrowRight: "→",
|
303375
|
+
arrowLeftRight: "↔",
|
303376
|
+
arrowUpDown: "↕",
|
303377
|
+
almostEqual: "≈",
|
303378
|
+
notEqual: "≠",
|
303379
|
+
lessOrEqual: "≤",
|
303380
|
+
greaterOrEqual: "≥",
|
303381
|
+
identical: "≡",
|
303382
|
+
infinity: "∞",
|
303383
|
+
subscriptZero: "₀",
|
303384
|
+
subscriptOne: "₁",
|
303385
|
+
subscriptTwo: "₂",
|
303386
|
+
subscriptThree: "₃",
|
303387
|
+
subscriptFour: "₄",
|
303388
|
+
subscriptFive: "₅",
|
303389
|
+
subscriptSix: "₆",
|
303390
|
+
subscriptSeven: "₇",
|
303391
|
+
subscriptEight: "₈",
|
303392
|
+
subscriptNine: "₉",
|
303393
|
+
oneHalf: "½",
|
303394
|
+
oneThird: "⅓",
|
303395
|
+
oneQuarter: "¼",
|
303396
|
+
oneFifth: "⅕",
|
303397
|
+
oneSixth: "⅙",
|
303398
|
+
oneEighth: "⅛",
|
303399
|
+
twoThirds: "⅔",
|
303400
|
+
twoFifths: "⅖",
|
303401
|
+
threeQuarters: "¾",
|
303402
|
+
threeFifths: "⅗",
|
303403
|
+
threeEighths: "⅜",
|
303404
|
+
fourFifths: "⅘",
|
303405
|
+
fiveSixths: "⅚",
|
303406
|
+
fiveEighths: "⅝",
|
303407
|
+
sevenEighths: "⅞",
|
303408
|
+
line: "─",
|
303409
|
+
lineBold: "━",
|
303410
|
+
lineDouble: "═",
|
303411
|
+
lineDashed0: "┄",
|
303412
|
+
lineDashed1: "┅",
|
303413
|
+
lineDashed2: "┈",
|
303414
|
+
lineDashed3: "┉",
|
303415
|
+
lineDashed4: "╌",
|
303416
|
+
lineDashed5: "╍",
|
303417
|
+
lineDashed6: "╴",
|
303418
|
+
lineDashed7: "╶",
|
303419
|
+
lineDashed8: "╸",
|
303420
|
+
lineDashed9: "╺",
|
303421
|
+
lineDashed10: "╼",
|
303422
|
+
lineDashed11: "╾",
|
303423
|
+
lineDashed12: "−",
|
303424
|
+
lineDashed13: "–",
|
303425
|
+
lineDashed14: "‐",
|
303426
|
+
lineDashed15: "⁃",
|
303427
|
+
lineVertical: "│",
|
303428
|
+
lineVerticalBold: "┃",
|
303429
|
+
lineVerticalDouble: "║",
|
303430
|
+
lineVerticalDashed0: "┆",
|
303431
|
+
lineVerticalDashed1: "┇",
|
303432
|
+
lineVerticalDashed2: "┊",
|
303433
|
+
lineVerticalDashed3: "┋",
|
303434
|
+
lineVerticalDashed4: "╎",
|
303435
|
+
lineVerticalDashed5: "╏",
|
303436
|
+
lineVerticalDashed6: "╵",
|
303437
|
+
lineVerticalDashed7: "╷",
|
303438
|
+
lineVerticalDashed8: "╹",
|
303439
|
+
lineVerticalDashed9: "╻",
|
303440
|
+
lineVerticalDashed10: "╽",
|
303441
|
+
lineVerticalDashed11: "╿",
|
303442
|
+
lineDownLeft: "┐",
|
303443
|
+
lineDownLeftArc: "╮",
|
303444
|
+
lineDownBoldLeftBold: "┓",
|
303445
|
+
lineDownBoldLeft: "┒",
|
303446
|
+
lineDownLeftBold: "┑",
|
303447
|
+
lineDownDoubleLeftDouble: "╗",
|
303448
|
+
lineDownDoubleLeft: "╖",
|
303449
|
+
lineDownLeftDouble: "╕",
|
303450
|
+
lineDownRight: "┌",
|
303451
|
+
lineDownRightArc: "╭",
|
303452
|
+
lineDownBoldRightBold: "┏",
|
303453
|
+
lineDownBoldRight: "┎",
|
303454
|
+
lineDownRightBold: "┍",
|
303455
|
+
lineDownDoubleRightDouble: "╔",
|
303456
|
+
lineDownDoubleRight: "╓",
|
303457
|
+
lineDownRightDouble: "╒",
|
303458
|
+
lineUpLeft: "┘",
|
303459
|
+
lineUpLeftArc: "╯",
|
303460
|
+
lineUpBoldLeftBold: "┛",
|
303461
|
+
lineUpBoldLeft: "┚",
|
303462
|
+
lineUpLeftBold: "┙",
|
303463
|
+
lineUpDoubleLeftDouble: "╝",
|
303464
|
+
lineUpDoubleLeft: "╜",
|
303465
|
+
lineUpLeftDouble: "╛",
|
303466
|
+
lineUpRight: "└",
|
303467
|
+
lineUpRightArc: "╰",
|
303468
|
+
lineUpBoldRightBold: "┗",
|
303469
|
+
lineUpBoldRight: "┖",
|
303470
|
+
lineUpRightBold: "┕",
|
303471
|
+
lineUpDoubleRightDouble: "╚",
|
303472
|
+
lineUpDoubleRight: "╙",
|
303473
|
+
lineUpRightDouble: "╘",
|
303474
|
+
lineUpDownLeft: "┤",
|
303475
|
+
lineUpBoldDownBoldLeftBold: "┫",
|
303476
|
+
lineUpBoldDownBoldLeft: "┨",
|
303477
|
+
lineUpDownLeftBold: "┥",
|
303478
|
+
lineUpBoldDownLeftBold: "┩",
|
303479
|
+
lineUpDownBoldLeftBold: "┪",
|
303480
|
+
lineUpDownBoldLeft: "┧",
|
303481
|
+
lineUpBoldDownLeft: "┦",
|
303482
|
+
lineUpDoubleDownDoubleLeftDouble: "╣",
|
303483
|
+
lineUpDoubleDownDoubleLeft: "╢",
|
303484
|
+
lineUpDownLeftDouble: "╡",
|
303485
|
+
lineUpDownRight: "├",
|
303486
|
+
lineUpBoldDownBoldRightBold: "┣",
|
303487
|
+
lineUpBoldDownBoldRight: "┠",
|
303488
|
+
lineUpDownRightBold: "┝",
|
303489
|
+
lineUpBoldDownRightBold: "┡",
|
303490
|
+
lineUpDownBoldRightBold: "┢",
|
303491
|
+
lineUpDownBoldRight: "┟",
|
303492
|
+
lineUpBoldDownRight: "┞",
|
303493
|
+
lineUpDoubleDownDoubleRightDouble: "╠",
|
303494
|
+
lineUpDoubleDownDoubleRight: "╟",
|
303495
|
+
lineUpDownRightDouble: "╞",
|
303496
|
+
lineDownLeftRight: "┬",
|
303497
|
+
lineDownBoldLeftBoldRightBold: "┳",
|
303498
|
+
lineDownLeftBoldRightBold: "┯",
|
303499
|
+
lineDownBoldLeftRight: "┰",
|
303500
|
+
lineDownBoldLeftBoldRight: "┱",
|
303501
|
+
lineDownBoldLeftRightBold: "┲",
|
303502
|
+
lineDownLeftRightBold: "┮",
|
303503
|
+
lineDownLeftBoldRight: "┭",
|
303504
|
+
lineDownDoubleLeftDoubleRightDouble: "╦",
|
303505
|
+
lineDownDoubleLeftRight: "╥",
|
303506
|
+
lineDownLeftDoubleRightDouble: "╤",
|
303507
|
+
lineUpLeftRight: "┴",
|
303508
|
+
lineUpBoldLeftBoldRightBold: "┻",
|
303509
|
+
lineUpLeftBoldRightBold: "┷",
|
303510
|
+
lineUpBoldLeftRight: "┸",
|
303511
|
+
lineUpBoldLeftBoldRight: "┹",
|
303512
|
+
lineUpBoldLeftRightBold: "┺",
|
303513
|
+
lineUpLeftRightBold: "┶",
|
303514
|
+
lineUpLeftBoldRight: "┵",
|
303515
|
+
lineUpDoubleLeftDoubleRightDouble: "╩",
|
303516
|
+
lineUpDoubleLeftRight: "╨",
|
303517
|
+
lineUpLeftDoubleRightDouble: "╧",
|
303518
|
+
lineUpDownLeftRight: "┼",
|
303519
|
+
lineUpBoldDownBoldLeftBoldRightBold: "╋",
|
303520
|
+
lineUpDownBoldLeftBoldRightBold: "╈",
|
303521
|
+
lineUpBoldDownLeftBoldRightBold: "╇",
|
303522
|
+
lineUpBoldDownBoldLeftRightBold: "╊",
|
303523
|
+
lineUpBoldDownBoldLeftBoldRight: "╉",
|
303524
|
+
lineUpBoldDownLeftRight: "╀",
|
303525
|
+
lineUpDownBoldLeftRight: "╁",
|
303526
|
+
lineUpDownLeftBoldRight: "┽",
|
303527
|
+
lineUpDownLeftRightBold: "┾",
|
303528
|
+
lineUpBoldDownBoldLeftRight: "╂",
|
303529
|
+
lineUpDownLeftBoldRightBold: "┿",
|
303530
|
+
lineUpBoldDownLeftBoldRight: "╃",
|
303531
|
+
lineUpBoldDownLeftRightBold: "╄",
|
303532
|
+
lineUpDownBoldLeftBoldRight: "╅",
|
303533
|
+
lineUpDownBoldLeftRightBold: "╆",
|
303534
|
+
lineUpDoubleDownDoubleLeftDoubleRightDouble: "╬",
|
303535
|
+
lineUpDoubleDownDoubleLeftRight: "╫",
|
303536
|
+
lineUpDownLeftDoubleRightDouble: "╪",
|
303537
|
+
lineCross: "╳",
|
303538
|
+
lineBackslash: "╲",
|
303539
|
+
lineSlash: "╱"
|
303540
|
+
};
|
303541
|
+
var specialMainSymbols2 = {
|
303542
|
+
tick: "✔",
|
303543
|
+
info: "ℹ",
|
303544
|
+
warning: "⚠",
|
303545
|
+
cross: "✘",
|
303546
|
+
squareSmall: "◻",
|
303547
|
+
squareSmallFilled: "◼",
|
303548
|
+
circle: "◯",
|
303549
|
+
circleFilled: "◉",
|
303550
|
+
circleDotted: "◌",
|
303551
|
+
circleDouble: "◎",
|
303552
|
+
circleCircle: "ⓞ",
|
303553
|
+
circleCross: "ⓧ",
|
303554
|
+
circlePipe: "Ⓘ",
|
303555
|
+
radioOn: "◉",
|
303556
|
+
radioOff: "◯",
|
303557
|
+
checkboxOn: "☒",
|
303558
|
+
checkboxOff: "☐",
|
303559
|
+
checkboxCircleOn: "ⓧ",
|
303560
|
+
checkboxCircleOff: "Ⓘ",
|
303561
|
+
pointer: "❯",
|
303562
|
+
triangleUpOutline: "△",
|
303563
|
+
triangleLeft: "◀",
|
303564
|
+
triangleRight: "▶",
|
303565
|
+
lozenge: "◆",
|
303566
|
+
lozengeOutline: "◇",
|
303567
|
+
hamburger: "☰",
|
303568
|
+
smiley: "㋡",
|
303569
|
+
mustache: "෴",
|
303570
|
+
star: "★",
|
303571
|
+
play: "▶",
|
303572
|
+
nodejs: "⬢",
|
303573
|
+
oneSeventh: "⅐",
|
303574
|
+
oneNinth: "⅑",
|
303575
|
+
oneTenth: "⅒"
|
303576
|
+
};
|
303577
|
+
var specialFallbackSymbols2 = {
|
303578
|
+
tick: "√",
|
303579
|
+
info: "i",
|
303580
|
+
warning: "‼",
|
303581
|
+
cross: "×",
|
303582
|
+
squareSmall: "□",
|
303583
|
+
squareSmallFilled: "■",
|
303584
|
+
circle: "( )",
|
303585
|
+
circleFilled: "(*)",
|
303586
|
+
circleDotted: "( )",
|
303587
|
+
circleDouble: "( )",
|
303588
|
+
circleCircle: "(○)",
|
303589
|
+
circleCross: "(×)",
|
303590
|
+
circlePipe: "(│)",
|
303591
|
+
radioOn: "(*)",
|
303592
|
+
radioOff: "( )",
|
303593
|
+
checkboxOn: "[×]",
|
303594
|
+
checkboxOff: "[ ]",
|
303595
|
+
checkboxCircleOn: "(×)",
|
303596
|
+
checkboxCircleOff: "( )",
|
303597
|
+
pointer: ">",
|
303598
|
+
triangleUpOutline: "∆",
|
303599
|
+
triangleLeft: "◄",
|
303600
|
+
triangleRight: "►",
|
303601
|
+
lozenge: "♦",
|
303602
|
+
lozengeOutline: "◊",
|
303603
|
+
hamburger: "≡",
|
303604
|
+
smiley: "☺",
|
303605
|
+
mustache: "┌─┐",
|
303606
|
+
star: "✶",
|
303607
|
+
play: "►",
|
303608
|
+
nodejs: "♦",
|
303609
|
+
oneSeventh: "1/7",
|
303610
|
+
oneNinth: "1/9",
|
303611
|
+
oneTenth: "1/10"
|
303612
|
+
};
|
303613
|
+
var mainSymbols2 = { ...common2, ...specialMainSymbols2 };
|
303614
|
+
var fallbackSymbols2 = {
|
303615
|
+
...common2,
|
303616
|
+
...specialFallbackSymbols2
|
303617
|
+
};
|
303618
|
+
var shouldUseMain2 = isUnicodeSupported3();
|
303619
|
+
var figures2 = shouldUseMain2 ? mainSymbols2 : fallbackSymbols2;
|
303620
|
+
var esm_default2 = figures2;
|
303621
|
+
var replacements2 = Object.entries(specialMainSymbols2);
|
303622
|
+
|
303623
|
+
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/theme.js
|
303624
|
+
var defaultTheme2 = {
|
303625
|
+
prefix: {
|
303626
|
+
idle: import_yoctocolors_cjs2.default.blue("?"),
|
303627
|
+
done: import_yoctocolors_cjs2.default.green(esm_default2.tick)
|
303628
|
+
},
|
303629
|
+
spinner: {
|
303630
|
+
interval: 80,
|
303631
|
+
frames: ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"].map((frame) => import_yoctocolors_cjs2.default.yellow(frame))
|
303632
|
+
},
|
303633
|
+
style: {
|
303634
|
+
answer: import_yoctocolors_cjs2.default.cyan,
|
303635
|
+
message: import_yoctocolors_cjs2.default.bold,
|
303636
|
+
error: (text2) => import_yoctocolors_cjs2.default.red(`> ${text2}`),
|
303637
|
+
defaultAnswer: (text2) => import_yoctocolors_cjs2.default.dim(`(${text2})`),
|
303638
|
+
help: import_yoctocolors_cjs2.default.dim,
|
303639
|
+
highlight: import_yoctocolors_cjs2.default.cyan,
|
303640
|
+
key: (text2) => import_yoctocolors_cjs2.default.cyan(import_yoctocolors_cjs2.default.bold(`<${text2}>`))
|
303641
|
+
}
|
303642
|
+
};
|
303643
|
+
|
303644
|
+
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/make-theme.js
|
303645
|
+
function isPlainObject6(value4) {
|
303646
|
+
if (typeof value4 !== "object" || value4 === null)
|
303647
|
+
return false;
|
303648
|
+
let proto = value4;
|
303649
|
+
while (Object.getPrototypeOf(proto) !== null) {
|
303650
|
+
proto = Object.getPrototypeOf(proto);
|
303651
|
+
}
|
303652
|
+
return Object.getPrototypeOf(value4) === proto;
|
303653
|
+
}
|
303654
|
+
function deepMerge3(...objects) {
|
303655
|
+
const output = {};
|
303656
|
+
for (const obj of objects) {
|
303657
|
+
for (const [key2, value4] of Object.entries(obj)) {
|
303658
|
+
const prevValue = output[key2];
|
303659
|
+
output[key2] = isPlainObject6(prevValue) && isPlainObject6(value4) ? deepMerge3(prevValue, value4) : value4;
|
303660
|
+
}
|
303661
|
+
}
|
303662
|
+
return output;
|
303663
|
+
}
|
303664
|
+
function makeTheme2(...themes) {
|
303665
|
+
const themesToMerge = [
|
303666
|
+
defaultTheme2,
|
303667
|
+
...themes.filter((theme) => theme != null)
|
303668
|
+
];
|
303669
|
+
return deepMerge3(...themesToMerge);
|
303670
|
+
}
|
303671
|
+
|
303672
|
+
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/use-prefix.js
|
303673
|
+
function usePrefix2({ status = "idle", theme }) {
|
303674
|
+
const [showLoader, setShowLoader] = useState2(false);
|
303675
|
+
const [tick, setTick] = useState2(0);
|
303676
|
+
const { prefix, spinner: spinner2 } = makeTheme2(theme);
|
303677
|
+
useEffect2(() => {
|
303678
|
+
if (status === "loading") {
|
303679
|
+
let tickInterval;
|
303680
|
+
let inc = -1;
|
303681
|
+
const delayTimeout = setTimeout(() => {
|
303682
|
+
setShowLoader(true);
|
303683
|
+
tickInterval = setInterval(() => {
|
303684
|
+
inc = inc + 1;
|
303685
|
+
setTick(inc % spinner2.frames.length);
|
303686
|
+
}, spinner2.interval);
|
303687
|
+
}, 300);
|
303688
|
+
return () => {
|
303689
|
+
clearTimeout(delayTimeout);
|
303690
|
+
clearInterval(tickInterval);
|
303691
|
+
};
|
303692
|
+
} else {
|
303693
|
+
setShowLoader(false);
|
303694
|
+
}
|
303695
|
+
}, [status]);
|
303696
|
+
if (showLoader) {
|
303697
|
+
return spinner2.frames[tick];
|
303698
|
+
}
|
303699
|
+
const iconName = status === "loading" ? "idle" : status;
|
303700
|
+
return typeof prefix === "string" ? prefix : prefix[iconName] ?? prefix["idle"];
|
303701
|
+
}
|
303702
|
+
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/use-ref.js
|
303703
|
+
function useRef2(val) {
|
303704
|
+
return useState2({ current: val })[0];
|
303705
|
+
}
|
303706
|
+
|
303707
|
+
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/use-keypress.js
|
303708
|
+
function useKeypress2(userHandler) {
|
303709
|
+
const signal = useRef2(userHandler);
|
303710
|
+
signal.current = userHandler;
|
303711
|
+
useEffect2((rl) => {
|
303712
|
+
let ignore = false;
|
303713
|
+
const handler = withUpdates2((_input, event) => {
|
303714
|
+
if (ignore)
|
303715
|
+
return;
|
303716
|
+
signal.current(event, rl);
|
303717
|
+
});
|
303718
|
+
rl.input.on("keypress", handler);
|
303719
|
+
return () => {
|
303720
|
+
ignore = true;
|
303721
|
+
rl.input.removeListener("keypress", handler);
|
303722
|
+
};
|
303723
|
+
}, []);
|
303724
|
+
}
|
303725
|
+
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/utils.js
|
303726
|
+
var import_cli_width2 = __toESM(require_cli_width(), 1);
|
303727
|
+
var import_wrap_ansi2 = __toESM(require_wrap_ansi(), 1);
|
303728
|
+
function breakLines2(content, width) {
|
303729
|
+
return content.split(`
|
303730
|
+
`).flatMap((line) => import_wrap_ansi2.default(line, width, { trim: false, hard: true }).split(`
|
303731
|
+
`).map((str) => str.trimEnd())).join(`
|
303732
|
+
`);
|
303733
|
+
}
|
303734
|
+
function readlineWidth2() {
|
303735
|
+
return import_cli_width2.default({ defaultWidth: 80, output: readline3().output });
|
303736
|
+
}
|
303737
|
+
|
303738
|
+
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
|
303739
|
+
var import_mute_stream2 = __toESM(require_lib(), 1);
|
303740
|
+
import * as readline4 from "node:readline";
|
303741
|
+
import { AsyncResource as AsyncResource6 } from "node:async_hooks";
|
303742
|
+
|
303743
|
+
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/screen-manager.js
|
303744
|
+
var import_ansi_escapes2 = __toESM(require_ansi_escapes(), 1);
|
303745
|
+
import { stripVTControlCharacters as stripVTControlCharacters3 } from "node:util";
|
303746
|
+
var height2 = (content) => content.split(`
|
303747
|
+
`).length;
|
303748
|
+
var lastLine2 = (content) => content.split(`
|
303749
|
+
`).pop() ?? "";
|
303750
|
+
function cursorDown2(n6) {
|
303751
|
+
return n6 > 0 ? import_ansi_escapes2.default.cursorDown(n6) : "";
|
303752
|
+
}
|
303753
|
+
|
303754
|
+
class ScreenManager2 {
|
303755
|
+
height = 0;
|
303756
|
+
extraLinesUnderPrompt = 0;
|
303757
|
+
cursorPos;
|
303758
|
+
rl;
|
303759
|
+
constructor(rl) {
|
303760
|
+
this.rl = rl;
|
303761
|
+
this.cursorPos = rl.getCursorPos();
|
303762
|
+
}
|
303763
|
+
write(content) {
|
303764
|
+
this.rl.output.unmute();
|
303765
|
+
this.rl.output.write(content);
|
303766
|
+
this.rl.output.mute();
|
303767
|
+
}
|
303768
|
+
render(content, bottomContent = "") {
|
303769
|
+
const promptLine = lastLine2(content);
|
303770
|
+
const rawPromptLine = stripVTControlCharacters3(promptLine);
|
303771
|
+
let prompt = rawPromptLine;
|
303772
|
+
if (this.rl.line.length > 0) {
|
303773
|
+
prompt = prompt.slice(0, -this.rl.line.length);
|
303774
|
+
}
|
303775
|
+
this.rl.setPrompt(prompt);
|
303776
|
+
this.cursorPos = this.rl.getCursorPos();
|
303777
|
+
const width = readlineWidth2();
|
303778
|
+
content = breakLines2(content, width);
|
303779
|
+
bottomContent = breakLines2(bottomContent, width);
|
303780
|
+
if (rawPromptLine.length % width === 0) {
|
303781
|
+
content += `
|
303782
|
+
`;
|
303783
|
+
}
|
303784
|
+
let output = content + (bottomContent ? `
|
303785
|
+
` + bottomContent : "");
|
303786
|
+
const promptLineUpDiff = Math.floor(rawPromptLine.length / width) - this.cursorPos.rows;
|
303787
|
+
const bottomContentHeight = promptLineUpDiff + (bottomContent ? height2(bottomContent) : 0);
|
303788
|
+
if (bottomContentHeight > 0)
|
303789
|
+
output += import_ansi_escapes2.default.cursorUp(bottomContentHeight);
|
303790
|
+
output += import_ansi_escapes2.default.cursorTo(this.cursorPos.cols);
|
303791
|
+
this.write(cursorDown2(this.extraLinesUnderPrompt) + import_ansi_escapes2.default.eraseLines(this.height) + output);
|
303792
|
+
this.extraLinesUnderPrompt = bottomContentHeight;
|
303793
|
+
this.height = height2(output);
|
303794
|
+
}
|
303795
|
+
checkCursorPos() {
|
303796
|
+
const cursorPos = this.rl.getCursorPos();
|
303797
|
+
if (cursorPos.cols !== this.cursorPos.cols) {
|
303798
|
+
this.write(import_ansi_escapes2.default.cursorTo(cursorPos.cols));
|
303799
|
+
this.cursorPos = cursorPos;
|
303800
|
+
}
|
303801
|
+
}
|
303802
|
+
done({ clearContent }) {
|
303803
|
+
this.rl.setPrompt("");
|
303804
|
+
let output = cursorDown2(this.extraLinesUnderPrompt);
|
303805
|
+
output += clearContent ? import_ansi_escapes2.default.eraseLines(this.height) : `
|
303806
|
+
`;
|
303807
|
+
output += import_ansi_escapes2.default.cursorShow;
|
303808
|
+
this.write(output);
|
303809
|
+
this.rl.close();
|
303810
|
+
}
|
303811
|
+
}
|
303812
|
+
|
303813
|
+
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/promise-polyfill.js
|
303814
|
+
class PromisePolyfill2 extends Promise {
|
303815
|
+
static withResolver() {
|
303816
|
+
let resolve5;
|
303817
|
+
let reject;
|
303818
|
+
const promise4 = new Promise((res, rej) => {
|
303819
|
+
resolve5 = res;
|
303820
|
+
reject = rej;
|
303821
|
+
});
|
303822
|
+
return { promise: promise4, resolve: resolve5, reject };
|
303823
|
+
}
|
303824
|
+
}
|
303825
|
+
|
303826
|
+
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
|
303827
|
+
function getCallSites2() {
|
303828
|
+
const _prepareStackTrace = Error.prepareStackTrace;
|
303829
|
+
let result = [];
|
303830
|
+
try {
|
303831
|
+
Error.prepareStackTrace = (_5, callSites) => {
|
303832
|
+
const callSitesWithoutCurrent = callSites.slice(1);
|
303833
|
+
result = callSitesWithoutCurrent;
|
303834
|
+
return callSitesWithoutCurrent;
|
303835
|
+
};
|
303836
|
+
new Error().stack;
|
303837
|
+
} catch {
|
303838
|
+
return result;
|
303839
|
+
}
|
303840
|
+
Error.prepareStackTrace = _prepareStackTrace;
|
303841
|
+
return result;
|
303842
|
+
}
|
303843
|
+
function createPrompt2(view) {
|
303844
|
+
const callSites = getCallSites2();
|
303845
|
+
const prompt = (config4, context = {}) => {
|
303846
|
+
const { input = process.stdin, signal } = context;
|
303847
|
+
const cleanups = new Set;
|
303848
|
+
const output = new import_mute_stream2.default;
|
303849
|
+
output.pipe(context.output ?? process.stdout);
|
303850
|
+
const rl = readline4.createInterface({
|
303851
|
+
terminal: true,
|
303852
|
+
input,
|
303853
|
+
output
|
303854
|
+
});
|
303855
|
+
const screen = new ScreenManager2(rl);
|
303856
|
+
const { promise: promise4, resolve: resolve5, reject } = PromisePolyfill2.withResolver();
|
303857
|
+
const cancel3 = () => reject(new CancelPromptError2);
|
303858
|
+
if (signal) {
|
303859
|
+
const abort = () => reject(new AbortPromptError2({ cause: signal.reason }));
|
303860
|
+
if (signal.aborted) {
|
303861
|
+
abort();
|
303862
|
+
return Object.assign(promise4, { cancel: cancel3 });
|
303863
|
+
}
|
303864
|
+
signal.addEventListener("abort", abort);
|
303865
|
+
cleanups.add(() => signal.removeEventListener("abort", abort));
|
303866
|
+
}
|
303867
|
+
cleanups.add(onExit((code2, signal2) => {
|
303868
|
+
reject(new ExitPromptError2(`User force closed the prompt with ${code2} ${signal2}`));
|
303869
|
+
}));
|
303870
|
+
const sigint = () => reject(new ExitPromptError2(`User force closed the prompt with SIGINT`));
|
303871
|
+
rl.on("SIGINT", sigint);
|
303872
|
+
cleanups.add(() => rl.removeListener("SIGINT", sigint));
|
303873
|
+
const checkCursorPos = () => screen.checkCursorPos();
|
303874
|
+
rl.input.on("keypress", checkCursorPos);
|
303875
|
+
cleanups.add(() => rl.input.removeListener("keypress", checkCursorPos));
|
303876
|
+
return withHooks2(rl, (cycle) => {
|
303877
|
+
const hooksCleanup = AsyncResource6.bind(() => effectScheduler2.clearAll());
|
303878
|
+
rl.on("close", hooksCleanup);
|
303879
|
+
cleanups.add(() => rl.removeListener("close", hooksCleanup));
|
303880
|
+
cycle(() => {
|
303881
|
+
try {
|
303882
|
+
const nextView = view(config4, (value4) => {
|
303883
|
+
setImmediate(() => resolve5(value4));
|
303884
|
+
});
|
303885
|
+
if (nextView === undefined) {
|
303886
|
+
const callerFilename = callSites[1]?.getFileName();
|
303887
|
+
throw new Error(`Prompt functions must return a string.
|
303888
|
+
at ${callerFilename}`);
|
303889
|
+
}
|
303890
|
+
const [content, bottomContent] = typeof nextView === "string" ? [nextView] : nextView;
|
303891
|
+
screen.render(content, bottomContent);
|
303892
|
+
effectScheduler2.run();
|
303893
|
+
} catch (error44) {
|
303894
|
+
reject(error44);
|
303895
|
+
}
|
303896
|
+
});
|
303897
|
+
return Object.assign(promise4.then((answer) => {
|
303898
|
+
effectScheduler2.clearAll();
|
303899
|
+
return answer;
|
303900
|
+
}, (error44) => {
|
303901
|
+
effectScheduler2.clearAll();
|
303902
|
+
throw error44;
|
303903
|
+
}).finally(() => {
|
303904
|
+
cleanups.forEach((cleanup) => cleanup());
|
303905
|
+
screen.done({ clearContent: Boolean(context.clearPromptOnDone) });
|
303906
|
+
output.end();
|
303907
|
+
}).then(() => promise4), { cancel: cancel3 });
|
303908
|
+
});
|
303909
|
+
};
|
303910
|
+
return prompt;
|
303911
|
+
}
|
303262
303912
|
// ../../node_modules/@inquirer/input/dist/esm/index.js
|
303263
303913
|
var inputTheme = {
|
303264
303914
|
validationFailureMode: "keep"
|
303265
303915
|
};
|
303266
|
-
var
|
303916
|
+
var esm_default3 = createPrompt2((config4, done) => {
|
303267
303917
|
const { required: required4, validate: validate3 = () => true, prefill = "tab" } = config4;
|
303268
|
-
const theme =
|
303269
|
-
const [status, setStatus] =
|
303270
|
-
const [defaultValue = "", setDefaultValue] =
|
303271
|
-
const [errorMsg, setError] =
|
303272
|
-
const [value4, setValue] =
|
303273
|
-
const prefix =
|
303274
|
-
|
303918
|
+
const theme = makeTheme2(inputTheme, config4.theme);
|
303919
|
+
const [status, setStatus] = useState2("idle");
|
303920
|
+
const [defaultValue = "", setDefaultValue] = useState2(config4.default);
|
303921
|
+
const [errorMsg, setError] = useState2();
|
303922
|
+
const [value4, setValue] = useState2("");
|
303923
|
+
const prefix = usePrefix2({ status, theme });
|
303924
|
+
useKeypress2(async (key3, rl) => {
|
303275
303925
|
if (status !== "idle") {
|
303276
303926
|
return;
|
303277
303927
|
}
|
303278
|
-
if (
|
303928
|
+
if (isEnterKey2(key3)) {
|
303279
303929
|
const answer = value4 || defaultValue;
|
303280
303930
|
setStatus("loading");
|
303281
303931
|
const isValid = required4 && !answer ? "You must provide a value" : await validate3(answer);
|
@@ -303292,9 +303942,9 @@ var esm_default2 = createPrompt((config4, done) => {
|
|
303292
303942
|
setError(isValid || "You must provide a valid value");
|
303293
303943
|
setStatus("idle");
|
303294
303944
|
}
|
303295
|
-
} else if (isBackspaceKey(
|
303945
|
+
} else if (isBackspaceKey(key3) && !value4) {
|
303296
303946
|
setDefaultValue(undefined);
|
303297
|
-
} else if (
|
303947
|
+
} else if (key3.name === "tab" && !value4) {
|
303298
303948
|
setDefaultValue(undefined);
|
303299
303949
|
rl.clearLine(0);
|
303300
303950
|
rl.write(defaultValue);
|
@@ -303304,7 +303954,7 @@ var esm_default2 = createPrompt((config4, done) => {
|
|
303304
303954
|
setError(undefined);
|
303305
303955
|
}
|
303306
303956
|
});
|
303307
|
-
|
303957
|
+
useEffect2((rl) => {
|
303308
303958
|
if (prefill === "editable" && defaultValue) {
|
303309
303959
|
rl.write(defaultValue);
|
303310
303960
|
setValue(defaultValue);
|
@@ -303341,7 +303991,7 @@ async function subgraphNamePrompt({
|
|
303341
303991
|
if (accept) {
|
303342
303992
|
return defaultSubgraphName ?? env2.SETTLEMINT_THEGRAPH_DEFAULT_SUBGRAPH;
|
303343
303993
|
}
|
303344
|
-
const subgraphName = await
|
303994
|
+
const subgraphName = await esm_default3({
|
303345
303995
|
message: "What is the name of your subgraph?",
|
303346
303996
|
default: defaultSubgraphName,
|
303347
303997
|
required: true
|
@@ -303349,14 +303999,565 @@ async function subgraphNamePrompt({
|
|
303349
303999
|
return sanitizeName(subgraphName);
|
303350
304000
|
}
|
303351
304001
|
|
303352
|
-
// ../../node_modules/@inquirer/select/dist/esm/
|
304002
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/key.js
|
304003
|
+
var isUpKey = (key3) => key3.name === "up" || key3.name === "k" || key3.ctrl && key3.name === "p";
|
304004
|
+
var isDownKey = (key3) => key3.name === "down" || key3.name === "j" || key3.ctrl && key3.name === "n";
|
304005
|
+
var isBackspaceKey2 = (key3) => key3.name === "backspace";
|
304006
|
+
var isNumberKey = (key3) => "1234567890".includes(key3.name);
|
304007
|
+
var isEnterKey3 = (key3) => key3.name === "enter" || key3.name === "return";
|
304008
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/errors.js
|
304009
|
+
class AbortPromptError3 extends Error {
|
304010
|
+
name = "AbortPromptError";
|
304011
|
+
message = "Prompt was aborted";
|
304012
|
+
constructor(options) {
|
304013
|
+
super();
|
304014
|
+
this.cause = options?.cause;
|
304015
|
+
}
|
304016
|
+
}
|
304017
|
+
|
304018
|
+
class CancelPromptError3 extends Error {
|
304019
|
+
name = "CancelPromptError";
|
304020
|
+
message = "Prompt was canceled";
|
304021
|
+
}
|
304022
|
+
|
304023
|
+
class ExitPromptError3 extends Error {
|
304024
|
+
name = "ExitPromptError";
|
304025
|
+
}
|
304026
|
+
|
304027
|
+
class HookError3 extends Error {
|
304028
|
+
name = "HookError";
|
304029
|
+
}
|
304030
|
+
|
304031
|
+
class ValidationError3 extends Error {
|
304032
|
+
name = "ValidationError";
|
304033
|
+
}
|
304034
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/use-state.js
|
304035
|
+
import { AsyncResource as AsyncResource8 } from "node:async_hooks";
|
304036
|
+
|
304037
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/hook-engine.js
|
304038
|
+
import { AsyncLocalStorage as AsyncLocalStorage3, AsyncResource as AsyncResource7 } from "node:async_hooks";
|
304039
|
+
var hookStorage3 = new AsyncLocalStorage3;
|
304040
|
+
function createStore3(rl) {
|
304041
|
+
const store = {
|
304042
|
+
rl,
|
304043
|
+
hooks: [],
|
304044
|
+
hooksCleanup: [],
|
304045
|
+
hooksEffect: [],
|
304046
|
+
index: 0,
|
304047
|
+
handleChange() {}
|
304048
|
+
};
|
304049
|
+
return store;
|
304050
|
+
}
|
304051
|
+
function withHooks3(rl, cb) {
|
304052
|
+
const store = createStore3(rl);
|
304053
|
+
return hookStorage3.run(store, () => {
|
304054
|
+
function cycle(render) {
|
304055
|
+
store.handleChange = () => {
|
304056
|
+
store.index = 0;
|
304057
|
+
render();
|
304058
|
+
};
|
304059
|
+
store.handleChange();
|
304060
|
+
}
|
304061
|
+
return cb(cycle);
|
304062
|
+
});
|
304063
|
+
}
|
304064
|
+
function getStore3() {
|
304065
|
+
const store = hookStorage3.getStore();
|
304066
|
+
if (!store) {
|
304067
|
+
throw new HookError3("[Inquirer] Hook functions can only be called from within a prompt");
|
304068
|
+
}
|
304069
|
+
return store;
|
304070
|
+
}
|
304071
|
+
function readline5() {
|
304072
|
+
return getStore3().rl;
|
304073
|
+
}
|
304074
|
+
function withUpdates3(fn) {
|
304075
|
+
const wrapped = (...args) => {
|
304076
|
+
const store = getStore3();
|
304077
|
+
let shouldUpdate = false;
|
304078
|
+
const oldHandleChange = store.handleChange;
|
304079
|
+
store.handleChange = () => {
|
304080
|
+
shouldUpdate = true;
|
304081
|
+
};
|
304082
|
+
const returnValue = fn(...args);
|
304083
|
+
if (shouldUpdate) {
|
304084
|
+
oldHandleChange();
|
304085
|
+
}
|
304086
|
+
store.handleChange = oldHandleChange;
|
304087
|
+
return returnValue;
|
304088
|
+
};
|
304089
|
+
return AsyncResource7.bind(wrapped);
|
304090
|
+
}
|
304091
|
+
function withPointer3(cb) {
|
304092
|
+
const store = getStore3();
|
304093
|
+
const { index } = store;
|
304094
|
+
const pointer = {
|
304095
|
+
get() {
|
304096
|
+
return store.hooks[index];
|
304097
|
+
},
|
304098
|
+
set(value4) {
|
304099
|
+
store.hooks[index] = value4;
|
304100
|
+
},
|
304101
|
+
initialized: index in store.hooks
|
304102
|
+
};
|
304103
|
+
const returnValue = cb(pointer);
|
304104
|
+
store.index++;
|
304105
|
+
return returnValue;
|
304106
|
+
}
|
304107
|
+
function handleChange3() {
|
304108
|
+
getStore3().handleChange();
|
304109
|
+
}
|
304110
|
+
var effectScheduler3 = {
|
304111
|
+
queue(cb) {
|
304112
|
+
const store = getStore3();
|
304113
|
+
const { index } = store;
|
304114
|
+
store.hooksEffect.push(() => {
|
304115
|
+
store.hooksCleanup[index]?.();
|
304116
|
+
const cleanFn = cb(readline5());
|
304117
|
+
if (cleanFn != null && typeof cleanFn !== "function") {
|
304118
|
+
throw new ValidationError3("useEffect return value must be a cleanup function or nothing.");
|
304119
|
+
}
|
304120
|
+
store.hooksCleanup[index] = cleanFn;
|
304121
|
+
});
|
304122
|
+
},
|
304123
|
+
run() {
|
304124
|
+
const store = getStore3();
|
304125
|
+
withUpdates3(() => {
|
304126
|
+
store.hooksEffect.forEach((effect) => {
|
304127
|
+
effect();
|
304128
|
+
});
|
304129
|
+
store.hooksEffect.length = 0;
|
304130
|
+
})();
|
304131
|
+
},
|
304132
|
+
clearAll() {
|
304133
|
+
const store = getStore3();
|
304134
|
+
store.hooksCleanup.forEach((cleanFn) => {
|
304135
|
+
cleanFn?.();
|
304136
|
+
});
|
304137
|
+
store.hooksEffect.length = 0;
|
304138
|
+
store.hooksCleanup.length = 0;
|
304139
|
+
}
|
304140
|
+
};
|
304141
|
+
|
304142
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/use-state.js
|
304143
|
+
function useState3(defaultValue) {
|
304144
|
+
return withPointer3((pointer) => {
|
304145
|
+
const setState = AsyncResource8.bind(function setState(newValue) {
|
304146
|
+
if (pointer.get() !== newValue) {
|
304147
|
+
pointer.set(newValue);
|
304148
|
+
handleChange3();
|
304149
|
+
}
|
304150
|
+
});
|
304151
|
+
if (pointer.initialized) {
|
304152
|
+
return [pointer.get(), setState];
|
304153
|
+
}
|
304154
|
+
const value4 = typeof defaultValue === "function" ? defaultValue() : defaultValue;
|
304155
|
+
pointer.set(value4);
|
304156
|
+
return [value4, setState];
|
304157
|
+
});
|
304158
|
+
}
|
304159
|
+
|
304160
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/use-effect.js
|
304161
|
+
function useEffect3(cb, depArray) {
|
304162
|
+
withPointer3((pointer) => {
|
304163
|
+
const oldDeps = pointer.get();
|
304164
|
+
const hasChanged = !Array.isArray(oldDeps) || depArray.some((dep, i6) => !Object.is(dep, oldDeps[i6]));
|
304165
|
+
if (hasChanged) {
|
304166
|
+
effectScheduler3.queue(cb);
|
304167
|
+
}
|
304168
|
+
pointer.set(depArray);
|
304169
|
+
});
|
304170
|
+
}
|
304171
|
+
|
304172
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/theme.js
|
303353
304173
|
var import_yoctocolors_cjs3 = __toESM(require_yoctocolors_cjs(), 1);
|
303354
|
-
var
|
304174
|
+
var defaultTheme3 = {
|
304175
|
+
prefix: {
|
304176
|
+
idle: import_yoctocolors_cjs3.default.blue("?"),
|
304177
|
+
done: import_yoctocolors_cjs3.default.green(esm_default2.tick)
|
304178
|
+
},
|
304179
|
+
spinner: {
|
304180
|
+
interval: 80,
|
304181
|
+
frames: ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"].map((frame) => import_yoctocolors_cjs3.default.yellow(frame))
|
304182
|
+
},
|
304183
|
+
style: {
|
304184
|
+
answer: import_yoctocolors_cjs3.default.cyan,
|
304185
|
+
message: import_yoctocolors_cjs3.default.bold,
|
304186
|
+
error: (text2) => import_yoctocolors_cjs3.default.red(`> ${text2}`),
|
304187
|
+
defaultAnswer: (text2) => import_yoctocolors_cjs3.default.dim(`(${text2})`),
|
304188
|
+
help: import_yoctocolors_cjs3.default.dim,
|
304189
|
+
highlight: import_yoctocolors_cjs3.default.cyan,
|
304190
|
+
key: (text2) => import_yoctocolors_cjs3.default.cyan(import_yoctocolors_cjs3.default.bold(`<${text2}>`))
|
304191
|
+
}
|
304192
|
+
};
|
304193
|
+
|
304194
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/make-theme.js
|
304195
|
+
function isPlainObject7(value4) {
|
304196
|
+
if (typeof value4 !== "object" || value4 === null)
|
304197
|
+
return false;
|
304198
|
+
let proto = value4;
|
304199
|
+
while (Object.getPrototypeOf(proto) !== null) {
|
304200
|
+
proto = Object.getPrototypeOf(proto);
|
304201
|
+
}
|
304202
|
+
return Object.getPrototypeOf(value4) === proto;
|
304203
|
+
}
|
304204
|
+
function deepMerge4(...objects) {
|
304205
|
+
const output = {};
|
304206
|
+
for (const obj of objects) {
|
304207
|
+
for (const [key3, value4] of Object.entries(obj)) {
|
304208
|
+
const prevValue = output[key3];
|
304209
|
+
output[key3] = isPlainObject7(prevValue) && isPlainObject7(value4) ? deepMerge4(prevValue, value4) : value4;
|
304210
|
+
}
|
304211
|
+
}
|
304212
|
+
return output;
|
304213
|
+
}
|
304214
|
+
function makeTheme3(...themes) {
|
304215
|
+
const themesToMerge = [
|
304216
|
+
defaultTheme3,
|
304217
|
+
...themes.filter((theme) => theme != null)
|
304218
|
+
];
|
304219
|
+
return deepMerge4(...themesToMerge);
|
304220
|
+
}
|
304221
|
+
|
304222
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/use-prefix.js
|
304223
|
+
function usePrefix3({ status = "idle", theme }) {
|
304224
|
+
const [showLoader, setShowLoader] = useState3(false);
|
304225
|
+
const [tick, setTick] = useState3(0);
|
304226
|
+
const { prefix, spinner: spinner2 } = makeTheme3(theme);
|
304227
|
+
useEffect3(() => {
|
304228
|
+
if (status === "loading") {
|
304229
|
+
let tickInterval;
|
304230
|
+
let inc = -1;
|
304231
|
+
const delayTimeout = setTimeout(() => {
|
304232
|
+
setShowLoader(true);
|
304233
|
+
tickInterval = setInterval(() => {
|
304234
|
+
inc = inc + 1;
|
304235
|
+
setTick(inc % spinner2.frames.length);
|
304236
|
+
}, spinner2.interval);
|
304237
|
+
}, 300);
|
304238
|
+
return () => {
|
304239
|
+
clearTimeout(delayTimeout);
|
304240
|
+
clearInterval(tickInterval);
|
304241
|
+
};
|
304242
|
+
} else {
|
304243
|
+
setShowLoader(false);
|
304244
|
+
}
|
304245
|
+
}, [status]);
|
304246
|
+
if (showLoader) {
|
304247
|
+
return spinner2.frames[tick];
|
304248
|
+
}
|
304249
|
+
const iconName = status === "loading" ? "idle" : status;
|
304250
|
+
return typeof prefix === "string" ? prefix : prefix[iconName] ?? prefix["idle"];
|
304251
|
+
}
|
304252
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/use-memo.js
|
304253
|
+
function useMemo(fn, dependencies) {
|
304254
|
+
return withPointer3((pointer) => {
|
304255
|
+
const prev = pointer.get();
|
304256
|
+
if (!prev || prev.dependencies.length !== dependencies.length || prev.dependencies.some((dep, i6) => dep !== dependencies[i6])) {
|
304257
|
+
const value4 = fn();
|
304258
|
+
pointer.set({ value: value4, dependencies });
|
304259
|
+
return value4;
|
304260
|
+
}
|
304261
|
+
return prev.value;
|
304262
|
+
});
|
304263
|
+
}
|
304264
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/use-ref.js
|
304265
|
+
function useRef3(val) {
|
304266
|
+
return useState3({ current: val })[0];
|
304267
|
+
}
|
304268
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/use-keypress.js
|
304269
|
+
function useKeypress3(userHandler) {
|
304270
|
+
const signal = useRef3(userHandler);
|
304271
|
+
signal.current = userHandler;
|
304272
|
+
useEffect3((rl) => {
|
304273
|
+
let ignore = false;
|
304274
|
+
const handler = withUpdates3((_input, event) => {
|
304275
|
+
if (ignore)
|
304276
|
+
return;
|
304277
|
+
signal.current(event, rl);
|
304278
|
+
});
|
304279
|
+
rl.input.on("keypress", handler);
|
304280
|
+
return () => {
|
304281
|
+
ignore = true;
|
304282
|
+
rl.input.removeListener("keypress", handler);
|
304283
|
+
};
|
304284
|
+
}, []);
|
304285
|
+
}
|
304286
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/utils.js
|
304287
|
+
var import_cli_width3 = __toESM(require_cli_width(), 1);
|
304288
|
+
var import_wrap_ansi3 = __toESM(require_wrap_ansi(), 1);
|
304289
|
+
function breakLines3(content, width) {
|
304290
|
+
return content.split(`
|
304291
|
+
`).flatMap((line) => import_wrap_ansi3.default(line, width, { trim: false, hard: true }).split(`
|
304292
|
+
`).map((str) => str.trimEnd())).join(`
|
304293
|
+
`);
|
304294
|
+
}
|
304295
|
+
function readlineWidth3() {
|
304296
|
+
return import_cli_width3.default({ defaultWidth: 80, output: readline5().output });
|
304297
|
+
}
|
304298
|
+
|
304299
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/pagination/use-pagination.js
|
304300
|
+
function usePointerPosition({ active, renderedItems, pageSize, loop }) {
|
304301
|
+
const state = useRef3({
|
304302
|
+
lastPointer: active,
|
304303
|
+
lastActive: undefined
|
304304
|
+
});
|
304305
|
+
const { lastPointer, lastActive } = state.current;
|
304306
|
+
const middle = Math.floor(pageSize / 2);
|
304307
|
+
const renderedLength = renderedItems.reduce((acc, item) => acc + item.length, 0);
|
304308
|
+
const defaultPointerPosition = renderedItems.slice(0, active).reduce((acc, item) => acc + item.length, 0);
|
304309
|
+
let pointer = defaultPointerPosition;
|
304310
|
+
if (renderedLength > pageSize) {
|
304311
|
+
if (loop) {
|
304312
|
+
pointer = lastPointer;
|
304313
|
+
if (lastActive != null && lastActive < active && active - lastActive < pageSize) {
|
304314
|
+
pointer = Math.min(middle, Math.abs(active - lastActive) === 1 ? Math.min(lastPointer + (renderedItems[lastActive]?.length ?? 0), Math.max(defaultPointerPosition, lastPointer)) : lastPointer + active - lastActive);
|
304315
|
+
}
|
304316
|
+
} else {
|
304317
|
+
const spaceUnderActive = renderedItems.slice(active).reduce((acc, item) => acc + item.length, 0);
|
304318
|
+
pointer = spaceUnderActive < pageSize - middle ? pageSize - spaceUnderActive : Math.min(defaultPointerPosition, middle);
|
304319
|
+
}
|
304320
|
+
}
|
304321
|
+
state.current.lastPointer = pointer;
|
304322
|
+
state.current.lastActive = active;
|
304323
|
+
return pointer;
|
304324
|
+
}
|
304325
|
+
function usePagination({ items, active, renderItem, pageSize, loop = true }) {
|
304326
|
+
const width = readlineWidth3();
|
304327
|
+
const bound = (num) => (num % items.length + items.length) % items.length;
|
304328
|
+
const renderedItems = items.map((item, index) => {
|
304329
|
+
if (item == null)
|
304330
|
+
return [];
|
304331
|
+
return breakLines3(renderItem({ item, index, isActive: index === active }), width).split(`
|
304332
|
+
`);
|
304333
|
+
});
|
304334
|
+
const renderedLength = renderedItems.reduce((acc, item) => acc + item.length, 0);
|
304335
|
+
const renderItemAtIndex = (index) => renderedItems[index] ?? [];
|
304336
|
+
const pointer = usePointerPosition({ active, renderedItems, pageSize, loop });
|
304337
|
+
const activeItem = renderItemAtIndex(active).slice(0, pageSize);
|
304338
|
+
const activeItemPosition = pointer + activeItem.length <= pageSize ? pointer : pageSize - activeItem.length;
|
304339
|
+
const pageBuffer = Array.from({ length: pageSize });
|
304340
|
+
pageBuffer.splice(activeItemPosition, activeItem.length, ...activeItem);
|
304341
|
+
const itemVisited = new Set([active]);
|
304342
|
+
let bufferPointer = activeItemPosition + activeItem.length;
|
304343
|
+
let itemPointer = bound(active + 1);
|
304344
|
+
while (bufferPointer < pageSize && !itemVisited.has(itemPointer) && (loop && renderedLength > pageSize ? itemPointer !== active : itemPointer > active)) {
|
304345
|
+
const lines = renderItemAtIndex(itemPointer);
|
304346
|
+
const linesToAdd = lines.slice(0, pageSize - bufferPointer);
|
304347
|
+
pageBuffer.splice(bufferPointer, linesToAdd.length, ...linesToAdd);
|
304348
|
+
itemVisited.add(itemPointer);
|
304349
|
+
bufferPointer += linesToAdd.length;
|
304350
|
+
itemPointer = bound(itemPointer + 1);
|
304351
|
+
}
|
304352
|
+
bufferPointer = activeItemPosition - 1;
|
304353
|
+
itemPointer = bound(active - 1);
|
304354
|
+
while (bufferPointer >= 0 && !itemVisited.has(itemPointer) && (loop && renderedLength > pageSize ? itemPointer !== active : itemPointer < active)) {
|
304355
|
+
const lines = renderItemAtIndex(itemPointer);
|
304356
|
+
const linesToAdd = lines.slice(Math.max(0, lines.length - bufferPointer - 1));
|
304357
|
+
pageBuffer.splice(bufferPointer - linesToAdd.length + 1, linesToAdd.length, ...linesToAdd);
|
304358
|
+
itemVisited.add(itemPointer);
|
304359
|
+
bufferPointer -= linesToAdd.length;
|
304360
|
+
itemPointer = bound(itemPointer - 1);
|
304361
|
+
}
|
304362
|
+
return pageBuffer.filter((line) => typeof line === "string").join(`
|
304363
|
+
`);
|
304364
|
+
}
|
304365
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
|
304366
|
+
var import_mute_stream3 = __toESM(require_lib(), 1);
|
304367
|
+
import * as readline6 from "node:readline";
|
304368
|
+
import { AsyncResource as AsyncResource9 } from "node:async_hooks";
|
304369
|
+
|
304370
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/screen-manager.js
|
304371
|
+
var import_ansi_escapes3 = __toESM(require_ansi_escapes(), 1);
|
304372
|
+
import { stripVTControlCharacters as stripVTControlCharacters4 } from "node:util";
|
304373
|
+
var height3 = (content) => content.split(`
|
304374
|
+
`).length;
|
304375
|
+
var lastLine3 = (content) => content.split(`
|
304376
|
+
`).pop() ?? "";
|
304377
|
+
function cursorDown3(n6) {
|
304378
|
+
return n6 > 0 ? import_ansi_escapes3.default.cursorDown(n6) : "";
|
304379
|
+
}
|
304380
|
+
|
304381
|
+
class ScreenManager3 {
|
304382
|
+
height = 0;
|
304383
|
+
extraLinesUnderPrompt = 0;
|
304384
|
+
cursorPos;
|
304385
|
+
rl;
|
304386
|
+
constructor(rl) {
|
304387
|
+
this.rl = rl;
|
304388
|
+
this.cursorPos = rl.getCursorPos();
|
304389
|
+
}
|
304390
|
+
write(content) {
|
304391
|
+
this.rl.output.unmute();
|
304392
|
+
this.rl.output.write(content);
|
304393
|
+
this.rl.output.mute();
|
304394
|
+
}
|
304395
|
+
render(content, bottomContent = "") {
|
304396
|
+
const promptLine = lastLine3(content);
|
304397
|
+
const rawPromptLine = stripVTControlCharacters4(promptLine);
|
304398
|
+
let prompt = rawPromptLine;
|
304399
|
+
if (this.rl.line.length > 0) {
|
304400
|
+
prompt = prompt.slice(0, -this.rl.line.length);
|
304401
|
+
}
|
304402
|
+
this.rl.setPrompt(prompt);
|
304403
|
+
this.cursorPos = this.rl.getCursorPos();
|
304404
|
+
const width = readlineWidth3();
|
304405
|
+
content = breakLines3(content, width);
|
304406
|
+
bottomContent = breakLines3(bottomContent, width);
|
304407
|
+
if (rawPromptLine.length % width === 0) {
|
304408
|
+
content += `
|
304409
|
+
`;
|
304410
|
+
}
|
304411
|
+
let output = content + (bottomContent ? `
|
304412
|
+
` + bottomContent : "");
|
304413
|
+
const promptLineUpDiff = Math.floor(rawPromptLine.length / width) - this.cursorPos.rows;
|
304414
|
+
const bottomContentHeight = promptLineUpDiff + (bottomContent ? height3(bottomContent) : 0);
|
304415
|
+
if (bottomContentHeight > 0)
|
304416
|
+
output += import_ansi_escapes3.default.cursorUp(bottomContentHeight);
|
304417
|
+
output += import_ansi_escapes3.default.cursorTo(this.cursorPos.cols);
|
304418
|
+
this.write(cursorDown3(this.extraLinesUnderPrompt) + import_ansi_escapes3.default.eraseLines(this.height) + output);
|
304419
|
+
this.extraLinesUnderPrompt = bottomContentHeight;
|
304420
|
+
this.height = height3(output);
|
304421
|
+
}
|
304422
|
+
checkCursorPos() {
|
304423
|
+
const cursorPos = this.rl.getCursorPos();
|
304424
|
+
if (cursorPos.cols !== this.cursorPos.cols) {
|
304425
|
+
this.write(import_ansi_escapes3.default.cursorTo(cursorPos.cols));
|
304426
|
+
this.cursorPos = cursorPos;
|
304427
|
+
}
|
304428
|
+
}
|
304429
|
+
done({ clearContent }) {
|
304430
|
+
this.rl.setPrompt("");
|
304431
|
+
let output = cursorDown3(this.extraLinesUnderPrompt);
|
304432
|
+
output += clearContent ? import_ansi_escapes3.default.eraseLines(this.height) : `
|
304433
|
+
`;
|
304434
|
+
output += import_ansi_escapes3.default.cursorShow;
|
304435
|
+
this.write(output);
|
304436
|
+
this.rl.close();
|
304437
|
+
}
|
304438
|
+
}
|
304439
|
+
|
304440
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/promise-polyfill.js
|
304441
|
+
class PromisePolyfill3 extends Promise {
|
304442
|
+
static withResolver() {
|
304443
|
+
let resolve5;
|
304444
|
+
let reject;
|
304445
|
+
const promise4 = new Promise((res, rej) => {
|
304446
|
+
resolve5 = res;
|
304447
|
+
reject = rej;
|
304448
|
+
});
|
304449
|
+
return { promise: promise4, resolve: resolve5, reject };
|
304450
|
+
}
|
304451
|
+
}
|
304452
|
+
|
304453
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
|
304454
|
+
function getCallSites3() {
|
304455
|
+
const _prepareStackTrace = Error.prepareStackTrace;
|
304456
|
+
let result = [];
|
304457
|
+
try {
|
304458
|
+
Error.prepareStackTrace = (_5, callSites) => {
|
304459
|
+
const callSitesWithoutCurrent = callSites.slice(1);
|
304460
|
+
result = callSitesWithoutCurrent;
|
304461
|
+
return callSitesWithoutCurrent;
|
304462
|
+
};
|
304463
|
+
new Error().stack;
|
304464
|
+
} catch {
|
304465
|
+
return result;
|
304466
|
+
}
|
304467
|
+
Error.prepareStackTrace = _prepareStackTrace;
|
304468
|
+
return result;
|
304469
|
+
}
|
304470
|
+
function createPrompt3(view) {
|
304471
|
+
const callSites = getCallSites3();
|
304472
|
+
const prompt = (config4, context = {}) => {
|
304473
|
+
const { input = process.stdin, signal } = context;
|
304474
|
+
const cleanups = new Set;
|
304475
|
+
const output = new import_mute_stream3.default;
|
304476
|
+
output.pipe(context.output ?? process.stdout);
|
304477
|
+
const rl = readline6.createInterface({
|
304478
|
+
terminal: true,
|
304479
|
+
input,
|
304480
|
+
output
|
304481
|
+
});
|
304482
|
+
const screen = new ScreenManager3(rl);
|
304483
|
+
const { promise: promise4, resolve: resolve5, reject } = PromisePolyfill3.withResolver();
|
304484
|
+
const cancel3 = () => reject(new CancelPromptError3);
|
304485
|
+
if (signal) {
|
304486
|
+
const abort = () => reject(new AbortPromptError3({ cause: signal.reason }));
|
304487
|
+
if (signal.aborted) {
|
304488
|
+
abort();
|
304489
|
+
return Object.assign(promise4, { cancel: cancel3 });
|
304490
|
+
}
|
304491
|
+
signal.addEventListener("abort", abort);
|
304492
|
+
cleanups.add(() => signal.removeEventListener("abort", abort));
|
304493
|
+
}
|
304494
|
+
cleanups.add(onExit((code2, signal2) => {
|
304495
|
+
reject(new ExitPromptError3(`User force closed the prompt with ${code2} ${signal2}`));
|
304496
|
+
}));
|
304497
|
+
const sigint = () => reject(new ExitPromptError3(`User force closed the prompt with SIGINT`));
|
304498
|
+
rl.on("SIGINT", sigint);
|
304499
|
+
cleanups.add(() => rl.removeListener("SIGINT", sigint));
|
304500
|
+
const checkCursorPos = () => screen.checkCursorPos();
|
304501
|
+
rl.input.on("keypress", checkCursorPos);
|
304502
|
+
cleanups.add(() => rl.input.removeListener("keypress", checkCursorPos));
|
304503
|
+
return withHooks3(rl, (cycle) => {
|
304504
|
+
const hooksCleanup = AsyncResource9.bind(() => effectScheduler3.clearAll());
|
304505
|
+
rl.on("close", hooksCleanup);
|
304506
|
+
cleanups.add(() => rl.removeListener("close", hooksCleanup));
|
304507
|
+
cycle(() => {
|
304508
|
+
try {
|
304509
|
+
const nextView = view(config4, (value4) => {
|
304510
|
+
setImmediate(() => resolve5(value4));
|
304511
|
+
});
|
304512
|
+
if (nextView === undefined) {
|
304513
|
+
const callerFilename = callSites[1]?.getFileName();
|
304514
|
+
throw new Error(`Prompt functions must return a string.
|
304515
|
+
at ${callerFilename}`);
|
304516
|
+
}
|
304517
|
+
const [content, bottomContent] = typeof nextView === "string" ? [nextView] : nextView;
|
304518
|
+
screen.render(content, bottomContent);
|
304519
|
+
effectScheduler3.run();
|
304520
|
+
} catch (error44) {
|
304521
|
+
reject(error44);
|
304522
|
+
}
|
304523
|
+
});
|
304524
|
+
return Object.assign(promise4.then((answer) => {
|
304525
|
+
effectScheduler3.clearAll();
|
304526
|
+
return answer;
|
304527
|
+
}, (error44) => {
|
304528
|
+
effectScheduler3.clearAll();
|
304529
|
+
throw error44;
|
304530
|
+
}).finally(() => {
|
304531
|
+
cleanups.forEach((cleanup) => cleanup());
|
304532
|
+
screen.done({ clearContent: Boolean(context.clearPromptOnDone) });
|
304533
|
+
output.end();
|
304534
|
+
}).then(() => promise4), { cancel: cancel3 });
|
304535
|
+
});
|
304536
|
+
};
|
304537
|
+
return prompt;
|
304538
|
+
}
|
304539
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/Separator.js
|
304540
|
+
var import_yoctocolors_cjs4 = __toESM(require_yoctocolors_cjs(), 1);
|
304541
|
+
class Separator {
|
304542
|
+
separator = import_yoctocolors_cjs4.default.dim(Array.from({ length: 15 }).join(esm_default2.line));
|
304543
|
+
type = "separator";
|
304544
|
+
constructor(separator) {
|
304545
|
+
if (separator) {
|
304546
|
+
this.separator = separator;
|
304547
|
+
}
|
304548
|
+
}
|
304549
|
+
static isSeparator(choice) {
|
304550
|
+
return Boolean(choice && typeof choice === "object" && "type" in choice && choice.type === "separator");
|
304551
|
+
}
|
304552
|
+
}
|
304553
|
+
// ../../node_modules/@inquirer/select/dist/esm/index.js
|
304554
|
+
var import_yoctocolors_cjs5 = __toESM(require_yoctocolors_cjs(), 1);
|
304555
|
+
var import_ansi_escapes4 = __toESM(require_ansi_escapes(), 1);
|
303355
304556
|
var selectTheme = {
|
303356
|
-
icon: { cursor:
|
304557
|
+
icon: { cursor: esm_default2.pointer },
|
303357
304558
|
style: {
|
303358
|
-
disabled: (text2) =>
|
303359
|
-
description: (text2) =>
|
304559
|
+
disabled: (text2) => import_yoctocolors_cjs5.default.dim(`- ${text2}`),
|
304560
|
+
description: (text2) => import_yoctocolors_cjs5.default.cyan(text2)
|
303360
304561
|
},
|
303361
304562
|
helpMode: "auto",
|
303362
304563
|
indexMode: "hidden"
|
@@ -303389,19 +304590,19 @@ function normalizeChoices(choices) {
|
|
303389
304590
|
return normalizedChoice;
|
303390
304591
|
});
|
303391
304592
|
}
|
303392
|
-
var
|
304593
|
+
var esm_default4 = createPrompt3((config4, done) => {
|
303393
304594
|
const { loop = true, pageSize = 7 } = config4;
|
303394
|
-
const firstRender =
|
303395
|
-
const theme =
|
303396
|
-
const [status, setStatus] =
|
303397
|
-
const prefix =
|
303398
|
-
const searchTimeoutRef =
|
304595
|
+
const firstRender = useRef3(true);
|
304596
|
+
const theme = makeTheme3(selectTheme, config4.theme);
|
304597
|
+
const [status, setStatus] = useState3("idle");
|
304598
|
+
const prefix = usePrefix3({ status, theme });
|
304599
|
+
const searchTimeoutRef = useRef3();
|
303399
304600
|
const items = useMemo(() => normalizeChoices(config4.choices), [config4.choices]);
|
303400
304601
|
const bounds = useMemo(() => {
|
303401
304602
|
const first = items.findIndex(isSelectable);
|
303402
304603
|
const last = items.findLastIndex(isSelectable);
|
303403
304604
|
if (first === -1) {
|
303404
|
-
throw new
|
304605
|
+
throw new ValidationError3("[select prompt] No selectable choices. All choices are disabled.");
|
303405
304606
|
}
|
303406
304607
|
return { first, last };
|
303407
304608
|
}, [items]);
|
@@ -303410,24 +304611,24 @@ var esm_default3 = createPrompt((config4, done) => {
|
|
303410
304611
|
return -1;
|
303411
304612
|
return items.findIndex((item) => isSelectable(item) && item.value === config4.default);
|
303412
304613
|
}, [config4.default, items]);
|
303413
|
-
const [active, setActive] =
|
304614
|
+
const [active, setActive] = useState3(defaultItemIndex === -1 ? bounds.first : defaultItemIndex);
|
303414
304615
|
const selectedChoice = items[active];
|
303415
|
-
|
304616
|
+
useKeypress3((key4, rl) => {
|
303416
304617
|
clearTimeout(searchTimeoutRef.current);
|
303417
|
-
if (
|
304618
|
+
if (isEnterKey3(key4)) {
|
303418
304619
|
setStatus("done");
|
303419
304620
|
done(selectedChoice.value);
|
303420
|
-
} else if (isUpKey(
|
304621
|
+
} else if (isUpKey(key4) || isDownKey(key4)) {
|
303421
304622
|
rl.clearLine(0);
|
303422
|
-
if (loop || isUpKey(
|
303423
|
-
const offset = isUpKey(
|
304623
|
+
if (loop || isUpKey(key4) && active !== bounds.first || isDownKey(key4) && active !== bounds.last) {
|
304624
|
+
const offset = isUpKey(key4) ? -1 : 1;
|
303424
304625
|
let next = active;
|
303425
304626
|
do {
|
303426
304627
|
next = (next + offset + items.length) % items.length;
|
303427
304628
|
} while (!isSelectable(items[next]));
|
303428
304629
|
setActive(next);
|
303429
304630
|
}
|
303430
|
-
} else if (isNumberKey(
|
304631
|
+
} else if (isNumberKey(key4) && !Number.isNaN(Number(rl.line))) {
|
303431
304632
|
const position = Number(rl.line) - 1;
|
303432
304633
|
const item = items[position];
|
303433
304634
|
if (item != null && isSelectable(item)) {
|
@@ -303436,7 +304637,7 @@ var esm_default3 = createPrompt((config4, done) => {
|
|
303436
304637
|
searchTimeoutRef.current = setTimeout(() => {
|
303437
304638
|
rl.clearLine(0);
|
303438
304639
|
}, 700);
|
303439
|
-
} else if (
|
304640
|
+
} else if (isBackspaceKey2(key4)) {
|
303440
304641
|
rl.clearLine(0);
|
303441
304642
|
} else {
|
303442
304643
|
const searchTerm = rl.line.toLowerCase();
|
@@ -303453,7 +304654,7 @@ var esm_default3 = createPrompt((config4, done) => {
|
|
303453
304654
|
}, 700);
|
303454
304655
|
}
|
303455
304656
|
});
|
303456
|
-
|
304657
|
+
useEffect3(() => () => {
|
303457
304658
|
clearTimeout(searchTimeoutRef.current);
|
303458
304659
|
}, []);
|
303459
304660
|
const message = theme.style.message(config4.message, status);
|
@@ -303493,7 +304694,7 @@ ${theme.style.help(`(${config4.instructions?.pager ?? "Use arrow keys to reveal
|
|
303493
304694
|
const choiceDescription = selectedChoice.description ? `
|
303494
304695
|
${theme.style.description(selectedChoice.description)}` : ``;
|
303495
304696
|
return `${[prefix, message, helpTipTop].filter(Boolean).join(" ")}
|
303496
|
-
${page}${helpTipBottom}${choiceDescription}${
|
304697
|
+
${page}${helpTipBottom}${choiceDescription}${import_ansi_escapes4.default.cursorHide}`;
|
303497
304698
|
});
|
303498
304699
|
|
303499
304700
|
// src/prompts/smart-contract-set/subgraph.prompt.ts
|
@@ -303547,7 +304748,7 @@ async function subgraphPrompt({
|
|
303547
304748
|
} else {
|
303548
304749
|
defaultChoice = env2.SETTLEMINT_THEGRAPH_DEFAULT_SUBGRAPH ?? subgraphNames[0];
|
303549
304750
|
}
|
303550
|
-
const subgraphName = choices.length === 1 && choices[0] === NEW ? NEW : await
|
304751
|
+
const subgraphName = choices.length === 1 && choices[0] === NEW ? NEW : await esm_default4({
|
303551
304752
|
message,
|
303552
304753
|
choices: choices.map((name3) => ({
|
303553
304754
|
name: name3,
|
@@ -304346,8 +305547,7 @@ function formatBlock(block) {
|
|
304346
305547
|
}
|
304347
305548
|
|
304348
305549
|
// ../../node_modules/viem/_esm/actions/public/getBlock.js
|
304349
|
-
async function getBlock(client, { blockHash, blockNumber, blockTag
|
304350
|
-
const blockTag = blockTag_ ?? "latest";
|
305550
|
+
async function getBlock(client, { blockHash, blockNumber, blockTag = client.experimental_blockTag ?? "latest", includeTransactions: includeTransactions_ } = {}) {
|
304351
305551
|
const includeTransactions = includeTransactions_ ?? false;
|
304352
305552
|
const blockNumberHex = blockNumber !== undefined ? numberToHex(blockNumber) : undefined;
|
304353
305553
|
let block = null;
|
@@ -304794,7 +305994,7 @@ async function prepareTransactionRequest(client, args) {
|
|
304794
305994
|
|
304795
305995
|
// ../../node_modules/viem/_esm/actions/public/getBalance.js
|
304796
305996
|
init_toHex();
|
304797
|
-
async function getBalance(client, { address, blockNumber, blockTag = "latest" }) {
|
305997
|
+
async function getBalance(client, { address, blockNumber, blockTag = client.experimental_blockTag ?? "latest" }) {
|
304798
305998
|
const blockNumberHex = typeof blockNumber === "bigint" ? numberToHex(blockNumber) : undefined;
|
304799
305999
|
const balance = await client.request({
|
304800
306000
|
method: "eth_getBalance",
|
@@ -304812,7 +306012,11 @@ async function estimateGas(client, args) {
|
|
304812
306012
|
const { block: block2, request: request3, rpcStateOverride: rpcStateOverride2 } = parameters;
|
304813
306013
|
return client.request({
|
304814
306014
|
method: "eth_estimateGas",
|
304815
|
-
params: rpcStateOverride2 ? [
|
306015
|
+
params: rpcStateOverride2 ? [
|
306016
|
+
request3,
|
306017
|
+
block2 ?? client.experimental_blockTag ?? "latest",
|
306018
|
+
rpcStateOverride2
|
306019
|
+
] : block2 ? [request3, block2] : [request3]
|
304816
306020
|
});
|
304817
306021
|
};
|
304818
306022
|
const { accessList, authorizationList, blobs, blobVersionedHashes, blockNumber, blockTag, data, gas, gasPrice, maxFeePerBlobGas, maxFeePerGas, maxPriorityFeePerGas, nonce, value: value4, stateOverride, ...rest } = await prepareTransactionRequest(client, {
|
@@ -305074,14 +306278,14 @@ function includesArgs(parameters) {
|
|
305074
306278
|
});
|
305075
306279
|
}
|
305076
306280
|
if (typeof args === "object" && !Array.isArray(args) && typeof matchArgs === "object" && !Array.isArray(matchArgs))
|
305077
|
-
return Object.entries(matchArgs).every(([
|
306281
|
+
return Object.entries(matchArgs).every(([key4, value4]) => {
|
305078
306282
|
if (value4 === null || value4 === undefined)
|
305079
306283
|
return true;
|
305080
|
-
const input = inputs.find((input2) => input2.name ===
|
306284
|
+
const input = inputs.find((input2) => input2.name === key4);
|
305081
306285
|
if (!input)
|
305082
306286
|
return false;
|
305083
306287
|
const value_ = Array.isArray(value4) ? value4 : [value4];
|
305084
|
-
return value_.some((value5) => isEqual(input, value5, args[
|
306288
|
+
return value_.some((value5) => isEqual(input, value5, args[key4]));
|
305085
306289
|
});
|
305086
306290
|
return false;
|
305087
306291
|
}
|
@@ -305280,13 +306484,13 @@ function observe(observerId, callbacks, fn) {
|
|
305280
306484
|
if (listeners && listeners.length > 0)
|
305281
306485
|
return unwatch;
|
305282
306486
|
const emit = {};
|
305283
|
-
for (const
|
305284
|
-
emit[
|
306487
|
+
for (const key4 in callbacks) {
|
306488
|
+
emit[key4] = (...args) => {
|
305285
306489
|
const listeners2 = getListeners();
|
305286
306490
|
if (listeners2.length === 0)
|
305287
306491
|
return;
|
305288
306492
|
for (const listener of listeners2)
|
305289
|
-
listener.fns[
|
306493
|
+
listener.fns[key4]?.(...args);
|
305290
306494
|
};
|
305291
306495
|
}
|
305292
306496
|
const cleanup = fn(emit);
|
@@ -305625,7 +306829,8 @@ function uid(length = 11) {
|
|
305625
306829
|
|
305626
306830
|
// ../../node_modules/viem/_esm/clients/createClient.js
|
305627
306831
|
function createClient(parameters) {
|
305628
|
-
const { batch, chain, ccipRead, key:
|
306832
|
+
const { batch, chain, ccipRead, key: key4 = "base", name: name3 = "Base Client", type: type4 = "base" } = parameters;
|
306833
|
+
const experimental_blockTag = parameters.experimental_blockTag ?? (typeof chain?.experimental_preconfirmationTime === "number" ? "pending" : undefined);
|
305629
306834
|
const blockTime = chain?.blockTime ?? 12000;
|
305630
306835
|
const defaultPollingInterval = Math.min(Math.max(Math.floor(blockTime / 2), 500), 4000);
|
305631
306836
|
const pollingInterval = parameters.pollingInterval ?? defaultPollingInterval;
|
@@ -305642,19 +306847,20 @@ function createClient(parameters) {
|
|
305642
306847
|
cacheTime,
|
305643
306848
|
ccipRead,
|
305644
306849
|
chain,
|
305645
|
-
key:
|
306850
|
+
key: key4,
|
305646
306851
|
name: name3,
|
305647
306852
|
pollingInterval,
|
305648
306853
|
request: request2,
|
305649
306854
|
transport,
|
305650
306855
|
type: type4,
|
305651
|
-
uid: uid()
|
306856
|
+
uid: uid(),
|
306857
|
+
...experimental_blockTag ? { experimental_blockTag } : {}
|
305652
306858
|
};
|
305653
306859
|
function extend4(base2) {
|
305654
306860
|
return (extendFn) => {
|
305655
306861
|
const extended = extendFn(base2);
|
305656
|
-
for (const
|
305657
|
-
delete extended[
|
306862
|
+
for (const key5 in client)
|
306863
|
+
delete extended[key5];
|
305658
306864
|
const combined = { ...base2, ...extended };
|
305659
306865
|
return Object.assign(combined, { extend: extend4(combined) });
|
305660
306866
|
};
|
@@ -305834,11 +307040,11 @@ function shouldRetry(error44) {
|
|
305834
307040
|
}
|
305835
307041
|
|
305836
307042
|
// ../../node_modules/viem/_esm/clients/transports/createTransport.js
|
305837
|
-
function createTransport({ key:
|
307043
|
+
function createTransport({ key: key4, methods, name: name3, request: request2, retryCount = 3, retryDelay = 150, timeout, type: type4 }, value4) {
|
305838
307044
|
const uid2 = uid();
|
305839
307045
|
return {
|
305840
307046
|
config: {
|
305841
|
-
key:
|
307047
|
+
key: key4,
|
305842
307048
|
methods,
|
305843
307049
|
name: name3,
|
305844
307050
|
request: request2,
|
@@ -305995,7 +307201,7 @@ function getHttpRpcClient(url4, options = {}) {
|
|
305995
307201
|
|
305996
307202
|
// ../../node_modules/viem/_esm/clients/transports/http.js
|
305997
307203
|
function http(url4, config4 = {}) {
|
305998
|
-
const { batch, fetchOptions, key:
|
307204
|
+
const { batch, fetchOptions, key: key4 = "http", methods, name: name3 = "HTTP JSON-RPC", onFetchRequest, onFetchResponse, retryDelay, raw } = config4;
|
305999
307205
|
return ({ chain, retryCount: retryCount_, timeout: timeout_ }) => {
|
306000
307206
|
const { batchSize = 1000, wait: wait2 = 0 } = typeof batch === "object" ? batch : {};
|
306001
307207
|
const retryCount = config4.retryCount ?? retryCount_;
|
@@ -306010,7 +307216,7 @@ function http(url4, config4 = {}) {
|
|
306010
307216
|
timeout
|
306011
307217
|
});
|
306012
307218
|
return createTransport({
|
306013
|
-
key:
|
307219
|
+
key: key4,
|
306014
307220
|
methods,
|
306015
307221
|
name: name3,
|
306016
307222
|
async request({ method, params }) {
|
@@ -306461,7 +307667,7 @@ init_getChainContractAddress();
|
|
306461
307667
|
init_toHex();
|
306462
307668
|
init_localBatchGatewayRequest();
|
306463
307669
|
async function getEnsText(client, parameters) {
|
306464
|
-
const { blockNumber, blockTag, key:
|
307670
|
+
const { blockNumber, blockTag, key: key4, name: name3, gatewayUrls, strict } = parameters;
|
306465
307671
|
const { chain } = client;
|
306466
307672
|
const universalResolverAddress = (() => {
|
306467
307673
|
if (parameters.universalResolverAddress)
|
@@ -306487,7 +307693,7 @@ async function getEnsText(client, parameters) {
|
|
306487
307693
|
encodeFunctionData({
|
306488
307694
|
abi: textResolverAbi,
|
306489
307695
|
functionName: "text",
|
306490
|
-
args: [namehash(name3),
|
307696
|
+
args: [namehash(name3), key4]
|
306491
307697
|
}),
|
306492
307698
|
gatewayUrls ?? [localBatchGatewayUrl]
|
306493
307699
|
],
|
@@ -307391,7 +308597,7 @@ init_transactionRequest();
|
|
307391
308597
|
init_stateOverride2();
|
307392
308598
|
init_assertRequest();
|
307393
308599
|
async function simulateBlocks(client, parameters) {
|
307394
|
-
const { blockNumber, blockTag = "latest", blocks, returnFullTransactions, traceTransfers, validation } = parameters;
|
308600
|
+
const { blockNumber, blockTag = client.experimental_blockTag ?? "latest", blocks, returnFullTransactions, traceTransfers, validation } = parameters;
|
307395
308601
|
try {
|
307396
308602
|
const blockStateCalls = [];
|
307397
308603
|
for (const block2 of blocks) {
|
@@ -307510,16 +308716,16 @@ class LruMap2 extends Map {
|
|
307510
308716
|
});
|
307511
308717
|
this.maxSize = size5;
|
307512
308718
|
}
|
307513
|
-
get(
|
307514
|
-
const value4 = super.get(
|
307515
|
-
if (super.has(
|
307516
|
-
this.delete(
|
307517
|
-
super.set(
|
308719
|
+
get(key4) {
|
308720
|
+
const value4 = super.get(key4);
|
308721
|
+
if (super.has(key4) && value4 !== undefined) {
|
308722
|
+
this.delete(key4);
|
308723
|
+
super.set(key4, value4);
|
307518
308724
|
}
|
307519
308725
|
return value4;
|
307520
308726
|
}
|
307521
|
-
set(
|
307522
|
-
super.set(
|
308727
|
+
set(key4, value4) {
|
308728
|
+
super.set(key4, value4);
|
307523
308729
|
if (this.maxSize && this.size > this.maxSize) {
|
307524
308730
|
const firstKey = this.keys().next().value;
|
307525
308731
|
if (firstKey)
|
@@ -308760,16 +309966,24 @@ function watchBlockNumber(client, { emitOnBegin = false, emitMissed = false, onB
|
|
308760
309966
|
}
|
308761
309967
|
|
308762
309968
|
// ../../node_modules/viem/_esm/actions/public/waitForTransactionReceipt.js
|
308763
|
-
async function waitForTransactionReceipt(client, {
|
308764
|
-
|
308765
|
-
|
308766
|
-
|
308767
|
-
|
308768
|
-
|
308769
|
-
|
308770
|
-
|
308771
|
-
|
309969
|
+
async function waitForTransactionReceipt(client, parameters) {
|
309970
|
+
const {
|
309971
|
+
checkReplacement = true,
|
309972
|
+
confirmations = 1,
|
309973
|
+
hash: hash2,
|
309974
|
+
onReplaced,
|
309975
|
+
retryCount = 6,
|
309976
|
+
retryDelay = ({ count }) => ~~(1 << count) * 200,
|
309977
|
+
timeout = 180000
|
309978
|
+
} = parameters;
|
308772
309979
|
const observerId = stringify3(["waitForTransactionReceipt", client.uid, hash2]);
|
309980
|
+
const pollingInterval = (() => {
|
309981
|
+
if (parameters.pollingInterval)
|
309982
|
+
return parameters.pollingInterval;
|
309983
|
+
if (client.chain?.experimental_preconfirmationTime)
|
309984
|
+
return client.chain.experimental_preconfirmationTime;
|
309985
|
+
return client.pollingInterval;
|
309986
|
+
})();
|
308773
309987
|
let transaction;
|
308774
309988
|
let replacedTransaction;
|
308775
309989
|
let receipt;
|
@@ -308782,7 +309996,16 @@ async function waitForTransactionReceipt(client, {
|
|
308782
309996
|
_unobserve();
|
308783
309997
|
reject(new WaitForTransactionReceiptTimeoutError({ hash: hash2 }));
|
308784
309998
|
}, timeout) : undefined;
|
308785
|
-
_unobserve = observe(observerId, { onReplaced, resolve: resolve6, reject }, (emit) => {
|
309999
|
+
_unobserve = observe(observerId, { onReplaced, resolve: resolve6, reject }, async (emit) => {
|
310000
|
+
receipt = await getAction(client, getTransactionReceipt, "getTransactionReceipt")({ hash: hash2 }).catch(() => {
|
310001
|
+
return;
|
310002
|
+
});
|
310003
|
+
if (receipt && confirmations <= 1) {
|
310004
|
+
clearTimeout(timer);
|
310005
|
+
emit.resolve(receipt);
|
310006
|
+
_unobserve();
|
310007
|
+
return;
|
310008
|
+
}
|
308786
310009
|
_unwatch = getAction(client, watchBlockNumber, "watchBlockNumber")({
|
308787
310010
|
emitMissed: true,
|
308788
310011
|
emitOnBegin: true,
|
@@ -308805,7 +310028,7 @@ async function waitForTransactionReceipt(client, {
|
|
308805
310028
|
done(() => emit.resolve(receipt));
|
308806
310029
|
return;
|
308807
310030
|
}
|
308808
|
-
if (!transaction) {
|
310031
|
+
if (checkReplacement && !transaction) {
|
308809
310032
|
retrying = true;
|
308810
310033
|
await withRetry(async () => {
|
308811
310034
|
transaction = await getAction(client, getTransaction, "getTransaction")({ hash: hash2 });
|
@@ -308875,7 +310098,7 @@ async function waitForTransactionReceipt(client, {
|
|
308875
310098
|
return promise4;
|
308876
310099
|
}
|
308877
310100
|
// ../../node_modules/viem/_esm/actions/public/watchBlocks.js
|
308878
|
-
function watchBlocks(client, { blockTag = "latest", emitMissed = false, emitOnBegin = false, onBlock, onError, includeTransactions: includeTransactions_, poll: poll_, pollingInterval = client.pollingInterval }) {
|
310101
|
+
function watchBlocks(client, { blockTag = client.experimental_blockTag ?? "latest", emitMissed = false, emitOnBegin = false, onBlock, onError, includeTransactions: includeTransactions_, poll: poll_, pollingInterval = client.pollingInterval }) {
|
308879
310102
|
const enablePolling = (() => {
|
308880
310103
|
if (typeof poll_ !== "undefined")
|
308881
310104
|
return poll_;
|
@@ -309362,10 +310585,10 @@ function publicActions(client) {
|
|
309362
310585
|
|
309363
310586
|
// ../../node_modules/viem/_esm/clients/createPublicClient.js
|
309364
310587
|
function createPublicClient(parameters) {
|
309365
|
-
const { key:
|
310588
|
+
const { key: key4 = "public", name: name3 = "Public Client" } = parameters;
|
309366
310589
|
const client = createClient({
|
309367
310590
|
...parameters,
|
309368
|
-
key:
|
310591
|
+
key: key4,
|
309369
310592
|
name: name3,
|
309370
310593
|
type: "publicClient"
|
309371
310594
|
});
|
@@ -309466,7 +310689,7 @@ __export4(util_exports3, {
|
|
309466
310689
|
getParsedType: () => getParsedType4,
|
309467
310690
|
getSizableOrigin: () => getSizableOrigin4,
|
309468
310691
|
isObject: () => isObject4,
|
309469
|
-
isPlainObject: () =>
|
310692
|
+
isPlainObject: () => isPlainObject8,
|
309470
310693
|
issue: () => issue4,
|
309471
310694
|
joinValues: () => joinValues4,
|
309472
310695
|
jsonStringifyReplacer: () => jsonStringifyReplacer4,
|
@@ -309538,19 +310761,19 @@ function floatSafeRemainder4(val, step) {
|
|
309538
310761
|
const stepInt = Number.parseInt(step.toFixed(decCount).replace(".", ""));
|
309539
310762
|
return valInt % stepInt / 10 ** decCount;
|
309540
310763
|
}
|
309541
|
-
function defineLazy4(object$1,
|
310764
|
+
function defineLazy4(object$1, key4, getter) {
|
309542
310765
|
const set$1 = false;
|
309543
|
-
Object.defineProperty(object$1,
|
310766
|
+
Object.defineProperty(object$1, key4, {
|
309544
310767
|
get() {
|
309545
310768
|
if (!set$1) {
|
309546
310769
|
const value4 = getter();
|
309547
|
-
object$1[
|
310770
|
+
object$1[key4] = value4;
|
309548
310771
|
return value4;
|
309549
310772
|
}
|
309550
310773
|
throw new Error("cached value already set");
|
309551
310774
|
},
|
309552
310775
|
set(v6) {
|
309553
|
-
Object.defineProperty(object$1,
|
310776
|
+
Object.defineProperty(object$1, key4, { value: v6 });
|
309554
310777
|
},
|
309555
310778
|
configurable: true
|
309556
310779
|
});
|
@@ -309566,11 +310789,11 @@ function assignProp4(target, prop, value4) {
|
|
309566
310789
|
function getElementAtPath4(obj, path7) {
|
309567
310790
|
if (!path7)
|
309568
310791
|
return obj;
|
309569
|
-
return path7.reduce((acc,
|
310792
|
+
return path7.reduce((acc, key4) => acc?.[key4], obj);
|
309570
310793
|
}
|
309571
310794
|
function promiseAllObject4(promisesObj) {
|
309572
310795
|
const keys = Object.keys(promisesObj);
|
309573
|
-
const promises = keys.map((
|
310796
|
+
const promises = keys.map((key4) => promisesObj[key4]);
|
309574
310797
|
return Promise.all(promises).then((results) => {
|
309575
310798
|
const resolvedObj = {};
|
309576
310799
|
for (let i6 = 0;i6 < keys.length; i6++) {
|
@@ -309602,7 +310825,7 @@ var allowsEval4 = cached4(() => {
|
|
309602
310825
|
return false;
|
309603
310826
|
}
|
309604
310827
|
});
|
309605
|
-
function
|
310828
|
+
function isPlainObject8(o8) {
|
309606
310829
|
if (isObject4(o8) === false)
|
309607
310830
|
return false;
|
309608
310831
|
const ctor = o8.constructor;
|
@@ -309618,8 +310841,8 @@ function isPlainObject6(o8) {
|
|
309618
310841
|
}
|
309619
310842
|
function numKeys4(data) {
|
309620
310843
|
let keyCount = 0;
|
309621
|
-
for (const
|
309622
|
-
if (Object.prototype.hasOwnProperty.call(data,
|
310844
|
+
for (const key4 in data) {
|
310845
|
+
if (Object.prototype.hasOwnProperty.call(data, key4)) {
|
309623
310846
|
keyCount++;
|
309624
310847
|
}
|
309625
310848
|
}
|
@@ -309769,13 +310992,13 @@ var BIGINT_FORMAT_RANGES4 = {
|
|
309769
310992
|
function pick4(schema, mask) {
|
309770
310993
|
const newShape = {};
|
309771
310994
|
const currDef = schema._zod.def;
|
309772
|
-
for (const
|
309773
|
-
if (!(
|
309774
|
-
throw new Error(`Unrecognized key: "${
|
310995
|
+
for (const key4 in mask) {
|
310996
|
+
if (!(key4 in currDef.shape)) {
|
310997
|
+
throw new Error(`Unrecognized key: "${key4}"`);
|
309775
310998
|
}
|
309776
|
-
if (!mask[
|
310999
|
+
if (!mask[key4])
|
309777
311000
|
continue;
|
309778
|
-
newShape[
|
311001
|
+
newShape[key4] = currDef.shape[key4];
|
309779
311002
|
}
|
309780
311003
|
return clone4(schema, {
|
309781
311004
|
...schema._zod.def,
|
@@ -309786,13 +311009,13 @@ function pick4(schema, mask) {
|
|
309786
311009
|
function omit4(schema, mask) {
|
309787
311010
|
const newShape = { ...schema._zod.def.shape };
|
309788
311011
|
const currDef = schema._zod.def;
|
309789
|
-
for (const
|
309790
|
-
if (!(
|
309791
|
-
throw new Error(`Unrecognized key: "${
|
311012
|
+
for (const key4 in mask) {
|
311013
|
+
if (!(key4 in currDef.shape)) {
|
311014
|
+
throw new Error(`Unrecognized key: "${key4}"`);
|
309792
311015
|
}
|
309793
|
-
if (!mask[
|
311016
|
+
if (!mask[key4])
|
309794
311017
|
continue;
|
309795
|
-
delete newShape[
|
311018
|
+
delete newShape[key4];
|
309796
311019
|
}
|
309797
311020
|
return clone4(schema, {
|
309798
311021
|
...schema._zod.def,
|
@@ -309834,23 +311057,23 @@ function partial4(Class$1, schema, mask) {
|
|
309834
311057
|
const oldShape = schema._zod.def.shape;
|
309835
311058
|
const shape = { ...oldShape };
|
309836
311059
|
if (mask) {
|
309837
|
-
for (const
|
309838
|
-
if (!(
|
309839
|
-
throw new Error(`Unrecognized key: "${
|
311060
|
+
for (const key4 in mask) {
|
311061
|
+
if (!(key4 in oldShape)) {
|
311062
|
+
throw new Error(`Unrecognized key: "${key4}"`);
|
309840
311063
|
}
|
309841
|
-
if (!mask[
|
311064
|
+
if (!mask[key4])
|
309842
311065
|
continue;
|
309843
|
-
shape[
|
311066
|
+
shape[key4] = Class$1 ? new Class$1({
|
309844
311067
|
type: "optional",
|
309845
|
-
innerType: oldShape[
|
309846
|
-
}) : oldShape[
|
311068
|
+
innerType: oldShape[key4]
|
311069
|
+
}) : oldShape[key4];
|
309847
311070
|
}
|
309848
311071
|
} else {
|
309849
|
-
for (const
|
309850
|
-
shape[
|
311072
|
+
for (const key4 in oldShape) {
|
311073
|
+
shape[key4] = Class$1 ? new Class$1({
|
309851
311074
|
type: "optional",
|
309852
|
-
innerType: oldShape[
|
309853
|
-
}) : oldShape[
|
311075
|
+
innerType: oldShape[key4]
|
311076
|
+
}) : oldShape[key4];
|
309854
311077
|
}
|
309855
311078
|
}
|
309856
311079
|
return clone4(schema, {
|
@@ -309863,22 +311086,22 @@ function required4(Class$1, schema, mask) {
|
|
309863
311086
|
const oldShape = schema._zod.def.shape;
|
309864
311087
|
const shape = { ...oldShape };
|
309865
311088
|
if (mask) {
|
309866
|
-
for (const
|
309867
|
-
if (!(
|
309868
|
-
throw new Error(`Unrecognized key: "${
|
311089
|
+
for (const key4 in mask) {
|
311090
|
+
if (!(key4 in shape)) {
|
311091
|
+
throw new Error(`Unrecognized key: "${key4}"`);
|
309869
311092
|
}
|
309870
|
-
if (!mask[
|
311093
|
+
if (!mask[key4])
|
309871
311094
|
continue;
|
309872
|
-
shape[
|
311095
|
+
shape[key4] = new Class$1({
|
309873
311096
|
type: "nonoptional",
|
309874
|
-
innerType: oldShape[
|
311097
|
+
innerType: oldShape[key4]
|
309875
311098
|
});
|
309876
311099
|
}
|
309877
311100
|
} else {
|
309878
|
-
for (const
|
309879
|
-
shape[
|
311101
|
+
for (const key4 in oldShape) {
|
311102
|
+
shape[key4] = new Class$1({
|
309880
311103
|
type: "nonoptional",
|
309881
|
-
innerType: oldShape[
|
311104
|
+
innerType: oldShape[key4]
|
309882
311105
|
});
|
309883
311106
|
}
|
309884
311107
|
}
|
@@ -311458,28 +312681,28 @@ var $ZodArray4 = /* @__PURE__ */ $constructor4("$ZodArray", (inst, def) => {
|
|
311458
312681
|
return payload;
|
311459
312682
|
};
|
311460
312683
|
});
|
311461
|
-
function handleObjectResult4(result, final,
|
312684
|
+
function handleObjectResult4(result, final, key4) {
|
311462
312685
|
if (result.issues.length) {
|
311463
|
-
final.issues.push(...prefixIssues4(
|
312686
|
+
final.issues.push(...prefixIssues4(key4, result.issues));
|
311464
312687
|
}
|
311465
|
-
final.value[
|
312688
|
+
final.value[key4] = result.value;
|
311466
312689
|
}
|
311467
|
-
function handleOptionalObjectResult4(result, final,
|
312690
|
+
function handleOptionalObjectResult4(result, final, key4, input) {
|
311468
312691
|
if (result.issues.length) {
|
311469
|
-
if (input[
|
311470
|
-
if (
|
311471
|
-
final.value[
|
312692
|
+
if (input[key4] === undefined) {
|
312693
|
+
if (key4 in input) {
|
312694
|
+
final.value[key4] = undefined;
|
311472
312695
|
} else {
|
311473
|
-
final.value[
|
312696
|
+
final.value[key4] = result.value;
|
311474
312697
|
}
|
311475
312698
|
} else {
|
311476
|
-
final.issues.push(...prefixIssues4(
|
312699
|
+
final.issues.push(...prefixIssues4(key4, result.issues));
|
311477
312700
|
}
|
311478
312701
|
} else if (result.value === undefined) {
|
311479
|
-
if (
|
311480
|
-
final.value[
|
312702
|
+
if (key4 in input)
|
312703
|
+
final.value[key4] = undefined;
|
311481
312704
|
} else {
|
311482
|
-
final.value[
|
312705
|
+
final.value[key4] = result.value;
|
311483
312706
|
}
|
311484
312707
|
}
|
311485
312708
|
var $ZodObject4 = /* @__PURE__ */ $constructor4("$ZodObject", (inst, def) => {
|
@@ -311503,12 +312726,12 @@ var $ZodObject4 = /* @__PURE__ */ $constructor4("$ZodObject", (inst, def) => {
|
|
311503
312726
|
defineLazy4(inst._zod, "propValues", () => {
|
311504
312727
|
const shape = def.shape;
|
311505
312728
|
const propValues = {};
|
311506
|
-
for (const
|
311507
|
-
const field2 = shape[
|
312729
|
+
for (const key4 in shape) {
|
312730
|
+
const field2 = shape[key4]._zod;
|
311508
312731
|
if (field2.values) {
|
311509
|
-
propValues[
|
312732
|
+
propValues[key4] ?? (propValues[key4] = new Set);
|
311510
312733
|
for (const v6 of field2.values)
|
311511
|
-
propValues[
|
312734
|
+
propValues[key4].add(v6);
|
311512
312735
|
}
|
311513
312736
|
}
|
311514
312737
|
return propValues;
|
@@ -311520,21 +312743,21 @@ var $ZodObject4 = /* @__PURE__ */ $constructor4("$ZodObject", (inst, def) => {
|
|
311520
312743
|
"ctx"
|
311521
312744
|
]);
|
311522
312745
|
const { keys, optionalKeys: optionalKeys$1 } = _normalized.value;
|
311523
|
-
const parseStr = (
|
311524
|
-
const k5 = esc4(
|
312746
|
+
const parseStr = (key4) => {
|
312747
|
+
const k5 = esc4(key4);
|
311525
312748
|
return `shape[${k5}]._zod.run({ value: input[${k5}], issues: [] }, ctx)`;
|
311526
312749
|
};
|
311527
312750
|
doc2.write(`const input = payload.value;`);
|
311528
312751
|
const ids = Object.create(null);
|
311529
|
-
for (const
|
311530
|
-
ids[
|
312752
|
+
for (const key4 of keys) {
|
312753
|
+
ids[key4] = randomString4(15);
|
311531
312754
|
}
|
311532
312755
|
doc2.write(`const newResult = {}`);
|
311533
|
-
for (const
|
311534
|
-
if (optionalKeys$1.has(
|
311535
|
-
const id = ids[
|
311536
|
-
doc2.write(`const ${id} = ${parseStr(
|
311537
|
-
const k5 = esc4(
|
312756
|
+
for (const key4 of keys) {
|
312757
|
+
if (optionalKeys$1.has(key4)) {
|
312758
|
+
const id = ids[key4];
|
312759
|
+
doc2.write(`const ${id} = ${parseStr(key4)};`);
|
312760
|
+
const k5 = esc4(key4);
|
311538
312761
|
doc2.write(`
|
311539
312762
|
if (${id}.issues.length) {
|
311540
312763
|
if (input[${k5}] === undefined) {
|
@@ -311556,14 +312779,14 @@ var $ZodObject4 = /* @__PURE__ */ $constructor4("$ZodObject", (inst, def) => {
|
|
311556
312779
|
}
|
311557
312780
|
`);
|
311558
312781
|
} else {
|
311559
|
-
const id = ids[
|
311560
|
-
doc2.write(`const ${id} = ${parseStr(
|
312782
|
+
const id = ids[key4];
|
312783
|
+
doc2.write(`const ${id} = ${parseStr(key4)};`);
|
311561
312784
|
doc2.write(`
|
311562
312785
|
if (${id}.issues.length) payload.issues = payload.issues.concat(${id}.issues.map(iss => ({
|
311563
312786
|
...iss,
|
311564
|
-
path: iss.path ? [${esc4(
|
312787
|
+
path: iss.path ? [${esc4(key4)}, ...iss.path] : [${esc4(key4)}]
|
311565
312788
|
})));`);
|
311566
|
-
doc2.write(`newResult[${esc4(
|
312789
|
+
doc2.write(`newResult[${esc4(key4)}] = ${id}.value`);
|
311567
312790
|
}
|
311568
312791
|
}
|
311569
312792
|
doc2.write(`payload.value = newResult;`);
|
@@ -311598,20 +312821,20 @@ var $ZodObject4 = /* @__PURE__ */ $constructor4("$ZodObject", (inst, def) => {
|
|
311598
312821
|
} else {
|
311599
312822
|
payload.value = {};
|
311600
312823
|
const shape = value4.shape;
|
311601
|
-
for (const
|
311602
|
-
const el = shape[
|
312824
|
+
for (const key4 of value4.keys) {
|
312825
|
+
const el = shape[key4];
|
311603
312826
|
const r6 = el._zod.run({
|
311604
|
-
value: input[
|
312827
|
+
value: input[key4],
|
311605
312828
|
issues: []
|
311606
312829
|
}, ctx);
|
311607
312830
|
const isOptional = el._zod.optin === "optional" && el._zod.optout === "optional";
|
311608
312831
|
if (r6 instanceof Promise) {
|
311609
|
-
proms.push(r6.then((r$1) => isOptional ? handleOptionalObjectResult4(r$1, payload,
|
312832
|
+
proms.push(r6.then((r$1) => isOptional ? handleOptionalObjectResult4(r$1, payload, key4, input) : handleObjectResult4(r$1, payload, key4)));
|
311610
312833
|
} else {
|
311611
312834
|
if (isOptional) {
|
311612
|
-
handleOptionalObjectResult4(r6, payload,
|
312835
|
+
handleOptionalObjectResult4(r6, payload, key4, input);
|
311613
312836
|
} else {
|
311614
|
-
handleObjectResult4(r6, payload,
|
312837
|
+
handleObjectResult4(r6, payload, key4);
|
311615
312838
|
}
|
311616
312839
|
}
|
311617
312840
|
}
|
@@ -311623,21 +312846,21 @@ var $ZodObject4 = /* @__PURE__ */ $constructor4("$ZodObject", (inst, def) => {
|
|
311623
312846
|
const keySet = value4.keySet;
|
311624
312847
|
const _catchall = catchall._zod;
|
311625
312848
|
const t8 = _catchall.def.type;
|
311626
|
-
for (const
|
311627
|
-
if (keySet.has(
|
312849
|
+
for (const key4 of Object.keys(input)) {
|
312850
|
+
if (keySet.has(key4))
|
311628
312851
|
continue;
|
311629
312852
|
if (t8 === "never") {
|
311630
|
-
unrecognized.push(
|
312853
|
+
unrecognized.push(key4);
|
311631
312854
|
continue;
|
311632
312855
|
}
|
311633
312856
|
const r6 = _catchall.run({
|
311634
|
-
value: input[
|
312857
|
+
value: input[key4],
|
311635
312858
|
issues: []
|
311636
312859
|
}, ctx);
|
311637
312860
|
if (r6 instanceof Promise) {
|
311638
|
-
proms.push(r6.then((r$1) => handleObjectResult4(r$1, payload,
|
312861
|
+
proms.push(r6.then((r$1) => handleObjectResult4(r$1, payload, key4)));
|
311639
312862
|
} else {
|
311640
|
-
handleObjectResult4(r6, payload,
|
312863
|
+
handleObjectResult4(r6, payload, key4);
|
311641
312864
|
}
|
311642
312865
|
}
|
311643
312866
|
if (unrecognized.length) {
|
@@ -311807,22 +313030,22 @@ function mergeValues4(a7, b4) {
|
|
311807
313030
|
data: a7
|
311808
313031
|
};
|
311809
313032
|
}
|
311810
|
-
if (
|
313033
|
+
if (isPlainObject8(a7) && isPlainObject8(b4)) {
|
311811
313034
|
const bKeys = Object.keys(b4);
|
311812
|
-
const sharedKeys = Object.keys(a7).filter((
|
313035
|
+
const sharedKeys = Object.keys(a7).filter((key4) => bKeys.indexOf(key4) !== -1);
|
311813
313036
|
const newObj = {
|
311814
313037
|
...a7,
|
311815
313038
|
...b4
|
311816
313039
|
};
|
311817
|
-
for (const
|
311818
|
-
const sharedValue = mergeValues4(a7[
|
313040
|
+
for (const key4 of sharedKeys) {
|
313041
|
+
const sharedValue = mergeValues4(a7[key4], b4[key4]);
|
311819
313042
|
if (!sharedValue.valid) {
|
311820
313043
|
return {
|
311821
313044
|
valid: false,
|
311822
|
-
mergeErrorPath: [
|
313045
|
+
mergeErrorPath: [key4, ...sharedValue.mergeErrorPath]
|
311823
313046
|
};
|
311824
313047
|
}
|
311825
|
-
newObj[
|
313048
|
+
newObj[key4] = sharedValue.data;
|
311826
313049
|
}
|
311827
313050
|
return {
|
311828
313051
|
valid: true,
|
@@ -311958,7 +313181,7 @@ var $ZodRecord4 = /* @__PURE__ */ $constructor4("$ZodRecord", (inst, def) => {
|
|
311958
313181
|
$ZodType4.init(inst, def);
|
311959
313182
|
inst._zod.parse = (payload, ctx) => {
|
311960
313183
|
const input = payload.value;
|
311961
|
-
if (!
|
313184
|
+
if (!isPlainObject8(input)) {
|
311962
313185
|
payload.issues.push({
|
311963
313186
|
expected: "record",
|
311964
313187
|
code: "invalid_type",
|
@@ -311971,32 +313194,32 @@ var $ZodRecord4 = /* @__PURE__ */ $constructor4("$ZodRecord", (inst, def) => {
|
|
311971
313194
|
if (def.keyType._zod.values) {
|
311972
313195
|
const values = def.keyType._zod.values;
|
311973
313196
|
payload.value = {};
|
311974
|
-
for (const
|
311975
|
-
if (typeof
|
313197
|
+
for (const key4 of values) {
|
313198
|
+
if (typeof key4 === "string" || typeof key4 === "number" || typeof key4 === "symbol") {
|
311976
313199
|
const result = def.valueType._zod.run({
|
311977
|
-
value: input[
|
313200
|
+
value: input[key4],
|
311978
313201
|
issues: []
|
311979
313202
|
}, ctx);
|
311980
313203
|
if (result instanceof Promise) {
|
311981
313204
|
proms.push(result.then((result$1) => {
|
311982
313205
|
if (result$1.issues.length) {
|
311983
|
-
payload.issues.push(...prefixIssues4(
|
313206
|
+
payload.issues.push(...prefixIssues4(key4, result$1.issues));
|
311984
313207
|
}
|
311985
|
-
payload.value[
|
313208
|
+
payload.value[key4] = result$1.value;
|
311986
313209
|
}));
|
311987
313210
|
} else {
|
311988
313211
|
if (result.issues.length) {
|
311989
|
-
payload.issues.push(...prefixIssues4(
|
313212
|
+
payload.issues.push(...prefixIssues4(key4, result.issues));
|
311990
313213
|
}
|
311991
|
-
payload.value[
|
313214
|
+
payload.value[key4] = result.value;
|
311992
313215
|
}
|
311993
313216
|
}
|
311994
313217
|
}
|
311995
313218
|
let unrecognized;
|
311996
|
-
for (const
|
311997
|
-
if (!values.has(
|
313219
|
+
for (const key4 in input) {
|
313220
|
+
if (!values.has(key4)) {
|
311998
313221
|
unrecognized = unrecognized ?? [];
|
311999
|
-
unrecognized.push(
|
313222
|
+
unrecognized.push(key4);
|
312000
313223
|
}
|
312001
313224
|
}
|
312002
313225
|
if (unrecognized && unrecognized.length > 0) {
|
@@ -312009,11 +313232,11 @@ var $ZodRecord4 = /* @__PURE__ */ $constructor4("$ZodRecord", (inst, def) => {
|
|
312009
313232
|
}
|
312010
313233
|
} else {
|
312011
313234
|
payload.value = {};
|
312012
|
-
for (const
|
312013
|
-
if (
|
313235
|
+
for (const key4 of Reflect.ownKeys(input)) {
|
313236
|
+
if (key4 === "__proto__")
|
312014
313237
|
continue;
|
312015
313238
|
const keyResult = def.keyType._zod.run({
|
312016
|
-
value:
|
313239
|
+
value: key4,
|
312017
313240
|
issues: []
|
312018
313241
|
}, ctx);
|
312019
313242
|
if (keyResult instanceof Promise) {
|
@@ -312024,27 +313247,27 @@ var $ZodRecord4 = /* @__PURE__ */ $constructor4("$ZodRecord", (inst, def) => {
|
|
312024
313247
|
origin: "record",
|
312025
313248
|
code: "invalid_key",
|
312026
313249
|
issues: keyResult.issues.map((iss) => finalizeIssue4(iss, ctx, config4())),
|
312027
|
-
input:
|
312028
|
-
path: [
|
313250
|
+
input: key4,
|
313251
|
+
path: [key4],
|
312029
313252
|
inst
|
312030
313253
|
});
|
312031
313254
|
payload.value[keyResult.value] = keyResult.value;
|
312032
313255
|
continue;
|
312033
313256
|
}
|
312034
313257
|
const result = def.valueType._zod.run({
|
312035
|
-
value: input[
|
313258
|
+
value: input[key4],
|
312036
313259
|
issues: []
|
312037
313260
|
}, ctx);
|
312038
313261
|
if (result instanceof Promise) {
|
312039
313262
|
proms.push(result.then((result$1) => {
|
312040
313263
|
if (result$1.issues.length) {
|
312041
|
-
payload.issues.push(...prefixIssues4(
|
313264
|
+
payload.issues.push(...prefixIssues4(key4, result$1.issues));
|
312042
313265
|
}
|
312043
313266
|
payload.value[keyResult.value] = result$1.value;
|
312044
313267
|
}));
|
312045
313268
|
} else {
|
312046
313269
|
if (result.issues.length) {
|
312047
|
-
payload.issues.push(...prefixIssues4(
|
313270
|
+
payload.issues.push(...prefixIssues4(key4, result.issues));
|
312048
313271
|
}
|
312049
313272
|
payload.value[keyResult.value] = result.value;
|
312050
313273
|
}
|
@@ -312071,9 +313294,9 @@ var $ZodMap4 = /* @__PURE__ */ $constructor4("$ZodMap", (inst, def) => {
|
|
312071
313294
|
}
|
312072
313295
|
const proms = [];
|
312073
313296
|
payload.value = new Map;
|
312074
|
-
for (const [
|
313297
|
+
for (const [key4, value4] of input) {
|
312075
313298
|
const keyResult = def.keyType._zod.run({
|
312076
|
-
value:
|
313299
|
+
value: key4,
|
312077
313300
|
issues: []
|
312078
313301
|
}, ctx);
|
312079
313302
|
const valueResult = def.valueType._zod.run({
|
@@ -312082,10 +313305,10 @@ var $ZodMap4 = /* @__PURE__ */ $constructor4("$ZodMap", (inst, def) => {
|
|
312082
313305
|
}, ctx);
|
312083
313306
|
if (keyResult instanceof Promise || valueResult instanceof Promise) {
|
312084
313307
|
proms.push(Promise.all([keyResult, valueResult]).then(([keyResult$1, valueResult$1]) => {
|
312085
|
-
handleMapResult4(keyResult$1, valueResult$1, payload,
|
313308
|
+
handleMapResult4(keyResult$1, valueResult$1, payload, key4, input, inst, ctx);
|
312086
313309
|
}));
|
312087
313310
|
} else {
|
312088
|
-
handleMapResult4(keyResult, valueResult, payload,
|
313311
|
+
handleMapResult4(keyResult, valueResult, payload, key4, input, inst, ctx);
|
312089
313312
|
}
|
312090
313313
|
}
|
312091
313314
|
if (proms.length)
|
@@ -312093,10 +313316,10 @@ var $ZodMap4 = /* @__PURE__ */ $constructor4("$ZodMap", (inst, def) => {
|
|
312093
313316
|
return payload;
|
312094
313317
|
};
|
312095
313318
|
});
|
312096
|
-
function handleMapResult4(keyResult, valueResult, final,
|
313319
|
+
function handleMapResult4(keyResult, valueResult, final, key4, input, inst, ctx) {
|
312097
313320
|
if (keyResult.issues.length) {
|
312098
|
-
if (propertyKeyTypes4.has(typeof
|
312099
|
-
final.issues.push(...prefixIssues4(
|
313321
|
+
if (propertyKeyTypes4.has(typeof key4)) {
|
313322
|
+
final.issues.push(...prefixIssues4(key4, keyResult.issues));
|
312100
313323
|
} else {
|
312101
313324
|
final.issues.push({
|
312102
313325
|
origin: "map",
|
@@ -312108,15 +313331,15 @@ function handleMapResult4(keyResult, valueResult, final, key2, input, inst, ctx)
|
|
312108
313331
|
}
|
312109
313332
|
}
|
312110
313333
|
if (valueResult.issues.length) {
|
312111
|
-
if (propertyKeyTypes4.has(typeof
|
312112
|
-
final.issues.push(...prefixIssues4(
|
313334
|
+
if (propertyKeyTypes4.has(typeof key4)) {
|
313335
|
+
final.issues.push(...prefixIssues4(key4, valueResult.issues));
|
312113
313336
|
} else {
|
312114
313337
|
final.issues.push({
|
312115
313338
|
origin: "map",
|
312116
313339
|
code: "invalid_element",
|
312117
313340
|
input,
|
312118
313341
|
inst,
|
312119
|
-
key:
|
313342
|
+
key: key4,
|
312120
313343
|
issues: valueResult.issues.map((iss) => finalizeIssue4(iss, ctx, config4()))
|
312121
313344
|
});
|
312122
313345
|
}
|
@@ -318438,19 +319661,19 @@ var JSONSchemaGenerator4 = class {
|
|
318438
319661
|
json$1.type = "object";
|
318439
319662
|
json$1.properties = {};
|
318440
319663
|
const shape = def.shape;
|
318441
|
-
for (const
|
318442
|
-
json$1.properties[
|
319664
|
+
for (const key4 in shape) {
|
319665
|
+
json$1.properties[key4] = this.process(shape[key4], {
|
318443
319666
|
...params,
|
318444
319667
|
path: [
|
318445
319668
|
...params.path,
|
318446
319669
|
"properties",
|
318447
|
-
|
319670
|
+
key4
|
318448
319671
|
]
|
318449
319672
|
});
|
318450
319673
|
}
|
318451
319674
|
const allKeys = new Set(Object.keys(shape));
|
318452
|
-
const requiredKeys = new Set([...allKeys].filter((
|
318453
|
-
const v6 = def.shape[
|
319675
|
+
const requiredKeys = new Set([...allKeys].filter((key4) => {
|
319676
|
+
const v6 = def.shape[key4]._zod;
|
318454
319677
|
if (this.io === "input") {
|
318455
319678
|
return v6.optin === undefined;
|
318456
319679
|
} else {
|
@@ -318802,8 +320025,8 @@ var JSONSchemaGenerator4 = class {
|
|
318802
320025
|
if (defId)
|
318803
320026
|
seen.defId = defId;
|
318804
320027
|
const schema$1 = seen.schema;
|
318805
|
-
for (const
|
318806
|
-
delete schema$1[
|
320028
|
+
for (const key4 in schema$1) {
|
320029
|
+
delete schema$1[key4];
|
318807
320030
|
}
|
318808
320031
|
schema$1.$ref = ref;
|
318809
320032
|
};
|
@@ -318914,8 +320137,8 @@ function toJSONSchema4(input, _params) {
|
|
318914
320137
|
defs
|
318915
320138
|
};
|
318916
320139
|
for (const entry of input._idmap.entries()) {
|
318917
|
-
const [
|
318918
|
-
schemas3[
|
320140
|
+
const [key4, schema] = entry;
|
320141
|
+
schemas3[key4] = gen$1.emit(schema, {
|
318919
320142
|
..._params,
|
318920
320143
|
external: external2
|
318921
320144
|
});
|
@@ -318960,8 +320183,8 @@ function isTransforming4(_schema, _ctx) {
|
|
318960
320183
|
return isTransforming4(def.element, ctx);
|
318961
320184
|
}
|
318962
320185
|
case "object": {
|
318963
|
-
for (const
|
318964
|
-
if (isTransforming4(def.shape[
|
320186
|
+
for (const key4 in def.shape) {
|
320187
|
+
if (isTransforming4(def.shape[key4], ctx))
|
318965
320188
|
return true;
|
318966
320189
|
}
|
318967
320190
|
return false;
|
@@ -320810,19 +322033,19 @@ function getBooleanValue(value4, defaultValue) {
|
|
320810
322033
|
function boolToString(value4) {
|
320811
322034
|
return value4 ? "Yes" : "No";
|
320812
322035
|
}
|
320813
|
-
var
|
322036
|
+
var esm_default5 = createPrompt((config5, done) => {
|
320814
322037
|
const { transformer = boolToString } = config5;
|
320815
322038
|
const [status, setStatus] = useState("idle");
|
320816
322039
|
const [value4, setValue] = useState("");
|
320817
322040
|
const theme = makeTheme(config5.theme);
|
320818
322041
|
const prefix = usePrefix({ status, theme });
|
320819
|
-
useKeypress((
|
320820
|
-
if (isEnterKey(
|
322042
|
+
useKeypress((key4, rl) => {
|
322043
|
+
if (isEnterKey(key4)) {
|
320821
322044
|
const answer = getBooleanValue(value4, config5.default);
|
320822
322045
|
setValue(transformer(answer));
|
320823
322046
|
setStatus("done");
|
320824
322047
|
done(answer);
|
320825
|
-
} else if (
|
322048
|
+
} else if (key4.name === "tab") {
|
320826
322049
|
const answer = boolToString(!getBooleanValue(value4, config5.default));
|
320827
322050
|
rl.clearLine(0);
|
320828
322051
|
rl.write(answer);
|
@@ -320842,20 +322065,476 @@ var esm_default4 = createPrompt((config5, done) => {
|
|
320842
322065
|
return `${prefix} ${message}${defaultValue} ${formattedValue}`;
|
320843
322066
|
});
|
320844
322067
|
|
322068
|
+
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/key.js
|
322069
|
+
var isEnterKey4 = (key4) => key4.name === "enter" || key4.name === "return";
|
322070
|
+
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/errors.js
|
322071
|
+
class AbortPromptError4 extends Error {
|
322072
|
+
name = "AbortPromptError";
|
322073
|
+
message = "Prompt was aborted";
|
322074
|
+
constructor(options) {
|
322075
|
+
super();
|
322076
|
+
this.cause = options?.cause;
|
322077
|
+
}
|
322078
|
+
}
|
322079
|
+
|
322080
|
+
class CancelPromptError4 extends Error {
|
322081
|
+
name = "CancelPromptError";
|
322082
|
+
message = "Prompt was canceled";
|
322083
|
+
}
|
322084
|
+
|
322085
|
+
class ExitPromptError4 extends Error {
|
322086
|
+
name = "ExitPromptError";
|
322087
|
+
}
|
322088
|
+
|
322089
|
+
class HookError4 extends Error {
|
322090
|
+
name = "HookError";
|
322091
|
+
}
|
322092
|
+
|
322093
|
+
class ValidationError4 extends Error {
|
322094
|
+
name = "ValidationError";
|
322095
|
+
}
|
322096
|
+
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/use-state.js
|
322097
|
+
import { AsyncResource as AsyncResource11 } from "node:async_hooks";
|
322098
|
+
|
322099
|
+
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/hook-engine.js
|
322100
|
+
import { AsyncLocalStorage as AsyncLocalStorage4, AsyncResource as AsyncResource10 } from "node:async_hooks";
|
322101
|
+
var hookStorage4 = new AsyncLocalStorage4;
|
322102
|
+
function createStore4(rl) {
|
322103
|
+
const store = {
|
322104
|
+
rl,
|
322105
|
+
hooks: [],
|
322106
|
+
hooksCleanup: [],
|
322107
|
+
hooksEffect: [],
|
322108
|
+
index: 0,
|
322109
|
+
handleChange() {}
|
322110
|
+
};
|
322111
|
+
return store;
|
322112
|
+
}
|
322113
|
+
function withHooks4(rl, cb) {
|
322114
|
+
const store = createStore4(rl);
|
322115
|
+
return hookStorage4.run(store, () => {
|
322116
|
+
function cycle(render) {
|
322117
|
+
store.handleChange = () => {
|
322118
|
+
store.index = 0;
|
322119
|
+
render();
|
322120
|
+
};
|
322121
|
+
store.handleChange();
|
322122
|
+
}
|
322123
|
+
return cb(cycle);
|
322124
|
+
});
|
322125
|
+
}
|
322126
|
+
function getStore4() {
|
322127
|
+
const store = hookStorage4.getStore();
|
322128
|
+
if (!store) {
|
322129
|
+
throw new HookError4("[Inquirer] Hook functions can only be called from within a prompt");
|
322130
|
+
}
|
322131
|
+
return store;
|
322132
|
+
}
|
322133
|
+
function readline7() {
|
322134
|
+
return getStore4().rl;
|
322135
|
+
}
|
322136
|
+
function withUpdates4(fn) {
|
322137
|
+
const wrapped = (...args) => {
|
322138
|
+
const store = getStore4();
|
322139
|
+
let shouldUpdate = false;
|
322140
|
+
const oldHandleChange = store.handleChange;
|
322141
|
+
store.handleChange = () => {
|
322142
|
+
shouldUpdate = true;
|
322143
|
+
};
|
322144
|
+
const returnValue = fn(...args);
|
322145
|
+
if (shouldUpdate) {
|
322146
|
+
oldHandleChange();
|
322147
|
+
}
|
322148
|
+
store.handleChange = oldHandleChange;
|
322149
|
+
return returnValue;
|
322150
|
+
};
|
322151
|
+
return AsyncResource10.bind(wrapped);
|
322152
|
+
}
|
322153
|
+
function withPointer4(cb) {
|
322154
|
+
const store = getStore4();
|
322155
|
+
const { index: index2 } = store;
|
322156
|
+
const pointer = {
|
322157
|
+
get() {
|
322158
|
+
return store.hooks[index2];
|
322159
|
+
},
|
322160
|
+
set(value4) {
|
322161
|
+
store.hooks[index2] = value4;
|
322162
|
+
},
|
322163
|
+
initialized: index2 in store.hooks
|
322164
|
+
};
|
322165
|
+
const returnValue = cb(pointer);
|
322166
|
+
store.index++;
|
322167
|
+
return returnValue;
|
322168
|
+
}
|
322169
|
+
function handleChange4() {
|
322170
|
+
getStore4().handleChange();
|
322171
|
+
}
|
322172
|
+
var effectScheduler4 = {
|
322173
|
+
queue(cb) {
|
322174
|
+
const store = getStore4();
|
322175
|
+
const { index: index2 } = store;
|
322176
|
+
store.hooksEffect.push(() => {
|
322177
|
+
store.hooksCleanup[index2]?.();
|
322178
|
+
const cleanFn = cb(readline7());
|
322179
|
+
if (cleanFn != null && typeof cleanFn !== "function") {
|
322180
|
+
throw new ValidationError4("useEffect return value must be a cleanup function or nothing.");
|
322181
|
+
}
|
322182
|
+
store.hooksCleanup[index2] = cleanFn;
|
322183
|
+
});
|
322184
|
+
},
|
322185
|
+
run() {
|
322186
|
+
const store = getStore4();
|
322187
|
+
withUpdates4(() => {
|
322188
|
+
store.hooksEffect.forEach((effect) => {
|
322189
|
+
effect();
|
322190
|
+
});
|
322191
|
+
store.hooksEffect.length = 0;
|
322192
|
+
})();
|
322193
|
+
},
|
322194
|
+
clearAll() {
|
322195
|
+
const store = getStore4();
|
322196
|
+
store.hooksCleanup.forEach((cleanFn) => {
|
322197
|
+
cleanFn?.();
|
322198
|
+
});
|
322199
|
+
store.hooksEffect.length = 0;
|
322200
|
+
store.hooksCleanup.length = 0;
|
322201
|
+
}
|
322202
|
+
};
|
322203
|
+
|
322204
|
+
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/use-state.js
|
322205
|
+
function useState4(defaultValue) {
|
322206
|
+
return withPointer4((pointer) => {
|
322207
|
+
const setState = AsyncResource11.bind(function setState(newValue) {
|
322208
|
+
if (pointer.get() !== newValue) {
|
322209
|
+
pointer.set(newValue);
|
322210
|
+
handleChange4();
|
322211
|
+
}
|
322212
|
+
});
|
322213
|
+
if (pointer.initialized) {
|
322214
|
+
return [pointer.get(), setState];
|
322215
|
+
}
|
322216
|
+
const value4 = typeof defaultValue === "function" ? defaultValue() : defaultValue;
|
322217
|
+
pointer.set(value4);
|
322218
|
+
return [value4, setState];
|
322219
|
+
});
|
322220
|
+
}
|
322221
|
+
|
322222
|
+
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/use-effect.js
|
322223
|
+
function useEffect4(cb, depArray) {
|
322224
|
+
withPointer4((pointer) => {
|
322225
|
+
const oldDeps = pointer.get();
|
322226
|
+
const hasChanged = !Array.isArray(oldDeps) || depArray.some((dep, i6) => !Object.is(dep, oldDeps[i6]));
|
322227
|
+
if (hasChanged) {
|
322228
|
+
effectScheduler4.queue(cb);
|
322229
|
+
}
|
322230
|
+
pointer.set(depArray);
|
322231
|
+
});
|
322232
|
+
}
|
322233
|
+
|
322234
|
+
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/theme.js
|
322235
|
+
var import_yoctocolors_cjs6 = __toESM(require_yoctocolors_cjs(), 1);
|
322236
|
+
var defaultTheme4 = {
|
322237
|
+
prefix: {
|
322238
|
+
idle: import_yoctocolors_cjs6.default.blue("?"),
|
322239
|
+
done: import_yoctocolors_cjs6.default.green(esm_default2.tick)
|
322240
|
+
},
|
322241
|
+
spinner: {
|
322242
|
+
interval: 80,
|
322243
|
+
frames: ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"].map((frame) => import_yoctocolors_cjs6.default.yellow(frame))
|
322244
|
+
},
|
322245
|
+
style: {
|
322246
|
+
answer: import_yoctocolors_cjs6.default.cyan,
|
322247
|
+
message: import_yoctocolors_cjs6.default.bold,
|
322248
|
+
error: (text2) => import_yoctocolors_cjs6.default.red(`> ${text2}`),
|
322249
|
+
defaultAnswer: (text2) => import_yoctocolors_cjs6.default.dim(`(${text2})`),
|
322250
|
+
help: import_yoctocolors_cjs6.default.dim,
|
322251
|
+
highlight: import_yoctocolors_cjs6.default.cyan,
|
322252
|
+
key: (text2) => import_yoctocolors_cjs6.default.cyan(import_yoctocolors_cjs6.default.bold(`<${text2}>`))
|
322253
|
+
}
|
322254
|
+
};
|
322255
|
+
|
322256
|
+
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/make-theme.js
|
322257
|
+
function isPlainObject9(value4) {
|
322258
|
+
if (typeof value4 !== "object" || value4 === null)
|
322259
|
+
return false;
|
322260
|
+
let proto = value4;
|
322261
|
+
while (Object.getPrototypeOf(proto) !== null) {
|
322262
|
+
proto = Object.getPrototypeOf(proto);
|
322263
|
+
}
|
322264
|
+
return Object.getPrototypeOf(value4) === proto;
|
322265
|
+
}
|
322266
|
+
function deepMerge5(...objects) {
|
322267
|
+
const output = {};
|
322268
|
+
for (const obj of objects) {
|
322269
|
+
for (const [key4, value4] of Object.entries(obj)) {
|
322270
|
+
const prevValue = output[key4];
|
322271
|
+
output[key4] = isPlainObject9(prevValue) && isPlainObject9(value4) ? deepMerge5(prevValue, value4) : value4;
|
322272
|
+
}
|
322273
|
+
}
|
322274
|
+
return output;
|
322275
|
+
}
|
322276
|
+
function makeTheme4(...themes) {
|
322277
|
+
const themesToMerge = [
|
322278
|
+
defaultTheme4,
|
322279
|
+
...themes.filter((theme) => theme != null)
|
322280
|
+
];
|
322281
|
+
return deepMerge5(...themesToMerge);
|
322282
|
+
}
|
322283
|
+
|
322284
|
+
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/use-prefix.js
|
322285
|
+
function usePrefix4({ status = "idle", theme }) {
|
322286
|
+
const [showLoader, setShowLoader] = useState4(false);
|
322287
|
+
const [tick, setTick] = useState4(0);
|
322288
|
+
const { prefix, spinner: spinner2 } = makeTheme4(theme);
|
322289
|
+
useEffect4(() => {
|
322290
|
+
if (status === "loading") {
|
322291
|
+
let tickInterval;
|
322292
|
+
let inc = -1;
|
322293
|
+
const delayTimeout = setTimeout(() => {
|
322294
|
+
setShowLoader(true);
|
322295
|
+
tickInterval = setInterval(() => {
|
322296
|
+
inc = inc + 1;
|
322297
|
+
setTick(inc % spinner2.frames.length);
|
322298
|
+
}, spinner2.interval);
|
322299
|
+
}, 300);
|
322300
|
+
return () => {
|
322301
|
+
clearTimeout(delayTimeout);
|
322302
|
+
clearInterval(tickInterval);
|
322303
|
+
};
|
322304
|
+
} else {
|
322305
|
+
setShowLoader(false);
|
322306
|
+
}
|
322307
|
+
}, [status]);
|
322308
|
+
if (showLoader) {
|
322309
|
+
return spinner2.frames[tick];
|
322310
|
+
}
|
322311
|
+
const iconName = status === "loading" ? "idle" : status;
|
322312
|
+
return typeof prefix === "string" ? prefix : prefix[iconName] ?? prefix["idle"];
|
322313
|
+
}
|
322314
|
+
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/use-ref.js
|
322315
|
+
function useRef4(val) {
|
322316
|
+
return useState4({ current: val })[0];
|
322317
|
+
}
|
322318
|
+
|
322319
|
+
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/use-keypress.js
|
322320
|
+
function useKeypress4(userHandler) {
|
322321
|
+
const signal = useRef4(userHandler);
|
322322
|
+
signal.current = userHandler;
|
322323
|
+
useEffect4((rl) => {
|
322324
|
+
let ignore = false;
|
322325
|
+
const handler = withUpdates4((_input, event) => {
|
322326
|
+
if (ignore)
|
322327
|
+
return;
|
322328
|
+
signal.current(event, rl);
|
322329
|
+
});
|
322330
|
+
rl.input.on("keypress", handler);
|
322331
|
+
return () => {
|
322332
|
+
ignore = true;
|
322333
|
+
rl.input.removeListener("keypress", handler);
|
322334
|
+
};
|
322335
|
+
}, []);
|
322336
|
+
}
|
322337
|
+
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/utils.js
|
322338
|
+
var import_cli_width4 = __toESM(require_cli_width(), 1);
|
322339
|
+
var import_wrap_ansi4 = __toESM(require_wrap_ansi(), 1);
|
322340
|
+
function breakLines4(content, width) {
|
322341
|
+
return content.split(`
|
322342
|
+
`).flatMap((line) => import_wrap_ansi4.default(line, width, { trim: false, hard: true }).split(`
|
322343
|
+
`).map((str) => str.trimEnd())).join(`
|
322344
|
+
`);
|
322345
|
+
}
|
322346
|
+
function readlineWidth4() {
|
322347
|
+
return import_cli_width4.default({ defaultWidth: 80, output: readline7().output });
|
322348
|
+
}
|
322349
|
+
|
322350
|
+
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
|
322351
|
+
var import_mute_stream4 = __toESM(require_lib(), 1);
|
322352
|
+
import * as readline8 from "node:readline";
|
322353
|
+
import { AsyncResource as AsyncResource12 } from "node:async_hooks";
|
322354
|
+
|
322355
|
+
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/screen-manager.js
|
322356
|
+
var import_ansi_escapes5 = __toESM(require_ansi_escapes(), 1);
|
322357
|
+
import { stripVTControlCharacters as stripVTControlCharacters5 } from "node:util";
|
322358
|
+
var height4 = (content) => content.split(`
|
322359
|
+
`).length;
|
322360
|
+
var lastLine4 = (content) => content.split(`
|
322361
|
+
`).pop() ?? "";
|
322362
|
+
function cursorDown4(n6) {
|
322363
|
+
return n6 > 0 ? import_ansi_escapes5.default.cursorDown(n6) : "";
|
322364
|
+
}
|
322365
|
+
|
322366
|
+
class ScreenManager4 {
|
322367
|
+
height = 0;
|
322368
|
+
extraLinesUnderPrompt = 0;
|
322369
|
+
cursorPos;
|
322370
|
+
rl;
|
322371
|
+
constructor(rl) {
|
322372
|
+
this.rl = rl;
|
322373
|
+
this.cursorPos = rl.getCursorPos();
|
322374
|
+
}
|
322375
|
+
write(content) {
|
322376
|
+
this.rl.output.unmute();
|
322377
|
+
this.rl.output.write(content);
|
322378
|
+
this.rl.output.mute();
|
322379
|
+
}
|
322380
|
+
render(content, bottomContent = "") {
|
322381
|
+
const promptLine = lastLine4(content);
|
322382
|
+
const rawPromptLine = stripVTControlCharacters5(promptLine);
|
322383
|
+
let prompt = rawPromptLine;
|
322384
|
+
if (this.rl.line.length > 0) {
|
322385
|
+
prompt = prompt.slice(0, -this.rl.line.length);
|
322386
|
+
}
|
322387
|
+
this.rl.setPrompt(prompt);
|
322388
|
+
this.cursorPos = this.rl.getCursorPos();
|
322389
|
+
const width = readlineWidth4();
|
322390
|
+
content = breakLines4(content, width);
|
322391
|
+
bottomContent = breakLines4(bottomContent, width);
|
322392
|
+
if (rawPromptLine.length % width === 0) {
|
322393
|
+
content += `
|
322394
|
+
`;
|
322395
|
+
}
|
322396
|
+
let output = content + (bottomContent ? `
|
322397
|
+
` + bottomContent : "");
|
322398
|
+
const promptLineUpDiff = Math.floor(rawPromptLine.length / width) - this.cursorPos.rows;
|
322399
|
+
const bottomContentHeight = promptLineUpDiff + (bottomContent ? height4(bottomContent) : 0);
|
322400
|
+
if (bottomContentHeight > 0)
|
322401
|
+
output += import_ansi_escapes5.default.cursorUp(bottomContentHeight);
|
322402
|
+
output += import_ansi_escapes5.default.cursorTo(this.cursorPos.cols);
|
322403
|
+
this.write(cursorDown4(this.extraLinesUnderPrompt) + import_ansi_escapes5.default.eraseLines(this.height) + output);
|
322404
|
+
this.extraLinesUnderPrompt = bottomContentHeight;
|
322405
|
+
this.height = height4(output);
|
322406
|
+
}
|
322407
|
+
checkCursorPos() {
|
322408
|
+
const cursorPos = this.rl.getCursorPos();
|
322409
|
+
if (cursorPos.cols !== this.cursorPos.cols) {
|
322410
|
+
this.write(import_ansi_escapes5.default.cursorTo(cursorPos.cols));
|
322411
|
+
this.cursorPos = cursorPos;
|
322412
|
+
}
|
322413
|
+
}
|
322414
|
+
done({ clearContent }) {
|
322415
|
+
this.rl.setPrompt("");
|
322416
|
+
let output = cursorDown4(this.extraLinesUnderPrompt);
|
322417
|
+
output += clearContent ? import_ansi_escapes5.default.eraseLines(this.height) : `
|
322418
|
+
`;
|
322419
|
+
output += import_ansi_escapes5.default.cursorShow;
|
322420
|
+
this.write(output);
|
322421
|
+
this.rl.close();
|
322422
|
+
}
|
322423
|
+
}
|
322424
|
+
|
322425
|
+
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/promise-polyfill.js
|
322426
|
+
class PromisePolyfill4 extends Promise {
|
322427
|
+
static withResolver() {
|
322428
|
+
let resolve6;
|
322429
|
+
let reject;
|
322430
|
+
const promise5 = new Promise((res, rej) => {
|
322431
|
+
resolve6 = res;
|
322432
|
+
reject = rej;
|
322433
|
+
});
|
322434
|
+
return { promise: promise5, resolve: resolve6, reject };
|
322435
|
+
}
|
322436
|
+
}
|
322437
|
+
|
322438
|
+
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
|
322439
|
+
function getCallSites4() {
|
322440
|
+
const _prepareStackTrace = Error.prepareStackTrace;
|
322441
|
+
let result = [];
|
322442
|
+
try {
|
322443
|
+
Error.prepareStackTrace = (_5, callSites) => {
|
322444
|
+
const callSitesWithoutCurrent = callSites.slice(1);
|
322445
|
+
result = callSitesWithoutCurrent;
|
322446
|
+
return callSitesWithoutCurrent;
|
322447
|
+
};
|
322448
|
+
new Error().stack;
|
322449
|
+
} catch {
|
322450
|
+
return result;
|
322451
|
+
}
|
322452
|
+
Error.prepareStackTrace = _prepareStackTrace;
|
322453
|
+
return result;
|
322454
|
+
}
|
322455
|
+
function createPrompt4(view) {
|
322456
|
+
const callSites = getCallSites4();
|
322457
|
+
const prompt = (config5, context = {}) => {
|
322458
|
+
const { input = process.stdin, signal } = context;
|
322459
|
+
const cleanups = new Set;
|
322460
|
+
const output = new import_mute_stream4.default;
|
322461
|
+
output.pipe(context.output ?? process.stdout);
|
322462
|
+
const rl = readline8.createInterface({
|
322463
|
+
terminal: true,
|
322464
|
+
input,
|
322465
|
+
output
|
322466
|
+
});
|
322467
|
+
const screen = new ScreenManager4(rl);
|
322468
|
+
const { promise: promise5, resolve: resolve6, reject } = PromisePolyfill4.withResolver();
|
322469
|
+
const cancel3 = () => reject(new CancelPromptError4);
|
322470
|
+
if (signal) {
|
322471
|
+
const abort = () => reject(new AbortPromptError4({ cause: signal.reason }));
|
322472
|
+
if (signal.aborted) {
|
322473
|
+
abort();
|
322474
|
+
return Object.assign(promise5, { cancel: cancel3 });
|
322475
|
+
}
|
322476
|
+
signal.addEventListener("abort", abort);
|
322477
|
+
cleanups.add(() => signal.removeEventListener("abort", abort));
|
322478
|
+
}
|
322479
|
+
cleanups.add(onExit((code2, signal2) => {
|
322480
|
+
reject(new ExitPromptError4(`User force closed the prompt with ${code2} ${signal2}`));
|
322481
|
+
}));
|
322482
|
+
const sigint = () => reject(new ExitPromptError4(`User force closed the prompt with SIGINT`));
|
322483
|
+
rl.on("SIGINT", sigint);
|
322484
|
+
cleanups.add(() => rl.removeListener("SIGINT", sigint));
|
322485
|
+
const checkCursorPos = () => screen.checkCursorPos();
|
322486
|
+
rl.input.on("keypress", checkCursorPos);
|
322487
|
+
cleanups.add(() => rl.input.removeListener("keypress", checkCursorPos));
|
322488
|
+
return withHooks4(rl, (cycle) => {
|
322489
|
+
const hooksCleanup = AsyncResource12.bind(() => effectScheduler4.clearAll());
|
322490
|
+
rl.on("close", hooksCleanup);
|
322491
|
+
cleanups.add(() => rl.removeListener("close", hooksCleanup));
|
322492
|
+
cycle(() => {
|
322493
|
+
try {
|
322494
|
+
const nextView = view(config5, (value4) => {
|
322495
|
+
setImmediate(() => resolve6(value4));
|
322496
|
+
});
|
322497
|
+
if (nextView === undefined) {
|
322498
|
+
const callerFilename = callSites[1]?.getFileName();
|
322499
|
+
throw new Error(`Prompt functions must return a string.
|
322500
|
+
at ${callerFilename}`);
|
322501
|
+
}
|
322502
|
+
const [content, bottomContent] = typeof nextView === "string" ? [nextView] : nextView;
|
322503
|
+
screen.render(content, bottomContent);
|
322504
|
+
effectScheduler4.run();
|
322505
|
+
} catch (error45) {
|
322506
|
+
reject(error45);
|
322507
|
+
}
|
322508
|
+
});
|
322509
|
+
return Object.assign(promise5.then((answer) => {
|
322510
|
+
effectScheduler4.clearAll();
|
322511
|
+
return answer;
|
322512
|
+
}, (error45) => {
|
322513
|
+
effectScheduler4.clearAll();
|
322514
|
+
throw error45;
|
322515
|
+
}).finally(() => {
|
322516
|
+
cleanups.forEach((cleanup) => cleanup());
|
322517
|
+
screen.done({ clearContent: Boolean(context.clearPromptOnDone) });
|
322518
|
+
output.end();
|
322519
|
+
}).then(() => promise5), { cancel: cancel3 });
|
322520
|
+
});
|
322521
|
+
};
|
322522
|
+
return prompt;
|
322523
|
+
}
|
320845
322524
|
// ../../node_modules/@inquirer/password/dist/esm/index.js
|
320846
|
-
var
|
320847
|
-
var
|
322525
|
+
var import_ansi_escapes6 = __toESM(require_ansi_escapes(), 1);
|
322526
|
+
var esm_default6 = createPrompt4((config5, done) => {
|
320848
322527
|
const { validate: validate5 = () => true } = config5;
|
320849
|
-
const theme =
|
320850
|
-
const [status, setStatus] =
|
320851
|
-
const [errorMsg, setError] =
|
320852
|
-
const [value4, setValue] =
|
320853
|
-
const prefix =
|
320854
|
-
|
322528
|
+
const theme = makeTheme4(config5.theme);
|
322529
|
+
const [status, setStatus] = useState4("idle");
|
322530
|
+
const [errorMsg, setError] = useState4();
|
322531
|
+
const [value4, setValue] = useState4("");
|
322532
|
+
const prefix = usePrefix4({ status, theme });
|
322533
|
+
useKeypress4(async (key5, rl) => {
|
320855
322534
|
if (status !== "idle") {
|
320856
322535
|
return;
|
320857
322536
|
}
|
320858
|
-
if (
|
322537
|
+
if (isEnterKey4(key5)) {
|
320859
322538
|
const answer = value4;
|
320860
322539
|
setStatus("loading");
|
320861
322540
|
const isValid = await validate5(answer);
|
@@ -320880,7 +322559,7 @@ var esm_default5 = createPrompt((config5, done) => {
|
|
320880
322559
|
const maskChar = typeof config5.mask === "string" ? config5.mask : "*";
|
320881
322560
|
formattedValue = maskChar.repeat(value4.length);
|
320882
322561
|
} else if (status !== "done") {
|
320883
|
-
helpTip = `${theme.style.help("[input is masked]")}${
|
322562
|
+
helpTip = `${theme.style.help("[input is masked]")}${import_ansi_escapes6.default.cursorHide}`;
|
320884
322563
|
}
|
320885
322564
|
if (status === "done") {
|
320886
322565
|
formattedValue = theme.style.answer(formattedValue);
|
@@ -320902,7 +322581,7 @@ async function applicationAccessTokenPrompt(env2, application, settlemint, accep
|
|
320902
322581
|
return defaultAccessToken;
|
320903
322582
|
}
|
320904
322583
|
if (defaultAccessToken) {
|
320905
|
-
const keep = await
|
322584
|
+
const keep = await esm_default5({
|
320906
322585
|
message: "Do you want to use the existing application access token?",
|
320907
322586
|
default: true
|
320908
322587
|
});
|
@@ -320910,12 +322589,12 @@ async function applicationAccessTokenPrompt(env2, application, settlemint, accep
|
|
320910
322589
|
return defaultAccessToken;
|
320911
322590
|
}
|
320912
322591
|
}
|
320913
|
-
const create2 = await
|
322592
|
+
const create2 = await esm_default5({
|
320914
322593
|
message: "Do you want to create a new application access token?",
|
320915
322594
|
default: false
|
320916
322595
|
});
|
320917
322596
|
if (create2) {
|
320918
|
-
const name3 = await
|
322597
|
+
const name3 = await esm_default3({
|
320919
322598
|
message: "How would you like to name this application access token?",
|
320920
322599
|
default: `SettleMint CLI (${Date.now()}${process.env.USER ? ` ${process.env.USER}` : ""})`,
|
320921
322600
|
required: true,
|
@@ -320978,7 +322657,7 @@ async function applicationAccessTokenPrompt(env2, application, settlemint, accep
|
|
320978
322657
|
return aat;
|
320979
322658
|
} catch (_error) {}
|
320980
322659
|
}
|
320981
|
-
return
|
322660
|
+
return esm_default6({
|
320982
322661
|
message: "What is the application access token for your application in SettleMint? (format: sm_aat_...)",
|
320983
322662
|
validate(value4) {
|
320984
322663
|
try {
|
@@ -321010,7 +322689,7 @@ async function applicationPrompt(env2, applications, accept) {
|
|
321010
322689
|
if (is_in_ci_default) {
|
321011
322690
|
nothingSelectedError("application");
|
321012
322691
|
}
|
321013
|
-
const application = await
|
322692
|
+
const application = await esm_default4({
|
321014
322693
|
message: "Which application do you want to connect to?",
|
321015
322694
|
choices: applications.map((applications2) => ({
|
321016
322695
|
name: `${applications2.name} (${applications2.uniqueName})`,
|
@@ -321123,7 +322802,7 @@ async function blockchainNodePrompt({
|
|
321123
322802
|
}
|
321124
322803
|
return item;
|
321125
322804
|
}) : choices;
|
321126
|
-
return
|
322805
|
+
return esm_default4({
|
321127
322806
|
message: promptMessage ?? "Which blockchain node do you want to connect to?",
|
321128
322807
|
choices: filteredChoices,
|
321129
322808
|
default: defaultNode
|
@@ -321153,7 +322832,7 @@ async function blockchainNodeOrLoadBalancerPrompt({
|
|
321153
322832
|
isRequired,
|
321154
322833
|
defaultHandler: async ({ defaultService: defaultNode, choices }) => {
|
321155
322834
|
const filteredChoices = filterRunningOnly ? choices.filter(({ value: node }) => isRunning(node)) : choices;
|
321156
|
-
return
|
322835
|
+
return esm_default4({
|
321157
322836
|
message: promptMessage ?? "Which blockchain node or load balancer do you want to connect to?",
|
321158
322837
|
choices: filteredChoices,
|
321159
322838
|
default: defaultNode
|
@@ -321178,7 +322857,7 @@ async function blockscoutPrompt({
|
|
321178
322857
|
envKey: "SETTLEMINT_BLOCKSCOUT",
|
321179
322858
|
isRequired,
|
321180
322859
|
defaultHandler: async ({ defaultService: defaultBlockscout, choices }) => {
|
321181
|
-
return
|
322860
|
+
return esm_default4({
|
321182
322861
|
message: "Which blockscout instance do you want to connect to?",
|
321183
322862
|
choices,
|
321184
322863
|
default: defaultBlockscout
|
@@ -321201,7 +322880,7 @@ async function customDeploymentPrompt({
|
|
321201
322880
|
envKey: "SETTLEMINT_CUSTOM_DEPLOYMENT",
|
321202
322881
|
isRequired,
|
321203
322882
|
defaultHandler: async ({ defaultService: defaultCustomDeployment, choices }) => {
|
321204
|
-
return
|
322883
|
+
return esm_default4({
|
321205
322884
|
message: "Which Custom Deployment do you want to connect to?",
|
321206
322885
|
choices,
|
321207
322886
|
default: defaultCustomDeployment
|
@@ -321228,7 +322907,7 @@ async function hasuraPrompt({
|
|
321228
322907
|
envKey: "SETTLEMINT_HASURA",
|
321229
322908
|
isRequired,
|
321230
322909
|
defaultHandler: async ({ defaultService: defaultHasura, choices }) => {
|
321231
|
-
return
|
322910
|
+
return esm_default4({
|
321232
322911
|
message: "Which Hasura instance do you want to connect to?",
|
321233
322912
|
choices,
|
321234
322913
|
default: defaultHasura
|
@@ -321252,7 +322931,7 @@ async function hdPrivateKeyPrompt({
|
|
321252
322931
|
envKey: "SETTLEMINT_HD_PRIVATE_KEY",
|
321253
322932
|
isRequired,
|
321254
322933
|
defaultHandler: async ({ defaultService: defaultPrivateKey, choices }) => {
|
321255
|
-
return
|
322934
|
+
return esm_default4({
|
321256
322935
|
message: "Which HD Private Key do you want to use?",
|
321257
322936
|
choices,
|
321258
322937
|
default: defaultPrivateKey
|
@@ -321276,7 +322955,7 @@ async function ipfsPrompt({
|
|
321276
322955
|
envKey: "SETTLEMINT_IPFS",
|
321277
322956
|
isRequired,
|
321278
322957
|
defaultHandler: async ({ defaultService: defaultStorage, choices }) => {
|
321279
|
-
return
|
322958
|
+
return esm_default4({
|
321280
322959
|
message: "Which IPFS instance do you want to connect to?",
|
321281
322960
|
choices,
|
321282
322961
|
default: defaultStorage
|
@@ -321300,7 +322979,7 @@ async function minioPrompt({
|
|
321300
322979
|
envKey: "SETTLEMINT_MINIO",
|
321301
322980
|
isRequired,
|
321302
322981
|
defaultHandler: async ({ defaultService: defaultStorage, choices }) => {
|
321303
|
-
return
|
322982
|
+
return esm_default4({
|
321304
322983
|
message: "Which MinIO instance do you want to connect to?",
|
321305
322984
|
choices,
|
321306
322985
|
default: defaultStorage
|
@@ -321324,7 +323003,7 @@ async function portalPrompt({
|
|
321324
323003
|
envKey: "SETTLEMINT_PORTAL",
|
321325
323004
|
isRequired,
|
321326
323005
|
defaultHandler: async ({ defaultService: defaultMiddleware, choices }) => {
|
321327
|
-
return
|
323006
|
+
return esm_default4({
|
321328
323007
|
message: "Which Smart Contract Portal instance do you want to connect to?",
|
321329
323008
|
choices,
|
321330
323009
|
default: defaultMiddleware
|
@@ -321353,7 +323032,7 @@ async function theGraphPrompt({
|
|
321353
323032
|
isRequired,
|
321354
323033
|
defaultHandler: async ({ defaultService: defaultMiddleware, choices }) => {
|
321355
323034
|
const filteredChoices = filterRunningOnly ? choices.filter(({ value: middleware }) => isRunning(middleware)) : choices;
|
321356
|
-
return
|
323035
|
+
return esm_default4({
|
321357
323036
|
message: "Which The Graph instance do you want to connect to?",
|
321358
323037
|
choices: filteredChoices,
|
321359
323038
|
default: defaultMiddleware
|
@@ -321381,7 +323060,7 @@ async function instancePrompt({
|
|
321381
323060
|
return sanitizeInstanceUrl(defaultPromptInstance);
|
321382
323061
|
}
|
321383
323062
|
if (freeTextInput) {
|
321384
|
-
const instance = await
|
323063
|
+
const instance = await esm_default3({
|
321385
323064
|
message: "What is the URL of your SettleMint instance?",
|
321386
323065
|
default: defaultPromptInstance,
|
321387
323066
|
required: true,
|
@@ -321400,7 +323079,7 @@ async function instancePrompt({
|
|
321400
323079
|
if (knownInstances.length === 0) {
|
321401
323080
|
note("No instances found. Run `settlemint login` to configure an instance.", "warn");
|
321402
323081
|
}
|
321403
|
-
return
|
323082
|
+
return esm_default4({
|
321404
323083
|
message: "What instance do you want to connect to?",
|
321405
323084
|
choices: [
|
321406
323085
|
...knownInstances.map((instance) => ({
|
@@ -321436,7 +323115,7 @@ async function serviceSecretPrompt({
|
|
321436
323115
|
return defaultSecret;
|
321437
323116
|
}
|
321438
323117
|
if (defaultSecret) {
|
321439
|
-
const keep = await
|
323118
|
+
const keep = await esm_default5({
|
321440
323119
|
message: `Do you want to use the existing ${name3} secret?`,
|
321441
323120
|
default: true
|
321442
323121
|
});
|
@@ -321444,7 +323123,7 @@ async function serviceSecretPrompt({
|
|
321444
323123
|
return defaultSecret;
|
321445
323124
|
}
|
321446
323125
|
}
|
321447
|
-
const serviceSecret = await
|
323126
|
+
const serviceSecret = await esm_default6({
|
321448
323127
|
message
|
321449
323128
|
});
|
321450
323129
|
return serviceSecret || undefined;
|
@@ -321465,7 +323144,7 @@ async function serviceUrlPrompt({
|
|
321465
323144
|
if (isCi) {
|
321466
323145
|
return defaultUrl ? new URL(defaultUrl).toString() : undefined;
|
321467
323146
|
}
|
321468
|
-
const serviceUrl = await
|
323147
|
+
const serviceUrl = await esm_default3({
|
321469
323148
|
message: example ? `${message} (eg ${example})` : message,
|
321470
323149
|
default: defaultUrl,
|
321471
323150
|
required: true,
|
@@ -321496,7 +323175,7 @@ async function workspacePrompt(env2, workspaces, accept) {
|
|
321496
323175
|
if (is_in_ci_default) {
|
321497
323176
|
nothingSelectedError("workspace");
|
321498
323177
|
}
|
321499
|
-
const workspace = await
|
323178
|
+
const workspace = await esm_default4({
|
321500
323179
|
message: "Which workspace do you want to connect to?",
|
321501
323180
|
choices: workspaces.map((workspace2) => ({
|
321502
323181
|
name: `${workspace2.name} (${workspace2.uniqueName})`,
|
@@ -321900,7 +323579,7 @@ async function serviceValuePrompt({
|
|
321900
323579
|
if (isCi) {
|
321901
323580
|
return defaultValue;
|
321902
323581
|
}
|
321903
|
-
const serviceSecret = await
|
323582
|
+
const serviceSecret = await esm_default3({
|
321904
323583
|
message: example ? `${message} (eg ${example})` : message,
|
321905
323584
|
default: defaultValue
|
321906
323585
|
});
|
@@ -322338,7 +324017,7 @@ async function templatePrompt(platformConfig, argument) {
|
|
322338
324017
|
}
|
322339
324018
|
return template2;
|
322340
324019
|
}
|
322341
|
-
const template = await
|
324020
|
+
const template = await esm_default4({
|
322342
324021
|
message: "Which template do you want to use?",
|
322343
324022
|
choices: [
|
322344
324023
|
...kits.map((template2) => ({
|
@@ -322356,7 +324035,7 @@ async function projectNamePrompt(env2, argument) {
|
|
322356
324035
|
if (defaultInstance) {
|
322357
324036
|
return defaultInstance;
|
322358
324037
|
}
|
322359
|
-
return
|
324038
|
+
return esm_default3({
|
322360
324039
|
message: "What is the name of your new SettleMint project?",
|
322361
324040
|
default: defaultInstance,
|
322362
324041
|
required: true,
|
@@ -322558,7 +324237,7 @@ var basename2 = function(p5, extension) {
|
|
322558
324237
|
return extension && lastSegment.endsWith(extension) ? lastSegment.slice(0, -extension.length) : lastSegment;
|
322559
324238
|
};
|
322560
324239
|
// ../../node_modules/defu/dist/defu.mjs
|
322561
|
-
function
|
324240
|
+
function isPlainObject10(value4) {
|
322562
324241
|
if (value4 === null || typeof value4 !== "object") {
|
322563
324242
|
return false;
|
322564
324243
|
}
|
@@ -322575,27 +324254,27 @@ function isPlainObject7(value4) {
|
|
322575
324254
|
return true;
|
322576
324255
|
}
|
322577
324256
|
function _defu(baseObject, defaults4, namespace = ".", merger) {
|
322578
|
-
if (!
|
324257
|
+
if (!isPlainObject10(defaults4)) {
|
322579
324258
|
return _defu(baseObject, {}, namespace, merger);
|
322580
324259
|
}
|
322581
324260
|
const object5 = Object.assign({}, defaults4);
|
322582
|
-
for (const
|
322583
|
-
if (
|
324261
|
+
for (const key5 in baseObject) {
|
324262
|
+
if (key5 === "__proto__" || key5 === "constructor") {
|
322584
324263
|
continue;
|
322585
324264
|
}
|
322586
|
-
const value4 = baseObject[
|
324265
|
+
const value4 = baseObject[key5];
|
322587
324266
|
if (value4 === null || value4 === undefined) {
|
322588
324267
|
continue;
|
322589
324268
|
}
|
322590
|
-
if (merger && merger(object5,
|
324269
|
+
if (merger && merger(object5, key5, value4, namespace)) {
|
322591
324270
|
continue;
|
322592
324271
|
}
|
322593
|
-
if (Array.isArray(value4) && Array.isArray(object5[
|
322594
|
-
object5[
|
322595
|
-
} else if (
|
322596
|
-
object5[
|
324272
|
+
if (Array.isArray(value4) && Array.isArray(object5[key5])) {
|
324273
|
+
object5[key5] = [...value4, ...object5[key5]];
|
324274
|
+
} else if (isPlainObject10(value4) && isPlainObject10(object5[key5])) {
|
324275
|
+
object5[key5] = _defu(value4, object5[key5], (namespace ? `${namespace}.` : "") + key5.toString(), merger);
|
322597
324276
|
} else {
|
322598
|
-
object5[
|
324277
|
+
object5[key5] = value4;
|
322599
324278
|
}
|
322600
324279
|
}
|
322601
324280
|
return object5;
|
@@ -322604,15 +324283,15 @@ function createDefu(merger) {
|
|
322604
324283
|
return (...arguments_4) => arguments_4.reduce((p5, c3) => _defu(p5, c3, "", merger), {});
|
322605
324284
|
}
|
322606
324285
|
var defu = createDefu();
|
322607
|
-
var defuFn = createDefu((object5,
|
322608
|
-
if (object5[
|
322609
|
-
object5[
|
324286
|
+
var defuFn = createDefu((object5, key5, currentValue) => {
|
324287
|
+
if (object5[key5] !== undefined && typeof currentValue === "function") {
|
324288
|
+
object5[key5] = currentValue(object5[key5]);
|
322610
324289
|
return true;
|
322611
324290
|
}
|
322612
324291
|
});
|
322613
|
-
var defuArrayFn = createDefu((object5,
|
322614
|
-
if (Array.isArray(object5[
|
322615
|
-
object5[
|
324292
|
+
var defuArrayFn = createDefu((object5, key5, currentValue) => {
|
324293
|
+
if (Array.isArray(object5[key5]) && typeof currentValue === "function") {
|
324294
|
+
object5[key5] = currentValue(object5[key5]);
|
322616
324295
|
return true;
|
322617
324296
|
}
|
322618
324297
|
});
|
@@ -325822,11 +327501,11 @@ function cacheDirectory() {
|
|
325822
327501
|
}
|
325823
327502
|
function normalizeHeaders(headers = {}) {
|
325824
327503
|
const normalized = {};
|
325825
|
-
for (const [
|
327504
|
+
for (const [key5, value4] of Object.entries(headers)) {
|
325826
327505
|
if (!value4) {
|
325827
327506
|
continue;
|
325828
327507
|
}
|
325829
|
-
normalized[
|
327508
|
+
normalized[key5.toLowerCase()] = value4;
|
325830
327509
|
}
|
325831
327510
|
return normalized;
|
325832
327511
|
}
|
@@ -326124,7 +327803,7 @@ function createCommand2() {
|
|
326124
327803
|
await mkdir6(projectDir, { recursive: true });
|
326125
327804
|
}
|
326126
327805
|
if (!await isEmpty(projectDir)) {
|
326127
|
-
const confirmEmpty = await
|
327806
|
+
const confirmEmpty = await esm_default5({
|
326128
327807
|
message: `The folder ${projectDir} already exists. Do you want to empty it?`,
|
326129
327808
|
default: false
|
326130
327809
|
});
|
@@ -326377,7 +328056,7 @@ async function personalAccessTokenPrompt(env2, instance, accept) {
|
|
326377
328056
|
return defaultPersonalAccessToken;
|
326378
328057
|
}
|
326379
328058
|
if (existingConfig && defaultPersonalAccessToken) {
|
326380
|
-
const useExisting = await
|
328059
|
+
const useExisting = await esm_default5({
|
326381
328060
|
message: `Do you want to use your existing personal access token for ${instance}?`,
|
326382
328061
|
default: true
|
326383
328062
|
});
|
@@ -326385,7 +328064,7 @@ async function personalAccessTokenPrompt(env2, instance, accept) {
|
|
326385
328064
|
return defaultPersonalAccessToken;
|
326386
328065
|
}
|
326387
328066
|
}
|
326388
|
-
return
|
328067
|
+
return esm_default6({
|
326389
328068
|
message: "What is your personal access token in SettleMint? (format: sm_pat_...)",
|
326390
328069
|
validate(value4) {
|
326391
328070
|
try {
|
@@ -326511,7 +328190,7 @@ function logoutCommand() {
|
|
326511
328190
|
}
|
326512
328191
|
const env2 = await loadEnv(false, false);
|
326513
328192
|
const defaultInstance = env2.SETTLEMINT_INSTANCE;
|
326514
|
-
const instance = await
|
328193
|
+
const instance = await esm_default4({
|
326515
328194
|
message: "Select the instance to logout from:",
|
326516
328195
|
choices: instances.map((instance2) => ({
|
326517
328196
|
value: instance2,
|
@@ -326532,7 +328211,7 @@ async function pincodeVerificationPrompt(verificationChallenges) {
|
|
326532
328211
|
if (verificationChallenges.length === 1) {
|
326533
328212
|
return verificationChallenges[0];
|
326534
328213
|
}
|
326535
|
-
const verificationChallenge = await
|
328214
|
+
const verificationChallenge = await esm_default4({
|
326536
328215
|
message: "Which pincode verification do you want to use?",
|
326537
328216
|
choices: verificationChallenges.map((verificationChallenge2) => ({
|
326538
328217
|
name: verificationChallenge2.name,
|
@@ -326596,7 +328275,7 @@ function pincodeVerificationResponseCommand() {
|
|
326596
328275
|
nodeId: selectedBlockchainNode.id
|
326597
328276
|
});
|
326598
328277
|
const verificationChallenge = await pincodeVerificationPrompt(pincodeVerificationChallenges);
|
326599
|
-
const pincode = await
|
328278
|
+
const pincode = await esm_default6({
|
326600
328279
|
message: "Enter your pincode",
|
326601
328280
|
validate(value4) {
|
326602
328281
|
if (!value4.trim()) {
|
@@ -326749,7 +328428,7 @@ async function providerPrompt(platformConfig, argument) {
|
|
326749
328428
|
if (possibleProviders.length === 1) {
|
326750
328429
|
return possibleProviders[0];
|
326751
328430
|
}
|
326752
|
-
const provider = await
|
328431
|
+
const provider = await esm_default4({
|
326753
328432
|
message: "Which provider do you want to use?",
|
326754
328433
|
choices: platformConfig.deploymentEngineTargets.map((target) => ({
|
326755
328434
|
name: target.name,
|
@@ -326780,7 +328459,7 @@ async function regionPrompt(provider, argument) {
|
|
326780
328459
|
if (possibleRegions.length === 1) {
|
326781
328460
|
return possibleRegions[0];
|
326782
328461
|
}
|
326783
|
-
const region = await
|
328462
|
+
const region = await esm_default4({
|
326784
328463
|
message: "Which region do you want to use?",
|
326785
328464
|
choices: provider.clusters.map((cluster) => ({
|
326786
328465
|
name: cluster.name,
|
@@ -327306,7 +328985,7 @@ async function blockchainNetworkPrompt({
|
|
327306
328985
|
envKey: "SETTLEMINT_BLOCKCHAIN_NETWORK",
|
327307
328986
|
isRequired,
|
327308
328987
|
defaultHandler: async ({ defaultService: defaultNetwork, choices }) => {
|
327309
|
-
return
|
328988
|
+
return esm_default4({
|
327310
328989
|
message: "Which blockchain network do you want to connect to?",
|
327311
328990
|
choices,
|
327312
328991
|
default: defaultNetwork
|
@@ -328211,7 +329890,7 @@ function createCommand3() {
|
|
328211
329890
|
|
328212
329891
|
// src/prompts/delete-confirmation.prompt.ts
|
328213
329892
|
async function deleteConfirmationPrompt(itemDescription) {
|
328214
|
-
const confirmation = await
|
329893
|
+
const confirmation = await esm_default3({
|
328215
329894
|
message: `Are you sure you want to delete ${itemDescription}? (yes/no)`,
|
328216
329895
|
required: true,
|
328217
329896
|
validate(value4) {
|
@@ -329071,7 +330750,7 @@ function jsonOutput(data) {
|
|
329071
330750
|
var composer = require_composer();
|
329072
330751
|
var Document = require_Document();
|
329073
330752
|
var Schema = require_Schema();
|
329074
|
-
var
|
330753
|
+
var errors7 = require_errors3();
|
329075
330754
|
var Alias = require_Alias();
|
329076
330755
|
var identity2 = require_identity();
|
329077
330756
|
var Pair = require_Pair();
|
@@ -329087,9 +330766,9 @@ var visit2 = require_visit();
|
|
329087
330766
|
var $Composer = composer.Composer;
|
329088
330767
|
var $Document = Document.Document;
|
329089
330768
|
var $Schema = Schema.Schema;
|
329090
|
-
var $YAMLError =
|
329091
|
-
var $YAMLParseError =
|
329092
|
-
var $YAMLWarning =
|
330769
|
+
var $YAMLError = errors7.YAMLError;
|
330770
|
+
var $YAMLParseError = errors7.YAMLParseError;
|
330771
|
+
var $YAMLWarning = errors7.YAMLWarning;
|
329093
330772
|
var $Alias = Alias.Alias;
|
329094
330773
|
var $isAlias = identity2.isAlias;
|
329095
330774
|
var $isCollection = identity2.isCollection;
|
@@ -329608,7 +331287,7 @@ async function useCasePrompt(platformConfig, argument) {
|
|
329608
331287
|
if (selectableUseCases.length === 1) {
|
329609
331288
|
return selectableUseCases[0];
|
329610
331289
|
}
|
329611
|
-
const useCase = await
|
331290
|
+
const useCase = await esm_default4({
|
329612
331291
|
message: "Which use case do you want to use?",
|
329613
331292
|
choices: selectableUseCases.map((useCase2) => ({
|
329614
331293
|
name: formatUseCaseName(useCase2.name),
|
@@ -329666,7 +331345,7 @@ function createCommand4() {
|
|
329666
331345
|
const targetDir = formatTargetDir(name3);
|
329667
331346
|
const projectDir = join9(process.cwd(), targetDir);
|
329668
331347
|
if (await exists3(projectDir) && !await isEmpty(projectDir)) {
|
329669
|
-
const confirmEmpty = await
|
331348
|
+
const confirmEmpty = await esm_default5({
|
329670
331349
|
message: `The folder ${projectDir} already exists. Do you want to delete it?`,
|
329671
331350
|
default: false
|
329672
331351
|
});
|
@@ -329696,11 +331375,11 @@ function createCommand4() {
|
|
329696
331375
|
|
329697
331376
|
// src/utils/commands/passthrough-options.ts
|
329698
331377
|
function mapPassthroughOptions(options, command) {
|
329699
|
-
const optionArgs = Object.entries(options).map(([
|
331378
|
+
const optionArgs = Object.entries(options).map(([key5, value4]) => {
|
329700
331379
|
if (value4 === true) {
|
329701
|
-
return `--${
|
331380
|
+
return `--${key5}`;
|
329702
331381
|
}
|
329703
|
-
return `--${
|
331382
|
+
return `--${key5}=${value4}`;
|
329704
331383
|
});
|
329705
331384
|
return [...optionArgs, ...command.args];
|
329706
331385
|
}
|
@@ -329956,7 +331635,7 @@ async function addressPrompt({
|
|
329956
331635
|
hardhatConfig
|
329957
331636
|
}) {
|
329958
331637
|
if (!node) {
|
329959
|
-
return
|
331638
|
+
return esm_default3({
|
329960
331639
|
message: "Which private key address do you want to deploy from?",
|
329961
331640
|
validate: (value4) => {
|
329962
331641
|
if (!isAddress(value4)) {
|
@@ -329976,7 +331655,7 @@ async function addressPrompt({
|
|
329976
331655
|
note(`Private key with address '${defaultAddress}' is not activated on the node '${node.uniqueName}'.
|
329977
331656
|
Please select another key or activate this key on the node and try again.`, "warn");
|
329978
331657
|
}
|
329979
|
-
const address = await
|
331658
|
+
const address = await esm_default4({
|
329980
331659
|
message: "Which private key do you want to deploy from?",
|
329981
331660
|
choices: possiblePrivateKeys.map(({ address: address2, name: name3 }) => ({
|
329982
331661
|
name: name3,
|
@@ -330929,4 +332608,4 @@ async function sdkCliCommand(argv = process.argv) {
|
|
330929
332608
|
// src/cli.ts
|
330930
332609
|
sdkCliCommand();
|
330931
332610
|
|
330932
|
-
//# debugId=
|
332611
|
+
//# debugId=B4C5B6E3373BFF1764756E2164756E21
|