@settlemint/sdk-cli 2.5.1-main65aae34c → 2.5.1-main7aee004f
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 +586 -1322
- package/dist/cli.js.map +7 -22
- 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 colors3 = 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(colors3.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 ? colors3.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 colors3 = 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(colors3.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(" " + colors3.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 colors3 = 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 = colors3.blueBackground("".padStart(tsIconLength));
|
161974
|
+
const tsIconSecondLine = colors3.blueBackground(colors3.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;
|
@@ -232832,16 +232832,16 @@ var init_lru = __esm(() => {
|
|
232832
232832
|
});
|
232833
232833
|
this.maxSize = size2;
|
232834
232834
|
}
|
232835
|
-
get(
|
232836
|
-
const value4 = super.get(
|
232837
|
-
if (super.has(
|
232838
|
-
this.delete(
|
232839
|
-
super.set(
|
232835
|
+
get(key2) {
|
232836
|
+
const value4 = super.get(key2);
|
232837
|
+
if (super.has(key2) && value4 !== undefined) {
|
232838
|
+
this.delete(key2);
|
232839
|
+
super.set(key2, value4);
|
232840
232840
|
}
|
232841
232841
|
return value4;
|
232842
232842
|
}
|
232843
|
-
set(
|
232844
|
-
super.set(
|
232843
|
+
set(key2, value4) {
|
232844
|
+
super.set(key2, value4);
|
232845
232845
|
if (this.maxSize && this.size > this.maxSize) {
|
232846
232846
|
const firstKey = this.keys().next().value;
|
232847
232847
|
if (firstKey)
|
@@ -233883,9 +233883,9 @@ var init_decodeErrorResult = __esm(() => {
|
|
233883
233883
|
});
|
233884
233884
|
|
233885
233885
|
// ../../node_modules/viem/_esm/utils/stringify.js
|
233886
|
-
var stringify3 = (value4, replacer, space) => JSON.stringify(value4, (
|
233886
|
+
var stringify3 = (value4, replacer, space) => JSON.stringify(value4, (key2, value_) => {
|
233887
233887
|
const value5 = typeof value_ === "bigint" ? value_.toString() : value_;
|
233888
|
-
return typeof replacer === "function" ? replacer(
|
233888
|
+
return typeof replacer === "function" ? replacer(key2, value5) : value5;
|
233889
233889
|
}, space);
|
233890
233890
|
|
233891
233891
|
// ../../node_modules/viem/_esm/utils/abi/formatAbiItemWithArgs.js
|
@@ -233999,13 +233999,13 @@ var init_stateOverride = __esm(() => {
|
|
233999
233999
|
|
234000
234000
|
// ../../node_modules/viem/_esm/errors/transaction.js
|
234001
234001
|
function prettyPrint(args) {
|
234002
|
-
const entries = Object.entries(args).map(([
|
234002
|
+
const entries = Object.entries(args).map(([key2, value4]) => {
|
234003
234003
|
if (value4 === undefined || value4 === false)
|
234004
234004
|
return null;
|
234005
|
-
return [
|
234005
|
+
return [key2, value4];
|
234006
234006
|
}).filter(Boolean);
|
234007
|
-
const maxLength = entries.reduce((acc, [
|
234008
|
-
return entries.map(([
|
234007
|
+
const maxLength = entries.reduce((acc, [key2]) => Math.max(acc, key2.length), 0);
|
234008
|
+
return entries.map(([key2, value4]) => ` ${`${key2}:`.padEnd(maxLength + 1)} ${value4}`).join(`
|
234009
234009
|
`);
|
234010
234010
|
}
|
234011
234011
|
var FeeConflictError, InvalidSerializableTransactionError, TransactionNotFoundError, TransactionReceiptNotFoundError, WaitForTransactionReceiptTimeoutError;
|
@@ -235111,7 +235111,7 @@ var init_sha2 = __esm(() => {
|
|
235111
235111
|
});
|
235112
235112
|
|
235113
235113
|
// ../../node_modules/@noble/hashes/esm/hmac.js
|
235114
|
-
var HMAC, hmac = (hash2,
|
235114
|
+
var HMAC, hmac = (hash2, key2, message) => new HMAC(hash2, key2).update(message).digest();
|
235115
235115
|
var init_hmac = __esm(() => {
|
235116
235116
|
init_utils2();
|
235117
235117
|
HMAC = class HMAC extends Hash {
|
@@ -235120,7 +235120,7 @@ var init_hmac = __esm(() => {
|
|
235120
235120
|
this.finished = false;
|
235121
235121
|
this.destroyed = false;
|
235122
235122
|
ahash(hash2);
|
235123
|
-
const
|
235123
|
+
const key2 = toBytes2(_key);
|
235124
235124
|
this.iHash = hash2.create();
|
235125
235125
|
if (typeof this.iHash.update !== "function")
|
235126
235126
|
throw new Error("Expected instance of class which extends utils.Hash");
|
@@ -235128,7 +235128,7 @@ var init_hmac = __esm(() => {
|
|
235128
235128
|
this.outputLen = this.iHash.outputLen;
|
235129
235129
|
const blockLen = this.blockLen;
|
235130
235130
|
const pad2 = new Uint8Array(blockLen);
|
235131
|
-
pad2.set(
|
235131
|
+
pad2.set(key2.length > blockLen ? hash2.create().update(key2).digest() : key2);
|
235132
235132
|
for (let i6 = 0;i6 < pad2.length; i6++)
|
235133
235133
|
pad2[i6] ^= 54;
|
235134
235134
|
this.iHash.update(pad2);
|
@@ -235178,7 +235178,7 @@ var init_hmac = __esm(() => {
|
|
235178
235178
|
this.iHash.destroy();
|
235179
235179
|
}
|
235180
235180
|
};
|
235181
|
-
hmac.create = (hash2,
|
235181
|
+
hmac.create = (hash2, key2) => new HMAC(hash2, key2);
|
235182
235182
|
});
|
235183
235183
|
|
235184
235184
|
// ../../node_modules/@noble/curves/esm/utils.js
|
@@ -235579,13 +235579,13 @@ function getMinHashLength(fieldOrder) {
|
|
235579
235579
|
const length = getFieldBytesLength(fieldOrder);
|
235580
235580
|
return length + Math.ceil(length / 2);
|
235581
235581
|
}
|
235582
|
-
function mapHashToField(
|
235583
|
-
const len =
|
235582
|
+
function mapHashToField(key2, fieldOrder, isLE2 = false) {
|
235583
|
+
const len = key2.length;
|
235584
235584
|
const fieldLen = getFieldBytesLength(fieldOrder);
|
235585
235585
|
const minLen = getMinHashLength(fieldOrder);
|
235586
235586
|
if (len < 16 || len < minLen || len > 1024)
|
235587
235587
|
throw new Error("expected " + minLen + "-1024 bytes of input, got " + len);
|
235588
|
-
const num = isLE2 ? bytesToNumberLE(
|
235588
|
+
const num = isLE2 ? bytesToNumberLE(key2) : bytesToNumberBE(key2);
|
235589
235589
|
const reduced = mod(num, fieldOrder - _1n3) + _1n3;
|
235590
235590
|
return isLE2 ? numberToBytesLE(reduced, fieldLen) : numberToBytesBE(reduced, fieldLen);
|
235591
235591
|
}
|
@@ -235888,12 +235888,12 @@ function _legacyHelperEquat(Fp, a7, b4) {
|
|
235888
235888
|
}
|
235889
235889
|
function _legacyHelperNormPriv(Fn, allowedPrivateKeyLengths, wrapPrivateKey) {
|
235890
235890
|
const { BYTES: expected } = Fn;
|
235891
|
-
function normPrivateKeyToScalar(
|
235891
|
+
function normPrivateKeyToScalar(key2) {
|
235892
235892
|
let num;
|
235893
|
-
if (typeof
|
235894
|
-
num =
|
235893
|
+
if (typeof key2 === "bigint") {
|
235894
|
+
num = key2;
|
235895
235895
|
} else {
|
235896
|
-
let bytes = ensureBytes("private key",
|
235896
|
+
let bytes = ensureBytes("private key", key2);
|
235897
235897
|
if (allowedPrivateKeyLengths) {
|
235898
235898
|
if (!allowedPrivateKeyLengths.includes(bytes.length * 2))
|
235899
235899
|
throw new Error("invalid private key");
|
@@ -235904,7 +235904,7 @@ function _legacyHelperNormPriv(Fn, allowedPrivateKeyLengths, wrapPrivateKey) {
|
|
235904
235904
|
try {
|
235905
235905
|
num = Fn.fromBytes(bytes);
|
235906
235906
|
} catch (error44) {
|
235907
|
-
throw new Error(`invalid private key: expected ui8a of size ${expected}, got ${typeof
|
235907
|
+
throw new Error(`invalid private key: expected ui8a of size ${expected}, got ${typeof key2}`);
|
235908
235908
|
}
|
235909
235909
|
}
|
235910
235910
|
if (wrapPrivateKey)
|
@@ -236306,7 +236306,7 @@ function ecdsa(Point, ecdsaOpts, curveOpts = {}) {
|
|
236306
236306
|
bits2int_modN: "function"
|
236307
236307
|
});
|
236308
236308
|
const randomBytes_ = ecdsaOpts.randomBytes || randomBytes;
|
236309
|
-
const hmac_ = ecdsaOpts.hmac || ((
|
236309
|
+
const hmac_ = ecdsaOpts.hmac || ((key2, ...msgs) => hmac(ecdsaOpts.hash, key2, concatBytes(...msgs)));
|
236310
236310
|
const { Fp, Fn } = Point;
|
236311
236311
|
const { ORDER: CURVE_ORDER, BITS: fnBits } = Fn;
|
236312
236312
|
function isBiggerThanHalfOrder(number6) {
|
@@ -237464,11 +237464,11 @@ function extract2(value_, { format: format2 }) {
|
|
237464
237464
|
const value4 = {};
|
237465
237465
|
function extract_(formatted2) {
|
237466
237466
|
const keys = Object.keys(formatted2);
|
237467
|
-
for (const
|
237468
|
-
if (
|
237469
|
-
value4[
|
237470
|
-
if (formatted2[
|
237471
|
-
extract_(formatted2[
|
237467
|
+
for (const key2 of keys) {
|
237468
|
+
if (key2 in value_)
|
237469
|
+
value4[key2] = value_[key2];
|
237470
|
+
if (formatted2[key2] && typeof formatted2[key2] === "object" && !Array.isArray(formatted2[key2]))
|
237471
|
+
extract_(formatted2[key2]);
|
237472
237472
|
}
|
237473
237473
|
}
|
237474
237474
|
const formatted = format2(value_ || {});
|
@@ -237872,9 +237872,9 @@ var init_Errors = __esm(() => {
|
|
237872
237872
|
|
237873
237873
|
// ../../node_modules/ox/_esm/core/Json.js
|
237874
237874
|
function stringify4(value4, replacer, space) {
|
237875
|
-
return JSON.stringify(value4, (
|
237875
|
+
return JSON.stringify(value4, (key2, value5) => {
|
237876
237876
|
if (typeof replacer === "function")
|
237877
|
-
return replacer(
|
237877
|
+
return replacer(key2, value5);
|
237878
237878
|
if (typeof value5 === "bigint")
|
237879
237879
|
return value5.toString() + bigIntSuffix;
|
237880
237880
|
return value5;
|
@@ -239297,11 +239297,11 @@ var require_visit = __commonJS((exports) => {
|
|
239297
239297
|
visit2.BREAK = BREAK;
|
239298
239298
|
visit2.SKIP = SKIP;
|
239299
239299
|
visit2.REMOVE = REMOVE;
|
239300
|
-
function visit_(
|
239301
|
-
const ctrl = callVisitor(
|
239300
|
+
function visit_(key2, node, visitor, path7) {
|
239301
|
+
const ctrl = callVisitor(key2, node, visitor, path7);
|
239302
239302
|
if (identity2.isNode(ctrl) || identity2.isPair(ctrl)) {
|
239303
|
-
replaceNode(
|
239304
|
-
return visit_(
|
239303
|
+
replaceNode(key2, path7, ctrl);
|
239304
|
+
return visit_(key2, ctrl, visitor, path7);
|
239305
239305
|
}
|
239306
239306
|
if (typeof ctrl !== "symbol") {
|
239307
239307
|
if (identity2.isCollection(node)) {
|
@@ -239345,11 +239345,11 @@ var require_visit = __commonJS((exports) => {
|
|
239345
239345
|
visitAsync.BREAK = BREAK;
|
239346
239346
|
visitAsync.SKIP = SKIP;
|
239347
239347
|
visitAsync.REMOVE = REMOVE;
|
239348
|
-
async function visitAsync_(
|
239349
|
-
const ctrl = await callVisitor(
|
239348
|
+
async function visitAsync_(key2, node, visitor, path7) {
|
239349
|
+
const ctrl = await callVisitor(key2, node, visitor, path7);
|
239350
239350
|
if (identity2.isNode(ctrl) || identity2.isPair(ctrl)) {
|
239351
|
-
replaceNode(
|
239352
|
-
return visitAsync_(
|
239351
|
+
replaceNode(key2, path7, ctrl);
|
239352
|
+
return visitAsync_(key2, ctrl, visitor, path7);
|
239353
239353
|
}
|
239354
239354
|
if (typeof ctrl !== "symbol") {
|
239355
239355
|
if (identity2.isCollection(node)) {
|
@@ -239399,27 +239399,27 @@ var require_visit = __commonJS((exports) => {
|
|
239399
239399
|
}
|
239400
239400
|
return visitor;
|
239401
239401
|
}
|
239402
|
-
function callVisitor(
|
239402
|
+
function callVisitor(key2, node, visitor, path7) {
|
239403
239403
|
if (typeof visitor === "function")
|
239404
|
-
return visitor(
|
239404
|
+
return visitor(key2, node, path7);
|
239405
239405
|
if (identity2.isMap(node))
|
239406
|
-
return visitor.Map?.(
|
239406
|
+
return visitor.Map?.(key2, node, path7);
|
239407
239407
|
if (identity2.isSeq(node))
|
239408
|
-
return visitor.Seq?.(
|
239408
|
+
return visitor.Seq?.(key2, node, path7);
|
239409
239409
|
if (identity2.isPair(node))
|
239410
|
-
return visitor.Pair?.(
|
239410
|
+
return visitor.Pair?.(key2, node, path7);
|
239411
239411
|
if (identity2.isScalar(node))
|
239412
|
-
return visitor.Scalar?.(
|
239412
|
+
return visitor.Scalar?.(key2, node, path7);
|
239413
239413
|
if (identity2.isAlias(node))
|
239414
|
-
return visitor.Alias?.(
|
239414
|
+
return visitor.Alias?.(key2, node, path7);
|
239415
239415
|
return;
|
239416
239416
|
}
|
239417
|
-
function replaceNode(
|
239417
|
+
function replaceNode(key2, path7, node) {
|
239418
239418
|
const parent = path7[path7.length - 1];
|
239419
239419
|
if (identity2.isCollection(parent)) {
|
239420
|
-
parent.items[
|
239420
|
+
parent.items[key2] = node;
|
239421
239421
|
} else if (identity2.isPair(parent)) {
|
239422
|
-
if (
|
239422
|
+
if (key2 === "key")
|
239423
239423
|
parent.key = node;
|
239424
239424
|
else
|
239425
239425
|
parent.value = node;
|
@@ -239650,7 +239650,7 @@ var require_anchors = __commonJS((exports) => {
|
|
239650
239650
|
|
239651
239651
|
// ../../node_modules/yaml/dist/doc/applyReviver.js
|
239652
239652
|
var require_applyReviver = __commonJS((exports) => {
|
239653
|
-
function applyReviver(reviver, obj,
|
239653
|
+
function applyReviver(reviver, obj, key2, val) {
|
239654
239654
|
if (val && typeof val === "object") {
|
239655
239655
|
if (Array.isArray(val)) {
|
239656
239656
|
for (let i7 = 0, len = val.length;i7 < len; ++i7) {
|
@@ -239690,7 +239690,7 @@ var require_applyReviver = __commonJS((exports) => {
|
|
239690
239690
|
}
|
239691
239691
|
}
|
239692
239692
|
}
|
239693
|
-
return reviver.call(obj,
|
239693
|
+
return reviver.call(obj, key2, val);
|
239694
239694
|
}
|
239695
239695
|
exports.applyReviver = applyReviver;
|
239696
239696
|
});
|
@@ -240019,29 +240019,29 @@ var require_Collection = __commonJS((exports) => {
|
|
240019
240019
|
if (isEmptyPath(path7))
|
240020
240020
|
this.add(value4);
|
240021
240021
|
else {
|
240022
|
-
const [
|
240023
|
-
const node = this.get(
|
240022
|
+
const [key2, ...rest] = path7;
|
240023
|
+
const node = this.get(key2, true);
|
240024
240024
|
if (identity2.isCollection(node))
|
240025
240025
|
node.addIn(rest, value4);
|
240026
240026
|
else if (node === undefined && this.schema)
|
240027
|
-
this.set(
|
240027
|
+
this.set(key2, collectionFromPath(this.schema, rest, value4));
|
240028
240028
|
else
|
240029
|
-
throw new Error(`Expected YAML collection at ${
|
240029
|
+
throw new Error(`Expected YAML collection at ${key2}. Remaining path: ${rest}`);
|
240030
240030
|
}
|
240031
240031
|
}
|
240032
240032
|
deleteIn(path7) {
|
240033
|
-
const [
|
240033
|
+
const [key2, ...rest] = path7;
|
240034
240034
|
if (rest.length === 0)
|
240035
|
-
return this.delete(
|
240036
|
-
const node = this.get(
|
240035
|
+
return this.delete(key2);
|
240036
|
+
const node = this.get(key2, true);
|
240037
240037
|
if (identity2.isCollection(node))
|
240038
240038
|
return node.deleteIn(rest);
|
240039
240039
|
else
|
240040
|
-
throw new Error(`Expected YAML collection at ${
|
240040
|
+
throw new Error(`Expected YAML collection at ${key2}. Remaining path: ${rest}`);
|
240041
240041
|
}
|
240042
240042
|
getIn(path7, keepScalar) {
|
240043
|
-
const [
|
240044
|
-
const node = this.get(
|
240043
|
+
const [key2, ...rest] = path7;
|
240044
|
+
const node = this.get(key2, true);
|
240045
240045
|
if (rest.length === 0)
|
240046
240046
|
return !keepScalar && identity2.isScalar(node) ? node.value : node;
|
240047
240047
|
else
|
@@ -240056,24 +240056,24 @@ var require_Collection = __commonJS((exports) => {
|
|
240056
240056
|
});
|
240057
240057
|
}
|
240058
240058
|
hasIn(path7) {
|
240059
|
-
const [
|
240059
|
+
const [key2, ...rest] = path7;
|
240060
240060
|
if (rest.length === 0)
|
240061
|
-
return this.has(
|
240062
|
-
const node = this.get(
|
240061
|
+
return this.has(key2);
|
240062
|
+
const node = this.get(key2, true);
|
240063
240063
|
return identity2.isCollection(node) ? node.hasIn(rest) : false;
|
240064
240064
|
}
|
240065
240065
|
setIn(path7, value4) {
|
240066
|
-
const [
|
240066
|
+
const [key2, ...rest] = path7;
|
240067
240067
|
if (rest.length === 0) {
|
240068
|
-
this.set(
|
240068
|
+
this.set(key2, value4);
|
240069
240069
|
} else {
|
240070
|
-
const node = this.get(
|
240070
|
+
const node = this.get(key2, true);
|
240071
240071
|
if (identity2.isCollection(node))
|
240072
240072
|
node.setIn(rest, value4);
|
240073
240073
|
else if (node === undefined && this.schema)
|
240074
|
-
this.set(
|
240074
|
+
this.set(key2, collectionFromPath(this.schema, rest, value4));
|
240075
240075
|
else
|
240076
|
-
throw new Error(`Expected YAML collection at ${
|
240076
|
+
throw new Error(`Expected YAML collection at ${key2}. Remaining path: ${rest}`);
|
240077
240077
|
}
|
240078
240078
|
}
|
240079
240079
|
}
|
@@ -240660,19 +240660,19 @@ var require_stringifyPair = __commonJS((exports) => {
|
|
240660
240660
|
var Scalar = require_Scalar();
|
240661
240661
|
var stringify5 = require_stringify();
|
240662
240662
|
var stringifyComment = require_stringifyComment();
|
240663
|
-
function stringifyPair2({ key:
|
240663
|
+
function stringifyPair2({ key: key2, value: value4 }, ctx, onComment, onChompKeep) {
|
240664
240664
|
const { allNullValues, doc: doc2, indent: indent2, indentStep, options: { commentString, indentSeq, simpleKeys } } = ctx;
|
240665
|
-
let keyComment = identity2.isNode(
|
240665
|
+
let keyComment = identity2.isNode(key2) && key2.comment || null;
|
240666
240666
|
if (simpleKeys) {
|
240667
240667
|
if (keyComment) {
|
240668
240668
|
throw new Error("With simple keys, key nodes cannot have comments");
|
240669
240669
|
}
|
240670
|
-
if (identity2.isCollection(
|
240670
|
+
if (identity2.isCollection(key2) || !identity2.isNode(key2) && typeof key2 === "object") {
|
240671
240671
|
const msg = "With simple keys, collection cannot be used as a key value";
|
240672
240672
|
throw new Error(msg);
|
240673
240673
|
}
|
240674
240674
|
}
|
240675
|
-
let explicitKey = !simpleKeys && (!
|
240675
|
+
let explicitKey = !simpleKeys && (!key2 || keyComment && value4 == null && !ctx.inFlow || identity2.isCollection(key2) || (identity2.isScalar(key2) ? key2.type === Scalar.Scalar.BLOCK_FOLDED || key2.type === Scalar.Scalar.BLOCK_LITERAL : typeof key2 === "object"));
|
240676
240676
|
ctx = Object.assign({}, ctx, {
|
240677
240677
|
allNullValues: false,
|
240678
240678
|
implicitKey: !explicitKey && (simpleKeys || !allNullValues),
|
@@ -240680,7 +240680,7 @@ var require_stringifyPair = __commonJS((exports) => {
|
|
240680
240680
|
});
|
240681
240681
|
let keyCommentDone = false;
|
240682
240682
|
let chompKeep = false;
|
240683
|
-
let str = stringify5.stringify(
|
240683
|
+
let str = stringify5.stringify(key2, ctx, () => keyCommentDone = true, () => chompKeep = true);
|
240684
240684
|
if (!explicitKey && !ctx.inFlow && str.length > 1024) {
|
240685
240685
|
if (simpleKeys)
|
240686
240686
|
throw new Error("With simple keys, single line scalar must not span more than 1024 characters");
|
@@ -240824,7 +240824,7 @@ var require_merge = __commonJS((exports) => {
|
|
240824
240824
|
}),
|
240825
240825
|
stringify: () => MERGE_KEY
|
240826
240826
|
};
|
240827
|
-
var isMergeKey = (ctx,
|
240827
|
+
var isMergeKey = (ctx, key2) => (merge7.identify(key2) || identity2.isScalar(key2) && (!key2.type || key2.type === Scalar.Scalar.PLAIN) && merge7.identify(key2.value)) && ctx?.doc.schema.tags.some((tag) => tag.tag === merge7.tag && tag.default);
|
240828
240828
|
function addMergeToJSMap(ctx, map7, value4) {
|
240829
240829
|
value4 = ctx && identity2.isAlias(value4) ? value4.resolve(ctx.doc) : value4;
|
240830
240830
|
if (identity2.isSeq(value4))
|
@@ -240841,14 +240841,14 @@ var require_merge = __commonJS((exports) => {
|
|
240841
240841
|
if (!identity2.isMap(source))
|
240842
240842
|
throw new Error("Merge sources must be maps or map aliases");
|
240843
240843
|
const srcMap = source.toJSON(null, ctx, Map);
|
240844
|
-
for (const [
|
240844
|
+
for (const [key2, value5] of srcMap) {
|
240845
240845
|
if (map7 instanceof Map) {
|
240846
|
-
if (!map7.has(
|
240847
|
-
map7.set(
|
240846
|
+
if (!map7.has(key2))
|
240847
|
+
map7.set(key2, value5);
|
240848
240848
|
} else if (map7 instanceof Set) {
|
240849
|
-
map7.add(
|
240850
|
-
} else if (!Object.prototype.hasOwnProperty.call(map7,
|
240851
|
-
Object.defineProperty(map7,
|
240849
|
+
map7.add(key2);
|
240850
|
+
} else if (!Object.prototype.hasOwnProperty.call(map7, key2)) {
|
240851
|
+
Object.defineProperty(map7, key2, {
|
240852
240852
|
value: value5,
|
240853
240853
|
writable: true,
|
240854
240854
|
enumerable: true,
|
@@ -240870,19 +240870,19 @@ var require_addPairToJSMap = __commonJS((exports) => {
|
|
240870
240870
|
var stringify5 = require_stringify();
|
240871
240871
|
var identity2 = require_identity();
|
240872
240872
|
var toJS = require_toJS();
|
240873
|
-
function addPairToJSMap(ctx, map7, { key:
|
240874
|
-
if (identity2.isNode(
|
240875
|
-
|
240876
|
-
else if (merge7.isMergeKey(ctx,
|
240873
|
+
function addPairToJSMap(ctx, map7, { key: key2, value: value4 }) {
|
240874
|
+
if (identity2.isNode(key2) && key2.addToJSMap)
|
240875
|
+
key2.addToJSMap(ctx, map7, value4);
|
240876
|
+
else if (merge7.isMergeKey(ctx, key2))
|
240877
240877
|
merge7.addMergeToJSMap(ctx, map7, value4);
|
240878
240878
|
else {
|
240879
|
-
const jsKey = toJS.toJS(
|
240879
|
+
const jsKey = toJS.toJS(key2, "", ctx);
|
240880
240880
|
if (map7 instanceof Map) {
|
240881
240881
|
map7.set(jsKey, toJS.toJS(value4, jsKey, ctx));
|
240882
240882
|
} else if (map7 instanceof Set) {
|
240883
240883
|
map7.add(jsKey);
|
240884
240884
|
} else {
|
240885
|
-
const stringKey = stringifyKey(
|
240885
|
+
const stringKey = stringifyKey(key2, jsKey, ctx);
|
240886
240886
|
const jsValue = toJS.toJS(value4, stringKey, ctx);
|
240887
240887
|
if (stringKey in map7)
|
240888
240888
|
Object.defineProperty(map7, stringKey, {
|
@@ -240897,19 +240897,19 @@ var require_addPairToJSMap = __commonJS((exports) => {
|
|
240897
240897
|
}
|
240898
240898
|
return map7;
|
240899
240899
|
}
|
240900
|
-
function stringifyKey(
|
240900
|
+
function stringifyKey(key2, jsKey, ctx) {
|
240901
240901
|
if (jsKey === null)
|
240902
240902
|
return "";
|
240903
240903
|
if (typeof jsKey !== "object")
|
240904
240904
|
return String(jsKey);
|
240905
|
-
if (identity2.isNode(
|
240905
|
+
if (identity2.isNode(key2) && ctx?.doc) {
|
240906
240906
|
const strCtx = stringify5.createStringifyContext(ctx.doc, {});
|
240907
240907
|
strCtx.anchors = new Set;
|
240908
240908
|
for (const node of ctx.anchors.keys())
|
240909
240909
|
strCtx.anchors.add(node.anchor);
|
240910
240910
|
strCtx.inFlow = true;
|
240911
240911
|
strCtx.inStringifyKey = true;
|
240912
|
-
const strKey =
|
240912
|
+
const strKey = key2.toString(strCtx);
|
240913
240913
|
if (!ctx.mapKeyWarned) {
|
240914
240914
|
let jsonStr = JSON.stringify(strKey);
|
240915
240915
|
if (jsonStr.length > 40)
|
@@ -240930,25 +240930,25 @@ var require_Pair = __commonJS((exports) => {
|
|
240930
240930
|
var stringifyPair2 = require_stringifyPair();
|
240931
240931
|
var addPairToJSMap = require_addPairToJSMap();
|
240932
240932
|
var identity2 = require_identity();
|
240933
|
-
function createPair(
|
240934
|
-
const k6 = createNode.createNode(
|
240933
|
+
function createPair(key2, value4, ctx) {
|
240934
|
+
const k6 = createNode.createNode(key2, undefined, ctx);
|
240935
240935
|
const v7 = createNode.createNode(value4, undefined, ctx);
|
240936
240936
|
return new Pair(k6, v7);
|
240937
240937
|
}
|
240938
240938
|
|
240939
240939
|
class Pair {
|
240940
|
-
constructor(
|
240940
|
+
constructor(key2, value4 = null) {
|
240941
240941
|
Object.defineProperty(this, identity2.NODE_TYPE, { value: identity2.PAIR });
|
240942
|
-
this.key =
|
240942
|
+
this.key = key2;
|
240943
240943
|
this.value = value4;
|
240944
240944
|
}
|
240945
240945
|
clone(schema) {
|
240946
|
-
let { key:
|
240947
|
-
if (identity2.isNode(
|
240948
|
-
|
240946
|
+
let { key: key2, value: value4 } = this;
|
240947
|
+
if (identity2.isNode(key2))
|
240948
|
+
key2 = key2.clone(schema);
|
240949
240949
|
if (identity2.isNode(value4))
|
240950
240950
|
value4 = value4.clone(schema);
|
240951
|
-
return new Pair(
|
240951
|
+
return new Pair(key2, value4);
|
240952
240952
|
}
|
240953
240953
|
toJSON(_6, ctx) {
|
240954
240954
|
const pair = ctx?.mapAsMap ? new Map : {};
|
@@ -241115,11 +241115,11 @@ var require_YAMLMap = __commonJS((exports) => {
|
|
241115
241115
|
var identity2 = require_identity();
|
241116
241116
|
var Pair = require_Pair();
|
241117
241117
|
var Scalar = require_Scalar();
|
241118
|
-
function findPair(items,
|
241119
|
-
const k6 = identity2.isScalar(
|
241118
|
+
function findPair(items, key2) {
|
241119
|
+
const k6 = identity2.isScalar(key2) ? key2.value : key2;
|
241120
241120
|
for (const it2 of items) {
|
241121
241121
|
if (identity2.isPair(it2)) {
|
241122
|
-
if (it2.key ===
|
241122
|
+
if (it2.key === key2 || it2.key === k6)
|
241123
241123
|
return it2;
|
241124
241124
|
if (identity2.isScalar(it2.key) && it2.key.value === k6)
|
241125
241125
|
return it2;
|
@@ -241139,20 +241139,20 @@ var require_YAMLMap = __commonJS((exports) => {
|
|
241139
241139
|
static from(schema, obj, ctx) {
|
241140
241140
|
const { keepUndefined, replacer } = ctx;
|
241141
241141
|
const map7 = new this(schema);
|
241142
|
-
const add = (
|
241142
|
+
const add = (key2, value4) => {
|
241143
241143
|
if (typeof replacer === "function")
|
241144
|
-
value4 = replacer.call(obj,
|
241145
|
-
else if (Array.isArray(replacer) && !replacer.includes(
|
241144
|
+
value4 = replacer.call(obj, key2, value4);
|
241145
|
+
else if (Array.isArray(replacer) && !replacer.includes(key2))
|
241146
241146
|
return;
|
241147
241147
|
if (value4 !== undefined || keepUndefined)
|
241148
|
-
map7.items.push(Pair.createPair(
|
241148
|
+
map7.items.push(Pair.createPair(key2, value4, ctx));
|
241149
241149
|
};
|
241150
241150
|
if (obj instanceof Map) {
|
241151
|
-
for (const [
|
241152
|
-
add(
|
241151
|
+
for (const [key2, value4] of obj)
|
241152
|
+
add(key2, value4);
|
241153
241153
|
} else if (obj && typeof obj === "object") {
|
241154
|
-
for (const
|
241155
|
-
add(
|
241154
|
+
for (const key2 of Object.keys(obj))
|
241155
|
+
add(key2, obj[key2]);
|
241156
241156
|
}
|
241157
241157
|
if (typeof schema.sortMapEntries === "function") {
|
241158
241158
|
map7.items.sort(schema.sortMapEntries);
|
@@ -241186,23 +241186,23 @@ var require_YAMLMap = __commonJS((exports) => {
|
|
241186
241186
|
this.items.push(_pair);
|
241187
241187
|
}
|
241188
241188
|
}
|
241189
|
-
delete(
|
241190
|
-
const it2 = findPair(this.items,
|
241189
|
+
delete(key2) {
|
241190
|
+
const it2 = findPair(this.items, key2);
|
241191
241191
|
if (!it2)
|
241192
241192
|
return false;
|
241193
241193
|
const del = this.items.splice(this.items.indexOf(it2), 1);
|
241194
241194
|
return del.length > 0;
|
241195
241195
|
}
|
241196
|
-
get(
|
241197
|
-
const it2 = findPair(this.items,
|
241196
|
+
get(key2, keepScalar) {
|
241197
|
+
const it2 = findPair(this.items, key2);
|
241198
241198
|
const node = it2?.value;
|
241199
241199
|
return (!keepScalar && identity2.isScalar(node) ? node.value : node) ?? undefined;
|
241200
241200
|
}
|
241201
|
-
has(
|
241202
|
-
return !!findPair(this.items,
|
241201
|
+
has(key2) {
|
241202
|
+
return !!findPair(this.items, key2);
|
241203
241203
|
}
|
241204
|
-
set(
|
241205
|
-
this.add(new Pair.Pair(
|
241204
|
+
set(key2, value4) {
|
241205
|
+
this.add(new Pair.Pair(key2, value4), true);
|
241206
241206
|
}
|
241207
241207
|
toJSON(_6, ctx, Type) {
|
241208
241208
|
const map7 = Type ? new Type : ctx?.mapAsMap ? new Map : {};
|
@@ -241273,28 +241273,28 @@ var require_YAMLSeq = __commonJS((exports) => {
|
|
241273
241273
|
add(value4) {
|
241274
241274
|
this.items.push(value4);
|
241275
241275
|
}
|
241276
|
-
delete(
|
241277
|
-
const idx = asItemIndex(
|
241276
|
+
delete(key2) {
|
241277
|
+
const idx = asItemIndex(key2);
|
241278
241278
|
if (typeof idx !== "number")
|
241279
241279
|
return false;
|
241280
241280
|
const del = this.items.splice(idx, 1);
|
241281
241281
|
return del.length > 0;
|
241282
241282
|
}
|
241283
|
-
get(
|
241284
|
-
const idx = asItemIndex(
|
241283
|
+
get(key2, keepScalar) {
|
241284
|
+
const idx = asItemIndex(key2);
|
241285
241285
|
if (typeof idx !== "number")
|
241286
241286
|
return;
|
241287
241287
|
const it2 = this.items[idx];
|
241288
241288
|
return !keepScalar && identity2.isScalar(it2) ? it2.value : it2;
|
241289
241289
|
}
|
241290
|
-
has(
|
241291
|
-
const idx = asItemIndex(
|
241290
|
+
has(key2) {
|
241291
|
+
const idx = asItemIndex(key2);
|
241292
241292
|
return typeof idx === "number" && idx < this.items.length;
|
241293
241293
|
}
|
241294
|
-
set(
|
241295
|
-
const idx = asItemIndex(
|
241294
|
+
set(key2, value4) {
|
241295
|
+
const idx = asItemIndex(key2);
|
241296
241296
|
if (typeof idx !== "number")
|
241297
|
-
throw new Error(`Expected a valid index, not ${
|
241297
|
+
throw new Error(`Expected a valid index, not ${key2}.`);
|
241298
241298
|
const prev = this.items[idx];
|
241299
241299
|
if (identity2.isScalar(prev) && Scalar.isScalarValue(value4))
|
241300
241300
|
prev.value = value4;
|
@@ -241328,8 +241328,8 @@ var require_YAMLSeq = __commonJS((exports) => {
|
|
241328
241328
|
let i7 = 0;
|
241329
241329
|
for (let it2 of obj) {
|
241330
241330
|
if (typeof replacer === "function") {
|
241331
|
-
const
|
241332
|
-
it2 = replacer.call(obj,
|
241331
|
+
const key2 = obj instanceof Set ? it2 : String(i7++);
|
241332
|
+
it2 = replacer.call(obj, key2, it2);
|
241333
241333
|
}
|
241334
241334
|
seq.items.push(createNode.createNode(it2, undefined, ctx));
|
241335
241335
|
}
|
@@ -241337,8 +241337,8 @@ var require_YAMLSeq = __commonJS((exports) => {
|
|
241337
241337
|
return seq;
|
241338
241338
|
}
|
241339
241339
|
}
|
241340
|
-
function asItemIndex(
|
241341
|
-
let idx = identity2.isScalar(
|
241340
|
+
function asItemIndex(key2) {
|
241341
|
+
let idx = identity2.isScalar(key2) ? key2.value : key2;
|
241342
241342
|
if (idx && typeof idx === "string")
|
241343
241343
|
idx = Number(idx);
|
241344
241344
|
return typeof idx === "number" && Number.isInteger(idx) && idx >= 0 ? idx : null;
|
@@ -241711,25 +241711,25 @@ ${cn.comment}` : item.comment;
|
|
241711
241711
|
for (let it2 of iterable) {
|
241712
241712
|
if (typeof replacer === "function")
|
241713
241713
|
it2 = replacer.call(iterable, String(i7++), it2);
|
241714
|
-
let
|
241714
|
+
let key2, value4;
|
241715
241715
|
if (Array.isArray(it2)) {
|
241716
241716
|
if (it2.length === 2) {
|
241717
|
-
|
241717
|
+
key2 = it2[0];
|
241718
241718
|
value4 = it2[1];
|
241719
241719
|
} else
|
241720
241720
|
throw new TypeError(`Expected [key, value] tuple: ${it2}`);
|
241721
241721
|
} else if (it2 && it2 instanceof Object) {
|
241722
241722
|
const keys = Object.keys(it2);
|
241723
241723
|
if (keys.length === 1) {
|
241724
|
-
|
241725
|
-
value4 = it2[
|
241724
|
+
key2 = keys[0];
|
241725
|
+
value4 = it2[key2];
|
241726
241726
|
} else {
|
241727
241727
|
throw new TypeError(`Expected tuple with one key, not ${keys.length} keys`);
|
241728
241728
|
}
|
241729
241729
|
} else {
|
241730
|
-
|
241730
|
+
key2 = it2;
|
241731
241731
|
}
|
241732
|
-
pairs2.items.push(Pair.createPair(
|
241732
|
+
pairs2.items.push(Pair.createPair(key2, value4, ctx));
|
241733
241733
|
}
|
241734
241734
|
return pairs2;
|
241735
241735
|
}
|
@@ -241770,16 +241770,16 @@ var require_omap = __commonJS((exports) => {
|
|
241770
241770
|
if (ctx?.onCreate)
|
241771
241771
|
ctx.onCreate(map7);
|
241772
241772
|
for (const pair of this.items) {
|
241773
|
-
let
|
241773
|
+
let key2, value4;
|
241774
241774
|
if (identity2.isPair(pair)) {
|
241775
|
-
|
241776
|
-
value4 = toJS.toJS(pair.value,
|
241775
|
+
key2 = toJS.toJS(pair.key, "", ctx);
|
241776
|
+
value4 = toJS.toJS(pair.value, key2, ctx);
|
241777
241777
|
} else {
|
241778
|
-
|
241778
|
+
key2 = toJS.toJS(pair, "", ctx);
|
241779
241779
|
}
|
241780
|
-
if (map7.has(
|
241780
|
+
if (map7.has(key2))
|
241781
241781
|
throw new Error("Ordered maps must not include duplicate keys");
|
241782
|
-
map7.set(
|
241782
|
+
map7.set(key2, value4);
|
241783
241783
|
}
|
241784
241784
|
return map7;
|
241785
241785
|
}
|
@@ -241800,12 +241800,12 @@ var require_omap = __commonJS((exports) => {
|
|
241800
241800
|
resolve(seq, onError) {
|
241801
241801
|
const pairs$1 = pairs.resolvePairs(seq, onError);
|
241802
241802
|
const seenKeys = [];
|
241803
|
-
for (const { key:
|
241804
|
-
if (identity2.isScalar(
|
241805
|
-
if (seenKeys.includes(
|
241806
|
-
onError(`Ordered maps must not include duplicate keys: ${
|
241803
|
+
for (const { key: key2 } of pairs$1.items) {
|
241804
|
+
if (identity2.isScalar(key2)) {
|
241805
|
+
if (seenKeys.includes(key2.value)) {
|
241806
|
+
onError(`Ordered maps must not include duplicate keys: ${key2.value}`);
|
241807
241807
|
} else {
|
241808
|
-
seenKeys.push(
|
241808
|
+
seenKeys.push(key2.value);
|
241809
241809
|
}
|
241810
241810
|
}
|
241811
241811
|
}
|
@@ -241979,30 +241979,30 @@ var require_set = __commonJS((exports) => {
|
|
241979
241979
|
super(schema);
|
241980
241980
|
this.tag = YAMLSet.tag;
|
241981
241981
|
}
|
241982
|
-
add(
|
241982
|
+
add(key2) {
|
241983
241983
|
let pair;
|
241984
|
-
if (identity2.isPair(
|
241985
|
-
pair =
|
241986
|
-
else if (
|
241987
|
-
pair = new Pair.Pair(
|
241984
|
+
if (identity2.isPair(key2))
|
241985
|
+
pair = key2;
|
241986
|
+
else if (key2 && typeof key2 === "object" && "key" in key2 && "value" in key2 && key2.value === null)
|
241987
|
+
pair = new Pair.Pair(key2.key, null);
|
241988
241988
|
else
|
241989
|
-
pair = new Pair.Pair(
|
241989
|
+
pair = new Pair.Pair(key2, null);
|
241990
241990
|
const prev = YAMLMap.findPair(this.items, pair.key);
|
241991
241991
|
if (!prev)
|
241992
241992
|
this.items.push(pair);
|
241993
241993
|
}
|
241994
|
-
get(
|
241995
|
-
const pair = YAMLMap.findPair(this.items,
|
241994
|
+
get(key2, keepPair) {
|
241995
|
+
const pair = YAMLMap.findPair(this.items, key2);
|
241996
241996
|
return !keepPair && identity2.isPair(pair) ? identity2.isScalar(pair.key) ? pair.key.value : pair.key : pair;
|
241997
241997
|
}
|
241998
|
-
set(
|
241998
|
+
set(key2, value4) {
|
241999
241999
|
if (typeof value4 !== "boolean")
|
242000
242000
|
throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof value4}`);
|
242001
|
-
const prev = YAMLMap.findPair(this.items,
|
242001
|
+
const prev = YAMLMap.findPair(this.items, key2);
|
242002
242002
|
if (prev && !value4) {
|
242003
242003
|
this.items.splice(this.items.indexOf(prev), 1);
|
242004
242004
|
} else if (!prev && value4) {
|
242005
|
-
this.items.push(new Pair.Pair(
|
242005
|
+
this.items.push(new Pair.Pair(key2));
|
242006
242006
|
}
|
242007
242007
|
}
|
242008
242008
|
toJSON(_6, ctx) {
|
@@ -242237,7 +242237,7 @@ var require_tags = __commonJS((exports) => {
|
|
242237
242237
|
if (Array.isArray(customTags))
|
242238
242238
|
tags = [];
|
242239
242239
|
else {
|
242240
|
-
const keys = Array.from(schemas3.keys()).filter((
|
242240
|
+
const keys = Array.from(schemas3.keys()).filter((key2) => key2 !== "yaml11").map((key2) => JSON.stringify(key2)).join(", ");
|
242241
242241
|
throw new Error(`Unknown schema "${schemaName}"; use one of ${keys} or define customTags array`);
|
242242
242242
|
}
|
242243
242243
|
}
|
@@ -242253,7 +242253,7 @@ var require_tags = __commonJS((exports) => {
|
|
242253
242253
|
const tagObj = typeof tag === "string" ? tagsByName[tag] : tag;
|
242254
242254
|
if (!tagObj) {
|
242255
242255
|
const tagName = JSON.stringify(tag);
|
242256
|
-
const keys = Object.keys(tagsByName).map((
|
242256
|
+
const keys = Object.keys(tagsByName).map((key2) => JSON.stringify(key2)).join(", ");
|
242257
242257
|
throw new Error(`Unknown custom tag ${tagName}; use one of ${keys}`);
|
242258
242258
|
}
|
242259
242259
|
if (!tags2.includes(tagObj))
|
@@ -242488,13 +242488,13 @@ var require_Document = __commonJS((exports) => {
|
|
242488
242488
|
setAnchors();
|
242489
242489
|
return node;
|
242490
242490
|
}
|
242491
|
-
createPair(
|
242492
|
-
const k6 = this.createNode(
|
242491
|
+
createPair(key2, value4, options = {}) {
|
242492
|
+
const k6 = this.createNode(key2, null, options);
|
242493
242493
|
const v7 = this.createNode(value4, null, options);
|
242494
242494
|
return new Pair.Pair(k6, v7);
|
242495
242495
|
}
|
242496
|
-
delete(
|
242497
|
-
return assertCollection(this.contents) ? this.contents.delete(
|
242496
|
+
delete(key2) {
|
242497
|
+
return assertCollection(this.contents) ? this.contents.delete(key2) : false;
|
242498
242498
|
}
|
242499
242499
|
deleteIn(path7) {
|
242500
242500
|
if (Collection.isEmptyPath(path7)) {
|
@@ -242505,27 +242505,27 @@ var require_Document = __commonJS((exports) => {
|
|
242505
242505
|
}
|
242506
242506
|
return assertCollection(this.contents) ? this.contents.deleteIn(path7) : false;
|
242507
242507
|
}
|
242508
|
-
get(
|
242509
|
-
return identity2.isCollection(this.contents) ? this.contents.get(
|
242508
|
+
get(key2, keepScalar) {
|
242509
|
+
return identity2.isCollection(this.contents) ? this.contents.get(key2, keepScalar) : undefined;
|
242510
242510
|
}
|
242511
242511
|
getIn(path7, keepScalar) {
|
242512
242512
|
if (Collection.isEmptyPath(path7))
|
242513
242513
|
return !keepScalar && identity2.isScalar(this.contents) ? this.contents.value : this.contents;
|
242514
242514
|
return identity2.isCollection(this.contents) ? this.contents.getIn(path7, keepScalar) : undefined;
|
242515
242515
|
}
|
242516
|
-
has(
|
242517
|
-
return identity2.isCollection(this.contents) ? this.contents.has(
|
242516
|
+
has(key2) {
|
242517
|
+
return identity2.isCollection(this.contents) ? this.contents.has(key2) : false;
|
242518
242518
|
}
|
242519
242519
|
hasIn(path7) {
|
242520
242520
|
if (Collection.isEmptyPath(path7))
|
242521
242521
|
return this.contents !== undefined;
|
242522
242522
|
return identity2.isCollection(this.contents) ? this.contents.hasIn(path7) : false;
|
242523
242523
|
}
|
242524
|
-
set(
|
242524
|
+
set(key2, value4) {
|
242525
242525
|
if (this.contents == null) {
|
242526
|
-
this.contents = Collection.collectionFromPath(this.schema, [
|
242526
|
+
this.contents = Collection.collectionFromPath(this.schema, [key2], value4);
|
242527
242527
|
} else if (assertCollection(this.contents)) {
|
242528
|
-
this.contents.set(
|
242528
|
+
this.contents.set(key2, value4);
|
242529
242529
|
}
|
242530
242530
|
}
|
242531
242531
|
setIn(path7, value4) {
|
@@ -242807,25 +242807,25 @@ var require_resolve_props = __commonJS((exports) => {
|
|
242807
242807
|
|
242808
242808
|
// ../../node_modules/yaml/dist/compose/util-contains-newline.js
|
242809
242809
|
var require_util_contains_newline = __commonJS((exports) => {
|
242810
|
-
function containsNewline(
|
242811
|
-
if (!
|
242810
|
+
function containsNewline(key2) {
|
242811
|
+
if (!key2)
|
242812
242812
|
return null;
|
242813
|
-
switch (
|
242813
|
+
switch (key2.type) {
|
242814
242814
|
case "alias":
|
242815
242815
|
case "scalar":
|
242816
242816
|
case "double-quoted-scalar":
|
242817
242817
|
case "single-quoted-scalar":
|
242818
|
-
if (
|
242818
|
+
if (key2.source.includes(`
|
242819
242819
|
`))
|
242820
242820
|
return true;
|
242821
|
-
if (
|
242822
|
-
for (const st2 of
|
242821
|
+
if (key2.end) {
|
242822
|
+
for (const st2 of key2.end)
|
242823
242823
|
if (st2.type === "newline")
|
242824
242824
|
return true;
|
242825
242825
|
}
|
242826
242826
|
return false;
|
242827
242827
|
case "flow-collection":
|
242828
|
-
for (const it2 of
|
242828
|
+
for (const it2 of key2.items) {
|
242829
242829
|
for (const st2 of it2.start)
|
242830
242830
|
if (st2.type === "newline")
|
242831
242831
|
return true;
|
@@ -242890,10 +242890,10 @@ var require_resolve_block_map = __commonJS((exports) => {
|
|
242890
242890
|
let offset = bm.offset;
|
242891
242891
|
let commentEnd = null;
|
242892
242892
|
for (const collItem of bm.items) {
|
242893
|
-
const { start: start3, key:
|
242893
|
+
const { start: start3, key: key2, sep: sep5, value: value4 } = collItem;
|
242894
242894
|
const keyProps = resolveProps.resolveProps(start3, {
|
242895
242895
|
indicator: "explicit-key-ind",
|
242896
|
-
next:
|
242896
|
+
next: key2 ?? sep5?.[0],
|
242897
242897
|
offset,
|
242898
242898
|
onError,
|
242899
242899
|
parentIndent: bm.indent,
|
@@ -242901,10 +242901,10 @@ var require_resolve_block_map = __commonJS((exports) => {
|
|
242901
242901
|
});
|
242902
242902
|
const implicitKey = !keyProps.found;
|
242903
242903
|
if (implicitKey) {
|
242904
|
-
if (
|
242905
|
-
if (
|
242904
|
+
if (key2) {
|
242905
|
+
if (key2.type === "block-seq")
|
242906
242906
|
onError(offset, "BLOCK_AS_IMPLICIT_KEY", "A block sequence may not be used as an implicit map key");
|
242907
|
-
else if ("indent" in
|
242907
|
+
else if ("indent" in key2 && key2.indent !== bm.indent)
|
242908
242908
|
onError(offset, "BAD_INDENT", startColMsg);
|
242909
242909
|
}
|
242910
242910
|
if (!keyProps.anchor && !keyProps.tag && !sep5) {
|
@@ -242918,17 +242918,17 @@ var require_resolve_block_map = __commonJS((exports) => {
|
|
242918
242918
|
}
|
242919
242919
|
continue;
|
242920
242920
|
}
|
242921
|
-
if (keyProps.newlineAfterProp || utilContainsNewline.containsNewline(
|
242922
|
-
onError(
|
242921
|
+
if (keyProps.newlineAfterProp || utilContainsNewline.containsNewline(key2)) {
|
242922
|
+
onError(key2 ?? start3[start3.length - 1], "MULTILINE_IMPLICIT_KEY", "Implicit keys need to be on a single line");
|
242923
242923
|
}
|
242924
242924
|
} else if (keyProps.found?.indent !== bm.indent) {
|
242925
242925
|
onError(offset, "BAD_INDENT", startColMsg);
|
242926
242926
|
}
|
242927
242927
|
ctx.atKey = true;
|
242928
242928
|
const keyStart = keyProps.end;
|
242929
|
-
const keyNode =
|
242929
|
+
const keyNode = key2 ? composeNode(ctx, key2, keyProps, onError) : composeEmptyNode(ctx, keyStart, start3, null, keyProps, onError);
|
242930
242930
|
if (ctx.schema.compat)
|
242931
|
-
utilFlowIndentCheck.flowIndentCheck(bm.indent,
|
242931
|
+
utilFlowIndentCheck.flowIndentCheck(bm.indent, key2, onError);
|
242932
242932
|
ctx.atKey = false;
|
242933
242933
|
if (utilMapIncludes.mapIncludes(ctx, map7.items, keyNode))
|
242934
242934
|
onError(keyStart, "DUPLICATE_KEY", "Map keys must be unique");
|
@@ -242938,7 +242938,7 @@ var require_resolve_block_map = __commonJS((exports) => {
|
|
242938
242938
|
offset: keyNode.range[2],
|
242939
242939
|
onError,
|
242940
242940
|
parentIndent: bm.indent,
|
242941
|
-
startOnNewline: !
|
242941
|
+
startOnNewline: !key2 || key2.type === "block-scalar"
|
242942
242942
|
});
|
242943
242943
|
offset = valueProps.end;
|
242944
242944
|
if (valueProps.found) {
|
@@ -243094,11 +243094,11 @@ var require_resolve_flow_collection = __commonJS((exports) => {
|
|
243094
243094
|
let offset = fc.offset + fc.start.source.length;
|
243095
243095
|
for (let i7 = 0;i7 < fc.items.length; ++i7) {
|
243096
243096
|
const collItem = fc.items[i7];
|
243097
|
-
const { start: start3, key:
|
243097
|
+
const { start: start3, key: key2, sep: sep5, value: value4 } = collItem;
|
243098
243098
|
const props = resolveProps.resolveProps(start3, {
|
243099
243099
|
flow: fcName,
|
243100
243100
|
indicator: "explicit-key-ind",
|
243101
|
-
next:
|
243101
|
+
next: key2 ?? sep5?.[0],
|
243102
243102
|
offset,
|
243103
243103
|
onError,
|
243104
243104
|
parentIndent: fc.indent,
|
@@ -243120,8 +243120,8 @@ var require_resolve_flow_collection = __commonJS((exports) => {
|
|
243120
243120
|
offset = props.end;
|
243121
243121
|
continue;
|
243122
243122
|
}
|
243123
|
-
if (!isMap && ctx.options.strict && utilContainsNewline.containsNewline(
|
243124
|
-
onError(
|
243123
|
+
if (!isMap && ctx.options.strict && utilContainsNewline.containsNewline(key2))
|
243124
|
+
onError(key2, "MULTILINE_IMPLICIT_KEY", "Implicit keys of flow sequence pairs need to be on a single line");
|
243125
243125
|
}
|
243126
243126
|
if (i7 === 0) {
|
243127
243127
|
if (props.comma)
|
@@ -243166,8 +243166,8 @@ var require_resolve_flow_collection = __commonJS((exports) => {
|
|
243166
243166
|
} else {
|
243167
243167
|
ctx.atKey = true;
|
243168
243168
|
const keyStart = props.end;
|
243169
|
-
const keyNode =
|
243170
|
-
if (isBlock(
|
243169
|
+
const keyNode = key2 ? composeNode(ctx, key2, props, onError) : composeEmptyNode(ctx, keyStart, start3, null, props, onError);
|
243170
|
+
if (isBlock(key2))
|
243171
243171
|
onError(keyNode.range, "BLOCK_IN_FLOW", blockMsg);
|
243172
243172
|
ctx.atKey = false;
|
243173
243173
|
const valueProps = resolveProps.resolveProps(sep5 ?? [], {
|
@@ -243978,7 +243978,7 @@ var require_composer = __commonJS((exports) => {
|
|
243978
243978
|
var node_process = __require("process");
|
243979
243979
|
var directives4 = require_directives2();
|
243980
243980
|
var Document = require_Document();
|
243981
|
-
var
|
243981
|
+
var errors4 = require_errors3();
|
243982
243982
|
var identity2 = require_identity();
|
243983
243983
|
var composeDoc = require_compose_doc();
|
243984
243984
|
var resolveEnd = require_resolve_end();
|
@@ -244029,9 +244029,9 @@ var require_composer = __commonJS((exports) => {
|
|
244029
244029
|
this.onError = (source, code2, message, warning) => {
|
244030
244030
|
const pos = getErrorPos(source);
|
244031
244031
|
if (warning)
|
244032
|
-
this.warnings.push(new
|
244032
|
+
this.warnings.push(new errors4.YAMLWarning(pos, code2, message));
|
244033
244033
|
else
|
244034
|
-
this.errors.push(new
|
244034
|
+
this.errors.push(new errors4.YAMLParseError(pos, code2, message));
|
244035
244035
|
};
|
244036
244036
|
this.directives = new directives4.Directives({ version: options.version || "1.2" });
|
244037
244037
|
this.options = options;
|
@@ -244115,7 +244115,7 @@ ${cb}` : comment;
|
|
244115
244115
|
break;
|
244116
244116
|
case "error": {
|
244117
244117
|
const msg = token.source ? `${token.message}: ${JSON.stringify(token.source)}` : token.message;
|
244118
|
-
const error45 = new
|
244118
|
+
const error45 = new errors4.YAMLParseError(getErrorPos(token), "UNEXPECTED_TOKEN", msg);
|
244119
244119
|
if (this.atDirectives || !this.doc)
|
244120
244120
|
this.errors.push(error45);
|
244121
244121
|
else
|
@@ -244125,7 +244125,7 @@ ${cb}` : comment;
|
|
244125
244125
|
case "doc-end": {
|
244126
244126
|
if (!this.doc) {
|
244127
244127
|
const msg = "Unexpected doc-end without preceding document";
|
244128
|
-
this.errors.push(new
|
244128
|
+
this.errors.push(new errors4.YAMLParseError(getErrorPos(token), "UNEXPECTED_TOKEN", msg));
|
244129
244129
|
break;
|
244130
244130
|
}
|
244131
244131
|
this.doc.directives.docEnd = true;
|
@@ -244140,7 +244140,7 @@ ${end.comment}` : end.comment;
|
|
244140
244140
|
break;
|
244141
244141
|
}
|
244142
244142
|
default:
|
244143
|
-
this.errors.push(new
|
244143
|
+
this.errors.push(new errors4.YAMLParseError(getErrorPos(token), "UNEXPECTED_TOKEN", `Unsupported token ${token.type}`));
|
244144
244144
|
}
|
244145
244145
|
}
|
244146
244146
|
*end(forceDoc = false, endOffset = -1) {
|
@@ -244166,7 +244166,7 @@ ${end.comment}` : end.comment;
|
|
244166
244166
|
var require_cst_scalar = __commonJS((exports) => {
|
244167
244167
|
var resolveBlockScalar = require_resolve_block_scalar();
|
244168
244168
|
var resolveFlowScalar = require_resolve_flow_scalar();
|
244169
|
-
var
|
244169
|
+
var errors4 = require_errors3();
|
244170
244170
|
var stringifyString = require_stringifyString();
|
244171
244171
|
function resolveAsScalar(token, strict = true, onError) {
|
244172
244172
|
if (token) {
|
@@ -244175,7 +244175,7 @@ var require_cst_scalar = __commonJS((exports) => {
|
|
244175
244175
|
if (onError)
|
244176
244176
|
onError(offset, code2, message);
|
244177
244177
|
else
|
244178
|
-
throw new
|
244178
|
+
throw new errors4.YAMLParseError([offset, offset + 1], code2, message);
|
244179
244179
|
};
|
244180
244180
|
switch (token.type) {
|
244181
244181
|
case "scalar":
|
@@ -244289,9 +244289,9 @@ var require_cst_scalar = __commonJS((exports) => {
|
|
244289
244289
|
if (!addEndtoBlockProps(props, "end" in token ? token.end : undefined))
|
244290
244290
|
props.push({ type: "newline", offset: -1, indent: indent2, source: `
|
244291
244291
|
` });
|
244292
|
-
for (const
|
244293
|
-
if (
|
244294
|
-
delete token[
|
244292
|
+
for (const key2 of Object.keys(token))
|
244293
|
+
if (key2 !== "type" && key2 !== "offset")
|
244294
|
+
delete token[key2];
|
244295
244295
|
Object.assign(token, { type: "block-scalar", indent: indent2, props, source: body });
|
244296
244296
|
}
|
244297
244297
|
}
|
@@ -244340,9 +244340,9 @@ var require_cst_scalar = __commonJS((exports) => {
|
|
244340
244340
|
default: {
|
244341
244341
|
const indent2 = "indent" in token ? token.indent : -1;
|
244342
244342
|
const end = "end" in token && Array.isArray(token.end) ? token.end.filter((st2) => st2.type === "space" || st2.type === "comment" || st2.type === "newline") : [];
|
244343
|
-
for (const
|
244344
|
-
if (
|
244345
|
-
delete token[
|
244343
|
+
for (const key2 of Object.keys(token))
|
244344
|
+
if (key2 !== "type" && key2 !== "offset")
|
244345
|
+
delete token[key2];
|
244346
244346
|
Object.assign(token, { type: type4, indent: indent2, source, end });
|
244347
244347
|
}
|
244348
244348
|
}
|
@@ -244394,12 +244394,12 @@ var require_cst_stringify = __commonJS((exports) => {
|
|
244394
244394
|
}
|
244395
244395
|
}
|
244396
244396
|
}
|
244397
|
-
function stringifyItem({ start: start3, key:
|
244397
|
+
function stringifyItem({ start: start3, key: key2, sep: sep5, value: value4 }) {
|
244398
244398
|
let res = "";
|
244399
244399
|
for (const st2 of start3)
|
244400
244400
|
res += st2.source;
|
244401
|
-
if (
|
244402
|
-
res += stringifyToken(
|
244401
|
+
if (key2)
|
244402
|
+
res += stringifyToken(key2);
|
244403
244403
|
if (sep5)
|
244404
244404
|
for (const st2 of sep5)
|
244405
244405
|
res += st2.source;
|
@@ -245695,7 +245695,7 @@ var require_parser2 = __commonJS((exports) => {
|
|
245695
245695
|
});
|
245696
245696
|
} else if (isFlowToken(it2.key) && !includesToken(it2.sep, "newline")) {
|
245697
245697
|
const start4 = getFirstKeyStartProps(it2.start);
|
245698
|
-
const
|
245698
|
+
const key2 = it2.key;
|
245699
245699
|
const sep5 = it2.sep;
|
245700
245700
|
sep5.push(this.sourceToken);
|
245701
245701
|
delete it2.key;
|
@@ -245704,7 +245704,7 @@ var require_parser2 = __commonJS((exports) => {
|
|
245704
245704
|
type: "block-map",
|
245705
245705
|
offset: this.offset,
|
245706
245706
|
indent: this.indent,
|
245707
|
-
items: [{ start: start4, key:
|
245707
|
+
items: [{ start: start4, key: key2, sep: sep5 }]
|
245708
245708
|
});
|
245709
245709
|
} else if (start3.length > 0) {
|
245710
245710
|
it2.sep = it2.sep.concat(start3, this.sourceToken);
|
@@ -246037,7 +246037,7 @@ var require_parser2 = __commonJS((exports) => {
|
|
246037
246037
|
var require_public_api = __commonJS((exports) => {
|
246038
246038
|
var composer = require_composer();
|
246039
246039
|
var Document = require_Document();
|
246040
|
-
var
|
246040
|
+
var errors4 = require_errors3();
|
246041
246041
|
var log = require_log();
|
246042
246042
|
var identity2 = require_identity();
|
246043
246043
|
var lineCounter = require_line_counter();
|
@@ -246054,8 +246054,8 @@ var require_public_api = __commonJS((exports) => {
|
|
246054
246054
|
const docs = Array.from(composer$1.compose(parser$1.parse(source)));
|
246055
246055
|
if (prettyErrors && lineCounter2)
|
246056
246056
|
for (const doc2 of docs) {
|
246057
|
-
doc2.errors.forEach(
|
246058
|
-
doc2.warnings.forEach(
|
246057
|
+
doc2.errors.forEach(errors4.prettifyError(source, lineCounter2));
|
246058
|
+
doc2.warnings.forEach(errors4.prettifyError(source, lineCounter2));
|
246059
246059
|
}
|
246060
246060
|
if (docs.length > 0)
|
246061
246061
|
return docs;
|
@@ -246070,13 +246070,13 @@ var require_public_api = __commonJS((exports) => {
|
|
246070
246070
|
if (!doc2)
|
246071
246071
|
doc2 = _doc;
|
246072
246072
|
else if (doc2.options.logLevel !== "silent") {
|
246073
|
-
doc2.errors.push(new
|
246073
|
+
doc2.errors.push(new errors4.YAMLParseError(_doc.range.slice(0, 2), "MULTIPLE_DOCS", "Source contains multiple documents; please use YAML.parseAllDocuments()"));
|
246074
246074
|
break;
|
246075
246075
|
}
|
246076
246076
|
}
|
246077
246077
|
if (prettyErrors && lineCounter2) {
|
246078
|
-
doc2.errors.forEach(
|
246079
|
-
doc2.warnings.forEach(
|
246078
|
+
doc2.errors.forEach(errors4.prettifyError(source, lineCounter2));
|
246079
|
+
doc2.warnings.forEach(errors4.prettifyError(source, lineCounter2));
|
246080
246080
|
}
|
246081
246081
|
return doc2;
|
246082
246082
|
}
|
@@ -246144,7 +246144,10 @@ 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";
|
246147
246149
|
var isBackspaceKey = (key) => key.name === "backspace";
|
246150
|
+
var isNumberKey = (key) => "1234567890".includes(key.name);
|
246148
246151
|
var isEnterKey = (key) => key.name === "enter" || key.name === "return";
|
246149
246152
|
// ../../node_modules/@inquirer/core/dist/esm/lib/errors.js
|
246150
246153
|
class AbortPromptError extends Error {
|
@@ -246313,7 +246316,7 @@ function useEffect(cb, depArray) {
|
|
246313
246316
|
// ../../node_modules/@inquirer/core/dist/esm/lib/theme.js
|
246314
246317
|
var import_yoctocolors_cjs = __toESM(require_yoctocolors_cjs(), 1);
|
246315
246318
|
|
246316
|
-
// ../../node_modules/@inquirer/
|
246319
|
+
// ../../node_modules/@inquirer/figures/dist/esm/index.js
|
246317
246320
|
import process2 from "node:process";
|
246318
246321
|
function isUnicodeSupported() {
|
246319
246322
|
if (process2.platform !== "win32") {
|
@@ -246678,11 +246681,22 @@ function usePrefix({ status = "idle", theme }) {
|
|
246678
246681
|
const iconName = status === "loading" ? "idle" : status;
|
246679
246682
|
return typeof prefix === "string" ? prefix : prefix[iconName] ?? prefix["idle"];
|
246680
246683
|
}
|
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
|
+
}
|
246681
246696
|
// ../../node_modules/@inquirer/core/dist/esm/lib/use-ref.js
|
246682
246697
|
function useRef(val) {
|
246683
246698
|
return useState({ current: val })[0];
|
246684
246699
|
}
|
246685
|
-
|
246686
246700
|
// ../../node_modules/@inquirer/core/dist/esm/lib/use-keypress.js
|
246687
246701
|
function useKeypress(userHandler) {
|
246688
246702
|
const signal = useRef(userHandler);
|
@@ -246714,6 +246728,72 @@ function readlineWidth() {
|
|
246714
246728
|
return import_cli_width.default({ defaultWidth: 80, output: readline().output });
|
246715
246729
|
}
|
246716
246730
|
|
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
|
+
}
|
246717
246797
|
// ../../node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
|
246718
246798
|
var import_mute_stream = __toESM(require_lib(), 1);
|
246719
246799
|
import * as readline2 from "node:readline";
|
@@ -247096,6 +247176,20 @@ function createPrompt(view) {
|
|
247096
247176
|
};
|
247097
247177
|
return prompt;
|
247098
247178
|
}
|
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
|
+
}
|
247099
247193
|
// ../../node_modules/yoctocolors/base.js
|
247100
247194
|
var exports_base = {};
|
247101
247195
|
__export(exports_base, {
|
@@ -264989,7 +265083,7 @@ function pruneCurrentEnv(currentEnv, env2) {
|
|
264989
265083
|
var package_default = {
|
264990
265084
|
name: "@settlemint/sdk-cli",
|
264991
265085
|
description: "Command-line interface for SettleMint SDK, providing development tools and project management capabilities",
|
264992
|
-
version: "2.5.1-
|
265086
|
+
version: "2.5.1-main7aee004f",
|
264993
265087
|
type: "module",
|
264994
265088
|
private: false,
|
264995
265089
|
license: "FSL-1.1-MIT",
|
@@ -265039,12 +265133,12 @@ var package_default = {
|
|
265039
265133
|
"@inquirer/confirm": "5.1.14",
|
265040
265134
|
"@inquirer/input": "4.2.1",
|
265041
265135
|
"@inquirer/password": "4.0.17",
|
265042
|
-
"@inquirer/select": "4.
|
265043
|
-
"@settlemint/sdk-hasura": "2.5.1-
|
265044
|
-
"@settlemint/sdk-js": "2.5.1-
|
265045
|
-
"@settlemint/sdk-utils": "2.5.1-
|
265046
|
-
"@settlemint/sdk-viem": "2.5.1-
|
265047
|
-
"@types/node": "24.0
|
265136
|
+
"@inquirer/select": "4.3.1",
|
265137
|
+
"@settlemint/sdk-hasura": "2.5.1-main7aee004f",
|
265138
|
+
"@settlemint/sdk-js": "2.5.1-main7aee004f",
|
265139
|
+
"@settlemint/sdk-utils": "2.5.1-main7aee004f",
|
265140
|
+
"@settlemint/sdk-viem": "2.5.1-main7aee004f",
|
265141
|
+
"@types/node": "24.1.0",
|
265048
265142
|
"@types/semver": "7.7.0",
|
265049
265143
|
"@types/which": "3.0.4",
|
265050
265144
|
"get-tsconfig": "4.10.1",
|
@@ -303255,853 +303349,14 @@ async function subgraphNamePrompt({
|
|
303255
303349
|
return sanitizeName(subgraphName);
|
303256
303350
|
}
|
303257
303351
|
|
303258
|
-
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/key.js
|
303259
|
-
var isUpKey = (key2) => key2.name === "up" || key2.name === "k" || key2.ctrl && key2.name === "p";
|
303260
|
-
var isDownKey = (key2) => key2.name === "down" || key2.name === "j" || key2.ctrl && key2.name === "n";
|
303261
|
-
var isBackspaceKey2 = (key2) => key2.name === "backspace";
|
303262
|
-
var isNumberKey = (key2) => "1234567890".includes(key2.name);
|
303263
|
-
var isEnterKey2 = (key2) => key2.name === "enter" || key2.name === "return";
|
303264
|
-
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/errors.js
|
303265
|
-
class AbortPromptError2 extends Error {
|
303266
|
-
name = "AbortPromptError";
|
303267
|
-
message = "Prompt was aborted";
|
303268
|
-
constructor(options) {
|
303269
|
-
super();
|
303270
|
-
this.cause = options?.cause;
|
303271
|
-
}
|
303272
|
-
}
|
303273
|
-
|
303274
|
-
class CancelPromptError2 extends Error {
|
303275
|
-
name = "CancelPromptError";
|
303276
|
-
message = "Prompt was canceled";
|
303277
|
-
}
|
303278
|
-
|
303279
|
-
class ExitPromptError2 extends Error {
|
303280
|
-
name = "ExitPromptError";
|
303281
|
-
}
|
303282
|
-
|
303283
|
-
class HookError2 extends Error {
|
303284
|
-
name = "HookError";
|
303285
|
-
}
|
303286
|
-
|
303287
|
-
class ValidationError2 extends Error {
|
303288
|
-
name = "ValidationError";
|
303289
|
-
}
|
303290
|
-
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/use-state.js
|
303291
|
-
import { AsyncResource as AsyncResource5 } from "node:async_hooks";
|
303292
|
-
|
303293
|
-
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/hook-engine.js
|
303294
|
-
import { AsyncLocalStorage as AsyncLocalStorage2, AsyncResource as AsyncResource4 } from "node:async_hooks";
|
303295
|
-
var hookStorage2 = new AsyncLocalStorage2;
|
303296
|
-
function createStore2(rl) {
|
303297
|
-
const store = {
|
303298
|
-
rl,
|
303299
|
-
hooks: [],
|
303300
|
-
hooksCleanup: [],
|
303301
|
-
hooksEffect: [],
|
303302
|
-
index: 0,
|
303303
|
-
handleChange() {}
|
303304
|
-
};
|
303305
|
-
return store;
|
303306
|
-
}
|
303307
|
-
function withHooks2(rl, cb) {
|
303308
|
-
const store = createStore2(rl);
|
303309
|
-
return hookStorage2.run(store, () => {
|
303310
|
-
function cycle(render) {
|
303311
|
-
store.handleChange = () => {
|
303312
|
-
store.index = 0;
|
303313
|
-
render();
|
303314
|
-
};
|
303315
|
-
store.handleChange();
|
303316
|
-
}
|
303317
|
-
return cb(cycle);
|
303318
|
-
});
|
303319
|
-
}
|
303320
|
-
function getStore2() {
|
303321
|
-
const store = hookStorage2.getStore();
|
303322
|
-
if (!store) {
|
303323
|
-
throw new HookError2("[Inquirer] Hook functions can only be called from within a prompt");
|
303324
|
-
}
|
303325
|
-
return store;
|
303326
|
-
}
|
303327
|
-
function readline3() {
|
303328
|
-
return getStore2().rl;
|
303329
|
-
}
|
303330
|
-
function withUpdates2(fn) {
|
303331
|
-
const wrapped = (...args) => {
|
303332
|
-
const store = getStore2();
|
303333
|
-
let shouldUpdate = false;
|
303334
|
-
const oldHandleChange = store.handleChange;
|
303335
|
-
store.handleChange = () => {
|
303336
|
-
shouldUpdate = true;
|
303337
|
-
};
|
303338
|
-
const returnValue = fn(...args);
|
303339
|
-
if (shouldUpdate) {
|
303340
|
-
oldHandleChange();
|
303341
|
-
}
|
303342
|
-
store.handleChange = oldHandleChange;
|
303343
|
-
return returnValue;
|
303344
|
-
};
|
303345
|
-
return AsyncResource4.bind(wrapped);
|
303346
|
-
}
|
303347
|
-
function withPointer2(cb) {
|
303348
|
-
const store = getStore2();
|
303349
|
-
const { index } = store;
|
303350
|
-
const pointer = {
|
303351
|
-
get() {
|
303352
|
-
return store.hooks[index];
|
303353
|
-
},
|
303354
|
-
set(value4) {
|
303355
|
-
store.hooks[index] = value4;
|
303356
|
-
},
|
303357
|
-
initialized: index in store.hooks
|
303358
|
-
};
|
303359
|
-
const returnValue = cb(pointer);
|
303360
|
-
store.index++;
|
303361
|
-
return returnValue;
|
303362
|
-
}
|
303363
|
-
function handleChange2() {
|
303364
|
-
getStore2().handleChange();
|
303365
|
-
}
|
303366
|
-
var effectScheduler2 = {
|
303367
|
-
queue(cb) {
|
303368
|
-
const store = getStore2();
|
303369
|
-
const { index } = store;
|
303370
|
-
store.hooksEffect.push(() => {
|
303371
|
-
store.hooksCleanup[index]?.();
|
303372
|
-
const cleanFn = cb(readline3());
|
303373
|
-
if (cleanFn != null && typeof cleanFn !== "function") {
|
303374
|
-
throw new ValidationError2("useEffect return value must be a cleanup function or nothing.");
|
303375
|
-
}
|
303376
|
-
store.hooksCleanup[index] = cleanFn;
|
303377
|
-
});
|
303378
|
-
},
|
303379
|
-
run() {
|
303380
|
-
const store = getStore2();
|
303381
|
-
withUpdates2(() => {
|
303382
|
-
store.hooksEffect.forEach((effect) => {
|
303383
|
-
effect();
|
303384
|
-
});
|
303385
|
-
store.hooksEffect.length = 0;
|
303386
|
-
})();
|
303387
|
-
},
|
303388
|
-
clearAll() {
|
303389
|
-
const store = getStore2();
|
303390
|
-
store.hooksCleanup.forEach((cleanFn) => {
|
303391
|
-
cleanFn?.();
|
303392
|
-
});
|
303393
|
-
store.hooksEffect.length = 0;
|
303394
|
-
store.hooksCleanup.length = 0;
|
303395
|
-
}
|
303396
|
-
};
|
303397
|
-
|
303398
|
-
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/use-state.js
|
303399
|
-
function useState2(defaultValue) {
|
303400
|
-
return withPointer2((pointer) => {
|
303401
|
-
const setState = AsyncResource5.bind(function setState(newValue) {
|
303402
|
-
if (pointer.get() !== newValue) {
|
303403
|
-
pointer.set(newValue);
|
303404
|
-
handleChange2();
|
303405
|
-
}
|
303406
|
-
});
|
303407
|
-
if (pointer.initialized) {
|
303408
|
-
return [pointer.get(), setState];
|
303409
|
-
}
|
303410
|
-
const value4 = typeof defaultValue === "function" ? defaultValue() : defaultValue;
|
303411
|
-
pointer.set(value4);
|
303412
|
-
return [value4, setState];
|
303413
|
-
});
|
303414
|
-
}
|
303415
|
-
|
303416
|
-
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/use-effect.js
|
303417
|
-
function useEffect2(cb, depArray) {
|
303418
|
-
withPointer2((pointer) => {
|
303419
|
-
const oldDeps = pointer.get();
|
303420
|
-
const hasChanged = !Array.isArray(oldDeps) || depArray.some((dep, i6) => !Object.is(dep, oldDeps[i6]));
|
303421
|
-
if (hasChanged) {
|
303422
|
-
effectScheduler2.queue(cb);
|
303423
|
-
}
|
303424
|
-
pointer.set(depArray);
|
303425
|
-
});
|
303426
|
-
}
|
303427
|
-
|
303428
|
-
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/theme.js
|
303429
|
-
var import_yoctocolors_cjs2 = __toESM(require_yoctocolors_cjs(), 1);
|
303430
|
-
|
303431
|
-
// ../../node_modules/@inquirer/figures/dist/esm/index.js
|
303432
|
-
import process8 from "node:process";
|
303433
|
-
function isUnicodeSupported3() {
|
303434
|
-
if (process8.platform !== "win32") {
|
303435
|
-
return process8.env["TERM"] !== "linux";
|
303436
|
-
}
|
303437
|
-
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";
|
303438
|
-
}
|
303439
|
-
var common2 = {
|
303440
|
-
circleQuestionMark: "(?)",
|
303441
|
-
questionMarkPrefix: "(?)",
|
303442
|
-
square: "█",
|
303443
|
-
squareDarkShade: "▓",
|
303444
|
-
squareMediumShade: "▒",
|
303445
|
-
squareLightShade: "░",
|
303446
|
-
squareTop: "▀",
|
303447
|
-
squareBottom: "▄",
|
303448
|
-
squareLeft: "▌",
|
303449
|
-
squareRight: "▐",
|
303450
|
-
squareCenter: "■",
|
303451
|
-
bullet: "●",
|
303452
|
-
dot: "․",
|
303453
|
-
ellipsis: "…",
|
303454
|
-
pointerSmall: "›",
|
303455
|
-
triangleUp: "▲",
|
303456
|
-
triangleUpSmall: "▴",
|
303457
|
-
triangleDown: "▼",
|
303458
|
-
triangleDownSmall: "▾",
|
303459
|
-
triangleLeftSmall: "◂",
|
303460
|
-
triangleRightSmall: "▸",
|
303461
|
-
home: "⌂",
|
303462
|
-
heart: "♥",
|
303463
|
-
musicNote: "♪",
|
303464
|
-
musicNoteBeamed: "♫",
|
303465
|
-
arrowUp: "↑",
|
303466
|
-
arrowDown: "↓",
|
303467
|
-
arrowLeft: "←",
|
303468
|
-
arrowRight: "→",
|
303469
|
-
arrowLeftRight: "↔",
|
303470
|
-
arrowUpDown: "↕",
|
303471
|
-
almostEqual: "≈",
|
303472
|
-
notEqual: "≠",
|
303473
|
-
lessOrEqual: "≤",
|
303474
|
-
greaterOrEqual: "≥",
|
303475
|
-
identical: "≡",
|
303476
|
-
infinity: "∞",
|
303477
|
-
subscriptZero: "₀",
|
303478
|
-
subscriptOne: "₁",
|
303479
|
-
subscriptTwo: "₂",
|
303480
|
-
subscriptThree: "₃",
|
303481
|
-
subscriptFour: "₄",
|
303482
|
-
subscriptFive: "₅",
|
303483
|
-
subscriptSix: "₆",
|
303484
|
-
subscriptSeven: "₇",
|
303485
|
-
subscriptEight: "₈",
|
303486
|
-
subscriptNine: "₉",
|
303487
|
-
oneHalf: "½",
|
303488
|
-
oneThird: "⅓",
|
303489
|
-
oneQuarter: "¼",
|
303490
|
-
oneFifth: "⅕",
|
303491
|
-
oneSixth: "⅙",
|
303492
|
-
oneEighth: "⅛",
|
303493
|
-
twoThirds: "⅔",
|
303494
|
-
twoFifths: "⅖",
|
303495
|
-
threeQuarters: "¾",
|
303496
|
-
threeFifths: "⅗",
|
303497
|
-
threeEighths: "⅜",
|
303498
|
-
fourFifths: "⅘",
|
303499
|
-
fiveSixths: "⅚",
|
303500
|
-
fiveEighths: "⅝",
|
303501
|
-
sevenEighths: "⅞",
|
303502
|
-
line: "─",
|
303503
|
-
lineBold: "━",
|
303504
|
-
lineDouble: "═",
|
303505
|
-
lineDashed0: "┄",
|
303506
|
-
lineDashed1: "┅",
|
303507
|
-
lineDashed2: "┈",
|
303508
|
-
lineDashed3: "┉",
|
303509
|
-
lineDashed4: "╌",
|
303510
|
-
lineDashed5: "╍",
|
303511
|
-
lineDashed6: "╴",
|
303512
|
-
lineDashed7: "╶",
|
303513
|
-
lineDashed8: "╸",
|
303514
|
-
lineDashed9: "╺",
|
303515
|
-
lineDashed10: "╼",
|
303516
|
-
lineDashed11: "╾",
|
303517
|
-
lineDashed12: "−",
|
303518
|
-
lineDashed13: "–",
|
303519
|
-
lineDashed14: "‐",
|
303520
|
-
lineDashed15: "⁃",
|
303521
|
-
lineVertical: "│",
|
303522
|
-
lineVerticalBold: "┃",
|
303523
|
-
lineVerticalDouble: "║",
|
303524
|
-
lineVerticalDashed0: "┆",
|
303525
|
-
lineVerticalDashed1: "┇",
|
303526
|
-
lineVerticalDashed2: "┊",
|
303527
|
-
lineVerticalDashed3: "┋",
|
303528
|
-
lineVerticalDashed4: "╎",
|
303529
|
-
lineVerticalDashed5: "╏",
|
303530
|
-
lineVerticalDashed6: "╵",
|
303531
|
-
lineVerticalDashed7: "╷",
|
303532
|
-
lineVerticalDashed8: "╹",
|
303533
|
-
lineVerticalDashed9: "╻",
|
303534
|
-
lineVerticalDashed10: "╽",
|
303535
|
-
lineVerticalDashed11: "╿",
|
303536
|
-
lineDownLeft: "┐",
|
303537
|
-
lineDownLeftArc: "╮",
|
303538
|
-
lineDownBoldLeftBold: "┓",
|
303539
|
-
lineDownBoldLeft: "┒",
|
303540
|
-
lineDownLeftBold: "┑",
|
303541
|
-
lineDownDoubleLeftDouble: "╗",
|
303542
|
-
lineDownDoubleLeft: "╖",
|
303543
|
-
lineDownLeftDouble: "╕",
|
303544
|
-
lineDownRight: "┌",
|
303545
|
-
lineDownRightArc: "╭",
|
303546
|
-
lineDownBoldRightBold: "┏",
|
303547
|
-
lineDownBoldRight: "┎",
|
303548
|
-
lineDownRightBold: "┍",
|
303549
|
-
lineDownDoubleRightDouble: "╔",
|
303550
|
-
lineDownDoubleRight: "╓",
|
303551
|
-
lineDownRightDouble: "╒",
|
303552
|
-
lineUpLeft: "┘",
|
303553
|
-
lineUpLeftArc: "╯",
|
303554
|
-
lineUpBoldLeftBold: "┛",
|
303555
|
-
lineUpBoldLeft: "┚",
|
303556
|
-
lineUpLeftBold: "┙",
|
303557
|
-
lineUpDoubleLeftDouble: "╝",
|
303558
|
-
lineUpDoubleLeft: "╜",
|
303559
|
-
lineUpLeftDouble: "╛",
|
303560
|
-
lineUpRight: "└",
|
303561
|
-
lineUpRightArc: "╰",
|
303562
|
-
lineUpBoldRightBold: "┗",
|
303563
|
-
lineUpBoldRight: "┖",
|
303564
|
-
lineUpRightBold: "┕",
|
303565
|
-
lineUpDoubleRightDouble: "╚",
|
303566
|
-
lineUpDoubleRight: "╙",
|
303567
|
-
lineUpRightDouble: "╘",
|
303568
|
-
lineUpDownLeft: "┤",
|
303569
|
-
lineUpBoldDownBoldLeftBold: "┫",
|
303570
|
-
lineUpBoldDownBoldLeft: "┨",
|
303571
|
-
lineUpDownLeftBold: "┥",
|
303572
|
-
lineUpBoldDownLeftBold: "┩",
|
303573
|
-
lineUpDownBoldLeftBold: "┪",
|
303574
|
-
lineUpDownBoldLeft: "┧",
|
303575
|
-
lineUpBoldDownLeft: "┦",
|
303576
|
-
lineUpDoubleDownDoubleLeftDouble: "╣",
|
303577
|
-
lineUpDoubleDownDoubleLeft: "╢",
|
303578
|
-
lineUpDownLeftDouble: "╡",
|
303579
|
-
lineUpDownRight: "├",
|
303580
|
-
lineUpBoldDownBoldRightBold: "┣",
|
303581
|
-
lineUpBoldDownBoldRight: "┠",
|
303582
|
-
lineUpDownRightBold: "┝",
|
303583
|
-
lineUpBoldDownRightBold: "┡",
|
303584
|
-
lineUpDownBoldRightBold: "┢",
|
303585
|
-
lineUpDownBoldRight: "┟",
|
303586
|
-
lineUpBoldDownRight: "┞",
|
303587
|
-
lineUpDoubleDownDoubleRightDouble: "╠",
|
303588
|
-
lineUpDoubleDownDoubleRight: "╟",
|
303589
|
-
lineUpDownRightDouble: "╞",
|
303590
|
-
lineDownLeftRight: "┬",
|
303591
|
-
lineDownBoldLeftBoldRightBold: "┳",
|
303592
|
-
lineDownLeftBoldRightBold: "┯",
|
303593
|
-
lineDownBoldLeftRight: "┰",
|
303594
|
-
lineDownBoldLeftBoldRight: "┱",
|
303595
|
-
lineDownBoldLeftRightBold: "┲",
|
303596
|
-
lineDownLeftRightBold: "┮",
|
303597
|
-
lineDownLeftBoldRight: "┭",
|
303598
|
-
lineDownDoubleLeftDoubleRightDouble: "╦",
|
303599
|
-
lineDownDoubleLeftRight: "╥",
|
303600
|
-
lineDownLeftDoubleRightDouble: "╤",
|
303601
|
-
lineUpLeftRight: "┴",
|
303602
|
-
lineUpBoldLeftBoldRightBold: "┻",
|
303603
|
-
lineUpLeftBoldRightBold: "┷",
|
303604
|
-
lineUpBoldLeftRight: "┸",
|
303605
|
-
lineUpBoldLeftBoldRight: "┹",
|
303606
|
-
lineUpBoldLeftRightBold: "┺",
|
303607
|
-
lineUpLeftRightBold: "┶",
|
303608
|
-
lineUpLeftBoldRight: "┵",
|
303609
|
-
lineUpDoubleLeftDoubleRightDouble: "╩",
|
303610
|
-
lineUpDoubleLeftRight: "╨",
|
303611
|
-
lineUpLeftDoubleRightDouble: "╧",
|
303612
|
-
lineUpDownLeftRight: "┼",
|
303613
|
-
lineUpBoldDownBoldLeftBoldRightBold: "╋",
|
303614
|
-
lineUpDownBoldLeftBoldRightBold: "╈",
|
303615
|
-
lineUpBoldDownLeftBoldRightBold: "╇",
|
303616
|
-
lineUpBoldDownBoldLeftRightBold: "╊",
|
303617
|
-
lineUpBoldDownBoldLeftBoldRight: "╉",
|
303618
|
-
lineUpBoldDownLeftRight: "╀",
|
303619
|
-
lineUpDownBoldLeftRight: "╁",
|
303620
|
-
lineUpDownLeftBoldRight: "┽",
|
303621
|
-
lineUpDownLeftRightBold: "┾",
|
303622
|
-
lineUpBoldDownBoldLeftRight: "╂",
|
303623
|
-
lineUpDownLeftBoldRightBold: "┿",
|
303624
|
-
lineUpBoldDownLeftBoldRight: "╃",
|
303625
|
-
lineUpBoldDownLeftRightBold: "╄",
|
303626
|
-
lineUpDownBoldLeftBoldRight: "╅",
|
303627
|
-
lineUpDownBoldLeftRightBold: "╆",
|
303628
|
-
lineUpDoubleDownDoubleLeftDoubleRightDouble: "╬",
|
303629
|
-
lineUpDoubleDownDoubleLeftRight: "╫",
|
303630
|
-
lineUpDownLeftDoubleRightDouble: "╪",
|
303631
|
-
lineCross: "╳",
|
303632
|
-
lineBackslash: "╲",
|
303633
|
-
lineSlash: "╱"
|
303634
|
-
};
|
303635
|
-
var specialMainSymbols2 = {
|
303636
|
-
tick: "✔",
|
303637
|
-
info: "ℹ",
|
303638
|
-
warning: "⚠",
|
303639
|
-
cross: "✘",
|
303640
|
-
squareSmall: "◻",
|
303641
|
-
squareSmallFilled: "◼",
|
303642
|
-
circle: "◯",
|
303643
|
-
circleFilled: "◉",
|
303644
|
-
circleDotted: "◌",
|
303645
|
-
circleDouble: "◎",
|
303646
|
-
circleCircle: "ⓞ",
|
303647
|
-
circleCross: "ⓧ",
|
303648
|
-
circlePipe: "Ⓘ",
|
303649
|
-
radioOn: "◉",
|
303650
|
-
radioOff: "◯",
|
303651
|
-
checkboxOn: "☒",
|
303652
|
-
checkboxOff: "☐",
|
303653
|
-
checkboxCircleOn: "ⓧ",
|
303654
|
-
checkboxCircleOff: "Ⓘ",
|
303655
|
-
pointer: "❯",
|
303656
|
-
triangleUpOutline: "△",
|
303657
|
-
triangleLeft: "◀",
|
303658
|
-
triangleRight: "▶",
|
303659
|
-
lozenge: "◆",
|
303660
|
-
lozengeOutline: "◇",
|
303661
|
-
hamburger: "☰",
|
303662
|
-
smiley: "㋡",
|
303663
|
-
mustache: "෴",
|
303664
|
-
star: "★",
|
303665
|
-
play: "▶",
|
303666
|
-
nodejs: "⬢",
|
303667
|
-
oneSeventh: "⅐",
|
303668
|
-
oneNinth: "⅑",
|
303669
|
-
oneTenth: "⅒"
|
303670
|
-
};
|
303671
|
-
var specialFallbackSymbols2 = {
|
303672
|
-
tick: "√",
|
303673
|
-
info: "i",
|
303674
|
-
warning: "‼",
|
303675
|
-
cross: "×",
|
303676
|
-
squareSmall: "□",
|
303677
|
-
squareSmallFilled: "■",
|
303678
|
-
circle: "( )",
|
303679
|
-
circleFilled: "(*)",
|
303680
|
-
circleDotted: "( )",
|
303681
|
-
circleDouble: "( )",
|
303682
|
-
circleCircle: "(○)",
|
303683
|
-
circleCross: "(×)",
|
303684
|
-
circlePipe: "(│)",
|
303685
|
-
radioOn: "(*)",
|
303686
|
-
radioOff: "( )",
|
303687
|
-
checkboxOn: "[×]",
|
303688
|
-
checkboxOff: "[ ]",
|
303689
|
-
checkboxCircleOn: "(×)",
|
303690
|
-
checkboxCircleOff: "( )",
|
303691
|
-
pointer: ">",
|
303692
|
-
triangleUpOutline: "∆",
|
303693
|
-
triangleLeft: "◄",
|
303694
|
-
triangleRight: "►",
|
303695
|
-
lozenge: "♦",
|
303696
|
-
lozengeOutline: "◊",
|
303697
|
-
hamburger: "≡",
|
303698
|
-
smiley: "☺",
|
303699
|
-
mustache: "┌─┐",
|
303700
|
-
star: "✶",
|
303701
|
-
play: "►",
|
303702
|
-
nodejs: "♦",
|
303703
|
-
oneSeventh: "1/7",
|
303704
|
-
oneNinth: "1/9",
|
303705
|
-
oneTenth: "1/10"
|
303706
|
-
};
|
303707
|
-
var mainSymbols2 = { ...common2, ...specialMainSymbols2 };
|
303708
|
-
var fallbackSymbols2 = {
|
303709
|
-
...common2,
|
303710
|
-
...specialFallbackSymbols2
|
303711
|
-
};
|
303712
|
-
var shouldUseMain2 = isUnicodeSupported3();
|
303713
|
-
var figures2 = shouldUseMain2 ? mainSymbols2 : fallbackSymbols2;
|
303714
|
-
var esm_default3 = figures2;
|
303715
|
-
var replacements2 = Object.entries(specialMainSymbols2);
|
303716
|
-
|
303717
|
-
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/theme.js
|
303718
|
-
var defaultTheme2 = {
|
303719
|
-
prefix: {
|
303720
|
-
idle: import_yoctocolors_cjs2.default.blue("?"),
|
303721
|
-
done: import_yoctocolors_cjs2.default.green(esm_default3.tick)
|
303722
|
-
},
|
303723
|
-
spinner: {
|
303724
|
-
interval: 80,
|
303725
|
-
frames: ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"].map((frame) => import_yoctocolors_cjs2.default.yellow(frame))
|
303726
|
-
},
|
303727
|
-
style: {
|
303728
|
-
answer: import_yoctocolors_cjs2.default.cyan,
|
303729
|
-
message: import_yoctocolors_cjs2.default.bold,
|
303730
|
-
error: (text2) => import_yoctocolors_cjs2.default.red(`> ${text2}`),
|
303731
|
-
defaultAnswer: (text2) => import_yoctocolors_cjs2.default.dim(`(${text2})`),
|
303732
|
-
help: import_yoctocolors_cjs2.default.dim,
|
303733
|
-
highlight: import_yoctocolors_cjs2.default.cyan,
|
303734
|
-
key: (text2) => import_yoctocolors_cjs2.default.cyan(import_yoctocolors_cjs2.default.bold(`<${text2}>`))
|
303735
|
-
}
|
303736
|
-
};
|
303737
|
-
|
303738
|
-
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/make-theme.js
|
303739
|
-
function isPlainObject6(value4) {
|
303740
|
-
if (typeof value4 !== "object" || value4 === null)
|
303741
|
-
return false;
|
303742
|
-
let proto = value4;
|
303743
|
-
while (Object.getPrototypeOf(proto) !== null) {
|
303744
|
-
proto = Object.getPrototypeOf(proto);
|
303745
|
-
}
|
303746
|
-
return Object.getPrototypeOf(value4) === proto;
|
303747
|
-
}
|
303748
|
-
function deepMerge3(...objects) {
|
303749
|
-
const output = {};
|
303750
|
-
for (const obj of objects) {
|
303751
|
-
for (const [key2, value4] of Object.entries(obj)) {
|
303752
|
-
const prevValue = output[key2];
|
303753
|
-
output[key2] = isPlainObject6(prevValue) && isPlainObject6(value4) ? deepMerge3(prevValue, value4) : value4;
|
303754
|
-
}
|
303755
|
-
}
|
303756
|
-
return output;
|
303757
|
-
}
|
303758
|
-
function makeTheme2(...themes) {
|
303759
|
-
const themesToMerge = [
|
303760
|
-
defaultTheme2,
|
303761
|
-
...themes.filter((theme) => theme != null)
|
303762
|
-
];
|
303763
|
-
return deepMerge3(...themesToMerge);
|
303764
|
-
}
|
303765
|
-
|
303766
|
-
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/use-prefix.js
|
303767
|
-
function usePrefix2({ status = "idle", theme }) {
|
303768
|
-
const [showLoader, setShowLoader] = useState2(false);
|
303769
|
-
const [tick, setTick] = useState2(0);
|
303770
|
-
const { prefix, spinner: spinner2 } = makeTheme2(theme);
|
303771
|
-
useEffect2(() => {
|
303772
|
-
if (status === "loading") {
|
303773
|
-
let tickInterval;
|
303774
|
-
let inc = -1;
|
303775
|
-
const delayTimeout = setTimeout(() => {
|
303776
|
-
setShowLoader(true);
|
303777
|
-
tickInterval = setInterval(() => {
|
303778
|
-
inc = inc + 1;
|
303779
|
-
setTick(inc % spinner2.frames.length);
|
303780
|
-
}, spinner2.interval);
|
303781
|
-
}, 300);
|
303782
|
-
return () => {
|
303783
|
-
clearTimeout(delayTimeout);
|
303784
|
-
clearInterval(tickInterval);
|
303785
|
-
};
|
303786
|
-
} else {
|
303787
|
-
setShowLoader(false);
|
303788
|
-
}
|
303789
|
-
}, [status]);
|
303790
|
-
if (showLoader) {
|
303791
|
-
return spinner2.frames[tick];
|
303792
|
-
}
|
303793
|
-
const iconName = status === "loading" ? "idle" : status;
|
303794
|
-
return typeof prefix === "string" ? prefix : prefix[iconName] ?? prefix["idle"];
|
303795
|
-
}
|
303796
|
-
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/use-memo.js
|
303797
|
-
function useMemo(fn, dependencies) {
|
303798
|
-
return withPointer2((pointer) => {
|
303799
|
-
const prev = pointer.get();
|
303800
|
-
if (!prev || prev.dependencies.length !== dependencies.length || prev.dependencies.some((dep, i6) => dep !== dependencies[i6])) {
|
303801
|
-
const value4 = fn();
|
303802
|
-
pointer.set({ value: value4, dependencies });
|
303803
|
-
return value4;
|
303804
|
-
}
|
303805
|
-
return prev.value;
|
303806
|
-
});
|
303807
|
-
}
|
303808
|
-
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/use-ref.js
|
303809
|
-
function useRef2(val) {
|
303810
|
-
return useState2({ current: val })[0];
|
303811
|
-
}
|
303812
|
-
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/use-keypress.js
|
303813
|
-
function useKeypress2(userHandler) {
|
303814
|
-
const signal = useRef2(userHandler);
|
303815
|
-
signal.current = userHandler;
|
303816
|
-
useEffect2((rl) => {
|
303817
|
-
let ignore = false;
|
303818
|
-
const handler = withUpdates2((_input, event) => {
|
303819
|
-
if (ignore)
|
303820
|
-
return;
|
303821
|
-
signal.current(event, rl);
|
303822
|
-
});
|
303823
|
-
rl.input.on("keypress", handler);
|
303824
|
-
return () => {
|
303825
|
-
ignore = true;
|
303826
|
-
rl.input.removeListener("keypress", handler);
|
303827
|
-
};
|
303828
|
-
}, []);
|
303829
|
-
}
|
303830
|
-
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/utils.js
|
303831
|
-
var import_cli_width2 = __toESM(require_cli_width(), 1);
|
303832
|
-
var import_wrap_ansi2 = __toESM(require_wrap_ansi(), 1);
|
303833
|
-
function breakLines2(content, width) {
|
303834
|
-
return content.split(`
|
303835
|
-
`).flatMap((line) => import_wrap_ansi2.default(line, width, { trim: false, hard: true }).split(`
|
303836
|
-
`).map((str) => str.trimEnd())).join(`
|
303837
|
-
`);
|
303838
|
-
}
|
303839
|
-
function readlineWidth2() {
|
303840
|
-
return import_cli_width2.default({ defaultWidth: 80, output: readline3().output });
|
303841
|
-
}
|
303842
|
-
|
303843
|
-
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/pagination/use-pagination.js
|
303844
|
-
function usePointerPosition({ active, renderedItems, pageSize, loop }) {
|
303845
|
-
const state = useRef2({
|
303846
|
-
lastPointer: active,
|
303847
|
-
lastActive: undefined
|
303848
|
-
});
|
303849
|
-
const { lastPointer, lastActive } = state.current;
|
303850
|
-
const middle = Math.floor(pageSize / 2);
|
303851
|
-
const renderedLength = renderedItems.reduce((acc, item) => acc + item.length, 0);
|
303852
|
-
const defaultPointerPosition = renderedItems.slice(0, active).reduce((acc, item) => acc + item.length, 0);
|
303853
|
-
let pointer = defaultPointerPosition;
|
303854
|
-
if (renderedLength > pageSize) {
|
303855
|
-
if (loop) {
|
303856
|
-
pointer = lastPointer;
|
303857
|
-
if (lastActive != null && lastActive < active && active - lastActive < pageSize) {
|
303858
|
-
pointer = Math.min(middle, Math.abs(active - lastActive) === 1 ? Math.min(lastPointer + (renderedItems[lastActive]?.length ?? 0), Math.max(defaultPointerPosition, lastPointer)) : lastPointer + active - lastActive);
|
303859
|
-
}
|
303860
|
-
} else {
|
303861
|
-
const spaceUnderActive = renderedItems.slice(active).reduce((acc, item) => acc + item.length, 0);
|
303862
|
-
pointer = spaceUnderActive < pageSize - middle ? pageSize - spaceUnderActive : Math.min(defaultPointerPosition, middle);
|
303863
|
-
}
|
303864
|
-
}
|
303865
|
-
state.current.lastPointer = pointer;
|
303866
|
-
state.current.lastActive = active;
|
303867
|
-
return pointer;
|
303868
|
-
}
|
303869
|
-
function usePagination({ items, active, renderItem, pageSize, loop = true }) {
|
303870
|
-
const width = readlineWidth2();
|
303871
|
-
const bound = (num) => (num % items.length + items.length) % items.length;
|
303872
|
-
const renderedItems = items.map((item, index) => {
|
303873
|
-
if (item == null)
|
303874
|
-
return [];
|
303875
|
-
return breakLines2(renderItem({ item, index, isActive: index === active }), width).split(`
|
303876
|
-
`);
|
303877
|
-
});
|
303878
|
-
const renderedLength = renderedItems.reduce((acc, item) => acc + item.length, 0);
|
303879
|
-
const renderItemAtIndex = (index) => renderedItems[index] ?? [];
|
303880
|
-
const pointer = usePointerPosition({ active, renderedItems, pageSize, loop });
|
303881
|
-
const activeItem = renderItemAtIndex(active).slice(0, pageSize);
|
303882
|
-
const activeItemPosition = pointer + activeItem.length <= pageSize ? pointer : pageSize - activeItem.length;
|
303883
|
-
const pageBuffer = Array.from({ length: pageSize });
|
303884
|
-
pageBuffer.splice(activeItemPosition, activeItem.length, ...activeItem);
|
303885
|
-
const itemVisited = new Set([active]);
|
303886
|
-
let bufferPointer = activeItemPosition + activeItem.length;
|
303887
|
-
let itemPointer = bound(active + 1);
|
303888
|
-
while (bufferPointer < pageSize && !itemVisited.has(itemPointer) && (loop && renderedLength > pageSize ? itemPointer !== active : itemPointer > active)) {
|
303889
|
-
const lines = renderItemAtIndex(itemPointer);
|
303890
|
-
const linesToAdd = lines.slice(0, pageSize - bufferPointer);
|
303891
|
-
pageBuffer.splice(bufferPointer, linesToAdd.length, ...linesToAdd);
|
303892
|
-
itemVisited.add(itemPointer);
|
303893
|
-
bufferPointer += linesToAdd.length;
|
303894
|
-
itemPointer = bound(itemPointer + 1);
|
303895
|
-
}
|
303896
|
-
bufferPointer = activeItemPosition - 1;
|
303897
|
-
itemPointer = bound(active - 1);
|
303898
|
-
while (bufferPointer >= 0 && !itemVisited.has(itemPointer) && (loop && renderedLength > pageSize ? itemPointer !== active : itemPointer < active)) {
|
303899
|
-
const lines = renderItemAtIndex(itemPointer);
|
303900
|
-
const linesToAdd = lines.slice(Math.max(0, lines.length - bufferPointer - 1));
|
303901
|
-
pageBuffer.splice(bufferPointer - linesToAdd.length + 1, linesToAdd.length, ...linesToAdd);
|
303902
|
-
itemVisited.add(itemPointer);
|
303903
|
-
bufferPointer -= linesToAdd.length;
|
303904
|
-
itemPointer = bound(itemPointer - 1);
|
303905
|
-
}
|
303906
|
-
return pageBuffer.filter((line) => typeof line === "string").join(`
|
303907
|
-
`);
|
303908
|
-
}
|
303909
|
-
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
|
303910
|
-
var import_mute_stream2 = __toESM(require_lib(), 1);
|
303911
|
-
import * as readline4 from "node:readline";
|
303912
|
-
import { AsyncResource as AsyncResource6 } from "node:async_hooks";
|
303913
|
-
|
303914
|
-
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/screen-manager.js
|
303915
|
-
var import_ansi_escapes2 = __toESM(require_ansi_escapes(), 1);
|
303916
|
-
import { stripVTControlCharacters as stripVTControlCharacters3 } from "node:util";
|
303917
|
-
var height2 = (content) => content.split(`
|
303918
|
-
`).length;
|
303919
|
-
var lastLine2 = (content) => content.split(`
|
303920
|
-
`).pop() ?? "";
|
303921
|
-
function cursorDown2(n6) {
|
303922
|
-
return n6 > 0 ? import_ansi_escapes2.default.cursorDown(n6) : "";
|
303923
|
-
}
|
303924
|
-
|
303925
|
-
class ScreenManager2 {
|
303926
|
-
height = 0;
|
303927
|
-
extraLinesUnderPrompt = 0;
|
303928
|
-
cursorPos;
|
303929
|
-
rl;
|
303930
|
-
constructor(rl) {
|
303931
|
-
this.rl = rl;
|
303932
|
-
this.cursorPos = rl.getCursorPos();
|
303933
|
-
}
|
303934
|
-
write(content) {
|
303935
|
-
this.rl.output.unmute();
|
303936
|
-
this.rl.output.write(content);
|
303937
|
-
this.rl.output.mute();
|
303938
|
-
}
|
303939
|
-
render(content, bottomContent = "") {
|
303940
|
-
const promptLine = lastLine2(content);
|
303941
|
-
const rawPromptLine = stripVTControlCharacters3(promptLine);
|
303942
|
-
let prompt = rawPromptLine;
|
303943
|
-
if (this.rl.line.length > 0) {
|
303944
|
-
prompt = prompt.slice(0, -this.rl.line.length);
|
303945
|
-
}
|
303946
|
-
this.rl.setPrompt(prompt);
|
303947
|
-
this.cursorPos = this.rl.getCursorPos();
|
303948
|
-
const width = readlineWidth2();
|
303949
|
-
content = breakLines2(content, width);
|
303950
|
-
bottomContent = breakLines2(bottomContent, width);
|
303951
|
-
if (rawPromptLine.length % width === 0) {
|
303952
|
-
content += `
|
303953
|
-
`;
|
303954
|
-
}
|
303955
|
-
let output = content + (bottomContent ? `
|
303956
|
-
` + bottomContent : "");
|
303957
|
-
const promptLineUpDiff = Math.floor(rawPromptLine.length / width) - this.cursorPos.rows;
|
303958
|
-
const bottomContentHeight = promptLineUpDiff + (bottomContent ? height2(bottomContent) : 0);
|
303959
|
-
if (bottomContentHeight > 0)
|
303960
|
-
output += import_ansi_escapes2.default.cursorUp(bottomContentHeight);
|
303961
|
-
output += import_ansi_escapes2.default.cursorTo(this.cursorPos.cols);
|
303962
|
-
this.write(cursorDown2(this.extraLinesUnderPrompt) + import_ansi_escapes2.default.eraseLines(this.height) + output);
|
303963
|
-
this.extraLinesUnderPrompt = bottomContentHeight;
|
303964
|
-
this.height = height2(output);
|
303965
|
-
}
|
303966
|
-
checkCursorPos() {
|
303967
|
-
const cursorPos = this.rl.getCursorPos();
|
303968
|
-
if (cursorPos.cols !== this.cursorPos.cols) {
|
303969
|
-
this.write(import_ansi_escapes2.default.cursorTo(cursorPos.cols));
|
303970
|
-
this.cursorPos = cursorPos;
|
303971
|
-
}
|
303972
|
-
}
|
303973
|
-
done({ clearContent }) {
|
303974
|
-
this.rl.setPrompt("");
|
303975
|
-
let output = cursorDown2(this.extraLinesUnderPrompt);
|
303976
|
-
output += clearContent ? import_ansi_escapes2.default.eraseLines(this.height) : `
|
303977
|
-
`;
|
303978
|
-
output += import_ansi_escapes2.default.cursorShow;
|
303979
|
-
this.write(output);
|
303980
|
-
this.rl.close();
|
303981
|
-
}
|
303982
|
-
}
|
303983
|
-
|
303984
|
-
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/promise-polyfill.js
|
303985
|
-
class PromisePolyfill2 extends Promise {
|
303986
|
-
static withResolver() {
|
303987
|
-
let resolve5;
|
303988
|
-
let reject;
|
303989
|
-
const promise4 = new Promise((res, rej) => {
|
303990
|
-
resolve5 = res;
|
303991
|
-
reject = rej;
|
303992
|
-
});
|
303993
|
-
return { promise: promise4, resolve: resolve5, reject };
|
303994
|
-
}
|
303995
|
-
}
|
303996
|
-
|
303997
|
-
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
|
303998
|
-
function getCallSites2() {
|
303999
|
-
const _prepareStackTrace = Error.prepareStackTrace;
|
304000
|
-
let result = [];
|
304001
|
-
try {
|
304002
|
-
Error.prepareStackTrace = (_5, callSites) => {
|
304003
|
-
const callSitesWithoutCurrent = callSites.slice(1);
|
304004
|
-
result = callSitesWithoutCurrent;
|
304005
|
-
return callSitesWithoutCurrent;
|
304006
|
-
};
|
304007
|
-
new Error().stack;
|
304008
|
-
} catch {
|
304009
|
-
return result;
|
304010
|
-
}
|
304011
|
-
Error.prepareStackTrace = _prepareStackTrace;
|
304012
|
-
return result;
|
304013
|
-
}
|
304014
|
-
function createPrompt2(view) {
|
304015
|
-
const callSites = getCallSites2();
|
304016
|
-
const prompt = (config4, context = {}) => {
|
304017
|
-
const { input = process.stdin, signal } = context;
|
304018
|
-
const cleanups = new Set;
|
304019
|
-
const output = new import_mute_stream2.default;
|
304020
|
-
output.pipe(context.output ?? process.stdout);
|
304021
|
-
const rl = readline4.createInterface({
|
304022
|
-
terminal: true,
|
304023
|
-
input,
|
304024
|
-
output
|
304025
|
-
});
|
304026
|
-
const screen = new ScreenManager2(rl);
|
304027
|
-
const { promise: promise4, resolve: resolve5, reject } = PromisePolyfill2.withResolver();
|
304028
|
-
const cancel3 = () => reject(new CancelPromptError2);
|
304029
|
-
if (signal) {
|
304030
|
-
const abort = () => reject(new AbortPromptError2({ cause: signal.reason }));
|
304031
|
-
if (signal.aborted) {
|
304032
|
-
abort();
|
304033
|
-
return Object.assign(promise4, { cancel: cancel3 });
|
304034
|
-
}
|
304035
|
-
signal.addEventListener("abort", abort);
|
304036
|
-
cleanups.add(() => signal.removeEventListener("abort", abort));
|
304037
|
-
}
|
304038
|
-
cleanups.add(onExit((code2, signal2) => {
|
304039
|
-
reject(new ExitPromptError2(`User force closed the prompt with ${code2} ${signal2}`));
|
304040
|
-
}));
|
304041
|
-
const sigint = () => reject(new ExitPromptError2(`User force closed the prompt with SIGINT`));
|
304042
|
-
rl.on("SIGINT", sigint);
|
304043
|
-
cleanups.add(() => rl.removeListener("SIGINT", sigint));
|
304044
|
-
const checkCursorPos = () => screen.checkCursorPos();
|
304045
|
-
rl.input.on("keypress", checkCursorPos);
|
304046
|
-
cleanups.add(() => rl.input.removeListener("keypress", checkCursorPos));
|
304047
|
-
return withHooks2(rl, (cycle) => {
|
304048
|
-
const hooksCleanup = AsyncResource6.bind(() => effectScheduler2.clearAll());
|
304049
|
-
rl.on("close", hooksCleanup);
|
304050
|
-
cleanups.add(() => rl.removeListener("close", hooksCleanup));
|
304051
|
-
cycle(() => {
|
304052
|
-
try {
|
304053
|
-
const nextView = view(config4, (value4) => {
|
304054
|
-
setImmediate(() => resolve5(value4));
|
304055
|
-
});
|
304056
|
-
if (nextView === undefined) {
|
304057
|
-
const callerFilename = callSites[1]?.getFileName();
|
304058
|
-
throw new Error(`Prompt functions must return a string.
|
304059
|
-
at ${callerFilename}`);
|
304060
|
-
}
|
304061
|
-
const [content, bottomContent] = typeof nextView === "string" ? [nextView] : nextView;
|
304062
|
-
screen.render(content, bottomContent);
|
304063
|
-
effectScheduler2.run();
|
304064
|
-
} catch (error44) {
|
304065
|
-
reject(error44);
|
304066
|
-
}
|
304067
|
-
});
|
304068
|
-
return Object.assign(promise4.then((answer) => {
|
304069
|
-
effectScheduler2.clearAll();
|
304070
|
-
return answer;
|
304071
|
-
}, (error44) => {
|
304072
|
-
effectScheduler2.clearAll();
|
304073
|
-
throw error44;
|
304074
|
-
}).finally(() => {
|
304075
|
-
cleanups.forEach((cleanup) => cleanup());
|
304076
|
-
screen.done({ clearContent: Boolean(context.clearPromptOnDone) });
|
304077
|
-
output.end();
|
304078
|
-
}).then(() => promise4), { cancel: cancel3 });
|
304079
|
-
});
|
304080
|
-
};
|
304081
|
-
return prompt;
|
304082
|
-
}
|
304083
|
-
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/Separator.js
|
304084
|
-
var import_yoctocolors_cjs3 = __toESM(require_yoctocolors_cjs(), 1);
|
304085
|
-
class Separator {
|
304086
|
-
separator = import_yoctocolors_cjs3.default.dim(Array.from({ length: 15 }).join(esm_default3.line));
|
304087
|
-
type = "separator";
|
304088
|
-
constructor(separator) {
|
304089
|
-
if (separator) {
|
304090
|
-
this.separator = separator;
|
304091
|
-
}
|
304092
|
-
}
|
304093
|
-
static isSeparator(choice) {
|
304094
|
-
return Boolean(choice && typeof choice === "object" && "type" in choice && choice.type === "separator");
|
304095
|
-
}
|
304096
|
-
}
|
304097
303352
|
// ../../node_modules/@inquirer/select/dist/esm/index.js
|
304098
|
-
var
|
304099
|
-
var
|
303353
|
+
var import_yoctocolors_cjs3 = __toESM(require_yoctocolors_cjs(), 1);
|
303354
|
+
var import_ansi_escapes2 = __toESM(require_ansi_escapes(), 1);
|
304100
303355
|
var selectTheme = {
|
304101
|
-
icon: { cursor:
|
303356
|
+
icon: { cursor: esm_default.pointer },
|
304102
303357
|
style: {
|
304103
|
-
disabled: (text2) =>
|
304104
|
-
description: (text2) =>
|
303358
|
+
disabled: (text2) => import_yoctocolors_cjs3.default.dim(`- ${text2}`),
|
303359
|
+
description: (text2) => import_yoctocolors_cjs3.default.cyan(text2)
|
304105
303360
|
},
|
304106
303361
|
helpMode: "auto",
|
304107
303362
|
indexMode: "hidden"
|
@@ -304134,19 +303389,19 @@ function normalizeChoices(choices) {
|
|
304134
303389
|
return normalizedChoice;
|
304135
303390
|
});
|
304136
303391
|
}
|
304137
|
-
var
|
303392
|
+
var esm_default3 = createPrompt((config4, done) => {
|
304138
303393
|
const { loop = true, pageSize = 7 } = config4;
|
304139
|
-
const firstRender =
|
304140
|
-
const theme =
|
304141
|
-
const [status, setStatus] =
|
304142
|
-
const prefix =
|
304143
|
-
const searchTimeoutRef =
|
303394
|
+
const firstRender = useRef(true);
|
303395
|
+
const theme = makeTheme(selectTheme, config4.theme);
|
303396
|
+
const [status, setStatus] = useState("idle");
|
303397
|
+
const prefix = usePrefix({ status, theme });
|
303398
|
+
const searchTimeoutRef = useRef();
|
304144
303399
|
const items = useMemo(() => normalizeChoices(config4.choices), [config4.choices]);
|
304145
303400
|
const bounds = useMemo(() => {
|
304146
303401
|
const first = items.findIndex(isSelectable);
|
304147
303402
|
const last = items.findLastIndex(isSelectable);
|
304148
303403
|
if (first === -1) {
|
304149
|
-
throw new
|
303404
|
+
throw new ValidationError("[select prompt] No selectable choices. All choices are disabled.");
|
304150
303405
|
}
|
304151
303406
|
return { first, last };
|
304152
303407
|
}, [items]);
|
@@ -304155,25 +303410,32 @@ var esm_default4 = createPrompt2((config4, done) => {
|
|
304155
303410
|
return -1;
|
304156
303411
|
return items.findIndex((item) => isSelectable(item) && item.value === config4.default);
|
304157
303412
|
}, [config4.default, items]);
|
304158
|
-
const [active, setActive] =
|
303413
|
+
const [active, setActive] = useState(defaultItemIndex === -1 ? bounds.first : defaultItemIndex);
|
304159
303414
|
const selectedChoice = items[active];
|
304160
|
-
|
303415
|
+
useKeypress((key2, rl) => {
|
304161
303416
|
clearTimeout(searchTimeoutRef.current);
|
304162
|
-
if (
|
303417
|
+
if (isEnterKey(key2)) {
|
304163
303418
|
setStatus("done");
|
304164
303419
|
done(selectedChoice.value);
|
304165
|
-
} else if (isUpKey(
|
303420
|
+
} else if (isUpKey(key2) || isDownKey(key2)) {
|
304166
303421
|
rl.clearLine(0);
|
304167
|
-
if (loop || isUpKey(
|
304168
|
-
const offset = isUpKey(
|
303422
|
+
if (loop || isUpKey(key2) && active !== bounds.first || isDownKey(key2) && active !== bounds.last) {
|
303423
|
+
const offset = isUpKey(key2) ? -1 : 1;
|
304169
303424
|
let next = active;
|
304170
303425
|
do {
|
304171
303426
|
next = (next + offset + items.length) % items.length;
|
304172
303427
|
} while (!isSelectable(items[next]));
|
304173
303428
|
setActive(next);
|
304174
303429
|
}
|
304175
|
-
} else if (isNumberKey(
|
304176
|
-
const
|
303430
|
+
} else if (isNumberKey(key2) && !Number.isNaN(Number(rl.line))) {
|
303431
|
+
const selectedIndex = Number(rl.line) - 1;
|
303432
|
+
let selectableIndex = -1;
|
303433
|
+
const position = items.findIndex((item2) => {
|
303434
|
+
if (Separator.isSeparator(item2))
|
303435
|
+
return false;
|
303436
|
+
selectableIndex++;
|
303437
|
+
return selectableIndex === selectedIndex;
|
303438
|
+
});
|
304177
303439
|
const item = items[position];
|
304178
303440
|
if (item != null && isSelectable(item)) {
|
304179
303441
|
setActive(position);
|
@@ -304181,7 +303443,7 @@ var esm_default4 = createPrompt2((config4, done) => {
|
|
304181
303443
|
searchTimeoutRef.current = setTimeout(() => {
|
304182
303444
|
rl.clearLine(0);
|
304183
303445
|
}, 700);
|
304184
|
-
} else if (
|
303446
|
+
} else if (isBackspaceKey(key2)) {
|
304185
303447
|
rl.clearLine(0);
|
304186
303448
|
} else {
|
304187
303449
|
const searchTerm = rl.line.toLowerCase();
|
@@ -304198,7 +303460,7 @@ var esm_default4 = createPrompt2((config4, done) => {
|
|
304198
303460
|
}, 700);
|
304199
303461
|
}
|
304200
303462
|
});
|
304201
|
-
|
303463
|
+
useEffect(() => () => {
|
304202
303464
|
clearTimeout(searchTimeoutRef.current);
|
304203
303465
|
}, []);
|
304204
303466
|
const message = theme.style.message(config4.message, status);
|
@@ -304213,14 +303475,16 @@ ${theme.style.help(`(${config4.instructions?.pager ?? "Use arrow keys to reveal
|
|
304213
303475
|
helpTipTop = theme.style.help(`(${config4.instructions?.navigation ?? "Use arrow keys"})`);
|
304214
303476
|
}
|
304215
303477
|
}
|
303478
|
+
let separatorCount = 0;
|
304216
303479
|
const page = usePagination({
|
304217
303480
|
items,
|
304218
303481
|
active,
|
304219
303482
|
renderItem({ item, isActive, index }) {
|
304220
303483
|
if (Separator.isSeparator(item)) {
|
303484
|
+
separatorCount++;
|
304221
303485
|
return ` ${item.separator}`;
|
304222
303486
|
}
|
304223
|
-
const indexLabel = theme.indexMode === "number" ? `${index + 1}. ` : "";
|
303487
|
+
const indexLabel = theme.indexMode === "number" ? `${index + 1 - separatorCount}. ` : "";
|
304224
303488
|
if (item.disabled) {
|
304225
303489
|
const disabledLabel = typeof item.disabled === "string" ? item.disabled : "(disabled)";
|
304226
303490
|
return theme.style.disabled(`${indexLabel}${item.name} ${disabledLabel}`);
|
@@ -304238,7 +303502,7 @@ ${theme.style.help(`(${config4.instructions?.pager ?? "Use arrow keys to reveal
|
|
304238
303502
|
const choiceDescription = selectedChoice.description ? `
|
304239
303503
|
${theme.style.description(selectedChoice.description)}` : ``;
|
304240
303504
|
return `${[prefix, message, helpTipTop].filter(Boolean).join(" ")}
|
304241
|
-
${page}${helpTipBottom}${choiceDescription}${
|
303505
|
+
${page}${helpTipBottom}${choiceDescription}${import_ansi_escapes2.default.cursorHide}`;
|
304242
303506
|
});
|
304243
303507
|
|
304244
303508
|
// src/prompts/smart-contract-set/subgraph.prompt.ts
|
@@ -304292,7 +303556,7 @@ async function subgraphPrompt({
|
|
304292
303556
|
} else {
|
304293
303557
|
defaultChoice = env2.SETTLEMINT_THEGRAPH_DEFAULT_SUBGRAPH ?? subgraphNames[0];
|
304294
303558
|
}
|
304295
|
-
const subgraphName = choices.length === 1 && choices[0] === NEW ? NEW : await
|
303559
|
+
const subgraphName = choices.length === 1 && choices[0] === NEW ? NEW : await esm_default3({
|
304296
303560
|
message,
|
304297
303561
|
choices: choices.map((name3) => ({
|
304298
303562
|
name: name3,
|
@@ -305822,14 +305086,14 @@ function includesArgs(parameters) {
|
|
305822
305086
|
});
|
305823
305087
|
}
|
305824
305088
|
if (typeof args === "object" && !Array.isArray(args) && typeof matchArgs === "object" && !Array.isArray(matchArgs))
|
305825
|
-
return Object.entries(matchArgs).every(([
|
305089
|
+
return Object.entries(matchArgs).every(([key2, value4]) => {
|
305826
305090
|
if (value4 === null || value4 === undefined)
|
305827
305091
|
return true;
|
305828
|
-
const input = inputs.find((input2) => input2.name ===
|
305092
|
+
const input = inputs.find((input2) => input2.name === key2);
|
305829
305093
|
if (!input)
|
305830
305094
|
return false;
|
305831
305095
|
const value_ = Array.isArray(value4) ? value4 : [value4];
|
305832
|
-
return value_.some((value5) => isEqual(input, value5, args[
|
305096
|
+
return value_.some((value5) => isEqual(input, value5, args[key2]));
|
305833
305097
|
});
|
305834
305098
|
return false;
|
305835
305099
|
}
|
@@ -306028,13 +305292,13 @@ function observe(observerId, callbacks, fn) {
|
|
306028
305292
|
if (listeners && listeners.length > 0)
|
306029
305293
|
return unwatch;
|
306030
305294
|
const emit = {};
|
306031
|
-
for (const
|
306032
|
-
emit[
|
305295
|
+
for (const key2 in callbacks) {
|
305296
|
+
emit[key2] = (...args) => {
|
306033
305297
|
const listeners2 = getListeners();
|
306034
305298
|
if (listeners2.length === 0)
|
306035
305299
|
return;
|
306036
305300
|
for (const listener of listeners2)
|
306037
|
-
listener.fns[
|
305301
|
+
listener.fns[key2]?.(...args);
|
306038
305302
|
};
|
306039
305303
|
}
|
306040
305304
|
const cleanup = fn(emit);
|
@@ -306373,7 +305637,7 @@ function uid(length = 11) {
|
|
306373
305637
|
|
306374
305638
|
// ../../node_modules/viem/_esm/clients/createClient.js
|
306375
305639
|
function createClient(parameters) {
|
306376
|
-
const { batch, chain, ccipRead, key:
|
305640
|
+
const { batch, chain, ccipRead, key: key2 = "base", name: name3 = "Base Client", type: type4 = "base" } = parameters;
|
306377
305641
|
const experimental_blockTag = parameters.experimental_blockTag ?? (typeof chain?.experimental_preconfirmationTime === "number" ? "pending" : undefined);
|
306378
305642
|
const blockTime = chain?.blockTime ?? 12000;
|
306379
305643
|
const defaultPollingInterval = Math.min(Math.max(Math.floor(blockTime / 2), 500), 4000);
|
@@ -306391,7 +305655,7 @@ function createClient(parameters) {
|
|
306391
305655
|
cacheTime,
|
306392
305656
|
ccipRead,
|
306393
305657
|
chain,
|
306394
|
-
key:
|
305658
|
+
key: key2,
|
306395
305659
|
name: name3,
|
306396
305660
|
pollingInterval,
|
306397
305661
|
request: request2,
|
@@ -306403,8 +305667,8 @@ function createClient(parameters) {
|
|
306403
305667
|
function extend4(base2) {
|
306404
305668
|
return (extendFn) => {
|
306405
305669
|
const extended = extendFn(base2);
|
306406
|
-
for (const
|
306407
|
-
delete extended[
|
305670
|
+
for (const key3 in client)
|
305671
|
+
delete extended[key3];
|
306408
305672
|
const combined = { ...base2, ...extended };
|
306409
305673
|
return Object.assign(combined, { extend: extend4(combined) });
|
306410
305674
|
};
|
@@ -306584,11 +305848,11 @@ function shouldRetry(error44) {
|
|
306584
305848
|
}
|
306585
305849
|
|
306586
305850
|
// ../../node_modules/viem/_esm/clients/transports/createTransport.js
|
306587
|
-
function createTransport({ key:
|
305851
|
+
function createTransport({ key: key2, methods, name: name3, request: request2, retryCount = 3, retryDelay = 150, timeout, type: type4 }, value4) {
|
306588
305852
|
const uid2 = uid();
|
306589
305853
|
return {
|
306590
305854
|
config: {
|
306591
|
-
key:
|
305855
|
+
key: key2,
|
306592
305856
|
methods,
|
306593
305857
|
name: name3,
|
306594
305858
|
request: request2,
|
@@ -306745,7 +306009,7 @@ function getHttpRpcClient(url4, options = {}) {
|
|
306745
306009
|
|
306746
306010
|
// ../../node_modules/viem/_esm/clients/transports/http.js
|
306747
306011
|
function http(url4, config4 = {}) {
|
306748
|
-
const { batch, fetchOptions, key:
|
306012
|
+
const { batch, fetchOptions, key: key2 = "http", methods, name: name3 = "HTTP JSON-RPC", onFetchRequest, onFetchResponse, retryDelay, raw } = config4;
|
306749
306013
|
return ({ chain, retryCount: retryCount_, timeout: timeout_ }) => {
|
306750
306014
|
const { batchSize = 1000, wait: wait2 = 0 } = typeof batch === "object" ? batch : {};
|
306751
306015
|
const retryCount = config4.retryCount ?? retryCount_;
|
@@ -306760,7 +306024,7 @@ function http(url4, config4 = {}) {
|
|
306760
306024
|
timeout
|
306761
306025
|
});
|
306762
306026
|
return createTransport({
|
306763
|
-
key:
|
306027
|
+
key: key2,
|
306764
306028
|
methods,
|
306765
306029
|
name: name3,
|
306766
306030
|
async request({ method, params }) {
|
@@ -307211,7 +306475,7 @@ init_getChainContractAddress();
|
|
307211
306475
|
init_toHex();
|
307212
306476
|
init_localBatchGatewayRequest();
|
307213
306477
|
async function getEnsText(client, parameters) {
|
307214
|
-
const { blockNumber, blockTag, key:
|
306478
|
+
const { blockNumber, blockTag, key: key2, name: name3, gatewayUrls, strict } = parameters;
|
307215
306479
|
const { chain } = client;
|
307216
306480
|
const universalResolverAddress = (() => {
|
307217
306481
|
if (parameters.universalResolverAddress)
|
@@ -307237,7 +306501,7 @@ async function getEnsText(client, parameters) {
|
|
307237
306501
|
encodeFunctionData({
|
307238
306502
|
abi: textResolverAbi,
|
307239
306503
|
functionName: "text",
|
307240
|
-
args: [namehash(name3),
|
306504
|
+
args: [namehash(name3), key2]
|
307241
306505
|
}),
|
307242
306506
|
gatewayUrls ?? [localBatchGatewayUrl]
|
307243
306507
|
],
|
@@ -308260,16 +307524,16 @@ class LruMap2 extends Map {
|
|
308260
307524
|
});
|
308261
307525
|
this.maxSize = size5;
|
308262
307526
|
}
|
308263
|
-
get(
|
308264
|
-
const value4 = super.get(
|
308265
|
-
if (super.has(
|
308266
|
-
this.delete(
|
308267
|
-
super.set(
|
307527
|
+
get(key2) {
|
307528
|
+
const value4 = super.get(key2);
|
307529
|
+
if (super.has(key2) && value4 !== undefined) {
|
307530
|
+
this.delete(key2);
|
307531
|
+
super.set(key2, value4);
|
308268
307532
|
}
|
308269
307533
|
return value4;
|
308270
307534
|
}
|
308271
|
-
set(
|
308272
|
-
super.set(
|
307535
|
+
set(key2, value4) {
|
307536
|
+
super.set(key2, value4);
|
308273
307537
|
if (this.maxSize && this.size > this.maxSize) {
|
308274
307538
|
const firstKey = this.keys().next().value;
|
308275
307539
|
if (firstKey)
|
@@ -310129,10 +309393,10 @@ function publicActions(client) {
|
|
310129
309393
|
|
310130
309394
|
// ../../node_modules/viem/_esm/clients/createPublicClient.js
|
310131
309395
|
function createPublicClient(parameters) {
|
310132
|
-
const { key:
|
309396
|
+
const { key: key2 = "public", name: name3 = "Public Client" } = parameters;
|
310133
309397
|
const client = createClient({
|
310134
309398
|
...parameters,
|
310135
|
-
key:
|
309399
|
+
key: key2,
|
310136
309400
|
name: name3,
|
310137
309401
|
type: "publicClient"
|
310138
309402
|
});
|
@@ -310233,7 +309497,7 @@ __export4(util_exports3, {
|
|
310233
309497
|
getParsedType: () => getParsedType4,
|
310234
309498
|
getSizableOrigin: () => getSizableOrigin4,
|
310235
309499
|
isObject: () => isObject4,
|
310236
|
-
isPlainObject: () =>
|
309500
|
+
isPlainObject: () => isPlainObject6,
|
310237
309501
|
issue: () => issue4,
|
310238
309502
|
joinValues: () => joinValues4,
|
310239
309503
|
jsonStringifyReplacer: () => jsonStringifyReplacer4,
|
@@ -310305,19 +309569,19 @@ function floatSafeRemainder4(val, step) {
|
|
310305
309569
|
const stepInt = Number.parseInt(step.toFixed(decCount).replace(".", ""));
|
310306
309570
|
return valInt % stepInt / 10 ** decCount;
|
310307
309571
|
}
|
310308
|
-
function defineLazy4(object$1,
|
309572
|
+
function defineLazy4(object$1, key2, getter) {
|
310309
309573
|
const set$1 = false;
|
310310
|
-
Object.defineProperty(object$1,
|
309574
|
+
Object.defineProperty(object$1, key2, {
|
310311
309575
|
get() {
|
310312
309576
|
if (!set$1) {
|
310313
309577
|
const value4 = getter();
|
310314
|
-
object$1[
|
309578
|
+
object$1[key2] = value4;
|
310315
309579
|
return value4;
|
310316
309580
|
}
|
310317
309581
|
throw new Error("cached value already set");
|
310318
309582
|
},
|
310319
309583
|
set(v6) {
|
310320
|
-
Object.defineProperty(object$1,
|
309584
|
+
Object.defineProperty(object$1, key2, { value: v6 });
|
310321
309585
|
},
|
310322
309586
|
configurable: true
|
310323
309587
|
});
|
@@ -310333,11 +309597,11 @@ function assignProp4(target, prop, value4) {
|
|
310333
309597
|
function getElementAtPath4(obj, path7) {
|
310334
309598
|
if (!path7)
|
310335
309599
|
return obj;
|
310336
|
-
return path7.reduce((acc,
|
309600
|
+
return path7.reduce((acc, key2) => acc?.[key2], obj);
|
310337
309601
|
}
|
310338
309602
|
function promiseAllObject4(promisesObj) {
|
310339
309603
|
const keys = Object.keys(promisesObj);
|
310340
|
-
const promises = keys.map((
|
309604
|
+
const promises = keys.map((key2) => promisesObj[key2]);
|
310341
309605
|
return Promise.all(promises).then((results) => {
|
310342
309606
|
const resolvedObj = {};
|
310343
309607
|
for (let i6 = 0;i6 < keys.length; i6++) {
|
@@ -310369,7 +309633,7 @@ var allowsEval4 = cached4(() => {
|
|
310369
309633
|
return false;
|
310370
309634
|
}
|
310371
309635
|
});
|
310372
|
-
function
|
309636
|
+
function isPlainObject6(o8) {
|
310373
309637
|
if (isObject4(o8) === false)
|
310374
309638
|
return false;
|
310375
309639
|
const ctor = o8.constructor;
|
@@ -310385,8 +309649,8 @@ function isPlainObject7(o8) {
|
|
310385
309649
|
}
|
310386
309650
|
function numKeys4(data) {
|
310387
309651
|
let keyCount = 0;
|
310388
|
-
for (const
|
310389
|
-
if (Object.prototype.hasOwnProperty.call(data,
|
309652
|
+
for (const key2 in data) {
|
309653
|
+
if (Object.prototype.hasOwnProperty.call(data, key2)) {
|
310390
309654
|
keyCount++;
|
310391
309655
|
}
|
310392
309656
|
}
|
@@ -310536,13 +309800,13 @@ var BIGINT_FORMAT_RANGES4 = {
|
|
310536
309800
|
function pick4(schema, mask) {
|
310537
309801
|
const newShape = {};
|
310538
309802
|
const currDef = schema._zod.def;
|
310539
|
-
for (const
|
310540
|
-
if (!(
|
310541
|
-
throw new Error(`Unrecognized key: "${
|
309803
|
+
for (const key2 in mask) {
|
309804
|
+
if (!(key2 in currDef.shape)) {
|
309805
|
+
throw new Error(`Unrecognized key: "${key2}"`);
|
310542
309806
|
}
|
310543
|
-
if (!mask[
|
309807
|
+
if (!mask[key2])
|
310544
309808
|
continue;
|
310545
|
-
newShape[
|
309809
|
+
newShape[key2] = currDef.shape[key2];
|
310546
309810
|
}
|
310547
309811
|
return clone4(schema, {
|
310548
309812
|
...schema._zod.def,
|
@@ -310553,13 +309817,13 @@ function pick4(schema, mask) {
|
|
310553
309817
|
function omit4(schema, mask) {
|
310554
309818
|
const newShape = { ...schema._zod.def.shape };
|
310555
309819
|
const currDef = schema._zod.def;
|
310556
|
-
for (const
|
310557
|
-
if (!(
|
310558
|
-
throw new Error(`Unrecognized key: "${
|
309820
|
+
for (const key2 in mask) {
|
309821
|
+
if (!(key2 in currDef.shape)) {
|
309822
|
+
throw new Error(`Unrecognized key: "${key2}"`);
|
310559
309823
|
}
|
310560
|
-
if (!mask[
|
309824
|
+
if (!mask[key2])
|
310561
309825
|
continue;
|
310562
|
-
delete newShape[
|
309826
|
+
delete newShape[key2];
|
310563
309827
|
}
|
310564
309828
|
return clone4(schema, {
|
310565
309829
|
...schema._zod.def,
|
@@ -310601,23 +309865,23 @@ function partial4(Class$1, schema, mask) {
|
|
310601
309865
|
const oldShape = schema._zod.def.shape;
|
310602
309866
|
const shape = { ...oldShape };
|
310603
309867
|
if (mask) {
|
310604
|
-
for (const
|
310605
|
-
if (!(
|
310606
|
-
throw new Error(`Unrecognized key: "${
|
309868
|
+
for (const key2 in mask) {
|
309869
|
+
if (!(key2 in oldShape)) {
|
309870
|
+
throw new Error(`Unrecognized key: "${key2}"`);
|
310607
309871
|
}
|
310608
|
-
if (!mask[
|
309872
|
+
if (!mask[key2])
|
310609
309873
|
continue;
|
310610
|
-
shape[
|
309874
|
+
shape[key2] = Class$1 ? new Class$1({
|
310611
309875
|
type: "optional",
|
310612
|
-
innerType: oldShape[
|
310613
|
-
}) : oldShape[
|
309876
|
+
innerType: oldShape[key2]
|
309877
|
+
}) : oldShape[key2];
|
310614
309878
|
}
|
310615
309879
|
} else {
|
310616
|
-
for (const
|
310617
|
-
shape[
|
309880
|
+
for (const key2 in oldShape) {
|
309881
|
+
shape[key2] = Class$1 ? new Class$1({
|
310618
309882
|
type: "optional",
|
310619
|
-
innerType: oldShape[
|
310620
|
-
}) : oldShape[
|
309883
|
+
innerType: oldShape[key2]
|
309884
|
+
}) : oldShape[key2];
|
310621
309885
|
}
|
310622
309886
|
}
|
310623
309887
|
return clone4(schema, {
|
@@ -310630,22 +309894,22 @@ function required4(Class$1, schema, mask) {
|
|
310630
309894
|
const oldShape = schema._zod.def.shape;
|
310631
309895
|
const shape = { ...oldShape };
|
310632
309896
|
if (mask) {
|
310633
|
-
for (const
|
310634
|
-
if (!(
|
310635
|
-
throw new Error(`Unrecognized key: "${
|
309897
|
+
for (const key2 in mask) {
|
309898
|
+
if (!(key2 in shape)) {
|
309899
|
+
throw new Error(`Unrecognized key: "${key2}"`);
|
310636
309900
|
}
|
310637
|
-
if (!mask[
|
309901
|
+
if (!mask[key2])
|
310638
309902
|
continue;
|
310639
|
-
shape[
|
309903
|
+
shape[key2] = new Class$1({
|
310640
309904
|
type: "nonoptional",
|
310641
|
-
innerType: oldShape[
|
309905
|
+
innerType: oldShape[key2]
|
310642
309906
|
});
|
310643
309907
|
}
|
310644
309908
|
} else {
|
310645
|
-
for (const
|
310646
|
-
shape[
|
309909
|
+
for (const key2 in oldShape) {
|
309910
|
+
shape[key2] = new Class$1({
|
310647
309911
|
type: "nonoptional",
|
310648
|
-
innerType: oldShape[
|
309912
|
+
innerType: oldShape[key2]
|
310649
309913
|
});
|
310650
309914
|
}
|
310651
309915
|
}
|
@@ -312225,28 +311489,28 @@ var $ZodArray4 = /* @__PURE__ */ $constructor4("$ZodArray", (inst, def) => {
|
|
312225
311489
|
return payload;
|
312226
311490
|
};
|
312227
311491
|
});
|
312228
|
-
function handleObjectResult4(result, final,
|
311492
|
+
function handleObjectResult4(result, final, key2) {
|
312229
311493
|
if (result.issues.length) {
|
312230
|
-
final.issues.push(...prefixIssues4(
|
311494
|
+
final.issues.push(...prefixIssues4(key2, result.issues));
|
312231
311495
|
}
|
312232
|
-
final.value[
|
311496
|
+
final.value[key2] = result.value;
|
312233
311497
|
}
|
312234
|
-
function handleOptionalObjectResult4(result, final,
|
311498
|
+
function handleOptionalObjectResult4(result, final, key2, input) {
|
312235
311499
|
if (result.issues.length) {
|
312236
|
-
if (input[
|
312237
|
-
if (
|
312238
|
-
final.value[
|
311500
|
+
if (input[key2] === undefined) {
|
311501
|
+
if (key2 in input) {
|
311502
|
+
final.value[key2] = undefined;
|
312239
311503
|
} else {
|
312240
|
-
final.value[
|
311504
|
+
final.value[key2] = result.value;
|
312241
311505
|
}
|
312242
311506
|
} else {
|
312243
|
-
final.issues.push(...prefixIssues4(
|
311507
|
+
final.issues.push(...prefixIssues4(key2, result.issues));
|
312244
311508
|
}
|
312245
311509
|
} else if (result.value === undefined) {
|
312246
|
-
if (
|
312247
|
-
final.value[
|
311510
|
+
if (key2 in input)
|
311511
|
+
final.value[key2] = undefined;
|
312248
311512
|
} else {
|
312249
|
-
final.value[
|
311513
|
+
final.value[key2] = result.value;
|
312250
311514
|
}
|
312251
311515
|
}
|
312252
311516
|
var $ZodObject4 = /* @__PURE__ */ $constructor4("$ZodObject", (inst, def) => {
|
@@ -312270,12 +311534,12 @@ var $ZodObject4 = /* @__PURE__ */ $constructor4("$ZodObject", (inst, def) => {
|
|
312270
311534
|
defineLazy4(inst._zod, "propValues", () => {
|
312271
311535
|
const shape = def.shape;
|
312272
311536
|
const propValues = {};
|
312273
|
-
for (const
|
312274
|
-
const field2 = shape[
|
311537
|
+
for (const key2 in shape) {
|
311538
|
+
const field2 = shape[key2]._zod;
|
312275
311539
|
if (field2.values) {
|
312276
|
-
propValues[
|
311540
|
+
propValues[key2] ?? (propValues[key2] = new Set);
|
312277
311541
|
for (const v6 of field2.values)
|
312278
|
-
propValues[
|
311542
|
+
propValues[key2].add(v6);
|
312279
311543
|
}
|
312280
311544
|
}
|
312281
311545
|
return propValues;
|
@@ -312287,21 +311551,21 @@ var $ZodObject4 = /* @__PURE__ */ $constructor4("$ZodObject", (inst, def) => {
|
|
312287
311551
|
"ctx"
|
312288
311552
|
]);
|
312289
311553
|
const { keys, optionalKeys: optionalKeys$1 } = _normalized.value;
|
312290
|
-
const parseStr = (
|
312291
|
-
const k5 = esc4(
|
311554
|
+
const parseStr = (key2) => {
|
311555
|
+
const k5 = esc4(key2);
|
312292
311556
|
return `shape[${k5}]._zod.run({ value: input[${k5}], issues: [] }, ctx)`;
|
312293
311557
|
};
|
312294
311558
|
doc2.write(`const input = payload.value;`);
|
312295
311559
|
const ids = Object.create(null);
|
312296
|
-
for (const
|
312297
|
-
ids[
|
311560
|
+
for (const key2 of keys) {
|
311561
|
+
ids[key2] = randomString4(15);
|
312298
311562
|
}
|
312299
311563
|
doc2.write(`const newResult = {}`);
|
312300
|
-
for (const
|
312301
|
-
if (optionalKeys$1.has(
|
312302
|
-
const id = ids[
|
312303
|
-
doc2.write(`const ${id} = ${parseStr(
|
312304
|
-
const k5 = esc4(
|
311564
|
+
for (const key2 of keys) {
|
311565
|
+
if (optionalKeys$1.has(key2)) {
|
311566
|
+
const id = ids[key2];
|
311567
|
+
doc2.write(`const ${id} = ${parseStr(key2)};`);
|
311568
|
+
const k5 = esc4(key2);
|
312305
311569
|
doc2.write(`
|
312306
311570
|
if (${id}.issues.length) {
|
312307
311571
|
if (input[${k5}] === undefined) {
|
@@ -312323,14 +311587,14 @@ var $ZodObject4 = /* @__PURE__ */ $constructor4("$ZodObject", (inst, def) => {
|
|
312323
311587
|
}
|
312324
311588
|
`);
|
312325
311589
|
} else {
|
312326
|
-
const id = ids[
|
312327
|
-
doc2.write(`const ${id} = ${parseStr(
|
311590
|
+
const id = ids[key2];
|
311591
|
+
doc2.write(`const ${id} = ${parseStr(key2)};`);
|
312328
311592
|
doc2.write(`
|
312329
311593
|
if (${id}.issues.length) payload.issues = payload.issues.concat(${id}.issues.map(iss => ({
|
312330
311594
|
...iss,
|
312331
|
-
path: iss.path ? [${esc4(
|
311595
|
+
path: iss.path ? [${esc4(key2)}, ...iss.path] : [${esc4(key2)}]
|
312332
311596
|
})));`);
|
312333
|
-
doc2.write(`newResult[${esc4(
|
311597
|
+
doc2.write(`newResult[${esc4(key2)}] = ${id}.value`);
|
312334
311598
|
}
|
312335
311599
|
}
|
312336
311600
|
doc2.write(`payload.value = newResult;`);
|
@@ -312365,20 +311629,20 @@ var $ZodObject4 = /* @__PURE__ */ $constructor4("$ZodObject", (inst, def) => {
|
|
312365
311629
|
} else {
|
312366
311630
|
payload.value = {};
|
312367
311631
|
const shape = value4.shape;
|
312368
|
-
for (const
|
312369
|
-
const el = shape[
|
311632
|
+
for (const key2 of value4.keys) {
|
311633
|
+
const el = shape[key2];
|
312370
311634
|
const r6 = el._zod.run({
|
312371
|
-
value: input[
|
311635
|
+
value: input[key2],
|
312372
311636
|
issues: []
|
312373
311637
|
}, ctx);
|
312374
311638
|
const isOptional = el._zod.optin === "optional" && el._zod.optout === "optional";
|
312375
311639
|
if (r6 instanceof Promise) {
|
312376
|
-
proms.push(r6.then((r$1) => isOptional ? handleOptionalObjectResult4(r$1, payload,
|
311640
|
+
proms.push(r6.then((r$1) => isOptional ? handleOptionalObjectResult4(r$1, payload, key2, input) : handleObjectResult4(r$1, payload, key2)));
|
312377
311641
|
} else {
|
312378
311642
|
if (isOptional) {
|
312379
|
-
handleOptionalObjectResult4(r6, payload,
|
311643
|
+
handleOptionalObjectResult4(r6, payload, key2, input);
|
312380
311644
|
} else {
|
312381
|
-
handleObjectResult4(r6, payload,
|
311645
|
+
handleObjectResult4(r6, payload, key2);
|
312382
311646
|
}
|
312383
311647
|
}
|
312384
311648
|
}
|
@@ -312390,21 +311654,21 @@ var $ZodObject4 = /* @__PURE__ */ $constructor4("$ZodObject", (inst, def) => {
|
|
312390
311654
|
const keySet = value4.keySet;
|
312391
311655
|
const _catchall = catchall._zod;
|
312392
311656
|
const t8 = _catchall.def.type;
|
312393
|
-
for (const
|
312394
|
-
if (keySet.has(
|
311657
|
+
for (const key2 of Object.keys(input)) {
|
311658
|
+
if (keySet.has(key2))
|
312395
311659
|
continue;
|
312396
311660
|
if (t8 === "never") {
|
312397
|
-
unrecognized.push(
|
311661
|
+
unrecognized.push(key2);
|
312398
311662
|
continue;
|
312399
311663
|
}
|
312400
311664
|
const r6 = _catchall.run({
|
312401
|
-
value: input[
|
311665
|
+
value: input[key2],
|
312402
311666
|
issues: []
|
312403
311667
|
}, ctx);
|
312404
311668
|
if (r6 instanceof Promise) {
|
312405
|
-
proms.push(r6.then((r$1) => handleObjectResult4(r$1, payload,
|
311669
|
+
proms.push(r6.then((r$1) => handleObjectResult4(r$1, payload, key2)));
|
312406
311670
|
} else {
|
312407
|
-
handleObjectResult4(r6, payload,
|
311671
|
+
handleObjectResult4(r6, payload, key2);
|
312408
311672
|
}
|
312409
311673
|
}
|
312410
311674
|
if (unrecognized.length) {
|
@@ -312574,22 +311838,22 @@ function mergeValues4(a7, b4) {
|
|
312574
311838
|
data: a7
|
312575
311839
|
};
|
312576
311840
|
}
|
312577
|
-
if (
|
311841
|
+
if (isPlainObject6(a7) && isPlainObject6(b4)) {
|
312578
311842
|
const bKeys = Object.keys(b4);
|
312579
|
-
const sharedKeys = Object.keys(a7).filter((
|
311843
|
+
const sharedKeys = Object.keys(a7).filter((key2) => bKeys.indexOf(key2) !== -1);
|
312580
311844
|
const newObj = {
|
312581
311845
|
...a7,
|
312582
311846
|
...b4
|
312583
311847
|
};
|
312584
|
-
for (const
|
312585
|
-
const sharedValue = mergeValues4(a7[
|
311848
|
+
for (const key2 of sharedKeys) {
|
311849
|
+
const sharedValue = mergeValues4(a7[key2], b4[key2]);
|
312586
311850
|
if (!sharedValue.valid) {
|
312587
311851
|
return {
|
312588
311852
|
valid: false,
|
312589
|
-
mergeErrorPath: [
|
311853
|
+
mergeErrorPath: [key2, ...sharedValue.mergeErrorPath]
|
312590
311854
|
};
|
312591
311855
|
}
|
312592
|
-
newObj[
|
311856
|
+
newObj[key2] = sharedValue.data;
|
312593
311857
|
}
|
312594
311858
|
return {
|
312595
311859
|
valid: true,
|
@@ -312725,7 +311989,7 @@ var $ZodRecord4 = /* @__PURE__ */ $constructor4("$ZodRecord", (inst, def) => {
|
|
312725
311989
|
$ZodType4.init(inst, def);
|
312726
311990
|
inst._zod.parse = (payload, ctx) => {
|
312727
311991
|
const input = payload.value;
|
312728
|
-
if (!
|
311992
|
+
if (!isPlainObject6(input)) {
|
312729
311993
|
payload.issues.push({
|
312730
311994
|
expected: "record",
|
312731
311995
|
code: "invalid_type",
|
@@ -312738,32 +312002,32 @@ var $ZodRecord4 = /* @__PURE__ */ $constructor4("$ZodRecord", (inst, def) => {
|
|
312738
312002
|
if (def.keyType._zod.values) {
|
312739
312003
|
const values = def.keyType._zod.values;
|
312740
312004
|
payload.value = {};
|
312741
|
-
for (const
|
312742
|
-
if (typeof
|
312005
|
+
for (const key2 of values) {
|
312006
|
+
if (typeof key2 === "string" || typeof key2 === "number" || typeof key2 === "symbol") {
|
312743
312007
|
const result = def.valueType._zod.run({
|
312744
|
-
value: input[
|
312008
|
+
value: input[key2],
|
312745
312009
|
issues: []
|
312746
312010
|
}, ctx);
|
312747
312011
|
if (result instanceof Promise) {
|
312748
312012
|
proms.push(result.then((result$1) => {
|
312749
312013
|
if (result$1.issues.length) {
|
312750
|
-
payload.issues.push(...prefixIssues4(
|
312014
|
+
payload.issues.push(...prefixIssues4(key2, result$1.issues));
|
312751
312015
|
}
|
312752
|
-
payload.value[
|
312016
|
+
payload.value[key2] = result$1.value;
|
312753
312017
|
}));
|
312754
312018
|
} else {
|
312755
312019
|
if (result.issues.length) {
|
312756
|
-
payload.issues.push(...prefixIssues4(
|
312020
|
+
payload.issues.push(...prefixIssues4(key2, result.issues));
|
312757
312021
|
}
|
312758
|
-
payload.value[
|
312022
|
+
payload.value[key2] = result.value;
|
312759
312023
|
}
|
312760
312024
|
}
|
312761
312025
|
}
|
312762
312026
|
let unrecognized;
|
312763
|
-
for (const
|
312764
|
-
if (!values.has(
|
312027
|
+
for (const key2 in input) {
|
312028
|
+
if (!values.has(key2)) {
|
312765
312029
|
unrecognized = unrecognized ?? [];
|
312766
|
-
unrecognized.push(
|
312030
|
+
unrecognized.push(key2);
|
312767
312031
|
}
|
312768
312032
|
}
|
312769
312033
|
if (unrecognized && unrecognized.length > 0) {
|
@@ -312776,11 +312040,11 @@ var $ZodRecord4 = /* @__PURE__ */ $constructor4("$ZodRecord", (inst, def) => {
|
|
312776
312040
|
}
|
312777
312041
|
} else {
|
312778
312042
|
payload.value = {};
|
312779
|
-
for (const
|
312780
|
-
if (
|
312043
|
+
for (const key2 of Reflect.ownKeys(input)) {
|
312044
|
+
if (key2 === "__proto__")
|
312781
312045
|
continue;
|
312782
312046
|
const keyResult = def.keyType._zod.run({
|
312783
|
-
value:
|
312047
|
+
value: key2,
|
312784
312048
|
issues: []
|
312785
312049
|
}, ctx);
|
312786
312050
|
if (keyResult instanceof Promise) {
|
@@ -312791,27 +312055,27 @@ var $ZodRecord4 = /* @__PURE__ */ $constructor4("$ZodRecord", (inst, def) => {
|
|
312791
312055
|
origin: "record",
|
312792
312056
|
code: "invalid_key",
|
312793
312057
|
issues: keyResult.issues.map((iss) => finalizeIssue4(iss, ctx, config4())),
|
312794
|
-
input:
|
312795
|
-
path: [
|
312058
|
+
input: key2,
|
312059
|
+
path: [key2],
|
312796
312060
|
inst
|
312797
312061
|
});
|
312798
312062
|
payload.value[keyResult.value] = keyResult.value;
|
312799
312063
|
continue;
|
312800
312064
|
}
|
312801
312065
|
const result = def.valueType._zod.run({
|
312802
|
-
value: input[
|
312066
|
+
value: input[key2],
|
312803
312067
|
issues: []
|
312804
312068
|
}, ctx);
|
312805
312069
|
if (result instanceof Promise) {
|
312806
312070
|
proms.push(result.then((result$1) => {
|
312807
312071
|
if (result$1.issues.length) {
|
312808
|
-
payload.issues.push(...prefixIssues4(
|
312072
|
+
payload.issues.push(...prefixIssues4(key2, result$1.issues));
|
312809
312073
|
}
|
312810
312074
|
payload.value[keyResult.value] = result$1.value;
|
312811
312075
|
}));
|
312812
312076
|
} else {
|
312813
312077
|
if (result.issues.length) {
|
312814
|
-
payload.issues.push(...prefixIssues4(
|
312078
|
+
payload.issues.push(...prefixIssues4(key2, result.issues));
|
312815
312079
|
}
|
312816
312080
|
payload.value[keyResult.value] = result.value;
|
312817
312081
|
}
|
@@ -312838,9 +312102,9 @@ var $ZodMap4 = /* @__PURE__ */ $constructor4("$ZodMap", (inst, def) => {
|
|
312838
312102
|
}
|
312839
312103
|
const proms = [];
|
312840
312104
|
payload.value = new Map;
|
312841
|
-
for (const [
|
312105
|
+
for (const [key2, value4] of input) {
|
312842
312106
|
const keyResult = def.keyType._zod.run({
|
312843
|
-
value:
|
312107
|
+
value: key2,
|
312844
312108
|
issues: []
|
312845
312109
|
}, ctx);
|
312846
312110
|
const valueResult = def.valueType._zod.run({
|
@@ -312849,10 +312113,10 @@ var $ZodMap4 = /* @__PURE__ */ $constructor4("$ZodMap", (inst, def) => {
|
|
312849
312113
|
}, ctx);
|
312850
312114
|
if (keyResult instanceof Promise || valueResult instanceof Promise) {
|
312851
312115
|
proms.push(Promise.all([keyResult, valueResult]).then(([keyResult$1, valueResult$1]) => {
|
312852
|
-
handleMapResult4(keyResult$1, valueResult$1, payload,
|
312116
|
+
handleMapResult4(keyResult$1, valueResult$1, payload, key2, input, inst, ctx);
|
312853
312117
|
}));
|
312854
312118
|
} else {
|
312855
|
-
handleMapResult4(keyResult, valueResult, payload,
|
312119
|
+
handleMapResult4(keyResult, valueResult, payload, key2, input, inst, ctx);
|
312856
312120
|
}
|
312857
312121
|
}
|
312858
312122
|
if (proms.length)
|
@@ -312860,10 +312124,10 @@ var $ZodMap4 = /* @__PURE__ */ $constructor4("$ZodMap", (inst, def) => {
|
|
312860
312124
|
return payload;
|
312861
312125
|
};
|
312862
312126
|
});
|
312863
|
-
function handleMapResult4(keyResult, valueResult, final,
|
312127
|
+
function handleMapResult4(keyResult, valueResult, final, key2, input, inst, ctx) {
|
312864
312128
|
if (keyResult.issues.length) {
|
312865
|
-
if (propertyKeyTypes4.has(typeof
|
312866
|
-
final.issues.push(...prefixIssues4(
|
312129
|
+
if (propertyKeyTypes4.has(typeof key2)) {
|
312130
|
+
final.issues.push(...prefixIssues4(key2, keyResult.issues));
|
312867
312131
|
} else {
|
312868
312132
|
final.issues.push({
|
312869
312133
|
origin: "map",
|
@@ -312875,15 +312139,15 @@ function handleMapResult4(keyResult, valueResult, final, key3, input, inst, ctx)
|
|
312875
312139
|
}
|
312876
312140
|
}
|
312877
312141
|
if (valueResult.issues.length) {
|
312878
|
-
if (propertyKeyTypes4.has(typeof
|
312879
|
-
final.issues.push(...prefixIssues4(
|
312142
|
+
if (propertyKeyTypes4.has(typeof key2)) {
|
312143
|
+
final.issues.push(...prefixIssues4(key2, valueResult.issues));
|
312880
312144
|
} else {
|
312881
312145
|
final.issues.push({
|
312882
312146
|
origin: "map",
|
312883
312147
|
code: "invalid_element",
|
312884
312148
|
input,
|
312885
312149
|
inst,
|
312886
|
-
key:
|
312150
|
+
key: key2,
|
312887
312151
|
issues: valueResult.issues.map((iss) => finalizeIssue4(iss, ctx, config4()))
|
312888
312152
|
});
|
312889
312153
|
}
|
@@ -319205,19 +318469,19 @@ var JSONSchemaGenerator4 = class {
|
|
319205
318469
|
json$1.type = "object";
|
319206
318470
|
json$1.properties = {};
|
319207
318471
|
const shape = def.shape;
|
319208
|
-
for (const
|
319209
|
-
json$1.properties[
|
318472
|
+
for (const key2 in shape) {
|
318473
|
+
json$1.properties[key2] = this.process(shape[key2], {
|
319210
318474
|
...params,
|
319211
318475
|
path: [
|
319212
318476
|
...params.path,
|
319213
318477
|
"properties",
|
319214
|
-
|
318478
|
+
key2
|
319215
318479
|
]
|
319216
318480
|
});
|
319217
318481
|
}
|
319218
318482
|
const allKeys = new Set(Object.keys(shape));
|
319219
|
-
const requiredKeys = new Set([...allKeys].filter((
|
319220
|
-
const v6 = def.shape[
|
318483
|
+
const requiredKeys = new Set([...allKeys].filter((key2) => {
|
318484
|
+
const v6 = def.shape[key2]._zod;
|
319221
318485
|
if (this.io === "input") {
|
319222
318486
|
return v6.optin === undefined;
|
319223
318487
|
} else {
|
@@ -319569,8 +318833,8 @@ var JSONSchemaGenerator4 = class {
|
|
319569
318833
|
if (defId)
|
319570
318834
|
seen.defId = defId;
|
319571
318835
|
const schema$1 = seen.schema;
|
319572
|
-
for (const
|
319573
|
-
delete schema$1[
|
318836
|
+
for (const key2 in schema$1) {
|
318837
|
+
delete schema$1[key2];
|
319574
318838
|
}
|
319575
318839
|
schema$1.$ref = ref;
|
319576
318840
|
};
|
@@ -319681,8 +318945,8 @@ function toJSONSchema4(input, _params) {
|
|
319681
318945
|
defs
|
319682
318946
|
};
|
319683
318947
|
for (const entry of input._idmap.entries()) {
|
319684
|
-
const [
|
319685
|
-
schemas3[
|
318948
|
+
const [key2, schema] = entry;
|
318949
|
+
schemas3[key2] = gen$1.emit(schema, {
|
319686
318950
|
..._params,
|
319687
318951
|
external: external2
|
319688
318952
|
});
|
@@ -319727,8 +318991,8 @@ function isTransforming4(_schema, _ctx) {
|
|
319727
318991
|
return isTransforming4(def.element, ctx);
|
319728
318992
|
}
|
319729
318993
|
case "object": {
|
319730
|
-
for (const
|
319731
|
-
if (isTransforming4(def.shape[
|
318994
|
+
for (const key2 in def.shape) {
|
318995
|
+
if (isTransforming4(def.shape[key2], ctx))
|
319732
318996
|
return true;
|
319733
318997
|
}
|
319734
318998
|
return false;
|
@@ -321577,19 +320841,19 @@ function getBooleanValue(value4, defaultValue) {
|
|
321577
320841
|
function boolToString(value4) {
|
321578
320842
|
return value4 ? "Yes" : "No";
|
321579
320843
|
}
|
321580
|
-
var
|
320844
|
+
var esm_default4 = createPrompt((config5, done) => {
|
321581
320845
|
const { transformer = boolToString } = config5;
|
321582
320846
|
const [status, setStatus] = useState("idle");
|
321583
320847
|
const [value4, setValue] = useState("");
|
321584
320848
|
const theme = makeTheme(config5.theme);
|
321585
320849
|
const prefix = usePrefix({ status, theme });
|
321586
|
-
useKeypress((
|
321587
|
-
if (isEnterKey(
|
320850
|
+
useKeypress((key2, rl) => {
|
320851
|
+
if (isEnterKey(key2)) {
|
321588
320852
|
const answer = getBooleanValue(value4, config5.default);
|
321589
320853
|
setValue(transformer(answer));
|
321590
320854
|
setStatus("done");
|
321591
320855
|
done(answer);
|
321592
|
-
} else if (
|
320856
|
+
} else if (key2.name === "tab") {
|
321593
320857
|
const answer = boolToString(!getBooleanValue(value4, config5.default));
|
321594
320858
|
rl.clearLine(0);
|
321595
320859
|
rl.write(answer);
|
@@ -321610,19 +320874,19 @@ var esm_default5 = createPrompt((config5, done) => {
|
|
321610
320874
|
});
|
321611
320875
|
|
321612
320876
|
// ../../node_modules/@inquirer/password/dist/esm/index.js
|
321613
|
-
var
|
321614
|
-
var
|
320877
|
+
var import_ansi_escapes3 = __toESM(require_ansi_escapes(), 1);
|
320878
|
+
var esm_default5 = createPrompt((config5, done) => {
|
321615
320879
|
const { validate: validate5 = () => true } = config5;
|
321616
320880
|
const theme = makeTheme(config5.theme);
|
321617
320881
|
const [status, setStatus] = useState("idle");
|
321618
320882
|
const [errorMsg, setError] = useState();
|
321619
320883
|
const [value4, setValue] = useState("");
|
321620
320884
|
const prefix = usePrefix({ status, theme });
|
321621
|
-
useKeypress(async (
|
320885
|
+
useKeypress(async (key2, rl) => {
|
321622
320886
|
if (status !== "idle") {
|
321623
320887
|
return;
|
321624
320888
|
}
|
321625
|
-
if (isEnterKey(
|
320889
|
+
if (isEnterKey(key2)) {
|
321626
320890
|
const answer = value4;
|
321627
320891
|
setStatus("loading");
|
321628
320892
|
const isValid = await validate5(answer);
|
@@ -321647,7 +320911,7 @@ var esm_default6 = createPrompt((config5, done) => {
|
|
321647
320911
|
const maskChar = typeof config5.mask === "string" ? config5.mask : "*";
|
321648
320912
|
formattedValue = maskChar.repeat(value4.length);
|
321649
320913
|
} else if (status !== "done") {
|
321650
|
-
helpTip = `${theme.style.help("[input is masked]")}${
|
320914
|
+
helpTip = `${theme.style.help("[input is masked]")}${import_ansi_escapes3.default.cursorHide}`;
|
321651
320915
|
}
|
321652
320916
|
if (status === "done") {
|
321653
320917
|
formattedValue = theme.style.answer(formattedValue);
|
@@ -321669,7 +320933,7 @@ async function applicationAccessTokenPrompt(env2, application, settlemint, accep
|
|
321669
320933
|
return defaultAccessToken;
|
321670
320934
|
}
|
321671
320935
|
if (defaultAccessToken) {
|
321672
|
-
const keep = await
|
320936
|
+
const keep = await esm_default4({
|
321673
320937
|
message: "Do you want to use the existing application access token?",
|
321674
320938
|
default: true
|
321675
320939
|
});
|
@@ -321677,7 +320941,7 @@ async function applicationAccessTokenPrompt(env2, application, settlemint, accep
|
|
321677
320941
|
return defaultAccessToken;
|
321678
320942
|
}
|
321679
320943
|
}
|
321680
|
-
const create2 = await
|
320944
|
+
const create2 = await esm_default4({
|
321681
320945
|
message: "Do you want to create a new application access token?",
|
321682
320946
|
default: false
|
321683
320947
|
});
|
@@ -321745,7 +321009,7 @@ async function applicationAccessTokenPrompt(env2, application, settlemint, accep
|
|
321745
321009
|
return aat;
|
321746
321010
|
} catch (_error) {}
|
321747
321011
|
}
|
321748
|
-
return
|
321012
|
+
return esm_default5({
|
321749
321013
|
message: "What is the application access token for your application in SettleMint? (format: sm_aat_...)",
|
321750
321014
|
validate(value4) {
|
321751
321015
|
try {
|
@@ -321777,7 +321041,7 @@ async function applicationPrompt(env2, applications, accept) {
|
|
321777
321041
|
if (is_in_ci_default) {
|
321778
321042
|
nothingSelectedError("application");
|
321779
321043
|
}
|
321780
|
-
const application = await
|
321044
|
+
const application = await esm_default3({
|
321781
321045
|
message: "Which application do you want to connect to?",
|
321782
321046
|
choices: applications.map((applications2) => ({
|
321783
321047
|
name: `${applications2.name} (${applications2.uniqueName})`,
|
@@ -321890,7 +321154,7 @@ async function blockchainNodePrompt({
|
|
321890
321154
|
}
|
321891
321155
|
return item;
|
321892
321156
|
}) : choices;
|
321893
|
-
return
|
321157
|
+
return esm_default3({
|
321894
321158
|
message: promptMessage ?? "Which blockchain node do you want to connect to?",
|
321895
321159
|
choices: filteredChoices,
|
321896
321160
|
default: defaultNode
|
@@ -321920,7 +321184,7 @@ async function blockchainNodeOrLoadBalancerPrompt({
|
|
321920
321184
|
isRequired,
|
321921
321185
|
defaultHandler: async ({ defaultService: defaultNode, choices }) => {
|
321922
321186
|
const filteredChoices = filterRunningOnly ? choices.filter(({ value: node }) => isRunning(node)) : choices;
|
321923
|
-
return
|
321187
|
+
return esm_default3({
|
321924
321188
|
message: promptMessage ?? "Which blockchain node or load balancer do you want to connect to?",
|
321925
321189
|
choices: filteredChoices,
|
321926
321190
|
default: defaultNode
|
@@ -321945,7 +321209,7 @@ async function blockscoutPrompt({
|
|
321945
321209
|
envKey: "SETTLEMINT_BLOCKSCOUT",
|
321946
321210
|
isRequired,
|
321947
321211
|
defaultHandler: async ({ defaultService: defaultBlockscout, choices }) => {
|
321948
|
-
return
|
321212
|
+
return esm_default3({
|
321949
321213
|
message: "Which blockscout instance do you want to connect to?",
|
321950
321214
|
choices,
|
321951
321215
|
default: defaultBlockscout
|
@@ -321968,7 +321232,7 @@ async function customDeploymentPrompt({
|
|
321968
321232
|
envKey: "SETTLEMINT_CUSTOM_DEPLOYMENT",
|
321969
321233
|
isRequired,
|
321970
321234
|
defaultHandler: async ({ defaultService: defaultCustomDeployment, choices }) => {
|
321971
|
-
return
|
321235
|
+
return esm_default3({
|
321972
321236
|
message: "Which Custom Deployment do you want to connect to?",
|
321973
321237
|
choices,
|
321974
321238
|
default: defaultCustomDeployment
|
@@ -321995,7 +321259,7 @@ async function hasuraPrompt({
|
|
321995
321259
|
envKey: "SETTLEMINT_HASURA",
|
321996
321260
|
isRequired,
|
321997
321261
|
defaultHandler: async ({ defaultService: defaultHasura, choices }) => {
|
321998
|
-
return
|
321262
|
+
return esm_default3({
|
321999
321263
|
message: "Which Hasura instance do you want to connect to?",
|
322000
321264
|
choices,
|
322001
321265
|
default: defaultHasura
|
@@ -322019,7 +321283,7 @@ async function hdPrivateKeyPrompt({
|
|
322019
321283
|
envKey: "SETTLEMINT_HD_PRIVATE_KEY",
|
322020
321284
|
isRequired,
|
322021
321285
|
defaultHandler: async ({ defaultService: defaultPrivateKey, choices }) => {
|
322022
|
-
return
|
321286
|
+
return esm_default3({
|
322023
321287
|
message: "Which HD Private Key do you want to use?",
|
322024
321288
|
choices,
|
322025
321289
|
default: defaultPrivateKey
|
@@ -322043,7 +321307,7 @@ async function ipfsPrompt({
|
|
322043
321307
|
envKey: "SETTLEMINT_IPFS",
|
322044
321308
|
isRequired,
|
322045
321309
|
defaultHandler: async ({ defaultService: defaultStorage, choices }) => {
|
322046
|
-
return
|
321310
|
+
return esm_default3({
|
322047
321311
|
message: "Which IPFS instance do you want to connect to?",
|
322048
321312
|
choices,
|
322049
321313
|
default: defaultStorage
|
@@ -322067,7 +321331,7 @@ async function minioPrompt({
|
|
322067
321331
|
envKey: "SETTLEMINT_MINIO",
|
322068
321332
|
isRequired,
|
322069
321333
|
defaultHandler: async ({ defaultService: defaultStorage, choices }) => {
|
322070
|
-
return
|
321334
|
+
return esm_default3({
|
322071
321335
|
message: "Which MinIO instance do you want to connect to?",
|
322072
321336
|
choices,
|
322073
321337
|
default: defaultStorage
|
@@ -322091,7 +321355,7 @@ async function portalPrompt({
|
|
322091
321355
|
envKey: "SETTLEMINT_PORTAL",
|
322092
321356
|
isRequired,
|
322093
321357
|
defaultHandler: async ({ defaultService: defaultMiddleware, choices }) => {
|
322094
|
-
return
|
321358
|
+
return esm_default3({
|
322095
321359
|
message: "Which Smart Contract Portal instance do you want to connect to?",
|
322096
321360
|
choices,
|
322097
321361
|
default: defaultMiddleware
|
@@ -322120,7 +321384,7 @@ async function theGraphPrompt({
|
|
322120
321384
|
isRequired,
|
322121
321385
|
defaultHandler: async ({ defaultService: defaultMiddleware, choices }) => {
|
322122
321386
|
const filteredChoices = filterRunningOnly ? choices.filter(({ value: middleware }) => isRunning(middleware)) : choices;
|
322123
|
-
return
|
321387
|
+
return esm_default3({
|
322124
321388
|
message: "Which The Graph instance do you want to connect to?",
|
322125
321389
|
choices: filteredChoices,
|
322126
321390
|
default: defaultMiddleware
|
@@ -322167,7 +321431,7 @@ async function instancePrompt({
|
|
322167
321431
|
if (knownInstances.length === 0) {
|
322168
321432
|
note("No instances found. Run `settlemint login` to configure an instance.", "warn");
|
322169
321433
|
}
|
322170
|
-
return
|
321434
|
+
return esm_default3({
|
322171
321435
|
message: "What instance do you want to connect to?",
|
322172
321436
|
choices: [
|
322173
321437
|
...knownInstances.map((instance) => ({
|
@@ -322203,7 +321467,7 @@ async function serviceSecretPrompt({
|
|
322203
321467
|
return defaultSecret;
|
322204
321468
|
}
|
322205
321469
|
if (defaultSecret) {
|
322206
|
-
const keep = await
|
321470
|
+
const keep = await esm_default4({
|
322207
321471
|
message: `Do you want to use the existing ${name3} secret?`,
|
322208
321472
|
default: true
|
322209
321473
|
});
|
@@ -322211,7 +321475,7 @@ async function serviceSecretPrompt({
|
|
322211
321475
|
return defaultSecret;
|
322212
321476
|
}
|
322213
321477
|
}
|
322214
|
-
const serviceSecret = await
|
321478
|
+
const serviceSecret = await esm_default5({
|
322215
321479
|
message
|
322216
321480
|
});
|
322217
321481
|
return serviceSecret || undefined;
|
@@ -322263,7 +321527,7 @@ async function workspacePrompt(env2, workspaces, accept) {
|
|
322263
321527
|
if (is_in_ci_default) {
|
322264
321528
|
nothingSelectedError("workspace");
|
322265
321529
|
}
|
322266
|
-
const workspace = await
|
321530
|
+
const workspace = await esm_default3({
|
322267
321531
|
message: "Which workspace do you want to connect to?",
|
322268
321532
|
choices: workspaces.map((workspace2) => ({
|
322269
321533
|
name: `${workspace2.name} (${workspace2.uniqueName})`,
|
@@ -323105,7 +322369,7 @@ async function templatePrompt(platformConfig, argument) {
|
|
323105
322369
|
}
|
323106
322370
|
return template2;
|
323107
322371
|
}
|
323108
|
-
const template = await
|
322372
|
+
const template = await esm_default3({
|
323109
322373
|
message: "Which template do you want to use?",
|
323110
322374
|
choices: [
|
323111
322375
|
...kits.map((template2) => ({
|
@@ -323325,7 +322589,7 @@ var basename2 = function(p5, extension) {
|
|
323325
322589
|
return extension && lastSegment.endsWith(extension) ? lastSegment.slice(0, -extension.length) : lastSegment;
|
323326
322590
|
};
|
323327
322591
|
// ../../node_modules/defu/dist/defu.mjs
|
323328
|
-
function
|
322592
|
+
function isPlainObject7(value4) {
|
323329
322593
|
if (value4 === null || typeof value4 !== "object") {
|
323330
322594
|
return false;
|
323331
322595
|
}
|
@@ -323342,27 +322606,27 @@ function isPlainObject8(value4) {
|
|
323342
322606
|
return true;
|
323343
322607
|
}
|
323344
322608
|
function _defu(baseObject, defaults4, namespace = ".", merger) {
|
323345
|
-
if (!
|
322609
|
+
if (!isPlainObject7(defaults4)) {
|
323346
322610
|
return _defu(baseObject, {}, namespace, merger);
|
323347
322611
|
}
|
323348
322612
|
const object5 = Object.assign({}, defaults4);
|
323349
|
-
for (const
|
323350
|
-
if (
|
322613
|
+
for (const key2 in baseObject) {
|
322614
|
+
if (key2 === "__proto__" || key2 === "constructor") {
|
323351
322615
|
continue;
|
323352
322616
|
}
|
323353
|
-
const value4 = baseObject[
|
322617
|
+
const value4 = baseObject[key2];
|
323354
322618
|
if (value4 === null || value4 === undefined) {
|
323355
322619
|
continue;
|
323356
322620
|
}
|
323357
|
-
if (merger && merger(object5,
|
322621
|
+
if (merger && merger(object5, key2, value4, namespace)) {
|
323358
322622
|
continue;
|
323359
322623
|
}
|
323360
|
-
if (Array.isArray(value4) && Array.isArray(object5[
|
323361
|
-
object5[
|
323362
|
-
} else if (
|
323363
|
-
object5[
|
322624
|
+
if (Array.isArray(value4) && Array.isArray(object5[key2])) {
|
322625
|
+
object5[key2] = [...value4, ...object5[key2]];
|
322626
|
+
} else if (isPlainObject7(value4) && isPlainObject7(object5[key2])) {
|
322627
|
+
object5[key2] = _defu(value4, object5[key2], (namespace ? `${namespace}.` : "") + key2.toString(), merger);
|
323364
322628
|
} else {
|
323365
|
-
object5[
|
322629
|
+
object5[key2] = value4;
|
323366
322630
|
}
|
323367
322631
|
}
|
323368
322632
|
return object5;
|
@@ -323371,15 +322635,15 @@ function createDefu(merger) {
|
|
323371
322635
|
return (...arguments_4) => arguments_4.reduce((p5, c3) => _defu(p5, c3, "", merger), {});
|
323372
322636
|
}
|
323373
322637
|
var defu = createDefu();
|
323374
|
-
var defuFn = createDefu((object5,
|
323375
|
-
if (object5[
|
323376
|
-
object5[
|
322638
|
+
var defuFn = createDefu((object5, key2, currentValue) => {
|
322639
|
+
if (object5[key2] !== undefined && typeof currentValue === "function") {
|
322640
|
+
object5[key2] = currentValue(object5[key2]);
|
323377
322641
|
return true;
|
323378
322642
|
}
|
323379
322643
|
});
|
323380
|
-
var defuArrayFn = createDefu((object5,
|
323381
|
-
if (Array.isArray(object5[
|
323382
|
-
object5[
|
322644
|
+
var defuArrayFn = createDefu((object5, key2, currentValue) => {
|
322645
|
+
if (Array.isArray(object5[key2]) && typeof currentValue === "function") {
|
322646
|
+
object5[key2] = currentValue(object5[key2]);
|
323383
322647
|
return true;
|
323384
322648
|
}
|
323385
322649
|
});
|
@@ -326589,11 +325853,11 @@ function cacheDirectory() {
|
|
326589
325853
|
}
|
326590
325854
|
function normalizeHeaders(headers = {}) {
|
326591
325855
|
const normalized = {};
|
326592
|
-
for (const [
|
325856
|
+
for (const [key2, value4] of Object.entries(headers)) {
|
326593
325857
|
if (!value4) {
|
326594
325858
|
continue;
|
326595
325859
|
}
|
326596
|
-
normalized[
|
325860
|
+
normalized[key2.toLowerCase()] = value4;
|
326597
325861
|
}
|
326598
325862
|
return normalized;
|
326599
325863
|
}
|
@@ -326891,7 +326155,7 @@ function createCommand2() {
|
|
326891
326155
|
await mkdir6(projectDir, { recursive: true });
|
326892
326156
|
}
|
326893
326157
|
if (!await isEmpty(projectDir)) {
|
326894
|
-
const confirmEmpty = await
|
326158
|
+
const confirmEmpty = await esm_default4({
|
326895
326159
|
message: `The folder ${projectDir} already exists. Do you want to empty it?`,
|
326896
326160
|
default: false
|
326897
326161
|
});
|
@@ -327144,7 +326408,7 @@ async function personalAccessTokenPrompt(env2, instance, accept) {
|
|
327144
326408
|
return defaultPersonalAccessToken;
|
327145
326409
|
}
|
327146
326410
|
if (existingConfig && defaultPersonalAccessToken) {
|
327147
|
-
const useExisting = await
|
326411
|
+
const useExisting = await esm_default4({
|
327148
326412
|
message: `Do you want to use your existing personal access token for ${instance}?`,
|
327149
326413
|
default: true
|
327150
326414
|
});
|
@@ -327152,7 +326416,7 @@ async function personalAccessTokenPrompt(env2, instance, accept) {
|
|
327152
326416
|
return defaultPersonalAccessToken;
|
327153
326417
|
}
|
327154
326418
|
}
|
327155
|
-
return
|
326419
|
+
return esm_default5({
|
327156
326420
|
message: "What is your personal access token in SettleMint? (format: sm_pat_...)",
|
327157
326421
|
validate(value4) {
|
327158
326422
|
try {
|
@@ -327278,7 +326542,7 @@ function logoutCommand() {
|
|
327278
326542
|
}
|
327279
326543
|
const env2 = await loadEnv(false, false);
|
327280
326544
|
const defaultInstance = env2.SETTLEMINT_INSTANCE;
|
327281
|
-
const instance = await
|
326545
|
+
const instance = await esm_default3({
|
327282
326546
|
message: "Select the instance to logout from:",
|
327283
326547
|
choices: instances.map((instance2) => ({
|
327284
326548
|
value: instance2,
|
@@ -327299,7 +326563,7 @@ async function pincodeVerificationPrompt(verificationChallenges) {
|
|
327299
326563
|
if (verificationChallenges.length === 1) {
|
327300
326564
|
return verificationChallenges[0];
|
327301
326565
|
}
|
327302
|
-
const verificationChallenge = await
|
326566
|
+
const verificationChallenge = await esm_default3({
|
327303
326567
|
message: "Which pincode verification do you want to use?",
|
327304
326568
|
choices: verificationChallenges.map((verificationChallenge2) => ({
|
327305
326569
|
name: verificationChallenge2.name,
|
@@ -327363,7 +326627,7 @@ function pincodeVerificationResponseCommand() {
|
|
327363
326627
|
nodeId: selectedBlockchainNode.id
|
327364
326628
|
});
|
327365
326629
|
const verificationChallenge = await pincodeVerificationPrompt(pincodeVerificationChallenges);
|
327366
|
-
const pincode = await
|
326630
|
+
const pincode = await esm_default5({
|
327367
326631
|
message: "Enter your pincode",
|
327368
326632
|
validate(value4) {
|
327369
326633
|
if (!value4.trim()) {
|
@@ -327516,7 +326780,7 @@ async function providerPrompt(platformConfig, argument) {
|
|
327516
326780
|
if (possibleProviders.length === 1) {
|
327517
326781
|
return possibleProviders[0];
|
327518
326782
|
}
|
327519
|
-
const provider = await
|
326783
|
+
const provider = await esm_default3({
|
327520
326784
|
message: "Which provider do you want to use?",
|
327521
326785
|
choices: platformConfig.deploymentEngineTargets.map((target) => ({
|
327522
326786
|
name: target.name,
|
@@ -327547,7 +326811,7 @@ async function regionPrompt(provider, argument) {
|
|
327547
326811
|
if (possibleRegions.length === 1) {
|
327548
326812
|
return possibleRegions[0];
|
327549
326813
|
}
|
327550
|
-
const region = await
|
326814
|
+
const region = await esm_default3({
|
327551
326815
|
message: "Which region do you want to use?",
|
327552
326816
|
choices: provider.clusters.map((cluster) => ({
|
327553
326817
|
name: cluster.name,
|
@@ -328073,7 +327337,7 @@ async function blockchainNetworkPrompt({
|
|
328073
327337
|
envKey: "SETTLEMINT_BLOCKCHAIN_NETWORK",
|
328074
327338
|
isRequired,
|
328075
327339
|
defaultHandler: async ({ defaultService: defaultNetwork, choices }) => {
|
328076
|
-
return
|
327340
|
+
return esm_default3({
|
328077
327341
|
message: "Which blockchain network do you want to connect to?",
|
328078
327342
|
choices,
|
328079
327343
|
default: defaultNetwork
|
@@ -329838,7 +329102,7 @@ function jsonOutput(data) {
|
|
329838
329102
|
var composer = require_composer();
|
329839
329103
|
var Document = require_Document();
|
329840
329104
|
var Schema = require_Schema();
|
329841
|
-
var
|
329105
|
+
var errors4 = require_errors3();
|
329842
329106
|
var Alias = require_Alias();
|
329843
329107
|
var identity2 = require_identity();
|
329844
329108
|
var Pair = require_Pair();
|
@@ -329854,9 +329118,9 @@ var visit2 = require_visit();
|
|
329854
329118
|
var $Composer = composer.Composer;
|
329855
329119
|
var $Document = Document.Document;
|
329856
329120
|
var $Schema = Schema.Schema;
|
329857
|
-
var $YAMLError =
|
329858
|
-
var $YAMLParseError =
|
329859
|
-
var $YAMLWarning =
|
329121
|
+
var $YAMLError = errors4.YAMLError;
|
329122
|
+
var $YAMLParseError = errors4.YAMLParseError;
|
329123
|
+
var $YAMLWarning = errors4.YAMLWarning;
|
329860
329124
|
var $Alias = Alias.Alias;
|
329861
329125
|
var $isAlias = identity2.isAlias;
|
329862
329126
|
var $isCollection = identity2.isCollection;
|
@@ -330375,7 +329639,7 @@ async function useCasePrompt(platformConfig, argument) {
|
|
330375
329639
|
if (selectableUseCases.length === 1) {
|
330376
329640
|
return selectableUseCases[0];
|
330377
329641
|
}
|
330378
|
-
const useCase = await
|
329642
|
+
const useCase = await esm_default3({
|
330379
329643
|
message: "Which use case do you want to use?",
|
330380
329644
|
choices: selectableUseCases.map((useCase2) => ({
|
330381
329645
|
name: formatUseCaseName(useCase2.name),
|
@@ -330433,7 +329697,7 @@ function createCommand4() {
|
|
330433
329697
|
const targetDir = formatTargetDir(name3);
|
330434
329698
|
const projectDir = join9(process.cwd(), targetDir);
|
330435
329699
|
if (await exists3(projectDir) && !await isEmpty(projectDir)) {
|
330436
|
-
const confirmEmpty = await
|
329700
|
+
const confirmEmpty = await esm_default4({
|
330437
329701
|
message: `The folder ${projectDir} already exists. Do you want to delete it?`,
|
330438
329702
|
default: false
|
330439
329703
|
});
|
@@ -330463,11 +329727,11 @@ function createCommand4() {
|
|
330463
329727
|
|
330464
329728
|
// src/utils/commands/passthrough-options.ts
|
330465
329729
|
function mapPassthroughOptions(options, command) {
|
330466
|
-
const optionArgs = Object.entries(options).map(([
|
329730
|
+
const optionArgs = Object.entries(options).map(([key2, value4]) => {
|
330467
329731
|
if (value4 === true) {
|
330468
|
-
return `--${
|
329732
|
+
return `--${key2}`;
|
330469
329733
|
}
|
330470
|
-
return `--${
|
329734
|
+
return `--${key2}=${value4}`;
|
330471
329735
|
});
|
330472
329736
|
return [...optionArgs, ...command.args];
|
330473
329737
|
}
|
@@ -330743,7 +330007,7 @@ async function addressPrompt({
|
|
330743
330007
|
note(`Private key with address '${defaultAddress}' is not activated on the node '${node.uniqueName}'.
|
330744
330008
|
Please select another key or activate this key on the node and try again.`, "warn");
|
330745
330009
|
}
|
330746
|
-
const address = await
|
330010
|
+
const address = await esm_default3({
|
330747
330011
|
message: "Which private key do you want to deploy from?",
|
330748
330012
|
choices: possiblePrivateKeys.map(({ address: address2, name: name3 }) => ({
|
330749
330013
|
name: name3,
|
@@ -331696,4 +330960,4 @@ async function sdkCliCommand(argv = process.argv) {
|
|
331696
330960
|
// src/cli.ts
|
331697
330961
|
sdkCliCommand();
|
331698
330962
|
|
331699
|
-
//# debugId=
|
330963
|
+
//# debugId=A11F562BBF1C256B64756E2164756E21
|