@settlemint/sdk-cli 2.4.0-pr630f4542 → 2.4.0-pr6922b64b
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 +1805 -644
- package/dist/cli.js.map +95 -47
- package/package.json +10 -8
package/dist/cli.js
CHANGED
@@ -161742,7 +161742,7 @@ ${lanes.join(`
|
|
161742
161742
|
function generateOptionOutput(sys2, option, rightAlignOfLeft, leftAlignOfRight) {
|
161743
161743
|
var _a;
|
161744
161744
|
const text = [];
|
161745
|
-
const
|
161745
|
+
const colors2 = createColors(sys2);
|
161746
161746
|
const name2 = getDisplayNameTextOfOption(option);
|
161747
161747
|
const valueCandidates = getValueCandidate(option);
|
161748
161748
|
const defaultValueDescription = typeof option.defaultValueDescription === "object" ? getDiagnosticText(option.defaultValueDescription) : formatDefaultValue(option.defaultValueDescription, option.type === "list" || option.type === "listOrElement" ? option.element.type : option.type);
|
@@ -161763,7 +161763,7 @@ ${lanes.join(`
|
|
161763
161763
|
}
|
161764
161764
|
text.push(sys2.newLine);
|
161765
161765
|
} else {
|
161766
|
-
text.push(
|
161766
|
+
text.push(colors2.blue(name2), sys2.newLine);
|
161767
161767
|
if (option.description) {
|
161768
161768
|
const description3 = getDiagnosticText(option.description);
|
161769
161769
|
text.push(description3);
|
@@ -161808,7 +161808,7 @@ ${lanes.join(`
|
|
161808
161808
|
if (isFirstLine) {
|
161809
161809
|
curLeft = left.padStart(rightAlignOfLeft2);
|
161810
161810
|
curLeft = curLeft.padEnd(leftAlignOfRight2);
|
161811
|
-
curLeft = colorLeft ?
|
161811
|
+
curLeft = colorLeft ? colors2.blue(curLeft) : curLeft;
|
161812
161812
|
} else {
|
161813
161813
|
curLeft = "".padStart(leftAlignOfRight2);
|
161814
161814
|
}
|
@@ -161920,9 +161920,9 @@ ${lanes.join(`
|
|
161920
161920
|
return res;
|
161921
161921
|
}
|
161922
161922
|
function printEasyHelp(sys2, simpleOptions) {
|
161923
|
-
const
|
161923
|
+
const colors2 = createColors(sys2);
|
161924
161924
|
let output = [...getHeader(sys2, `${getDiagnosticText(Diagnostics.tsc_Colon_The_TypeScript_Compiler)} - ${getDiagnosticText(Diagnostics.Version_0, version4)}`)];
|
161925
|
-
output.push(
|
161925
|
+
output.push(colors2.bold(getDiagnosticText(Diagnostics.COMMON_COMMANDS)) + sys2.newLine + sys2.newLine);
|
161926
161926
|
example("tsc", Diagnostics.Compiles_the_current_project_tsconfig_json_in_the_working_directory);
|
161927
161927
|
example("tsc app.ts util.ts", Diagnostics.Ignoring_tsconfig_json_compiles_the_specified_files_with_default_compiler_options);
|
161928
161928
|
example("tsc -b", Diagnostics.Build_a_composite_project_in_the_working_directory);
|
@@ -161943,7 +161943,7 @@ ${lanes.join(`
|
|
161943
161943
|
function example(ex, desc) {
|
161944
161944
|
const examples = typeof ex === "string" ? [ex] : ex;
|
161945
161945
|
for (const example2 of examples) {
|
161946
|
-
output.push(" " +
|
161946
|
+
output.push(" " + colors2.blue(example2) + sys2.newLine);
|
161947
161947
|
}
|
161948
161948
|
output.push(" " + getDiagnosticText(desc) + sys2.newLine + sys2.newLine);
|
161949
161949
|
}
|
@@ -161966,12 +161966,12 @@ ${lanes.join(`
|
|
161966
161966
|
}
|
161967
161967
|
function getHeader(sys2, message) {
|
161968
161968
|
var _a;
|
161969
|
-
const
|
161969
|
+
const colors2 = createColors(sys2);
|
161970
161970
|
const header = [];
|
161971
161971
|
const terminalWidth = ((_a = sys2.getWidthOfTerminal) == null ? undefined : _a.call(sys2)) ?? 0;
|
161972
161972
|
const tsIconLength = 5;
|
161973
|
-
const tsIconFirstLine =
|
161974
|
-
const tsIconSecondLine =
|
161973
|
+
const tsIconFirstLine = colors2.blueBackground("".padStart(tsIconLength));
|
161974
|
+
const tsIconSecondLine = colors2.blueBackground(colors2.brightWhite("TS ".padStart(tsIconLength)));
|
161975
161975
|
if (terminalWidth >= message.length + tsIconLength) {
|
161976
161976
|
const rightAlign = terminalWidth > 120 ? 120 : terminalWidth;
|
161977
161977
|
const leftAlign = rightAlign - tsIconLength;
|
@@ -231623,7 +231623,7 @@ function size(value4) {
|
|
231623
231623
|
var init_size = () => {};
|
231624
231624
|
|
231625
231625
|
// ../../node_modules/viem/_esm/errors/version.js
|
231626
|
-
var version5 = "2.31.
|
231626
|
+
var version5 = "2.31.6";
|
231627
231627
|
|
231628
231628
|
// ../../node_modules/viem/_esm/errors/base.js
|
231629
231629
|
function walk(err, fn) {
|
@@ -232832,16 +232832,16 @@ var init_lru = __esm(() => {
|
|
232832
232832
|
});
|
232833
232833
|
this.maxSize = size2;
|
232834
232834
|
}
|
232835
|
-
get(
|
232836
|
-
const value4 = super.get(
|
232837
|
-
if (super.has(
|
232838
|
-
this.delete(
|
232839
|
-
super.set(
|
232835
|
+
get(key3) {
|
232836
|
+
const value4 = super.get(key3);
|
232837
|
+
if (super.has(key3) && value4 !== undefined) {
|
232838
|
+
this.delete(key3);
|
232839
|
+
super.set(key3, value4);
|
232840
232840
|
}
|
232841
232841
|
return value4;
|
232842
232842
|
}
|
232843
|
-
set(
|
232844
|
-
super.set(
|
232843
|
+
set(key3, value4) {
|
232844
|
+
super.set(key3, value4);
|
232845
232845
|
if (this.maxSize && this.size > this.maxSize) {
|
232846
232846
|
const firstKey = this.keys().next().value;
|
232847
232847
|
if (firstKey)
|
@@ -233883,9 +233883,9 @@ var init_decodeErrorResult = __esm(() => {
|
|
233883
233883
|
});
|
233884
233884
|
|
233885
233885
|
// ../../node_modules/viem/_esm/utils/stringify.js
|
233886
|
-
var stringify3 = (value4, replacer, space) => JSON.stringify(value4, (
|
233886
|
+
var stringify3 = (value4, replacer, space) => JSON.stringify(value4, (key3, value_) => {
|
233887
233887
|
const value5 = typeof value_ === "bigint" ? value_.toString() : value_;
|
233888
|
-
return typeof replacer === "function" ? replacer(
|
233888
|
+
return typeof replacer === "function" ? replacer(key3, value5) : value5;
|
233889
233889
|
}, space);
|
233890
233890
|
|
233891
233891
|
// ../../node_modules/viem/_esm/utils/abi/formatAbiItemWithArgs.js
|
@@ -233999,13 +233999,13 @@ var init_stateOverride = __esm(() => {
|
|
233999
233999
|
|
234000
234000
|
// ../../node_modules/viem/_esm/errors/transaction.js
|
234001
234001
|
function prettyPrint(args) {
|
234002
|
-
const entries = Object.entries(args).map(([
|
234002
|
+
const entries = Object.entries(args).map(([key3, value4]) => {
|
234003
234003
|
if (value4 === undefined || value4 === false)
|
234004
234004
|
return null;
|
234005
|
-
return [
|
234005
|
+
return [key3, value4];
|
234006
234006
|
}).filter(Boolean);
|
234007
|
-
const maxLength = entries.reduce((acc, [
|
234008
|
-
return entries.map(([
|
234007
|
+
const maxLength = entries.reduce((acc, [key3]) => Math.max(acc, key3.length), 0);
|
234008
|
+
return entries.map(([key3, value4]) => ` ${`${key3}:`.padEnd(maxLength + 1)} ${value4}`).join(`
|
234009
234009
|
`);
|
234010
234010
|
}
|
234011
234011
|
var FeeConflictError, InvalidSerializableTransactionError, TransactionNotFoundError, TransactionReceiptNotFoundError, WaitForTransactionReceiptTimeoutError;
|
@@ -235111,7 +235111,7 @@ var init_sha2 = __esm(() => {
|
|
235111
235111
|
});
|
235112
235112
|
|
235113
235113
|
// ../../node_modules/@noble/hashes/esm/hmac.js
|
235114
|
-
var HMAC, hmac = (hash2,
|
235114
|
+
var HMAC, hmac = (hash2, key3, message) => new HMAC(hash2, key3).update(message).digest();
|
235115
235115
|
var init_hmac = __esm(() => {
|
235116
235116
|
init_utils2();
|
235117
235117
|
HMAC = class HMAC extends Hash {
|
@@ -235120,7 +235120,7 @@ var init_hmac = __esm(() => {
|
|
235120
235120
|
this.finished = false;
|
235121
235121
|
this.destroyed = false;
|
235122
235122
|
ahash(hash2);
|
235123
|
-
const
|
235123
|
+
const key3 = toBytes2(_key);
|
235124
235124
|
this.iHash = hash2.create();
|
235125
235125
|
if (typeof this.iHash.update !== "function")
|
235126
235126
|
throw new Error("Expected instance of class which extends utils.Hash");
|
@@ -235128,7 +235128,7 @@ var init_hmac = __esm(() => {
|
|
235128
235128
|
this.outputLen = this.iHash.outputLen;
|
235129
235129
|
const blockLen = this.blockLen;
|
235130
235130
|
const pad2 = new Uint8Array(blockLen);
|
235131
|
-
pad2.set(
|
235131
|
+
pad2.set(key3.length > blockLen ? hash2.create().update(key3).digest() : key3);
|
235132
235132
|
for (let i6 = 0;i6 < pad2.length; i6++)
|
235133
235133
|
pad2[i6] ^= 54;
|
235134
235134
|
this.iHash.update(pad2);
|
@@ -235178,7 +235178,7 @@ var init_hmac = __esm(() => {
|
|
235178
235178
|
this.iHash.destroy();
|
235179
235179
|
}
|
235180
235180
|
};
|
235181
|
-
hmac.create = (hash2,
|
235181
|
+
hmac.create = (hash2, key3) => new HMAC(hash2, key3);
|
235182
235182
|
});
|
235183
235183
|
|
235184
235184
|
// ../../node_modules/@noble/curves/esm/utils.js
|
@@ -235579,13 +235579,13 @@ function getMinHashLength(fieldOrder) {
|
|
235579
235579
|
const length = getFieldBytesLength(fieldOrder);
|
235580
235580
|
return length + Math.ceil(length / 2);
|
235581
235581
|
}
|
235582
|
-
function mapHashToField(
|
235583
|
-
const len =
|
235582
|
+
function mapHashToField(key3, fieldOrder, isLE2 = false) {
|
235583
|
+
const len = key3.length;
|
235584
235584
|
const fieldLen = getFieldBytesLength(fieldOrder);
|
235585
235585
|
const minLen = getMinHashLength(fieldOrder);
|
235586
235586
|
if (len < 16 || len < minLen || len > 1024)
|
235587
235587
|
throw new Error("expected " + minLen + "-1024 bytes of input, got " + len);
|
235588
|
-
const num = isLE2 ? bytesToNumberLE(
|
235588
|
+
const num = isLE2 ? bytesToNumberLE(key3) : bytesToNumberBE(key3);
|
235589
235589
|
const reduced = mod(num, fieldOrder - _1n3) + _1n3;
|
235590
235590
|
return isLE2 ? numberToBytesLE(reduced, fieldLen) : numberToBytesBE(reduced, fieldLen);
|
235591
235591
|
}
|
@@ -235888,12 +235888,12 @@ function _legacyHelperEquat(Fp, a7, b4) {
|
|
235888
235888
|
}
|
235889
235889
|
function _legacyHelperNormPriv(Fn, allowedPrivateKeyLengths, wrapPrivateKey) {
|
235890
235890
|
const { BYTES: expected } = Fn;
|
235891
|
-
function normPrivateKeyToScalar(
|
235891
|
+
function normPrivateKeyToScalar(key3) {
|
235892
235892
|
let num;
|
235893
|
-
if (typeof
|
235894
|
-
num =
|
235893
|
+
if (typeof key3 === "bigint") {
|
235894
|
+
num = key3;
|
235895
235895
|
} else {
|
235896
|
-
let bytes = ensureBytes("private key",
|
235896
|
+
let bytes = ensureBytes("private key", key3);
|
235897
235897
|
if (allowedPrivateKeyLengths) {
|
235898
235898
|
if (!allowedPrivateKeyLengths.includes(bytes.length * 2))
|
235899
235899
|
throw new Error("invalid private key");
|
@@ -235904,7 +235904,7 @@ function _legacyHelperNormPriv(Fn, allowedPrivateKeyLengths, wrapPrivateKey) {
|
|
235904
235904
|
try {
|
235905
235905
|
num = Fn.fromBytes(bytes);
|
235906
235906
|
} catch (error44) {
|
235907
|
-
throw new Error(`invalid private key: expected ui8a of size ${expected}, got ${typeof
|
235907
|
+
throw new Error(`invalid private key: expected ui8a of size ${expected}, got ${typeof key3}`);
|
235908
235908
|
}
|
235909
235909
|
}
|
235910
235910
|
if (wrapPrivateKey)
|
@@ -236306,7 +236306,7 @@ function ecdsa(Point, ecdsaOpts, curveOpts = {}) {
|
|
236306
236306
|
bits2int_modN: "function"
|
236307
236307
|
});
|
236308
236308
|
const randomBytes_ = ecdsaOpts.randomBytes || randomBytes;
|
236309
|
-
const hmac_ = ecdsaOpts.hmac || ((
|
236309
|
+
const hmac_ = ecdsaOpts.hmac || ((key3, ...msgs) => hmac(ecdsaOpts.hash, key3, concatBytes(...msgs)));
|
236310
236310
|
const { Fp, Fn } = Point;
|
236311
236311
|
const { ORDER: CURVE_ORDER, BITS: fnBits } = Fn;
|
236312
236312
|
function isBiggerThanHalfOrder(number6) {
|
@@ -237464,11 +237464,11 @@ function extract2(value_, { format: format2 }) {
|
|
237464
237464
|
const value4 = {};
|
237465
237465
|
function extract_(formatted2) {
|
237466
237466
|
const keys = Object.keys(formatted2);
|
237467
|
-
for (const
|
237468
|
-
if (
|
237469
|
-
value4[
|
237470
|
-
if (formatted2[
|
237471
|
-
extract_(formatted2[
|
237467
|
+
for (const key3 of keys) {
|
237468
|
+
if (key3 in value_)
|
237469
|
+
value4[key3] = value_[key3];
|
237470
|
+
if (formatted2[key3] && typeof formatted2[key3] === "object" && !Array.isArray(formatted2[key3]))
|
237471
|
+
extract_(formatted2[key3]);
|
237472
237472
|
}
|
237473
237473
|
}
|
237474
237474
|
const formatted = format2(value_ || {});
|
@@ -237872,9 +237872,9 @@ var init_Errors = __esm(() => {
|
|
237872
237872
|
|
237873
237873
|
// ../../node_modules/ox/_esm/core/Json.js
|
237874
237874
|
function stringify4(value4, replacer, space) {
|
237875
|
-
return JSON.stringify(value4, (
|
237875
|
+
return JSON.stringify(value4, (key3, value5) => {
|
237876
237876
|
if (typeof replacer === "function")
|
237877
|
-
return replacer(
|
237877
|
+
return replacer(key3, value5);
|
237878
237878
|
if (typeof value5 === "bigint")
|
237879
237879
|
return value5.toString() + bigIntSuffix;
|
237880
237880
|
return value5;
|
@@ -238855,7 +238855,7 @@ async function localBatchGatewayRequest(parameters) {
|
|
238855
238855
|
const responses = [];
|
238856
238856
|
await Promise.all(queries.map(async (query, i6) => {
|
238857
238857
|
try {
|
238858
|
-
responses[i6] = await ccipRequest(query);
|
238858
|
+
responses[i6] = query.urls.includes(localBatchGatewayUrl) ? await localBatchGatewayRequest({ data: query.data, ccipRequest }) : await ccipRequest(query);
|
238859
238859
|
failures[i6] = false;
|
238860
238860
|
} catch (err) {
|
238861
238861
|
failures[i6] = true;
|
@@ -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_(key3, node, visitor, path7) {
|
239301
|
+
const ctrl = callVisitor(key3, node, visitor, path7);
|
239302
239302
|
if (identity2.isNode(ctrl) || identity2.isPair(ctrl)) {
|
239303
|
-
replaceNode(
|
239304
|
-
return visit_(
|
239303
|
+
replaceNode(key3, path7, ctrl);
|
239304
|
+
return visit_(key3, 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_(key3, node, visitor, path7) {
|
239349
|
+
const ctrl = await callVisitor(key3, node, visitor, path7);
|
239350
239350
|
if (identity2.isNode(ctrl) || identity2.isPair(ctrl)) {
|
239351
|
-
replaceNode(
|
239352
|
-
return visitAsync_(
|
239351
|
+
replaceNode(key3, path7, ctrl);
|
239352
|
+
return visitAsync_(key3, 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(key3, node, visitor, path7) {
|
239403
239403
|
if (typeof visitor === "function")
|
239404
|
-
return visitor(
|
239404
|
+
return visitor(key3, node, path7);
|
239405
239405
|
if (identity2.isMap(node))
|
239406
|
-
return visitor.Map?.(
|
239406
|
+
return visitor.Map?.(key3, node, path7);
|
239407
239407
|
if (identity2.isSeq(node))
|
239408
|
-
return visitor.Seq?.(
|
239408
|
+
return visitor.Seq?.(key3, node, path7);
|
239409
239409
|
if (identity2.isPair(node))
|
239410
|
-
return visitor.Pair?.(
|
239410
|
+
return visitor.Pair?.(key3, node, path7);
|
239411
239411
|
if (identity2.isScalar(node))
|
239412
|
-
return visitor.Scalar?.(
|
239412
|
+
return visitor.Scalar?.(key3, node, path7);
|
239413
239413
|
if (identity2.isAlias(node))
|
239414
|
-
return visitor.Alias?.(
|
239414
|
+
return visitor.Alias?.(key3, node, path7);
|
239415
239415
|
return;
|
239416
239416
|
}
|
239417
|
-
function replaceNode(
|
239417
|
+
function replaceNode(key3, path7, node) {
|
239418
239418
|
const parent = path7[path7.length - 1];
|
239419
239419
|
if (identity2.isCollection(parent)) {
|
239420
|
-
parent.items[
|
239420
|
+
parent.items[key3] = node;
|
239421
239421
|
} else if (identity2.isPair(parent)) {
|
239422
|
-
if (
|
239422
|
+
if (key3 === "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, key3, 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, key3, 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 [key3, ...rest] = path7;
|
240023
|
+
const node = this.get(key3, 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(key3, collectionFromPath(this.schema, rest, value4));
|
240028
240028
|
else
|
240029
|
-
throw new Error(`Expected YAML collection at ${
|
240029
|
+
throw new Error(`Expected YAML collection at ${key3}. Remaining path: ${rest}`);
|
240030
240030
|
}
|
240031
240031
|
}
|
240032
240032
|
deleteIn(path7) {
|
240033
|
-
const [
|
240033
|
+
const [key3, ...rest] = path7;
|
240034
240034
|
if (rest.length === 0)
|
240035
|
-
return this.delete(
|
240036
|
-
const node = this.get(
|
240035
|
+
return this.delete(key3);
|
240036
|
+
const node = this.get(key3, 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 ${key3}. Remaining path: ${rest}`);
|
240041
240041
|
}
|
240042
240042
|
getIn(path7, keepScalar) {
|
240043
|
-
const [
|
240044
|
-
const node = this.get(
|
240043
|
+
const [key3, ...rest] = path7;
|
240044
|
+
const node = this.get(key3, 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 [key3, ...rest] = path7;
|
240060
240060
|
if (rest.length === 0)
|
240061
|
-
return this.has(
|
240062
|
-
const node = this.get(
|
240061
|
+
return this.has(key3);
|
240062
|
+
const node = this.get(key3, true);
|
240063
240063
|
return identity2.isCollection(node) ? node.hasIn(rest) : false;
|
240064
240064
|
}
|
240065
240065
|
setIn(path7, value4) {
|
240066
|
-
const [
|
240066
|
+
const [key3, ...rest] = path7;
|
240067
240067
|
if (rest.length === 0) {
|
240068
|
-
this.set(
|
240068
|
+
this.set(key3, value4);
|
240069
240069
|
} else {
|
240070
|
-
const node = this.get(
|
240070
|
+
const node = this.get(key3, 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(key3, collectionFromPath(this.schema, rest, value4));
|
240075
240075
|
else
|
240076
|
-
throw new Error(`Expected YAML collection at ${
|
240076
|
+
throw new Error(`Expected YAML collection at ${key3}. 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: key3, 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(key3) && key3.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(key3) || !identity2.isNode(key3) && typeof key3 === "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 && (!key3 || keyComment && value4 == null && !ctx.inFlow || identity2.isCollection(key3) || (identity2.isScalar(key3) ? key3.type === Scalar.Scalar.BLOCK_FOLDED || key3.type === Scalar.Scalar.BLOCK_LITERAL : typeof key3 === "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(key3, 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, key3) => (merge7.identify(key3) || identity2.isScalar(key3) && (!key3.type || key3.type === Scalar.Scalar.PLAIN) && merge7.identify(key3.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 [key3, value5] of srcMap) {
|
240845
240845
|
if (map7 instanceof Map) {
|
240846
|
-
if (!map7.has(
|
240847
|
-
map7.set(
|
240846
|
+
if (!map7.has(key3))
|
240847
|
+
map7.set(key3, 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(key3);
|
240850
|
+
} else if (!Object.prototype.hasOwnProperty.call(map7, key3)) {
|
240851
|
+
Object.defineProperty(map7, key3, {
|
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: key3, value: value4 }) {
|
240874
|
+
if (identity2.isNode(key3) && key3.addToJSMap)
|
240875
|
+
key3.addToJSMap(ctx, map7, value4);
|
240876
|
+
else if (merge7.isMergeKey(ctx, key3))
|
240877
240877
|
merge7.addMergeToJSMap(ctx, map7, value4);
|
240878
240878
|
else {
|
240879
|
-
const jsKey = toJS.toJS(
|
240879
|
+
const jsKey = toJS.toJS(key3, "", 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(key3, 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(key3, 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(key3) && 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 = key3.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(key3, value4, ctx) {
|
240934
|
+
const k6 = createNode.createNode(key3, 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(key3, value4 = null) {
|
240941
240941
|
Object.defineProperty(this, identity2.NODE_TYPE, { value: identity2.PAIR });
|
240942
|
-
this.key =
|
240942
|
+
this.key = key3;
|
240943
240943
|
this.value = value4;
|
240944
240944
|
}
|
240945
240945
|
clone(schema) {
|
240946
|
-
let { key:
|
240947
|
-
if (identity2.isNode(
|
240948
|
-
|
240946
|
+
let { key: key3, value: value4 } = this;
|
240947
|
+
if (identity2.isNode(key3))
|
240948
|
+
key3 = key3.clone(schema);
|
240949
240949
|
if (identity2.isNode(value4))
|
240950
240950
|
value4 = value4.clone(schema);
|
240951
|
-
return new Pair(
|
240951
|
+
return new Pair(key3, 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, key3) {
|
241119
|
+
const k6 = identity2.isScalar(key3) ? key3.value : key3;
|
241120
241120
|
for (const it2 of items) {
|
241121
241121
|
if (identity2.isPair(it2)) {
|
241122
|
-
if (it2.key ===
|
241122
|
+
if (it2.key === key3 || 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 = (key3, 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, key3, value4);
|
241145
|
+
else if (Array.isArray(replacer) && !replacer.includes(key3))
|
241146
241146
|
return;
|
241147
241147
|
if (value4 !== undefined || keepUndefined)
|
241148
|
-
map7.items.push(Pair.createPair(
|
241148
|
+
map7.items.push(Pair.createPair(key3, value4, ctx));
|
241149
241149
|
};
|
241150
241150
|
if (obj instanceof Map) {
|
241151
|
-
for (const [
|
241152
|
-
add(
|
241151
|
+
for (const [key3, value4] of obj)
|
241152
|
+
add(key3, value4);
|
241153
241153
|
} else if (obj && typeof obj === "object") {
|
241154
|
-
for (const
|
241155
|
-
add(
|
241154
|
+
for (const key3 of Object.keys(obj))
|
241155
|
+
add(key3, obj[key3]);
|
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(key3) {
|
241190
|
+
const it2 = findPair(this.items, key3);
|
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(key3, keepScalar) {
|
241197
|
+
const it2 = findPair(this.items, key3);
|
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(key3) {
|
241202
|
+
return !!findPair(this.items, key3);
|
241203
241203
|
}
|
241204
|
-
set(
|
241205
|
-
this.add(new Pair.Pair(
|
241204
|
+
set(key3, value4) {
|
241205
|
+
this.add(new Pair.Pair(key3, 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(key3) {
|
241277
|
+
const idx = asItemIndex(key3);
|
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(key3, keepScalar) {
|
241284
|
+
const idx = asItemIndex(key3);
|
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(key3) {
|
241291
|
+
const idx = asItemIndex(key3);
|
241292
241292
|
return typeof idx === "number" && idx < this.items.length;
|
241293
241293
|
}
|
241294
|
-
set(
|
241295
|
-
const idx = asItemIndex(
|
241294
|
+
set(key3, value4) {
|
241295
|
+
const idx = asItemIndex(key3);
|
241296
241296
|
if (typeof idx !== "number")
|
241297
|
-
throw new Error(`Expected a valid index, not ${
|
241297
|
+
throw new Error(`Expected a valid index, not ${key3}.`);
|
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 key3 = obj instanceof Set ? it2 : String(i7++);
|
241332
|
+
it2 = replacer.call(obj, key3, 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(key3) {
|
241341
|
+
let idx = identity2.isScalar(key3) ? key3.value : key3;
|
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 key3, value4;
|
241715
241715
|
if (Array.isArray(it2)) {
|
241716
241716
|
if (it2.length === 2) {
|
241717
|
-
|
241717
|
+
key3 = 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
|
+
key3 = keys[0];
|
241725
|
+
value4 = it2[key3];
|
241726
241726
|
} else {
|
241727
241727
|
throw new TypeError(`Expected tuple with one key, not ${keys.length} keys`);
|
241728
241728
|
}
|
241729
241729
|
} else {
|
241730
|
-
|
241730
|
+
key3 = it2;
|
241731
241731
|
}
|
241732
|
-
pairs2.items.push(Pair.createPair(
|
241732
|
+
pairs2.items.push(Pair.createPair(key3, 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 key3, value4;
|
241774
241774
|
if (identity2.isPair(pair)) {
|
241775
|
-
|
241776
|
-
value4 = toJS.toJS(pair.value,
|
241775
|
+
key3 = toJS.toJS(pair.key, "", ctx);
|
241776
|
+
value4 = toJS.toJS(pair.value, key3, ctx);
|
241777
241777
|
} else {
|
241778
|
-
|
241778
|
+
key3 = toJS.toJS(pair, "", ctx);
|
241779
241779
|
}
|
241780
|
-
if (map7.has(
|
241780
|
+
if (map7.has(key3))
|
241781
241781
|
throw new Error("Ordered maps must not include duplicate keys");
|
241782
|
-
map7.set(
|
241782
|
+
map7.set(key3, 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: key3 } of pairs$1.items) {
|
241804
|
+
if (identity2.isScalar(key3)) {
|
241805
|
+
if (seenKeys.includes(key3.value)) {
|
241806
|
+
onError(`Ordered maps must not include duplicate keys: ${key3.value}`);
|
241807
241807
|
} else {
|
241808
|
-
seenKeys.push(
|
241808
|
+
seenKeys.push(key3.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(key3) {
|
241983
241983
|
let pair;
|
241984
|
-
if (identity2.isPair(
|
241985
|
-
pair =
|
241986
|
-
else if (
|
241987
|
-
pair = new Pair.Pair(
|
241984
|
+
if (identity2.isPair(key3))
|
241985
|
+
pair = key3;
|
241986
|
+
else if (key3 && typeof key3 === "object" && "key" in key3 && "value" in key3 && key3.value === null)
|
241987
|
+
pair = new Pair.Pair(key3.key, null);
|
241988
241988
|
else
|
241989
|
-
pair = new Pair.Pair(
|
241989
|
+
pair = new Pair.Pair(key3, 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(key3, keepPair) {
|
241995
|
+
const pair = YAMLMap.findPair(this.items, key3);
|
241996
241996
|
return !keepPair && identity2.isPair(pair) ? identity2.isScalar(pair.key) ? pair.key.value : pair.key : pair;
|
241997
241997
|
}
|
241998
|
-
set(
|
241998
|
+
set(key3, 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, key3);
|
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(key3));
|
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((key3) => key3 !== "yaml11").map((key3) => JSON.stringify(key3)).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((key3) => JSON.stringify(key3)).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(key3, value4, options = {}) {
|
242492
|
+
const k6 = this.createNode(key3, 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(key3) {
|
242497
|
+
return assertCollection(this.contents) ? this.contents.delete(key3) : 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(key3, keepScalar) {
|
242509
|
+
return identity2.isCollection(this.contents) ? this.contents.get(key3, 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(key3) {
|
242517
|
+
return identity2.isCollection(this.contents) ? this.contents.has(key3) : 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(key3, value4) {
|
242525
242525
|
if (this.contents == null) {
|
242526
|
-
this.contents = Collection.collectionFromPath(this.schema, [
|
242526
|
+
this.contents = Collection.collectionFromPath(this.schema, [key3], value4);
|
242527
242527
|
} else if (assertCollection(this.contents)) {
|
242528
|
-
this.contents.set(
|
242528
|
+
this.contents.set(key3, 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(key3) {
|
242811
|
+
if (!key3)
|
242812
242812
|
return null;
|
242813
|
-
switch (
|
242813
|
+
switch (key3.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 (key3.source.includes(`
|
242819
242819
|
`))
|
242820
242820
|
return true;
|
242821
|
-
if (
|
242822
|
-
for (const st2 of
|
242821
|
+
if (key3.end) {
|
242822
|
+
for (const st2 of key3.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 key3.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: key3, sep: sep5, value: value4 } = collItem;
|
242894
242894
|
const keyProps = resolveProps.resolveProps(start3, {
|
242895
242895
|
indicator: "explicit-key-ind",
|
242896
|
-
next:
|
242896
|
+
next: key3 ?? 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 (key3) {
|
242905
|
+
if (key3.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 key3 && key3.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(key3)) {
|
242922
|
+
onError(key3 ?? 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 = key3 ? composeNode(ctx, key3, 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, key3, 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: !key3 || key3.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: key3, 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: key3 ?? 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(key3))
|
243124
|
+
onError(key3, "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 = key3 ? composeNode(ctx, key3, props, onError) : composeEmptyNode(ctx, keyStart, start3, null, props, onError);
|
243170
|
+
if (isBlock(key3))
|
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 errors5 = 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 errors5.YAMLWarning(pos, code2, message));
|
244033
244033
|
else
|
244034
|
-
this.errors.push(new
|
244034
|
+
this.errors.push(new errors5.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 errors5.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 errors5.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 errors5.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 errors5 = 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 errors5.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 key3 of Object.keys(token))
|
244293
|
+
if (key3 !== "type" && key3 !== "offset")
|
244294
|
+
delete token[key3];
|
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 key3 of Object.keys(token))
|
244344
|
+
if (key3 !== "type" && key3 !== "offset")
|
244345
|
+
delete token[key3];
|
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: key3, 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 (key3)
|
244402
|
+
res += stringifyToken(key3);
|
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 key3 = 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: key3, 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 errors5 = 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(errors5.prettifyError(source, lineCounter2));
|
246058
|
+
doc2.warnings.forEach(errors5.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 errors5.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(errors5.prettifyError(source, lineCounter2));
|
246079
|
+
doc2.warnings.forEach(errors5.prettifyError(source, lineCounter2));
|
246080
246080
|
}
|
246081
246081
|
return doc2;
|
246082
246082
|
}
|
@@ -258129,9 +258129,9 @@ ${formattedErrors}`);
|
|
258129
258129
|
throw error$37;
|
258130
258130
|
}
|
258131
258131
|
}
|
258132
|
-
var ApplicationAccessTokenSchema = string$1().regex(/^sm_aat_
|
258133
|
-
var PersonalAccessTokenSchema = string$1().regex(/^sm_pat_
|
258134
|
-
var AccessTokenSchema = string$1().regex(/^(sm_pat_
|
258132
|
+
var ApplicationAccessTokenSchema = string$1().regex(/^sm_aat_.+$/);
|
258133
|
+
var PersonalAccessTokenSchema = string$1().regex(/^sm_pat_.+$/);
|
258134
|
+
var AccessTokenSchema = string$1().regex(/^(sm_pat_.+|sm_aat_.+)$/);
|
258135
258135
|
function tryParseJson(value, defaultValue = null) {
|
258136
258136
|
try {
|
258137
258137
|
const parsed = JSON.parse(value);
|
@@ -258139,7 +258139,7 @@ function tryParseJson(value, defaultValue = null) {
|
|
258139
258139
|
return defaultValue;
|
258140
258140
|
}
|
258141
258141
|
return parsed;
|
258142
|
-
} catch (
|
258142
|
+
} catch (_err) {
|
258143
258143
|
return defaultValue;
|
258144
258144
|
}
|
258145
258145
|
}
|
@@ -263769,7 +263769,7 @@ async function findMonoRepoPackages(projectDir) {
|
|
263769
263769
|
}));
|
263770
263770
|
const allPaths = packagePaths.flat();
|
263771
263771
|
return allPaths.length === 0 ? [projectDir] : [monoRepoRoot, ...allPaths];
|
263772
|
-
} catch (
|
263772
|
+
} catch (_error) {
|
263773
263773
|
return [projectDir];
|
263774
263774
|
}
|
263775
263775
|
}
|
@@ -263840,7 +263840,7 @@ function pruneCurrentEnv(currentEnv, env2) {
|
|
263840
263840
|
var package_default = {
|
263841
263841
|
name: "@settlemint/sdk-cli",
|
263842
263842
|
description: "Command-line interface for SettleMint SDK, providing development tools and project management capabilities",
|
263843
|
-
version: "2.4.0-
|
263843
|
+
version: "2.4.0-pr6922b64b",
|
263844
263844
|
type: "module",
|
263845
263845
|
private: false,
|
263846
263846
|
license: "FSL-1.1-MIT",
|
@@ -263859,7 +263859,9 @@ var package_default = {
|
|
263859
263859
|
url: "https://github.com/settlemint/sdk/issues",
|
263860
263860
|
email: "support@settlemint.com"
|
263861
263861
|
},
|
263862
|
-
files: [
|
263862
|
+
files: [
|
263863
|
+
"dist"
|
263864
|
+
],
|
263863
263865
|
exports: {
|
263864
263866
|
"./*": {
|
263865
263867
|
types: "./dist/*.d.ts",
|
@@ -263888,11 +263890,11 @@ var package_default = {
|
|
263888
263890
|
"@inquirer/confirm": "5.1.12",
|
263889
263891
|
"@inquirer/input": "4.1.12",
|
263890
263892
|
"@inquirer/password": "4.0.15",
|
263891
|
-
"@inquirer/select": "4.2.
|
263892
|
-
"@settlemint/sdk-js": "2.4.0-
|
263893
|
-
"@settlemint/sdk-utils": "2.4.0-
|
263894
|
-
"@settlemint/sdk-viem": "2.4.0-
|
263895
|
-
"@types/node": "24.0.
|
263893
|
+
"@inquirer/select": "4.2.4",
|
263894
|
+
"@settlemint/sdk-js": "2.4.0-pr6922b64b",
|
263895
|
+
"@settlemint/sdk-utils": "2.4.0-pr6922b64b",
|
263896
|
+
"@settlemint/sdk-viem": "2.4.0-pr6922b64b",
|
263897
|
+
"@types/node": "24.0.8",
|
263896
263898
|
"@types/semver": "7.7.0",
|
263897
263899
|
"@types/which": "3.0.4",
|
263898
263900
|
"get-tsconfig": "4.10.1",
|
@@ -263900,7 +263902,7 @@ var package_default = {
|
|
263900
263902
|
"is-in-ci": "1.0.0",
|
263901
263903
|
semver: "7.7.2",
|
263902
263904
|
slugify: "1.6.6",
|
263903
|
-
viem: "2.31.
|
263905
|
+
viem: "2.31.6",
|
263904
263906
|
which: "5.0.0",
|
263905
263907
|
yaml: "2.8.0",
|
263906
263908
|
yoctocolors: "2.1.1"
|
@@ -263961,7 +263963,7 @@ async function telemetry(data) {
|
|
263961
263963
|
signal: controller.signal
|
263962
263964
|
});
|
263963
263965
|
clearTimeout(timeout);
|
263964
|
-
} catch (
|
263966
|
+
} catch (_error) {}
|
263965
263967
|
}
|
263966
263968
|
|
263967
263969
|
// ../../node_modules/@commander-js/extra-typings/esm.mjs
|
@@ -263981,10 +263983,7 @@ var {
|
|
263981
263983
|
} = import__.default;
|
263982
263984
|
|
263983
263985
|
// ../../node_modules/@inquirer/core/dist/esm/lib/key.js
|
263984
|
-
var isUpKey = (key) => key.name === "up" || key.name === "k" || key.ctrl && key.name === "p";
|
263985
|
-
var isDownKey = (key) => key.name === "down" || key.name === "j" || key.ctrl && key.name === "n";
|
263986
263986
|
var isBackspaceKey = (key) => key.name === "backspace";
|
263987
|
-
var isNumberKey = (key) => "1234567890".includes(key.name);
|
263988
263987
|
var isEnterKey = (key) => key.name === "enter" || key.name === "return";
|
263989
263988
|
// ../../node_modules/@inquirer/core/dist/esm/lib/errors.js
|
263990
263989
|
class AbortPromptError extends Error {
|
@@ -264518,22 +264517,11 @@ function usePrefix({ status = "idle", theme }) {
|
|
264518
264517
|
const iconName = status === "loading" ? "idle" : status;
|
264519
264518
|
return typeof prefix === "string" ? prefix : prefix[iconName] ?? prefix["idle"];
|
264520
264519
|
}
|
264521
|
-
// ../../node_modules/@inquirer/core/dist/esm/lib/use-memo.js
|
264522
|
-
function useMemo(fn, dependencies) {
|
264523
|
-
return withPointer((pointer) => {
|
264524
|
-
const prev = pointer.get();
|
264525
|
-
if (!prev || prev.dependencies.length !== dependencies.length || prev.dependencies.some((dep, i) => dep !== dependencies[i])) {
|
264526
|
-
const value = fn();
|
264527
|
-
pointer.set({ value, dependencies });
|
264528
|
-
return value;
|
264529
|
-
}
|
264530
|
-
return prev.value;
|
264531
|
-
});
|
264532
|
-
}
|
264533
264520
|
// ../../node_modules/@inquirer/core/dist/esm/lib/use-ref.js
|
264534
264521
|
function useRef(val) {
|
264535
264522
|
return useState({ current: val })[0];
|
264536
264523
|
}
|
264524
|
+
|
264537
264525
|
// ../../node_modules/@inquirer/core/dist/esm/lib/use-keypress.js
|
264538
264526
|
function useKeypress(userHandler) {
|
264539
264527
|
const signal = useRef(userHandler);
|
@@ -264565,72 +264553,6 @@ function readlineWidth() {
|
|
264565
264553
|
return import_cli_width.default({ defaultWidth: 80, output: readline().output });
|
264566
264554
|
}
|
264567
264555
|
|
264568
|
-
// ../../node_modules/@inquirer/core/dist/esm/lib/pagination/use-pagination.js
|
264569
|
-
function usePointerPosition({ active, renderedItems, pageSize, loop }) {
|
264570
|
-
const state = useRef({
|
264571
|
-
lastPointer: active,
|
264572
|
-
lastActive: undefined
|
264573
|
-
});
|
264574
|
-
const { lastPointer, lastActive } = state.current;
|
264575
|
-
const middle = Math.floor(pageSize / 2);
|
264576
|
-
const renderedLength = renderedItems.reduce((acc, item) => acc + item.length, 0);
|
264577
|
-
const defaultPointerPosition = renderedItems.slice(0, active).reduce((acc, item) => acc + item.length, 0);
|
264578
|
-
let pointer = defaultPointerPosition;
|
264579
|
-
if (renderedLength > pageSize) {
|
264580
|
-
if (loop) {
|
264581
|
-
pointer = lastPointer;
|
264582
|
-
if (lastActive != null && lastActive < active && active - lastActive < pageSize) {
|
264583
|
-
pointer = Math.min(middle, Math.abs(active - lastActive) === 1 ? Math.min(lastPointer + (renderedItems[lastActive]?.length ?? 0), Math.max(defaultPointerPosition, lastPointer)) : lastPointer + active - lastActive);
|
264584
|
-
}
|
264585
|
-
} else {
|
264586
|
-
const spaceUnderActive = renderedItems.slice(active).reduce((acc, item) => acc + item.length, 0);
|
264587
|
-
pointer = spaceUnderActive < pageSize - middle ? pageSize - spaceUnderActive : Math.min(defaultPointerPosition, middle);
|
264588
|
-
}
|
264589
|
-
}
|
264590
|
-
state.current.lastPointer = pointer;
|
264591
|
-
state.current.lastActive = active;
|
264592
|
-
return pointer;
|
264593
|
-
}
|
264594
|
-
function usePagination({ items, active, renderItem, pageSize, loop = true }) {
|
264595
|
-
const width = readlineWidth();
|
264596
|
-
const bound = (num) => (num % items.length + items.length) % items.length;
|
264597
|
-
const renderedItems = items.map((item, index) => {
|
264598
|
-
if (item == null)
|
264599
|
-
return [];
|
264600
|
-
return breakLines(renderItem({ item, index, isActive: index === active }), width).split(`
|
264601
|
-
`);
|
264602
|
-
});
|
264603
|
-
const renderedLength = renderedItems.reduce((acc, item) => acc + item.length, 0);
|
264604
|
-
const renderItemAtIndex = (index) => renderedItems[index] ?? [];
|
264605
|
-
const pointer = usePointerPosition({ active, renderedItems, pageSize, loop });
|
264606
|
-
const activeItem = renderItemAtIndex(active).slice(0, pageSize);
|
264607
|
-
const activeItemPosition = pointer + activeItem.length <= pageSize ? pointer : pageSize - activeItem.length;
|
264608
|
-
const pageBuffer = Array.from({ length: pageSize });
|
264609
|
-
pageBuffer.splice(activeItemPosition, activeItem.length, ...activeItem);
|
264610
|
-
const itemVisited = new Set([active]);
|
264611
|
-
let bufferPointer = activeItemPosition + activeItem.length;
|
264612
|
-
let itemPointer = bound(active + 1);
|
264613
|
-
while (bufferPointer < pageSize && !itemVisited.has(itemPointer) && (loop && renderedLength > pageSize ? itemPointer !== active : itemPointer > active)) {
|
264614
|
-
const lines = renderItemAtIndex(itemPointer);
|
264615
|
-
const linesToAdd = lines.slice(0, pageSize - bufferPointer);
|
264616
|
-
pageBuffer.splice(bufferPointer, linesToAdd.length, ...linesToAdd);
|
264617
|
-
itemVisited.add(itemPointer);
|
264618
|
-
bufferPointer += linesToAdd.length;
|
264619
|
-
itemPointer = bound(itemPointer + 1);
|
264620
|
-
}
|
264621
|
-
bufferPointer = activeItemPosition - 1;
|
264622
|
-
itemPointer = bound(active - 1);
|
264623
|
-
while (bufferPointer >= 0 && !itemVisited.has(itemPointer) && (loop && renderedLength > pageSize ? itemPointer !== active : itemPointer < active)) {
|
264624
|
-
const lines = renderItemAtIndex(itemPointer);
|
264625
|
-
const linesToAdd = lines.slice(Math.max(0, lines.length - bufferPointer - 1));
|
264626
|
-
pageBuffer.splice(bufferPointer - linesToAdd.length + 1, linesToAdd.length, ...linesToAdd);
|
264627
|
-
itemVisited.add(itemPointer);
|
264628
|
-
bufferPointer -= linesToAdd.length;
|
264629
|
-
itemPointer = bound(itemPointer - 1);
|
264630
|
-
}
|
264631
|
-
return pageBuffer.filter((line) => typeof line === "string").join(`
|
264632
|
-
`);
|
264633
|
-
}
|
264634
264556
|
// ../../node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
|
264635
264557
|
var import_mute_stream = __toESM(require_lib(), 1);
|
264636
264558
|
import * as readline2 from "node:readline";
|
@@ -265013,20 +264935,6 @@ function createPrompt(view) {
|
|
265013
264935
|
};
|
265014
264936
|
return prompt;
|
265015
264937
|
}
|
265016
|
-
// ../../node_modules/@inquirer/core/dist/esm/lib/Separator.js
|
265017
|
-
var import_yoctocolors_cjs2 = __toESM(require_yoctocolors_cjs(), 1);
|
265018
|
-
class Separator {
|
265019
|
-
separator = import_yoctocolors_cjs2.default.dim(Array.from({ length: 15 }).join(esm_default.line));
|
265020
|
-
type = "separator";
|
265021
|
-
constructor(separator) {
|
265022
|
-
if (separator) {
|
265023
|
-
this.separator = separator;
|
265024
|
-
}
|
265025
|
-
}
|
265026
|
-
static isSeparator(choice) {
|
265027
|
-
return Boolean(choice && typeof choice === "object" && "type" in choice && choice.type === "separator");
|
265028
|
-
}
|
265029
|
-
}
|
265030
264938
|
// ../utils/dist/terminal.js
|
265031
264939
|
import { spawn } from "node:child_process";
|
265032
264940
|
var import_console_table_printer2 = __toESM(require_dist2(), 1);
|
@@ -276513,9 +276421,9 @@ ${formattedErrors}`);
|
|
276513
276421
|
throw error$372;
|
276514
276422
|
}
|
276515
276423
|
}
|
276516
|
-
var ApplicationAccessTokenSchema2 = string$12().regex(/^sm_aat_
|
276517
|
-
var PersonalAccessTokenSchema2 = string$12().regex(/^sm_pat_
|
276518
|
-
var AccessTokenSchema2 = string$12().regex(/^(sm_pat_
|
276424
|
+
var ApplicationAccessTokenSchema2 = string$12().regex(/^sm_aat_.+$/);
|
276425
|
+
var PersonalAccessTokenSchema2 = string$12().regex(/^sm_pat_.+$/);
|
276426
|
+
var AccessTokenSchema2 = string$12().regex(/^(sm_pat_.+|sm_aat_.+)$/);
|
276519
276427
|
function tryParseJson2(value, defaultValue = null) {
|
276520
276428
|
try {
|
276521
276429
|
const parsed = JSON.parse(value);
|
@@ -276523,7 +276431,7 @@ function tryParseJson2(value, defaultValue = null) {
|
|
276523
276431
|
return defaultValue;
|
276524
276432
|
}
|
276525
276433
|
return parsed;
|
276526
|
-
} catch (
|
276434
|
+
} catch (_err) {
|
276527
276435
|
return defaultValue;
|
276528
276436
|
}
|
276529
276437
|
}
|
@@ -288289,6 +288197,20 @@ var restartBlockchainNetwork = graphql(`
|
|
288289
288197
|
}
|
288290
288198
|
}
|
288291
288199
|
`, [BlockchainNetworkFragment]);
|
288200
|
+
var pauseBlockchainNetwork = graphql(`
|
288201
|
+
mutation PauseBlockchainNetwork($uniqueName: String!) {
|
288202
|
+
pauseBlockchainNetworkByUniqueName(uniqueName: $uniqueName) {
|
288203
|
+
...BlockchainNetwork
|
288204
|
+
}
|
288205
|
+
}
|
288206
|
+
`, [BlockchainNetworkFragment]);
|
288207
|
+
var resumeBlockchainNetwork = graphql(`
|
288208
|
+
mutation ResumeBlockchainNetwork($uniqueName: String!) {
|
288209
|
+
resumeBlockchainNetworkByUniqueName(uniqueName: $uniqueName) {
|
288210
|
+
...BlockchainNetwork
|
288211
|
+
}
|
288212
|
+
}
|
288213
|
+
`, [BlockchainNetworkFragment]);
|
288292
288214
|
var blockchainNetworkList = (gqlClient) => {
|
288293
288215
|
return async (applicationUniqueName) => {
|
288294
288216
|
const { blockchainNetworksByUniqueName: { items } } = await gqlClient.request(getBlockchainNetworks, { applicationUniqueName });
|
@@ -288323,6 +288245,14 @@ var blockchainNetworkRestart = (gqlClient) => async (blockchainNetworkUniqueName
|
|
288323
288245
|
const { restartBlockchainNetworkByUniqueName: blockchainNetwork } = await gqlClient.request(restartBlockchainNetwork, { uniqueName: blockchainNetworkUniqueName });
|
288324
288246
|
return blockchainNetwork;
|
288325
288247
|
};
|
288248
|
+
var blockchainNetworkPause = (gqlClient) => async (blockchainNetworkUniqueName) => {
|
288249
|
+
const { pauseBlockchainNetworkByUniqueName: blockchainNetwork } = await gqlClient.request(pauseBlockchainNetwork, { uniqueName: blockchainNetworkUniqueName });
|
288250
|
+
return blockchainNetwork;
|
288251
|
+
};
|
288252
|
+
var blockchainNetworkResume = (gqlClient) => async (blockchainNetworkUniqueName) => {
|
288253
|
+
const { resumeBlockchainNetworkByUniqueName: blockchainNetwork } = await gqlClient.request(resumeBlockchainNetwork, { uniqueName: blockchainNetworkUniqueName });
|
288254
|
+
return blockchainNetwork;
|
288255
|
+
};
|
288326
288256
|
var BlockchainNodeFragment = graphql(`
|
288327
288257
|
fragment BlockchainNode on BlockchainNode {
|
288328
288258
|
__typename
|
@@ -288456,6 +288386,20 @@ var restartBlockchainNode = graphql(`
|
|
288456
288386
|
}
|
288457
288387
|
}
|
288458
288388
|
`, [BlockchainNodeFragment]);
|
288389
|
+
var pauseBlockchainNode = graphql(`
|
288390
|
+
mutation PauseBlockchainNode($uniqueName: String!) {
|
288391
|
+
pauseBlockchainNodeByUniqueName(uniqueName: $uniqueName) {
|
288392
|
+
...BlockchainNode
|
288393
|
+
}
|
288394
|
+
}
|
288395
|
+
`, [BlockchainNodeFragment]);
|
288396
|
+
var resumeBlockchainNode = graphql(`
|
288397
|
+
mutation ResumeBlockchainNode($uniqueName: String!) {
|
288398
|
+
resumeBlockchainNodeByUniqueName(uniqueName: $uniqueName) {
|
288399
|
+
...BlockchainNode
|
288400
|
+
}
|
288401
|
+
}
|
288402
|
+
`, [BlockchainNodeFragment]);
|
288459
288403
|
var blockchainNodeList = (gqlClient) => {
|
288460
288404
|
return async (applicationUniqueName) => {
|
288461
288405
|
const { blockchainNodesByUniqueName: { items } } = await gqlClient.request(getBlockchainNodes, { applicationUniqueName });
|
@@ -288484,6 +288428,14 @@ var blockchainNodeRestart = (gqlClient) => async (blockchainNodeUniqueName) => {
|
|
288484
288428
|
const { restartBlockchainNodeByUniqueName: blockchainNode } = await gqlClient.request(restartBlockchainNode, { uniqueName: blockchainNodeUniqueName });
|
288485
288429
|
return blockchainNode;
|
288486
288430
|
};
|
288431
|
+
var blockchainNodePause = (gqlClient) => async (blockchainNodeUniqueName) => {
|
288432
|
+
const { pauseBlockchainNodeByUniqueName: blockchainNode } = await gqlClient.request(pauseBlockchainNode, { uniqueName: blockchainNodeUniqueName });
|
288433
|
+
return blockchainNode;
|
288434
|
+
};
|
288435
|
+
var blockchainNodeResume = (gqlClient) => async (blockchainNodeUniqueName) => {
|
288436
|
+
const { resumeBlockchainNodeByUniqueName: blockchainNode } = await gqlClient.request(resumeBlockchainNode, { uniqueName: blockchainNodeUniqueName });
|
288437
|
+
return blockchainNode;
|
288438
|
+
};
|
288487
288439
|
var CustomDeploymentFragment = graphql(`
|
288488
288440
|
fragment CustomDeployment on CustomDeployment {
|
288489
288441
|
id
|
@@ -288566,6 +288518,20 @@ var restartCustomDeployment = graphql(`
|
|
288566
288518
|
}
|
288567
288519
|
}
|
288568
288520
|
`, [CustomDeploymentFragment]);
|
288521
|
+
var pauseCustomDeployment = graphql(`
|
288522
|
+
mutation PauseCustomDeployment($uniqueName: String!) {
|
288523
|
+
pauseCustomDeploymentByUniqueName(uniqueName: $uniqueName) {
|
288524
|
+
...CustomDeployment
|
288525
|
+
}
|
288526
|
+
}
|
288527
|
+
`, [CustomDeploymentFragment]);
|
288528
|
+
var resumeCustomDeployment = graphql(`
|
288529
|
+
mutation ResumeCustomDeployment($uniqueName: String!) {
|
288530
|
+
resumeCustomDeploymentByUniqueName(uniqueName: $uniqueName) {
|
288531
|
+
...CustomDeployment
|
288532
|
+
}
|
288533
|
+
}
|
288534
|
+
`, [CustomDeploymentFragment]);
|
288569
288535
|
var customdeploymentList = (gqlClient) => {
|
288570
288536
|
return async (applicationUniqueName) => {
|
288571
288537
|
const { customDeploymentsByUniqueName: { items } } = await gqlClient.request(getCustomDeployments, { applicationUniqueName });
|
@@ -288602,6 +288568,14 @@ var customDeploymentRestart = (gqlClient) => async (customDeploymentUniqueName)
|
|
288602
288568
|
const { restartCustomDeploymentByUniqueName: customDeployment } = await gqlClient.request(restartCustomDeployment, { uniqueName: customDeploymentUniqueName });
|
288603
288569
|
return customDeployment;
|
288604
288570
|
};
|
288571
|
+
var customDeploymentPause = (gqlClient) => async (customDeploymentUniqueName) => {
|
288572
|
+
const { pauseCustomDeploymentByUniqueName: customDeployment } = await gqlClient.request(pauseCustomDeployment, { uniqueName: customDeploymentUniqueName });
|
288573
|
+
return customDeployment;
|
288574
|
+
};
|
288575
|
+
var customDeploymentResume = (gqlClient) => async (customDeploymentUniqueName) => {
|
288576
|
+
const { resumeCustomDeploymentByUniqueName: customDeployment } = await gqlClient.request(resumeCustomDeployment, { uniqueName: customDeploymentUniqueName });
|
288577
|
+
return customDeployment;
|
288578
|
+
};
|
288605
288579
|
var getFoundryEnvConfig = graphql(`
|
288606
288580
|
query GetFoundryEnvConfig($blockchainNodeUniqueName: String!) {
|
288607
288581
|
foundryEnvConfigByUniqueName(blockchainNodeUniqueName: $blockchainNodeUniqueName)
|
@@ -288678,6 +288652,20 @@ var restartLoadBalancer = graphql(`
|
|
288678
288652
|
}
|
288679
288653
|
}
|
288680
288654
|
`, [LoadBalancerFragment]);
|
288655
|
+
var pauseLoadBalancer = graphql(`
|
288656
|
+
mutation PauseLoadBalancer($uniqueName: String!) {
|
288657
|
+
pauseLoadBalancerByUniqueName(uniqueName: $uniqueName) {
|
288658
|
+
...LoadBalancer
|
288659
|
+
}
|
288660
|
+
}
|
288661
|
+
`, [LoadBalancerFragment]);
|
288662
|
+
var resumeLoadBalancer = graphql(`
|
288663
|
+
mutation ResumeLoadBalancer($uniqueName: String!) {
|
288664
|
+
resumeLoadBalancerByUniqueName(uniqueName: $uniqueName) {
|
288665
|
+
...LoadBalancer
|
288666
|
+
}
|
288667
|
+
}
|
288668
|
+
`, [LoadBalancerFragment]);
|
288681
288669
|
var loadBalancerRead = (gqlClient) => {
|
288682
288670
|
return async (loadBalancerUniqueName) => {
|
288683
288671
|
const { loadBalancerByUniqueName: loadBalancer } = await gqlClient.request(getLoadBalancer, { uniqueName: loadBalancerUniqueName });
|
@@ -288711,6 +288699,14 @@ var loadBalancerRestart = (gqlClient) => async (loadBalancerUniqueName) => {
|
|
288711
288699
|
const { restartLoadBalancerByUniqueName: loadBalancer } = await gqlClient.request(restartLoadBalancer, { uniqueName: loadBalancerUniqueName });
|
288712
288700
|
return loadBalancer;
|
288713
288701
|
};
|
288702
|
+
var loadBalancerPause = (gqlClient) => async (loadBalancerUniqueName) => {
|
288703
|
+
const { pauseLoadBalancerByUniqueName: loadBalancer } = await gqlClient.request(pauseLoadBalancer, { uniqueName: loadBalancerUniqueName });
|
288704
|
+
return loadBalancer;
|
288705
|
+
};
|
288706
|
+
var loadBalancerResume = (gqlClient) => async (loadBalancerUniqueName) => {
|
288707
|
+
const { resumeLoadBalancerByUniqueName: loadBalancer } = await gqlClient.request(resumeLoadBalancer, { uniqueName: loadBalancerUniqueName });
|
288708
|
+
return loadBalancer;
|
288709
|
+
};
|
288714
288710
|
var InsightsFragment = graphql(`
|
288715
288711
|
fragment Insights on Insights {
|
288716
288712
|
__typename
|
@@ -288784,6 +288780,20 @@ var restartInsights = graphql(`
|
|
288784
288780
|
}
|
288785
288781
|
}
|
288786
288782
|
`, [InsightsFragment]);
|
288783
|
+
var pauseInsights = graphql(`
|
288784
|
+
mutation PauseInsights($uniqueName: String!) {
|
288785
|
+
pauseInsightsByUniqueName(uniqueName: $uniqueName) {
|
288786
|
+
...Insights
|
288787
|
+
}
|
288788
|
+
}
|
288789
|
+
`, [InsightsFragment]);
|
288790
|
+
var resumeInsights = graphql(`
|
288791
|
+
mutation ResumeInsights($uniqueName: String!) {
|
288792
|
+
resumeInsightsByUniqueName(uniqueName: $uniqueName) {
|
288793
|
+
...Insights
|
288794
|
+
}
|
288795
|
+
}
|
288796
|
+
`, [InsightsFragment]);
|
288787
288797
|
var insightsList = (gqlClient) => {
|
288788
288798
|
return async (applicationUniqueName) => {
|
288789
288799
|
const { insightsListByUniqueName: { items } } = await gqlClient.request(getInsights, { applicationUniqueName });
|
@@ -288817,6 +288827,14 @@ var insightsRestart = (gqlClient) => async (insightsUniqueName) => {
|
|
288817
288827
|
const { restartInsightsByUniqueName: insights } = await gqlClient.request(restartInsights, { uniqueName: insightsUniqueName });
|
288818
288828
|
return insights;
|
288819
288829
|
};
|
288830
|
+
var insightsPause = (gqlClient) => async (insightsUniqueName) => {
|
288831
|
+
const { pauseInsightsByUniqueName: insights } = await gqlClient.request(pauseInsights, { uniqueName: insightsUniqueName });
|
288832
|
+
return insights;
|
288833
|
+
};
|
288834
|
+
var insightsResume = (gqlClient) => async (insightsUniqueName) => {
|
288835
|
+
const { resumeInsightsByUniqueName: insights } = await gqlClient.request(resumeInsights, { uniqueName: insightsUniqueName });
|
288836
|
+
return insights;
|
288837
|
+
};
|
288820
288838
|
var IntegrationFragment = graphql(`
|
288821
288839
|
fragment Integration on Integration {
|
288822
288840
|
__typename
|
@@ -288886,6 +288904,20 @@ var restartIntegrationTool = graphql(`
|
|
288886
288904
|
}
|
288887
288905
|
}
|
288888
288906
|
`, [IntegrationFragment]);
|
288907
|
+
var pauseIntegrationTool = graphql(`
|
288908
|
+
mutation PauseIntegrationTool($uniqueName: String!) {
|
288909
|
+
pauseIntegrationByUniqueName(uniqueName: $uniqueName) {
|
288910
|
+
...Integration
|
288911
|
+
}
|
288912
|
+
}
|
288913
|
+
`, [IntegrationFragment]);
|
288914
|
+
var resumeIntegrationTool = graphql(`
|
288915
|
+
mutation ResumeIntegrationTool($uniqueName: String!) {
|
288916
|
+
resumeIntegrationByUniqueName(uniqueName: $uniqueName) {
|
288917
|
+
...Integration
|
288918
|
+
}
|
288919
|
+
}
|
288920
|
+
`, [IntegrationFragment]);
|
288889
288921
|
var integrationToolList = (gqlClient) => {
|
288890
288922
|
return async (applicationUniqueName) => {
|
288891
288923
|
const { integrationsByUniqueName: { items } } = await gqlClient.request(getIntegrations, { applicationUniqueName });
|
@@ -288913,6 +288945,14 @@ var integrationToolRestart = (gqlClient) => async (integrationUniqueName) => {
|
|
288913
288945
|
const { restartIntegrationByUniqueName: integration } = await gqlClient.request(restartIntegrationTool, { uniqueName: integrationUniqueName });
|
288914
288946
|
return integration;
|
288915
288947
|
};
|
288948
|
+
var integrationToolPause = (gqlClient) => async (integrationUniqueName) => {
|
288949
|
+
const { pauseIntegrationByUniqueName: integration } = await gqlClient.request(pauseIntegrationTool, { uniqueName: integrationUniqueName });
|
288950
|
+
return integration;
|
288951
|
+
};
|
288952
|
+
var integrationToolResume = (gqlClient) => async (integrationUniqueName) => {
|
288953
|
+
const { resumeIntegrationByUniqueName: integration } = await gqlClient.request(resumeIntegrationTool, { uniqueName: integrationUniqueName });
|
288954
|
+
return integration;
|
288955
|
+
};
|
288916
288956
|
var StorageFragment = graphql(`
|
288917
288957
|
fragment Storage on Storage {
|
288918
288958
|
__typename
|
@@ -288982,6 +289022,20 @@ var restartStorage = graphql(`
|
|
288982
289022
|
}
|
288983
289023
|
}
|
288984
289024
|
`, [StorageFragment]);
|
289025
|
+
var pauseStorage = graphql(`
|
289026
|
+
mutation PauseStorage($uniqueName: String!) {
|
289027
|
+
pauseStorageByUniqueName(uniqueName: $uniqueName) {
|
289028
|
+
...Storage
|
289029
|
+
}
|
289030
|
+
}
|
289031
|
+
`, [StorageFragment]);
|
289032
|
+
var resumeStorage = graphql(`
|
289033
|
+
mutation ResumeStorage($uniqueName: String!) {
|
289034
|
+
resumeStorageByUniqueName(uniqueName: $uniqueName) {
|
289035
|
+
...Storage
|
289036
|
+
}
|
289037
|
+
}
|
289038
|
+
`, [StorageFragment]);
|
288985
289039
|
var storageList = (gqlClient) => {
|
288986
289040
|
return async (applicationUniqueName) => {
|
288987
289041
|
const { storagesByUniqueName: { items } } = await gqlClient.request(getStorages, { applicationUniqueName });
|
@@ -289009,6 +289063,14 @@ var storageRestart = (gqlClient) => async (storageUniqueName) => {
|
|
289009
289063
|
const { restartStorageByUniqueName: storage } = await gqlClient.request(restartStorage, { uniqueName: storageUniqueName });
|
289010
289064
|
return storage;
|
289011
289065
|
};
|
289066
|
+
var storagePause = (gqlClient) => async (storageUniqueName) => {
|
289067
|
+
const { pauseStorageByUniqueName: storage } = await gqlClient.request(pauseStorage, { uniqueName: storageUniqueName });
|
289068
|
+
return storage;
|
289069
|
+
};
|
289070
|
+
var storageResume = (gqlClient) => async (storageUniqueName) => {
|
289071
|
+
const { resumeStorageByUniqueName: storage } = await gqlClient.request(resumeStorage, { uniqueName: storageUniqueName });
|
289072
|
+
return storage;
|
289073
|
+
};
|
289012
289074
|
var MiddlewareFragment = graphql(`
|
289013
289075
|
fragment Middleware on Middleware {
|
289014
289076
|
__typename
|
@@ -289109,6 +289171,20 @@ var restartMiddleware = graphql(`
|
|
289109
289171
|
}
|
289110
289172
|
}
|
289111
289173
|
`, [MiddlewareFragment]);
|
289174
|
+
var pauseMiddleware = graphql(`
|
289175
|
+
mutation PauseMiddleware($uniqueName: String!) {
|
289176
|
+
pauseMiddlewareByUniqueName(uniqueName: $uniqueName) {
|
289177
|
+
...Middleware
|
289178
|
+
}
|
289179
|
+
}
|
289180
|
+
`, [MiddlewareFragment]);
|
289181
|
+
var resumeMiddleware = graphql(`
|
289182
|
+
mutation ResumeMiddleware($uniqueName: String!) {
|
289183
|
+
resumeMiddlewareByUniqueName(uniqueName: $uniqueName) {
|
289184
|
+
...Middleware
|
289185
|
+
}
|
289186
|
+
}
|
289187
|
+
`, [MiddlewareFragment]);
|
289112
289188
|
var middlewareList = (gqlClient) => {
|
289113
289189
|
return async (applicationUniqueName) => {
|
289114
289190
|
const { middlewaresByUniqueName: { items } } = await gqlClient.request(getMiddlewares, { applicationUniqueName });
|
@@ -289153,6 +289229,14 @@ var middlewareRestart = (gqlClient) => async (middlewareUniqueName) => {
|
|
289153
289229
|
const { restartMiddlewareByUniqueName: middleware } = await gqlClient.request(restartMiddleware, { uniqueName: middlewareUniqueName });
|
289154
289230
|
return middleware;
|
289155
289231
|
};
|
289232
|
+
var middlewarePause = (gqlClient) => async (middlewareUniqueName) => {
|
289233
|
+
const { pauseMiddlewareByUniqueName: middleware } = await gqlClient.request(pauseMiddleware, { uniqueName: middlewareUniqueName });
|
289234
|
+
return middleware;
|
289235
|
+
};
|
289236
|
+
var middlewareResume = (gqlClient) => async (middlewareUniqueName) => {
|
289237
|
+
const { resumeMiddlewareByUniqueName: middleware } = await gqlClient.request(resumeMiddleware, { uniqueName: middlewareUniqueName });
|
289238
|
+
return middleware;
|
289239
|
+
};
|
289156
289240
|
var getPlatformConfigQuery = graphql(`
|
289157
289241
|
query platformConfig {
|
289158
289242
|
config {
|
@@ -289285,6 +289369,20 @@ var restartPrivateKey = graphql(`
|
|
289285
289369
|
}
|
289286
289370
|
}
|
289287
289371
|
`, [PrivateKeyFragment]);
|
289372
|
+
var pausePrivateKey = graphql(`
|
289373
|
+
mutation PausePrivateKey($uniqueName: String!) {
|
289374
|
+
pausePrivateKeyByUniqueName(uniqueName: $uniqueName) {
|
289375
|
+
...PrivateKey
|
289376
|
+
}
|
289377
|
+
}
|
289378
|
+
`, [PrivateKeyFragment]);
|
289379
|
+
var resumePrivateKey = graphql(`
|
289380
|
+
mutation ResumePrivateKey($uniqueName: String!) {
|
289381
|
+
resumePrivateKeyByUniqueName(uniqueName: $uniqueName) {
|
289382
|
+
...PrivateKey
|
289383
|
+
}
|
289384
|
+
}
|
289385
|
+
`, [PrivateKeyFragment]);
|
289288
289386
|
var privateKeyList = (gqlClient) => {
|
289289
289387
|
return async (applicationUniqueName) => {
|
289290
289388
|
const { privateKeysByUniqueName: { items } } = await gqlClient.request(getPrivateKeys, { applicationUniqueName });
|
@@ -289323,6 +289421,14 @@ var privateKeyRestart = (gqlClient) => async (privateKeyUniqueName) => {
|
|
289323
289421
|
const { restartPrivateKeyByUniqueName: privateKey } = await gqlClient.request(restartPrivateKey, { uniqueName: privateKeyUniqueName });
|
289324
289422
|
return privateKey;
|
289325
289423
|
};
|
289424
|
+
var privateKeyPause = (gqlClient) => async (privateKeyUniqueName) => {
|
289425
|
+
const { pausePrivateKeyByUniqueName: privateKey } = await gqlClient.request(pausePrivateKey, { uniqueName: privateKeyUniqueName });
|
289426
|
+
return privateKey;
|
289427
|
+
};
|
289428
|
+
var privateKeyResume = (gqlClient) => async (privateKeyUniqueName) => {
|
289429
|
+
const { resumePrivateKeyByUniqueName: privateKey } = await gqlClient.request(resumePrivateKey, { uniqueName: privateKeyUniqueName });
|
289430
|
+
return privateKey;
|
289431
|
+
};
|
289326
289432
|
var ClientOptionsSchema = exports_external.object({
|
289327
289433
|
accessToken: AccessTokenSchema2,
|
289328
289434
|
instance: UrlSchema2
|
@@ -289402,57 +289508,75 @@ function createSettleMintClient(options) {
|
|
289402
289508
|
read: blockchainNetworkRead(gqlClient),
|
289403
289509
|
create: blockchainNetworkCreate(gqlClient),
|
289404
289510
|
delete: blockchainNetworkDelete(gqlClient),
|
289405
|
-
restart: blockchainNetworkRestart(gqlClient)
|
289511
|
+
restart: blockchainNetworkRestart(gqlClient),
|
289512
|
+
pause: blockchainNetworkPause(gqlClient),
|
289513
|
+
resume: blockchainNetworkResume(gqlClient)
|
289406
289514
|
},
|
289407
289515
|
blockchainNode: {
|
289408
289516
|
list: blockchainNodeList(gqlClient),
|
289409
289517
|
read: blockchainNodeRead(gqlClient),
|
289410
289518
|
create: blockchainNodeCreate(gqlClient),
|
289411
|
-
restart: blockchainNodeRestart(gqlClient)
|
289519
|
+
restart: blockchainNodeRestart(gqlClient),
|
289520
|
+
pause: blockchainNodePause(gqlClient),
|
289521
|
+
resume: blockchainNodeResume(gqlClient)
|
289412
289522
|
},
|
289413
289523
|
loadBalancer: {
|
289414
289524
|
list: loadBalancerList(gqlClient),
|
289415
289525
|
read: loadBalancerRead(gqlClient),
|
289416
289526
|
create: loadBalancerCreate(gqlClient),
|
289417
|
-
restart: loadBalancerRestart(gqlClient)
|
289527
|
+
restart: loadBalancerRestart(gqlClient),
|
289528
|
+
pause: loadBalancerPause(gqlClient),
|
289529
|
+
resume: loadBalancerResume(gqlClient)
|
289418
289530
|
},
|
289419
289531
|
middleware: {
|
289420
289532
|
list: middlewareList(gqlClient),
|
289421
289533
|
read: middlewareRead(gqlClient),
|
289422
289534
|
graphSubgraphs: graphMiddlewareSubgraphs(gqlClient),
|
289423
289535
|
create: middlewareCreate(gqlClient),
|
289424
|
-
restart: middlewareRestart(gqlClient)
|
289536
|
+
restart: middlewareRestart(gqlClient),
|
289537
|
+
pause: middlewarePause(gqlClient),
|
289538
|
+
resume: middlewareResume(gqlClient)
|
289425
289539
|
},
|
289426
289540
|
integrationTool: {
|
289427
289541
|
list: integrationToolList(gqlClient),
|
289428
289542
|
read: integrationToolRead(gqlClient),
|
289429
289543
|
create: integrationToolCreate(gqlClient),
|
289430
|
-
restart: integrationToolRestart(gqlClient)
|
289544
|
+
restart: integrationToolRestart(gqlClient),
|
289545
|
+
pause: integrationToolPause(gqlClient),
|
289546
|
+
resume: integrationToolResume(gqlClient)
|
289431
289547
|
},
|
289432
289548
|
storage: {
|
289433
289549
|
list: storageList(gqlClient),
|
289434
289550
|
read: storageRead(gqlClient),
|
289435
289551
|
create: storageCreate(gqlClient),
|
289436
|
-
restart: storageRestart(gqlClient)
|
289552
|
+
restart: storageRestart(gqlClient),
|
289553
|
+
pause: storagePause(gqlClient),
|
289554
|
+
resume: storageResume(gqlClient)
|
289437
289555
|
},
|
289438
289556
|
privateKey: {
|
289439
289557
|
list: privateKeyList(gqlClient),
|
289440
289558
|
read: privatekeyRead(gqlClient),
|
289441
289559
|
create: privateKeyCreate(gqlClient),
|
289442
|
-
restart: privateKeyRestart(gqlClient)
|
289560
|
+
restart: privateKeyRestart(gqlClient),
|
289561
|
+
pause: privateKeyPause(gqlClient),
|
289562
|
+
resume: privateKeyResume(gqlClient)
|
289443
289563
|
},
|
289444
289564
|
insights: {
|
289445
289565
|
list: insightsList(gqlClient),
|
289446
289566
|
read: insightsRead(gqlClient),
|
289447
289567
|
create: insightsCreate(gqlClient),
|
289448
|
-
restart: insightsRestart(gqlClient)
|
289568
|
+
restart: insightsRestart(gqlClient),
|
289569
|
+
pause: insightsPause(gqlClient),
|
289570
|
+
resume: insightsResume(gqlClient)
|
289449
289571
|
},
|
289450
289572
|
customDeployment: {
|
289451
289573
|
list: customdeploymentList(gqlClient),
|
289452
289574
|
read: customdeploymentRead(gqlClient),
|
289453
289575
|
create: customdeploymentCreate(gqlClient),
|
289454
289576
|
update: customdeploymentUpdate(gqlClient),
|
289455
|
-
restart: customDeploymentRestart(gqlClient)
|
289577
|
+
restart: customDeploymentRestart(gqlClient),
|
289578
|
+
pause: customDeploymentPause(gqlClient),
|
289579
|
+
resume: customDeploymentResume(gqlClient)
|
289456
289580
|
},
|
289457
289581
|
foundry: { env: getEnv(gqlClient) },
|
289458
289582
|
applicationAccessToken: { create: applicationAccessTokenCreate(gqlClient) },
|
@@ -295869,17 +295993,6 @@ async function exists3(path$1) {
|
|
295869
295993
|
return false;
|
295870
295994
|
}
|
295871
295995
|
}
|
295872
|
-
function tryParseJson3(value2, defaultValue = null) {
|
295873
|
-
try {
|
295874
|
-
const parsed = JSON.parse(value2);
|
295875
|
-
if (parsed === undefined || parsed === null) {
|
295876
|
-
return defaultValue;
|
295877
|
-
}
|
295878
|
-
return parsed;
|
295879
|
-
} catch (err) {
|
295880
|
-
return defaultValue;
|
295881
|
-
}
|
295882
|
-
}
|
295883
295996
|
var require_balanced_match4 = __commonJS4({ "../../node_modules/balanced-match/index.js"(exports, module) {
|
295884
295997
|
module.exports = balanced$1;
|
295885
295998
|
function balanced$1(a3, b, str) {
|
@@ -301358,6 +301471,17 @@ var glob3 = Object.assign(glob_3, {
|
|
301358
301471
|
unescape: unescape4
|
301359
301472
|
});
|
301360
301473
|
glob3.glob = glob3;
|
301474
|
+
function tryParseJson3(value2, defaultValue = null) {
|
301475
|
+
try {
|
301476
|
+
const parsed = JSON.parse(value2);
|
301477
|
+
if (parsed === undefined || parsed === null) {
|
301478
|
+
return defaultValue;
|
301479
|
+
}
|
301480
|
+
return parsed;
|
301481
|
+
} catch (_err) {
|
301482
|
+
return defaultValue;
|
301483
|
+
}
|
301484
|
+
}
|
301361
301485
|
async function findMonoRepoRoot2(startDir) {
|
301362
301486
|
const lockFilePath = await findUp([
|
301363
301487
|
"package-lock.json",
|
@@ -301403,7 +301527,7 @@ function tryParseJson4(value2, defaultValue = null) {
|
|
301403
301527
|
return defaultValue;
|
301404
301528
|
}
|
301405
301529
|
return parsed;
|
301406
|
-
} catch (
|
301530
|
+
} catch (_err) {
|
301407
301531
|
return defaultValue;
|
301408
301532
|
}
|
301409
301533
|
}
|
@@ -301431,7 +301555,7 @@ async function readConfig() {
|
|
301431
301555
|
try {
|
301432
301556
|
const content = await readFile4(CONFIG_FILE, "utf-8");
|
301433
301557
|
return tryParseJson4(content, { instances: {} });
|
301434
|
-
} catch (
|
301558
|
+
} catch (_error) {
|
301435
301559
|
return { instances: {} };
|
301436
301560
|
}
|
301437
301561
|
}
|
@@ -303095,14 +303219,565 @@ async function subgraphNamePrompt({
|
|
303095
303219
|
return sanitizeName(subgraphName);
|
303096
303220
|
}
|
303097
303221
|
|
303098
|
-
// ../../node_modules/@inquirer/select/dist/esm/
|
303099
|
-
var
|
303222
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/key.js
|
303223
|
+
var isUpKey = (key2) => key2.name === "up" || key2.name === "k" || key2.ctrl && key2.name === "p";
|
303224
|
+
var isDownKey = (key2) => key2.name === "down" || key2.name === "j" || key2.ctrl && key2.name === "n";
|
303225
|
+
var isBackspaceKey2 = (key2) => key2.name === "backspace";
|
303226
|
+
var isNumberKey = (key2) => "1234567890".includes(key2.name);
|
303227
|
+
var isEnterKey2 = (key2) => key2.name === "enter" || key2.name === "return";
|
303228
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/errors.js
|
303229
|
+
class AbortPromptError2 extends Error {
|
303230
|
+
name = "AbortPromptError";
|
303231
|
+
message = "Prompt was aborted";
|
303232
|
+
constructor(options) {
|
303233
|
+
super();
|
303234
|
+
this.cause = options?.cause;
|
303235
|
+
}
|
303236
|
+
}
|
303237
|
+
|
303238
|
+
class CancelPromptError2 extends Error {
|
303239
|
+
name = "CancelPromptError";
|
303240
|
+
message = "Prompt was canceled";
|
303241
|
+
}
|
303242
|
+
|
303243
|
+
class ExitPromptError2 extends Error {
|
303244
|
+
name = "ExitPromptError";
|
303245
|
+
}
|
303246
|
+
|
303247
|
+
class HookError2 extends Error {
|
303248
|
+
name = "HookError";
|
303249
|
+
}
|
303250
|
+
|
303251
|
+
class ValidationError2 extends Error {
|
303252
|
+
name = "ValidationError";
|
303253
|
+
}
|
303254
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/use-state.js
|
303255
|
+
import { AsyncResource as AsyncResource5 } from "node:async_hooks";
|
303256
|
+
|
303257
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/hook-engine.js
|
303258
|
+
import { AsyncLocalStorage as AsyncLocalStorage2, AsyncResource as AsyncResource4 } from "node:async_hooks";
|
303259
|
+
var hookStorage2 = new AsyncLocalStorage2;
|
303260
|
+
function createStore2(rl) {
|
303261
|
+
const store = {
|
303262
|
+
rl,
|
303263
|
+
hooks: [],
|
303264
|
+
hooksCleanup: [],
|
303265
|
+
hooksEffect: [],
|
303266
|
+
index: 0,
|
303267
|
+
handleChange() {}
|
303268
|
+
};
|
303269
|
+
return store;
|
303270
|
+
}
|
303271
|
+
function withHooks2(rl, cb) {
|
303272
|
+
const store = createStore2(rl);
|
303273
|
+
return hookStorage2.run(store, () => {
|
303274
|
+
function cycle(render) {
|
303275
|
+
store.handleChange = () => {
|
303276
|
+
store.index = 0;
|
303277
|
+
render();
|
303278
|
+
};
|
303279
|
+
store.handleChange();
|
303280
|
+
}
|
303281
|
+
return cb(cycle);
|
303282
|
+
});
|
303283
|
+
}
|
303284
|
+
function getStore2() {
|
303285
|
+
const store = hookStorage2.getStore();
|
303286
|
+
if (!store) {
|
303287
|
+
throw new HookError2("[Inquirer] Hook functions can only be called from within a prompt");
|
303288
|
+
}
|
303289
|
+
return store;
|
303290
|
+
}
|
303291
|
+
function readline3() {
|
303292
|
+
return getStore2().rl;
|
303293
|
+
}
|
303294
|
+
function withUpdates2(fn) {
|
303295
|
+
const wrapped = (...args) => {
|
303296
|
+
const store = getStore2();
|
303297
|
+
let shouldUpdate = false;
|
303298
|
+
const oldHandleChange = store.handleChange;
|
303299
|
+
store.handleChange = () => {
|
303300
|
+
shouldUpdate = true;
|
303301
|
+
};
|
303302
|
+
const returnValue = fn(...args);
|
303303
|
+
if (shouldUpdate) {
|
303304
|
+
oldHandleChange();
|
303305
|
+
}
|
303306
|
+
store.handleChange = oldHandleChange;
|
303307
|
+
return returnValue;
|
303308
|
+
};
|
303309
|
+
return AsyncResource4.bind(wrapped);
|
303310
|
+
}
|
303311
|
+
function withPointer2(cb) {
|
303312
|
+
const store = getStore2();
|
303313
|
+
const { index } = store;
|
303314
|
+
const pointer = {
|
303315
|
+
get() {
|
303316
|
+
return store.hooks[index];
|
303317
|
+
},
|
303318
|
+
set(value4) {
|
303319
|
+
store.hooks[index] = value4;
|
303320
|
+
},
|
303321
|
+
initialized: index in store.hooks
|
303322
|
+
};
|
303323
|
+
const returnValue = cb(pointer);
|
303324
|
+
store.index++;
|
303325
|
+
return returnValue;
|
303326
|
+
}
|
303327
|
+
function handleChange2() {
|
303328
|
+
getStore2().handleChange();
|
303329
|
+
}
|
303330
|
+
var effectScheduler2 = {
|
303331
|
+
queue(cb) {
|
303332
|
+
const store = getStore2();
|
303333
|
+
const { index } = store;
|
303334
|
+
store.hooksEffect.push(() => {
|
303335
|
+
store.hooksCleanup[index]?.();
|
303336
|
+
const cleanFn = cb(readline3());
|
303337
|
+
if (cleanFn != null && typeof cleanFn !== "function") {
|
303338
|
+
throw new ValidationError2("useEffect return value must be a cleanup function or nothing.");
|
303339
|
+
}
|
303340
|
+
store.hooksCleanup[index] = cleanFn;
|
303341
|
+
});
|
303342
|
+
},
|
303343
|
+
run() {
|
303344
|
+
const store = getStore2();
|
303345
|
+
withUpdates2(() => {
|
303346
|
+
store.hooksEffect.forEach((effect) => {
|
303347
|
+
effect();
|
303348
|
+
});
|
303349
|
+
store.hooksEffect.length = 0;
|
303350
|
+
})();
|
303351
|
+
},
|
303352
|
+
clearAll() {
|
303353
|
+
const store = getStore2();
|
303354
|
+
store.hooksCleanup.forEach((cleanFn) => {
|
303355
|
+
cleanFn?.();
|
303356
|
+
});
|
303357
|
+
store.hooksEffect.length = 0;
|
303358
|
+
store.hooksCleanup.length = 0;
|
303359
|
+
}
|
303360
|
+
};
|
303361
|
+
|
303362
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/use-state.js
|
303363
|
+
function useState2(defaultValue) {
|
303364
|
+
return withPointer2((pointer) => {
|
303365
|
+
const setState = AsyncResource5.bind(function setState(newValue) {
|
303366
|
+
if (pointer.get() !== newValue) {
|
303367
|
+
pointer.set(newValue);
|
303368
|
+
handleChange2();
|
303369
|
+
}
|
303370
|
+
});
|
303371
|
+
if (pointer.initialized) {
|
303372
|
+
return [pointer.get(), setState];
|
303373
|
+
}
|
303374
|
+
const value4 = typeof defaultValue === "function" ? defaultValue() : defaultValue;
|
303375
|
+
pointer.set(value4);
|
303376
|
+
return [value4, setState];
|
303377
|
+
});
|
303378
|
+
}
|
303379
|
+
|
303380
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/use-effect.js
|
303381
|
+
function useEffect2(cb, depArray) {
|
303382
|
+
withPointer2((pointer) => {
|
303383
|
+
const oldDeps = pointer.get();
|
303384
|
+
const hasChanged = !Array.isArray(oldDeps) || depArray.some((dep, i6) => !Object.is(dep, oldDeps[i6]));
|
303385
|
+
if (hasChanged) {
|
303386
|
+
effectScheduler2.queue(cb);
|
303387
|
+
}
|
303388
|
+
pointer.set(depArray);
|
303389
|
+
});
|
303390
|
+
}
|
303391
|
+
|
303392
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/theme.js
|
303393
|
+
var import_yoctocolors_cjs2 = __toESM(require_yoctocolors_cjs(), 1);
|
303394
|
+
var defaultTheme2 = {
|
303395
|
+
prefix: {
|
303396
|
+
idle: import_yoctocolors_cjs2.default.blue("?"),
|
303397
|
+
done: import_yoctocolors_cjs2.default.green(esm_default.tick)
|
303398
|
+
},
|
303399
|
+
spinner: {
|
303400
|
+
interval: 80,
|
303401
|
+
frames: ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"].map((frame) => import_yoctocolors_cjs2.default.yellow(frame))
|
303402
|
+
},
|
303403
|
+
style: {
|
303404
|
+
answer: import_yoctocolors_cjs2.default.cyan,
|
303405
|
+
message: import_yoctocolors_cjs2.default.bold,
|
303406
|
+
error: (text2) => import_yoctocolors_cjs2.default.red(`> ${text2}`),
|
303407
|
+
defaultAnswer: (text2) => import_yoctocolors_cjs2.default.dim(`(${text2})`),
|
303408
|
+
help: import_yoctocolors_cjs2.default.dim,
|
303409
|
+
highlight: import_yoctocolors_cjs2.default.cyan,
|
303410
|
+
key: (text2) => import_yoctocolors_cjs2.default.cyan(import_yoctocolors_cjs2.default.bold(`<${text2}>`))
|
303411
|
+
}
|
303412
|
+
};
|
303413
|
+
|
303414
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/make-theme.js
|
303415
|
+
function isPlainObject6(value4) {
|
303416
|
+
if (typeof value4 !== "object" || value4 === null)
|
303417
|
+
return false;
|
303418
|
+
let proto = value4;
|
303419
|
+
while (Object.getPrototypeOf(proto) !== null) {
|
303420
|
+
proto = Object.getPrototypeOf(proto);
|
303421
|
+
}
|
303422
|
+
return Object.getPrototypeOf(value4) === proto;
|
303423
|
+
}
|
303424
|
+
function deepMerge3(...objects) {
|
303425
|
+
const output = {};
|
303426
|
+
for (const obj of objects) {
|
303427
|
+
for (const [key2, value4] of Object.entries(obj)) {
|
303428
|
+
const prevValue = output[key2];
|
303429
|
+
output[key2] = isPlainObject6(prevValue) && isPlainObject6(value4) ? deepMerge3(prevValue, value4) : value4;
|
303430
|
+
}
|
303431
|
+
}
|
303432
|
+
return output;
|
303433
|
+
}
|
303434
|
+
function makeTheme2(...themes) {
|
303435
|
+
const themesToMerge = [
|
303436
|
+
defaultTheme2,
|
303437
|
+
...themes.filter((theme) => theme != null)
|
303438
|
+
];
|
303439
|
+
return deepMerge3(...themesToMerge);
|
303440
|
+
}
|
303441
|
+
|
303442
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/use-prefix.js
|
303443
|
+
function usePrefix2({ status = "idle", theme }) {
|
303444
|
+
const [showLoader, setShowLoader] = useState2(false);
|
303445
|
+
const [tick, setTick] = useState2(0);
|
303446
|
+
const { prefix, spinner: spinner2 } = makeTheme2(theme);
|
303447
|
+
useEffect2(() => {
|
303448
|
+
if (status === "loading") {
|
303449
|
+
let tickInterval;
|
303450
|
+
let inc = -1;
|
303451
|
+
const delayTimeout = setTimeout(() => {
|
303452
|
+
setShowLoader(true);
|
303453
|
+
tickInterval = setInterval(() => {
|
303454
|
+
inc = inc + 1;
|
303455
|
+
setTick(inc % spinner2.frames.length);
|
303456
|
+
}, spinner2.interval);
|
303457
|
+
}, 300);
|
303458
|
+
return () => {
|
303459
|
+
clearTimeout(delayTimeout);
|
303460
|
+
clearInterval(tickInterval);
|
303461
|
+
};
|
303462
|
+
} else {
|
303463
|
+
setShowLoader(false);
|
303464
|
+
}
|
303465
|
+
}, [status]);
|
303466
|
+
if (showLoader) {
|
303467
|
+
return spinner2.frames[tick];
|
303468
|
+
}
|
303469
|
+
const iconName = status === "loading" ? "idle" : status;
|
303470
|
+
return typeof prefix === "string" ? prefix : prefix[iconName] ?? prefix["idle"];
|
303471
|
+
}
|
303472
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/use-memo.js
|
303473
|
+
function useMemo(fn, dependencies) {
|
303474
|
+
return withPointer2((pointer) => {
|
303475
|
+
const prev = pointer.get();
|
303476
|
+
if (!prev || prev.dependencies.length !== dependencies.length || prev.dependencies.some((dep, i6) => dep !== dependencies[i6])) {
|
303477
|
+
const value4 = fn();
|
303478
|
+
pointer.set({ value: value4, dependencies });
|
303479
|
+
return value4;
|
303480
|
+
}
|
303481
|
+
return prev.value;
|
303482
|
+
});
|
303483
|
+
}
|
303484
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/use-ref.js
|
303485
|
+
function useRef2(val) {
|
303486
|
+
return useState2({ current: val })[0];
|
303487
|
+
}
|
303488
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/use-keypress.js
|
303489
|
+
function useKeypress2(userHandler) {
|
303490
|
+
const signal = useRef2(userHandler);
|
303491
|
+
signal.current = userHandler;
|
303492
|
+
useEffect2((rl) => {
|
303493
|
+
let ignore = false;
|
303494
|
+
const handler = withUpdates2((_input, event) => {
|
303495
|
+
if (ignore)
|
303496
|
+
return;
|
303497
|
+
signal.current(event, rl);
|
303498
|
+
});
|
303499
|
+
rl.input.on("keypress", handler);
|
303500
|
+
return () => {
|
303501
|
+
ignore = true;
|
303502
|
+
rl.input.removeListener("keypress", handler);
|
303503
|
+
};
|
303504
|
+
}, []);
|
303505
|
+
}
|
303506
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/utils.js
|
303507
|
+
var import_cli_width2 = __toESM(require_cli_width(), 1);
|
303508
|
+
var import_wrap_ansi2 = __toESM(require_wrap_ansi(), 1);
|
303509
|
+
function breakLines2(content, width) {
|
303510
|
+
return content.split(`
|
303511
|
+
`).flatMap((line) => import_wrap_ansi2.default(line, width, { trim: false, hard: true }).split(`
|
303512
|
+
`).map((str) => str.trimEnd())).join(`
|
303513
|
+
`);
|
303514
|
+
}
|
303515
|
+
function readlineWidth2() {
|
303516
|
+
return import_cli_width2.default({ defaultWidth: 80, output: readline3().output });
|
303517
|
+
}
|
303518
|
+
|
303519
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/pagination/use-pagination.js
|
303520
|
+
function usePointerPosition({ active, renderedItems, pageSize, loop }) {
|
303521
|
+
const state = useRef2({
|
303522
|
+
lastPointer: active,
|
303523
|
+
lastActive: undefined
|
303524
|
+
});
|
303525
|
+
const { lastPointer, lastActive } = state.current;
|
303526
|
+
const middle = Math.floor(pageSize / 2);
|
303527
|
+
const renderedLength = renderedItems.reduce((acc, item) => acc + item.length, 0);
|
303528
|
+
const defaultPointerPosition = renderedItems.slice(0, active).reduce((acc, item) => acc + item.length, 0);
|
303529
|
+
let pointer = defaultPointerPosition;
|
303530
|
+
if (renderedLength > pageSize) {
|
303531
|
+
if (loop) {
|
303532
|
+
pointer = lastPointer;
|
303533
|
+
if (lastActive != null && lastActive < active && active - lastActive < pageSize) {
|
303534
|
+
pointer = Math.min(middle, Math.abs(active - lastActive) === 1 ? Math.min(lastPointer + (renderedItems[lastActive]?.length ?? 0), Math.max(defaultPointerPosition, lastPointer)) : lastPointer + active - lastActive);
|
303535
|
+
}
|
303536
|
+
} else {
|
303537
|
+
const spaceUnderActive = renderedItems.slice(active).reduce((acc, item) => acc + item.length, 0);
|
303538
|
+
pointer = spaceUnderActive < pageSize - middle ? pageSize - spaceUnderActive : Math.min(defaultPointerPosition, middle);
|
303539
|
+
}
|
303540
|
+
}
|
303541
|
+
state.current.lastPointer = pointer;
|
303542
|
+
state.current.lastActive = active;
|
303543
|
+
return pointer;
|
303544
|
+
}
|
303545
|
+
function usePagination({ items, active, renderItem, pageSize, loop = true }) {
|
303546
|
+
const width = readlineWidth2();
|
303547
|
+
const bound = (num) => (num % items.length + items.length) % items.length;
|
303548
|
+
const renderedItems = items.map((item, index) => {
|
303549
|
+
if (item == null)
|
303550
|
+
return [];
|
303551
|
+
return breakLines2(renderItem({ item, index, isActive: index === active }), width).split(`
|
303552
|
+
`);
|
303553
|
+
});
|
303554
|
+
const renderedLength = renderedItems.reduce((acc, item) => acc + item.length, 0);
|
303555
|
+
const renderItemAtIndex = (index) => renderedItems[index] ?? [];
|
303556
|
+
const pointer = usePointerPosition({ active, renderedItems, pageSize, loop });
|
303557
|
+
const activeItem = renderItemAtIndex(active).slice(0, pageSize);
|
303558
|
+
const activeItemPosition = pointer + activeItem.length <= pageSize ? pointer : pageSize - activeItem.length;
|
303559
|
+
const pageBuffer = Array.from({ length: pageSize });
|
303560
|
+
pageBuffer.splice(activeItemPosition, activeItem.length, ...activeItem);
|
303561
|
+
const itemVisited = new Set([active]);
|
303562
|
+
let bufferPointer = activeItemPosition + activeItem.length;
|
303563
|
+
let itemPointer = bound(active + 1);
|
303564
|
+
while (bufferPointer < pageSize && !itemVisited.has(itemPointer) && (loop && renderedLength > pageSize ? itemPointer !== active : itemPointer > active)) {
|
303565
|
+
const lines = renderItemAtIndex(itemPointer);
|
303566
|
+
const linesToAdd = lines.slice(0, pageSize - bufferPointer);
|
303567
|
+
pageBuffer.splice(bufferPointer, linesToAdd.length, ...linesToAdd);
|
303568
|
+
itemVisited.add(itemPointer);
|
303569
|
+
bufferPointer += linesToAdd.length;
|
303570
|
+
itemPointer = bound(itemPointer + 1);
|
303571
|
+
}
|
303572
|
+
bufferPointer = activeItemPosition - 1;
|
303573
|
+
itemPointer = bound(active - 1);
|
303574
|
+
while (bufferPointer >= 0 && !itemVisited.has(itemPointer) && (loop && renderedLength > pageSize ? itemPointer !== active : itemPointer < active)) {
|
303575
|
+
const lines = renderItemAtIndex(itemPointer);
|
303576
|
+
const linesToAdd = lines.slice(Math.max(0, lines.length - bufferPointer - 1));
|
303577
|
+
pageBuffer.splice(bufferPointer - linesToAdd.length + 1, linesToAdd.length, ...linesToAdd);
|
303578
|
+
itemVisited.add(itemPointer);
|
303579
|
+
bufferPointer -= linesToAdd.length;
|
303580
|
+
itemPointer = bound(itemPointer - 1);
|
303581
|
+
}
|
303582
|
+
return pageBuffer.filter((line) => typeof line === "string").join(`
|
303583
|
+
`);
|
303584
|
+
}
|
303585
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
|
303586
|
+
var import_mute_stream2 = __toESM(require_lib(), 1);
|
303587
|
+
import * as readline4 from "node:readline";
|
303588
|
+
import { AsyncResource as AsyncResource6 } from "node:async_hooks";
|
303589
|
+
|
303590
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/screen-manager.js
|
303100
303591
|
var import_ansi_escapes2 = __toESM(require_ansi_escapes(), 1);
|
303592
|
+
import { stripVTControlCharacters as stripVTControlCharacters3 } from "node:util";
|
303593
|
+
var height2 = (content) => content.split(`
|
303594
|
+
`).length;
|
303595
|
+
var lastLine2 = (content) => content.split(`
|
303596
|
+
`).pop() ?? "";
|
303597
|
+
function cursorDown2(n6) {
|
303598
|
+
return n6 > 0 ? import_ansi_escapes2.default.cursorDown(n6) : "";
|
303599
|
+
}
|
303600
|
+
|
303601
|
+
class ScreenManager2 {
|
303602
|
+
height = 0;
|
303603
|
+
extraLinesUnderPrompt = 0;
|
303604
|
+
cursorPos;
|
303605
|
+
rl;
|
303606
|
+
constructor(rl) {
|
303607
|
+
this.rl = rl;
|
303608
|
+
this.cursorPos = rl.getCursorPos();
|
303609
|
+
}
|
303610
|
+
write(content) {
|
303611
|
+
this.rl.output.unmute();
|
303612
|
+
this.rl.output.write(content);
|
303613
|
+
this.rl.output.mute();
|
303614
|
+
}
|
303615
|
+
render(content, bottomContent = "") {
|
303616
|
+
const promptLine = lastLine2(content);
|
303617
|
+
const rawPromptLine = stripVTControlCharacters3(promptLine);
|
303618
|
+
let prompt = rawPromptLine;
|
303619
|
+
if (this.rl.line.length > 0) {
|
303620
|
+
prompt = prompt.slice(0, -this.rl.line.length);
|
303621
|
+
}
|
303622
|
+
this.rl.setPrompt(prompt);
|
303623
|
+
this.cursorPos = this.rl.getCursorPos();
|
303624
|
+
const width = readlineWidth2();
|
303625
|
+
content = breakLines2(content, width);
|
303626
|
+
bottomContent = breakLines2(bottomContent, width);
|
303627
|
+
if (rawPromptLine.length % width === 0) {
|
303628
|
+
content += `
|
303629
|
+
`;
|
303630
|
+
}
|
303631
|
+
let output = content + (bottomContent ? `
|
303632
|
+
` + bottomContent : "");
|
303633
|
+
const promptLineUpDiff = Math.floor(rawPromptLine.length / width) - this.cursorPos.rows;
|
303634
|
+
const bottomContentHeight = promptLineUpDiff + (bottomContent ? height2(bottomContent) : 0);
|
303635
|
+
if (bottomContentHeight > 0)
|
303636
|
+
output += import_ansi_escapes2.default.cursorUp(bottomContentHeight);
|
303637
|
+
output += import_ansi_escapes2.default.cursorTo(this.cursorPos.cols);
|
303638
|
+
this.write(cursorDown2(this.extraLinesUnderPrompt) + import_ansi_escapes2.default.eraseLines(this.height) + output);
|
303639
|
+
this.extraLinesUnderPrompt = bottomContentHeight;
|
303640
|
+
this.height = height2(output);
|
303641
|
+
}
|
303642
|
+
checkCursorPos() {
|
303643
|
+
const cursorPos = this.rl.getCursorPos();
|
303644
|
+
if (cursorPos.cols !== this.cursorPos.cols) {
|
303645
|
+
this.write(import_ansi_escapes2.default.cursorTo(cursorPos.cols));
|
303646
|
+
this.cursorPos = cursorPos;
|
303647
|
+
}
|
303648
|
+
}
|
303649
|
+
done({ clearContent }) {
|
303650
|
+
this.rl.setPrompt("");
|
303651
|
+
let output = cursorDown2(this.extraLinesUnderPrompt);
|
303652
|
+
output += clearContent ? import_ansi_escapes2.default.eraseLines(this.height) : `
|
303653
|
+
`;
|
303654
|
+
output += import_ansi_escapes2.default.cursorShow;
|
303655
|
+
this.write(output);
|
303656
|
+
this.rl.close();
|
303657
|
+
}
|
303658
|
+
}
|
303659
|
+
|
303660
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/promise-polyfill.js
|
303661
|
+
class PromisePolyfill2 extends Promise {
|
303662
|
+
static withResolver() {
|
303663
|
+
let resolve5;
|
303664
|
+
let reject;
|
303665
|
+
const promise4 = new Promise((res, rej) => {
|
303666
|
+
resolve5 = res;
|
303667
|
+
reject = rej;
|
303668
|
+
});
|
303669
|
+
return { promise: promise4, resolve: resolve5, reject };
|
303670
|
+
}
|
303671
|
+
}
|
303672
|
+
|
303673
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
|
303674
|
+
function getCallSites2() {
|
303675
|
+
const _prepareStackTrace = Error.prepareStackTrace;
|
303676
|
+
let result = [];
|
303677
|
+
try {
|
303678
|
+
Error.prepareStackTrace = (_5, callSites) => {
|
303679
|
+
const callSitesWithoutCurrent = callSites.slice(1);
|
303680
|
+
result = callSitesWithoutCurrent;
|
303681
|
+
return callSitesWithoutCurrent;
|
303682
|
+
};
|
303683
|
+
new Error().stack;
|
303684
|
+
} catch {
|
303685
|
+
return result;
|
303686
|
+
}
|
303687
|
+
Error.prepareStackTrace = _prepareStackTrace;
|
303688
|
+
return result;
|
303689
|
+
}
|
303690
|
+
function createPrompt2(view) {
|
303691
|
+
const callSites = getCallSites2();
|
303692
|
+
const prompt = (config4, context = {}) => {
|
303693
|
+
const { input = process.stdin, signal } = context;
|
303694
|
+
const cleanups = new Set;
|
303695
|
+
const output = new import_mute_stream2.default;
|
303696
|
+
output.pipe(context.output ?? process.stdout);
|
303697
|
+
const rl = readline4.createInterface({
|
303698
|
+
terminal: true,
|
303699
|
+
input,
|
303700
|
+
output
|
303701
|
+
});
|
303702
|
+
const screen = new ScreenManager2(rl);
|
303703
|
+
const { promise: promise4, resolve: resolve5, reject } = PromisePolyfill2.withResolver();
|
303704
|
+
const cancel3 = () => reject(new CancelPromptError2);
|
303705
|
+
if (signal) {
|
303706
|
+
const abort = () => reject(new AbortPromptError2({ cause: signal.reason }));
|
303707
|
+
if (signal.aborted) {
|
303708
|
+
abort();
|
303709
|
+
return Object.assign(promise4, { cancel: cancel3 });
|
303710
|
+
}
|
303711
|
+
signal.addEventListener("abort", abort);
|
303712
|
+
cleanups.add(() => signal.removeEventListener("abort", abort));
|
303713
|
+
}
|
303714
|
+
cleanups.add(onExit((code2, signal2) => {
|
303715
|
+
reject(new ExitPromptError2(`User force closed the prompt with ${code2} ${signal2}`));
|
303716
|
+
}));
|
303717
|
+
const sigint = () => reject(new ExitPromptError2(`User force closed the prompt with SIGINT`));
|
303718
|
+
rl.on("SIGINT", sigint);
|
303719
|
+
cleanups.add(() => rl.removeListener("SIGINT", sigint));
|
303720
|
+
const checkCursorPos = () => screen.checkCursorPos();
|
303721
|
+
rl.input.on("keypress", checkCursorPos);
|
303722
|
+
cleanups.add(() => rl.input.removeListener("keypress", checkCursorPos));
|
303723
|
+
return withHooks2(rl, (cycle) => {
|
303724
|
+
const hooksCleanup = AsyncResource6.bind(() => effectScheduler2.clearAll());
|
303725
|
+
rl.on("close", hooksCleanup);
|
303726
|
+
cleanups.add(() => rl.removeListener("close", hooksCleanup));
|
303727
|
+
cycle(() => {
|
303728
|
+
try {
|
303729
|
+
const nextView = view(config4, (value4) => {
|
303730
|
+
setImmediate(() => resolve5(value4));
|
303731
|
+
});
|
303732
|
+
if (nextView === undefined) {
|
303733
|
+
const callerFilename = callSites[1]?.getFileName();
|
303734
|
+
throw new Error(`Prompt functions must return a string.
|
303735
|
+
at ${callerFilename}`);
|
303736
|
+
}
|
303737
|
+
const [content, bottomContent] = typeof nextView === "string" ? [nextView] : nextView;
|
303738
|
+
screen.render(content, bottomContent);
|
303739
|
+
effectScheduler2.run();
|
303740
|
+
} catch (error44) {
|
303741
|
+
reject(error44);
|
303742
|
+
}
|
303743
|
+
});
|
303744
|
+
return Object.assign(promise4.then((answer) => {
|
303745
|
+
effectScheduler2.clearAll();
|
303746
|
+
return answer;
|
303747
|
+
}, (error44) => {
|
303748
|
+
effectScheduler2.clearAll();
|
303749
|
+
throw error44;
|
303750
|
+
}).finally(() => {
|
303751
|
+
cleanups.forEach((cleanup) => cleanup());
|
303752
|
+
screen.done({ clearContent: Boolean(context.clearPromptOnDone) });
|
303753
|
+
output.end();
|
303754
|
+
}).then(() => promise4), { cancel: cancel3 });
|
303755
|
+
});
|
303756
|
+
};
|
303757
|
+
return prompt;
|
303758
|
+
}
|
303759
|
+
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/Separator.js
|
303760
|
+
var import_yoctocolors_cjs3 = __toESM(require_yoctocolors_cjs(), 1);
|
303761
|
+
class Separator {
|
303762
|
+
separator = import_yoctocolors_cjs3.default.dim(Array.from({ length: 15 }).join(esm_default.line));
|
303763
|
+
type = "separator";
|
303764
|
+
constructor(separator) {
|
303765
|
+
if (separator) {
|
303766
|
+
this.separator = separator;
|
303767
|
+
}
|
303768
|
+
}
|
303769
|
+
static isSeparator(choice) {
|
303770
|
+
return Boolean(choice && typeof choice === "object" && "type" in choice && choice.type === "separator");
|
303771
|
+
}
|
303772
|
+
}
|
303773
|
+
// ../../node_modules/@inquirer/select/dist/esm/index.js
|
303774
|
+
var import_yoctocolors_cjs4 = __toESM(require_yoctocolors_cjs(), 1);
|
303775
|
+
var import_ansi_escapes3 = __toESM(require_ansi_escapes(), 1);
|
303101
303776
|
var selectTheme = {
|
303102
303777
|
icon: { cursor: esm_default.pointer },
|
303103
303778
|
style: {
|
303104
|
-
disabled: (text2) =>
|
303105
|
-
description: (text2) =>
|
303779
|
+
disabled: (text2) => import_yoctocolors_cjs4.default.dim(`- ${text2}`),
|
303780
|
+
description: (text2) => import_yoctocolors_cjs4.default.cyan(text2)
|
303106
303781
|
},
|
303107
303782
|
helpMode: "auto",
|
303108
303783
|
indexMode: "hidden"
|
@@ -303135,19 +303810,19 @@ function normalizeChoices(choices) {
|
|
303135
303810
|
return normalizedChoice;
|
303136
303811
|
});
|
303137
303812
|
}
|
303138
|
-
var esm_default3 =
|
303813
|
+
var esm_default3 = createPrompt2((config4, done) => {
|
303139
303814
|
const { loop = true, pageSize = 7 } = config4;
|
303140
|
-
const firstRender =
|
303141
|
-
const theme =
|
303142
|
-
const [status, setStatus] =
|
303143
|
-
const prefix =
|
303144
|
-
const searchTimeoutRef =
|
303815
|
+
const firstRender = useRef2(true);
|
303816
|
+
const theme = makeTheme2(selectTheme, config4.theme);
|
303817
|
+
const [status, setStatus] = useState2("idle");
|
303818
|
+
const prefix = usePrefix2({ status, theme });
|
303819
|
+
const searchTimeoutRef = useRef2();
|
303145
303820
|
const items = useMemo(() => normalizeChoices(config4.choices), [config4.choices]);
|
303146
303821
|
const bounds = useMemo(() => {
|
303147
303822
|
const first = items.findIndex(isSelectable);
|
303148
303823
|
const last = items.findLastIndex(isSelectable);
|
303149
303824
|
if (first === -1) {
|
303150
|
-
throw new
|
303825
|
+
throw new ValidationError2("[select prompt] No selectable choices. All choices are disabled.");
|
303151
303826
|
}
|
303152
303827
|
return { first, last };
|
303153
303828
|
}, [items]);
|
@@ -303156,24 +303831,24 @@ var esm_default3 = createPrompt((config4, done) => {
|
|
303156
303831
|
return -1;
|
303157
303832
|
return items.findIndex((item) => isSelectable(item) && item.value === config4.default);
|
303158
303833
|
}, [config4.default, items]);
|
303159
|
-
const [active, setActive] =
|
303834
|
+
const [active, setActive] = useState2(defaultItemIndex === -1 ? bounds.first : defaultItemIndex);
|
303160
303835
|
const selectedChoice = items[active];
|
303161
|
-
|
303836
|
+
useKeypress2((key3, rl) => {
|
303162
303837
|
clearTimeout(searchTimeoutRef.current);
|
303163
|
-
if (
|
303838
|
+
if (isEnterKey2(key3)) {
|
303164
303839
|
setStatus("done");
|
303165
303840
|
done(selectedChoice.value);
|
303166
|
-
} else if (isUpKey(
|
303841
|
+
} else if (isUpKey(key3) || isDownKey(key3)) {
|
303167
303842
|
rl.clearLine(0);
|
303168
|
-
if (loop || isUpKey(
|
303169
|
-
const offset = isUpKey(
|
303843
|
+
if (loop || isUpKey(key3) && active !== bounds.first || isDownKey(key3) && active !== bounds.last) {
|
303844
|
+
const offset = isUpKey(key3) ? -1 : 1;
|
303170
303845
|
let next = active;
|
303171
303846
|
do {
|
303172
303847
|
next = (next + offset + items.length) % items.length;
|
303173
303848
|
} while (!isSelectable(items[next]));
|
303174
303849
|
setActive(next);
|
303175
303850
|
}
|
303176
|
-
} else if (isNumberKey(
|
303851
|
+
} else if (isNumberKey(key3) && !Number.isNaN(Number(rl.line))) {
|
303177
303852
|
const position = Number(rl.line) - 1;
|
303178
303853
|
const item = items[position];
|
303179
303854
|
if (item != null && isSelectable(item)) {
|
@@ -303182,7 +303857,7 @@ var esm_default3 = createPrompt((config4, done) => {
|
|
303182
303857
|
searchTimeoutRef.current = setTimeout(() => {
|
303183
303858
|
rl.clearLine(0);
|
303184
303859
|
}, 700);
|
303185
|
-
} else if (
|
303860
|
+
} else if (isBackspaceKey2(key3)) {
|
303186
303861
|
rl.clearLine(0);
|
303187
303862
|
} else {
|
303188
303863
|
const searchTerm = rl.line.toLowerCase();
|
@@ -303199,7 +303874,7 @@ var esm_default3 = createPrompt((config4, done) => {
|
|
303199
303874
|
}, 700);
|
303200
303875
|
}
|
303201
303876
|
});
|
303202
|
-
|
303877
|
+
useEffect2(() => () => {
|
303203
303878
|
clearTimeout(searchTimeoutRef.current);
|
303204
303879
|
}, []);
|
303205
303880
|
const message = theme.style.message(config4.message, status);
|
@@ -303239,7 +303914,7 @@ ${theme.style.help(`(${config4.instructions?.pager ?? "Use arrow keys to reveal
|
|
303239
303914
|
const choiceDescription = selectedChoice.description ? `
|
303240
303915
|
${theme.style.description(selectedChoice.description)}` : ``;
|
303241
303916
|
return `${[prefix, message, helpTipTop].filter(Boolean).join(" ")}
|
303242
|
-
${page}${helpTipBottom}${choiceDescription}${
|
303917
|
+
${page}${helpTipBottom}${choiceDescription}${import_ansi_escapes3.default.cursorHide}`;
|
303243
303918
|
});
|
303244
303919
|
|
303245
303920
|
// src/prompts/smart-contract-set/subgraph.prompt.ts
|
@@ -304820,14 +305495,14 @@ function includesArgs(parameters) {
|
|
304820
305495
|
});
|
304821
305496
|
}
|
304822
305497
|
if (typeof args === "object" && !Array.isArray(args) && typeof matchArgs === "object" && !Array.isArray(matchArgs))
|
304823
|
-
return Object.entries(matchArgs).every(([
|
305498
|
+
return Object.entries(matchArgs).every(([key3, value4]) => {
|
304824
305499
|
if (value4 === null || value4 === undefined)
|
304825
305500
|
return true;
|
304826
|
-
const input = inputs.find((input2) => input2.name ===
|
305501
|
+
const input = inputs.find((input2) => input2.name === key3);
|
304827
305502
|
if (!input)
|
304828
305503
|
return false;
|
304829
305504
|
const value_ = Array.isArray(value4) ? value4 : [value4];
|
304830
|
-
return value_.some((value5) => isEqual(input, value5, args[
|
305505
|
+
return value_.some((value5) => isEqual(input, value5, args[key3]));
|
304831
305506
|
});
|
304832
305507
|
return false;
|
304833
305508
|
}
|
@@ -305026,13 +305701,13 @@ function observe(observerId, callbacks, fn) {
|
|
305026
305701
|
if (listeners && listeners.length > 0)
|
305027
305702
|
return unwatch;
|
305028
305703
|
const emit = {};
|
305029
|
-
for (const
|
305030
|
-
emit[
|
305704
|
+
for (const key3 in callbacks) {
|
305705
|
+
emit[key3] = (...args) => {
|
305031
305706
|
const listeners2 = getListeners();
|
305032
305707
|
if (listeners2.length === 0)
|
305033
305708
|
return;
|
305034
305709
|
for (const listener of listeners2)
|
305035
|
-
listener.fns[
|
305710
|
+
listener.fns[key3]?.(...args);
|
305036
305711
|
};
|
305037
305712
|
}
|
305038
305713
|
const cleanup = fn(emit);
|
@@ -305371,7 +306046,7 @@ function uid(length = 11) {
|
|
305371
306046
|
|
305372
306047
|
// ../../node_modules/viem/_esm/clients/createClient.js
|
305373
306048
|
function createClient(parameters) {
|
305374
|
-
const { batch, chain, ccipRead, key:
|
306049
|
+
const { batch, chain, ccipRead, key: key3 = "base", name: name3 = "Base Client", type: type4 = "base" } = parameters;
|
305375
306050
|
const blockTime = chain?.blockTime ?? 12000;
|
305376
306051
|
const defaultPollingInterval = Math.min(Math.max(Math.floor(blockTime / 2), 500), 4000);
|
305377
306052
|
const pollingInterval = parameters.pollingInterval ?? defaultPollingInterval;
|
@@ -305388,7 +306063,7 @@ function createClient(parameters) {
|
|
305388
306063
|
cacheTime,
|
305389
306064
|
ccipRead,
|
305390
306065
|
chain,
|
305391
|
-
key:
|
306066
|
+
key: key3,
|
305392
306067
|
name: name3,
|
305393
306068
|
pollingInterval,
|
305394
306069
|
request: request2,
|
@@ -305399,8 +306074,8 @@ function createClient(parameters) {
|
|
305399
306074
|
function extend4(base2) {
|
305400
306075
|
return (extendFn) => {
|
305401
306076
|
const extended = extendFn(base2);
|
305402
|
-
for (const
|
305403
|
-
delete extended[
|
306077
|
+
for (const key4 in client)
|
306078
|
+
delete extended[key4];
|
305404
306079
|
const combined = { ...base2, ...extended };
|
305405
306080
|
return Object.assign(combined, { extend: extend4(combined) });
|
305406
306081
|
};
|
@@ -305580,11 +306255,11 @@ function shouldRetry(error44) {
|
|
305580
306255
|
}
|
305581
306256
|
|
305582
306257
|
// ../../node_modules/viem/_esm/clients/transports/createTransport.js
|
305583
|
-
function createTransport({ key:
|
306258
|
+
function createTransport({ key: key3, methods, name: name3, request: request2, retryCount = 3, retryDelay = 150, timeout, type: type4 }, value4) {
|
305584
306259
|
const uid2 = uid();
|
305585
306260
|
return {
|
305586
306261
|
config: {
|
305587
|
-
key:
|
306262
|
+
key: key3,
|
305588
306263
|
methods,
|
305589
306264
|
name: name3,
|
305590
306265
|
request: request2,
|
@@ -305741,7 +306416,7 @@ function getHttpRpcClient(url4, options = {}) {
|
|
305741
306416
|
|
305742
306417
|
// ../../node_modules/viem/_esm/clients/transports/http.js
|
305743
306418
|
function http(url4, config4 = {}) {
|
305744
|
-
const { batch, fetchOptions, key:
|
306419
|
+
const { batch, fetchOptions, key: key3 = "http", methods, name: name3 = "HTTP JSON-RPC", onFetchRequest, onFetchResponse, retryDelay, raw } = config4;
|
305745
306420
|
return ({ chain, retryCount: retryCount_, timeout: timeout_ }) => {
|
305746
306421
|
const { batchSize = 1000, wait: wait2 = 0 } = typeof batch === "object" ? batch : {};
|
305747
306422
|
const retryCount = config4.retryCount ?? retryCount_;
|
@@ -305756,7 +306431,7 @@ function http(url4, config4 = {}) {
|
|
305756
306431
|
timeout
|
305757
306432
|
});
|
305758
306433
|
return createTransport({
|
305759
|
-
key:
|
306434
|
+
key: key3,
|
305760
306435
|
methods,
|
305761
306436
|
name: name3,
|
305762
306437
|
async request({ method, params }) {
|
@@ -306207,7 +306882,7 @@ init_getChainContractAddress();
|
|
306207
306882
|
init_toHex();
|
306208
306883
|
init_localBatchGatewayRequest();
|
306209
306884
|
async function getEnsText(client, parameters) {
|
306210
|
-
const { blockNumber, blockTag, key:
|
306885
|
+
const { blockNumber, blockTag, key: key3, name: name3, gatewayUrls, strict } = parameters;
|
306211
306886
|
const { chain } = client;
|
306212
306887
|
const universalResolverAddress = (() => {
|
306213
306888
|
if (parameters.universalResolverAddress)
|
@@ -306233,7 +306908,7 @@ async function getEnsText(client, parameters) {
|
|
306233
306908
|
encodeFunctionData({
|
306234
306909
|
abi: textResolverAbi,
|
306235
306910
|
functionName: "text",
|
306236
|
-
args: [namehash(name3),
|
306911
|
+
args: [namehash(name3), key3]
|
306237
306912
|
}),
|
306238
306913
|
gatewayUrls ?? [localBatchGatewayUrl]
|
306239
306914
|
],
|
@@ -307256,16 +307931,16 @@ class LruMap2 extends Map {
|
|
307256
307931
|
});
|
307257
307932
|
this.maxSize = size5;
|
307258
307933
|
}
|
307259
|
-
get(
|
307260
|
-
const value4 = super.get(
|
307261
|
-
if (super.has(
|
307262
|
-
this.delete(
|
307263
|
-
super.set(
|
307934
|
+
get(key3) {
|
307935
|
+
const value4 = super.get(key3);
|
307936
|
+
if (super.has(key3) && value4 !== undefined) {
|
307937
|
+
this.delete(key3);
|
307938
|
+
super.set(key3, value4);
|
307264
307939
|
}
|
307265
307940
|
return value4;
|
307266
307941
|
}
|
307267
|
-
set(
|
307268
|
-
super.set(
|
307942
|
+
set(key3, value4) {
|
307943
|
+
super.set(key3, value4);
|
307269
307944
|
if (this.maxSize && this.size > this.maxSize) {
|
307270
307945
|
const firstKey = this.keys().next().value;
|
307271
307946
|
if (firstKey)
|
@@ -309108,10 +309783,10 @@ function publicActions(client) {
|
|
309108
309783
|
|
309109
309784
|
// ../../node_modules/viem/_esm/clients/createPublicClient.js
|
309110
309785
|
function createPublicClient(parameters) {
|
309111
|
-
const { key:
|
309786
|
+
const { key: key3 = "public", name: name3 = "Public Client" } = parameters;
|
309112
309787
|
const client = createClient({
|
309113
309788
|
...parameters,
|
309114
|
-
key:
|
309789
|
+
key: key3,
|
309115
309790
|
name: name3,
|
309116
309791
|
type: "publicClient"
|
309117
309792
|
});
|
@@ -309212,7 +309887,7 @@ __export4(util_exports3, {
|
|
309212
309887
|
getParsedType: () => getParsedType4,
|
309213
309888
|
getSizableOrigin: () => getSizableOrigin4,
|
309214
309889
|
isObject: () => isObject4,
|
309215
|
-
isPlainObject: () =>
|
309890
|
+
isPlainObject: () => isPlainObject7,
|
309216
309891
|
issue: () => issue4,
|
309217
309892
|
joinValues: () => joinValues4,
|
309218
309893
|
jsonStringifyReplacer: () => jsonStringifyReplacer4,
|
@@ -309284,19 +309959,19 @@ function floatSafeRemainder4(val, step) {
|
|
309284
309959
|
const stepInt = Number.parseInt(step.toFixed(decCount).replace(".", ""));
|
309285
309960
|
return valInt % stepInt / 10 ** decCount;
|
309286
309961
|
}
|
309287
|
-
function defineLazy4(object$1,
|
309962
|
+
function defineLazy4(object$1, key3, getter) {
|
309288
309963
|
const set$1 = false;
|
309289
|
-
Object.defineProperty(object$1,
|
309964
|
+
Object.defineProperty(object$1, key3, {
|
309290
309965
|
get() {
|
309291
309966
|
if (!set$1) {
|
309292
309967
|
const value4 = getter();
|
309293
|
-
object$1[
|
309968
|
+
object$1[key3] = value4;
|
309294
309969
|
return value4;
|
309295
309970
|
}
|
309296
309971
|
throw new Error("cached value already set");
|
309297
309972
|
},
|
309298
309973
|
set(v6) {
|
309299
|
-
Object.defineProperty(object$1,
|
309974
|
+
Object.defineProperty(object$1, key3, { value: v6 });
|
309300
309975
|
},
|
309301
309976
|
configurable: true
|
309302
309977
|
});
|
@@ -309312,11 +309987,11 @@ function assignProp4(target, prop, value4) {
|
|
309312
309987
|
function getElementAtPath4(obj, path7) {
|
309313
309988
|
if (!path7)
|
309314
309989
|
return obj;
|
309315
|
-
return path7.reduce((acc,
|
309990
|
+
return path7.reduce((acc, key3) => acc?.[key3], obj);
|
309316
309991
|
}
|
309317
309992
|
function promiseAllObject4(promisesObj) {
|
309318
309993
|
const keys = Object.keys(promisesObj);
|
309319
|
-
const promises = keys.map((
|
309994
|
+
const promises = keys.map((key3) => promisesObj[key3]);
|
309320
309995
|
return Promise.all(promises).then((results) => {
|
309321
309996
|
const resolvedObj = {};
|
309322
309997
|
for (let i6 = 0;i6 < keys.length; i6++) {
|
@@ -309348,7 +310023,7 @@ var allowsEval4 = cached4(() => {
|
|
309348
310023
|
return false;
|
309349
310024
|
}
|
309350
310025
|
});
|
309351
|
-
function
|
310026
|
+
function isPlainObject7(o8) {
|
309352
310027
|
if (isObject4(o8) === false)
|
309353
310028
|
return false;
|
309354
310029
|
const ctor = o8.constructor;
|
@@ -309364,8 +310039,8 @@ function isPlainObject6(o8) {
|
|
309364
310039
|
}
|
309365
310040
|
function numKeys4(data) {
|
309366
310041
|
let keyCount = 0;
|
309367
|
-
for (const
|
309368
|
-
if (Object.prototype.hasOwnProperty.call(data,
|
310042
|
+
for (const key3 in data) {
|
310043
|
+
if (Object.prototype.hasOwnProperty.call(data, key3)) {
|
309369
310044
|
keyCount++;
|
309370
310045
|
}
|
309371
310046
|
}
|
@@ -309515,13 +310190,13 @@ var BIGINT_FORMAT_RANGES4 = {
|
|
309515
310190
|
function pick4(schema, mask) {
|
309516
310191
|
const newShape = {};
|
309517
310192
|
const currDef = schema._zod.def;
|
309518
|
-
for (const
|
309519
|
-
if (!(
|
309520
|
-
throw new Error(`Unrecognized key: "${
|
310193
|
+
for (const key3 in mask) {
|
310194
|
+
if (!(key3 in currDef.shape)) {
|
310195
|
+
throw new Error(`Unrecognized key: "${key3}"`);
|
309521
310196
|
}
|
309522
|
-
if (!mask[
|
310197
|
+
if (!mask[key3])
|
309523
310198
|
continue;
|
309524
|
-
newShape[
|
310199
|
+
newShape[key3] = currDef.shape[key3];
|
309525
310200
|
}
|
309526
310201
|
return clone4(schema, {
|
309527
310202
|
...schema._zod.def,
|
@@ -309532,13 +310207,13 @@ function pick4(schema, mask) {
|
|
309532
310207
|
function omit4(schema, mask) {
|
309533
310208
|
const newShape = { ...schema._zod.def.shape };
|
309534
310209
|
const currDef = schema._zod.def;
|
309535
|
-
for (const
|
309536
|
-
if (!(
|
309537
|
-
throw new Error(`Unrecognized key: "${
|
310210
|
+
for (const key3 in mask) {
|
310211
|
+
if (!(key3 in currDef.shape)) {
|
310212
|
+
throw new Error(`Unrecognized key: "${key3}"`);
|
309538
310213
|
}
|
309539
|
-
if (!mask[
|
310214
|
+
if (!mask[key3])
|
309540
310215
|
continue;
|
309541
|
-
delete newShape[
|
310216
|
+
delete newShape[key3];
|
309542
310217
|
}
|
309543
310218
|
return clone4(schema, {
|
309544
310219
|
...schema._zod.def,
|
@@ -309580,23 +310255,23 @@ function partial4(Class$1, schema, mask) {
|
|
309580
310255
|
const oldShape = schema._zod.def.shape;
|
309581
310256
|
const shape = { ...oldShape };
|
309582
310257
|
if (mask) {
|
309583
|
-
for (const
|
309584
|
-
if (!(
|
309585
|
-
throw new Error(`Unrecognized key: "${
|
310258
|
+
for (const key3 in mask) {
|
310259
|
+
if (!(key3 in oldShape)) {
|
310260
|
+
throw new Error(`Unrecognized key: "${key3}"`);
|
309586
310261
|
}
|
309587
|
-
if (!mask[
|
310262
|
+
if (!mask[key3])
|
309588
310263
|
continue;
|
309589
|
-
shape[
|
310264
|
+
shape[key3] = Class$1 ? new Class$1({
|
309590
310265
|
type: "optional",
|
309591
|
-
innerType: oldShape[
|
309592
|
-
}) : oldShape[
|
310266
|
+
innerType: oldShape[key3]
|
310267
|
+
}) : oldShape[key3];
|
309593
310268
|
}
|
309594
310269
|
} else {
|
309595
|
-
for (const
|
309596
|
-
shape[
|
310270
|
+
for (const key3 in oldShape) {
|
310271
|
+
shape[key3] = Class$1 ? new Class$1({
|
309597
310272
|
type: "optional",
|
309598
|
-
innerType: oldShape[
|
309599
|
-
}) : oldShape[
|
310273
|
+
innerType: oldShape[key3]
|
310274
|
+
}) : oldShape[key3];
|
309600
310275
|
}
|
309601
310276
|
}
|
309602
310277
|
return clone4(schema, {
|
@@ -309609,22 +310284,22 @@ function required4(Class$1, schema, mask) {
|
|
309609
310284
|
const oldShape = schema._zod.def.shape;
|
309610
310285
|
const shape = { ...oldShape };
|
309611
310286
|
if (mask) {
|
309612
|
-
for (const
|
309613
|
-
if (!(
|
309614
|
-
throw new Error(`Unrecognized key: "${
|
310287
|
+
for (const key3 in mask) {
|
310288
|
+
if (!(key3 in shape)) {
|
310289
|
+
throw new Error(`Unrecognized key: "${key3}"`);
|
309615
310290
|
}
|
309616
|
-
if (!mask[
|
310291
|
+
if (!mask[key3])
|
309617
310292
|
continue;
|
309618
|
-
shape[
|
310293
|
+
shape[key3] = new Class$1({
|
309619
310294
|
type: "nonoptional",
|
309620
|
-
innerType: oldShape[
|
310295
|
+
innerType: oldShape[key3]
|
309621
310296
|
});
|
309622
310297
|
}
|
309623
310298
|
} else {
|
309624
|
-
for (const
|
309625
|
-
shape[
|
310299
|
+
for (const key3 in oldShape) {
|
310300
|
+
shape[key3] = new Class$1({
|
309626
310301
|
type: "nonoptional",
|
309627
|
-
innerType: oldShape[
|
310302
|
+
innerType: oldShape[key3]
|
309628
310303
|
});
|
309629
310304
|
}
|
309630
310305
|
}
|
@@ -311204,28 +311879,28 @@ var $ZodArray4 = /* @__PURE__ */ $constructor4("$ZodArray", (inst, def) => {
|
|
311204
311879
|
return payload;
|
311205
311880
|
};
|
311206
311881
|
});
|
311207
|
-
function handleObjectResult4(result, final,
|
311882
|
+
function handleObjectResult4(result, final, key3) {
|
311208
311883
|
if (result.issues.length) {
|
311209
|
-
final.issues.push(...prefixIssues4(
|
311884
|
+
final.issues.push(...prefixIssues4(key3, result.issues));
|
311210
311885
|
}
|
311211
|
-
final.value[
|
311886
|
+
final.value[key3] = result.value;
|
311212
311887
|
}
|
311213
|
-
function handleOptionalObjectResult4(result, final,
|
311888
|
+
function handleOptionalObjectResult4(result, final, key3, input) {
|
311214
311889
|
if (result.issues.length) {
|
311215
|
-
if (input[
|
311216
|
-
if (
|
311217
|
-
final.value[
|
311890
|
+
if (input[key3] === undefined) {
|
311891
|
+
if (key3 in input) {
|
311892
|
+
final.value[key3] = undefined;
|
311218
311893
|
} else {
|
311219
|
-
final.value[
|
311894
|
+
final.value[key3] = result.value;
|
311220
311895
|
}
|
311221
311896
|
} else {
|
311222
|
-
final.issues.push(...prefixIssues4(
|
311897
|
+
final.issues.push(...prefixIssues4(key3, result.issues));
|
311223
311898
|
}
|
311224
311899
|
} else if (result.value === undefined) {
|
311225
|
-
if (
|
311226
|
-
final.value[
|
311900
|
+
if (key3 in input)
|
311901
|
+
final.value[key3] = undefined;
|
311227
311902
|
} else {
|
311228
|
-
final.value[
|
311903
|
+
final.value[key3] = result.value;
|
311229
311904
|
}
|
311230
311905
|
}
|
311231
311906
|
var $ZodObject4 = /* @__PURE__ */ $constructor4("$ZodObject", (inst, def) => {
|
@@ -311249,12 +311924,12 @@ var $ZodObject4 = /* @__PURE__ */ $constructor4("$ZodObject", (inst, def) => {
|
|
311249
311924
|
defineLazy4(inst._zod, "propValues", () => {
|
311250
311925
|
const shape = def.shape;
|
311251
311926
|
const propValues = {};
|
311252
|
-
for (const
|
311253
|
-
const field2 = shape[
|
311927
|
+
for (const key3 in shape) {
|
311928
|
+
const field2 = shape[key3]._zod;
|
311254
311929
|
if (field2.values) {
|
311255
|
-
propValues[
|
311930
|
+
propValues[key3] ?? (propValues[key3] = new Set);
|
311256
311931
|
for (const v6 of field2.values)
|
311257
|
-
propValues[
|
311932
|
+
propValues[key3].add(v6);
|
311258
311933
|
}
|
311259
311934
|
}
|
311260
311935
|
return propValues;
|
@@ -311266,21 +311941,21 @@ var $ZodObject4 = /* @__PURE__ */ $constructor4("$ZodObject", (inst, def) => {
|
|
311266
311941
|
"ctx"
|
311267
311942
|
]);
|
311268
311943
|
const { keys, optionalKeys: optionalKeys$1 } = _normalized.value;
|
311269
|
-
const parseStr = (
|
311270
|
-
const k5 = esc4(
|
311944
|
+
const parseStr = (key3) => {
|
311945
|
+
const k5 = esc4(key3);
|
311271
311946
|
return `shape[${k5}]._zod.run({ value: input[${k5}], issues: [] }, ctx)`;
|
311272
311947
|
};
|
311273
311948
|
doc2.write(`const input = payload.value;`);
|
311274
311949
|
const ids = Object.create(null);
|
311275
|
-
for (const
|
311276
|
-
ids[
|
311950
|
+
for (const key3 of keys) {
|
311951
|
+
ids[key3] = randomString4(15);
|
311277
311952
|
}
|
311278
311953
|
doc2.write(`const newResult = {}`);
|
311279
|
-
for (const
|
311280
|
-
if (optionalKeys$1.has(
|
311281
|
-
const id = ids[
|
311282
|
-
doc2.write(`const ${id} = ${parseStr(
|
311283
|
-
const k5 = esc4(
|
311954
|
+
for (const key3 of keys) {
|
311955
|
+
if (optionalKeys$1.has(key3)) {
|
311956
|
+
const id = ids[key3];
|
311957
|
+
doc2.write(`const ${id} = ${parseStr(key3)};`);
|
311958
|
+
const k5 = esc4(key3);
|
311284
311959
|
doc2.write(`
|
311285
311960
|
if (${id}.issues.length) {
|
311286
311961
|
if (input[${k5}] === undefined) {
|
@@ -311302,14 +311977,14 @@ var $ZodObject4 = /* @__PURE__ */ $constructor4("$ZodObject", (inst, def) => {
|
|
311302
311977
|
}
|
311303
311978
|
`);
|
311304
311979
|
} else {
|
311305
|
-
const id = ids[
|
311306
|
-
doc2.write(`const ${id} = ${parseStr(
|
311980
|
+
const id = ids[key3];
|
311981
|
+
doc2.write(`const ${id} = ${parseStr(key3)};`);
|
311307
311982
|
doc2.write(`
|
311308
311983
|
if (${id}.issues.length) payload.issues = payload.issues.concat(${id}.issues.map(iss => ({
|
311309
311984
|
...iss,
|
311310
|
-
path: iss.path ? [${esc4(
|
311985
|
+
path: iss.path ? [${esc4(key3)}, ...iss.path] : [${esc4(key3)}]
|
311311
311986
|
})));`);
|
311312
|
-
doc2.write(`newResult[${esc4(
|
311987
|
+
doc2.write(`newResult[${esc4(key3)}] = ${id}.value`);
|
311313
311988
|
}
|
311314
311989
|
}
|
311315
311990
|
doc2.write(`payload.value = newResult;`);
|
@@ -311344,20 +312019,20 @@ var $ZodObject4 = /* @__PURE__ */ $constructor4("$ZodObject", (inst, def) => {
|
|
311344
312019
|
} else {
|
311345
312020
|
payload.value = {};
|
311346
312021
|
const shape = value4.shape;
|
311347
|
-
for (const
|
311348
|
-
const el = shape[
|
312022
|
+
for (const key3 of value4.keys) {
|
312023
|
+
const el = shape[key3];
|
311349
312024
|
const r6 = el._zod.run({
|
311350
|
-
value: input[
|
312025
|
+
value: input[key3],
|
311351
312026
|
issues: []
|
311352
312027
|
}, ctx);
|
311353
312028
|
const isOptional = el._zod.optin === "optional" && el._zod.optout === "optional";
|
311354
312029
|
if (r6 instanceof Promise) {
|
311355
|
-
proms.push(r6.then((r$1) => isOptional ? handleOptionalObjectResult4(r$1, payload,
|
312030
|
+
proms.push(r6.then((r$1) => isOptional ? handleOptionalObjectResult4(r$1, payload, key3, input) : handleObjectResult4(r$1, payload, key3)));
|
311356
312031
|
} else {
|
311357
312032
|
if (isOptional) {
|
311358
|
-
handleOptionalObjectResult4(r6, payload,
|
312033
|
+
handleOptionalObjectResult4(r6, payload, key3, input);
|
311359
312034
|
} else {
|
311360
|
-
handleObjectResult4(r6, payload,
|
312035
|
+
handleObjectResult4(r6, payload, key3);
|
311361
312036
|
}
|
311362
312037
|
}
|
311363
312038
|
}
|
@@ -311369,21 +312044,21 @@ var $ZodObject4 = /* @__PURE__ */ $constructor4("$ZodObject", (inst, def) => {
|
|
311369
312044
|
const keySet = value4.keySet;
|
311370
312045
|
const _catchall = catchall._zod;
|
311371
312046
|
const t8 = _catchall.def.type;
|
311372
|
-
for (const
|
311373
|
-
if (keySet.has(
|
312047
|
+
for (const key3 of Object.keys(input)) {
|
312048
|
+
if (keySet.has(key3))
|
311374
312049
|
continue;
|
311375
312050
|
if (t8 === "never") {
|
311376
|
-
unrecognized.push(
|
312051
|
+
unrecognized.push(key3);
|
311377
312052
|
continue;
|
311378
312053
|
}
|
311379
312054
|
const r6 = _catchall.run({
|
311380
|
-
value: input[
|
312055
|
+
value: input[key3],
|
311381
312056
|
issues: []
|
311382
312057
|
}, ctx);
|
311383
312058
|
if (r6 instanceof Promise) {
|
311384
|
-
proms.push(r6.then((r$1) => handleObjectResult4(r$1, payload,
|
312059
|
+
proms.push(r6.then((r$1) => handleObjectResult4(r$1, payload, key3)));
|
311385
312060
|
} else {
|
311386
|
-
handleObjectResult4(r6, payload,
|
312061
|
+
handleObjectResult4(r6, payload, key3);
|
311387
312062
|
}
|
311388
312063
|
}
|
311389
312064
|
if (unrecognized.length) {
|
@@ -311553,22 +312228,22 @@ function mergeValues4(a7, b4) {
|
|
311553
312228
|
data: a7
|
311554
312229
|
};
|
311555
312230
|
}
|
311556
|
-
if (
|
312231
|
+
if (isPlainObject7(a7) && isPlainObject7(b4)) {
|
311557
312232
|
const bKeys = Object.keys(b4);
|
311558
|
-
const sharedKeys = Object.keys(a7).filter((
|
312233
|
+
const sharedKeys = Object.keys(a7).filter((key3) => bKeys.indexOf(key3) !== -1);
|
311559
312234
|
const newObj = {
|
311560
312235
|
...a7,
|
311561
312236
|
...b4
|
311562
312237
|
};
|
311563
|
-
for (const
|
311564
|
-
const sharedValue = mergeValues4(a7[
|
312238
|
+
for (const key3 of sharedKeys) {
|
312239
|
+
const sharedValue = mergeValues4(a7[key3], b4[key3]);
|
311565
312240
|
if (!sharedValue.valid) {
|
311566
312241
|
return {
|
311567
312242
|
valid: false,
|
311568
|
-
mergeErrorPath: [
|
312243
|
+
mergeErrorPath: [key3, ...sharedValue.mergeErrorPath]
|
311569
312244
|
};
|
311570
312245
|
}
|
311571
|
-
newObj[
|
312246
|
+
newObj[key3] = sharedValue.data;
|
311572
312247
|
}
|
311573
312248
|
return {
|
311574
312249
|
valid: true,
|
@@ -311704,7 +312379,7 @@ var $ZodRecord4 = /* @__PURE__ */ $constructor4("$ZodRecord", (inst, def) => {
|
|
311704
312379
|
$ZodType4.init(inst, def);
|
311705
312380
|
inst._zod.parse = (payload, ctx) => {
|
311706
312381
|
const input = payload.value;
|
311707
|
-
if (!
|
312382
|
+
if (!isPlainObject7(input)) {
|
311708
312383
|
payload.issues.push({
|
311709
312384
|
expected: "record",
|
311710
312385
|
code: "invalid_type",
|
@@ -311717,32 +312392,32 @@ var $ZodRecord4 = /* @__PURE__ */ $constructor4("$ZodRecord", (inst, def) => {
|
|
311717
312392
|
if (def.keyType._zod.values) {
|
311718
312393
|
const values = def.keyType._zod.values;
|
311719
312394
|
payload.value = {};
|
311720
|
-
for (const
|
311721
|
-
if (typeof
|
312395
|
+
for (const key3 of values) {
|
312396
|
+
if (typeof key3 === "string" || typeof key3 === "number" || typeof key3 === "symbol") {
|
311722
312397
|
const result = def.valueType._zod.run({
|
311723
|
-
value: input[
|
312398
|
+
value: input[key3],
|
311724
312399
|
issues: []
|
311725
312400
|
}, ctx);
|
311726
312401
|
if (result instanceof Promise) {
|
311727
312402
|
proms.push(result.then((result$1) => {
|
311728
312403
|
if (result$1.issues.length) {
|
311729
|
-
payload.issues.push(...prefixIssues4(
|
312404
|
+
payload.issues.push(...prefixIssues4(key3, result$1.issues));
|
311730
312405
|
}
|
311731
|
-
payload.value[
|
312406
|
+
payload.value[key3] = result$1.value;
|
311732
312407
|
}));
|
311733
312408
|
} else {
|
311734
312409
|
if (result.issues.length) {
|
311735
|
-
payload.issues.push(...prefixIssues4(
|
312410
|
+
payload.issues.push(...prefixIssues4(key3, result.issues));
|
311736
312411
|
}
|
311737
|
-
payload.value[
|
312412
|
+
payload.value[key3] = result.value;
|
311738
312413
|
}
|
311739
312414
|
}
|
311740
312415
|
}
|
311741
312416
|
let unrecognized;
|
311742
|
-
for (const
|
311743
|
-
if (!values.has(
|
312417
|
+
for (const key3 in input) {
|
312418
|
+
if (!values.has(key3)) {
|
311744
312419
|
unrecognized = unrecognized ?? [];
|
311745
|
-
unrecognized.push(
|
312420
|
+
unrecognized.push(key3);
|
311746
312421
|
}
|
311747
312422
|
}
|
311748
312423
|
if (unrecognized && unrecognized.length > 0) {
|
@@ -311755,11 +312430,11 @@ var $ZodRecord4 = /* @__PURE__ */ $constructor4("$ZodRecord", (inst, def) => {
|
|
311755
312430
|
}
|
311756
312431
|
} else {
|
311757
312432
|
payload.value = {};
|
311758
|
-
for (const
|
311759
|
-
if (
|
312433
|
+
for (const key3 of Reflect.ownKeys(input)) {
|
312434
|
+
if (key3 === "__proto__")
|
311760
312435
|
continue;
|
311761
312436
|
const keyResult = def.keyType._zod.run({
|
311762
|
-
value:
|
312437
|
+
value: key3,
|
311763
312438
|
issues: []
|
311764
312439
|
}, ctx);
|
311765
312440
|
if (keyResult instanceof Promise) {
|
@@ -311770,27 +312445,27 @@ var $ZodRecord4 = /* @__PURE__ */ $constructor4("$ZodRecord", (inst, def) => {
|
|
311770
312445
|
origin: "record",
|
311771
312446
|
code: "invalid_key",
|
311772
312447
|
issues: keyResult.issues.map((iss) => finalizeIssue4(iss, ctx, config4())),
|
311773
|
-
input:
|
311774
|
-
path: [
|
312448
|
+
input: key3,
|
312449
|
+
path: [key3],
|
311775
312450
|
inst
|
311776
312451
|
});
|
311777
312452
|
payload.value[keyResult.value] = keyResult.value;
|
311778
312453
|
continue;
|
311779
312454
|
}
|
311780
312455
|
const result = def.valueType._zod.run({
|
311781
|
-
value: input[
|
312456
|
+
value: input[key3],
|
311782
312457
|
issues: []
|
311783
312458
|
}, ctx);
|
311784
312459
|
if (result instanceof Promise) {
|
311785
312460
|
proms.push(result.then((result$1) => {
|
311786
312461
|
if (result$1.issues.length) {
|
311787
|
-
payload.issues.push(...prefixIssues4(
|
312462
|
+
payload.issues.push(...prefixIssues4(key3, result$1.issues));
|
311788
312463
|
}
|
311789
312464
|
payload.value[keyResult.value] = result$1.value;
|
311790
312465
|
}));
|
311791
312466
|
} else {
|
311792
312467
|
if (result.issues.length) {
|
311793
|
-
payload.issues.push(...prefixIssues4(
|
312468
|
+
payload.issues.push(...prefixIssues4(key3, result.issues));
|
311794
312469
|
}
|
311795
312470
|
payload.value[keyResult.value] = result.value;
|
311796
312471
|
}
|
@@ -311817,9 +312492,9 @@ var $ZodMap4 = /* @__PURE__ */ $constructor4("$ZodMap", (inst, def) => {
|
|
311817
312492
|
}
|
311818
312493
|
const proms = [];
|
311819
312494
|
payload.value = new Map;
|
311820
|
-
for (const [
|
312495
|
+
for (const [key3, value4] of input) {
|
311821
312496
|
const keyResult = def.keyType._zod.run({
|
311822
|
-
value:
|
312497
|
+
value: key3,
|
311823
312498
|
issues: []
|
311824
312499
|
}, ctx);
|
311825
312500
|
const valueResult = def.valueType._zod.run({
|
@@ -311828,10 +312503,10 @@ var $ZodMap4 = /* @__PURE__ */ $constructor4("$ZodMap", (inst, def) => {
|
|
311828
312503
|
}, ctx);
|
311829
312504
|
if (keyResult instanceof Promise || valueResult instanceof Promise) {
|
311830
312505
|
proms.push(Promise.all([keyResult, valueResult]).then(([keyResult$1, valueResult$1]) => {
|
311831
|
-
handleMapResult4(keyResult$1, valueResult$1, payload,
|
312506
|
+
handleMapResult4(keyResult$1, valueResult$1, payload, key3, input, inst, ctx);
|
311832
312507
|
}));
|
311833
312508
|
} else {
|
311834
|
-
handleMapResult4(keyResult, valueResult, payload,
|
312509
|
+
handleMapResult4(keyResult, valueResult, payload, key3, input, inst, ctx);
|
311835
312510
|
}
|
311836
312511
|
}
|
311837
312512
|
if (proms.length)
|
@@ -311839,10 +312514,10 @@ var $ZodMap4 = /* @__PURE__ */ $constructor4("$ZodMap", (inst, def) => {
|
|
311839
312514
|
return payload;
|
311840
312515
|
};
|
311841
312516
|
});
|
311842
|
-
function handleMapResult4(keyResult, valueResult, final,
|
312517
|
+
function handleMapResult4(keyResult, valueResult, final, key3, input, inst, ctx) {
|
311843
312518
|
if (keyResult.issues.length) {
|
311844
|
-
if (propertyKeyTypes4.has(typeof
|
311845
|
-
final.issues.push(...prefixIssues4(
|
312519
|
+
if (propertyKeyTypes4.has(typeof key3)) {
|
312520
|
+
final.issues.push(...prefixIssues4(key3, keyResult.issues));
|
311846
312521
|
} else {
|
311847
312522
|
final.issues.push({
|
311848
312523
|
origin: "map",
|
@@ -311854,15 +312529,15 @@ function handleMapResult4(keyResult, valueResult, final, key2, input, inst, ctx)
|
|
311854
312529
|
}
|
311855
312530
|
}
|
311856
312531
|
if (valueResult.issues.length) {
|
311857
|
-
if (propertyKeyTypes4.has(typeof
|
311858
|
-
final.issues.push(...prefixIssues4(
|
312532
|
+
if (propertyKeyTypes4.has(typeof key3)) {
|
312533
|
+
final.issues.push(...prefixIssues4(key3, valueResult.issues));
|
311859
312534
|
} else {
|
311860
312535
|
final.issues.push({
|
311861
312536
|
origin: "map",
|
311862
312537
|
code: "invalid_element",
|
311863
312538
|
input,
|
311864
312539
|
inst,
|
311865
|
-
key:
|
312540
|
+
key: key3,
|
311866
312541
|
issues: valueResult.issues.map((iss) => finalizeIssue4(iss, ctx, config4()))
|
311867
312542
|
});
|
311868
312543
|
}
|
@@ -318184,19 +318859,19 @@ var JSONSchemaGenerator4 = class {
|
|
318184
318859
|
json$1.type = "object";
|
318185
318860
|
json$1.properties = {};
|
318186
318861
|
const shape = def.shape;
|
318187
|
-
for (const
|
318188
|
-
json$1.properties[
|
318862
|
+
for (const key3 in shape) {
|
318863
|
+
json$1.properties[key3] = this.process(shape[key3], {
|
318189
318864
|
...params,
|
318190
318865
|
path: [
|
318191
318866
|
...params.path,
|
318192
318867
|
"properties",
|
318193
|
-
|
318868
|
+
key3
|
318194
318869
|
]
|
318195
318870
|
});
|
318196
318871
|
}
|
318197
318872
|
const allKeys = new Set(Object.keys(shape));
|
318198
|
-
const requiredKeys = new Set([...allKeys].filter((
|
318199
|
-
const v6 = def.shape[
|
318873
|
+
const requiredKeys = new Set([...allKeys].filter((key3) => {
|
318874
|
+
const v6 = def.shape[key3]._zod;
|
318200
318875
|
if (this.io === "input") {
|
318201
318876
|
return v6.optin === undefined;
|
318202
318877
|
} else {
|
@@ -318548,8 +319223,8 @@ var JSONSchemaGenerator4 = class {
|
|
318548
319223
|
if (defId)
|
318549
319224
|
seen.defId = defId;
|
318550
319225
|
const schema$1 = seen.schema;
|
318551
|
-
for (const
|
318552
|
-
delete schema$1[
|
319226
|
+
for (const key3 in schema$1) {
|
319227
|
+
delete schema$1[key3];
|
318553
319228
|
}
|
318554
319229
|
schema$1.$ref = ref;
|
318555
319230
|
};
|
@@ -318660,8 +319335,8 @@ function toJSONSchema4(input, _params) {
|
|
318660
319335
|
defs
|
318661
319336
|
};
|
318662
319337
|
for (const entry of input._idmap.entries()) {
|
318663
|
-
const [
|
318664
|
-
schemas3[
|
319338
|
+
const [key3, schema] = entry;
|
319339
|
+
schemas3[key3] = gen$1.emit(schema, {
|
318665
319340
|
..._params,
|
318666
319341
|
external: external2
|
318667
319342
|
});
|
@@ -318706,8 +319381,8 @@ function isTransforming4(_schema, _ctx) {
|
|
318706
319381
|
return isTransforming4(def.element, ctx);
|
318707
319382
|
}
|
318708
319383
|
case "object": {
|
318709
|
-
for (const
|
318710
|
-
if (isTransforming4(def.shape[
|
319384
|
+
for (const key3 in def.shape) {
|
319385
|
+
if (isTransforming4(def.shape[key3], ctx))
|
318711
319386
|
return true;
|
318712
319387
|
}
|
318713
319388
|
return false;
|
@@ -320450,13 +321125,13 @@ var esm_default4 = createPrompt((config5, done) => {
|
|
320450
321125
|
const [value4, setValue] = useState("");
|
320451
321126
|
const theme = makeTheme(config5.theme);
|
320452
321127
|
const prefix = usePrefix({ status, theme });
|
320453
|
-
useKeypress((
|
320454
|
-
if (isEnterKey(
|
321128
|
+
useKeypress((key3, rl) => {
|
321129
|
+
if (isEnterKey(key3)) {
|
320455
321130
|
const answer = getBooleanValue(value4, config5.default);
|
320456
321131
|
setValue(transformer(answer));
|
320457
321132
|
setStatus("done");
|
320458
321133
|
done(answer);
|
320459
|
-
} else if (
|
321134
|
+
} else if (key3.name === "tab") {
|
320460
321135
|
const answer = boolToString(!getBooleanValue(value4, config5.default));
|
320461
321136
|
rl.clearLine(0);
|
320462
321137
|
rl.write(answer);
|
@@ -320477,7 +321152,7 @@ var esm_default4 = createPrompt((config5, done) => {
|
|
320477
321152
|
});
|
320478
321153
|
|
320479
321154
|
// ../../node_modules/@inquirer/password/dist/esm/index.js
|
320480
|
-
var
|
321155
|
+
var import_ansi_escapes4 = __toESM(require_ansi_escapes(), 1);
|
320481
321156
|
var esm_default5 = createPrompt((config5, done) => {
|
320482
321157
|
const { validate: validate5 = () => true } = config5;
|
320483
321158
|
const theme = makeTheme(config5.theme);
|
@@ -320485,11 +321160,11 @@ var esm_default5 = createPrompt((config5, done) => {
|
|
320485
321160
|
const [errorMsg, setError] = useState();
|
320486
321161
|
const [value4, setValue] = useState("");
|
320487
321162
|
const prefix = usePrefix({ status, theme });
|
320488
|
-
useKeypress(async (
|
321163
|
+
useKeypress(async (key3, rl) => {
|
320489
321164
|
if (status !== "idle") {
|
320490
321165
|
return;
|
320491
321166
|
}
|
320492
|
-
if (isEnterKey(
|
321167
|
+
if (isEnterKey(key3)) {
|
320493
321168
|
const answer = value4;
|
320494
321169
|
setStatus("loading");
|
320495
321170
|
const isValid = await validate5(answer);
|
@@ -320514,7 +321189,7 @@ var esm_default5 = createPrompt((config5, done) => {
|
|
320514
321189
|
const maskChar = typeof config5.mask === "string" ? config5.mask : "*";
|
320515
321190
|
formattedValue = maskChar.repeat(value4.length);
|
320516
321191
|
} else if (status !== "done") {
|
320517
|
-
helpTip = `${theme.style.help("[input is masked]")}${
|
321192
|
+
helpTip = `${theme.style.help("[input is masked]")}${import_ansi_escapes4.default.cursorHide}`;
|
320518
321193
|
}
|
320519
321194
|
if (status === "done") {
|
320520
321195
|
formattedValue = theme.style.answer(formattedValue);
|
@@ -320557,7 +321232,7 @@ async function applicationAccessTokenPrompt(env2, application, settlemint, accep
|
|
320557
321232
|
try {
|
320558
321233
|
validate2(exports_external.string(), value4);
|
320559
321234
|
return true;
|
320560
|
-
} catch (
|
321235
|
+
} catch (_error) {
|
320561
321236
|
return "Invalid token name";
|
320562
321237
|
}
|
320563
321238
|
}
|
@@ -320610,7 +321285,7 @@ async function applicationAccessTokenPrompt(env2, application, settlemint, accep
|
|
320610
321285
|
try {
|
320611
321286
|
validate2(ApplicationAccessTokenSchema2, aat);
|
320612
321287
|
return aat;
|
320613
|
-
} catch (
|
321288
|
+
} catch (_error) {}
|
320614
321289
|
}
|
320615
321290
|
return esm_default5({
|
320616
321291
|
message: "What is the application access token for your application in SettleMint? (format: sm_aat_...)",
|
@@ -320618,7 +321293,7 @@ async function applicationAccessTokenPrompt(env2, application, settlemint, accep
|
|
320618
321293
|
try {
|
320619
321294
|
validate2(ApplicationAccessTokenSchema2, value4);
|
320620
321295
|
return true;
|
320621
|
-
} catch (
|
321296
|
+
} catch (_error) {
|
320622
321297
|
return "Invalid application access token, it should start with sm_aat_...";
|
320623
321298
|
}
|
320624
321299
|
}
|
@@ -321023,7 +321698,7 @@ async function instancePrompt({
|
|
321023
321698
|
try {
|
321024
321699
|
validate2(UrlSchema2, value4);
|
321025
321700
|
return true;
|
321026
|
-
} catch (
|
321701
|
+
} catch (_error) {
|
321027
321702
|
return "Invalid URL";
|
321028
321703
|
}
|
321029
321704
|
},
|
@@ -321107,7 +321782,7 @@ async function serviceUrlPrompt({
|
|
321107
321782
|
try {
|
321108
321783
|
validate2(UrlSchema2, value4);
|
321109
321784
|
return true;
|
321110
|
-
} catch (
|
321785
|
+
} catch (_error) {
|
321111
321786
|
return "Invalid URL";
|
321112
321787
|
}
|
321113
321788
|
},
|
@@ -322051,7 +322726,7 @@ async function projectNamePrompt(env2, argument) {
|
|
322051
322726
|
try {
|
322052
322727
|
validate2(exports_external.string(), value4);
|
322053
322728
|
return true;
|
322054
|
-
} catch (
|
322729
|
+
} catch (_error) {
|
322055
322730
|
return "Invalid projectname";
|
322056
322731
|
}
|
322057
322732
|
}
|
@@ -322245,7 +322920,7 @@ var basename2 = function(p5, extension) {
|
|
322245
322920
|
return extension && lastSegment.endsWith(extension) ? lastSegment.slice(0, -extension.length) : lastSegment;
|
322246
322921
|
};
|
322247
322922
|
// ../../node_modules/defu/dist/defu.mjs
|
322248
|
-
function
|
322923
|
+
function isPlainObject8(value4) {
|
322249
322924
|
if (value4 === null || typeof value4 !== "object") {
|
322250
322925
|
return false;
|
322251
322926
|
}
|
@@ -322262,27 +322937,27 @@ function isPlainObject7(value4) {
|
|
322262
322937
|
return true;
|
322263
322938
|
}
|
322264
322939
|
function _defu(baseObject, defaults4, namespace = ".", merger) {
|
322265
|
-
if (!
|
322940
|
+
if (!isPlainObject8(defaults4)) {
|
322266
322941
|
return _defu(baseObject, {}, namespace, merger);
|
322267
322942
|
}
|
322268
322943
|
const object5 = Object.assign({}, defaults4);
|
322269
|
-
for (const
|
322270
|
-
if (
|
322944
|
+
for (const key3 in baseObject) {
|
322945
|
+
if (key3 === "__proto__" || key3 === "constructor") {
|
322271
322946
|
continue;
|
322272
322947
|
}
|
322273
|
-
const value4 = baseObject[
|
322948
|
+
const value4 = baseObject[key3];
|
322274
322949
|
if (value4 === null || value4 === undefined) {
|
322275
322950
|
continue;
|
322276
322951
|
}
|
322277
|
-
if (merger && merger(object5,
|
322952
|
+
if (merger && merger(object5, key3, value4, namespace)) {
|
322278
322953
|
continue;
|
322279
322954
|
}
|
322280
|
-
if (Array.isArray(value4) && Array.isArray(object5[
|
322281
|
-
object5[
|
322282
|
-
} else if (
|
322283
|
-
object5[
|
322955
|
+
if (Array.isArray(value4) && Array.isArray(object5[key3])) {
|
322956
|
+
object5[key3] = [...value4, ...object5[key3]];
|
322957
|
+
} else if (isPlainObject8(value4) && isPlainObject8(object5[key3])) {
|
322958
|
+
object5[key3] = _defu(value4, object5[key3], (namespace ? `${namespace}.` : "") + key3.toString(), merger);
|
322284
322959
|
} else {
|
322285
|
-
object5[
|
322960
|
+
object5[key3] = value4;
|
322286
322961
|
}
|
322287
322962
|
}
|
322288
322963
|
return object5;
|
@@ -322291,15 +322966,15 @@ function createDefu(merger) {
|
|
322291
322966
|
return (...arguments_4) => arguments_4.reduce((p5, c3) => _defu(p5, c3, "", merger), {});
|
322292
322967
|
}
|
322293
322968
|
var defu = createDefu();
|
322294
|
-
var defuFn = createDefu((object5,
|
322295
|
-
if (object5[
|
322296
|
-
object5[
|
322969
|
+
var defuFn = createDefu((object5, key3, currentValue) => {
|
322970
|
+
if (object5[key3] !== undefined && typeof currentValue === "function") {
|
322971
|
+
object5[key3] = currentValue(object5[key3]);
|
322297
322972
|
return true;
|
322298
322973
|
}
|
322299
322974
|
});
|
322300
|
-
var defuArrayFn = createDefu((object5,
|
322301
|
-
if (Array.isArray(object5[
|
322302
|
-
object5[
|
322975
|
+
var defuArrayFn = createDefu((object5, key3, currentValue) => {
|
322976
|
+
if (Array.isArray(object5[key3]) && typeof currentValue === "function") {
|
322977
|
+
object5[key3] = currentValue(object5[key3]);
|
322303
322978
|
return true;
|
322304
322979
|
}
|
322305
322980
|
});
|
@@ -325509,11 +326184,11 @@ function cacheDirectory() {
|
|
325509
326184
|
}
|
325510
326185
|
function normalizeHeaders(headers = {}) {
|
325511
326186
|
const normalized = {};
|
325512
|
-
for (const [
|
326187
|
+
for (const [key3, value4] of Object.entries(headers)) {
|
325513
326188
|
if (!value4) {
|
325514
326189
|
continue;
|
325515
326190
|
}
|
325516
|
-
normalized[
|
326191
|
+
normalized[key3.toLowerCase()] = value4;
|
325517
326192
|
}
|
325518
326193
|
return normalized;
|
325519
326194
|
}
|
@@ -326039,7 +326714,7 @@ async function personalAccessTokenPrompt(env2, instance, accept) {
|
|
326039
326714
|
try {
|
326040
326715
|
validate2(PersonalAccessTokenSchema2, value4);
|
326041
326716
|
return true;
|
326042
|
-
} catch (
|
326717
|
+
} catch (_error) {
|
326043
326718
|
return "Invalid personal access token, it should start with sm_pat_...";
|
326044
326719
|
}
|
326045
326720
|
}
|
@@ -326120,7 +326795,7 @@ function loginCommand() {
|
|
326120
326795
|
});
|
326121
326796
|
try {
|
326122
326797
|
await loginSpinner(client);
|
326123
|
-
} catch (
|
326798
|
+
} catch (_error) {
|
326124
326799
|
cancel2(`Invalid personal access token for instance ${selectedInstance}`);
|
326125
326800
|
}
|
326126
326801
|
await storeCredentials(personalAccessToken, selectedInstance);
|
@@ -326270,13 +326945,17 @@ function addClusterServiceArgs(cmd2) {
|
|
326270
326945
|
// src/commands/platform/utils/wait-for-completion.ts
|
326271
326946
|
class TimeoutError2 extends Error {
|
326272
326947
|
}
|
326948
|
+
|
326949
|
+
class DeploymentFailedError extends Error {
|
326950
|
+
}
|
326273
326951
|
async function waitForCompletion({
|
326274
326952
|
settlemint,
|
326275
326953
|
type: type4,
|
326276
326954
|
uniqueName,
|
326277
326955
|
action,
|
326278
326956
|
maxTimeout = 10 * 60 * 1000,
|
326279
|
-
restartIfTimeout = false
|
326957
|
+
restartIfTimeout = false,
|
326958
|
+
restartOnError = false
|
326280
326959
|
}) {
|
326281
326960
|
const serviceType = SETTLEMINT_CLIENT_MAP[type4];
|
326282
326961
|
if (serviceType === "workspace" || serviceType === "application" || serviceType === "foundry" || serviceType === "applicationAccessToken" || serviceType === "platform" || serviceType === "wallet") {
|
@@ -326286,6 +326965,7 @@ async function waitForCompletion({
|
|
326286
326965
|
if (!service || !("read" in service)) {
|
326287
326966
|
throw new Error(`Service ${serviceType} does not support status checking`);
|
326288
326967
|
}
|
326968
|
+
let hasRestarted = false;
|
326289
326969
|
function showSpinner() {
|
326290
326970
|
return spinner({
|
326291
326971
|
startMessage: `Waiting for ${type4} to be ${getActionLabel(action)}`,
|
@@ -326295,33 +326975,20 @@ async function waitForCompletion({
|
|
326295
326975
|
while (true) {
|
326296
326976
|
try {
|
326297
326977
|
const resource = await service.read(uniqueName);
|
326298
|
-
if (resource.status === "COMPLETED") {
|
326299
|
-
if (spinner2) {
|
326300
|
-
spinner2.text = `${capitalizeFirstLetter2(type4)} is ${getActionLabel(action)}`;
|
326301
|
-
} else {
|
326302
|
-
note(`${capitalizeFirstLetter2(type4)} is ${getActionLabel(action)}`);
|
326303
|
-
}
|
326304
|
-
return true;
|
326305
|
-
}
|
326306
326978
|
if (resource.status === "FAILED") {
|
326307
|
-
|
326308
|
-
|
326309
|
-
|
326310
|
-
note(`${capitalizeFirstLetter2(type4)} failed to ${getActionLabel(action)}`);
|
326979
|
+
updateStatus(spinner2, `${capitalizeFirstLetter2(type4)} failed to ${getActionLabel(action)}`);
|
326980
|
+
if (restartOnError) {
|
326981
|
+
throw new DeploymentFailedError;
|
326311
326982
|
}
|
326312
326983
|
return false;
|
326313
326984
|
}
|
326314
|
-
if (
|
326315
|
-
spinner2
|
326316
|
-
|
326317
|
-
note(`${capitalizeFirstLetter2(type4)} is not ready yet (status: ${resource.status})`);
|
326318
|
-
}
|
326319
|
-
} catch (error45) {
|
326320
|
-
if (spinner2) {
|
326321
|
-
spinner2.text = `${capitalizeFirstLetter2(type4)} is not ready yet (status: UNKNOWN)`;
|
326322
|
-
} else {
|
326323
|
-
note(`${capitalizeFirstLetter2(type4)} is not ready yet (status: UNKNOWN)`);
|
326985
|
+
if (isActionComplete(action, resource.status)) {
|
326986
|
+
updateStatus(spinner2, `${capitalizeFirstLetter2(type4)} is ${getActionLabel(action)}`);
|
326987
|
+
return true;
|
326324
326988
|
}
|
326989
|
+
updateStatus(spinner2, `${capitalizeFirstLetter2(type4)} is not ready yet (status: ${resource.status})`);
|
326990
|
+
} catch (_error) {
|
326991
|
+
updateStatus(spinner2, `${capitalizeFirstLetter2(type4)} is not ready yet (status: UNKNOWN)`);
|
326325
326992
|
}
|
326326
326993
|
if (Date.now() - startTime > maxTimeout) {
|
326327
326994
|
throw new TimeoutError2(`Operation timed out after ${maxTimeout / 60000} minutes for ${type4} with unique name ${uniqueName}`);
|
@@ -326334,23 +327001,59 @@ async function waitForCompletion({
|
|
326334
327001
|
try {
|
326335
327002
|
return await showSpinner();
|
326336
327003
|
} catch (error45) {
|
326337
|
-
|
326338
|
-
if (restartIfTimeout && isTimeoutError) {
|
327004
|
+
if (!hasRestarted && shouldRestart(error45, restartIfTimeout)) {
|
326339
327005
|
note(`Restarting ${capitalizeFirstLetter2(type4)}`);
|
327006
|
+
hasRestarted = true;
|
326340
327007
|
await service.restart(uniqueName);
|
326341
327008
|
return showSpinner();
|
326342
327009
|
}
|
326343
327010
|
throw error45;
|
326344
327011
|
}
|
326345
327012
|
}
|
326346
|
-
function
|
326347
|
-
|
326348
|
-
|
327013
|
+
function shouldRestart(error45, restartIfTimeout) {
|
327014
|
+
const isSpinnerError = error45 instanceof SpinnerError;
|
327015
|
+
const isDeploymentFailedError = error45 instanceof DeploymentFailedError || isSpinnerError && error45.originalError instanceof DeploymentFailedError;
|
327016
|
+
if (isDeploymentFailedError) {
|
327017
|
+
return true;
|
326349
327018
|
}
|
326350
|
-
|
326351
|
-
|
327019
|
+
const isTimeoutError = error45 instanceof TimeoutError2 || isSpinnerError && error45.originalError instanceof TimeoutError2;
|
327020
|
+
return restartIfTimeout && isTimeoutError;
|
327021
|
+
}
|
327022
|
+
function updateStatus(spinner2, message) {
|
327023
|
+
if (spinner2) {
|
327024
|
+
spinner2.text = message;
|
327025
|
+
} else {
|
327026
|
+
note(message);
|
327027
|
+
}
|
327028
|
+
}
|
327029
|
+
function isActionComplete(action, status) {
|
327030
|
+
switch (action) {
|
327031
|
+
case "pause":
|
327032
|
+
return status === "PAUSED" || status === "AUTO_PAUSED";
|
327033
|
+
case "resume":
|
327034
|
+
case "deploy":
|
327035
|
+
case "destroy":
|
327036
|
+
case "restart":
|
327037
|
+
return status === "COMPLETED";
|
327038
|
+
default:
|
327039
|
+
return false;
|
327040
|
+
}
|
327041
|
+
}
|
327042
|
+
function getActionLabel(action) {
|
327043
|
+
switch (action) {
|
327044
|
+
case "restart":
|
327045
|
+
return "restarted";
|
327046
|
+
case "destroy":
|
327047
|
+
return "destroyed";
|
327048
|
+
case "pause":
|
327049
|
+
return "paused";
|
327050
|
+
case "resume":
|
327051
|
+
return "resumed";
|
327052
|
+
case "deploy":
|
327053
|
+
return "deployed";
|
327054
|
+
default:
|
327055
|
+
return "deployed";
|
326352
327056
|
}
|
326353
|
-
return "deployed";
|
326354
327057
|
}
|
326355
327058
|
|
326356
327059
|
// src/prompts/provider.prompt.ts
|
@@ -326431,9 +327134,9 @@ function getCreateCommand({
|
|
326431
327134
|
cmd2.alias(alias);
|
326432
327135
|
}
|
326433
327136
|
if (requiresDeployment) {
|
326434
|
-
cmd2.option("-w, --wait", "Wait until deployed").option("
|
327137
|
+
cmd2.option("-w, --wait", "Wait until deployed").option("--restart-if-timeout", "Restart if wait time is exceeded").option("--restart-on-error", "Restart if deployment fails");
|
326435
327138
|
}
|
326436
|
-
execute2(cmd2, async ({ acceptDefaults, prod, default: isDefault, wait: wait2, restartIfTimeout, provider, region }, createFunction) => {
|
327139
|
+
execute2(cmd2, async ({ acceptDefaults, prod, default: isDefault, wait: wait2, restartIfTimeout, restartOnError, provider, region }, createFunction) => {
|
326437
327140
|
intro(`Creating ${type4} in the SettleMint platform`);
|
326438
327141
|
const env2 = await loadEnv(false, !!prod);
|
326439
327142
|
const instance = await instancePrompt({ env: env2, accept: acceptDefaults });
|
@@ -326447,8 +327150,8 @@ function getCreateCommand({
|
|
326447
327150
|
instance
|
326448
327151
|
});
|
326449
327152
|
const platformConfig = await settlemint.platform.config();
|
326450
|
-
let selectedProvider
|
326451
|
-
let selectedRegion
|
327153
|
+
let selectedProvider;
|
327154
|
+
let selectedRegion;
|
326452
327155
|
if (cmd2.options.some((option) => option.long === "--provider")) {
|
326453
327156
|
selectedProvider = await providerPrompt(platformConfig, provider);
|
326454
327157
|
if (!selectedProvider) {
|
@@ -326477,7 +327180,8 @@ function getCreateCommand({
|
|
326477
327180
|
type: waitFor?.resourceType ?? type4,
|
326478
327181
|
uniqueName: waitFor?.uniqueName ?? result.uniqueName,
|
326479
327182
|
action: "deploy",
|
326480
|
-
restartIfTimeout
|
327183
|
+
restartIfTimeout,
|
327184
|
+
restartOnError
|
326481
327185
|
});
|
326482
327186
|
if (!isDeployed) {
|
326483
327187
|
throw new Error(`Failed to deploy ${waitFor?.resourceType ?? type4} ${waitFor?.uniqueName ?? result.uniqueName}`);
|
@@ -327659,7 +328363,7 @@ function privateKeyHsmCreateCommand() {
|
|
327659
328363
|
return baseAction({
|
327660
328364
|
...defaultArgs,
|
327661
328365
|
acceptDefaults
|
327662
|
-
}, async ({ settlemint, env: env2, showSpinner, provider, region }) => {
|
328366
|
+
}, async ({ settlemint, env: env2, showSpinner, provider: _provider, region: _region }) => {
|
327663
328367
|
const applicationUniqueName = application ?? env2.SETTLEMINT_APPLICATION;
|
327664
328368
|
if (!applicationUniqueName) {
|
327665
328369
|
return missingApplication();
|
@@ -327948,25 +328652,256 @@ function deleteCommand() {
|
|
327948
328652
|
return new Command("delete").alias("d").description("Delete a resource in the SettleMint platform").addCommand(applicationDeleteCommand()).addCommand(workspaceDeleteCommand());
|
327949
328653
|
}
|
327950
328654
|
|
328655
|
+
// src/commands/platform/common/pause-command.ts
|
328656
|
+
function getPauseCommand({
|
328657
|
+
name: name3,
|
328658
|
+
type: type4,
|
328659
|
+
alias,
|
328660
|
+
envKey,
|
328661
|
+
pauseFunction,
|
328662
|
+
usePersonalAccessToken = true
|
328663
|
+
}) {
|
328664
|
+
const commandName = sanitizeCommandName(name3);
|
328665
|
+
const typeCommandName = sanitizeCommandName(type4);
|
328666
|
+
const exampleCommandPrefix = `platform pause ${typeCommandName !== commandName ? `${typeCommandName} ` : ""}${commandName}`;
|
328667
|
+
return new Command(commandName).alias(alias).description(`Pause a ${type4} in the SettleMint platform. Provide the ${type4} unique name or use 'default' to pause the default ${type4} from your .env file.`).usage(createExamples([
|
328668
|
+
{
|
328669
|
+
description: `Pauses the specified ${type4} by unique name`,
|
328670
|
+
command: `${exampleCommandPrefix} <unique-name>`
|
328671
|
+
},
|
328672
|
+
{
|
328673
|
+
description: `Pauses the default ${type4} in the production environment`,
|
328674
|
+
command: `${exampleCommandPrefix} default --prod`
|
328675
|
+
}
|
328676
|
+
])).argument("<unique-name>", `The unique name of the ${type4}, use 'default' to pause the default one from your .env file`).option("-a, --accept-defaults", "Accept the default and previously set values").option("--prod", "Connect to your production environment").option("-w, --wait", "Wait until paused").action(async (uniqueName, { acceptDefaults, prod, wait: wait2 }) => {
|
328677
|
+
intro(`Pausing ${type4} in the SettleMint platform`);
|
328678
|
+
const env2 = await loadEnv(false, !!prod);
|
328679
|
+
const instance = await instancePrompt({ env: env2, accept: acceptDefaults });
|
328680
|
+
const accessToken = await getApplicationOrPersonalAccessToken({
|
328681
|
+
env: env2,
|
328682
|
+
instance,
|
328683
|
+
prefer: usePersonalAccessToken ? "personal" : "application"
|
328684
|
+
});
|
328685
|
+
const settlemint = createSettleMintClient({
|
328686
|
+
accessToken,
|
328687
|
+
instance
|
328688
|
+
});
|
328689
|
+
const isDefaultUniqueName = uniqueName === "default";
|
328690
|
+
const serviceUniqueName = isDefaultUniqueName ? typeof env2[envKey] === "string" ? env2[envKey] : null : uniqueName;
|
328691
|
+
if (!serviceUniqueName) {
|
328692
|
+
cancel2(`No default ${type4} found in your .env file. Please provide a valid ${type4} unique name or set a default ${type4} first.`);
|
328693
|
+
}
|
328694
|
+
const result = await spinner({
|
328695
|
+
startMessage: `Pausing ${type4}`,
|
328696
|
+
task: async () => {
|
328697
|
+
return pauseFunction(settlemint, serviceUniqueName);
|
328698
|
+
},
|
328699
|
+
stopMessage: `${capitalizeFirstLetter2(type4)} pause initiated`
|
328700
|
+
});
|
328701
|
+
if (wait2) {
|
328702
|
+
const isPaused = await waitForCompletion({
|
328703
|
+
settlemint,
|
328704
|
+
type: type4,
|
328705
|
+
uniqueName: serviceUniqueName,
|
328706
|
+
action: "pause"
|
328707
|
+
});
|
328708
|
+
if (!isPaused) {
|
328709
|
+
throw new Error(`Failed to pause ${type4} ${serviceUniqueName}`);
|
328710
|
+
}
|
328711
|
+
}
|
328712
|
+
outro(`${capitalizeFirstLetter2(type4)} ${result.name} pause initiated successfully`);
|
328713
|
+
});
|
328714
|
+
}
|
328715
|
+
|
328716
|
+
// src/commands/platform/blockchain-network/pause.ts
|
328717
|
+
function blockchainNetworkPauseCommand() {
|
328718
|
+
return getPauseCommand({
|
328719
|
+
name: "blockchain-network",
|
328720
|
+
type: "blockchain network",
|
328721
|
+
alias: "bnw",
|
328722
|
+
envKey: "SETTLEMINT_BLOCKCHAIN_NETWORK",
|
328723
|
+
pauseFunction: async (settlemint, id) => {
|
328724
|
+
return settlemint.blockchainNetwork.pause(id);
|
328725
|
+
}
|
328726
|
+
});
|
328727
|
+
}
|
328728
|
+
|
328729
|
+
// src/commands/platform/blockchain-node/pause.ts
|
328730
|
+
function blockchainNodePauseCommand() {
|
328731
|
+
return getPauseCommand({
|
328732
|
+
name: "blockchain-node",
|
328733
|
+
type: "blockchain node",
|
328734
|
+
alias: "bn",
|
328735
|
+
envKey: "SETTLEMINT_BLOCKCHAIN_NODE",
|
328736
|
+
pauseFunction: async (settlemint, id) => {
|
328737
|
+
return settlemint.blockchainNode.pause(id);
|
328738
|
+
}
|
328739
|
+
});
|
328740
|
+
}
|
328741
|
+
|
328742
|
+
// src/commands/platform/custom-deployments/pause.ts
|
328743
|
+
function customDeploymentPauseCommand() {
|
328744
|
+
return getPauseCommand({
|
328745
|
+
name: "custom-deployment",
|
328746
|
+
type: "custom deployment",
|
328747
|
+
alias: "cd",
|
328748
|
+
envKey: "SETTLEMINT_CUSTOM_DEPLOYMENT",
|
328749
|
+
pauseFunction: async (settlemint, id) => {
|
328750
|
+
return settlemint.customDeployment.pause(id);
|
328751
|
+
}
|
328752
|
+
});
|
328753
|
+
}
|
328754
|
+
|
328755
|
+
// src/commands/platform/insights/blockscout/pause.ts
|
328756
|
+
function blockscoutPauseCommand() {
|
328757
|
+
return getPauseCommand({
|
328758
|
+
name: "blockscout",
|
328759
|
+
type: "insights",
|
328760
|
+
alias: "bs",
|
328761
|
+
envKey: "SETTLEMINT_BLOCKSCOUT",
|
328762
|
+
pauseFunction: async (settlemint, id) => {
|
328763
|
+
return settlemint.insights.pause(id);
|
328764
|
+
}
|
328765
|
+
});
|
328766
|
+
}
|
328767
|
+
|
328768
|
+
// src/commands/platform/insights/pause.ts
|
328769
|
+
function insightsPauseCommand() {
|
328770
|
+
return new Command("insights").alias("in").description("Pause an insights service in the SettleMint platform").addCommand(blockscoutPauseCommand());
|
328771
|
+
}
|
328772
|
+
|
328773
|
+
// src/commands/platform/integration-tools/hasura/pause.ts
|
328774
|
+
function hasuraPauseCommand() {
|
328775
|
+
return getPauseCommand({
|
328776
|
+
name: "hasura",
|
328777
|
+
type: "integration tool",
|
328778
|
+
alias: "ha",
|
328779
|
+
envKey: "SETTLEMINT_HASURA",
|
328780
|
+
pauseFunction: async (settlemint, id) => {
|
328781
|
+
return settlemint.integrationTool.pause(id);
|
328782
|
+
}
|
328783
|
+
});
|
328784
|
+
}
|
328785
|
+
|
328786
|
+
// src/commands/platform/integration-tools/pause.ts
|
328787
|
+
function integrationToolPauseCommand() {
|
328788
|
+
return new Command("integration-tool").alias("it").description("Pause an integration tool service in the SettleMint platform").addCommand(hasuraPauseCommand());
|
328789
|
+
}
|
328790
|
+
|
328791
|
+
// src/commands/platform/load-balancer/pause.ts
|
328792
|
+
function loadBalancerPauseCommand() {
|
328793
|
+
return getPauseCommand({
|
328794
|
+
name: "evm",
|
328795
|
+
type: "load balancer",
|
328796
|
+
alias: "lb",
|
328797
|
+
envKey: "SETTLEMINT_BLOCKCHAIN_NODE_OR_LOAD_BALANCER",
|
328798
|
+
pauseFunction: async (settlemint, id) => {
|
328799
|
+
return settlemint.loadBalancer.pause(id);
|
328800
|
+
}
|
328801
|
+
});
|
328802
|
+
}
|
328803
|
+
|
328804
|
+
// src/commands/platform/middleware/graph/pause.ts
|
328805
|
+
function graphMiddlewarePauseCommand() {
|
328806
|
+
return getPauseCommand({
|
328807
|
+
name: "graph",
|
328808
|
+
type: "middleware",
|
328809
|
+
alias: "gr",
|
328810
|
+
envKey: "SETTLEMINT_THEGRAPH",
|
328811
|
+
pauseFunction: async (settlemint, id) => {
|
328812
|
+
return settlemint.middleware.pause(id);
|
328813
|
+
}
|
328814
|
+
});
|
328815
|
+
}
|
328816
|
+
|
328817
|
+
// src/commands/platform/middleware/smart-contract-portal/pause.ts
|
328818
|
+
function smartContractPortalMiddlewarePauseCommand() {
|
328819
|
+
return getPauseCommand({
|
328820
|
+
name: "smart-contract-portal",
|
328821
|
+
type: "middleware",
|
328822
|
+
alias: "scp",
|
328823
|
+
envKey: "SETTLEMINT_PORTAL",
|
328824
|
+
pauseFunction: async (settlemint, id) => {
|
328825
|
+
return settlemint.middleware.pause(id);
|
328826
|
+
}
|
328827
|
+
});
|
328828
|
+
}
|
328829
|
+
|
328830
|
+
// src/commands/platform/middleware/pause.ts
|
328831
|
+
function middlewarePauseCommand() {
|
328832
|
+
return new Command("middleware").alias("mw").description("Pause a middleware service in the SettleMint platform").addCommand(graphMiddlewarePauseCommand()).addCommand(smartContractPortalMiddlewarePauseCommand());
|
328833
|
+
}
|
328834
|
+
|
328835
|
+
// src/commands/platform/private-key/pause.ts
|
328836
|
+
function privateKeyPauseCommand() {
|
328837
|
+
return getPauseCommand({
|
328838
|
+
name: "private-key",
|
328839
|
+
type: "private key",
|
328840
|
+
alias: "pk",
|
328841
|
+
envKey: "SETTLEMINT_ACCESSIBLE_PRIVATE_KEY",
|
328842
|
+
pauseFunction: async (settlemint, id) => {
|
328843
|
+
return settlemint.privateKey.pause(id);
|
328844
|
+
}
|
328845
|
+
});
|
328846
|
+
}
|
328847
|
+
|
328848
|
+
// src/commands/platform/storage/ipfs/pause.ts
|
328849
|
+
function ipfsStoragePauseCommand() {
|
328850
|
+
return getPauseCommand({
|
328851
|
+
name: "ipfs",
|
328852
|
+
type: "storage",
|
328853
|
+
alias: "ip",
|
328854
|
+
envKey: "SETTLEMINT_IPFS",
|
328855
|
+
pauseFunction: async (settlemint, id) => {
|
328856
|
+
return settlemint.storage.pause(id);
|
328857
|
+
}
|
328858
|
+
});
|
328859
|
+
}
|
328860
|
+
|
328861
|
+
// src/commands/platform/storage/minio/pause.ts
|
328862
|
+
function minioStoragePauseCommand() {
|
328863
|
+
return getPauseCommand({
|
328864
|
+
name: "minio",
|
328865
|
+
type: "storage",
|
328866
|
+
alias: "m",
|
328867
|
+
envKey: "SETTLEMINT_MINIO",
|
328868
|
+
pauseFunction: async (settlemint, id) => {
|
328869
|
+
return settlemint.storage.pause(id);
|
328870
|
+
}
|
328871
|
+
});
|
328872
|
+
}
|
328873
|
+
|
328874
|
+
// src/commands/platform/storage/pause.ts
|
328875
|
+
function storagePauseCommand() {
|
328876
|
+
return new Command("storage").alias("st").description("Pause a storage service in the SettleMint platform").addCommand(ipfsStoragePauseCommand()).addCommand(minioStoragePauseCommand());
|
328877
|
+
}
|
328878
|
+
|
328879
|
+
// src/commands/platform/pause.ts
|
328880
|
+
function pauseCommand() {
|
328881
|
+
const cmd2 = new Command("pause").description("Pause a resource in the SettleMint platform").addCommand(blockchainNodePauseCommand()).addCommand(blockchainNetworkPauseCommand()).addCommand(customDeploymentPauseCommand()).addCommand(insightsPauseCommand()).addCommand(integrationToolPauseCommand()).addCommand(loadBalancerPauseCommand()).addCommand(middlewarePauseCommand()).addCommand(privateKeyPauseCommand()).addCommand(storagePauseCommand());
|
328882
|
+
return cmd2;
|
328883
|
+
}
|
328884
|
+
|
327951
328885
|
// src/commands/platform/common/restart-command.ts
|
327952
328886
|
function getRestartCommand({
|
327953
328887
|
name: name3,
|
327954
328888
|
type: type4,
|
327955
|
-
subType,
|
327956
328889
|
alias,
|
327957
328890
|
envKey,
|
327958
328891
|
restartFunction,
|
327959
328892
|
usePersonalAccessToken = true
|
327960
328893
|
}) {
|
327961
328894
|
const commandName = sanitizeCommandName(name3);
|
328895
|
+
const typeCommandName = sanitizeCommandName(type4);
|
328896
|
+
const exampleCommandPrefix = `platform restart ${typeCommandName !== commandName ? `${typeCommandName} ` : ""}${commandName}`;
|
327962
328897
|
return new Command(commandName).alias(alias).description(`Restart a ${type4} in the SettleMint platform. Provide the ${type4} unique name or use 'default' to restart the default ${type4} from your .env file.`).usage(createExamples([
|
327963
328898
|
{
|
327964
|
-
description: `Restarts the specified ${type4} by
|
327965
|
-
command:
|
328899
|
+
description: `Restarts the specified ${type4} by unique name`,
|
328900
|
+
command: `${exampleCommandPrefix} <unique-name>`
|
327966
328901
|
},
|
327967
328902
|
{
|
327968
328903
|
description: `Restarts the default ${type4} in the production environment`,
|
327969
|
-
command:
|
328904
|
+
command: `${exampleCommandPrefix} default --prod`
|
327970
328905
|
}
|
327971
328906
|
])).argument("<unique-name>", `The unique name of the ${type4}, use 'default' to restart the default one from your .env file`).option("-a, --accept-defaults", "Accept the default and previously set values").option("--prod", "Connect to your production environment").option("-w, --wait", "Wait until restarted").action(async (uniqueName, { acceptDefaults, prod, wait: wait2 }) => {
|
327972
328907
|
intro(`Restarting ${type4} in the SettleMint platform`);
|
@@ -328053,7 +328988,6 @@ function blockscoutRestartCommand() {
|
|
328053
328988
|
return getRestartCommand({
|
328054
328989
|
name: "blockscout",
|
328055
328990
|
type: "insights",
|
328056
|
-
subType: "blockscout",
|
328057
328991
|
alias: "bs",
|
328058
328992
|
envKey: "SETTLEMINT_BLOCKSCOUT",
|
328059
328993
|
restartFunction: async (settlemint, uniqueName) => {
|
@@ -328072,7 +329006,6 @@ function hasuraRestartCommand() {
|
|
328072
329006
|
return getRestartCommand({
|
328073
329007
|
name: "hasura",
|
328074
329008
|
type: "integration tool",
|
328075
|
-
subType: "hasura",
|
328076
329009
|
alias: "ha",
|
328077
329010
|
envKey: "SETTLEMINT_HASURA",
|
328078
329011
|
restartFunction: async (settlemint, uniqueName) => {
|
@@ -328104,7 +329037,6 @@ function graphRestartCommand() {
|
|
328104
329037
|
return getRestartCommand({
|
328105
329038
|
name: "graph",
|
328106
329039
|
type: "middleware",
|
328107
|
-
subType: "graph",
|
328108
329040
|
alias: "gr",
|
328109
329041
|
envKey: "SETTLEMINT_THEGRAPH",
|
328110
329042
|
restartFunction: async (settlemint, id) => {
|
@@ -328118,7 +329050,6 @@ function smartContractPortalRestartCommand() {
|
|
328118
329050
|
return getRestartCommand({
|
328119
329051
|
name: "smart-contract-portal",
|
328120
329052
|
type: "middleware",
|
328121
|
-
subType: "smart-contract-portal",
|
328122
329053
|
alias: "scp",
|
328123
329054
|
envKey: "SETTLEMINT_PORTAL",
|
328124
329055
|
restartFunction: async (settlemint, uniqueName) => {
|
@@ -328169,6 +329100,236 @@ function restartCommand() {
|
|
328169
329100
|
return cmd2;
|
328170
329101
|
}
|
328171
329102
|
|
329103
|
+
// src/commands/platform/common/resume-command.ts
|
329104
|
+
function getResumeCommand({
|
329105
|
+
name: name3,
|
329106
|
+
type: type4,
|
329107
|
+
alias,
|
329108
|
+
envKey,
|
329109
|
+
resumeFunction,
|
329110
|
+
usePersonalAccessToken = true
|
329111
|
+
}) {
|
329112
|
+
const commandName = sanitizeCommandName(name3);
|
329113
|
+
const typeCommandName = sanitizeCommandName(type4);
|
329114
|
+
const exampleCommandPrefix = `platform resume ${typeCommandName !== commandName ? `${typeCommandName} ` : ""}${commandName}`;
|
329115
|
+
return new Command(commandName).alias(alias).description(`Resume a ${type4} in the SettleMint platform. Provide the ${type4} unique name or use 'default' to resume the default ${type4} from your .env file.`).usage(createExamples([
|
329116
|
+
{
|
329117
|
+
description: `Resumes the specified ${type4} by unique name`,
|
329118
|
+
command: `${exampleCommandPrefix} <unique-name>`
|
329119
|
+
},
|
329120
|
+
{
|
329121
|
+
description: `Resumes the default ${type4} in the production environment`,
|
329122
|
+
command: `${exampleCommandPrefix} default --prod`
|
329123
|
+
}
|
329124
|
+
])).argument("<unique-name>", `The unique name of the ${type4}, use 'default' to resume the default one from your .env file`).option("-a, --accept-defaults", "Accept the default and previously set values").option("--prod", "Connect to your production environment").option("-w, --wait", "Wait until resumed").action(async (uniqueName, { acceptDefaults, prod, wait: wait2 }) => {
|
329125
|
+
intro(`Resuming ${type4} in the SettleMint platform`);
|
329126
|
+
const env2 = await loadEnv(false, !!prod);
|
329127
|
+
const instance = await instancePrompt({ env: env2, accept: acceptDefaults });
|
329128
|
+
const accessToken = await getApplicationOrPersonalAccessToken({
|
329129
|
+
env: env2,
|
329130
|
+
instance,
|
329131
|
+
prefer: usePersonalAccessToken ? "personal" : "application"
|
329132
|
+
});
|
329133
|
+
const settlemint = createSettleMintClient({
|
329134
|
+
accessToken,
|
329135
|
+
instance
|
329136
|
+
});
|
329137
|
+
const isDefaultUniqueName = uniqueName === "default";
|
329138
|
+
const serviceUniqueName = isDefaultUniqueName ? typeof env2[envKey] === "string" ? env2[envKey] : null : uniqueName;
|
329139
|
+
if (!serviceUniqueName) {
|
329140
|
+
cancel2(`No default ${type4} found in your .env file. Please provide a valid ${type4} unique name or set a default ${type4} first.`);
|
329141
|
+
}
|
329142
|
+
const result = await spinner({
|
329143
|
+
startMessage: `Resuming ${type4}`,
|
329144
|
+
task: async () => {
|
329145
|
+
return resumeFunction(settlemint, serviceUniqueName);
|
329146
|
+
},
|
329147
|
+
stopMessage: `${capitalizeFirstLetter2(type4)} resume initiated`
|
329148
|
+
});
|
329149
|
+
if (wait2) {
|
329150
|
+
const isResumed = await waitForCompletion({
|
329151
|
+
settlemint,
|
329152
|
+
type: type4,
|
329153
|
+
uniqueName: serviceUniqueName,
|
329154
|
+
action: "resume"
|
329155
|
+
});
|
329156
|
+
if (!isResumed) {
|
329157
|
+
throw new Error(`Failed to resume ${type4} ${serviceUniqueName}`);
|
329158
|
+
}
|
329159
|
+
}
|
329160
|
+
outro(`${capitalizeFirstLetter2(type4)} ${result.name} resume initiated successfully`);
|
329161
|
+
});
|
329162
|
+
}
|
329163
|
+
|
329164
|
+
// src/commands/platform/blockchain-network/resume.ts
|
329165
|
+
function blockchainNetworkResumeCommand() {
|
329166
|
+
return getResumeCommand({
|
329167
|
+
name: "blockchain-network",
|
329168
|
+
type: "blockchain network",
|
329169
|
+
alias: "bnw",
|
329170
|
+
envKey: "SETTLEMINT_BLOCKCHAIN_NETWORK",
|
329171
|
+
resumeFunction: async (settlemint, id) => {
|
329172
|
+
return settlemint.blockchainNetwork.resume(id);
|
329173
|
+
}
|
329174
|
+
});
|
329175
|
+
}
|
329176
|
+
|
329177
|
+
// src/commands/platform/blockchain-node/resume.ts
|
329178
|
+
function blockchainNodeResumeCommand() {
|
329179
|
+
return getResumeCommand({
|
329180
|
+
name: "blockchain-node",
|
329181
|
+
type: "blockchain node",
|
329182
|
+
alias: "bn",
|
329183
|
+
envKey: "SETTLEMINT_BLOCKCHAIN_NODE",
|
329184
|
+
resumeFunction: async (settlemint, id) => {
|
329185
|
+
return settlemint.blockchainNode.resume(id);
|
329186
|
+
}
|
329187
|
+
});
|
329188
|
+
}
|
329189
|
+
|
329190
|
+
// src/commands/platform/custom-deployments/resume.ts
|
329191
|
+
function customDeploymentResumeCommand() {
|
329192
|
+
return getResumeCommand({
|
329193
|
+
name: "custom-deployment",
|
329194
|
+
type: "custom deployment",
|
329195
|
+
alias: "cd",
|
329196
|
+
envKey: "SETTLEMINT_CUSTOM_DEPLOYMENT",
|
329197
|
+
resumeFunction: async (settlemint, id) => {
|
329198
|
+
return settlemint.customDeployment.resume(id);
|
329199
|
+
}
|
329200
|
+
});
|
329201
|
+
}
|
329202
|
+
|
329203
|
+
// src/commands/platform/insights/blockscout/resume.ts
|
329204
|
+
function blockscoutResumeCommand() {
|
329205
|
+
return getResumeCommand({
|
329206
|
+
name: "blockscout",
|
329207
|
+
type: "insights",
|
329208
|
+
alias: "bs",
|
329209
|
+
envKey: "SETTLEMINT_BLOCKSCOUT",
|
329210
|
+
resumeFunction: async (settlemint, id) => {
|
329211
|
+
return settlemint.insights.resume(id);
|
329212
|
+
}
|
329213
|
+
});
|
329214
|
+
}
|
329215
|
+
|
329216
|
+
// src/commands/platform/insights/resume.ts
|
329217
|
+
function insightsResumeCommand() {
|
329218
|
+
return new Command("insights").alias("in").description("Resume an insights service in the SettleMint platform").addCommand(blockscoutResumeCommand());
|
329219
|
+
}
|
329220
|
+
|
329221
|
+
// src/commands/platform/integration-tools/hasura/resume.ts
|
329222
|
+
function hasuraResumeCommand() {
|
329223
|
+
return getResumeCommand({
|
329224
|
+
name: "hasura",
|
329225
|
+
type: "integration tool",
|
329226
|
+
alias: "ha",
|
329227
|
+
envKey: "SETTLEMINT_HASURA",
|
329228
|
+
resumeFunction: async (settlemint, id) => {
|
329229
|
+
return settlemint.integrationTool.resume(id);
|
329230
|
+
}
|
329231
|
+
});
|
329232
|
+
}
|
329233
|
+
|
329234
|
+
// src/commands/platform/integration-tools/resume.ts
|
329235
|
+
function integrationToolResumeCommand() {
|
329236
|
+
return new Command("integration-tool").alias("it").description("Resume an integration tool service in the SettleMint platform").addCommand(hasuraResumeCommand());
|
329237
|
+
}
|
329238
|
+
|
329239
|
+
// src/commands/platform/load-balancer/resume.ts
|
329240
|
+
function loadBalancerResumeCommand() {
|
329241
|
+
return getResumeCommand({
|
329242
|
+
name: "load-balancer",
|
329243
|
+
type: "load balancer",
|
329244
|
+
alias: "lb",
|
329245
|
+
envKey: "SETTLEMINT_BLOCKCHAIN_NODE_OR_LOAD_BALANCER",
|
329246
|
+
resumeFunction: async (settlemint, id) => {
|
329247
|
+
return settlemint.loadBalancer.resume(id);
|
329248
|
+
}
|
329249
|
+
});
|
329250
|
+
}
|
329251
|
+
|
329252
|
+
// src/commands/platform/middleware/graph/resume.ts
|
329253
|
+
function graphMiddlewareResumeCommand() {
|
329254
|
+
return getResumeCommand({
|
329255
|
+
name: "graph",
|
329256
|
+
type: "middleware",
|
329257
|
+
alias: "gr",
|
329258
|
+
envKey: "SETTLEMINT_THEGRAPH",
|
329259
|
+
resumeFunction: async (settlemint, id) => {
|
329260
|
+
return settlemint.middleware.resume(id);
|
329261
|
+
}
|
329262
|
+
});
|
329263
|
+
}
|
329264
|
+
|
329265
|
+
// src/commands/platform/middleware/smart-contract-portal/resume.ts
|
329266
|
+
function smartContractPortalMiddlewareResumeCommand() {
|
329267
|
+
return getResumeCommand({
|
329268
|
+
name: "smart-contract-portal",
|
329269
|
+
type: "middleware",
|
329270
|
+
alias: "scp",
|
329271
|
+
envKey: "SETTLEMINT_PORTAL",
|
329272
|
+
resumeFunction: async (settlemint, id) => {
|
329273
|
+
return settlemint.middleware.resume(id);
|
329274
|
+
}
|
329275
|
+
});
|
329276
|
+
}
|
329277
|
+
|
329278
|
+
// src/commands/platform/middleware/resume.ts
|
329279
|
+
function middlewareResumeCommand() {
|
329280
|
+
return new Command("middleware").alias("mw").description("Resume a middleware service in the SettleMint platform").addCommand(graphMiddlewareResumeCommand()).addCommand(smartContractPortalMiddlewareResumeCommand());
|
329281
|
+
}
|
329282
|
+
|
329283
|
+
// src/commands/platform/private-key/resume.ts
|
329284
|
+
function privateKeyResumeCommand() {
|
329285
|
+
return getResumeCommand({
|
329286
|
+
name: "private-key",
|
329287
|
+
type: "private key",
|
329288
|
+
alias: "pk",
|
329289
|
+
envKey: "SETTLEMINT_ACCESSIBLE_PRIVATE_KEY",
|
329290
|
+
resumeFunction: async (settlemint, id) => {
|
329291
|
+
return settlemint.privateKey.resume(id);
|
329292
|
+
}
|
329293
|
+
});
|
329294
|
+
}
|
329295
|
+
|
329296
|
+
// src/commands/platform/storage/ipfs/resume.ts
|
329297
|
+
function ipfsStorageResumeCommand() {
|
329298
|
+
return getResumeCommand({
|
329299
|
+
name: "ipfs",
|
329300
|
+
type: "storage",
|
329301
|
+
alias: "ip",
|
329302
|
+
envKey: "SETTLEMINT_IPFS",
|
329303
|
+
resumeFunction: async (settlemint, id) => {
|
329304
|
+
return settlemint.storage.resume(id);
|
329305
|
+
}
|
329306
|
+
});
|
329307
|
+
}
|
329308
|
+
|
329309
|
+
// src/commands/platform/storage/minio/resume.ts
|
329310
|
+
function minioStorageResumeCommand() {
|
329311
|
+
return getResumeCommand({
|
329312
|
+
name: "minio",
|
329313
|
+
type: "storage",
|
329314
|
+
alias: "m",
|
329315
|
+
envKey: "SETTLEMINT_MINIO",
|
329316
|
+
resumeFunction: async (settlemint, id) => {
|
329317
|
+
return settlemint.storage.resume(id);
|
329318
|
+
}
|
329319
|
+
});
|
329320
|
+
}
|
329321
|
+
|
329322
|
+
// src/commands/platform/storage/resume.ts
|
329323
|
+
function storageResumeCommand() {
|
329324
|
+
return new Command("storage").alias("st").description("Resume a storage service in the SettleMint platform").addCommand(ipfsStorageResumeCommand()).addCommand(minioStorageResumeCommand());
|
329325
|
+
}
|
329326
|
+
|
329327
|
+
// src/commands/platform/resume.ts
|
329328
|
+
function resumeCommand() {
|
329329
|
+
const cmd2 = new Command("resume").description("Resume a resource in the SettleMint platform").addCommand(blockchainNodeResumeCommand()).addCommand(blockchainNetworkResumeCommand()).addCommand(customDeploymentResumeCommand()).addCommand(insightsResumeCommand()).addCommand(integrationToolResumeCommand()).addCommand(loadBalancerResumeCommand()).addCommand(middlewareResumeCommand()).addCommand(privateKeyResumeCommand()).addCommand(storageResumeCommand());
|
329330
|
+
return cmd2;
|
329331
|
+
}
|
329332
|
+
|
328172
329333
|
// src/commands/platform/custom-deployments/update.ts
|
328173
329334
|
function customDeploymentsUpdateCommand() {
|
328174
329335
|
return new Command("custom-deployment").alias("cd").argument("<tag>", "The tag to update the custom deployment to").option("--unique-name <uniqueName>", "The unique name of the custom deployment to update. If not provided, will use SETTLEMINT_CUSTOM_DEPLOYMENT from env").option("--prod", "Connect to your production environment").option("--wait", "Wait for the custom deployment to be redeployed").description("Update a custom deployment in the SettleMint platform").usage(createExamples([
|
@@ -328233,7 +329394,7 @@ function jsonOutput(data) {
|
|
328233
329394
|
var composer = require_composer();
|
328234
329395
|
var Document = require_Document();
|
328235
329396
|
var Schema = require_Schema();
|
328236
|
-
var
|
329397
|
+
var errors5 = require_errors3();
|
328237
329398
|
var Alias = require_Alias();
|
328238
329399
|
var identity2 = require_identity();
|
328239
329400
|
var Pair = require_Pair();
|
@@ -328249,9 +329410,9 @@ var visit2 = require_visit();
|
|
328249
329410
|
var $Composer = composer.Composer;
|
328250
329411
|
var $Document = Document.Document;
|
328251
329412
|
var $Schema = Schema.Schema;
|
328252
|
-
var $YAMLError =
|
328253
|
-
var $YAMLParseError =
|
328254
|
-
var $YAMLWarning =
|
329413
|
+
var $YAMLError = errors5.YAMLError;
|
329414
|
+
var $YAMLParseError = errors5.YAMLParseError;
|
329415
|
+
var $YAMLWarning = errors5.YAMLWarning;
|
328255
329416
|
var $Alias = Alias.Alias;
|
328256
329417
|
var $isAlias = identity2.isAlias;
|
328257
329418
|
var $isCollection = identity2.isCollection;
|
@@ -328559,7 +329720,7 @@ function servicesCommand() {
|
|
328559
329720
|
if (!applicationUniqueName) {
|
328560
329721
|
return nothingSelectedError("application");
|
328561
329722
|
}
|
328562
|
-
let effectiveTypes
|
329723
|
+
let effectiveTypes;
|
328563
329724
|
if (options.type && options.type.length > 0) {
|
328564
329725
|
effectiveTypes = options.type;
|
328565
329726
|
} else if (typeOperands && typeOperands.length > 0) {
|
@@ -328617,7 +329778,7 @@ async function getServicesAndMapResults({
|
|
328617
329778
|
const application = await settlemint.application.read(applicationUniqueName);
|
328618
329779
|
const services = await servicesSpinner(settlemint, applicationUniqueName, types4);
|
328619
329780
|
const results = (types4 ?? SERVICE_TYPES).filter((serviceType) => !types4 || types4.includes(serviceType)).map((serviceType) => {
|
328620
|
-
const [_6, labels] = Object.entries(LABELS_MAP).find(([
|
329781
|
+
const [_6, labels] = Object.entries(LABELS_MAP).find(([_key, value4]) => value4.command === serviceType) ?? [
|
328621
329782
|
null,
|
328622
329783
|
{ plural: serviceType }
|
328623
329784
|
];
|
@@ -328744,7 +329905,7 @@ function listCommand() {
|
|
328744
329905
|
|
328745
329906
|
// src/commands/platform.ts
|
328746
329907
|
function platformCommand() {
|
328747
|
-
return new Command("platform").description("Manage SettleMint platform resources").addCommand(configCommand()).addCommand(createCommand3()).addCommand(deleteCommand()).addCommand(listCommand()).addCommand(restartCommand()).addCommand(updateCommand());
|
329908
|
+
return new Command("platform").description("Manage SettleMint platform resources").addCommand(configCommand()).addCommand(createCommand3()).addCommand(deleteCommand()).addCommand(listCommand()).addCommand(pauseCommand()).addCommand(resumeCommand()).addCommand(restartCommand()).addCommand(updateCommand());
|
328748
329909
|
}
|
328749
329910
|
|
328750
329911
|
// src/commands/smart-contract-set/create.ts
|
@@ -328794,7 +329955,7 @@ var import_which = __toESM(require_lib5(), 1);
|
|
328794
329955
|
async function executeFoundryCommand(command, args) {
|
328795
329956
|
try {
|
328796
329957
|
await import_which.default(command);
|
328797
|
-
} catch (
|
329958
|
+
} catch (_error) {
|
328798
329959
|
cancel2("Foundry is not installed. Instructions to install Foundry can be found here: https://book.getfoundry.sh/getting-started/installation");
|
328799
329960
|
}
|
328800
329961
|
return executeCommand(command, args);
|
@@ -328858,11 +330019,11 @@ function createCommand4() {
|
|
328858
330019
|
|
328859
330020
|
// src/utils/commands/passthrough-options.ts
|
328860
330021
|
function mapPassthroughOptions(options, command) {
|
328861
|
-
const optionArgs = Object.entries(options).map(([
|
330022
|
+
const optionArgs = Object.entries(options).map(([key3, value4]) => {
|
328862
330023
|
if (value4 === true) {
|
328863
|
-
return `--${
|
330024
|
+
return `--${key3}`;
|
328864
330025
|
}
|
328865
|
-
return `--${
|
330026
|
+
return `--${key3}=${value4}`;
|
328866
330027
|
});
|
328867
330028
|
return [...optionArgs, ...command.args];
|
328868
330029
|
}
|
@@ -328882,7 +330043,7 @@ function foundryBuildCommand() {
|
|
328882
330043
|
description: "Build the smart contracts with additional Forge options",
|
328883
330044
|
command: "scs foundry build --optimize --force"
|
328884
330045
|
}
|
328885
|
-
])).helpOption(false).option("-h, --help", "Get list of possible forge options").passThroughOptions().allowUnknownOption(true).arguments("[operands...]").action(async (operands, options,
|
330046
|
+
])).helpOption(false).option("-h, --help", "Get list of possible forge options").passThroughOptions().allowUnknownOption(true).arguments("[operands...]").action(async (operands, options, _cmd) => {
|
328886
330047
|
intro("Building smart contracts using Foundry");
|
328887
330048
|
const forgeOptions = mapPassthroughOptions(options, { args: operands });
|
328888
330049
|
await executeFoundryCommand("forge", ["build", ...forgeOptions]);
|
@@ -328905,7 +330066,7 @@ function foundryFormatCommand() {
|
|
328905
330066
|
description: "Format the smart contracts with additional Forge options",
|
328906
330067
|
command: "scs foundry format --check"
|
328907
330068
|
}
|
328908
|
-
])).helpOption(false).option("-h, --help", "Get list of possible forge options").passThroughOptions().allowUnknownOption(true).arguments("[operands...]").action(async (operands, options,
|
330069
|
+
])).helpOption(false).option("-h, --help", "Get list of possible forge options").passThroughOptions().allowUnknownOption(true).arguments("[operands...]").action(async (operands, options, _cmd) => {
|
328909
330070
|
intro("Formatting smart contracts using Foundry");
|
328910
330071
|
const forgeOptions = mapPassthroughOptions(options, { args: operands });
|
328911
330072
|
await executeFoundryCommand("forge", ["fmt", ...forgeOptions]);
|
@@ -328928,7 +330089,7 @@ function foundryNetworkCommand() {
|
|
328928
330089
|
description: "Start a development network using Foundry with a specific port",
|
328929
330090
|
command: "scs foundry network --port 3000"
|
328930
330091
|
}
|
328931
|
-
])).helpOption(false).option("-h, --help", "Get list of possible anvil options").passThroughOptions().allowUnknownOption(true).arguments("[operands...]").action(async (operands, options,
|
330092
|
+
])).helpOption(false).option("-h, --help", "Get list of possible anvil options").passThroughOptions().allowUnknownOption(true).arguments("[operands...]").action(async (operands, options, _cmd) => {
|
328932
330093
|
const anvilOptions = mapPassthroughOptions(options, { args: operands });
|
328933
330094
|
await executeFoundryCommand("anvil", anvilOptions);
|
328934
330095
|
});
|
@@ -328949,7 +330110,7 @@ function foundryTestCommand() {
|
|
328949
330110
|
description: "Run a specific test function",
|
328950
330111
|
command: "scs foundry test --match-test testToken"
|
328951
330112
|
}
|
328952
|
-
])).helpOption(false).option("-h, --help", "Get list of possible forge options").passThroughOptions().allowUnknownOption(true).arguments("[operands...]").action(async (operands, options,
|
330113
|
+
])).helpOption(false).option("-h, --help", "Get list of possible forge options").passThroughOptions().allowUnknownOption(true).arguments("[operands...]").action(async (operands, options, _cmd) => {
|
328953
330114
|
intro("Running smart contract tests using Foundry");
|
328954
330115
|
const forgeOptions = mapPassthroughOptions(options, { args: operands });
|
328955
330116
|
await executeFoundryCommand("forge", ["test", ...forgeOptions]);
|
@@ -328963,7 +330124,7 @@ var validateIfRequiredPackagesAreInstalled = async (packages, cwd2) => {
|
|
328963
330124
|
try {
|
328964
330125
|
const isInstalled = await isPackageInstalled(pkg, cwd2);
|
328965
330126
|
return { packageName: pkg, isInstalled };
|
328966
|
-
} catch (
|
330127
|
+
} catch (_err) {
|
328967
330128
|
return { packageName: pkg, isInstalled: false };
|
328968
330129
|
}
|
328969
330130
|
}));
|
@@ -328988,7 +330149,7 @@ function hardhatBuildCommand() {
|
|
328988
330149
|
description: "Build the smart contracts using additional options to the Hardhat compile command",
|
328989
330150
|
command: "scs hardhat build --concurrency 2"
|
328990
330151
|
}
|
328991
|
-
])).helpOption(false).option("-h, --help", "Get list of possible hardhat compile options").passThroughOptions().allowUnknownOption(true).arguments("[operands...]").action(async (operands, options,
|
330152
|
+
])).helpOption(false).option("-h, --help", "Get list of possible hardhat compile options").passThroughOptions().allowUnknownOption(true).arguments("[operands...]").action(async (operands, options, _cmd) => {
|
328992
330153
|
intro("Building smart contracts using Hardhat");
|
328993
330154
|
await validateIfRequiredPackagesAreInstalled(["hardhat"]);
|
328994
330155
|
const hardhatOptions = mapPassthroughOptions(options, { args: operands });
|
@@ -329059,7 +330220,7 @@ async function selectTargetNode({
|
|
329059
330220
|
settlemint
|
329060
330221
|
}) {
|
329061
330222
|
const nodeUniqueName = blockchainNodeUniqueName ?? (autoAccept ? env2.SETTLEMINT_BLOCKCHAIN_NODE : undefined);
|
329062
|
-
let node
|
330223
|
+
let node;
|
329063
330224
|
if (!nodeUniqueName) {
|
329064
330225
|
if (!env2.SETTLEMINT_APPLICATION) {
|
329065
330226
|
return missingApplication();
|
@@ -329283,7 +330444,7 @@ function hardhatDeployRemoteCommand() {
|
|
329283
330444
|
} else {
|
329284
330445
|
note("Smart contract deployment was cancelled");
|
329285
330446
|
}
|
329286
|
-
} catch (
|
330447
|
+
} catch (_error) {
|
329287
330448
|
cancel2("The smart contract deployment was unsuccessful. Please check the error details above and try again. You may need to review your contract code or deployment configuration.");
|
329288
330449
|
}
|
329289
330450
|
});
|
@@ -329313,7 +330474,7 @@ function hardhatNetworkCommand() {
|
|
329313
330474
|
description: "Start a development network using Hardhat with a specific port",
|
329314
330475
|
command: "scs hardhat network --port 3000"
|
329315
330476
|
}
|
329316
|
-
])).helpOption(false).option("-h, --help", "Get list of possible hardhat node options").passThroughOptions().allowUnknownOption(true).arguments("[operands...]").action(async (operands, options,
|
330477
|
+
])).helpOption(false).option("-h, --help", "Get list of possible hardhat node options").passThroughOptions().allowUnknownOption(true).arguments("[operands...]").action(async (operands, options, _cmd) => {
|
329317
330478
|
intro("Starting development network using Hardhat");
|
329318
330479
|
await validateIfRequiredPackagesAreInstalled(["hardhat"]);
|
329319
330480
|
const hardhatOptions = mapPassthroughOptions(options, { args: operands });
|
@@ -329422,7 +330583,7 @@ function hardhatTestCommand() {
|
|
329422
330583
|
description: "Run a specific test file",
|
329423
330584
|
command: "scs hardhat test test/token.test.ts"
|
329424
330585
|
}
|
329425
|
-
])).helpOption(false).option("-h, --help", "Get list of possible hardhat test options").passThroughOptions().allowUnknownOption(true).arguments("[operands...]").action(async (operands, options,
|
330586
|
+
])).helpOption(false).option("-h, --help", "Get list of possible hardhat test options").passThroughOptions().allowUnknownOption(true).arguments("[operands...]").action(async (operands, options, _cmd) => {
|
329426
330587
|
intro("Running smart contract tests using Hardhat");
|
329427
330588
|
await validateIfRequiredPackagesAreInstalled(["hardhat"]);
|
329428
330589
|
const hardhatOptions = mapPassthroughOptions(options, { args: operands });
|
@@ -329680,12 +330841,12 @@ async function getNodeName({
|
|
329680
330841
|
|
329681
330842
|
// src/commands/smart-contract-set/subgraph/build.ts
|
329682
330843
|
function subgraphBuildCommand() {
|
329683
|
-
return new Command("build").description("Build the subgraph").usage(createExamples([
|
330844
|
+
return new Command("build").description("Build the subgraph").option("--ipfs <ipfs-url>", "The IPFS URL to use for the subgraph deployment").usage(createExamples([
|
329684
330845
|
{
|
329685
330846
|
description: "Build the subgraph",
|
329686
330847
|
command: "scs subgraph build"
|
329687
330848
|
}
|
329688
|
-
])).action(async () => {
|
330849
|
+
])).action(async ({ ipfs }) => {
|
329689
330850
|
intro("Building subgraph");
|
329690
330851
|
await validateIfRequiredPackagesAreInstalled(["@graphprotocol/graph-cli"]);
|
329691
330852
|
await subgraphSetup({
|
@@ -329694,7 +330855,7 @@ function subgraphBuildCommand() {
|
|
329694
330855
|
const { command, args } = await getPackageManagerExecutable();
|
329695
330856
|
const subgraphYamlFile = await getSubgraphYamlFile();
|
329696
330857
|
await executeCommand(command, [...args, "graph", "codegen", subgraphYamlFile]);
|
329697
|
-
await executeCommand(command, [...args, "graph", "build", subgraphYamlFile]);
|
330858
|
+
await executeCommand(command, [...args, "graph", "build", ...ipfs ? ["--ipfs", ipfs] : [], subgraphYamlFile]);
|
329698
330859
|
outro("Subgraph built successfully");
|
329699
330860
|
});
|
329700
330861
|
}
|
@@ -330090,4 +331251,4 @@ async function sdkCliCommand(argv = process.argv) {
|
|
330090
331251
|
// src/cli.ts
|
330091
331252
|
sdkCliCommand();
|
330092
331253
|
|
330093
|
-
//# debugId=
|
331254
|
+
//# debugId=63FD8345028F5B1564756E2164756E21
|