@settlemint/sdk-cli 2.4.0-prec526eee → 2.4.0-prf3423261
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 +2189 -565
- package/dist/cli.js.map +114 -52
- package/package.json +12 -10
package/dist/cli.js
CHANGED
@@ -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_(key4, node, visitor, path7) {
|
239301
|
+
const ctrl = callVisitor(key4, node, visitor, path7);
|
239302
239302
|
if (identity2.isNode(ctrl) || identity2.isPair(ctrl)) {
|
239303
|
-
replaceNode(
|
239304
|
-
return visit_(
|
239303
|
+
replaceNode(key4, path7, ctrl);
|
239304
|
+
return visit_(key4, ctrl, visitor, path7);
|
239305
239305
|
}
|
239306
239306
|
if (typeof ctrl !== "symbol") {
|
239307
239307
|
if (identity2.isCollection(node)) {
|
@@ -239345,11 +239345,11 @@ var require_visit = __commonJS((exports) => {
|
|
239345
239345
|
visitAsync.BREAK = BREAK;
|
239346
239346
|
visitAsync.SKIP = SKIP;
|
239347
239347
|
visitAsync.REMOVE = REMOVE;
|
239348
|
-
async function visitAsync_(
|
239349
|
-
const ctrl = await callVisitor(
|
239348
|
+
async function visitAsync_(key4, node, visitor, path7) {
|
239349
|
+
const ctrl = await callVisitor(key4, node, visitor, path7);
|
239350
239350
|
if (identity2.isNode(ctrl) || identity2.isPair(ctrl)) {
|
239351
|
-
replaceNode(
|
239352
|
-
return visitAsync_(
|
239351
|
+
replaceNode(key4, path7, ctrl);
|
239352
|
+
return visitAsync_(key4, ctrl, visitor, path7);
|
239353
239353
|
}
|
239354
239354
|
if (typeof ctrl !== "symbol") {
|
239355
239355
|
if (identity2.isCollection(node)) {
|
@@ -239399,27 +239399,27 @@ var require_visit = __commonJS((exports) => {
|
|
239399
239399
|
}
|
239400
239400
|
return visitor;
|
239401
239401
|
}
|
239402
|
-
function callVisitor(
|
239402
|
+
function callVisitor(key4, node, visitor, path7) {
|
239403
239403
|
if (typeof visitor === "function")
|
239404
|
-
return visitor(
|
239404
|
+
return visitor(key4, node, path7);
|
239405
239405
|
if (identity2.isMap(node))
|
239406
|
-
return visitor.Map?.(
|
239406
|
+
return visitor.Map?.(key4, node, path7);
|
239407
239407
|
if (identity2.isSeq(node))
|
239408
|
-
return visitor.Seq?.(
|
239408
|
+
return visitor.Seq?.(key4, node, path7);
|
239409
239409
|
if (identity2.isPair(node))
|
239410
|
-
return visitor.Pair?.(
|
239410
|
+
return visitor.Pair?.(key4, node, path7);
|
239411
239411
|
if (identity2.isScalar(node))
|
239412
|
-
return visitor.Scalar?.(
|
239412
|
+
return visitor.Scalar?.(key4, node, path7);
|
239413
239413
|
if (identity2.isAlias(node))
|
239414
|
-
return visitor.Alias?.(
|
239414
|
+
return visitor.Alias?.(key4, node, path7);
|
239415
239415
|
return;
|
239416
239416
|
}
|
239417
|
-
function replaceNode(
|
239417
|
+
function replaceNode(key4, path7, node) {
|
239418
239418
|
const parent = path7[path7.length - 1];
|
239419
239419
|
if (identity2.isCollection(parent)) {
|
239420
|
-
parent.items[
|
239420
|
+
parent.items[key4] = node;
|
239421
239421
|
} else if (identity2.isPair(parent)) {
|
239422
|
-
if (
|
239422
|
+
if (key4 === "key")
|
239423
239423
|
parent.key = node;
|
239424
239424
|
else
|
239425
239425
|
parent.value = node;
|
@@ -239650,7 +239650,7 @@ var require_anchors = __commonJS((exports) => {
|
|
239650
239650
|
|
239651
239651
|
// ../../node_modules/yaml/dist/doc/applyReviver.js
|
239652
239652
|
var require_applyReviver = __commonJS((exports) => {
|
239653
|
-
function applyReviver(reviver, obj,
|
239653
|
+
function applyReviver(reviver, obj, key4, val) {
|
239654
239654
|
if (val && typeof val === "object") {
|
239655
239655
|
if (Array.isArray(val)) {
|
239656
239656
|
for (let i7 = 0, len = val.length;i7 < len; ++i7) {
|
@@ -239690,7 +239690,7 @@ var require_applyReviver = __commonJS((exports) => {
|
|
239690
239690
|
}
|
239691
239691
|
}
|
239692
239692
|
}
|
239693
|
-
return reviver.call(obj,
|
239693
|
+
return reviver.call(obj, key4, val);
|
239694
239694
|
}
|
239695
239695
|
exports.applyReviver = applyReviver;
|
239696
239696
|
});
|
@@ -240019,29 +240019,29 @@ var require_Collection = __commonJS((exports) => {
|
|
240019
240019
|
if (isEmptyPath(path7))
|
240020
240020
|
this.add(value4);
|
240021
240021
|
else {
|
240022
|
-
const [
|
240023
|
-
const node = this.get(
|
240022
|
+
const [key4, ...rest] = path7;
|
240023
|
+
const node = this.get(key4, true);
|
240024
240024
|
if (identity2.isCollection(node))
|
240025
240025
|
node.addIn(rest, value4);
|
240026
240026
|
else if (node === undefined && this.schema)
|
240027
|
-
this.set(
|
240027
|
+
this.set(key4, collectionFromPath(this.schema, rest, value4));
|
240028
240028
|
else
|
240029
|
-
throw new Error(`Expected YAML collection at ${
|
240029
|
+
throw new Error(`Expected YAML collection at ${key4}. Remaining path: ${rest}`);
|
240030
240030
|
}
|
240031
240031
|
}
|
240032
240032
|
deleteIn(path7) {
|
240033
|
-
const [
|
240033
|
+
const [key4, ...rest] = path7;
|
240034
240034
|
if (rest.length === 0)
|
240035
|
-
return this.delete(
|
240036
|
-
const node = this.get(
|
240035
|
+
return this.delete(key4);
|
240036
|
+
const node = this.get(key4, true);
|
240037
240037
|
if (identity2.isCollection(node))
|
240038
240038
|
return node.deleteIn(rest);
|
240039
240039
|
else
|
240040
|
-
throw new Error(`Expected YAML collection at ${
|
240040
|
+
throw new Error(`Expected YAML collection at ${key4}. Remaining path: ${rest}`);
|
240041
240041
|
}
|
240042
240042
|
getIn(path7, keepScalar) {
|
240043
|
-
const [
|
240044
|
-
const node = this.get(
|
240043
|
+
const [key4, ...rest] = path7;
|
240044
|
+
const node = this.get(key4, true);
|
240045
240045
|
if (rest.length === 0)
|
240046
240046
|
return !keepScalar && identity2.isScalar(node) ? node.value : node;
|
240047
240047
|
else
|
@@ -240056,24 +240056,24 @@ var require_Collection = __commonJS((exports) => {
|
|
240056
240056
|
});
|
240057
240057
|
}
|
240058
240058
|
hasIn(path7) {
|
240059
|
-
const [
|
240059
|
+
const [key4, ...rest] = path7;
|
240060
240060
|
if (rest.length === 0)
|
240061
|
-
return this.has(
|
240062
|
-
const node = this.get(
|
240061
|
+
return this.has(key4);
|
240062
|
+
const node = this.get(key4, true);
|
240063
240063
|
return identity2.isCollection(node) ? node.hasIn(rest) : false;
|
240064
240064
|
}
|
240065
240065
|
setIn(path7, value4) {
|
240066
|
-
const [
|
240066
|
+
const [key4, ...rest] = path7;
|
240067
240067
|
if (rest.length === 0) {
|
240068
|
-
this.set(
|
240068
|
+
this.set(key4, value4);
|
240069
240069
|
} else {
|
240070
|
-
const node = this.get(
|
240070
|
+
const node = this.get(key4, true);
|
240071
240071
|
if (identity2.isCollection(node))
|
240072
240072
|
node.setIn(rest, value4);
|
240073
240073
|
else if (node === undefined && this.schema)
|
240074
|
-
this.set(
|
240074
|
+
this.set(key4, collectionFromPath(this.schema, rest, value4));
|
240075
240075
|
else
|
240076
|
-
throw new Error(`Expected YAML collection at ${
|
240076
|
+
throw new Error(`Expected YAML collection at ${key4}. Remaining path: ${rest}`);
|
240077
240077
|
}
|
240078
240078
|
}
|
240079
240079
|
}
|
@@ -240660,19 +240660,19 @@ var require_stringifyPair = __commonJS((exports) => {
|
|
240660
240660
|
var Scalar = require_Scalar();
|
240661
240661
|
var stringify5 = require_stringify();
|
240662
240662
|
var stringifyComment = require_stringifyComment();
|
240663
|
-
function stringifyPair2({ key:
|
240663
|
+
function stringifyPair2({ key: key4, value: value4 }, ctx, onComment, onChompKeep) {
|
240664
240664
|
const { allNullValues, doc: doc2, indent: indent2, indentStep, options: { commentString, indentSeq, simpleKeys } } = ctx;
|
240665
|
-
let keyComment = identity2.isNode(
|
240665
|
+
let keyComment = identity2.isNode(key4) && key4.comment || null;
|
240666
240666
|
if (simpleKeys) {
|
240667
240667
|
if (keyComment) {
|
240668
240668
|
throw new Error("With simple keys, key nodes cannot have comments");
|
240669
240669
|
}
|
240670
|
-
if (identity2.isCollection(
|
240670
|
+
if (identity2.isCollection(key4) || !identity2.isNode(key4) && typeof key4 === "object") {
|
240671
240671
|
const msg = "With simple keys, collection cannot be used as a key value";
|
240672
240672
|
throw new Error(msg);
|
240673
240673
|
}
|
240674
240674
|
}
|
240675
|
-
let explicitKey = !simpleKeys && (!
|
240675
|
+
let explicitKey = !simpleKeys && (!key4 || keyComment && value4 == null && !ctx.inFlow || identity2.isCollection(key4) || (identity2.isScalar(key4) ? key4.type === Scalar.Scalar.BLOCK_FOLDED || key4.type === Scalar.Scalar.BLOCK_LITERAL : typeof key4 === "object"));
|
240676
240676
|
ctx = Object.assign({}, ctx, {
|
240677
240677
|
allNullValues: false,
|
240678
240678
|
implicitKey: !explicitKey && (simpleKeys || !allNullValues),
|
@@ -240680,7 +240680,7 @@ var require_stringifyPair = __commonJS((exports) => {
|
|
240680
240680
|
});
|
240681
240681
|
let keyCommentDone = false;
|
240682
240682
|
let chompKeep = false;
|
240683
|
-
let str = stringify5.stringify(
|
240683
|
+
let str = stringify5.stringify(key4, ctx, () => keyCommentDone = true, () => chompKeep = true);
|
240684
240684
|
if (!explicitKey && !ctx.inFlow && str.length > 1024) {
|
240685
240685
|
if (simpleKeys)
|
240686
240686
|
throw new Error("With simple keys, single line scalar must not span more than 1024 characters");
|
@@ -240824,7 +240824,7 @@ var require_merge = __commonJS((exports) => {
|
|
240824
240824
|
}),
|
240825
240825
|
stringify: () => MERGE_KEY
|
240826
240826
|
};
|
240827
|
-
var isMergeKey = (ctx,
|
240827
|
+
var isMergeKey = (ctx, key4) => (merge7.identify(key4) || identity2.isScalar(key4) && (!key4.type || key4.type === Scalar.Scalar.PLAIN) && merge7.identify(key4.value)) && ctx?.doc.schema.tags.some((tag) => tag.tag === merge7.tag && tag.default);
|
240828
240828
|
function addMergeToJSMap(ctx, map7, value4) {
|
240829
240829
|
value4 = ctx && identity2.isAlias(value4) ? value4.resolve(ctx.doc) : value4;
|
240830
240830
|
if (identity2.isSeq(value4))
|
@@ -240841,14 +240841,14 @@ var require_merge = __commonJS((exports) => {
|
|
240841
240841
|
if (!identity2.isMap(source))
|
240842
240842
|
throw new Error("Merge sources must be maps or map aliases");
|
240843
240843
|
const srcMap = source.toJSON(null, ctx, Map);
|
240844
|
-
for (const [
|
240844
|
+
for (const [key4, value5] of srcMap) {
|
240845
240845
|
if (map7 instanceof Map) {
|
240846
|
-
if (!map7.has(
|
240847
|
-
map7.set(
|
240846
|
+
if (!map7.has(key4))
|
240847
|
+
map7.set(key4, value5);
|
240848
240848
|
} else if (map7 instanceof Set) {
|
240849
|
-
map7.add(
|
240850
|
-
} else if (!Object.prototype.hasOwnProperty.call(map7,
|
240851
|
-
Object.defineProperty(map7,
|
240849
|
+
map7.add(key4);
|
240850
|
+
} else if (!Object.prototype.hasOwnProperty.call(map7, key4)) {
|
240851
|
+
Object.defineProperty(map7, key4, {
|
240852
240852
|
value: value5,
|
240853
240853
|
writable: true,
|
240854
240854
|
enumerable: true,
|
@@ -240870,19 +240870,19 @@ var require_addPairToJSMap = __commonJS((exports) => {
|
|
240870
240870
|
var stringify5 = require_stringify();
|
240871
240871
|
var identity2 = require_identity();
|
240872
240872
|
var toJS = require_toJS();
|
240873
|
-
function addPairToJSMap(ctx, map7, { key:
|
240874
|
-
if (identity2.isNode(
|
240875
|
-
|
240876
|
-
else if (merge7.isMergeKey(ctx,
|
240873
|
+
function addPairToJSMap(ctx, map7, { key: key4, value: value4 }) {
|
240874
|
+
if (identity2.isNode(key4) && key4.addToJSMap)
|
240875
|
+
key4.addToJSMap(ctx, map7, value4);
|
240876
|
+
else if (merge7.isMergeKey(ctx, key4))
|
240877
240877
|
merge7.addMergeToJSMap(ctx, map7, value4);
|
240878
240878
|
else {
|
240879
|
-
const jsKey = toJS.toJS(
|
240879
|
+
const jsKey = toJS.toJS(key4, "", ctx);
|
240880
240880
|
if (map7 instanceof Map) {
|
240881
240881
|
map7.set(jsKey, toJS.toJS(value4, jsKey, ctx));
|
240882
240882
|
} else if (map7 instanceof Set) {
|
240883
240883
|
map7.add(jsKey);
|
240884
240884
|
} else {
|
240885
|
-
const stringKey = stringifyKey(
|
240885
|
+
const stringKey = stringifyKey(key4, jsKey, ctx);
|
240886
240886
|
const jsValue = toJS.toJS(value4, stringKey, ctx);
|
240887
240887
|
if (stringKey in map7)
|
240888
240888
|
Object.defineProperty(map7, stringKey, {
|
@@ -240897,19 +240897,19 @@ var require_addPairToJSMap = __commonJS((exports) => {
|
|
240897
240897
|
}
|
240898
240898
|
return map7;
|
240899
240899
|
}
|
240900
|
-
function stringifyKey(
|
240900
|
+
function stringifyKey(key4, jsKey, ctx) {
|
240901
240901
|
if (jsKey === null)
|
240902
240902
|
return "";
|
240903
240903
|
if (typeof jsKey !== "object")
|
240904
240904
|
return String(jsKey);
|
240905
|
-
if (identity2.isNode(
|
240905
|
+
if (identity2.isNode(key4) && ctx?.doc) {
|
240906
240906
|
const strCtx = stringify5.createStringifyContext(ctx.doc, {});
|
240907
240907
|
strCtx.anchors = new Set;
|
240908
240908
|
for (const node of ctx.anchors.keys())
|
240909
240909
|
strCtx.anchors.add(node.anchor);
|
240910
240910
|
strCtx.inFlow = true;
|
240911
240911
|
strCtx.inStringifyKey = true;
|
240912
|
-
const strKey =
|
240912
|
+
const strKey = key4.toString(strCtx);
|
240913
240913
|
if (!ctx.mapKeyWarned) {
|
240914
240914
|
let jsonStr = JSON.stringify(strKey);
|
240915
240915
|
if (jsonStr.length > 40)
|
@@ -240930,25 +240930,25 @@ var require_Pair = __commonJS((exports) => {
|
|
240930
240930
|
var stringifyPair2 = require_stringifyPair();
|
240931
240931
|
var addPairToJSMap = require_addPairToJSMap();
|
240932
240932
|
var identity2 = require_identity();
|
240933
|
-
function createPair(
|
240934
|
-
const k6 = createNode.createNode(
|
240933
|
+
function createPair(key4, value4, ctx) {
|
240934
|
+
const k6 = createNode.createNode(key4, undefined, ctx);
|
240935
240935
|
const v7 = createNode.createNode(value4, undefined, ctx);
|
240936
240936
|
return new Pair(k6, v7);
|
240937
240937
|
}
|
240938
240938
|
|
240939
240939
|
class Pair {
|
240940
|
-
constructor(
|
240940
|
+
constructor(key4, value4 = null) {
|
240941
240941
|
Object.defineProperty(this, identity2.NODE_TYPE, { value: identity2.PAIR });
|
240942
|
-
this.key =
|
240942
|
+
this.key = key4;
|
240943
240943
|
this.value = value4;
|
240944
240944
|
}
|
240945
240945
|
clone(schema) {
|
240946
|
-
let { key:
|
240947
|
-
if (identity2.isNode(
|
240948
|
-
|
240946
|
+
let { key: key4, value: value4 } = this;
|
240947
|
+
if (identity2.isNode(key4))
|
240948
|
+
key4 = key4.clone(schema);
|
240949
240949
|
if (identity2.isNode(value4))
|
240950
240950
|
value4 = value4.clone(schema);
|
240951
|
-
return new Pair(
|
240951
|
+
return new Pair(key4, value4);
|
240952
240952
|
}
|
240953
240953
|
toJSON(_6, ctx) {
|
240954
240954
|
const pair = ctx?.mapAsMap ? new Map : {};
|
@@ -241115,11 +241115,11 @@ var require_YAMLMap = __commonJS((exports) => {
|
|
241115
241115
|
var identity2 = require_identity();
|
241116
241116
|
var Pair = require_Pair();
|
241117
241117
|
var Scalar = require_Scalar();
|
241118
|
-
function findPair(items,
|
241119
|
-
const k6 = identity2.isScalar(
|
241118
|
+
function findPair(items, key4) {
|
241119
|
+
const k6 = identity2.isScalar(key4) ? key4.value : key4;
|
241120
241120
|
for (const it2 of items) {
|
241121
241121
|
if (identity2.isPair(it2)) {
|
241122
|
-
if (it2.key ===
|
241122
|
+
if (it2.key === key4 || it2.key === k6)
|
241123
241123
|
return it2;
|
241124
241124
|
if (identity2.isScalar(it2.key) && it2.key.value === k6)
|
241125
241125
|
return it2;
|
@@ -241139,20 +241139,20 @@ var require_YAMLMap = __commonJS((exports) => {
|
|
241139
241139
|
static from(schema, obj, ctx) {
|
241140
241140
|
const { keepUndefined, replacer } = ctx;
|
241141
241141
|
const map7 = new this(schema);
|
241142
|
-
const add = (
|
241142
|
+
const add = (key4, value4) => {
|
241143
241143
|
if (typeof replacer === "function")
|
241144
|
-
value4 = replacer.call(obj,
|
241145
|
-
else if (Array.isArray(replacer) && !replacer.includes(
|
241144
|
+
value4 = replacer.call(obj, key4, value4);
|
241145
|
+
else if (Array.isArray(replacer) && !replacer.includes(key4))
|
241146
241146
|
return;
|
241147
241147
|
if (value4 !== undefined || keepUndefined)
|
241148
|
-
map7.items.push(Pair.createPair(
|
241148
|
+
map7.items.push(Pair.createPair(key4, value4, ctx));
|
241149
241149
|
};
|
241150
241150
|
if (obj instanceof Map) {
|
241151
|
-
for (const [
|
241152
|
-
add(
|
241151
|
+
for (const [key4, value4] of obj)
|
241152
|
+
add(key4, value4);
|
241153
241153
|
} else if (obj && typeof obj === "object") {
|
241154
|
-
for (const
|
241155
|
-
add(
|
241154
|
+
for (const key4 of Object.keys(obj))
|
241155
|
+
add(key4, obj[key4]);
|
241156
241156
|
}
|
241157
241157
|
if (typeof schema.sortMapEntries === "function") {
|
241158
241158
|
map7.items.sort(schema.sortMapEntries);
|
@@ -241186,23 +241186,23 @@ var require_YAMLMap = __commonJS((exports) => {
|
|
241186
241186
|
this.items.push(_pair);
|
241187
241187
|
}
|
241188
241188
|
}
|
241189
|
-
delete(
|
241190
|
-
const it2 = findPair(this.items,
|
241189
|
+
delete(key4) {
|
241190
|
+
const it2 = findPair(this.items, key4);
|
241191
241191
|
if (!it2)
|
241192
241192
|
return false;
|
241193
241193
|
const del = this.items.splice(this.items.indexOf(it2), 1);
|
241194
241194
|
return del.length > 0;
|
241195
241195
|
}
|
241196
|
-
get(
|
241197
|
-
const it2 = findPair(this.items,
|
241196
|
+
get(key4, keepScalar) {
|
241197
|
+
const it2 = findPair(this.items, key4);
|
241198
241198
|
const node = it2?.value;
|
241199
241199
|
return (!keepScalar && identity2.isScalar(node) ? node.value : node) ?? undefined;
|
241200
241200
|
}
|
241201
|
-
has(
|
241202
|
-
return !!findPair(this.items,
|
241201
|
+
has(key4) {
|
241202
|
+
return !!findPair(this.items, key4);
|
241203
241203
|
}
|
241204
|
-
set(
|
241205
|
-
this.add(new Pair.Pair(
|
241204
|
+
set(key4, value4) {
|
241205
|
+
this.add(new Pair.Pair(key4, value4), true);
|
241206
241206
|
}
|
241207
241207
|
toJSON(_6, ctx, Type) {
|
241208
241208
|
const map7 = Type ? new Type : ctx?.mapAsMap ? new Map : {};
|
@@ -241273,28 +241273,28 @@ var require_YAMLSeq = __commonJS((exports) => {
|
|
241273
241273
|
add(value4) {
|
241274
241274
|
this.items.push(value4);
|
241275
241275
|
}
|
241276
|
-
delete(
|
241277
|
-
const idx = asItemIndex(
|
241276
|
+
delete(key4) {
|
241277
|
+
const idx = asItemIndex(key4);
|
241278
241278
|
if (typeof idx !== "number")
|
241279
241279
|
return false;
|
241280
241280
|
const del = this.items.splice(idx, 1);
|
241281
241281
|
return del.length > 0;
|
241282
241282
|
}
|
241283
|
-
get(
|
241284
|
-
const idx = asItemIndex(
|
241283
|
+
get(key4, keepScalar) {
|
241284
|
+
const idx = asItemIndex(key4);
|
241285
241285
|
if (typeof idx !== "number")
|
241286
241286
|
return;
|
241287
241287
|
const it2 = this.items[idx];
|
241288
241288
|
return !keepScalar && identity2.isScalar(it2) ? it2.value : it2;
|
241289
241289
|
}
|
241290
|
-
has(
|
241291
|
-
const idx = asItemIndex(
|
241290
|
+
has(key4) {
|
241291
|
+
const idx = asItemIndex(key4);
|
241292
241292
|
return typeof idx === "number" && idx < this.items.length;
|
241293
241293
|
}
|
241294
|
-
set(
|
241295
|
-
const idx = asItemIndex(
|
241294
|
+
set(key4, value4) {
|
241295
|
+
const idx = asItemIndex(key4);
|
241296
241296
|
if (typeof idx !== "number")
|
241297
|
-
throw new Error(`Expected a valid index, not ${
|
241297
|
+
throw new Error(`Expected a valid index, not ${key4}.`);
|
241298
241298
|
const prev = this.items[idx];
|
241299
241299
|
if (identity2.isScalar(prev) && Scalar.isScalarValue(value4))
|
241300
241300
|
prev.value = value4;
|
@@ -241328,8 +241328,8 @@ var require_YAMLSeq = __commonJS((exports) => {
|
|
241328
241328
|
let i7 = 0;
|
241329
241329
|
for (let it2 of obj) {
|
241330
241330
|
if (typeof replacer === "function") {
|
241331
|
-
const
|
241332
|
-
it2 = replacer.call(obj,
|
241331
|
+
const key4 = obj instanceof Set ? it2 : String(i7++);
|
241332
|
+
it2 = replacer.call(obj, key4, it2);
|
241333
241333
|
}
|
241334
241334
|
seq.items.push(createNode.createNode(it2, undefined, ctx));
|
241335
241335
|
}
|
@@ -241337,8 +241337,8 @@ var require_YAMLSeq = __commonJS((exports) => {
|
|
241337
241337
|
return seq;
|
241338
241338
|
}
|
241339
241339
|
}
|
241340
|
-
function asItemIndex(
|
241341
|
-
let idx = identity2.isScalar(
|
241340
|
+
function asItemIndex(key4) {
|
241341
|
+
let idx = identity2.isScalar(key4) ? key4.value : key4;
|
241342
241342
|
if (idx && typeof idx === "string")
|
241343
241343
|
idx = Number(idx);
|
241344
241344
|
return typeof idx === "number" && Number.isInteger(idx) && idx >= 0 ? idx : null;
|
@@ -241711,25 +241711,25 @@ ${cn.comment}` : item.comment;
|
|
241711
241711
|
for (let it2 of iterable) {
|
241712
241712
|
if (typeof replacer === "function")
|
241713
241713
|
it2 = replacer.call(iterable, String(i7++), it2);
|
241714
|
-
let
|
241714
|
+
let key4, value4;
|
241715
241715
|
if (Array.isArray(it2)) {
|
241716
241716
|
if (it2.length === 2) {
|
241717
|
-
|
241717
|
+
key4 = it2[0];
|
241718
241718
|
value4 = it2[1];
|
241719
241719
|
} else
|
241720
241720
|
throw new TypeError(`Expected [key, value] tuple: ${it2}`);
|
241721
241721
|
} else if (it2 && it2 instanceof Object) {
|
241722
241722
|
const keys = Object.keys(it2);
|
241723
241723
|
if (keys.length === 1) {
|
241724
|
-
|
241725
|
-
value4 = it2[
|
241724
|
+
key4 = keys[0];
|
241725
|
+
value4 = it2[key4];
|
241726
241726
|
} else {
|
241727
241727
|
throw new TypeError(`Expected tuple with one key, not ${keys.length} keys`);
|
241728
241728
|
}
|
241729
241729
|
} else {
|
241730
|
-
|
241730
|
+
key4 = it2;
|
241731
241731
|
}
|
241732
|
-
pairs2.items.push(Pair.createPair(
|
241732
|
+
pairs2.items.push(Pair.createPair(key4, value4, ctx));
|
241733
241733
|
}
|
241734
241734
|
return pairs2;
|
241735
241735
|
}
|
@@ -241770,16 +241770,16 @@ var require_omap = __commonJS((exports) => {
|
|
241770
241770
|
if (ctx?.onCreate)
|
241771
241771
|
ctx.onCreate(map7);
|
241772
241772
|
for (const pair of this.items) {
|
241773
|
-
let
|
241773
|
+
let key4, value4;
|
241774
241774
|
if (identity2.isPair(pair)) {
|
241775
|
-
|
241776
|
-
value4 = toJS.toJS(pair.value,
|
241775
|
+
key4 = toJS.toJS(pair.key, "", ctx);
|
241776
|
+
value4 = toJS.toJS(pair.value, key4, ctx);
|
241777
241777
|
} else {
|
241778
|
-
|
241778
|
+
key4 = toJS.toJS(pair, "", ctx);
|
241779
241779
|
}
|
241780
|
-
if (map7.has(
|
241780
|
+
if (map7.has(key4))
|
241781
241781
|
throw new Error("Ordered maps must not include duplicate keys");
|
241782
|
-
map7.set(
|
241782
|
+
map7.set(key4, value4);
|
241783
241783
|
}
|
241784
241784
|
return map7;
|
241785
241785
|
}
|
@@ -241800,12 +241800,12 @@ var require_omap = __commonJS((exports) => {
|
|
241800
241800
|
resolve(seq, onError) {
|
241801
241801
|
const pairs$1 = pairs.resolvePairs(seq, onError);
|
241802
241802
|
const seenKeys = [];
|
241803
|
-
for (const { key:
|
241804
|
-
if (identity2.isScalar(
|
241805
|
-
if (seenKeys.includes(
|
241806
|
-
onError(`Ordered maps must not include duplicate keys: ${
|
241803
|
+
for (const { key: key4 } of pairs$1.items) {
|
241804
|
+
if (identity2.isScalar(key4)) {
|
241805
|
+
if (seenKeys.includes(key4.value)) {
|
241806
|
+
onError(`Ordered maps must not include duplicate keys: ${key4.value}`);
|
241807
241807
|
} else {
|
241808
|
-
seenKeys.push(
|
241808
|
+
seenKeys.push(key4.value);
|
241809
241809
|
}
|
241810
241810
|
}
|
241811
241811
|
}
|
@@ -241979,30 +241979,30 @@ var require_set = __commonJS((exports) => {
|
|
241979
241979
|
super(schema);
|
241980
241980
|
this.tag = YAMLSet.tag;
|
241981
241981
|
}
|
241982
|
-
add(
|
241982
|
+
add(key4) {
|
241983
241983
|
let pair;
|
241984
|
-
if (identity2.isPair(
|
241985
|
-
pair =
|
241986
|
-
else if (
|
241987
|
-
pair = new Pair.Pair(
|
241984
|
+
if (identity2.isPair(key4))
|
241985
|
+
pair = key4;
|
241986
|
+
else if (key4 && typeof key4 === "object" && "key" in key4 && "value" in key4 && key4.value === null)
|
241987
|
+
pair = new Pair.Pair(key4.key, null);
|
241988
241988
|
else
|
241989
|
-
pair = new Pair.Pair(
|
241989
|
+
pair = new Pair.Pair(key4, null);
|
241990
241990
|
const prev = YAMLMap.findPair(this.items, pair.key);
|
241991
241991
|
if (!prev)
|
241992
241992
|
this.items.push(pair);
|
241993
241993
|
}
|
241994
|
-
get(
|
241995
|
-
const pair = YAMLMap.findPair(this.items,
|
241994
|
+
get(key4, keepPair) {
|
241995
|
+
const pair = YAMLMap.findPair(this.items, key4);
|
241996
241996
|
return !keepPair && identity2.isPair(pair) ? identity2.isScalar(pair.key) ? pair.key.value : pair.key : pair;
|
241997
241997
|
}
|
241998
|
-
set(
|
241998
|
+
set(key4, value4) {
|
241999
241999
|
if (typeof value4 !== "boolean")
|
242000
242000
|
throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof value4}`);
|
242001
|
-
const prev = YAMLMap.findPair(this.items,
|
242001
|
+
const prev = YAMLMap.findPair(this.items, key4);
|
242002
242002
|
if (prev && !value4) {
|
242003
242003
|
this.items.splice(this.items.indexOf(prev), 1);
|
242004
242004
|
} else if (!prev && value4) {
|
242005
|
-
this.items.push(new Pair.Pair(
|
242005
|
+
this.items.push(new Pair.Pair(key4));
|
242006
242006
|
}
|
242007
242007
|
}
|
242008
242008
|
toJSON(_6, ctx) {
|
@@ -242237,7 +242237,7 @@ var require_tags = __commonJS((exports) => {
|
|
242237
242237
|
if (Array.isArray(customTags))
|
242238
242238
|
tags = [];
|
242239
242239
|
else {
|
242240
|
-
const keys = Array.from(schemas3.keys()).filter((
|
242240
|
+
const keys = Array.from(schemas3.keys()).filter((key4) => key4 !== "yaml11").map((key4) => JSON.stringify(key4)).join(", ");
|
242241
242241
|
throw new Error(`Unknown schema "${schemaName}"; use one of ${keys} or define customTags array`);
|
242242
242242
|
}
|
242243
242243
|
}
|
@@ -242253,7 +242253,7 @@ var require_tags = __commonJS((exports) => {
|
|
242253
242253
|
const tagObj = typeof tag === "string" ? tagsByName[tag] : tag;
|
242254
242254
|
if (!tagObj) {
|
242255
242255
|
const tagName = JSON.stringify(tag);
|
242256
|
-
const keys = Object.keys(tagsByName).map((
|
242256
|
+
const keys = Object.keys(tagsByName).map((key4) => JSON.stringify(key4)).join(", ");
|
242257
242257
|
throw new Error(`Unknown custom tag ${tagName}; use one of ${keys}`);
|
242258
242258
|
}
|
242259
242259
|
if (!tags2.includes(tagObj))
|
@@ -242488,13 +242488,13 @@ var require_Document = __commonJS((exports) => {
|
|
242488
242488
|
setAnchors();
|
242489
242489
|
return node;
|
242490
242490
|
}
|
242491
|
-
createPair(
|
242492
|
-
const k6 = this.createNode(
|
242491
|
+
createPair(key4, value4, options = {}) {
|
242492
|
+
const k6 = this.createNode(key4, null, options);
|
242493
242493
|
const v7 = this.createNode(value4, null, options);
|
242494
242494
|
return new Pair.Pair(k6, v7);
|
242495
242495
|
}
|
242496
|
-
delete(
|
242497
|
-
return assertCollection(this.contents) ? this.contents.delete(
|
242496
|
+
delete(key4) {
|
242497
|
+
return assertCollection(this.contents) ? this.contents.delete(key4) : false;
|
242498
242498
|
}
|
242499
242499
|
deleteIn(path7) {
|
242500
242500
|
if (Collection.isEmptyPath(path7)) {
|
@@ -242505,27 +242505,27 @@ var require_Document = __commonJS((exports) => {
|
|
242505
242505
|
}
|
242506
242506
|
return assertCollection(this.contents) ? this.contents.deleteIn(path7) : false;
|
242507
242507
|
}
|
242508
|
-
get(
|
242509
|
-
return identity2.isCollection(this.contents) ? this.contents.get(
|
242508
|
+
get(key4, keepScalar) {
|
242509
|
+
return identity2.isCollection(this.contents) ? this.contents.get(key4, keepScalar) : undefined;
|
242510
242510
|
}
|
242511
242511
|
getIn(path7, keepScalar) {
|
242512
242512
|
if (Collection.isEmptyPath(path7))
|
242513
242513
|
return !keepScalar && identity2.isScalar(this.contents) ? this.contents.value : this.contents;
|
242514
242514
|
return identity2.isCollection(this.contents) ? this.contents.getIn(path7, keepScalar) : undefined;
|
242515
242515
|
}
|
242516
|
-
has(
|
242517
|
-
return identity2.isCollection(this.contents) ? this.contents.has(
|
242516
|
+
has(key4) {
|
242517
|
+
return identity2.isCollection(this.contents) ? this.contents.has(key4) : false;
|
242518
242518
|
}
|
242519
242519
|
hasIn(path7) {
|
242520
242520
|
if (Collection.isEmptyPath(path7))
|
242521
242521
|
return this.contents !== undefined;
|
242522
242522
|
return identity2.isCollection(this.contents) ? this.contents.hasIn(path7) : false;
|
242523
242523
|
}
|
242524
|
-
set(
|
242524
|
+
set(key4, value4) {
|
242525
242525
|
if (this.contents == null) {
|
242526
|
-
this.contents = Collection.collectionFromPath(this.schema, [
|
242526
|
+
this.contents = Collection.collectionFromPath(this.schema, [key4], value4);
|
242527
242527
|
} else if (assertCollection(this.contents)) {
|
242528
|
-
this.contents.set(
|
242528
|
+
this.contents.set(key4, value4);
|
242529
242529
|
}
|
242530
242530
|
}
|
242531
242531
|
setIn(path7, value4) {
|
@@ -242807,25 +242807,25 @@ var require_resolve_props = __commonJS((exports) => {
|
|
242807
242807
|
|
242808
242808
|
// ../../node_modules/yaml/dist/compose/util-contains-newline.js
|
242809
242809
|
var require_util_contains_newline = __commonJS((exports) => {
|
242810
|
-
function containsNewline(
|
242811
|
-
if (!
|
242810
|
+
function containsNewline(key4) {
|
242811
|
+
if (!key4)
|
242812
242812
|
return null;
|
242813
|
-
switch (
|
242813
|
+
switch (key4.type) {
|
242814
242814
|
case "alias":
|
242815
242815
|
case "scalar":
|
242816
242816
|
case "double-quoted-scalar":
|
242817
242817
|
case "single-quoted-scalar":
|
242818
|
-
if (
|
242818
|
+
if (key4.source.includes(`
|
242819
242819
|
`))
|
242820
242820
|
return true;
|
242821
|
-
if (
|
242822
|
-
for (const st2 of
|
242821
|
+
if (key4.end) {
|
242822
|
+
for (const st2 of key4.end)
|
242823
242823
|
if (st2.type === "newline")
|
242824
242824
|
return true;
|
242825
242825
|
}
|
242826
242826
|
return false;
|
242827
242827
|
case "flow-collection":
|
242828
|
-
for (const it2 of
|
242828
|
+
for (const it2 of key4.items) {
|
242829
242829
|
for (const st2 of it2.start)
|
242830
242830
|
if (st2.type === "newline")
|
242831
242831
|
return true;
|
@@ -242890,10 +242890,10 @@ var require_resolve_block_map = __commonJS((exports) => {
|
|
242890
242890
|
let offset = bm.offset;
|
242891
242891
|
let commentEnd = null;
|
242892
242892
|
for (const collItem of bm.items) {
|
242893
|
-
const { start: start3, key:
|
242893
|
+
const { start: start3, key: key4, sep: sep5, value: value4 } = collItem;
|
242894
242894
|
const keyProps = resolveProps.resolveProps(start3, {
|
242895
242895
|
indicator: "explicit-key-ind",
|
242896
|
-
next:
|
242896
|
+
next: key4 ?? sep5?.[0],
|
242897
242897
|
offset,
|
242898
242898
|
onError,
|
242899
242899
|
parentIndent: bm.indent,
|
@@ -242901,10 +242901,10 @@ var require_resolve_block_map = __commonJS((exports) => {
|
|
242901
242901
|
});
|
242902
242902
|
const implicitKey = !keyProps.found;
|
242903
242903
|
if (implicitKey) {
|
242904
|
-
if (
|
242905
|
-
if (
|
242904
|
+
if (key4) {
|
242905
|
+
if (key4.type === "block-seq")
|
242906
242906
|
onError(offset, "BLOCK_AS_IMPLICIT_KEY", "A block sequence may not be used as an implicit map key");
|
242907
|
-
else if ("indent" in
|
242907
|
+
else if ("indent" in key4 && key4.indent !== bm.indent)
|
242908
242908
|
onError(offset, "BAD_INDENT", startColMsg);
|
242909
242909
|
}
|
242910
242910
|
if (!keyProps.anchor && !keyProps.tag && !sep5) {
|
@@ -242918,17 +242918,17 @@ var require_resolve_block_map = __commonJS((exports) => {
|
|
242918
242918
|
}
|
242919
242919
|
continue;
|
242920
242920
|
}
|
242921
|
-
if (keyProps.newlineAfterProp || utilContainsNewline.containsNewline(
|
242922
|
-
onError(
|
242921
|
+
if (keyProps.newlineAfterProp || utilContainsNewline.containsNewline(key4)) {
|
242922
|
+
onError(key4 ?? start3[start3.length - 1], "MULTILINE_IMPLICIT_KEY", "Implicit keys need to be on a single line");
|
242923
242923
|
}
|
242924
242924
|
} else if (keyProps.found?.indent !== bm.indent) {
|
242925
242925
|
onError(offset, "BAD_INDENT", startColMsg);
|
242926
242926
|
}
|
242927
242927
|
ctx.atKey = true;
|
242928
242928
|
const keyStart = keyProps.end;
|
242929
|
-
const keyNode =
|
242929
|
+
const keyNode = key4 ? composeNode(ctx, key4, keyProps, onError) : composeEmptyNode(ctx, keyStart, start3, null, keyProps, onError);
|
242930
242930
|
if (ctx.schema.compat)
|
242931
|
-
utilFlowIndentCheck.flowIndentCheck(bm.indent,
|
242931
|
+
utilFlowIndentCheck.flowIndentCheck(bm.indent, key4, onError);
|
242932
242932
|
ctx.atKey = false;
|
242933
242933
|
if (utilMapIncludes.mapIncludes(ctx, map7.items, keyNode))
|
242934
242934
|
onError(keyStart, "DUPLICATE_KEY", "Map keys must be unique");
|
@@ -242938,7 +242938,7 @@ var require_resolve_block_map = __commonJS((exports) => {
|
|
242938
242938
|
offset: keyNode.range[2],
|
242939
242939
|
onError,
|
242940
242940
|
parentIndent: bm.indent,
|
242941
|
-
startOnNewline: !
|
242941
|
+
startOnNewline: !key4 || key4.type === "block-scalar"
|
242942
242942
|
});
|
242943
242943
|
offset = valueProps.end;
|
242944
242944
|
if (valueProps.found) {
|
@@ -243094,11 +243094,11 @@ var require_resolve_flow_collection = __commonJS((exports) => {
|
|
243094
243094
|
let offset = fc.offset + fc.start.source.length;
|
243095
243095
|
for (let i7 = 0;i7 < fc.items.length; ++i7) {
|
243096
243096
|
const collItem = fc.items[i7];
|
243097
|
-
const { start: start3, key:
|
243097
|
+
const { start: start3, key: key4, sep: sep5, value: value4 } = collItem;
|
243098
243098
|
const props = resolveProps.resolveProps(start3, {
|
243099
243099
|
flow: fcName,
|
243100
243100
|
indicator: "explicit-key-ind",
|
243101
|
-
next:
|
243101
|
+
next: key4 ?? sep5?.[0],
|
243102
243102
|
offset,
|
243103
243103
|
onError,
|
243104
243104
|
parentIndent: fc.indent,
|
@@ -243120,8 +243120,8 @@ var require_resolve_flow_collection = __commonJS((exports) => {
|
|
243120
243120
|
offset = props.end;
|
243121
243121
|
continue;
|
243122
243122
|
}
|
243123
|
-
if (!isMap && ctx.options.strict && utilContainsNewline.containsNewline(
|
243124
|
-
onError(
|
243123
|
+
if (!isMap && ctx.options.strict && utilContainsNewline.containsNewline(key4))
|
243124
|
+
onError(key4, "MULTILINE_IMPLICIT_KEY", "Implicit keys of flow sequence pairs need to be on a single line");
|
243125
243125
|
}
|
243126
243126
|
if (i7 === 0) {
|
243127
243127
|
if (props.comma)
|
@@ -243166,8 +243166,8 @@ var require_resolve_flow_collection = __commonJS((exports) => {
|
|
243166
243166
|
} else {
|
243167
243167
|
ctx.atKey = true;
|
243168
243168
|
const keyStart = props.end;
|
243169
|
-
const keyNode =
|
243170
|
-
if (isBlock(
|
243169
|
+
const keyNode = key4 ? composeNode(ctx, key4, props, onError) : composeEmptyNode(ctx, keyStart, start3, null, props, onError);
|
243170
|
+
if (isBlock(key4))
|
243171
243171
|
onError(keyNode.range, "BLOCK_IN_FLOW", blockMsg);
|
243172
243172
|
ctx.atKey = false;
|
243173
243173
|
const valueProps = resolveProps.resolveProps(sep5 ?? [], {
|
@@ -243978,7 +243978,7 @@ var require_composer = __commonJS((exports) => {
|
|
243978
243978
|
var node_process = __require("process");
|
243979
243979
|
var directives4 = require_directives2();
|
243980
243980
|
var Document = require_Document();
|
243981
|
-
var
|
243981
|
+
var errors6 = require_errors3();
|
243982
243982
|
var identity2 = require_identity();
|
243983
243983
|
var composeDoc = require_compose_doc();
|
243984
243984
|
var resolveEnd = require_resolve_end();
|
@@ -244029,9 +244029,9 @@ var require_composer = __commonJS((exports) => {
|
|
244029
244029
|
this.onError = (source, code2, message, warning) => {
|
244030
244030
|
const pos = getErrorPos(source);
|
244031
244031
|
if (warning)
|
244032
|
-
this.warnings.push(new
|
244032
|
+
this.warnings.push(new errors6.YAMLWarning(pos, code2, message));
|
244033
244033
|
else
|
244034
|
-
this.errors.push(new
|
244034
|
+
this.errors.push(new errors6.YAMLParseError(pos, code2, message));
|
244035
244035
|
};
|
244036
244036
|
this.directives = new directives4.Directives({ version: options.version || "1.2" });
|
244037
244037
|
this.options = options;
|
@@ -244115,7 +244115,7 @@ ${cb}` : comment;
|
|
244115
244115
|
break;
|
244116
244116
|
case "error": {
|
244117
244117
|
const msg = token.source ? `${token.message}: ${JSON.stringify(token.source)}` : token.message;
|
244118
|
-
const error45 = new
|
244118
|
+
const error45 = new errors6.YAMLParseError(getErrorPos(token), "UNEXPECTED_TOKEN", msg);
|
244119
244119
|
if (this.atDirectives || !this.doc)
|
244120
244120
|
this.errors.push(error45);
|
244121
244121
|
else
|
@@ -244125,7 +244125,7 @@ ${cb}` : comment;
|
|
244125
244125
|
case "doc-end": {
|
244126
244126
|
if (!this.doc) {
|
244127
244127
|
const msg = "Unexpected doc-end without preceding document";
|
244128
|
-
this.errors.push(new
|
244128
|
+
this.errors.push(new errors6.YAMLParseError(getErrorPos(token), "UNEXPECTED_TOKEN", msg));
|
244129
244129
|
break;
|
244130
244130
|
}
|
244131
244131
|
this.doc.directives.docEnd = true;
|
@@ -244140,7 +244140,7 @@ ${end.comment}` : end.comment;
|
|
244140
244140
|
break;
|
244141
244141
|
}
|
244142
244142
|
default:
|
244143
|
-
this.errors.push(new
|
244143
|
+
this.errors.push(new errors6.YAMLParseError(getErrorPos(token), "UNEXPECTED_TOKEN", `Unsupported token ${token.type}`));
|
244144
244144
|
}
|
244145
244145
|
}
|
244146
244146
|
*end(forceDoc = false, endOffset = -1) {
|
@@ -244166,7 +244166,7 @@ ${end.comment}` : end.comment;
|
|
244166
244166
|
var require_cst_scalar = __commonJS((exports) => {
|
244167
244167
|
var resolveBlockScalar = require_resolve_block_scalar();
|
244168
244168
|
var resolveFlowScalar = require_resolve_flow_scalar();
|
244169
|
-
var
|
244169
|
+
var errors6 = require_errors3();
|
244170
244170
|
var stringifyString = require_stringifyString();
|
244171
244171
|
function resolveAsScalar(token, strict = true, onError) {
|
244172
244172
|
if (token) {
|
@@ -244175,7 +244175,7 @@ var require_cst_scalar = __commonJS((exports) => {
|
|
244175
244175
|
if (onError)
|
244176
244176
|
onError(offset, code2, message);
|
244177
244177
|
else
|
244178
|
-
throw new
|
244178
|
+
throw new errors6.YAMLParseError([offset, offset + 1], code2, message);
|
244179
244179
|
};
|
244180
244180
|
switch (token.type) {
|
244181
244181
|
case "scalar":
|
@@ -244289,9 +244289,9 @@ var require_cst_scalar = __commonJS((exports) => {
|
|
244289
244289
|
if (!addEndtoBlockProps(props, "end" in token ? token.end : undefined))
|
244290
244290
|
props.push({ type: "newline", offset: -1, indent: indent2, source: `
|
244291
244291
|
` });
|
244292
|
-
for (const
|
244293
|
-
if (
|
244294
|
-
delete token[
|
244292
|
+
for (const key4 of Object.keys(token))
|
244293
|
+
if (key4 !== "type" && key4 !== "offset")
|
244294
|
+
delete token[key4];
|
244295
244295
|
Object.assign(token, { type: "block-scalar", indent: indent2, props, source: body });
|
244296
244296
|
}
|
244297
244297
|
}
|
@@ -244340,9 +244340,9 @@ var require_cst_scalar = __commonJS((exports) => {
|
|
244340
244340
|
default: {
|
244341
244341
|
const indent2 = "indent" in token ? token.indent : -1;
|
244342
244342
|
const end = "end" in token && Array.isArray(token.end) ? token.end.filter((st2) => st2.type === "space" || st2.type === "comment" || st2.type === "newline") : [];
|
244343
|
-
for (const
|
244344
|
-
if (
|
244345
|
-
delete token[
|
244343
|
+
for (const key4 of Object.keys(token))
|
244344
|
+
if (key4 !== "type" && key4 !== "offset")
|
244345
|
+
delete token[key4];
|
244346
244346
|
Object.assign(token, { type: type4, indent: indent2, source, end });
|
244347
244347
|
}
|
244348
244348
|
}
|
@@ -244394,12 +244394,12 @@ var require_cst_stringify = __commonJS((exports) => {
|
|
244394
244394
|
}
|
244395
244395
|
}
|
244396
244396
|
}
|
244397
|
-
function stringifyItem({ start: start3, key:
|
244397
|
+
function stringifyItem({ start: start3, key: key4, sep: sep5, value: value4 }) {
|
244398
244398
|
let res = "";
|
244399
244399
|
for (const st2 of start3)
|
244400
244400
|
res += st2.source;
|
244401
|
-
if (
|
244402
|
-
res += stringifyToken(
|
244401
|
+
if (key4)
|
244402
|
+
res += stringifyToken(key4);
|
244403
244403
|
if (sep5)
|
244404
244404
|
for (const st2 of sep5)
|
244405
244405
|
res += st2.source;
|
@@ -245695,7 +245695,7 @@ var require_parser2 = __commonJS((exports) => {
|
|
245695
245695
|
});
|
245696
245696
|
} else if (isFlowToken(it2.key) && !includesToken(it2.sep, "newline")) {
|
245697
245697
|
const start4 = getFirstKeyStartProps(it2.start);
|
245698
|
-
const
|
245698
|
+
const key4 = it2.key;
|
245699
245699
|
const sep5 = it2.sep;
|
245700
245700
|
sep5.push(this.sourceToken);
|
245701
245701
|
delete it2.key;
|
@@ -245704,7 +245704,7 @@ var require_parser2 = __commonJS((exports) => {
|
|
245704
245704
|
type: "block-map",
|
245705
245705
|
offset: this.offset,
|
245706
245706
|
indent: this.indent,
|
245707
|
-
items: [{ start: start4, key:
|
245707
|
+
items: [{ start: start4, key: key4, sep: sep5 }]
|
245708
245708
|
});
|
245709
245709
|
} else if (start3.length > 0) {
|
245710
245710
|
it2.sep = it2.sep.concat(start3, this.sourceToken);
|
@@ -246037,7 +246037,7 @@ var require_parser2 = __commonJS((exports) => {
|
|
246037
246037
|
var require_public_api = __commonJS((exports) => {
|
246038
246038
|
var composer = require_composer();
|
246039
246039
|
var Document = require_Document();
|
246040
|
-
var
|
246040
|
+
var errors6 = require_errors3();
|
246041
246041
|
var log = require_log();
|
246042
246042
|
var identity2 = require_identity();
|
246043
246043
|
var lineCounter = require_line_counter();
|
@@ -246054,8 +246054,8 @@ var require_public_api = __commonJS((exports) => {
|
|
246054
246054
|
const docs = Array.from(composer$1.compose(parser$1.parse(source)));
|
246055
246055
|
if (prettyErrors && lineCounter2)
|
246056
246056
|
for (const doc2 of docs) {
|
246057
|
-
doc2.errors.forEach(
|
246058
|
-
doc2.warnings.forEach(
|
246057
|
+
doc2.errors.forEach(errors6.prettifyError(source, lineCounter2));
|
246058
|
+
doc2.warnings.forEach(errors6.prettifyError(source, lineCounter2));
|
246059
246059
|
}
|
246060
246060
|
if (docs.length > 0)
|
246061
246061
|
return docs;
|
@@ -246070,13 +246070,13 @@ var require_public_api = __commonJS((exports) => {
|
|
246070
246070
|
if (!doc2)
|
246071
246071
|
doc2 = _doc;
|
246072
246072
|
else if (doc2.options.logLevel !== "silent") {
|
246073
|
-
doc2.errors.push(new
|
246073
|
+
doc2.errors.push(new errors6.YAMLParseError(_doc.range.slice(0, 2), "MULTIPLE_DOCS", "Source contains multiple documents; please use YAML.parseAllDocuments()"));
|
246074
246074
|
break;
|
246075
246075
|
}
|
246076
246076
|
}
|
246077
246077
|
if (prettyErrors && lineCounter2) {
|
246078
|
-
doc2.errors.forEach(
|
246079
|
-
doc2.warnings.forEach(
|
246078
|
+
doc2.errors.forEach(errors6.prettifyError(source, lineCounter2));
|
246079
|
+
doc2.warnings.forEach(errors6.prettifyError(source, lineCounter2));
|
246080
246080
|
}
|
246081
246081
|
return doc2;
|
246082
246082
|
}
|
@@ -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-prf3423261",
|
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",
|
@@ -263886,13 +263888,13 @@ var package_default = {
|
|
263886
263888
|
"@commander-js/extra-typings": "14.0.0",
|
263887
263889
|
commander: "14.0.0",
|
263888
263890
|
"@inquirer/confirm": "5.1.12",
|
263889
|
-
"@inquirer/input": "4.
|
263890
|
-
"@inquirer/password": "4.0.
|
263891
|
+
"@inquirer/input": "4.2.0",
|
263892
|
+
"@inquirer/password": "4.0.16",
|
263891
263893
|
"@inquirer/select": "4.2.3",
|
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.
|
263894
|
+
"@settlemint/sdk-js": "2.4.0-prf3423261",
|
263895
|
+
"@settlemint/sdk-utils": "2.4.0-prf3423261",
|
263896
|
+
"@settlemint/sdk-viem": "2.4.0-prf3423261",
|
263897
|
+
"@types/node": "24.0.10",
|
263896
263898
|
"@types/semver": "7.7.0",
|
263897
263899
|
"@types/which": "3.0.4",
|
263898
263900
|
"get-tsconfig": "4.10.1",
|
@@ -263900,13 +263902,13 @@ 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"
|
263907
263909
|
},
|
263908
263910
|
peerDependencies: {
|
263909
|
-
hardhat: "2.
|
263911
|
+
hardhat: "2.25.0"
|
263910
263912
|
},
|
263911
263913
|
peerDependenciesMeta: {
|
263912
263914
|
hardhat: {
|
@@ -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
|
@@ -276513,9 +276515,9 @@ ${formattedErrors}`);
|
|
276513
276515
|
throw error$372;
|
276514
276516
|
}
|
276515
276517
|
}
|
276516
|
-
var ApplicationAccessTokenSchema2 = string$12().regex(/^sm_aat_
|
276517
|
-
var PersonalAccessTokenSchema2 = string$12().regex(/^sm_pat_
|
276518
|
-
var AccessTokenSchema2 = string$12().regex(/^sm_pat_
|
276518
|
+
var ApplicationAccessTokenSchema2 = string$12().regex(/^sm_aat_.+$/);
|
276519
|
+
var PersonalAccessTokenSchema2 = string$12().regex(/^sm_pat_.+$/);
|
276520
|
+
var AccessTokenSchema2 = string$12().regex(/^(sm_pat_.+|sm_aat_.+)$/);
|
276519
276521
|
function tryParseJson2(value, defaultValue = null) {
|
276520
276522
|
try {
|
276521
276523
|
const parsed = JSON.parse(value);
|
@@ -276523,7 +276525,7 @@ function tryParseJson2(value, defaultValue = null) {
|
|
276523
276525
|
return defaultValue;
|
276524
276526
|
}
|
276525
276527
|
return parsed;
|
276526
|
-
} catch (
|
276528
|
+
} catch (_err) {
|
276527
276529
|
return defaultValue;
|
276528
276530
|
}
|
276529
276531
|
}
|
@@ -288289,6 +288291,20 @@ var restartBlockchainNetwork = graphql(`
|
|
288289
288291
|
}
|
288290
288292
|
}
|
288291
288293
|
`, [BlockchainNetworkFragment]);
|
288294
|
+
var pauseBlockchainNetwork = graphql(`
|
288295
|
+
mutation PauseBlockchainNetwork($uniqueName: String!) {
|
288296
|
+
pauseBlockchainNetworkByUniqueName(uniqueName: $uniqueName) {
|
288297
|
+
...BlockchainNetwork
|
288298
|
+
}
|
288299
|
+
}
|
288300
|
+
`, [BlockchainNetworkFragment]);
|
288301
|
+
var resumeBlockchainNetwork = graphql(`
|
288302
|
+
mutation ResumeBlockchainNetwork($uniqueName: String!) {
|
288303
|
+
resumeBlockchainNetworkByUniqueName(uniqueName: $uniqueName) {
|
288304
|
+
...BlockchainNetwork
|
288305
|
+
}
|
288306
|
+
}
|
288307
|
+
`, [BlockchainNetworkFragment]);
|
288292
288308
|
var blockchainNetworkList = (gqlClient) => {
|
288293
288309
|
return async (applicationUniqueName) => {
|
288294
288310
|
const { blockchainNetworksByUniqueName: { items } } = await gqlClient.request(getBlockchainNetworks, { applicationUniqueName });
|
@@ -288323,6 +288339,14 @@ var blockchainNetworkRestart = (gqlClient) => async (blockchainNetworkUniqueName
|
|
288323
288339
|
const { restartBlockchainNetworkByUniqueName: blockchainNetwork } = await gqlClient.request(restartBlockchainNetwork, { uniqueName: blockchainNetworkUniqueName });
|
288324
288340
|
return blockchainNetwork;
|
288325
288341
|
};
|
288342
|
+
var blockchainNetworkPause = (gqlClient) => async (blockchainNetworkUniqueName) => {
|
288343
|
+
const { pauseBlockchainNetworkByUniqueName: blockchainNetwork } = await gqlClient.request(pauseBlockchainNetwork, { uniqueName: blockchainNetworkUniqueName });
|
288344
|
+
return blockchainNetwork;
|
288345
|
+
};
|
288346
|
+
var blockchainNetworkResume = (gqlClient) => async (blockchainNetworkUniqueName) => {
|
288347
|
+
const { resumeBlockchainNetworkByUniqueName: blockchainNetwork } = await gqlClient.request(resumeBlockchainNetwork, { uniqueName: blockchainNetworkUniqueName });
|
288348
|
+
return blockchainNetwork;
|
288349
|
+
};
|
288326
288350
|
var BlockchainNodeFragment = graphql(`
|
288327
288351
|
fragment BlockchainNode on BlockchainNode {
|
288328
288352
|
__typename
|
@@ -288456,6 +288480,20 @@ var restartBlockchainNode = graphql(`
|
|
288456
288480
|
}
|
288457
288481
|
}
|
288458
288482
|
`, [BlockchainNodeFragment]);
|
288483
|
+
var pauseBlockchainNode = graphql(`
|
288484
|
+
mutation PauseBlockchainNode($uniqueName: String!) {
|
288485
|
+
pauseBlockchainNodeByUniqueName(uniqueName: $uniqueName) {
|
288486
|
+
...BlockchainNode
|
288487
|
+
}
|
288488
|
+
}
|
288489
|
+
`, [BlockchainNodeFragment]);
|
288490
|
+
var resumeBlockchainNode = graphql(`
|
288491
|
+
mutation ResumeBlockchainNode($uniqueName: String!) {
|
288492
|
+
resumeBlockchainNodeByUniqueName(uniqueName: $uniqueName) {
|
288493
|
+
...BlockchainNode
|
288494
|
+
}
|
288495
|
+
}
|
288496
|
+
`, [BlockchainNodeFragment]);
|
288459
288497
|
var blockchainNodeList = (gqlClient) => {
|
288460
288498
|
return async (applicationUniqueName) => {
|
288461
288499
|
const { blockchainNodesByUniqueName: { items } } = await gqlClient.request(getBlockchainNodes, { applicationUniqueName });
|
@@ -288484,6 +288522,14 @@ var blockchainNodeRestart = (gqlClient) => async (blockchainNodeUniqueName) => {
|
|
288484
288522
|
const { restartBlockchainNodeByUniqueName: blockchainNode } = await gqlClient.request(restartBlockchainNode, { uniqueName: blockchainNodeUniqueName });
|
288485
288523
|
return blockchainNode;
|
288486
288524
|
};
|
288525
|
+
var blockchainNodePause = (gqlClient) => async (blockchainNodeUniqueName) => {
|
288526
|
+
const { pauseBlockchainNodeByUniqueName: blockchainNode } = await gqlClient.request(pauseBlockchainNode, { uniqueName: blockchainNodeUniqueName });
|
288527
|
+
return blockchainNode;
|
288528
|
+
};
|
288529
|
+
var blockchainNodeResume = (gqlClient) => async (blockchainNodeUniqueName) => {
|
288530
|
+
const { resumeBlockchainNodeByUniqueName: blockchainNode } = await gqlClient.request(resumeBlockchainNode, { uniqueName: blockchainNodeUniqueName });
|
288531
|
+
return blockchainNode;
|
288532
|
+
};
|
288487
288533
|
var CustomDeploymentFragment = graphql(`
|
288488
288534
|
fragment CustomDeployment on CustomDeployment {
|
288489
288535
|
id
|
@@ -288566,6 +288612,20 @@ var restartCustomDeployment = graphql(`
|
|
288566
288612
|
}
|
288567
288613
|
}
|
288568
288614
|
`, [CustomDeploymentFragment]);
|
288615
|
+
var pauseCustomDeployment = graphql(`
|
288616
|
+
mutation PauseCustomDeployment($uniqueName: String!) {
|
288617
|
+
pauseCustomDeploymentByUniqueName(uniqueName: $uniqueName) {
|
288618
|
+
...CustomDeployment
|
288619
|
+
}
|
288620
|
+
}
|
288621
|
+
`, [CustomDeploymentFragment]);
|
288622
|
+
var resumeCustomDeployment = graphql(`
|
288623
|
+
mutation ResumeCustomDeployment($uniqueName: String!) {
|
288624
|
+
resumeCustomDeploymentByUniqueName(uniqueName: $uniqueName) {
|
288625
|
+
...CustomDeployment
|
288626
|
+
}
|
288627
|
+
}
|
288628
|
+
`, [CustomDeploymentFragment]);
|
288569
288629
|
var customdeploymentList = (gqlClient) => {
|
288570
288630
|
return async (applicationUniqueName) => {
|
288571
288631
|
const { customDeploymentsByUniqueName: { items } } = await gqlClient.request(getCustomDeployments, { applicationUniqueName });
|
@@ -288602,6 +288662,14 @@ var customDeploymentRestart = (gqlClient) => async (customDeploymentUniqueName)
|
|
288602
288662
|
const { restartCustomDeploymentByUniqueName: customDeployment } = await gqlClient.request(restartCustomDeployment, { uniqueName: customDeploymentUniqueName });
|
288603
288663
|
return customDeployment;
|
288604
288664
|
};
|
288665
|
+
var customDeploymentPause = (gqlClient) => async (customDeploymentUniqueName) => {
|
288666
|
+
const { pauseCustomDeploymentByUniqueName: customDeployment } = await gqlClient.request(pauseCustomDeployment, { uniqueName: customDeploymentUniqueName });
|
288667
|
+
return customDeployment;
|
288668
|
+
};
|
288669
|
+
var customDeploymentResume = (gqlClient) => async (customDeploymentUniqueName) => {
|
288670
|
+
const { resumeCustomDeploymentByUniqueName: customDeployment } = await gqlClient.request(resumeCustomDeployment, { uniqueName: customDeploymentUniqueName });
|
288671
|
+
return customDeployment;
|
288672
|
+
};
|
288605
288673
|
var getFoundryEnvConfig = graphql(`
|
288606
288674
|
query GetFoundryEnvConfig($blockchainNodeUniqueName: String!) {
|
288607
288675
|
foundryEnvConfigByUniqueName(blockchainNodeUniqueName: $blockchainNodeUniqueName)
|
@@ -288678,6 +288746,20 @@ var restartLoadBalancer = graphql(`
|
|
288678
288746
|
}
|
288679
288747
|
}
|
288680
288748
|
`, [LoadBalancerFragment]);
|
288749
|
+
var pauseLoadBalancer = graphql(`
|
288750
|
+
mutation PauseLoadBalancer($uniqueName: String!) {
|
288751
|
+
pauseLoadBalancerByUniqueName(uniqueName: $uniqueName) {
|
288752
|
+
...LoadBalancer
|
288753
|
+
}
|
288754
|
+
}
|
288755
|
+
`, [LoadBalancerFragment]);
|
288756
|
+
var resumeLoadBalancer = graphql(`
|
288757
|
+
mutation ResumeLoadBalancer($uniqueName: String!) {
|
288758
|
+
resumeLoadBalancerByUniqueName(uniqueName: $uniqueName) {
|
288759
|
+
...LoadBalancer
|
288760
|
+
}
|
288761
|
+
}
|
288762
|
+
`, [LoadBalancerFragment]);
|
288681
288763
|
var loadBalancerRead = (gqlClient) => {
|
288682
288764
|
return async (loadBalancerUniqueName) => {
|
288683
288765
|
const { loadBalancerByUniqueName: loadBalancer } = await gqlClient.request(getLoadBalancer, { uniqueName: loadBalancerUniqueName });
|
@@ -288711,6 +288793,14 @@ var loadBalancerRestart = (gqlClient) => async (loadBalancerUniqueName) => {
|
|
288711
288793
|
const { restartLoadBalancerByUniqueName: loadBalancer } = await gqlClient.request(restartLoadBalancer, { uniqueName: loadBalancerUniqueName });
|
288712
288794
|
return loadBalancer;
|
288713
288795
|
};
|
288796
|
+
var loadBalancerPause = (gqlClient) => async (loadBalancerUniqueName) => {
|
288797
|
+
const { pauseLoadBalancerByUniqueName: loadBalancer } = await gqlClient.request(pauseLoadBalancer, { uniqueName: loadBalancerUniqueName });
|
288798
|
+
return loadBalancer;
|
288799
|
+
};
|
288800
|
+
var loadBalancerResume = (gqlClient) => async (loadBalancerUniqueName) => {
|
288801
|
+
const { resumeLoadBalancerByUniqueName: loadBalancer } = await gqlClient.request(resumeLoadBalancer, { uniqueName: loadBalancerUniqueName });
|
288802
|
+
return loadBalancer;
|
288803
|
+
};
|
288714
288804
|
var InsightsFragment = graphql(`
|
288715
288805
|
fragment Insights on Insights {
|
288716
288806
|
__typename
|
@@ -288784,6 +288874,20 @@ var restartInsights = graphql(`
|
|
288784
288874
|
}
|
288785
288875
|
}
|
288786
288876
|
`, [InsightsFragment]);
|
288877
|
+
var pauseInsights = graphql(`
|
288878
|
+
mutation PauseInsights($uniqueName: String!) {
|
288879
|
+
pauseInsightsByUniqueName(uniqueName: $uniqueName) {
|
288880
|
+
...Insights
|
288881
|
+
}
|
288882
|
+
}
|
288883
|
+
`, [InsightsFragment]);
|
288884
|
+
var resumeInsights = graphql(`
|
288885
|
+
mutation ResumeInsights($uniqueName: String!) {
|
288886
|
+
resumeInsightsByUniqueName(uniqueName: $uniqueName) {
|
288887
|
+
...Insights
|
288888
|
+
}
|
288889
|
+
}
|
288890
|
+
`, [InsightsFragment]);
|
288787
288891
|
var insightsList = (gqlClient) => {
|
288788
288892
|
return async (applicationUniqueName) => {
|
288789
288893
|
const { insightsListByUniqueName: { items } } = await gqlClient.request(getInsights, { applicationUniqueName });
|
@@ -288817,6 +288921,14 @@ var insightsRestart = (gqlClient) => async (insightsUniqueName) => {
|
|
288817
288921
|
const { restartInsightsByUniqueName: insights } = await gqlClient.request(restartInsights, { uniqueName: insightsUniqueName });
|
288818
288922
|
return insights;
|
288819
288923
|
};
|
288924
|
+
var insightsPause = (gqlClient) => async (insightsUniqueName) => {
|
288925
|
+
const { pauseInsightsByUniqueName: insights } = await gqlClient.request(pauseInsights, { uniqueName: insightsUniqueName });
|
288926
|
+
return insights;
|
288927
|
+
};
|
288928
|
+
var insightsResume = (gqlClient) => async (insightsUniqueName) => {
|
288929
|
+
const { resumeInsightsByUniqueName: insights } = await gqlClient.request(resumeInsights, { uniqueName: insightsUniqueName });
|
288930
|
+
return insights;
|
288931
|
+
};
|
288820
288932
|
var IntegrationFragment = graphql(`
|
288821
288933
|
fragment Integration on Integration {
|
288822
288934
|
__typename
|
@@ -288886,6 +288998,20 @@ var restartIntegrationTool = graphql(`
|
|
288886
288998
|
}
|
288887
288999
|
}
|
288888
289000
|
`, [IntegrationFragment]);
|
289001
|
+
var pauseIntegrationTool = graphql(`
|
289002
|
+
mutation PauseIntegrationTool($uniqueName: String!) {
|
289003
|
+
pauseIntegrationByUniqueName(uniqueName: $uniqueName) {
|
289004
|
+
...Integration
|
289005
|
+
}
|
289006
|
+
}
|
289007
|
+
`, [IntegrationFragment]);
|
289008
|
+
var resumeIntegrationTool = graphql(`
|
289009
|
+
mutation ResumeIntegrationTool($uniqueName: String!) {
|
289010
|
+
resumeIntegrationByUniqueName(uniqueName: $uniqueName) {
|
289011
|
+
...Integration
|
289012
|
+
}
|
289013
|
+
}
|
289014
|
+
`, [IntegrationFragment]);
|
288889
289015
|
var integrationToolList = (gqlClient) => {
|
288890
289016
|
return async (applicationUniqueName) => {
|
288891
289017
|
const { integrationsByUniqueName: { items } } = await gqlClient.request(getIntegrations, { applicationUniqueName });
|
@@ -288913,6 +289039,14 @@ var integrationToolRestart = (gqlClient) => async (integrationUniqueName) => {
|
|
288913
289039
|
const { restartIntegrationByUniqueName: integration } = await gqlClient.request(restartIntegrationTool, { uniqueName: integrationUniqueName });
|
288914
289040
|
return integration;
|
288915
289041
|
};
|
289042
|
+
var integrationToolPause = (gqlClient) => async (integrationUniqueName) => {
|
289043
|
+
const { pauseIntegrationByUniqueName: integration } = await gqlClient.request(pauseIntegrationTool, { uniqueName: integrationUniqueName });
|
289044
|
+
return integration;
|
289045
|
+
};
|
289046
|
+
var integrationToolResume = (gqlClient) => async (integrationUniqueName) => {
|
289047
|
+
const { resumeIntegrationByUniqueName: integration } = await gqlClient.request(resumeIntegrationTool, { uniqueName: integrationUniqueName });
|
289048
|
+
return integration;
|
289049
|
+
};
|
288916
289050
|
var StorageFragment = graphql(`
|
288917
289051
|
fragment Storage on Storage {
|
288918
289052
|
__typename
|
@@ -288982,6 +289116,20 @@ var restartStorage = graphql(`
|
|
288982
289116
|
}
|
288983
289117
|
}
|
288984
289118
|
`, [StorageFragment]);
|
289119
|
+
var pauseStorage = graphql(`
|
289120
|
+
mutation PauseStorage($uniqueName: String!) {
|
289121
|
+
pauseStorageByUniqueName(uniqueName: $uniqueName) {
|
289122
|
+
...Storage
|
289123
|
+
}
|
289124
|
+
}
|
289125
|
+
`, [StorageFragment]);
|
289126
|
+
var resumeStorage = graphql(`
|
289127
|
+
mutation ResumeStorage($uniqueName: String!) {
|
289128
|
+
resumeStorageByUniqueName(uniqueName: $uniqueName) {
|
289129
|
+
...Storage
|
289130
|
+
}
|
289131
|
+
}
|
289132
|
+
`, [StorageFragment]);
|
288985
289133
|
var storageList = (gqlClient) => {
|
288986
289134
|
return async (applicationUniqueName) => {
|
288987
289135
|
const { storagesByUniqueName: { items } } = await gqlClient.request(getStorages, { applicationUniqueName });
|
@@ -289009,6 +289157,14 @@ var storageRestart = (gqlClient) => async (storageUniqueName) => {
|
|
289009
289157
|
const { restartStorageByUniqueName: storage } = await gqlClient.request(restartStorage, { uniqueName: storageUniqueName });
|
289010
289158
|
return storage;
|
289011
289159
|
};
|
289160
|
+
var storagePause = (gqlClient) => async (storageUniqueName) => {
|
289161
|
+
const { pauseStorageByUniqueName: storage } = await gqlClient.request(pauseStorage, { uniqueName: storageUniqueName });
|
289162
|
+
return storage;
|
289163
|
+
};
|
289164
|
+
var storageResume = (gqlClient) => async (storageUniqueName) => {
|
289165
|
+
const { resumeStorageByUniqueName: storage } = await gqlClient.request(resumeStorage, { uniqueName: storageUniqueName });
|
289166
|
+
return storage;
|
289167
|
+
};
|
289012
289168
|
var MiddlewareFragment = graphql(`
|
289013
289169
|
fragment Middleware on Middleware {
|
289014
289170
|
__typename
|
@@ -289109,6 +289265,20 @@ var restartMiddleware = graphql(`
|
|
289109
289265
|
}
|
289110
289266
|
}
|
289111
289267
|
`, [MiddlewareFragment]);
|
289268
|
+
var pauseMiddleware = graphql(`
|
289269
|
+
mutation PauseMiddleware($uniqueName: String!) {
|
289270
|
+
pauseMiddlewareByUniqueName(uniqueName: $uniqueName) {
|
289271
|
+
...Middleware
|
289272
|
+
}
|
289273
|
+
}
|
289274
|
+
`, [MiddlewareFragment]);
|
289275
|
+
var resumeMiddleware = graphql(`
|
289276
|
+
mutation ResumeMiddleware($uniqueName: String!) {
|
289277
|
+
resumeMiddlewareByUniqueName(uniqueName: $uniqueName) {
|
289278
|
+
...Middleware
|
289279
|
+
}
|
289280
|
+
}
|
289281
|
+
`, [MiddlewareFragment]);
|
289112
289282
|
var middlewareList = (gqlClient) => {
|
289113
289283
|
return async (applicationUniqueName) => {
|
289114
289284
|
const { middlewaresByUniqueName: { items } } = await gqlClient.request(getMiddlewares, { applicationUniqueName });
|
@@ -289153,6 +289323,14 @@ var middlewareRestart = (gqlClient) => async (middlewareUniqueName) => {
|
|
289153
289323
|
const { restartMiddlewareByUniqueName: middleware } = await gqlClient.request(restartMiddleware, { uniqueName: middlewareUniqueName });
|
289154
289324
|
return middleware;
|
289155
289325
|
};
|
289326
|
+
var middlewarePause = (gqlClient) => async (middlewareUniqueName) => {
|
289327
|
+
const { pauseMiddlewareByUniqueName: middleware } = await gqlClient.request(pauseMiddleware, { uniqueName: middlewareUniqueName });
|
289328
|
+
return middleware;
|
289329
|
+
};
|
289330
|
+
var middlewareResume = (gqlClient) => async (middlewareUniqueName) => {
|
289331
|
+
const { resumeMiddlewareByUniqueName: middleware } = await gqlClient.request(resumeMiddleware, { uniqueName: middlewareUniqueName });
|
289332
|
+
return middleware;
|
289333
|
+
};
|
289156
289334
|
var getPlatformConfigQuery = graphql(`
|
289157
289335
|
query platformConfig {
|
289158
289336
|
config {
|
@@ -289285,6 +289463,20 @@ var restartPrivateKey = graphql(`
|
|
289285
289463
|
}
|
289286
289464
|
}
|
289287
289465
|
`, [PrivateKeyFragment]);
|
289466
|
+
var pausePrivateKey = graphql(`
|
289467
|
+
mutation PausePrivateKey($uniqueName: String!) {
|
289468
|
+
pausePrivateKeyByUniqueName(uniqueName: $uniqueName) {
|
289469
|
+
...PrivateKey
|
289470
|
+
}
|
289471
|
+
}
|
289472
|
+
`, [PrivateKeyFragment]);
|
289473
|
+
var resumePrivateKey = graphql(`
|
289474
|
+
mutation ResumePrivateKey($uniqueName: String!) {
|
289475
|
+
resumePrivateKeyByUniqueName(uniqueName: $uniqueName) {
|
289476
|
+
...PrivateKey
|
289477
|
+
}
|
289478
|
+
}
|
289479
|
+
`, [PrivateKeyFragment]);
|
289288
289480
|
var privateKeyList = (gqlClient) => {
|
289289
289481
|
return async (applicationUniqueName) => {
|
289290
289482
|
const { privateKeysByUniqueName: { items } } = await gqlClient.request(getPrivateKeys, { applicationUniqueName });
|
@@ -289323,6 +289515,14 @@ var privateKeyRestart = (gqlClient) => async (privateKeyUniqueName) => {
|
|
289323
289515
|
const { restartPrivateKeyByUniqueName: privateKey } = await gqlClient.request(restartPrivateKey, { uniqueName: privateKeyUniqueName });
|
289324
289516
|
return privateKey;
|
289325
289517
|
};
|
289518
|
+
var privateKeyPause = (gqlClient) => async (privateKeyUniqueName) => {
|
289519
|
+
const { pausePrivateKeyByUniqueName: privateKey } = await gqlClient.request(pausePrivateKey, { uniqueName: privateKeyUniqueName });
|
289520
|
+
return privateKey;
|
289521
|
+
};
|
289522
|
+
var privateKeyResume = (gqlClient) => async (privateKeyUniqueName) => {
|
289523
|
+
const { resumePrivateKeyByUniqueName: privateKey } = await gqlClient.request(resumePrivateKey, { uniqueName: privateKeyUniqueName });
|
289524
|
+
return privateKey;
|
289525
|
+
};
|
289326
289526
|
var ClientOptionsSchema = exports_external.object({
|
289327
289527
|
accessToken: AccessTokenSchema2,
|
289328
289528
|
instance: UrlSchema2
|
@@ -289402,57 +289602,75 @@ function createSettleMintClient(options) {
|
|
289402
289602
|
read: blockchainNetworkRead(gqlClient),
|
289403
289603
|
create: blockchainNetworkCreate(gqlClient),
|
289404
289604
|
delete: blockchainNetworkDelete(gqlClient),
|
289405
|
-
restart: blockchainNetworkRestart(gqlClient)
|
289605
|
+
restart: blockchainNetworkRestart(gqlClient),
|
289606
|
+
pause: blockchainNetworkPause(gqlClient),
|
289607
|
+
resume: blockchainNetworkResume(gqlClient)
|
289406
289608
|
},
|
289407
289609
|
blockchainNode: {
|
289408
289610
|
list: blockchainNodeList(gqlClient),
|
289409
289611
|
read: blockchainNodeRead(gqlClient),
|
289410
289612
|
create: blockchainNodeCreate(gqlClient),
|
289411
|
-
restart: blockchainNodeRestart(gqlClient)
|
289613
|
+
restart: blockchainNodeRestart(gqlClient),
|
289614
|
+
pause: blockchainNodePause(gqlClient),
|
289615
|
+
resume: blockchainNodeResume(gqlClient)
|
289412
289616
|
},
|
289413
289617
|
loadBalancer: {
|
289414
289618
|
list: loadBalancerList(gqlClient),
|
289415
289619
|
read: loadBalancerRead(gqlClient),
|
289416
289620
|
create: loadBalancerCreate(gqlClient),
|
289417
|
-
restart: loadBalancerRestart(gqlClient)
|
289621
|
+
restart: loadBalancerRestart(gqlClient),
|
289622
|
+
pause: loadBalancerPause(gqlClient),
|
289623
|
+
resume: loadBalancerResume(gqlClient)
|
289418
289624
|
},
|
289419
289625
|
middleware: {
|
289420
289626
|
list: middlewareList(gqlClient),
|
289421
289627
|
read: middlewareRead(gqlClient),
|
289422
289628
|
graphSubgraphs: graphMiddlewareSubgraphs(gqlClient),
|
289423
289629
|
create: middlewareCreate(gqlClient),
|
289424
|
-
restart: middlewareRestart(gqlClient)
|
289630
|
+
restart: middlewareRestart(gqlClient),
|
289631
|
+
pause: middlewarePause(gqlClient),
|
289632
|
+
resume: middlewareResume(gqlClient)
|
289425
289633
|
},
|
289426
289634
|
integrationTool: {
|
289427
289635
|
list: integrationToolList(gqlClient),
|
289428
289636
|
read: integrationToolRead(gqlClient),
|
289429
289637
|
create: integrationToolCreate(gqlClient),
|
289430
|
-
restart: integrationToolRestart(gqlClient)
|
289638
|
+
restart: integrationToolRestart(gqlClient),
|
289639
|
+
pause: integrationToolPause(gqlClient),
|
289640
|
+
resume: integrationToolResume(gqlClient)
|
289431
289641
|
},
|
289432
289642
|
storage: {
|
289433
289643
|
list: storageList(gqlClient),
|
289434
289644
|
read: storageRead(gqlClient),
|
289435
289645
|
create: storageCreate(gqlClient),
|
289436
|
-
restart: storageRestart(gqlClient)
|
289646
|
+
restart: storageRestart(gqlClient),
|
289647
|
+
pause: storagePause(gqlClient),
|
289648
|
+
resume: storageResume(gqlClient)
|
289437
289649
|
},
|
289438
289650
|
privateKey: {
|
289439
289651
|
list: privateKeyList(gqlClient),
|
289440
289652
|
read: privatekeyRead(gqlClient),
|
289441
289653
|
create: privateKeyCreate(gqlClient),
|
289442
|
-
restart: privateKeyRestart(gqlClient)
|
289654
|
+
restart: privateKeyRestart(gqlClient),
|
289655
|
+
pause: privateKeyPause(gqlClient),
|
289656
|
+
resume: privateKeyResume(gqlClient)
|
289443
289657
|
},
|
289444
289658
|
insights: {
|
289445
289659
|
list: insightsList(gqlClient),
|
289446
289660
|
read: insightsRead(gqlClient),
|
289447
289661
|
create: insightsCreate(gqlClient),
|
289448
|
-
restart: insightsRestart(gqlClient)
|
289662
|
+
restart: insightsRestart(gqlClient),
|
289663
|
+
pause: insightsPause(gqlClient),
|
289664
|
+
resume: insightsResume(gqlClient)
|
289449
289665
|
},
|
289450
289666
|
customDeployment: {
|
289451
289667
|
list: customdeploymentList(gqlClient),
|
289452
289668
|
read: customdeploymentRead(gqlClient),
|
289453
289669
|
create: customdeploymentCreate(gqlClient),
|
289454
289670
|
update: customdeploymentUpdate(gqlClient),
|
289455
|
-
restart: customDeploymentRestart(gqlClient)
|
289671
|
+
restart: customDeploymentRestart(gqlClient),
|
289672
|
+
pause: customDeploymentPause(gqlClient),
|
289673
|
+
resume: customDeploymentResume(gqlClient)
|
289456
289674
|
},
|
289457
289675
|
foundry: { env: getEnv(gqlClient) },
|
289458
289676
|
applicationAccessToken: { create: applicationAccessTokenCreate(gqlClient) },
|
@@ -295869,17 +296087,6 @@ async function exists3(path$1) {
|
|
295869
296087
|
return false;
|
295870
296088
|
}
|
295871
296089
|
}
|
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
296090
|
var require_balanced_match4 = __commonJS4({ "../../node_modules/balanced-match/index.js"(exports, module) {
|
295884
296091
|
module.exports = balanced$1;
|
295885
296092
|
function balanced$1(a3, b, str) {
|
@@ -301358,6 +301565,17 @@ var glob3 = Object.assign(glob_3, {
|
|
301358
301565
|
unescape: unescape4
|
301359
301566
|
});
|
301360
301567
|
glob3.glob = glob3;
|
301568
|
+
function tryParseJson3(value2, defaultValue = null) {
|
301569
|
+
try {
|
301570
|
+
const parsed = JSON.parse(value2);
|
301571
|
+
if (parsed === undefined || parsed === null) {
|
301572
|
+
return defaultValue;
|
301573
|
+
}
|
301574
|
+
return parsed;
|
301575
|
+
} catch (_err) {
|
301576
|
+
return defaultValue;
|
301577
|
+
}
|
301578
|
+
}
|
301361
301579
|
async function findMonoRepoRoot2(startDir) {
|
301362
301580
|
const lockFilePath = await findUp([
|
301363
301581
|
"package-lock.json",
|
@@ -301403,7 +301621,7 @@ function tryParseJson4(value2, defaultValue = null) {
|
|
301403
301621
|
return defaultValue;
|
301404
301622
|
}
|
301405
301623
|
return parsed;
|
301406
|
-
} catch (
|
301624
|
+
} catch (_err) {
|
301407
301625
|
return defaultValue;
|
301408
301626
|
}
|
301409
301627
|
}
|
@@ -301431,7 +301649,7 @@ async function readConfig() {
|
|
301431
301649
|
try {
|
301432
301650
|
const content = await readFile4(CONFIG_FILE, "utf-8");
|
301433
301651
|
return tryParseJson4(content, { instances: {} });
|
301434
|
-
} catch (
|
301652
|
+
} catch (_error) {
|
301435
301653
|
return { instances: {} };
|
301436
301654
|
}
|
301437
301655
|
}
|
@@ -303011,23 +303229,480 @@ function sanitizeName(value4, length = 35) {
|
|
303011
303229
|
}).slice(0, length).replaceAll(/(^\d*)/g, "").replaceAll(/(-$)/g, "").replaceAll(/(^-)/g, "");
|
303012
303230
|
}
|
303013
303231
|
|
303232
|
+
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/key.js
|
303233
|
+
var isBackspaceKey2 = (key2) => key2.name === "backspace";
|
303234
|
+
var isEnterKey2 = (key2) => key2.name === "enter" || key2.name === "return";
|
303235
|
+
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/errors.js
|
303236
|
+
class AbortPromptError2 extends Error {
|
303237
|
+
name = "AbortPromptError";
|
303238
|
+
message = "Prompt was aborted";
|
303239
|
+
constructor(options) {
|
303240
|
+
super();
|
303241
|
+
this.cause = options?.cause;
|
303242
|
+
}
|
303243
|
+
}
|
303244
|
+
|
303245
|
+
class CancelPromptError2 extends Error {
|
303246
|
+
name = "CancelPromptError";
|
303247
|
+
message = "Prompt was canceled";
|
303248
|
+
}
|
303249
|
+
|
303250
|
+
class ExitPromptError2 extends Error {
|
303251
|
+
name = "ExitPromptError";
|
303252
|
+
}
|
303253
|
+
|
303254
|
+
class HookError2 extends Error {
|
303255
|
+
name = "HookError";
|
303256
|
+
}
|
303257
|
+
|
303258
|
+
class ValidationError2 extends Error {
|
303259
|
+
name = "ValidationError";
|
303260
|
+
}
|
303261
|
+
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/use-state.js
|
303262
|
+
import { AsyncResource as AsyncResource5 } from "node:async_hooks";
|
303263
|
+
|
303264
|
+
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/hook-engine.js
|
303265
|
+
import { AsyncLocalStorage as AsyncLocalStorage2, AsyncResource as AsyncResource4 } from "node:async_hooks";
|
303266
|
+
var hookStorage2 = new AsyncLocalStorage2;
|
303267
|
+
function createStore2(rl) {
|
303268
|
+
const store = {
|
303269
|
+
rl,
|
303270
|
+
hooks: [],
|
303271
|
+
hooksCleanup: [],
|
303272
|
+
hooksEffect: [],
|
303273
|
+
index: 0,
|
303274
|
+
handleChange() {}
|
303275
|
+
};
|
303276
|
+
return store;
|
303277
|
+
}
|
303278
|
+
function withHooks2(rl, cb) {
|
303279
|
+
const store = createStore2(rl);
|
303280
|
+
return hookStorage2.run(store, () => {
|
303281
|
+
function cycle(render) {
|
303282
|
+
store.handleChange = () => {
|
303283
|
+
store.index = 0;
|
303284
|
+
render();
|
303285
|
+
};
|
303286
|
+
store.handleChange();
|
303287
|
+
}
|
303288
|
+
return cb(cycle);
|
303289
|
+
});
|
303290
|
+
}
|
303291
|
+
function getStore2() {
|
303292
|
+
const store = hookStorage2.getStore();
|
303293
|
+
if (!store) {
|
303294
|
+
throw new HookError2("[Inquirer] Hook functions can only be called from within a prompt");
|
303295
|
+
}
|
303296
|
+
return store;
|
303297
|
+
}
|
303298
|
+
function readline3() {
|
303299
|
+
return getStore2().rl;
|
303300
|
+
}
|
303301
|
+
function withUpdates2(fn) {
|
303302
|
+
const wrapped = (...args) => {
|
303303
|
+
const store = getStore2();
|
303304
|
+
let shouldUpdate = false;
|
303305
|
+
const oldHandleChange = store.handleChange;
|
303306
|
+
store.handleChange = () => {
|
303307
|
+
shouldUpdate = true;
|
303308
|
+
};
|
303309
|
+
const returnValue = fn(...args);
|
303310
|
+
if (shouldUpdate) {
|
303311
|
+
oldHandleChange();
|
303312
|
+
}
|
303313
|
+
store.handleChange = oldHandleChange;
|
303314
|
+
return returnValue;
|
303315
|
+
};
|
303316
|
+
return AsyncResource4.bind(wrapped);
|
303317
|
+
}
|
303318
|
+
function withPointer2(cb) {
|
303319
|
+
const store = getStore2();
|
303320
|
+
const { index } = store;
|
303321
|
+
const pointer = {
|
303322
|
+
get() {
|
303323
|
+
return store.hooks[index];
|
303324
|
+
},
|
303325
|
+
set(value4) {
|
303326
|
+
store.hooks[index] = value4;
|
303327
|
+
},
|
303328
|
+
initialized: index in store.hooks
|
303329
|
+
};
|
303330
|
+
const returnValue = cb(pointer);
|
303331
|
+
store.index++;
|
303332
|
+
return returnValue;
|
303333
|
+
}
|
303334
|
+
function handleChange2() {
|
303335
|
+
getStore2().handleChange();
|
303336
|
+
}
|
303337
|
+
var effectScheduler2 = {
|
303338
|
+
queue(cb) {
|
303339
|
+
const store = getStore2();
|
303340
|
+
const { index } = store;
|
303341
|
+
store.hooksEffect.push(() => {
|
303342
|
+
store.hooksCleanup[index]?.();
|
303343
|
+
const cleanFn = cb(readline3());
|
303344
|
+
if (cleanFn != null && typeof cleanFn !== "function") {
|
303345
|
+
throw new ValidationError2("useEffect return value must be a cleanup function or nothing.");
|
303346
|
+
}
|
303347
|
+
store.hooksCleanup[index] = cleanFn;
|
303348
|
+
});
|
303349
|
+
},
|
303350
|
+
run() {
|
303351
|
+
const store = getStore2();
|
303352
|
+
withUpdates2(() => {
|
303353
|
+
store.hooksEffect.forEach((effect) => {
|
303354
|
+
effect();
|
303355
|
+
});
|
303356
|
+
store.hooksEffect.length = 0;
|
303357
|
+
})();
|
303358
|
+
},
|
303359
|
+
clearAll() {
|
303360
|
+
const store = getStore2();
|
303361
|
+
store.hooksCleanup.forEach((cleanFn) => {
|
303362
|
+
cleanFn?.();
|
303363
|
+
});
|
303364
|
+
store.hooksEffect.length = 0;
|
303365
|
+
store.hooksCleanup.length = 0;
|
303366
|
+
}
|
303367
|
+
};
|
303368
|
+
|
303369
|
+
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/use-state.js
|
303370
|
+
function useState2(defaultValue) {
|
303371
|
+
return withPointer2((pointer) => {
|
303372
|
+
const setState = AsyncResource5.bind(function setState(newValue) {
|
303373
|
+
if (pointer.get() !== newValue) {
|
303374
|
+
pointer.set(newValue);
|
303375
|
+
handleChange2();
|
303376
|
+
}
|
303377
|
+
});
|
303378
|
+
if (pointer.initialized) {
|
303379
|
+
return [pointer.get(), setState];
|
303380
|
+
}
|
303381
|
+
const value4 = typeof defaultValue === "function" ? defaultValue() : defaultValue;
|
303382
|
+
pointer.set(value4);
|
303383
|
+
return [value4, setState];
|
303384
|
+
});
|
303385
|
+
}
|
303386
|
+
|
303387
|
+
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/use-effect.js
|
303388
|
+
function useEffect2(cb, depArray) {
|
303389
|
+
withPointer2((pointer) => {
|
303390
|
+
const oldDeps = pointer.get();
|
303391
|
+
const hasChanged = !Array.isArray(oldDeps) || depArray.some((dep, i6) => !Object.is(dep, oldDeps[i6]));
|
303392
|
+
if (hasChanged) {
|
303393
|
+
effectScheduler2.queue(cb);
|
303394
|
+
}
|
303395
|
+
pointer.set(depArray);
|
303396
|
+
});
|
303397
|
+
}
|
303398
|
+
|
303399
|
+
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/theme.js
|
303400
|
+
var import_yoctocolors_cjs3 = __toESM(require_yoctocolors_cjs(), 1);
|
303401
|
+
var defaultTheme2 = {
|
303402
|
+
prefix: {
|
303403
|
+
idle: import_yoctocolors_cjs3.default.blue("?"),
|
303404
|
+
done: import_yoctocolors_cjs3.default.green(esm_default.tick)
|
303405
|
+
},
|
303406
|
+
spinner: {
|
303407
|
+
interval: 80,
|
303408
|
+
frames: ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"].map((frame) => import_yoctocolors_cjs3.default.yellow(frame))
|
303409
|
+
},
|
303410
|
+
style: {
|
303411
|
+
answer: import_yoctocolors_cjs3.default.cyan,
|
303412
|
+
message: import_yoctocolors_cjs3.default.bold,
|
303413
|
+
error: (text2) => import_yoctocolors_cjs3.default.red(`> ${text2}`),
|
303414
|
+
defaultAnswer: (text2) => import_yoctocolors_cjs3.default.dim(`(${text2})`),
|
303415
|
+
help: import_yoctocolors_cjs3.default.dim,
|
303416
|
+
highlight: import_yoctocolors_cjs3.default.cyan,
|
303417
|
+
key: (text2) => import_yoctocolors_cjs3.default.cyan(import_yoctocolors_cjs3.default.bold(`<${text2}>`))
|
303418
|
+
}
|
303419
|
+
};
|
303420
|
+
|
303421
|
+
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/make-theme.js
|
303422
|
+
function isPlainObject6(value4) {
|
303423
|
+
if (typeof value4 !== "object" || value4 === null)
|
303424
|
+
return false;
|
303425
|
+
let proto = value4;
|
303426
|
+
while (Object.getPrototypeOf(proto) !== null) {
|
303427
|
+
proto = Object.getPrototypeOf(proto);
|
303428
|
+
}
|
303429
|
+
return Object.getPrototypeOf(value4) === proto;
|
303430
|
+
}
|
303431
|
+
function deepMerge3(...objects) {
|
303432
|
+
const output = {};
|
303433
|
+
for (const obj of objects) {
|
303434
|
+
for (const [key2, value4] of Object.entries(obj)) {
|
303435
|
+
const prevValue = output[key2];
|
303436
|
+
output[key2] = isPlainObject6(prevValue) && isPlainObject6(value4) ? deepMerge3(prevValue, value4) : value4;
|
303437
|
+
}
|
303438
|
+
}
|
303439
|
+
return output;
|
303440
|
+
}
|
303441
|
+
function makeTheme2(...themes) {
|
303442
|
+
const themesToMerge = [
|
303443
|
+
defaultTheme2,
|
303444
|
+
...themes.filter((theme) => theme != null)
|
303445
|
+
];
|
303446
|
+
return deepMerge3(...themesToMerge);
|
303447
|
+
}
|
303448
|
+
|
303449
|
+
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/use-prefix.js
|
303450
|
+
function usePrefix2({ status = "idle", theme }) {
|
303451
|
+
const [showLoader, setShowLoader] = useState2(false);
|
303452
|
+
const [tick, setTick] = useState2(0);
|
303453
|
+
const { prefix, spinner: spinner2 } = makeTheme2(theme);
|
303454
|
+
useEffect2(() => {
|
303455
|
+
if (status === "loading") {
|
303456
|
+
let tickInterval;
|
303457
|
+
let inc = -1;
|
303458
|
+
const delayTimeout = setTimeout(() => {
|
303459
|
+
setShowLoader(true);
|
303460
|
+
tickInterval = setInterval(() => {
|
303461
|
+
inc = inc + 1;
|
303462
|
+
setTick(inc % spinner2.frames.length);
|
303463
|
+
}, spinner2.interval);
|
303464
|
+
}, 300);
|
303465
|
+
return () => {
|
303466
|
+
clearTimeout(delayTimeout);
|
303467
|
+
clearInterval(tickInterval);
|
303468
|
+
};
|
303469
|
+
} else {
|
303470
|
+
setShowLoader(false);
|
303471
|
+
}
|
303472
|
+
}, [status]);
|
303473
|
+
if (showLoader) {
|
303474
|
+
return spinner2.frames[tick];
|
303475
|
+
}
|
303476
|
+
const iconName = status === "loading" ? "idle" : status;
|
303477
|
+
return typeof prefix === "string" ? prefix : prefix[iconName] ?? prefix["idle"];
|
303478
|
+
}
|
303479
|
+
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/use-ref.js
|
303480
|
+
function useRef2(val) {
|
303481
|
+
return useState2({ current: val })[0];
|
303482
|
+
}
|
303483
|
+
|
303484
|
+
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/use-keypress.js
|
303485
|
+
function useKeypress2(userHandler) {
|
303486
|
+
const signal = useRef2(userHandler);
|
303487
|
+
signal.current = userHandler;
|
303488
|
+
useEffect2((rl) => {
|
303489
|
+
let ignore = false;
|
303490
|
+
const handler = withUpdates2((_input, event) => {
|
303491
|
+
if (ignore)
|
303492
|
+
return;
|
303493
|
+
signal.current(event, rl);
|
303494
|
+
});
|
303495
|
+
rl.input.on("keypress", handler);
|
303496
|
+
return () => {
|
303497
|
+
ignore = true;
|
303498
|
+
rl.input.removeListener("keypress", handler);
|
303499
|
+
};
|
303500
|
+
}, []);
|
303501
|
+
}
|
303502
|
+
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/utils.js
|
303503
|
+
var import_cli_width2 = __toESM(require_cli_width(), 1);
|
303504
|
+
var import_wrap_ansi2 = __toESM(require_wrap_ansi(), 1);
|
303505
|
+
function breakLines2(content, width) {
|
303506
|
+
return content.split(`
|
303507
|
+
`).flatMap((line) => import_wrap_ansi2.default(line, width, { trim: false, hard: true }).split(`
|
303508
|
+
`).map((str) => str.trimEnd())).join(`
|
303509
|
+
`);
|
303510
|
+
}
|
303511
|
+
function readlineWidth2() {
|
303512
|
+
return import_cli_width2.default({ defaultWidth: 80, output: readline3().output });
|
303513
|
+
}
|
303514
|
+
|
303515
|
+
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
|
303516
|
+
var import_mute_stream2 = __toESM(require_lib(), 1);
|
303517
|
+
import * as readline4 from "node:readline";
|
303518
|
+
import { AsyncResource as AsyncResource6 } from "node:async_hooks";
|
303519
|
+
|
303520
|
+
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/screen-manager.js
|
303521
|
+
var import_ansi_escapes2 = __toESM(require_ansi_escapes(), 1);
|
303522
|
+
import { stripVTControlCharacters as stripVTControlCharacters3 } from "node:util";
|
303523
|
+
var height2 = (content) => content.split(`
|
303524
|
+
`).length;
|
303525
|
+
var lastLine2 = (content) => content.split(`
|
303526
|
+
`).pop() ?? "";
|
303527
|
+
function cursorDown2(n6) {
|
303528
|
+
return n6 > 0 ? import_ansi_escapes2.default.cursorDown(n6) : "";
|
303529
|
+
}
|
303530
|
+
|
303531
|
+
class ScreenManager2 {
|
303532
|
+
height = 0;
|
303533
|
+
extraLinesUnderPrompt = 0;
|
303534
|
+
cursorPos;
|
303535
|
+
rl;
|
303536
|
+
constructor(rl) {
|
303537
|
+
this.rl = rl;
|
303538
|
+
this.cursorPos = rl.getCursorPos();
|
303539
|
+
}
|
303540
|
+
write(content) {
|
303541
|
+
this.rl.output.unmute();
|
303542
|
+
this.rl.output.write(content);
|
303543
|
+
this.rl.output.mute();
|
303544
|
+
}
|
303545
|
+
render(content, bottomContent = "") {
|
303546
|
+
const promptLine = lastLine2(content);
|
303547
|
+
const rawPromptLine = stripVTControlCharacters3(promptLine);
|
303548
|
+
let prompt = rawPromptLine;
|
303549
|
+
if (this.rl.line.length > 0) {
|
303550
|
+
prompt = prompt.slice(0, -this.rl.line.length);
|
303551
|
+
}
|
303552
|
+
this.rl.setPrompt(prompt);
|
303553
|
+
this.cursorPos = this.rl.getCursorPos();
|
303554
|
+
const width = readlineWidth2();
|
303555
|
+
content = breakLines2(content, width);
|
303556
|
+
bottomContent = breakLines2(bottomContent, width);
|
303557
|
+
if (rawPromptLine.length % width === 0) {
|
303558
|
+
content += `
|
303559
|
+
`;
|
303560
|
+
}
|
303561
|
+
let output = content + (bottomContent ? `
|
303562
|
+
` + bottomContent : "");
|
303563
|
+
const promptLineUpDiff = Math.floor(rawPromptLine.length / width) - this.cursorPos.rows;
|
303564
|
+
const bottomContentHeight = promptLineUpDiff + (bottomContent ? height2(bottomContent) : 0);
|
303565
|
+
if (bottomContentHeight > 0)
|
303566
|
+
output += import_ansi_escapes2.default.cursorUp(bottomContentHeight);
|
303567
|
+
output += import_ansi_escapes2.default.cursorTo(this.cursorPos.cols);
|
303568
|
+
this.write(cursorDown2(this.extraLinesUnderPrompt) + import_ansi_escapes2.default.eraseLines(this.height) + output);
|
303569
|
+
this.extraLinesUnderPrompt = bottomContentHeight;
|
303570
|
+
this.height = height2(output);
|
303571
|
+
}
|
303572
|
+
checkCursorPos() {
|
303573
|
+
const cursorPos = this.rl.getCursorPos();
|
303574
|
+
if (cursorPos.cols !== this.cursorPos.cols) {
|
303575
|
+
this.write(import_ansi_escapes2.default.cursorTo(cursorPos.cols));
|
303576
|
+
this.cursorPos = cursorPos;
|
303577
|
+
}
|
303578
|
+
}
|
303579
|
+
done({ clearContent }) {
|
303580
|
+
this.rl.setPrompt("");
|
303581
|
+
let output = cursorDown2(this.extraLinesUnderPrompt);
|
303582
|
+
output += clearContent ? import_ansi_escapes2.default.eraseLines(this.height) : `
|
303583
|
+
`;
|
303584
|
+
output += import_ansi_escapes2.default.cursorShow;
|
303585
|
+
this.write(output);
|
303586
|
+
this.rl.close();
|
303587
|
+
}
|
303588
|
+
}
|
303589
|
+
|
303590
|
+
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/promise-polyfill.js
|
303591
|
+
class PromisePolyfill2 extends Promise {
|
303592
|
+
static withResolver() {
|
303593
|
+
let resolve5;
|
303594
|
+
let reject;
|
303595
|
+
const promise4 = new Promise((res, rej) => {
|
303596
|
+
resolve5 = res;
|
303597
|
+
reject = rej;
|
303598
|
+
});
|
303599
|
+
return { promise: promise4, resolve: resolve5, reject };
|
303600
|
+
}
|
303601
|
+
}
|
303602
|
+
|
303603
|
+
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
|
303604
|
+
function getCallSites2() {
|
303605
|
+
const _prepareStackTrace = Error.prepareStackTrace;
|
303606
|
+
let result = [];
|
303607
|
+
try {
|
303608
|
+
Error.prepareStackTrace = (_5, callSites) => {
|
303609
|
+
const callSitesWithoutCurrent = callSites.slice(1);
|
303610
|
+
result = callSitesWithoutCurrent;
|
303611
|
+
return callSitesWithoutCurrent;
|
303612
|
+
};
|
303613
|
+
new Error().stack;
|
303614
|
+
} catch {
|
303615
|
+
return result;
|
303616
|
+
}
|
303617
|
+
Error.prepareStackTrace = _prepareStackTrace;
|
303618
|
+
return result;
|
303619
|
+
}
|
303620
|
+
function createPrompt2(view) {
|
303621
|
+
const callSites = getCallSites2();
|
303622
|
+
const prompt = (config4, context = {}) => {
|
303623
|
+
const { input = process.stdin, signal } = context;
|
303624
|
+
const cleanups = new Set;
|
303625
|
+
const output = new import_mute_stream2.default;
|
303626
|
+
output.pipe(context.output ?? process.stdout);
|
303627
|
+
const rl = readline4.createInterface({
|
303628
|
+
terminal: true,
|
303629
|
+
input,
|
303630
|
+
output
|
303631
|
+
});
|
303632
|
+
const screen = new ScreenManager2(rl);
|
303633
|
+
const { promise: promise4, resolve: resolve5, reject } = PromisePolyfill2.withResolver();
|
303634
|
+
const cancel3 = () => reject(new CancelPromptError2);
|
303635
|
+
if (signal) {
|
303636
|
+
const abort = () => reject(new AbortPromptError2({ cause: signal.reason }));
|
303637
|
+
if (signal.aborted) {
|
303638
|
+
abort();
|
303639
|
+
return Object.assign(promise4, { cancel: cancel3 });
|
303640
|
+
}
|
303641
|
+
signal.addEventListener("abort", abort);
|
303642
|
+
cleanups.add(() => signal.removeEventListener("abort", abort));
|
303643
|
+
}
|
303644
|
+
cleanups.add(onExit((code2, signal2) => {
|
303645
|
+
reject(new ExitPromptError2(`User force closed the prompt with ${code2} ${signal2}`));
|
303646
|
+
}));
|
303647
|
+
const sigint = () => reject(new ExitPromptError2(`User force closed the prompt with SIGINT`));
|
303648
|
+
rl.on("SIGINT", sigint);
|
303649
|
+
cleanups.add(() => rl.removeListener("SIGINT", sigint));
|
303650
|
+
const checkCursorPos = () => screen.checkCursorPos();
|
303651
|
+
rl.input.on("keypress", checkCursorPos);
|
303652
|
+
cleanups.add(() => rl.input.removeListener("keypress", checkCursorPos));
|
303653
|
+
return withHooks2(rl, (cycle) => {
|
303654
|
+
const hooksCleanup = AsyncResource6.bind(() => effectScheduler2.clearAll());
|
303655
|
+
rl.on("close", hooksCleanup);
|
303656
|
+
cleanups.add(() => rl.removeListener("close", hooksCleanup));
|
303657
|
+
cycle(() => {
|
303658
|
+
try {
|
303659
|
+
const nextView = view(config4, (value4) => {
|
303660
|
+
setImmediate(() => resolve5(value4));
|
303661
|
+
});
|
303662
|
+
if (nextView === undefined) {
|
303663
|
+
const callerFilename = callSites[1]?.getFileName();
|
303664
|
+
throw new Error(`Prompt functions must return a string.
|
303665
|
+
at ${callerFilename}`);
|
303666
|
+
}
|
303667
|
+
const [content, bottomContent] = typeof nextView === "string" ? [nextView] : nextView;
|
303668
|
+
screen.render(content, bottomContent);
|
303669
|
+
effectScheduler2.run();
|
303670
|
+
} catch (error44) {
|
303671
|
+
reject(error44);
|
303672
|
+
}
|
303673
|
+
});
|
303674
|
+
return Object.assign(promise4.then((answer) => {
|
303675
|
+
effectScheduler2.clearAll();
|
303676
|
+
return answer;
|
303677
|
+
}, (error44) => {
|
303678
|
+
effectScheduler2.clearAll();
|
303679
|
+
throw error44;
|
303680
|
+
}).finally(() => {
|
303681
|
+
cleanups.forEach((cleanup) => cleanup());
|
303682
|
+
screen.done({ clearContent: Boolean(context.clearPromptOnDone) });
|
303683
|
+
output.end();
|
303684
|
+
}).then(() => promise4), { cancel: cancel3 });
|
303685
|
+
});
|
303686
|
+
};
|
303687
|
+
return prompt;
|
303688
|
+
}
|
303014
303689
|
// ../../node_modules/@inquirer/input/dist/esm/index.js
|
303015
303690
|
var inputTheme = {
|
303016
303691
|
validationFailureMode: "keep"
|
303017
303692
|
};
|
303018
|
-
var esm_default2 =
|
303019
|
-
const { required: required4, validate: validate3 = () => true } = config4;
|
303020
|
-
const theme =
|
303021
|
-
const [status, setStatus] =
|
303022
|
-
const [defaultValue = "", setDefaultValue] =
|
303023
|
-
const [errorMsg, setError] =
|
303024
|
-
const [value4, setValue] =
|
303025
|
-
const prefix =
|
303026
|
-
|
303693
|
+
var esm_default2 = createPrompt2((config4, done) => {
|
303694
|
+
const { required: required4, validate: validate3 = () => true, prefill = "tab" } = config4;
|
303695
|
+
const theme = makeTheme2(inputTheme, config4.theme);
|
303696
|
+
const [status, setStatus] = useState2("idle");
|
303697
|
+
const [defaultValue = "", setDefaultValue] = useState2(config4.default);
|
303698
|
+
const [errorMsg, setError] = useState2();
|
303699
|
+
const [value4, setValue] = useState2("");
|
303700
|
+
const prefix = usePrefix2({ status, theme });
|
303701
|
+
useKeypress2(async (key3, rl) => {
|
303027
303702
|
if (status !== "idle") {
|
303028
303703
|
return;
|
303029
303704
|
}
|
303030
|
-
if (
|
303705
|
+
if (isEnterKey2(key3)) {
|
303031
303706
|
const answer = value4 || defaultValue;
|
303032
303707
|
setStatus("loading");
|
303033
303708
|
const isValid = required4 && !answer ? "You must provide a value" : await validate3(answer);
|
@@ -303044,9 +303719,9 @@ var esm_default2 = createPrompt((config4, done) => {
|
|
303044
303719
|
setError(isValid || "You must provide a valid value");
|
303045
303720
|
setStatus("idle");
|
303046
303721
|
}
|
303047
|
-
} else if (
|
303722
|
+
} else if (isBackspaceKey2(key3) && !value4) {
|
303048
303723
|
setDefaultValue(undefined);
|
303049
|
-
} else if (
|
303724
|
+
} else if (key3.name === "tab" && !value4) {
|
303050
303725
|
setDefaultValue(undefined);
|
303051
303726
|
rl.clearLine(0);
|
303052
303727
|
rl.write(defaultValue);
|
@@ -303056,6 +303731,12 @@ var esm_default2 = createPrompt((config4, done) => {
|
|
303056
303731
|
setError(undefined);
|
303057
303732
|
}
|
303058
303733
|
});
|
303734
|
+
useEffect2((rl) => {
|
303735
|
+
if (prefill === "editable" && defaultValue) {
|
303736
|
+
rl.write(defaultValue);
|
303737
|
+
setValue(defaultValue);
|
303738
|
+
}
|
303739
|
+
}, []);
|
303059
303740
|
const message = theme.style.message(config4.message, status);
|
303060
303741
|
let formattedValue = value4;
|
303061
303742
|
if (typeof config4.transformer === "function") {
|
@@ -303096,13 +303777,13 @@ async function subgraphNamePrompt({
|
|
303096
303777
|
}
|
303097
303778
|
|
303098
303779
|
// ../../node_modules/@inquirer/select/dist/esm/index.js
|
303099
|
-
var
|
303100
|
-
var
|
303780
|
+
var import_yoctocolors_cjs4 = __toESM(require_yoctocolors_cjs(), 1);
|
303781
|
+
var import_ansi_escapes3 = __toESM(require_ansi_escapes(), 1);
|
303101
303782
|
var selectTheme = {
|
303102
303783
|
icon: { cursor: esm_default.pointer },
|
303103
303784
|
style: {
|
303104
|
-
disabled: (text2) =>
|
303105
|
-
description: (text2) =>
|
303785
|
+
disabled: (text2) => import_yoctocolors_cjs4.default.dim(`- ${text2}`),
|
303786
|
+
description: (text2) => import_yoctocolors_cjs4.default.cyan(text2)
|
303106
303787
|
},
|
303107
303788
|
helpMode: "auto",
|
303108
303789
|
indexMode: "hidden"
|
@@ -303158,22 +303839,22 @@ var esm_default3 = createPrompt((config4, done) => {
|
|
303158
303839
|
}, [config4.default, items]);
|
303159
303840
|
const [active, setActive] = useState(defaultItemIndex === -1 ? bounds.first : defaultItemIndex);
|
303160
303841
|
const selectedChoice = items[active];
|
303161
|
-
useKeypress((
|
303842
|
+
useKeypress((key3, rl) => {
|
303162
303843
|
clearTimeout(searchTimeoutRef.current);
|
303163
|
-
if (isEnterKey(
|
303844
|
+
if (isEnterKey(key3)) {
|
303164
303845
|
setStatus("done");
|
303165
303846
|
done(selectedChoice.value);
|
303166
|
-
} else if (isUpKey(
|
303847
|
+
} else if (isUpKey(key3) || isDownKey(key3)) {
|
303167
303848
|
rl.clearLine(0);
|
303168
|
-
if (loop || isUpKey(
|
303169
|
-
const offset = isUpKey(
|
303849
|
+
if (loop || isUpKey(key3) && active !== bounds.first || isDownKey(key3) && active !== bounds.last) {
|
303850
|
+
const offset = isUpKey(key3) ? -1 : 1;
|
303170
303851
|
let next = active;
|
303171
303852
|
do {
|
303172
303853
|
next = (next + offset + items.length) % items.length;
|
303173
303854
|
} while (!isSelectable(items[next]));
|
303174
303855
|
setActive(next);
|
303175
303856
|
}
|
303176
|
-
} else if (isNumberKey(
|
303857
|
+
} else if (isNumberKey(key3) && !Number.isNaN(Number(rl.line))) {
|
303177
303858
|
const position = Number(rl.line) - 1;
|
303178
303859
|
const item = items[position];
|
303179
303860
|
if (item != null && isSelectable(item)) {
|
@@ -303182,7 +303863,7 @@ var esm_default3 = createPrompt((config4, done) => {
|
|
303182
303863
|
searchTimeoutRef.current = setTimeout(() => {
|
303183
303864
|
rl.clearLine(0);
|
303184
303865
|
}, 700);
|
303185
|
-
} else if (isBackspaceKey(
|
303866
|
+
} else if (isBackspaceKey(key3)) {
|
303186
303867
|
rl.clearLine(0);
|
303187
303868
|
} else {
|
303188
303869
|
const searchTerm = rl.line.toLowerCase();
|
@@ -303239,7 +303920,7 @@ ${theme.style.help(`(${config4.instructions?.pager ?? "Use arrow keys to reveal
|
|
303239
303920
|
const choiceDescription = selectedChoice.description ? `
|
303240
303921
|
${theme.style.description(selectedChoice.description)}` : ``;
|
303241
303922
|
return `${[prefix, message, helpTipTop].filter(Boolean).join(" ")}
|
303242
|
-
${page}${helpTipBottom}${choiceDescription}${
|
303923
|
+
${page}${helpTipBottom}${choiceDescription}${import_ansi_escapes3.default.cursorHide}`;
|
303243
303924
|
});
|
303244
303925
|
|
303245
303926
|
// src/prompts/smart-contract-set/subgraph.prompt.ts
|
@@ -304820,14 +305501,14 @@ function includesArgs(parameters) {
|
|
304820
305501
|
});
|
304821
305502
|
}
|
304822
305503
|
if (typeof args === "object" && !Array.isArray(args) && typeof matchArgs === "object" && !Array.isArray(matchArgs))
|
304823
|
-
return Object.entries(matchArgs).every(([
|
305504
|
+
return Object.entries(matchArgs).every(([key3, value4]) => {
|
304824
305505
|
if (value4 === null || value4 === undefined)
|
304825
305506
|
return true;
|
304826
|
-
const input = inputs.find((input2) => input2.name ===
|
305507
|
+
const input = inputs.find((input2) => input2.name === key3);
|
304827
305508
|
if (!input)
|
304828
305509
|
return false;
|
304829
305510
|
const value_ = Array.isArray(value4) ? value4 : [value4];
|
304830
|
-
return value_.some((value5) => isEqual(input, value5, args[
|
305511
|
+
return value_.some((value5) => isEqual(input, value5, args[key3]));
|
304831
305512
|
});
|
304832
305513
|
return false;
|
304833
305514
|
}
|
@@ -305026,13 +305707,13 @@ function observe(observerId, callbacks, fn) {
|
|
305026
305707
|
if (listeners && listeners.length > 0)
|
305027
305708
|
return unwatch;
|
305028
305709
|
const emit = {};
|
305029
|
-
for (const
|
305030
|
-
emit[
|
305710
|
+
for (const key3 in callbacks) {
|
305711
|
+
emit[key3] = (...args) => {
|
305031
305712
|
const listeners2 = getListeners();
|
305032
305713
|
if (listeners2.length === 0)
|
305033
305714
|
return;
|
305034
305715
|
for (const listener of listeners2)
|
305035
|
-
listener.fns[
|
305716
|
+
listener.fns[key3]?.(...args);
|
305036
305717
|
};
|
305037
305718
|
}
|
305038
305719
|
const cleanup = fn(emit);
|
@@ -305154,9 +305835,9 @@ function watchContractEvent(client, parameters) {
|
|
305154
305835
|
return poll_;
|
305155
305836
|
if (typeof fromBlock === "bigint")
|
305156
305837
|
return true;
|
305157
|
-
if (client.transport.type === "webSocket")
|
305838
|
+
if (client.transport.type === "webSocket" || client.transport.type === "ipc")
|
305158
305839
|
return false;
|
305159
|
-
if (client.transport.type === "fallback" && client.transport.transports[0].config.type === "webSocket")
|
305840
|
+
if (client.transport.type === "fallback" && (client.transport.transports[0].config.type === "webSocket" || client.transport.transports[0].config.type === "ipc"))
|
305160
305841
|
return false;
|
305161
305842
|
return true;
|
305162
305843
|
})();
|
@@ -305257,7 +305938,7 @@ function watchContractEvent(client, parameters) {
|
|
305257
305938
|
try {
|
305258
305939
|
const transport = (() => {
|
305259
305940
|
if (client.transport.type === "fallback") {
|
305260
|
-
const transport2 = client.transport.transports.find((transport3) => transport3.config.type === "webSocket");
|
305941
|
+
const transport2 = client.transport.transports.find((transport3) => transport3.config.type === "webSocket" || transport3.config.type === "ipc");
|
305261
305942
|
if (!transport2)
|
305262
305943
|
return client.transport;
|
305263
305944
|
return transport2.value;
|
@@ -305371,7 +306052,7 @@ function uid(length = 11) {
|
|
305371
306052
|
|
305372
306053
|
// ../../node_modules/viem/_esm/clients/createClient.js
|
305373
306054
|
function createClient(parameters) {
|
305374
|
-
const { batch, chain, ccipRead, key:
|
306055
|
+
const { batch, chain, ccipRead, key: key3 = "base", name: name3 = "Base Client", type: type4 = "base" } = parameters;
|
305375
306056
|
const blockTime = chain?.blockTime ?? 12000;
|
305376
306057
|
const defaultPollingInterval = Math.min(Math.max(Math.floor(blockTime / 2), 500), 4000);
|
305377
306058
|
const pollingInterval = parameters.pollingInterval ?? defaultPollingInterval;
|
@@ -305388,7 +306069,7 @@ function createClient(parameters) {
|
|
305388
306069
|
cacheTime,
|
305389
306070
|
ccipRead,
|
305390
306071
|
chain,
|
305391
|
-
key:
|
306072
|
+
key: key3,
|
305392
306073
|
name: name3,
|
305393
306074
|
pollingInterval,
|
305394
306075
|
request: request2,
|
@@ -305399,8 +306080,8 @@ function createClient(parameters) {
|
|
305399
306080
|
function extend4(base2) {
|
305400
306081
|
return (extendFn) => {
|
305401
306082
|
const extended = extendFn(base2);
|
305402
|
-
for (const
|
305403
|
-
delete extended[
|
306083
|
+
for (const key4 in client)
|
306084
|
+
delete extended[key4];
|
305404
306085
|
const combined = { ...base2, ...extended };
|
305405
306086
|
return Object.assign(combined, { extend: extend4(combined) });
|
305406
306087
|
};
|
@@ -305580,11 +306261,11 @@ function shouldRetry(error44) {
|
|
305580
306261
|
}
|
305581
306262
|
|
305582
306263
|
// ../../node_modules/viem/_esm/clients/transports/createTransport.js
|
305583
|
-
function createTransport({ key:
|
306264
|
+
function createTransport({ key: key3, methods, name: name3, request: request2, retryCount = 3, retryDelay = 150, timeout, type: type4 }, value4) {
|
305584
306265
|
const uid2 = uid();
|
305585
306266
|
return {
|
305586
306267
|
config: {
|
305587
|
-
key:
|
306268
|
+
key: key3,
|
305588
306269
|
methods,
|
305589
306270
|
name: name3,
|
305590
306271
|
request: request2,
|
@@ -305741,7 +306422,7 @@ function getHttpRpcClient(url4, options = {}) {
|
|
305741
306422
|
|
305742
306423
|
// ../../node_modules/viem/_esm/clients/transports/http.js
|
305743
306424
|
function http(url4, config4 = {}) {
|
305744
|
-
const { batch, fetchOptions, key:
|
306425
|
+
const { batch, fetchOptions, key: key3 = "http", methods, name: name3 = "HTTP JSON-RPC", onFetchRequest, onFetchResponse, retryDelay, raw } = config4;
|
305745
306426
|
return ({ chain, retryCount: retryCount_, timeout: timeout_ }) => {
|
305746
306427
|
const { batchSize = 1000, wait: wait2 = 0 } = typeof batch === "object" ? batch : {};
|
305747
306428
|
const retryCount = config4.retryCount ?? retryCount_;
|
@@ -305756,7 +306437,7 @@ function http(url4, config4 = {}) {
|
|
305756
306437
|
timeout
|
305757
306438
|
});
|
305758
306439
|
return createTransport({
|
305759
|
-
key:
|
306440
|
+
key: key3,
|
305760
306441
|
methods,
|
305761
306442
|
name: name3,
|
305762
306443
|
async request({ method, params }) {
|
@@ -306207,7 +306888,7 @@ init_getChainContractAddress();
|
|
306207
306888
|
init_toHex();
|
306208
306889
|
init_localBatchGatewayRequest();
|
306209
306890
|
async function getEnsText(client, parameters) {
|
306210
|
-
const { blockNumber, blockTag, key:
|
306891
|
+
const { blockNumber, blockTag, key: key3, name: name3, gatewayUrls, strict } = parameters;
|
306211
306892
|
const { chain } = client;
|
306212
306893
|
const universalResolverAddress = (() => {
|
306213
306894
|
if (parameters.universalResolverAddress)
|
@@ -306233,7 +306914,7 @@ async function getEnsText(client, parameters) {
|
|
306233
306914
|
encodeFunctionData({
|
306234
306915
|
abi: textResolverAbi,
|
306235
306916
|
functionName: "text",
|
306236
|
-
args: [namehash(name3),
|
306917
|
+
args: [namehash(name3), key3]
|
306237
306918
|
}),
|
306238
306919
|
gatewayUrls ?? [localBatchGatewayUrl]
|
306239
306920
|
],
|
@@ -307145,9 +307826,10 @@ async function simulateBlocks(client, parameters) {
|
|
307145
307826
|
const calls = block2.calls.map((call_) => {
|
307146
307827
|
const call2 = call_;
|
307147
307828
|
const account = call2.account ? parseAccount(call2.account) : undefined;
|
307829
|
+
const data = call2.abi ? encodeFunctionData(call2) : call2.data;
|
307148
307830
|
const request2 = {
|
307149
307831
|
...call2,
|
307150
|
-
data: call2.
|
307832
|
+
data: call2.dataSuffix ? concat2([data || "0x", call2.dataSuffix]) : data,
|
307151
307833
|
from: call2.from ?? account?.address
|
307152
307834
|
};
|
307153
307835
|
assertRequest(request2);
|
@@ -307255,16 +307937,16 @@ class LruMap2 extends Map {
|
|
307255
307937
|
});
|
307256
307938
|
this.maxSize = size5;
|
307257
307939
|
}
|
307258
|
-
get(
|
307259
|
-
const value4 = super.get(
|
307260
|
-
if (super.has(
|
307261
|
-
this.delete(
|
307262
|
-
super.set(
|
307940
|
+
get(key3) {
|
307941
|
+
const value4 = super.get(key3);
|
307942
|
+
if (super.has(key3) && value4 !== undefined) {
|
307943
|
+
this.delete(key3);
|
307944
|
+
super.set(key3, value4);
|
307263
307945
|
}
|
307264
307946
|
return value4;
|
307265
307947
|
}
|
307266
|
-
set(
|
307267
|
-
super.set(
|
307948
|
+
set(key3, value4) {
|
307949
|
+
super.set(key3, value4);
|
307268
307950
|
if (this.maxSize && this.size > this.maxSize) {
|
307269
307951
|
const firstKey = this.keys().next().value;
|
307270
307952
|
if (firstKey)
|
@@ -308417,9 +309099,9 @@ function watchBlockNumber(client, { emitOnBegin = false, emitMissed = false, onB
|
|
308417
309099
|
const enablePolling = (() => {
|
308418
309100
|
if (typeof poll_ !== "undefined")
|
308419
309101
|
return poll_;
|
308420
|
-
if (client.transport.type === "webSocket")
|
309102
|
+
if (client.transport.type === "webSocket" || client.transport.type === "ipc")
|
308421
309103
|
return false;
|
308422
|
-
if (client.transport.type === "fallback" && client.transport.transports[0].config.type === "webSocket")
|
309104
|
+
if (client.transport.type === "fallback" && (client.transport.transports[0].config.type === "webSocket" || client.transport.transports[0].config.type === "ipc"))
|
308423
309105
|
return false;
|
308424
309106
|
return true;
|
308425
309107
|
})();
|
@@ -308471,7 +309153,7 @@ function watchBlockNumber(client, { emitOnBegin = false, emitMissed = false, onB
|
|
308471
309153
|
try {
|
308472
309154
|
const transport = (() => {
|
308473
309155
|
if (client.transport.type === "fallback") {
|
308474
|
-
const transport2 = client.transport.transports.find((transport3) => transport3.config.type === "webSocket");
|
309156
|
+
const transport2 = client.transport.transports.find((transport3) => transport3.config.type === "webSocket" || transport3.config.type === "ipc");
|
308475
309157
|
if (!transport2)
|
308476
309158
|
return client.transport;
|
308477
309159
|
return transport2.value;
|
@@ -308624,9 +309306,9 @@ function watchBlocks(client, { blockTag = "latest", emitMissed = false, emitOnBe
|
|
308624
309306
|
const enablePolling = (() => {
|
308625
309307
|
if (typeof poll_ !== "undefined")
|
308626
309308
|
return poll_;
|
308627
|
-
if (client.transport.type === "webSocket")
|
309309
|
+
if (client.transport.type === "webSocket" || client.transport.type === "ipc")
|
308628
309310
|
return false;
|
308629
|
-
if (client.transport.type === "fallback" && client.transport.transports[0].config.type === "webSocket")
|
309311
|
+
if (client.transport.type === "fallback" && (client.transport.transports[0].config.type === "webSocket" || client.transport.transports[0].config.type === "ipc"))
|
308630
309312
|
return false;
|
308631
309313
|
return true;
|
308632
309314
|
})();
|
@@ -308695,7 +309377,7 @@ function watchBlocks(client, { blockTag = "latest", emitMissed = false, emitOnBe
|
|
308695
309377
|
}
|
308696
309378
|
const transport = (() => {
|
308697
309379
|
if (client.transport.type === "fallback") {
|
308698
|
-
const transport2 = client.transport.transports.find((transport3) => transport3.config.type === "webSocket");
|
309380
|
+
const transport2 = client.transport.transports.find((transport3) => transport3.config.type === "webSocket" || transport3.config.type === "ipc");
|
308699
309381
|
if (!transport2)
|
308700
309382
|
return client.transport;
|
308701
309383
|
return transport2.value;
|
@@ -308742,9 +309424,9 @@ function watchEvent(client, { address, args, batch = true, event, events, fromBl
|
|
308742
309424
|
return poll_;
|
308743
309425
|
if (typeof fromBlock === "bigint")
|
308744
309426
|
return true;
|
308745
|
-
if (client.transport.type === "webSocket")
|
309427
|
+
if (client.transport.type === "webSocket" || client.transport.type === "ipc")
|
308746
309428
|
return false;
|
308747
|
-
if (client.transport.type === "fallback" && client.transport.transports[0].config.type === "webSocket")
|
309429
|
+
if (client.transport.type === "fallback" && (client.transport.transports[0].config.type === "webSocket" || client.transport.transports[0].config.type === "ipc"))
|
308748
309430
|
return false;
|
308749
309431
|
return true;
|
308750
309432
|
})();
|
@@ -308831,7 +309513,7 @@ function watchEvent(client, { address, args, batch = true, event, events, fromBl
|
|
308831
309513
|
try {
|
308832
309514
|
const transport = (() => {
|
308833
309515
|
if (client.transport.type === "fallback") {
|
308834
|
-
const transport2 = client.transport.transports.find((transport3) => transport3.config.type === "webSocket");
|
309516
|
+
const transport2 = client.transport.transports.find((transport3) => transport3.config.type === "webSocket" || transport3.config.type === "ipc");
|
308835
309517
|
if (!transport2)
|
308836
309518
|
return client.transport;
|
308837
309519
|
return transport2.value;
|
@@ -308898,7 +309580,7 @@ function watchEvent(client, { address, args, batch = true, event, events, fromBl
|
|
308898
309580
|
}
|
308899
309581
|
// ../../node_modules/viem/_esm/actions/public/watchPendingTransactions.js
|
308900
309582
|
function watchPendingTransactions(client, { batch = true, onError, onTransactions, poll: poll_, pollingInterval = client.pollingInterval }) {
|
308901
|
-
const enablePolling = typeof poll_ !== "undefined" ? poll_ : client.transport.type !== "webSocket";
|
309583
|
+
const enablePolling = typeof poll_ !== "undefined" ? poll_ : client.transport.type !== "webSocket" && client.transport.type !== "ipc";
|
308902
309584
|
const pollPendingTransactions = () => {
|
308903
309585
|
const observerId = stringify3([
|
308904
309586
|
"watchPendingTransactions",
|
@@ -309107,10 +309789,10 @@ function publicActions(client) {
|
|
309107
309789
|
|
309108
309790
|
// ../../node_modules/viem/_esm/clients/createPublicClient.js
|
309109
309791
|
function createPublicClient(parameters) {
|
309110
|
-
const { key:
|
309792
|
+
const { key: key3 = "public", name: name3 = "Public Client" } = parameters;
|
309111
309793
|
const client = createClient({
|
309112
309794
|
...parameters,
|
309113
|
-
key:
|
309795
|
+
key: key3,
|
309114
309796
|
name: name3,
|
309115
309797
|
type: "publicClient"
|
309116
309798
|
});
|
@@ -309211,7 +309893,7 @@ __export4(util_exports3, {
|
|
309211
309893
|
getParsedType: () => getParsedType4,
|
309212
309894
|
getSizableOrigin: () => getSizableOrigin4,
|
309213
309895
|
isObject: () => isObject4,
|
309214
|
-
isPlainObject: () =>
|
309896
|
+
isPlainObject: () => isPlainObject7,
|
309215
309897
|
issue: () => issue4,
|
309216
309898
|
joinValues: () => joinValues4,
|
309217
309899
|
jsonStringifyReplacer: () => jsonStringifyReplacer4,
|
@@ -309283,19 +309965,19 @@ function floatSafeRemainder4(val, step) {
|
|
309283
309965
|
const stepInt = Number.parseInt(step.toFixed(decCount).replace(".", ""));
|
309284
309966
|
return valInt % stepInt / 10 ** decCount;
|
309285
309967
|
}
|
309286
|
-
function defineLazy4(object$1,
|
309968
|
+
function defineLazy4(object$1, key3, getter) {
|
309287
309969
|
const set$1 = false;
|
309288
|
-
Object.defineProperty(object$1,
|
309970
|
+
Object.defineProperty(object$1, key3, {
|
309289
309971
|
get() {
|
309290
309972
|
if (!set$1) {
|
309291
309973
|
const value4 = getter();
|
309292
|
-
object$1[
|
309974
|
+
object$1[key3] = value4;
|
309293
309975
|
return value4;
|
309294
309976
|
}
|
309295
309977
|
throw new Error("cached value already set");
|
309296
309978
|
},
|
309297
309979
|
set(v6) {
|
309298
|
-
Object.defineProperty(object$1,
|
309980
|
+
Object.defineProperty(object$1, key3, { value: v6 });
|
309299
309981
|
},
|
309300
309982
|
configurable: true
|
309301
309983
|
});
|
@@ -309311,11 +309993,11 @@ function assignProp4(target, prop, value4) {
|
|
309311
309993
|
function getElementAtPath4(obj, path7) {
|
309312
309994
|
if (!path7)
|
309313
309995
|
return obj;
|
309314
|
-
return path7.reduce((acc,
|
309996
|
+
return path7.reduce((acc, key3) => acc?.[key3], obj);
|
309315
309997
|
}
|
309316
309998
|
function promiseAllObject4(promisesObj) {
|
309317
309999
|
const keys = Object.keys(promisesObj);
|
309318
|
-
const promises = keys.map((
|
310000
|
+
const promises = keys.map((key3) => promisesObj[key3]);
|
309319
310001
|
return Promise.all(promises).then((results) => {
|
309320
310002
|
const resolvedObj = {};
|
309321
310003
|
for (let i6 = 0;i6 < keys.length; i6++) {
|
@@ -309347,7 +310029,7 @@ var allowsEval4 = cached4(() => {
|
|
309347
310029
|
return false;
|
309348
310030
|
}
|
309349
310031
|
});
|
309350
|
-
function
|
310032
|
+
function isPlainObject7(o8) {
|
309351
310033
|
if (isObject4(o8) === false)
|
309352
310034
|
return false;
|
309353
310035
|
const ctor = o8.constructor;
|
@@ -309363,8 +310045,8 @@ function isPlainObject6(o8) {
|
|
309363
310045
|
}
|
309364
310046
|
function numKeys4(data) {
|
309365
310047
|
let keyCount = 0;
|
309366
|
-
for (const
|
309367
|
-
if (Object.prototype.hasOwnProperty.call(data,
|
310048
|
+
for (const key3 in data) {
|
310049
|
+
if (Object.prototype.hasOwnProperty.call(data, key3)) {
|
309368
310050
|
keyCount++;
|
309369
310051
|
}
|
309370
310052
|
}
|
@@ -309514,13 +310196,13 @@ var BIGINT_FORMAT_RANGES4 = {
|
|
309514
310196
|
function pick4(schema, mask) {
|
309515
310197
|
const newShape = {};
|
309516
310198
|
const currDef = schema._zod.def;
|
309517
|
-
for (const
|
309518
|
-
if (!(
|
309519
|
-
throw new Error(`Unrecognized key: "${
|
310199
|
+
for (const key3 in mask) {
|
310200
|
+
if (!(key3 in currDef.shape)) {
|
310201
|
+
throw new Error(`Unrecognized key: "${key3}"`);
|
309520
310202
|
}
|
309521
|
-
if (!mask[
|
310203
|
+
if (!mask[key3])
|
309522
310204
|
continue;
|
309523
|
-
newShape[
|
310205
|
+
newShape[key3] = currDef.shape[key3];
|
309524
310206
|
}
|
309525
310207
|
return clone4(schema, {
|
309526
310208
|
...schema._zod.def,
|
@@ -309531,13 +310213,13 @@ function pick4(schema, mask) {
|
|
309531
310213
|
function omit4(schema, mask) {
|
309532
310214
|
const newShape = { ...schema._zod.def.shape };
|
309533
310215
|
const currDef = schema._zod.def;
|
309534
|
-
for (const
|
309535
|
-
if (!(
|
309536
|
-
throw new Error(`Unrecognized key: "${
|
310216
|
+
for (const key3 in mask) {
|
310217
|
+
if (!(key3 in currDef.shape)) {
|
310218
|
+
throw new Error(`Unrecognized key: "${key3}"`);
|
309537
310219
|
}
|
309538
|
-
if (!mask[
|
310220
|
+
if (!mask[key3])
|
309539
310221
|
continue;
|
309540
|
-
delete newShape[
|
310222
|
+
delete newShape[key3];
|
309541
310223
|
}
|
309542
310224
|
return clone4(schema, {
|
309543
310225
|
...schema._zod.def,
|
@@ -309579,23 +310261,23 @@ function partial4(Class$1, schema, mask) {
|
|
309579
310261
|
const oldShape = schema._zod.def.shape;
|
309580
310262
|
const shape = { ...oldShape };
|
309581
310263
|
if (mask) {
|
309582
|
-
for (const
|
309583
|
-
if (!(
|
309584
|
-
throw new Error(`Unrecognized key: "${
|
310264
|
+
for (const key3 in mask) {
|
310265
|
+
if (!(key3 in oldShape)) {
|
310266
|
+
throw new Error(`Unrecognized key: "${key3}"`);
|
309585
310267
|
}
|
309586
|
-
if (!mask[
|
310268
|
+
if (!mask[key3])
|
309587
310269
|
continue;
|
309588
|
-
shape[
|
310270
|
+
shape[key3] = Class$1 ? new Class$1({
|
309589
310271
|
type: "optional",
|
309590
|
-
innerType: oldShape[
|
309591
|
-
}) : oldShape[
|
310272
|
+
innerType: oldShape[key3]
|
310273
|
+
}) : oldShape[key3];
|
309592
310274
|
}
|
309593
310275
|
} else {
|
309594
|
-
for (const
|
309595
|
-
shape[
|
310276
|
+
for (const key3 in oldShape) {
|
310277
|
+
shape[key3] = Class$1 ? new Class$1({
|
309596
310278
|
type: "optional",
|
309597
|
-
innerType: oldShape[
|
309598
|
-
}) : oldShape[
|
310279
|
+
innerType: oldShape[key3]
|
310280
|
+
}) : oldShape[key3];
|
309599
310281
|
}
|
309600
310282
|
}
|
309601
310283
|
return clone4(schema, {
|
@@ -309608,22 +310290,22 @@ function required4(Class$1, schema, mask) {
|
|
309608
310290
|
const oldShape = schema._zod.def.shape;
|
309609
310291
|
const shape = { ...oldShape };
|
309610
310292
|
if (mask) {
|
309611
|
-
for (const
|
309612
|
-
if (!(
|
309613
|
-
throw new Error(`Unrecognized key: "${
|
310293
|
+
for (const key3 in mask) {
|
310294
|
+
if (!(key3 in shape)) {
|
310295
|
+
throw new Error(`Unrecognized key: "${key3}"`);
|
309614
310296
|
}
|
309615
|
-
if (!mask[
|
310297
|
+
if (!mask[key3])
|
309616
310298
|
continue;
|
309617
|
-
shape[
|
310299
|
+
shape[key3] = new Class$1({
|
309618
310300
|
type: "nonoptional",
|
309619
|
-
innerType: oldShape[
|
310301
|
+
innerType: oldShape[key3]
|
309620
310302
|
});
|
309621
310303
|
}
|
309622
310304
|
} else {
|
309623
|
-
for (const
|
309624
|
-
shape[
|
310305
|
+
for (const key3 in oldShape) {
|
310306
|
+
shape[key3] = new Class$1({
|
309625
310307
|
type: "nonoptional",
|
309626
|
-
innerType: oldShape[
|
310308
|
+
innerType: oldShape[key3]
|
309627
310309
|
});
|
309628
310310
|
}
|
309629
310311
|
}
|
@@ -311203,28 +311885,28 @@ var $ZodArray4 = /* @__PURE__ */ $constructor4("$ZodArray", (inst, def) => {
|
|
311203
311885
|
return payload;
|
311204
311886
|
};
|
311205
311887
|
});
|
311206
|
-
function handleObjectResult4(result, final,
|
311888
|
+
function handleObjectResult4(result, final, key3) {
|
311207
311889
|
if (result.issues.length) {
|
311208
|
-
final.issues.push(...prefixIssues4(
|
311890
|
+
final.issues.push(...prefixIssues4(key3, result.issues));
|
311209
311891
|
}
|
311210
|
-
final.value[
|
311892
|
+
final.value[key3] = result.value;
|
311211
311893
|
}
|
311212
|
-
function handleOptionalObjectResult4(result, final,
|
311894
|
+
function handleOptionalObjectResult4(result, final, key3, input) {
|
311213
311895
|
if (result.issues.length) {
|
311214
|
-
if (input[
|
311215
|
-
if (
|
311216
|
-
final.value[
|
311896
|
+
if (input[key3] === undefined) {
|
311897
|
+
if (key3 in input) {
|
311898
|
+
final.value[key3] = undefined;
|
311217
311899
|
} else {
|
311218
|
-
final.value[
|
311900
|
+
final.value[key3] = result.value;
|
311219
311901
|
}
|
311220
311902
|
} else {
|
311221
|
-
final.issues.push(...prefixIssues4(
|
311903
|
+
final.issues.push(...prefixIssues4(key3, result.issues));
|
311222
311904
|
}
|
311223
311905
|
} else if (result.value === undefined) {
|
311224
|
-
if (
|
311225
|
-
final.value[
|
311906
|
+
if (key3 in input)
|
311907
|
+
final.value[key3] = undefined;
|
311226
311908
|
} else {
|
311227
|
-
final.value[
|
311909
|
+
final.value[key3] = result.value;
|
311228
311910
|
}
|
311229
311911
|
}
|
311230
311912
|
var $ZodObject4 = /* @__PURE__ */ $constructor4("$ZodObject", (inst, def) => {
|
@@ -311248,12 +311930,12 @@ var $ZodObject4 = /* @__PURE__ */ $constructor4("$ZodObject", (inst, def) => {
|
|
311248
311930
|
defineLazy4(inst._zod, "propValues", () => {
|
311249
311931
|
const shape = def.shape;
|
311250
311932
|
const propValues = {};
|
311251
|
-
for (const
|
311252
|
-
const field2 = shape[
|
311933
|
+
for (const key3 in shape) {
|
311934
|
+
const field2 = shape[key3]._zod;
|
311253
311935
|
if (field2.values) {
|
311254
|
-
propValues[
|
311936
|
+
propValues[key3] ?? (propValues[key3] = new Set);
|
311255
311937
|
for (const v6 of field2.values)
|
311256
|
-
propValues[
|
311938
|
+
propValues[key3].add(v6);
|
311257
311939
|
}
|
311258
311940
|
}
|
311259
311941
|
return propValues;
|
@@ -311265,21 +311947,21 @@ var $ZodObject4 = /* @__PURE__ */ $constructor4("$ZodObject", (inst, def) => {
|
|
311265
311947
|
"ctx"
|
311266
311948
|
]);
|
311267
311949
|
const { keys, optionalKeys: optionalKeys$1 } = _normalized.value;
|
311268
|
-
const parseStr = (
|
311269
|
-
const k5 = esc4(
|
311950
|
+
const parseStr = (key3) => {
|
311951
|
+
const k5 = esc4(key3);
|
311270
311952
|
return `shape[${k5}]._zod.run({ value: input[${k5}], issues: [] }, ctx)`;
|
311271
311953
|
};
|
311272
311954
|
doc2.write(`const input = payload.value;`);
|
311273
311955
|
const ids = Object.create(null);
|
311274
|
-
for (const
|
311275
|
-
ids[
|
311956
|
+
for (const key3 of keys) {
|
311957
|
+
ids[key3] = randomString4(15);
|
311276
311958
|
}
|
311277
311959
|
doc2.write(`const newResult = {}`);
|
311278
|
-
for (const
|
311279
|
-
if (optionalKeys$1.has(
|
311280
|
-
const id = ids[
|
311281
|
-
doc2.write(`const ${id} = ${parseStr(
|
311282
|
-
const k5 = esc4(
|
311960
|
+
for (const key3 of keys) {
|
311961
|
+
if (optionalKeys$1.has(key3)) {
|
311962
|
+
const id = ids[key3];
|
311963
|
+
doc2.write(`const ${id} = ${parseStr(key3)};`);
|
311964
|
+
const k5 = esc4(key3);
|
311283
311965
|
doc2.write(`
|
311284
311966
|
if (${id}.issues.length) {
|
311285
311967
|
if (input[${k5}] === undefined) {
|
@@ -311301,14 +311983,14 @@ var $ZodObject4 = /* @__PURE__ */ $constructor4("$ZodObject", (inst, def) => {
|
|
311301
311983
|
}
|
311302
311984
|
`);
|
311303
311985
|
} else {
|
311304
|
-
const id = ids[
|
311305
|
-
doc2.write(`const ${id} = ${parseStr(
|
311986
|
+
const id = ids[key3];
|
311987
|
+
doc2.write(`const ${id} = ${parseStr(key3)};`);
|
311306
311988
|
doc2.write(`
|
311307
311989
|
if (${id}.issues.length) payload.issues = payload.issues.concat(${id}.issues.map(iss => ({
|
311308
311990
|
...iss,
|
311309
|
-
path: iss.path ? [${esc4(
|
311991
|
+
path: iss.path ? [${esc4(key3)}, ...iss.path] : [${esc4(key3)}]
|
311310
311992
|
})));`);
|
311311
|
-
doc2.write(`newResult[${esc4(
|
311993
|
+
doc2.write(`newResult[${esc4(key3)}] = ${id}.value`);
|
311312
311994
|
}
|
311313
311995
|
}
|
311314
311996
|
doc2.write(`payload.value = newResult;`);
|
@@ -311343,20 +312025,20 @@ var $ZodObject4 = /* @__PURE__ */ $constructor4("$ZodObject", (inst, def) => {
|
|
311343
312025
|
} else {
|
311344
312026
|
payload.value = {};
|
311345
312027
|
const shape = value4.shape;
|
311346
|
-
for (const
|
311347
|
-
const el = shape[
|
312028
|
+
for (const key3 of value4.keys) {
|
312029
|
+
const el = shape[key3];
|
311348
312030
|
const r6 = el._zod.run({
|
311349
|
-
value: input[
|
312031
|
+
value: input[key3],
|
311350
312032
|
issues: []
|
311351
312033
|
}, ctx);
|
311352
312034
|
const isOptional = el._zod.optin === "optional" && el._zod.optout === "optional";
|
311353
312035
|
if (r6 instanceof Promise) {
|
311354
|
-
proms.push(r6.then((r$1) => isOptional ? handleOptionalObjectResult4(r$1, payload,
|
312036
|
+
proms.push(r6.then((r$1) => isOptional ? handleOptionalObjectResult4(r$1, payload, key3, input) : handleObjectResult4(r$1, payload, key3)));
|
311355
312037
|
} else {
|
311356
312038
|
if (isOptional) {
|
311357
|
-
handleOptionalObjectResult4(r6, payload,
|
312039
|
+
handleOptionalObjectResult4(r6, payload, key3, input);
|
311358
312040
|
} else {
|
311359
|
-
handleObjectResult4(r6, payload,
|
312041
|
+
handleObjectResult4(r6, payload, key3);
|
311360
312042
|
}
|
311361
312043
|
}
|
311362
312044
|
}
|
@@ -311368,21 +312050,21 @@ var $ZodObject4 = /* @__PURE__ */ $constructor4("$ZodObject", (inst, def) => {
|
|
311368
312050
|
const keySet = value4.keySet;
|
311369
312051
|
const _catchall = catchall._zod;
|
311370
312052
|
const t8 = _catchall.def.type;
|
311371
|
-
for (const
|
311372
|
-
if (keySet.has(
|
312053
|
+
for (const key3 of Object.keys(input)) {
|
312054
|
+
if (keySet.has(key3))
|
311373
312055
|
continue;
|
311374
312056
|
if (t8 === "never") {
|
311375
|
-
unrecognized.push(
|
312057
|
+
unrecognized.push(key3);
|
311376
312058
|
continue;
|
311377
312059
|
}
|
311378
312060
|
const r6 = _catchall.run({
|
311379
|
-
value: input[
|
312061
|
+
value: input[key3],
|
311380
312062
|
issues: []
|
311381
312063
|
}, ctx);
|
311382
312064
|
if (r6 instanceof Promise) {
|
311383
|
-
proms.push(r6.then((r$1) => handleObjectResult4(r$1, payload,
|
312065
|
+
proms.push(r6.then((r$1) => handleObjectResult4(r$1, payload, key3)));
|
311384
312066
|
} else {
|
311385
|
-
handleObjectResult4(r6, payload,
|
312067
|
+
handleObjectResult4(r6, payload, key3);
|
311386
312068
|
}
|
311387
312069
|
}
|
311388
312070
|
if (unrecognized.length) {
|
@@ -311552,22 +312234,22 @@ function mergeValues4(a7, b4) {
|
|
311552
312234
|
data: a7
|
311553
312235
|
};
|
311554
312236
|
}
|
311555
|
-
if (
|
312237
|
+
if (isPlainObject7(a7) && isPlainObject7(b4)) {
|
311556
312238
|
const bKeys = Object.keys(b4);
|
311557
|
-
const sharedKeys = Object.keys(a7).filter((
|
312239
|
+
const sharedKeys = Object.keys(a7).filter((key3) => bKeys.indexOf(key3) !== -1);
|
311558
312240
|
const newObj = {
|
311559
312241
|
...a7,
|
311560
312242
|
...b4
|
311561
312243
|
};
|
311562
|
-
for (const
|
311563
|
-
const sharedValue = mergeValues4(a7[
|
312244
|
+
for (const key3 of sharedKeys) {
|
312245
|
+
const sharedValue = mergeValues4(a7[key3], b4[key3]);
|
311564
312246
|
if (!sharedValue.valid) {
|
311565
312247
|
return {
|
311566
312248
|
valid: false,
|
311567
|
-
mergeErrorPath: [
|
312249
|
+
mergeErrorPath: [key3, ...sharedValue.mergeErrorPath]
|
311568
312250
|
};
|
311569
312251
|
}
|
311570
|
-
newObj[
|
312252
|
+
newObj[key3] = sharedValue.data;
|
311571
312253
|
}
|
311572
312254
|
return {
|
311573
312255
|
valid: true,
|
@@ -311703,7 +312385,7 @@ var $ZodRecord4 = /* @__PURE__ */ $constructor4("$ZodRecord", (inst, def) => {
|
|
311703
312385
|
$ZodType4.init(inst, def);
|
311704
312386
|
inst._zod.parse = (payload, ctx) => {
|
311705
312387
|
const input = payload.value;
|
311706
|
-
if (!
|
312388
|
+
if (!isPlainObject7(input)) {
|
311707
312389
|
payload.issues.push({
|
311708
312390
|
expected: "record",
|
311709
312391
|
code: "invalid_type",
|
@@ -311716,32 +312398,32 @@ var $ZodRecord4 = /* @__PURE__ */ $constructor4("$ZodRecord", (inst, def) => {
|
|
311716
312398
|
if (def.keyType._zod.values) {
|
311717
312399
|
const values = def.keyType._zod.values;
|
311718
312400
|
payload.value = {};
|
311719
|
-
for (const
|
311720
|
-
if (typeof
|
312401
|
+
for (const key3 of values) {
|
312402
|
+
if (typeof key3 === "string" || typeof key3 === "number" || typeof key3 === "symbol") {
|
311721
312403
|
const result = def.valueType._zod.run({
|
311722
|
-
value: input[
|
312404
|
+
value: input[key3],
|
311723
312405
|
issues: []
|
311724
312406
|
}, ctx);
|
311725
312407
|
if (result instanceof Promise) {
|
311726
312408
|
proms.push(result.then((result$1) => {
|
311727
312409
|
if (result$1.issues.length) {
|
311728
|
-
payload.issues.push(...prefixIssues4(
|
312410
|
+
payload.issues.push(...prefixIssues4(key3, result$1.issues));
|
311729
312411
|
}
|
311730
|
-
payload.value[
|
312412
|
+
payload.value[key3] = result$1.value;
|
311731
312413
|
}));
|
311732
312414
|
} else {
|
311733
312415
|
if (result.issues.length) {
|
311734
|
-
payload.issues.push(...prefixIssues4(
|
312416
|
+
payload.issues.push(...prefixIssues4(key3, result.issues));
|
311735
312417
|
}
|
311736
|
-
payload.value[
|
312418
|
+
payload.value[key3] = result.value;
|
311737
312419
|
}
|
311738
312420
|
}
|
311739
312421
|
}
|
311740
312422
|
let unrecognized;
|
311741
|
-
for (const
|
311742
|
-
if (!values.has(
|
312423
|
+
for (const key3 in input) {
|
312424
|
+
if (!values.has(key3)) {
|
311743
312425
|
unrecognized = unrecognized ?? [];
|
311744
|
-
unrecognized.push(
|
312426
|
+
unrecognized.push(key3);
|
311745
312427
|
}
|
311746
312428
|
}
|
311747
312429
|
if (unrecognized && unrecognized.length > 0) {
|
@@ -311754,11 +312436,11 @@ var $ZodRecord4 = /* @__PURE__ */ $constructor4("$ZodRecord", (inst, def) => {
|
|
311754
312436
|
}
|
311755
312437
|
} else {
|
311756
312438
|
payload.value = {};
|
311757
|
-
for (const
|
311758
|
-
if (
|
312439
|
+
for (const key3 of Reflect.ownKeys(input)) {
|
312440
|
+
if (key3 === "__proto__")
|
311759
312441
|
continue;
|
311760
312442
|
const keyResult = def.keyType._zod.run({
|
311761
|
-
value:
|
312443
|
+
value: key3,
|
311762
312444
|
issues: []
|
311763
312445
|
}, ctx);
|
311764
312446
|
if (keyResult instanceof Promise) {
|
@@ -311769,27 +312451,27 @@ var $ZodRecord4 = /* @__PURE__ */ $constructor4("$ZodRecord", (inst, def) => {
|
|
311769
312451
|
origin: "record",
|
311770
312452
|
code: "invalid_key",
|
311771
312453
|
issues: keyResult.issues.map((iss) => finalizeIssue4(iss, ctx, config4())),
|
311772
|
-
input:
|
311773
|
-
path: [
|
312454
|
+
input: key3,
|
312455
|
+
path: [key3],
|
311774
312456
|
inst
|
311775
312457
|
});
|
311776
312458
|
payload.value[keyResult.value] = keyResult.value;
|
311777
312459
|
continue;
|
311778
312460
|
}
|
311779
312461
|
const result = def.valueType._zod.run({
|
311780
|
-
value: input[
|
312462
|
+
value: input[key3],
|
311781
312463
|
issues: []
|
311782
312464
|
}, ctx);
|
311783
312465
|
if (result instanceof Promise) {
|
311784
312466
|
proms.push(result.then((result$1) => {
|
311785
312467
|
if (result$1.issues.length) {
|
311786
|
-
payload.issues.push(...prefixIssues4(
|
312468
|
+
payload.issues.push(...prefixIssues4(key3, result$1.issues));
|
311787
312469
|
}
|
311788
312470
|
payload.value[keyResult.value] = result$1.value;
|
311789
312471
|
}));
|
311790
312472
|
} else {
|
311791
312473
|
if (result.issues.length) {
|
311792
|
-
payload.issues.push(...prefixIssues4(
|
312474
|
+
payload.issues.push(...prefixIssues4(key3, result.issues));
|
311793
312475
|
}
|
311794
312476
|
payload.value[keyResult.value] = result.value;
|
311795
312477
|
}
|
@@ -311816,9 +312498,9 @@ var $ZodMap4 = /* @__PURE__ */ $constructor4("$ZodMap", (inst, def) => {
|
|
311816
312498
|
}
|
311817
312499
|
const proms = [];
|
311818
312500
|
payload.value = new Map;
|
311819
|
-
for (const [
|
312501
|
+
for (const [key3, value4] of input) {
|
311820
312502
|
const keyResult = def.keyType._zod.run({
|
311821
|
-
value:
|
312503
|
+
value: key3,
|
311822
312504
|
issues: []
|
311823
312505
|
}, ctx);
|
311824
312506
|
const valueResult = def.valueType._zod.run({
|
@@ -311827,10 +312509,10 @@ var $ZodMap4 = /* @__PURE__ */ $constructor4("$ZodMap", (inst, def) => {
|
|
311827
312509
|
}, ctx);
|
311828
312510
|
if (keyResult instanceof Promise || valueResult instanceof Promise) {
|
311829
312511
|
proms.push(Promise.all([keyResult, valueResult]).then(([keyResult$1, valueResult$1]) => {
|
311830
|
-
handleMapResult4(keyResult$1, valueResult$1, payload,
|
312512
|
+
handleMapResult4(keyResult$1, valueResult$1, payload, key3, input, inst, ctx);
|
311831
312513
|
}));
|
311832
312514
|
} else {
|
311833
|
-
handleMapResult4(keyResult, valueResult, payload,
|
312515
|
+
handleMapResult4(keyResult, valueResult, payload, key3, input, inst, ctx);
|
311834
312516
|
}
|
311835
312517
|
}
|
311836
312518
|
if (proms.length)
|
@@ -311838,10 +312520,10 @@ var $ZodMap4 = /* @__PURE__ */ $constructor4("$ZodMap", (inst, def) => {
|
|
311838
312520
|
return payload;
|
311839
312521
|
};
|
311840
312522
|
});
|
311841
|
-
function handleMapResult4(keyResult, valueResult, final,
|
312523
|
+
function handleMapResult4(keyResult, valueResult, final, key3, input, inst, ctx) {
|
311842
312524
|
if (keyResult.issues.length) {
|
311843
|
-
if (propertyKeyTypes4.has(typeof
|
311844
|
-
final.issues.push(...prefixIssues4(
|
312525
|
+
if (propertyKeyTypes4.has(typeof key3)) {
|
312526
|
+
final.issues.push(...prefixIssues4(key3, keyResult.issues));
|
311845
312527
|
} else {
|
311846
312528
|
final.issues.push({
|
311847
312529
|
origin: "map",
|
@@ -311853,15 +312535,15 @@ function handleMapResult4(keyResult, valueResult, final, key2, input, inst, ctx)
|
|
311853
312535
|
}
|
311854
312536
|
}
|
311855
312537
|
if (valueResult.issues.length) {
|
311856
|
-
if (propertyKeyTypes4.has(typeof
|
311857
|
-
final.issues.push(...prefixIssues4(
|
312538
|
+
if (propertyKeyTypes4.has(typeof key3)) {
|
312539
|
+
final.issues.push(...prefixIssues4(key3, valueResult.issues));
|
311858
312540
|
} else {
|
311859
312541
|
final.issues.push({
|
311860
312542
|
origin: "map",
|
311861
312543
|
code: "invalid_element",
|
311862
312544
|
input,
|
311863
312545
|
inst,
|
311864
|
-
key:
|
312546
|
+
key: key3,
|
311865
312547
|
issues: valueResult.issues.map((iss) => finalizeIssue4(iss, ctx, config4()))
|
311866
312548
|
});
|
311867
312549
|
}
|
@@ -318183,19 +318865,19 @@ var JSONSchemaGenerator4 = class {
|
|
318183
318865
|
json$1.type = "object";
|
318184
318866
|
json$1.properties = {};
|
318185
318867
|
const shape = def.shape;
|
318186
|
-
for (const
|
318187
|
-
json$1.properties[
|
318868
|
+
for (const key3 in shape) {
|
318869
|
+
json$1.properties[key3] = this.process(shape[key3], {
|
318188
318870
|
...params,
|
318189
318871
|
path: [
|
318190
318872
|
...params.path,
|
318191
318873
|
"properties",
|
318192
|
-
|
318874
|
+
key3
|
318193
318875
|
]
|
318194
318876
|
});
|
318195
318877
|
}
|
318196
318878
|
const allKeys = new Set(Object.keys(shape));
|
318197
|
-
const requiredKeys = new Set([...allKeys].filter((
|
318198
|
-
const v6 = def.shape[
|
318879
|
+
const requiredKeys = new Set([...allKeys].filter((key3) => {
|
318880
|
+
const v6 = def.shape[key3]._zod;
|
318199
318881
|
if (this.io === "input") {
|
318200
318882
|
return v6.optin === undefined;
|
318201
318883
|
} else {
|
@@ -318547,8 +319229,8 @@ var JSONSchemaGenerator4 = class {
|
|
318547
319229
|
if (defId)
|
318548
319230
|
seen.defId = defId;
|
318549
319231
|
const schema$1 = seen.schema;
|
318550
|
-
for (const
|
318551
|
-
delete schema$1[
|
319232
|
+
for (const key3 in schema$1) {
|
319233
|
+
delete schema$1[key3];
|
318552
319234
|
}
|
318553
319235
|
schema$1.$ref = ref;
|
318554
319236
|
};
|
@@ -318659,8 +319341,8 @@ function toJSONSchema4(input, _params) {
|
|
318659
319341
|
defs
|
318660
319342
|
};
|
318661
319343
|
for (const entry of input._idmap.entries()) {
|
318662
|
-
const [
|
318663
|
-
schemas3[
|
319344
|
+
const [key3, schema] = entry;
|
319345
|
+
schemas3[key3] = gen$1.emit(schema, {
|
318664
319346
|
..._params,
|
318665
319347
|
external: external2
|
318666
319348
|
});
|
@@ -318705,8 +319387,8 @@ function isTransforming4(_schema, _ctx) {
|
|
318705
319387
|
return isTransforming4(def.element, ctx);
|
318706
319388
|
}
|
318707
319389
|
case "object": {
|
318708
|
-
for (const
|
318709
|
-
if (isTransforming4(def.shape[
|
319390
|
+
for (const key3 in def.shape) {
|
319391
|
+
if (isTransforming4(def.shape[key3], ctx))
|
318710
319392
|
return true;
|
318711
319393
|
}
|
318712
319394
|
return false;
|
@@ -320449,13 +321131,13 @@ var esm_default4 = createPrompt((config5, done) => {
|
|
320449
321131
|
const [value4, setValue] = useState("");
|
320450
321132
|
const theme = makeTheme(config5.theme);
|
320451
321133
|
const prefix = usePrefix({ status, theme });
|
320452
|
-
useKeypress((
|
320453
|
-
if (isEnterKey(
|
321134
|
+
useKeypress((key3, rl) => {
|
321135
|
+
if (isEnterKey(key3)) {
|
320454
321136
|
const answer = getBooleanValue(value4, config5.default);
|
320455
321137
|
setValue(transformer(answer));
|
320456
321138
|
setStatus("done");
|
320457
321139
|
done(answer);
|
320458
|
-
} else if (
|
321140
|
+
} else if (key3.name === "tab") {
|
320459
321141
|
const answer = boolToString(!getBooleanValue(value4, config5.default));
|
320460
321142
|
rl.clearLine(0);
|
320461
321143
|
rl.write(answer);
|
@@ -320475,20 +321157,476 @@ var esm_default4 = createPrompt((config5, done) => {
|
|
320475
321157
|
return `${prefix} ${message}${defaultValue} ${formattedValue}`;
|
320476
321158
|
});
|
320477
321159
|
|
321160
|
+
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/key.js
|
321161
|
+
var isEnterKey3 = (key3) => key3.name === "enter" || key3.name === "return";
|
321162
|
+
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/errors.js
|
321163
|
+
class AbortPromptError3 extends Error {
|
321164
|
+
name = "AbortPromptError";
|
321165
|
+
message = "Prompt was aborted";
|
321166
|
+
constructor(options) {
|
321167
|
+
super();
|
321168
|
+
this.cause = options?.cause;
|
321169
|
+
}
|
321170
|
+
}
|
321171
|
+
|
321172
|
+
class CancelPromptError3 extends Error {
|
321173
|
+
name = "CancelPromptError";
|
321174
|
+
message = "Prompt was canceled";
|
321175
|
+
}
|
321176
|
+
|
321177
|
+
class ExitPromptError3 extends Error {
|
321178
|
+
name = "ExitPromptError";
|
321179
|
+
}
|
321180
|
+
|
321181
|
+
class HookError3 extends Error {
|
321182
|
+
name = "HookError";
|
321183
|
+
}
|
321184
|
+
|
321185
|
+
class ValidationError3 extends Error {
|
321186
|
+
name = "ValidationError";
|
321187
|
+
}
|
321188
|
+
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/use-state.js
|
321189
|
+
import { AsyncResource as AsyncResource8 } from "node:async_hooks";
|
321190
|
+
|
321191
|
+
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/hook-engine.js
|
321192
|
+
import { AsyncLocalStorage as AsyncLocalStorage3, AsyncResource as AsyncResource7 } from "node:async_hooks";
|
321193
|
+
var hookStorage3 = new AsyncLocalStorage3;
|
321194
|
+
function createStore3(rl) {
|
321195
|
+
const store = {
|
321196
|
+
rl,
|
321197
|
+
hooks: [],
|
321198
|
+
hooksCleanup: [],
|
321199
|
+
hooksEffect: [],
|
321200
|
+
index: 0,
|
321201
|
+
handleChange() {}
|
321202
|
+
};
|
321203
|
+
return store;
|
321204
|
+
}
|
321205
|
+
function withHooks3(rl, cb) {
|
321206
|
+
const store = createStore3(rl);
|
321207
|
+
return hookStorage3.run(store, () => {
|
321208
|
+
function cycle(render) {
|
321209
|
+
store.handleChange = () => {
|
321210
|
+
store.index = 0;
|
321211
|
+
render();
|
321212
|
+
};
|
321213
|
+
store.handleChange();
|
321214
|
+
}
|
321215
|
+
return cb(cycle);
|
321216
|
+
});
|
321217
|
+
}
|
321218
|
+
function getStore3() {
|
321219
|
+
const store = hookStorage3.getStore();
|
321220
|
+
if (!store) {
|
321221
|
+
throw new HookError3("[Inquirer] Hook functions can only be called from within a prompt");
|
321222
|
+
}
|
321223
|
+
return store;
|
321224
|
+
}
|
321225
|
+
function readline5() {
|
321226
|
+
return getStore3().rl;
|
321227
|
+
}
|
321228
|
+
function withUpdates3(fn) {
|
321229
|
+
const wrapped = (...args) => {
|
321230
|
+
const store = getStore3();
|
321231
|
+
let shouldUpdate = false;
|
321232
|
+
const oldHandleChange = store.handleChange;
|
321233
|
+
store.handleChange = () => {
|
321234
|
+
shouldUpdate = true;
|
321235
|
+
};
|
321236
|
+
const returnValue = fn(...args);
|
321237
|
+
if (shouldUpdate) {
|
321238
|
+
oldHandleChange();
|
321239
|
+
}
|
321240
|
+
store.handleChange = oldHandleChange;
|
321241
|
+
return returnValue;
|
321242
|
+
};
|
321243
|
+
return AsyncResource7.bind(wrapped);
|
321244
|
+
}
|
321245
|
+
function withPointer3(cb) {
|
321246
|
+
const store = getStore3();
|
321247
|
+
const { index: index2 } = store;
|
321248
|
+
const pointer = {
|
321249
|
+
get() {
|
321250
|
+
return store.hooks[index2];
|
321251
|
+
},
|
321252
|
+
set(value4) {
|
321253
|
+
store.hooks[index2] = value4;
|
321254
|
+
},
|
321255
|
+
initialized: index2 in store.hooks
|
321256
|
+
};
|
321257
|
+
const returnValue = cb(pointer);
|
321258
|
+
store.index++;
|
321259
|
+
return returnValue;
|
321260
|
+
}
|
321261
|
+
function handleChange3() {
|
321262
|
+
getStore3().handleChange();
|
321263
|
+
}
|
321264
|
+
var effectScheduler3 = {
|
321265
|
+
queue(cb) {
|
321266
|
+
const store = getStore3();
|
321267
|
+
const { index: index2 } = store;
|
321268
|
+
store.hooksEffect.push(() => {
|
321269
|
+
store.hooksCleanup[index2]?.();
|
321270
|
+
const cleanFn = cb(readline5());
|
321271
|
+
if (cleanFn != null && typeof cleanFn !== "function") {
|
321272
|
+
throw new ValidationError3("useEffect return value must be a cleanup function or nothing.");
|
321273
|
+
}
|
321274
|
+
store.hooksCleanup[index2] = cleanFn;
|
321275
|
+
});
|
321276
|
+
},
|
321277
|
+
run() {
|
321278
|
+
const store = getStore3();
|
321279
|
+
withUpdates3(() => {
|
321280
|
+
store.hooksEffect.forEach((effect) => {
|
321281
|
+
effect();
|
321282
|
+
});
|
321283
|
+
store.hooksEffect.length = 0;
|
321284
|
+
})();
|
321285
|
+
},
|
321286
|
+
clearAll() {
|
321287
|
+
const store = getStore3();
|
321288
|
+
store.hooksCleanup.forEach((cleanFn) => {
|
321289
|
+
cleanFn?.();
|
321290
|
+
});
|
321291
|
+
store.hooksEffect.length = 0;
|
321292
|
+
store.hooksCleanup.length = 0;
|
321293
|
+
}
|
321294
|
+
};
|
321295
|
+
|
321296
|
+
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/use-state.js
|
321297
|
+
function useState3(defaultValue) {
|
321298
|
+
return withPointer3((pointer) => {
|
321299
|
+
const setState = AsyncResource8.bind(function setState(newValue) {
|
321300
|
+
if (pointer.get() !== newValue) {
|
321301
|
+
pointer.set(newValue);
|
321302
|
+
handleChange3();
|
321303
|
+
}
|
321304
|
+
});
|
321305
|
+
if (pointer.initialized) {
|
321306
|
+
return [pointer.get(), setState];
|
321307
|
+
}
|
321308
|
+
const value4 = typeof defaultValue === "function" ? defaultValue() : defaultValue;
|
321309
|
+
pointer.set(value4);
|
321310
|
+
return [value4, setState];
|
321311
|
+
});
|
321312
|
+
}
|
321313
|
+
|
321314
|
+
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/use-effect.js
|
321315
|
+
function useEffect3(cb, depArray) {
|
321316
|
+
withPointer3((pointer) => {
|
321317
|
+
const oldDeps = pointer.get();
|
321318
|
+
const hasChanged = !Array.isArray(oldDeps) || depArray.some((dep, i6) => !Object.is(dep, oldDeps[i6]));
|
321319
|
+
if (hasChanged) {
|
321320
|
+
effectScheduler3.queue(cb);
|
321321
|
+
}
|
321322
|
+
pointer.set(depArray);
|
321323
|
+
});
|
321324
|
+
}
|
321325
|
+
|
321326
|
+
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/theme.js
|
321327
|
+
var import_yoctocolors_cjs5 = __toESM(require_yoctocolors_cjs(), 1);
|
321328
|
+
var defaultTheme3 = {
|
321329
|
+
prefix: {
|
321330
|
+
idle: import_yoctocolors_cjs5.default.blue("?"),
|
321331
|
+
done: import_yoctocolors_cjs5.default.green(esm_default.tick)
|
321332
|
+
},
|
321333
|
+
spinner: {
|
321334
|
+
interval: 80,
|
321335
|
+
frames: ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"].map((frame) => import_yoctocolors_cjs5.default.yellow(frame))
|
321336
|
+
},
|
321337
|
+
style: {
|
321338
|
+
answer: import_yoctocolors_cjs5.default.cyan,
|
321339
|
+
message: import_yoctocolors_cjs5.default.bold,
|
321340
|
+
error: (text2) => import_yoctocolors_cjs5.default.red(`> ${text2}`),
|
321341
|
+
defaultAnswer: (text2) => import_yoctocolors_cjs5.default.dim(`(${text2})`),
|
321342
|
+
help: import_yoctocolors_cjs5.default.dim,
|
321343
|
+
highlight: import_yoctocolors_cjs5.default.cyan,
|
321344
|
+
key: (text2) => import_yoctocolors_cjs5.default.cyan(import_yoctocolors_cjs5.default.bold(`<${text2}>`))
|
321345
|
+
}
|
321346
|
+
};
|
321347
|
+
|
321348
|
+
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/make-theme.js
|
321349
|
+
function isPlainObject8(value4) {
|
321350
|
+
if (typeof value4 !== "object" || value4 === null)
|
321351
|
+
return false;
|
321352
|
+
let proto = value4;
|
321353
|
+
while (Object.getPrototypeOf(proto) !== null) {
|
321354
|
+
proto = Object.getPrototypeOf(proto);
|
321355
|
+
}
|
321356
|
+
return Object.getPrototypeOf(value4) === proto;
|
321357
|
+
}
|
321358
|
+
function deepMerge4(...objects) {
|
321359
|
+
const output = {};
|
321360
|
+
for (const obj of objects) {
|
321361
|
+
for (const [key3, value4] of Object.entries(obj)) {
|
321362
|
+
const prevValue = output[key3];
|
321363
|
+
output[key3] = isPlainObject8(prevValue) && isPlainObject8(value4) ? deepMerge4(prevValue, value4) : value4;
|
321364
|
+
}
|
321365
|
+
}
|
321366
|
+
return output;
|
321367
|
+
}
|
321368
|
+
function makeTheme3(...themes) {
|
321369
|
+
const themesToMerge = [
|
321370
|
+
defaultTheme3,
|
321371
|
+
...themes.filter((theme) => theme != null)
|
321372
|
+
];
|
321373
|
+
return deepMerge4(...themesToMerge);
|
321374
|
+
}
|
321375
|
+
|
321376
|
+
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/use-prefix.js
|
321377
|
+
function usePrefix3({ status = "idle", theme }) {
|
321378
|
+
const [showLoader, setShowLoader] = useState3(false);
|
321379
|
+
const [tick, setTick] = useState3(0);
|
321380
|
+
const { prefix, spinner: spinner2 } = makeTheme3(theme);
|
321381
|
+
useEffect3(() => {
|
321382
|
+
if (status === "loading") {
|
321383
|
+
let tickInterval;
|
321384
|
+
let inc = -1;
|
321385
|
+
const delayTimeout = setTimeout(() => {
|
321386
|
+
setShowLoader(true);
|
321387
|
+
tickInterval = setInterval(() => {
|
321388
|
+
inc = inc + 1;
|
321389
|
+
setTick(inc % spinner2.frames.length);
|
321390
|
+
}, spinner2.interval);
|
321391
|
+
}, 300);
|
321392
|
+
return () => {
|
321393
|
+
clearTimeout(delayTimeout);
|
321394
|
+
clearInterval(tickInterval);
|
321395
|
+
};
|
321396
|
+
} else {
|
321397
|
+
setShowLoader(false);
|
321398
|
+
}
|
321399
|
+
}, [status]);
|
321400
|
+
if (showLoader) {
|
321401
|
+
return spinner2.frames[tick];
|
321402
|
+
}
|
321403
|
+
const iconName = status === "loading" ? "idle" : status;
|
321404
|
+
return typeof prefix === "string" ? prefix : prefix[iconName] ?? prefix["idle"];
|
321405
|
+
}
|
321406
|
+
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/use-ref.js
|
321407
|
+
function useRef3(val) {
|
321408
|
+
return useState3({ current: val })[0];
|
321409
|
+
}
|
321410
|
+
|
321411
|
+
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/use-keypress.js
|
321412
|
+
function useKeypress3(userHandler) {
|
321413
|
+
const signal = useRef3(userHandler);
|
321414
|
+
signal.current = userHandler;
|
321415
|
+
useEffect3((rl) => {
|
321416
|
+
let ignore = false;
|
321417
|
+
const handler = withUpdates3((_input, event) => {
|
321418
|
+
if (ignore)
|
321419
|
+
return;
|
321420
|
+
signal.current(event, rl);
|
321421
|
+
});
|
321422
|
+
rl.input.on("keypress", handler);
|
321423
|
+
return () => {
|
321424
|
+
ignore = true;
|
321425
|
+
rl.input.removeListener("keypress", handler);
|
321426
|
+
};
|
321427
|
+
}, []);
|
321428
|
+
}
|
321429
|
+
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/utils.js
|
321430
|
+
var import_cli_width3 = __toESM(require_cli_width(), 1);
|
321431
|
+
var import_wrap_ansi3 = __toESM(require_wrap_ansi(), 1);
|
321432
|
+
function breakLines3(content, width) {
|
321433
|
+
return content.split(`
|
321434
|
+
`).flatMap((line) => import_wrap_ansi3.default(line, width, { trim: false, hard: true }).split(`
|
321435
|
+
`).map((str) => str.trimEnd())).join(`
|
321436
|
+
`);
|
321437
|
+
}
|
321438
|
+
function readlineWidth3() {
|
321439
|
+
return import_cli_width3.default({ defaultWidth: 80, output: readline5().output });
|
321440
|
+
}
|
321441
|
+
|
321442
|
+
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
|
321443
|
+
var import_mute_stream3 = __toESM(require_lib(), 1);
|
321444
|
+
import * as readline6 from "node:readline";
|
321445
|
+
import { AsyncResource as AsyncResource9 } from "node:async_hooks";
|
321446
|
+
|
321447
|
+
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/screen-manager.js
|
321448
|
+
var import_ansi_escapes4 = __toESM(require_ansi_escapes(), 1);
|
321449
|
+
import { stripVTControlCharacters as stripVTControlCharacters4 } from "node:util";
|
321450
|
+
var height3 = (content) => content.split(`
|
321451
|
+
`).length;
|
321452
|
+
var lastLine3 = (content) => content.split(`
|
321453
|
+
`).pop() ?? "";
|
321454
|
+
function cursorDown3(n6) {
|
321455
|
+
return n6 > 0 ? import_ansi_escapes4.default.cursorDown(n6) : "";
|
321456
|
+
}
|
321457
|
+
|
321458
|
+
class ScreenManager3 {
|
321459
|
+
height = 0;
|
321460
|
+
extraLinesUnderPrompt = 0;
|
321461
|
+
cursorPos;
|
321462
|
+
rl;
|
321463
|
+
constructor(rl) {
|
321464
|
+
this.rl = rl;
|
321465
|
+
this.cursorPos = rl.getCursorPos();
|
321466
|
+
}
|
321467
|
+
write(content) {
|
321468
|
+
this.rl.output.unmute();
|
321469
|
+
this.rl.output.write(content);
|
321470
|
+
this.rl.output.mute();
|
321471
|
+
}
|
321472
|
+
render(content, bottomContent = "") {
|
321473
|
+
const promptLine = lastLine3(content);
|
321474
|
+
const rawPromptLine = stripVTControlCharacters4(promptLine);
|
321475
|
+
let prompt = rawPromptLine;
|
321476
|
+
if (this.rl.line.length > 0) {
|
321477
|
+
prompt = prompt.slice(0, -this.rl.line.length);
|
321478
|
+
}
|
321479
|
+
this.rl.setPrompt(prompt);
|
321480
|
+
this.cursorPos = this.rl.getCursorPos();
|
321481
|
+
const width = readlineWidth3();
|
321482
|
+
content = breakLines3(content, width);
|
321483
|
+
bottomContent = breakLines3(bottomContent, width);
|
321484
|
+
if (rawPromptLine.length % width === 0) {
|
321485
|
+
content += `
|
321486
|
+
`;
|
321487
|
+
}
|
321488
|
+
let output = content + (bottomContent ? `
|
321489
|
+
` + bottomContent : "");
|
321490
|
+
const promptLineUpDiff = Math.floor(rawPromptLine.length / width) - this.cursorPos.rows;
|
321491
|
+
const bottomContentHeight = promptLineUpDiff + (bottomContent ? height3(bottomContent) : 0);
|
321492
|
+
if (bottomContentHeight > 0)
|
321493
|
+
output += import_ansi_escapes4.default.cursorUp(bottomContentHeight);
|
321494
|
+
output += import_ansi_escapes4.default.cursorTo(this.cursorPos.cols);
|
321495
|
+
this.write(cursorDown3(this.extraLinesUnderPrompt) + import_ansi_escapes4.default.eraseLines(this.height) + output);
|
321496
|
+
this.extraLinesUnderPrompt = bottomContentHeight;
|
321497
|
+
this.height = height3(output);
|
321498
|
+
}
|
321499
|
+
checkCursorPos() {
|
321500
|
+
const cursorPos = this.rl.getCursorPos();
|
321501
|
+
if (cursorPos.cols !== this.cursorPos.cols) {
|
321502
|
+
this.write(import_ansi_escapes4.default.cursorTo(cursorPos.cols));
|
321503
|
+
this.cursorPos = cursorPos;
|
321504
|
+
}
|
321505
|
+
}
|
321506
|
+
done({ clearContent }) {
|
321507
|
+
this.rl.setPrompt("");
|
321508
|
+
let output = cursorDown3(this.extraLinesUnderPrompt);
|
321509
|
+
output += clearContent ? import_ansi_escapes4.default.eraseLines(this.height) : `
|
321510
|
+
`;
|
321511
|
+
output += import_ansi_escapes4.default.cursorShow;
|
321512
|
+
this.write(output);
|
321513
|
+
this.rl.close();
|
321514
|
+
}
|
321515
|
+
}
|
321516
|
+
|
321517
|
+
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/promise-polyfill.js
|
321518
|
+
class PromisePolyfill3 extends Promise {
|
321519
|
+
static withResolver() {
|
321520
|
+
let resolve6;
|
321521
|
+
let reject;
|
321522
|
+
const promise5 = new Promise((res, rej) => {
|
321523
|
+
resolve6 = res;
|
321524
|
+
reject = rej;
|
321525
|
+
});
|
321526
|
+
return { promise: promise5, resolve: resolve6, reject };
|
321527
|
+
}
|
321528
|
+
}
|
321529
|
+
|
321530
|
+
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
|
321531
|
+
function getCallSites3() {
|
321532
|
+
const _prepareStackTrace = Error.prepareStackTrace;
|
321533
|
+
let result = [];
|
321534
|
+
try {
|
321535
|
+
Error.prepareStackTrace = (_5, callSites) => {
|
321536
|
+
const callSitesWithoutCurrent = callSites.slice(1);
|
321537
|
+
result = callSitesWithoutCurrent;
|
321538
|
+
return callSitesWithoutCurrent;
|
321539
|
+
};
|
321540
|
+
new Error().stack;
|
321541
|
+
} catch {
|
321542
|
+
return result;
|
321543
|
+
}
|
321544
|
+
Error.prepareStackTrace = _prepareStackTrace;
|
321545
|
+
return result;
|
321546
|
+
}
|
321547
|
+
function createPrompt3(view) {
|
321548
|
+
const callSites = getCallSites3();
|
321549
|
+
const prompt = (config5, context = {}) => {
|
321550
|
+
const { input = process.stdin, signal } = context;
|
321551
|
+
const cleanups = new Set;
|
321552
|
+
const output = new import_mute_stream3.default;
|
321553
|
+
output.pipe(context.output ?? process.stdout);
|
321554
|
+
const rl = readline6.createInterface({
|
321555
|
+
terminal: true,
|
321556
|
+
input,
|
321557
|
+
output
|
321558
|
+
});
|
321559
|
+
const screen = new ScreenManager3(rl);
|
321560
|
+
const { promise: promise5, resolve: resolve6, reject } = PromisePolyfill3.withResolver();
|
321561
|
+
const cancel3 = () => reject(new CancelPromptError3);
|
321562
|
+
if (signal) {
|
321563
|
+
const abort = () => reject(new AbortPromptError3({ cause: signal.reason }));
|
321564
|
+
if (signal.aborted) {
|
321565
|
+
abort();
|
321566
|
+
return Object.assign(promise5, { cancel: cancel3 });
|
321567
|
+
}
|
321568
|
+
signal.addEventListener("abort", abort);
|
321569
|
+
cleanups.add(() => signal.removeEventListener("abort", abort));
|
321570
|
+
}
|
321571
|
+
cleanups.add(onExit((code2, signal2) => {
|
321572
|
+
reject(new ExitPromptError3(`User force closed the prompt with ${code2} ${signal2}`));
|
321573
|
+
}));
|
321574
|
+
const sigint = () => reject(new ExitPromptError3(`User force closed the prompt with SIGINT`));
|
321575
|
+
rl.on("SIGINT", sigint);
|
321576
|
+
cleanups.add(() => rl.removeListener("SIGINT", sigint));
|
321577
|
+
const checkCursorPos = () => screen.checkCursorPos();
|
321578
|
+
rl.input.on("keypress", checkCursorPos);
|
321579
|
+
cleanups.add(() => rl.input.removeListener("keypress", checkCursorPos));
|
321580
|
+
return withHooks3(rl, (cycle) => {
|
321581
|
+
const hooksCleanup = AsyncResource9.bind(() => effectScheduler3.clearAll());
|
321582
|
+
rl.on("close", hooksCleanup);
|
321583
|
+
cleanups.add(() => rl.removeListener("close", hooksCleanup));
|
321584
|
+
cycle(() => {
|
321585
|
+
try {
|
321586
|
+
const nextView = view(config5, (value4) => {
|
321587
|
+
setImmediate(() => resolve6(value4));
|
321588
|
+
});
|
321589
|
+
if (nextView === undefined) {
|
321590
|
+
const callerFilename = callSites[1]?.getFileName();
|
321591
|
+
throw new Error(`Prompt functions must return a string.
|
321592
|
+
at ${callerFilename}`);
|
321593
|
+
}
|
321594
|
+
const [content, bottomContent] = typeof nextView === "string" ? [nextView] : nextView;
|
321595
|
+
screen.render(content, bottomContent);
|
321596
|
+
effectScheduler3.run();
|
321597
|
+
} catch (error45) {
|
321598
|
+
reject(error45);
|
321599
|
+
}
|
321600
|
+
});
|
321601
|
+
return Object.assign(promise5.then((answer) => {
|
321602
|
+
effectScheduler3.clearAll();
|
321603
|
+
return answer;
|
321604
|
+
}, (error45) => {
|
321605
|
+
effectScheduler3.clearAll();
|
321606
|
+
throw error45;
|
321607
|
+
}).finally(() => {
|
321608
|
+
cleanups.forEach((cleanup) => cleanup());
|
321609
|
+
screen.done({ clearContent: Boolean(context.clearPromptOnDone) });
|
321610
|
+
output.end();
|
321611
|
+
}).then(() => promise5), { cancel: cancel3 });
|
321612
|
+
});
|
321613
|
+
};
|
321614
|
+
return prompt;
|
321615
|
+
}
|
320478
321616
|
// ../../node_modules/@inquirer/password/dist/esm/index.js
|
320479
|
-
var
|
320480
|
-
var esm_default5 =
|
321617
|
+
var import_ansi_escapes5 = __toESM(require_ansi_escapes(), 1);
|
321618
|
+
var esm_default5 = createPrompt3((config5, done) => {
|
320481
321619
|
const { validate: validate5 = () => true } = config5;
|
320482
|
-
const theme =
|
320483
|
-
const [status, setStatus] =
|
320484
|
-
const [errorMsg, setError] =
|
320485
|
-
const [value4, setValue] =
|
320486
|
-
const prefix =
|
320487
|
-
|
321620
|
+
const theme = makeTheme3(config5.theme);
|
321621
|
+
const [status, setStatus] = useState3("idle");
|
321622
|
+
const [errorMsg, setError] = useState3();
|
321623
|
+
const [value4, setValue] = useState3("");
|
321624
|
+
const prefix = usePrefix3({ status, theme });
|
321625
|
+
useKeypress3(async (key4, rl) => {
|
320488
321626
|
if (status !== "idle") {
|
320489
321627
|
return;
|
320490
321628
|
}
|
320491
|
-
if (
|
321629
|
+
if (isEnterKey3(key4)) {
|
320492
321630
|
const answer = value4;
|
320493
321631
|
setStatus("loading");
|
320494
321632
|
const isValid = await validate5(answer);
|
@@ -320513,7 +321651,7 @@ var esm_default5 = createPrompt((config5, done) => {
|
|
320513
321651
|
const maskChar = typeof config5.mask === "string" ? config5.mask : "*";
|
320514
321652
|
formattedValue = maskChar.repeat(value4.length);
|
320515
321653
|
} else if (status !== "done") {
|
320516
|
-
helpTip = `${theme.style.help("[input is masked]")}${
|
321654
|
+
helpTip = `${theme.style.help("[input is masked]")}${import_ansi_escapes5.default.cursorHide}`;
|
320517
321655
|
}
|
320518
321656
|
if (status === "done") {
|
320519
321657
|
formattedValue = theme.style.answer(formattedValue);
|
@@ -320556,7 +321694,7 @@ async function applicationAccessTokenPrompt(env2, application, settlemint, accep
|
|
320556
321694
|
try {
|
320557
321695
|
validate2(exports_external.string(), value4);
|
320558
321696
|
return true;
|
320559
|
-
} catch (
|
321697
|
+
} catch (_error) {
|
320560
321698
|
return "Invalid token name";
|
320561
321699
|
}
|
320562
321700
|
}
|
@@ -320609,7 +321747,7 @@ async function applicationAccessTokenPrompt(env2, application, settlemint, accep
|
|
320609
321747
|
try {
|
320610
321748
|
validate2(ApplicationAccessTokenSchema2, aat);
|
320611
321749
|
return aat;
|
320612
|
-
} catch (
|
321750
|
+
} catch (_error) {}
|
320613
321751
|
}
|
320614
321752
|
return esm_default5({
|
320615
321753
|
message: "What is the application access token for your application in SettleMint? (format: sm_aat_...)",
|
@@ -320617,7 +321755,7 @@ async function applicationAccessTokenPrompt(env2, application, settlemint, accep
|
|
320617
321755
|
try {
|
320618
321756
|
validate2(ApplicationAccessTokenSchema2, value4);
|
320619
321757
|
return true;
|
320620
|
-
} catch (
|
321758
|
+
} catch (_error) {
|
320621
321759
|
return "Invalid application access token, it should start with sm_aat_...";
|
320622
321760
|
}
|
320623
321761
|
}
|
@@ -321022,7 +322160,7 @@ async function instancePrompt({
|
|
321022
322160
|
try {
|
321023
322161
|
validate2(UrlSchema2, value4);
|
321024
322162
|
return true;
|
321025
|
-
} catch (
|
322163
|
+
} catch (_error) {
|
321026
322164
|
return "Invalid URL";
|
321027
322165
|
}
|
321028
322166
|
},
|
@@ -321106,7 +322244,7 @@ async function serviceUrlPrompt({
|
|
321106
322244
|
try {
|
321107
322245
|
validate2(UrlSchema2, value4);
|
321108
322246
|
return true;
|
321109
|
-
} catch (
|
322247
|
+
} catch (_error) {
|
321110
322248
|
return "Invalid URL";
|
321111
322249
|
}
|
321112
322250
|
},
|
@@ -322050,7 +323188,7 @@ async function projectNamePrompt(env2, argument) {
|
|
322050
323188
|
try {
|
322051
323189
|
validate2(exports_external.string(), value4);
|
322052
323190
|
return true;
|
322053
|
-
} catch (
|
323191
|
+
} catch (_error) {
|
322054
323192
|
return "Invalid projectname";
|
322055
323193
|
}
|
322056
323194
|
}
|
@@ -322244,7 +323382,7 @@ var basename2 = function(p5, extension) {
|
|
322244
323382
|
return extension && lastSegment.endsWith(extension) ? lastSegment.slice(0, -extension.length) : lastSegment;
|
322245
323383
|
};
|
322246
323384
|
// ../../node_modules/defu/dist/defu.mjs
|
322247
|
-
function
|
323385
|
+
function isPlainObject9(value4) {
|
322248
323386
|
if (value4 === null || typeof value4 !== "object") {
|
322249
323387
|
return false;
|
322250
323388
|
}
|
@@ -322261,27 +323399,27 @@ function isPlainObject7(value4) {
|
|
322261
323399
|
return true;
|
322262
323400
|
}
|
322263
323401
|
function _defu(baseObject, defaults4, namespace = ".", merger) {
|
322264
|
-
if (!
|
323402
|
+
if (!isPlainObject9(defaults4)) {
|
322265
323403
|
return _defu(baseObject, {}, namespace, merger);
|
322266
323404
|
}
|
322267
323405
|
const object5 = Object.assign({}, defaults4);
|
322268
|
-
for (const
|
322269
|
-
if (
|
323406
|
+
for (const key4 in baseObject) {
|
323407
|
+
if (key4 === "__proto__" || key4 === "constructor") {
|
322270
323408
|
continue;
|
322271
323409
|
}
|
322272
|
-
const value4 = baseObject[
|
323410
|
+
const value4 = baseObject[key4];
|
322273
323411
|
if (value4 === null || value4 === undefined) {
|
322274
323412
|
continue;
|
322275
323413
|
}
|
322276
|
-
if (merger && merger(object5,
|
323414
|
+
if (merger && merger(object5, key4, value4, namespace)) {
|
322277
323415
|
continue;
|
322278
323416
|
}
|
322279
|
-
if (Array.isArray(value4) && Array.isArray(object5[
|
322280
|
-
object5[
|
322281
|
-
} else if (
|
322282
|
-
object5[
|
323417
|
+
if (Array.isArray(value4) && Array.isArray(object5[key4])) {
|
323418
|
+
object5[key4] = [...value4, ...object5[key4]];
|
323419
|
+
} else if (isPlainObject9(value4) && isPlainObject9(object5[key4])) {
|
323420
|
+
object5[key4] = _defu(value4, object5[key4], (namespace ? `${namespace}.` : "") + key4.toString(), merger);
|
322283
323421
|
} else {
|
322284
|
-
object5[
|
323422
|
+
object5[key4] = value4;
|
322285
323423
|
}
|
322286
323424
|
}
|
322287
323425
|
return object5;
|
@@ -322290,15 +323428,15 @@ function createDefu(merger) {
|
|
322290
323428
|
return (...arguments_4) => arguments_4.reduce((p5, c3) => _defu(p5, c3, "", merger), {});
|
322291
323429
|
}
|
322292
323430
|
var defu = createDefu();
|
322293
|
-
var defuFn = createDefu((object5,
|
322294
|
-
if (object5[
|
322295
|
-
object5[
|
323431
|
+
var defuFn = createDefu((object5, key4, currentValue) => {
|
323432
|
+
if (object5[key4] !== undefined && typeof currentValue === "function") {
|
323433
|
+
object5[key4] = currentValue(object5[key4]);
|
322296
323434
|
return true;
|
322297
323435
|
}
|
322298
323436
|
});
|
322299
|
-
var defuArrayFn = createDefu((object5,
|
322300
|
-
if (Array.isArray(object5[
|
322301
|
-
object5[
|
323437
|
+
var defuArrayFn = createDefu((object5, key4, currentValue) => {
|
323438
|
+
if (Array.isArray(object5[key4]) && typeof currentValue === "function") {
|
323439
|
+
object5[key4] = currentValue(object5[key4]);
|
322302
323440
|
return true;
|
322303
323441
|
}
|
322304
323442
|
});
|
@@ -325508,11 +326646,11 @@ function cacheDirectory() {
|
|
325508
326646
|
}
|
325509
326647
|
function normalizeHeaders(headers = {}) {
|
325510
326648
|
const normalized = {};
|
325511
|
-
for (const [
|
326649
|
+
for (const [key4, value4] of Object.entries(headers)) {
|
325512
326650
|
if (!value4) {
|
325513
326651
|
continue;
|
325514
326652
|
}
|
325515
|
-
normalized[
|
326653
|
+
normalized[key4.toLowerCase()] = value4;
|
325516
326654
|
}
|
325517
326655
|
return normalized;
|
325518
326656
|
}
|
@@ -326038,7 +327176,7 @@ async function personalAccessTokenPrompt(env2, instance, accept) {
|
|
326038
327176
|
try {
|
326039
327177
|
validate2(PersonalAccessTokenSchema2, value4);
|
326040
327178
|
return true;
|
326041
|
-
} catch (
|
327179
|
+
} catch (_error) {
|
326042
327180
|
return "Invalid personal access token, it should start with sm_pat_...";
|
326043
327181
|
}
|
326044
327182
|
}
|
@@ -326119,7 +327257,7 @@ function loginCommand() {
|
|
326119
327257
|
});
|
326120
327258
|
try {
|
326121
327259
|
await loginSpinner(client);
|
326122
|
-
} catch (
|
327260
|
+
} catch (_error) {
|
326123
327261
|
cancel2(`Invalid personal access token for instance ${selectedInstance}`);
|
326124
327262
|
}
|
326125
327263
|
await storeCredentials(personalAccessToken, selectedInstance);
|
@@ -326269,13 +327407,17 @@ function addClusterServiceArgs(cmd2) {
|
|
326269
327407
|
// src/commands/platform/utils/wait-for-completion.ts
|
326270
327408
|
class TimeoutError2 extends Error {
|
326271
327409
|
}
|
327410
|
+
|
327411
|
+
class DeploymentFailedError extends Error {
|
327412
|
+
}
|
326272
327413
|
async function waitForCompletion({
|
326273
327414
|
settlemint,
|
326274
327415
|
type: type4,
|
326275
327416
|
uniqueName,
|
326276
327417
|
action,
|
326277
327418
|
maxTimeout = 10 * 60 * 1000,
|
326278
|
-
restartIfTimeout = false
|
327419
|
+
restartIfTimeout = false,
|
327420
|
+
restartOnError = false
|
326279
327421
|
}) {
|
326280
327422
|
const serviceType = SETTLEMINT_CLIENT_MAP[type4];
|
326281
327423
|
if (serviceType === "workspace" || serviceType === "application" || serviceType === "foundry" || serviceType === "applicationAccessToken" || serviceType === "platform" || serviceType === "wallet") {
|
@@ -326285,6 +327427,7 @@ async function waitForCompletion({
|
|
326285
327427
|
if (!service || !("read" in service)) {
|
326286
327428
|
throw new Error(`Service ${serviceType} does not support status checking`);
|
326287
327429
|
}
|
327430
|
+
let hasRestarted = false;
|
326288
327431
|
function showSpinner() {
|
326289
327432
|
return spinner({
|
326290
327433
|
startMessage: `Waiting for ${type4} to be ${getActionLabel(action)}`,
|
@@ -326294,33 +327437,20 @@ async function waitForCompletion({
|
|
326294
327437
|
while (true) {
|
326295
327438
|
try {
|
326296
327439
|
const resource = await service.read(uniqueName);
|
326297
|
-
if (resource.status === "COMPLETED") {
|
326298
|
-
if (spinner2) {
|
326299
|
-
spinner2.text = `${capitalizeFirstLetter2(type4)} is ${getActionLabel(action)}`;
|
326300
|
-
} else {
|
326301
|
-
note(`${capitalizeFirstLetter2(type4)} is ${getActionLabel(action)}`);
|
326302
|
-
}
|
326303
|
-
return true;
|
326304
|
-
}
|
326305
327440
|
if (resource.status === "FAILED") {
|
326306
|
-
|
326307
|
-
|
326308
|
-
|
326309
|
-
note(`${capitalizeFirstLetter2(type4)} failed to ${getActionLabel(action)}`);
|
327441
|
+
updateStatus(spinner2, `${capitalizeFirstLetter2(type4)} failed to ${getActionLabel(action)}`);
|
327442
|
+
if (restartOnError) {
|
327443
|
+
throw new DeploymentFailedError;
|
326310
327444
|
}
|
326311
327445
|
return false;
|
326312
327446
|
}
|
326313
|
-
if (
|
326314
|
-
spinner2
|
326315
|
-
|
326316
|
-
note(`${capitalizeFirstLetter2(type4)} is not ready yet (status: ${resource.status})`);
|
326317
|
-
}
|
326318
|
-
} catch (error45) {
|
326319
|
-
if (spinner2) {
|
326320
|
-
spinner2.text = `${capitalizeFirstLetter2(type4)} is not ready yet (status: UNKNOWN)`;
|
326321
|
-
} else {
|
326322
|
-
note(`${capitalizeFirstLetter2(type4)} is not ready yet (status: UNKNOWN)`);
|
327447
|
+
if (isActionComplete(action, resource.status)) {
|
327448
|
+
updateStatus(spinner2, `${capitalizeFirstLetter2(type4)} is ${getActionLabel(action)}`);
|
327449
|
+
return true;
|
326323
327450
|
}
|
327451
|
+
updateStatus(spinner2, `${capitalizeFirstLetter2(type4)} is not ready yet (status: ${resource.status})`);
|
327452
|
+
} catch (_error) {
|
327453
|
+
updateStatus(spinner2, `${capitalizeFirstLetter2(type4)} is not ready yet (status: UNKNOWN)`);
|
326324
327454
|
}
|
326325
327455
|
if (Date.now() - startTime > maxTimeout) {
|
326326
327456
|
throw new TimeoutError2(`Operation timed out after ${maxTimeout / 60000} minutes for ${type4} with unique name ${uniqueName}`);
|
@@ -326333,23 +327463,59 @@ async function waitForCompletion({
|
|
326333
327463
|
try {
|
326334
327464
|
return await showSpinner();
|
326335
327465
|
} catch (error45) {
|
326336
|
-
|
326337
|
-
if (restartIfTimeout && isTimeoutError) {
|
327466
|
+
if (!hasRestarted && shouldRestart(error45, restartIfTimeout)) {
|
326338
327467
|
note(`Restarting ${capitalizeFirstLetter2(type4)}`);
|
327468
|
+
hasRestarted = true;
|
326339
327469
|
await service.restart(uniqueName);
|
326340
327470
|
return showSpinner();
|
326341
327471
|
}
|
326342
327472
|
throw error45;
|
326343
327473
|
}
|
326344
327474
|
}
|
326345
|
-
function
|
326346
|
-
|
326347
|
-
|
327475
|
+
function shouldRestart(error45, restartIfTimeout) {
|
327476
|
+
const isSpinnerError = error45 instanceof SpinnerError;
|
327477
|
+
const isDeploymentFailedError = error45 instanceof DeploymentFailedError || isSpinnerError && error45.originalError instanceof DeploymentFailedError;
|
327478
|
+
if (isDeploymentFailedError) {
|
327479
|
+
return true;
|
327480
|
+
}
|
327481
|
+
const isTimeoutError = error45 instanceof TimeoutError2 || isSpinnerError && error45.originalError instanceof TimeoutError2;
|
327482
|
+
return restartIfTimeout && isTimeoutError;
|
327483
|
+
}
|
327484
|
+
function updateStatus(spinner2, message) {
|
327485
|
+
if (spinner2) {
|
327486
|
+
spinner2.text = message;
|
327487
|
+
} else {
|
327488
|
+
note(message);
|
327489
|
+
}
|
327490
|
+
}
|
327491
|
+
function isActionComplete(action, status) {
|
327492
|
+
switch (action) {
|
327493
|
+
case "pause":
|
327494
|
+
return status === "PAUSED" || status === "AUTO_PAUSED";
|
327495
|
+
case "resume":
|
327496
|
+
case "deploy":
|
327497
|
+
case "destroy":
|
327498
|
+
case "restart":
|
327499
|
+
return status === "COMPLETED";
|
327500
|
+
default:
|
327501
|
+
return false;
|
326348
327502
|
}
|
326349
|
-
|
326350
|
-
|
327503
|
+
}
|
327504
|
+
function getActionLabel(action) {
|
327505
|
+
switch (action) {
|
327506
|
+
case "restart":
|
327507
|
+
return "restarted";
|
327508
|
+
case "destroy":
|
327509
|
+
return "destroyed";
|
327510
|
+
case "pause":
|
327511
|
+
return "paused";
|
327512
|
+
case "resume":
|
327513
|
+
return "resumed";
|
327514
|
+
case "deploy":
|
327515
|
+
return "deployed";
|
327516
|
+
default:
|
327517
|
+
return "deployed";
|
326351
327518
|
}
|
326352
|
-
return "deployed";
|
326353
327519
|
}
|
326354
327520
|
|
326355
327521
|
// src/prompts/provider.prompt.ts
|
@@ -326430,9 +327596,9 @@ function getCreateCommand({
|
|
326430
327596
|
cmd2.alias(alias);
|
326431
327597
|
}
|
326432
327598
|
if (requiresDeployment) {
|
326433
|
-
cmd2.option("-w, --wait", "Wait until deployed").option("
|
327599
|
+
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");
|
326434
327600
|
}
|
326435
|
-
execute2(cmd2, async ({ acceptDefaults, prod, default: isDefault, wait: wait2, restartIfTimeout, provider, region }, createFunction) => {
|
327601
|
+
execute2(cmd2, async ({ acceptDefaults, prod, default: isDefault, wait: wait2, restartIfTimeout, restartOnError, provider, region }, createFunction) => {
|
326436
327602
|
intro(`Creating ${type4} in the SettleMint platform`);
|
326437
327603
|
const env2 = await loadEnv(false, !!prod);
|
326438
327604
|
const instance = await instancePrompt({ env: env2, accept: acceptDefaults });
|
@@ -326446,8 +327612,8 @@ function getCreateCommand({
|
|
326446
327612
|
instance
|
326447
327613
|
});
|
326448
327614
|
const platformConfig = await settlemint.platform.config();
|
326449
|
-
let selectedProvider
|
326450
|
-
let selectedRegion
|
327615
|
+
let selectedProvider;
|
327616
|
+
let selectedRegion;
|
326451
327617
|
if (cmd2.options.some((option) => option.long === "--provider")) {
|
326452
327618
|
selectedProvider = await providerPrompt(platformConfig, provider);
|
326453
327619
|
if (!selectedProvider) {
|
@@ -326476,7 +327642,8 @@ function getCreateCommand({
|
|
326476
327642
|
type: waitFor?.resourceType ?? type4,
|
326477
327643
|
uniqueName: waitFor?.uniqueName ?? result.uniqueName,
|
326478
327644
|
action: "deploy",
|
326479
|
-
restartIfTimeout
|
327645
|
+
restartIfTimeout,
|
327646
|
+
restartOnError
|
326480
327647
|
});
|
326481
327648
|
if (!isDeployed) {
|
326482
327649
|
throw new Error(`Failed to deploy ${waitFor?.resourceType ?? type4} ${waitFor?.uniqueName ?? result.uniqueName}`);
|
@@ -327658,7 +328825,7 @@ function privateKeyHsmCreateCommand() {
|
|
327658
328825
|
return baseAction({
|
327659
328826
|
...defaultArgs,
|
327660
328827
|
acceptDefaults
|
327661
|
-
}, async ({ settlemint, env: env2, showSpinner, provider, region }) => {
|
328828
|
+
}, async ({ settlemint, env: env2, showSpinner, provider: _provider, region: _region }) => {
|
327662
328829
|
const applicationUniqueName = application ?? env2.SETTLEMINT_APPLICATION;
|
327663
328830
|
if (!applicationUniqueName) {
|
327664
328831
|
return missingApplication();
|
@@ -327947,25 +329114,256 @@ function deleteCommand() {
|
|
327947
329114
|
return new Command("delete").alias("d").description("Delete a resource in the SettleMint platform").addCommand(applicationDeleteCommand()).addCommand(workspaceDeleteCommand());
|
327948
329115
|
}
|
327949
329116
|
|
329117
|
+
// src/commands/platform/common/pause-command.ts
|
329118
|
+
function getPauseCommand({
|
329119
|
+
name: name3,
|
329120
|
+
type: type4,
|
329121
|
+
alias,
|
329122
|
+
envKey,
|
329123
|
+
pauseFunction,
|
329124
|
+
usePersonalAccessToken = true
|
329125
|
+
}) {
|
329126
|
+
const commandName = sanitizeCommandName(name3);
|
329127
|
+
const typeCommandName = sanitizeCommandName(type4);
|
329128
|
+
const exampleCommandPrefix = `platform pause ${typeCommandName !== commandName ? `${typeCommandName} ` : ""}${commandName}`;
|
329129
|
+
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([
|
329130
|
+
{
|
329131
|
+
description: `Pauses the specified ${type4} by unique name`,
|
329132
|
+
command: `${exampleCommandPrefix} <unique-name>`
|
329133
|
+
},
|
329134
|
+
{
|
329135
|
+
description: `Pauses the default ${type4} in the production environment`,
|
329136
|
+
command: `${exampleCommandPrefix} default --prod`
|
329137
|
+
}
|
329138
|
+
])).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 }) => {
|
329139
|
+
intro(`Pausing ${type4} in the SettleMint platform`);
|
329140
|
+
const env2 = await loadEnv(false, !!prod);
|
329141
|
+
const instance = await instancePrompt({ env: env2, accept: acceptDefaults });
|
329142
|
+
const accessToken = await getApplicationOrPersonalAccessToken({
|
329143
|
+
env: env2,
|
329144
|
+
instance,
|
329145
|
+
prefer: usePersonalAccessToken ? "personal" : "application"
|
329146
|
+
});
|
329147
|
+
const settlemint = createSettleMintClient({
|
329148
|
+
accessToken,
|
329149
|
+
instance
|
329150
|
+
});
|
329151
|
+
const isDefaultUniqueName = uniqueName === "default";
|
329152
|
+
const serviceUniqueName = isDefaultUniqueName ? typeof env2[envKey] === "string" ? env2[envKey] : null : uniqueName;
|
329153
|
+
if (!serviceUniqueName) {
|
329154
|
+
cancel2(`No default ${type4} found in your .env file. Please provide a valid ${type4} unique name or set a default ${type4} first.`);
|
329155
|
+
}
|
329156
|
+
const result = await spinner({
|
329157
|
+
startMessage: `Pausing ${type4}`,
|
329158
|
+
task: async () => {
|
329159
|
+
return pauseFunction(settlemint, serviceUniqueName);
|
329160
|
+
},
|
329161
|
+
stopMessage: `${capitalizeFirstLetter2(type4)} pause initiated`
|
329162
|
+
});
|
329163
|
+
if (wait2) {
|
329164
|
+
const isPaused = await waitForCompletion({
|
329165
|
+
settlemint,
|
329166
|
+
type: type4,
|
329167
|
+
uniqueName: serviceUniqueName,
|
329168
|
+
action: "pause"
|
329169
|
+
});
|
329170
|
+
if (!isPaused) {
|
329171
|
+
throw new Error(`Failed to pause ${type4} ${serviceUniqueName}`);
|
329172
|
+
}
|
329173
|
+
}
|
329174
|
+
outro(`${capitalizeFirstLetter2(type4)} ${result.name} pause initiated successfully`);
|
329175
|
+
});
|
329176
|
+
}
|
329177
|
+
|
329178
|
+
// src/commands/platform/blockchain-network/pause.ts
|
329179
|
+
function blockchainNetworkPauseCommand() {
|
329180
|
+
return getPauseCommand({
|
329181
|
+
name: "blockchain-network",
|
329182
|
+
type: "blockchain network",
|
329183
|
+
alias: "bnw",
|
329184
|
+
envKey: "SETTLEMINT_BLOCKCHAIN_NETWORK",
|
329185
|
+
pauseFunction: async (settlemint, id) => {
|
329186
|
+
return settlemint.blockchainNetwork.pause(id);
|
329187
|
+
}
|
329188
|
+
});
|
329189
|
+
}
|
329190
|
+
|
329191
|
+
// src/commands/platform/blockchain-node/pause.ts
|
329192
|
+
function blockchainNodePauseCommand() {
|
329193
|
+
return getPauseCommand({
|
329194
|
+
name: "blockchain-node",
|
329195
|
+
type: "blockchain node",
|
329196
|
+
alias: "bn",
|
329197
|
+
envKey: "SETTLEMINT_BLOCKCHAIN_NODE",
|
329198
|
+
pauseFunction: async (settlemint, id) => {
|
329199
|
+
return settlemint.blockchainNode.pause(id);
|
329200
|
+
}
|
329201
|
+
});
|
329202
|
+
}
|
329203
|
+
|
329204
|
+
// src/commands/platform/custom-deployments/pause.ts
|
329205
|
+
function customDeploymentPauseCommand() {
|
329206
|
+
return getPauseCommand({
|
329207
|
+
name: "custom-deployment",
|
329208
|
+
type: "custom deployment",
|
329209
|
+
alias: "cd",
|
329210
|
+
envKey: "SETTLEMINT_CUSTOM_DEPLOYMENT",
|
329211
|
+
pauseFunction: async (settlemint, id) => {
|
329212
|
+
return settlemint.customDeployment.pause(id);
|
329213
|
+
}
|
329214
|
+
});
|
329215
|
+
}
|
329216
|
+
|
329217
|
+
// src/commands/platform/insights/blockscout/pause.ts
|
329218
|
+
function blockscoutPauseCommand() {
|
329219
|
+
return getPauseCommand({
|
329220
|
+
name: "blockscout",
|
329221
|
+
type: "insights",
|
329222
|
+
alias: "bs",
|
329223
|
+
envKey: "SETTLEMINT_BLOCKSCOUT",
|
329224
|
+
pauseFunction: async (settlemint, id) => {
|
329225
|
+
return settlemint.insights.pause(id);
|
329226
|
+
}
|
329227
|
+
});
|
329228
|
+
}
|
329229
|
+
|
329230
|
+
// src/commands/platform/insights/pause.ts
|
329231
|
+
function insightsPauseCommand() {
|
329232
|
+
return new Command("insights").alias("in").description("Pause an insights service in the SettleMint platform").addCommand(blockscoutPauseCommand());
|
329233
|
+
}
|
329234
|
+
|
329235
|
+
// src/commands/platform/integration-tools/hasura/pause.ts
|
329236
|
+
function hasuraPauseCommand() {
|
329237
|
+
return getPauseCommand({
|
329238
|
+
name: "hasura",
|
329239
|
+
type: "integration tool",
|
329240
|
+
alias: "ha",
|
329241
|
+
envKey: "SETTLEMINT_HASURA",
|
329242
|
+
pauseFunction: async (settlemint, id) => {
|
329243
|
+
return settlemint.integrationTool.pause(id);
|
329244
|
+
}
|
329245
|
+
});
|
329246
|
+
}
|
329247
|
+
|
329248
|
+
// src/commands/platform/integration-tools/pause.ts
|
329249
|
+
function integrationToolPauseCommand() {
|
329250
|
+
return new Command("integration-tool").alias("it").description("Pause an integration tool service in the SettleMint platform").addCommand(hasuraPauseCommand());
|
329251
|
+
}
|
329252
|
+
|
329253
|
+
// src/commands/platform/load-balancer/pause.ts
|
329254
|
+
function loadBalancerPauseCommand() {
|
329255
|
+
return getPauseCommand({
|
329256
|
+
name: "evm",
|
329257
|
+
type: "load balancer",
|
329258
|
+
alias: "lb",
|
329259
|
+
envKey: "SETTLEMINT_BLOCKCHAIN_NODE_OR_LOAD_BALANCER",
|
329260
|
+
pauseFunction: async (settlemint, id) => {
|
329261
|
+
return settlemint.loadBalancer.pause(id);
|
329262
|
+
}
|
329263
|
+
});
|
329264
|
+
}
|
329265
|
+
|
329266
|
+
// src/commands/platform/middleware/graph/pause.ts
|
329267
|
+
function graphMiddlewarePauseCommand() {
|
329268
|
+
return getPauseCommand({
|
329269
|
+
name: "graph",
|
329270
|
+
type: "middleware",
|
329271
|
+
alias: "gr",
|
329272
|
+
envKey: "SETTLEMINT_THEGRAPH",
|
329273
|
+
pauseFunction: async (settlemint, id) => {
|
329274
|
+
return settlemint.middleware.pause(id);
|
329275
|
+
}
|
329276
|
+
});
|
329277
|
+
}
|
329278
|
+
|
329279
|
+
// src/commands/platform/middleware/smart-contract-portal/pause.ts
|
329280
|
+
function smartContractPortalMiddlewarePauseCommand() {
|
329281
|
+
return getPauseCommand({
|
329282
|
+
name: "smart-contract-portal",
|
329283
|
+
type: "middleware",
|
329284
|
+
alias: "scp",
|
329285
|
+
envKey: "SETTLEMINT_PORTAL",
|
329286
|
+
pauseFunction: async (settlemint, id) => {
|
329287
|
+
return settlemint.middleware.pause(id);
|
329288
|
+
}
|
329289
|
+
});
|
329290
|
+
}
|
329291
|
+
|
329292
|
+
// src/commands/platform/middleware/pause.ts
|
329293
|
+
function middlewarePauseCommand() {
|
329294
|
+
return new Command("middleware").alias("mw").description("Pause a middleware service in the SettleMint platform").addCommand(graphMiddlewarePauseCommand()).addCommand(smartContractPortalMiddlewarePauseCommand());
|
329295
|
+
}
|
329296
|
+
|
329297
|
+
// src/commands/platform/private-key/pause.ts
|
329298
|
+
function privateKeyPauseCommand() {
|
329299
|
+
return getPauseCommand({
|
329300
|
+
name: "private-key",
|
329301
|
+
type: "private key",
|
329302
|
+
alias: "pk",
|
329303
|
+
envKey: "SETTLEMINT_ACCESSIBLE_PRIVATE_KEY",
|
329304
|
+
pauseFunction: async (settlemint, id) => {
|
329305
|
+
return settlemint.privateKey.pause(id);
|
329306
|
+
}
|
329307
|
+
});
|
329308
|
+
}
|
329309
|
+
|
329310
|
+
// src/commands/platform/storage/ipfs/pause.ts
|
329311
|
+
function ipfsStoragePauseCommand() {
|
329312
|
+
return getPauseCommand({
|
329313
|
+
name: "ipfs",
|
329314
|
+
type: "storage",
|
329315
|
+
alias: "ip",
|
329316
|
+
envKey: "SETTLEMINT_IPFS",
|
329317
|
+
pauseFunction: async (settlemint, id) => {
|
329318
|
+
return settlemint.storage.pause(id);
|
329319
|
+
}
|
329320
|
+
});
|
329321
|
+
}
|
329322
|
+
|
329323
|
+
// src/commands/platform/storage/minio/pause.ts
|
329324
|
+
function minioStoragePauseCommand() {
|
329325
|
+
return getPauseCommand({
|
329326
|
+
name: "minio",
|
329327
|
+
type: "storage",
|
329328
|
+
alias: "m",
|
329329
|
+
envKey: "SETTLEMINT_MINIO",
|
329330
|
+
pauseFunction: async (settlemint, id) => {
|
329331
|
+
return settlemint.storage.pause(id);
|
329332
|
+
}
|
329333
|
+
});
|
329334
|
+
}
|
329335
|
+
|
329336
|
+
// src/commands/platform/storage/pause.ts
|
329337
|
+
function storagePauseCommand() {
|
329338
|
+
return new Command("storage").alias("st").description("Pause a storage service in the SettleMint platform").addCommand(ipfsStoragePauseCommand()).addCommand(minioStoragePauseCommand());
|
329339
|
+
}
|
329340
|
+
|
329341
|
+
// src/commands/platform/pause.ts
|
329342
|
+
function pauseCommand() {
|
329343
|
+
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());
|
329344
|
+
return cmd2;
|
329345
|
+
}
|
329346
|
+
|
327950
329347
|
// src/commands/platform/common/restart-command.ts
|
327951
329348
|
function getRestartCommand({
|
327952
329349
|
name: name3,
|
327953
329350
|
type: type4,
|
327954
|
-
subType,
|
327955
329351
|
alias,
|
327956
329352
|
envKey,
|
327957
329353
|
restartFunction,
|
327958
329354
|
usePersonalAccessToken = true
|
327959
329355
|
}) {
|
327960
329356
|
const commandName = sanitizeCommandName(name3);
|
329357
|
+
const typeCommandName = sanitizeCommandName(type4);
|
329358
|
+
const exampleCommandPrefix = `platform restart ${typeCommandName !== commandName ? `${typeCommandName} ` : ""}${commandName}`;
|
327961
329359
|
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([
|
327962
329360
|
{
|
327963
|
-
description: `Restarts the specified ${type4} by
|
327964
|
-
command:
|
329361
|
+
description: `Restarts the specified ${type4} by unique name`,
|
329362
|
+
command: `${exampleCommandPrefix} <unique-name>`
|
327965
329363
|
},
|
327966
329364
|
{
|
327967
329365
|
description: `Restarts the default ${type4} in the production environment`,
|
327968
|
-
command:
|
329366
|
+
command: `${exampleCommandPrefix} default --prod`
|
327969
329367
|
}
|
327970
329368
|
])).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 }) => {
|
327971
329369
|
intro(`Restarting ${type4} in the SettleMint platform`);
|
@@ -328052,7 +329450,6 @@ function blockscoutRestartCommand() {
|
|
328052
329450
|
return getRestartCommand({
|
328053
329451
|
name: "blockscout",
|
328054
329452
|
type: "insights",
|
328055
|
-
subType: "blockscout",
|
328056
329453
|
alias: "bs",
|
328057
329454
|
envKey: "SETTLEMINT_BLOCKSCOUT",
|
328058
329455
|
restartFunction: async (settlemint, uniqueName) => {
|
@@ -328071,7 +329468,6 @@ function hasuraRestartCommand() {
|
|
328071
329468
|
return getRestartCommand({
|
328072
329469
|
name: "hasura",
|
328073
329470
|
type: "integration tool",
|
328074
|
-
subType: "hasura",
|
328075
329471
|
alias: "ha",
|
328076
329472
|
envKey: "SETTLEMINT_HASURA",
|
328077
329473
|
restartFunction: async (settlemint, uniqueName) => {
|
@@ -328103,7 +329499,6 @@ function graphRestartCommand() {
|
|
328103
329499
|
return getRestartCommand({
|
328104
329500
|
name: "graph",
|
328105
329501
|
type: "middleware",
|
328106
|
-
subType: "graph",
|
328107
329502
|
alias: "gr",
|
328108
329503
|
envKey: "SETTLEMINT_THEGRAPH",
|
328109
329504
|
restartFunction: async (settlemint, id) => {
|
@@ -328117,7 +329512,6 @@ function smartContractPortalRestartCommand() {
|
|
328117
329512
|
return getRestartCommand({
|
328118
329513
|
name: "smart-contract-portal",
|
328119
329514
|
type: "middleware",
|
328120
|
-
subType: "smart-contract-portal",
|
328121
329515
|
alias: "scp",
|
328122
329516
|
envKey: "SETTLEMINT_PORTAL",
|
328123
329517
|
restartFunction: async (settlemint, uniqueName) => {
|
@@ -328168,6 +329562,236 @@ function restartCommand() {
|
|
328168
329562
|
return cmd2;
|
328169
329563
|
}
|
328170
329564
|
|
329565
|
+
// src/commands/platform/common/resume-command.ts
|
329566
|
+
function getResumeCommand({
|
329567
|
+
name: name3,
|
329568
|
+
type: type4,
|
329569
|
+
alias,
|
329570
|
+
envKey,
|
329571
|
+
resumeFunction,
|
329572
|
+
usePersonalAccessToken = true
|
329573
|
+
}) {
|
329574
|
+
const commandName = sanitizeCommandName(name3);
|
329575
|
+
const typeCommandName = sanitizeCommandName(type4);
|
329576
|
+
const exampleCommandPrefix = `platform resume ${typeCommandName !== commandName ? `${typeCommandName} ` : ""}${commandName}`;
|
329577
|
+
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([
|
329578
|
+
{
|
329579
|
+
description: `Resumes the specified ${type4} by unique name`,
|
329580
|
+
command: `${exampleCommandPrefix} <unique-name>`
|
329581
|
+
},
|
329582
|
+
{
|
329583
|
+
description: `Resumes the default ${type4} in the production environment`,
|
329584
|
+
command: `${exampleCommandPrefix} default --prod`
|
329585
|
+
}
|
329586
|
+
])).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 }) => {
|
329587
|
+
intro(`Resuming ${type4} in the SettleMint platform`);
|
329588
|
+
const env2 = await loadEnv(false, !!prod);
|
329589
|
+
const instance = await instancePrompt({ env: env2, accept: acceptDefaults });
|
329590
|
+
const accessToken = await getApplicationOrPersonalAccessToken({
|
329591
|
+
env: env2,
|
329592
|
+
instance,
|
329593
|
+
prefer: usePersonalAccessToken ? "personal" : "application"
|
329594
|
+
});
|
329595
|
+
const settlemint = createSettleMintClient({
|
329596
|
+
accessToken,
|
329597
|
+
instance
|
329598
|
+
});
|
329599
|
+
const isDefaultUniqueName = uniqueName === "default";
|
329600
|
+
const serviceUniqueName = isDefaultUniqueName ? typeof env2[envKey] === "string" ? env2[envKey] : null : uniqueName;
|
329601
|
+
if (!serviceUniqueName) {
|
329602
|
+
cancel2(`No default ${type4} found in your .env file. Please provide a valid ${type4} unique name or set a default ${type4} first.`);
|
329603
|
+
}
|
329604
|
+
const result = await spinner({
|
329605
|
+
startMessage: `Resuming ${type4}`,
|
329606
|
+
task: async () => {
|
329607
|
+
return resumeFunction(settlemint, serviceUniqueName);
|
329608
|
+
},
|
329609
|
+
stopMessage: `${capitalizeFirstLetter2(type4)} resume initiated`
|
329610
|
+
});
|
329611
|
+
if (wait2) {
|
329612
|
+
const isResumed = await waitForCompletion({
|
329613
|
+
settlemint,
|
329614
|
+
type: type4,
|
329615
|
+
uniqueName: serviceUniqueName,
|
329616
|
+
action: "resume"
|
329617
|
+
});
|
329618
|
+
if (!isResumed) {
|
329619
|
+
throw new Error(`Failed to resume ${type4} ${serviceUniqueName}`);
|
329620
|
+
}
|
329621
|
+
}
|
329622
|
+
outro(`${capitalizeFirstLetter2(type4)} ${result.name} resume initiated successfully`);
|
329623
|
+
});
|
329624
|
+
}
|
329625
|
+
|
329626
|
+
// src/commands/platform/blockchain-network/resume.ts
|
329627
|
+
function blockchainNetworkResumeCommand() {
|
329628
|
+
return getResumeCommand({
|
329629
|
+
name: "blockchain-network",
|
329630
|
+
type: "blockchain network",
|
329631
|
+
alias: "bnw",
|
329632
|
+
envKey: "SETTLEMINT_BLOCKCHAIN_NETWORK",
|
329633
|
+
resumeFunction: async (settlemint, id) => {
|
329634
|
+
return settlemint.blockchainNetwork.resume(id);
|
329635
|
+
}
|
329636
|
+
});
|
329637
|
+
}
|
329638
|
+
|
329639
|
+
// src/commands/platform/blockchain-node/resume.ts
|
329640
|
+
function blockchainNodeResumeCommand() {
|
329641
|
+
return getResumeCommand({
|
329642
|
+
name: "blockchain-node",
|
329643
|
+
type: "blockchain node",
|
329644
|
+
alias: "bn",
|
329645
|
+
envKey: "SETTLEMINT_BLOCKCHAIN_NODE",
|
329646
|
+
resumeFunction: async (settlemint, id) => {
|
329647
|
+
return settlemint.blockchainNode.resume(id);
|
329648
|
+
}
|
329649
|
+
});
|
329650
|
+
}
|
329651
|
+
|
329652
|
+
// src/commands/platform/custom-deployments/resume.ts
|
329653
|
+
function customDeploymentResumeCommand() {
|
329654
|
+
return getResumeCommand({
|
329655
|
+
name: "custom-deployment",
|
329656
|
+
type: "custom deployment",
|
329657
|
+
alias: "cd",
|
329658
|
+
envKey: "SETTLEMINT_CUSTOM_DEPLOYMENT",
|
329659
|
+
resumeFunction: async (settlemint, id) => {
|
329660
|
+
return settlemint.customDeployment.resume(id);
|
329661
|
+
}
|
329662
|
+
});
|
329663
|
+
}
|
329664
|
+
|
329665
|
+
// src/commands/platform/insights/blockscout/resume.ts
|
329666
|
+
function blockscoutResumeCommand() {
|
329667
|
+
return getResumeCommand({
|
329668
|
+
name: "blockscout",
|
329669
|
+
type: "insights",
|
329670
|
+
alias: "bs",
|
329671
|
+
envKey: "SETTLEMINT_BLOCKSCOUT",
|
329672
|
+
resumeFunction: async (settlemint, id) => {
|
329673
|
+
return settlemint.insights.resume(id);
|
329674
|
+
}
|
329675
|
+
});
|
329676
|
+
}
|
329677
|
+
|
329678
|
+
// src/commands/platform/insights/resume.ts
|
329679
|
+
function insightsResumeCommand() {
|
329680
|
+
return new Command("insights").alias("in").description("Resume an insights service in the SettleMint platform").addCommand(blockscoutResumeCommand());
|
329681
|
+
}
|
329682
|
+
|
329683
|
+
// src/commands/platform/integration-tools/hasura/resume.ts
|
329684
|
+
function hasuraResumeCommand() {
|
329685
|
+
return getResumeCommand({
|
329686
|
+
name: "hasura",
|
329687
|
+
type: "integration tool",
|
329688
|
+
alias: "ha",
|
329689
|
+
envKey: "SETTLEMINT_HASURA",
|
329690
|
+
resumeFunction: async (settlemint, id) => {
|
329691
|
+
return settlemint.integrationTool.resume(id);
|
329692
|
+
}
|
329693
|
+
});
|
329694
|
+
}
|
329695
|
+
|
329696
|
+
// src/commands/platform/integration-tools/resume.ts
|
329697
|
+
function integrationToolResumeCommand() {
|
329698
|
+
return new Command("integration-tool").alias("it").description("Resume an integration tool service in the SettleMint platform").addCommand(hasuraResumeCommand());
|
329699
|
+
}
|
329700
|
+
|
329701
|
+
// src/commands/platform/load-balancer/resume.ts
|
329702
|
+
function loadBalancerResumeCommand() {
|
329703
|
+
return getResumeCommand({
|
329704
|
+
name: "load-balancer",
|
329705
|
+
type: "load balancer",
|
329706
|
+
alias: "lb",
|
329707
|
+
envKey: "SETTLEMINT_BLOCKCHAIN_NODE_OR_LOAD_BALANCER",
|
329708
|
+
resumeFunction: async (settlemint, id) => {
|
329709
|
+
return settlemint.loadBalancer.resume(id);
|
329710
|
+
}
|
329711
|
+
});
|
329712
|
+
}
|
329713
|
+
|
329714
|
+
// src/commands/platform/middleware/graph/resume.ts
|
329715
|
+
function graphMiddlewareResumeCommand() {
|
329716
|
+
return getResumeCommand({
|
329717
|
+
name: "graph",
|
329718
|
+
type: "middleware",
|
329719
|
+
alias: "gr",
|
329720
|
+
envKey: "SETTLEMINT_THEGRAPH",
|
329721
|
+
resumeFunction: async (settlemint, id) => {
|
329722
|
+
return settlemint.middleware.resume(id);
|
329723
|
+
}
|
329724
|
+
});
|
329725
|
+
}
|
329726
|
+
|
329727
|
+
// src/commands/platform/middleware/smart-contract-portal/resume.ts
|
329728
|
+
function smartContractPortalMiddlewareResumeCommand() {
|
329729
|
+
return getResumeCommand({
|
329730
|
+
name: "smart-contract-portal",
|
329731
|
+
type: "middleware",
|
329732
|
+
alias: "scp",
|
329733
|
+
envKey: "SETTLEMINT_PORTAL",
|
329734
|
+
resumeFunction: async (settlemint, id) => {
|
329735
|
+
return settlemint.middleware.resume(id);
|
329736
|
+
}
|
329737
|
+
});
|
329738
|
+
}
|
329739
|
+
|
329740
|
+
// src/commands/platform/middleware/resume.ts
|
329741
|
+
function middlewareResumeCommand() {
|
329742
|
+
return new Command("middleware").alias("mw").description("Resume a middleware service in the SettleMint platform").addCommand(graphMiddlewareResumeCommand()).addCommand(smartContractPortalMiddlewareResumeCommand());
|
329743
|
+
}
|
329744
|
+
|
329745
|
+
// src/commands/platform/private-key/resume.ts
|
329746
|
+
function privateKeyResumeCommand() {
|
329747
|
+
return getResumeCommand({
|
329748
|
+
name: "private-key",
|
329749
|
+
type: "private key",
|
329750
|
+
alias: "pk",
|
329751
|
+
envKey: "SETTLEMINT_ACCESSIBLE_PRIVATE_KEY",
|
329752
|
+
resumeFunction: async (settlemint, id) => {
|
329753
|
+
return settlemint.privateKey.resume(id);
|
329754
|
+
}
|
329755
|
+
});
|
329756
|
+
}
|
329757
|
+
|
329758
|
+
// src/commands/platform/storage/ipfs/resume.ts
|
329759
|
+
function ipfsStorageResumeCommand() {
|
329760
|
+
return getResumeCommand({
|
329761
|
+
name: "ipfs",
|
329762
|
+
type: "storage",
|
329763
|
+
alias: "ip",
|
329764
|
+
envKey: "SETTLEMINT_IPFS",
|
329765
|
+
resumeFunction: async (settlemint, id) => {
|
329766
|
+
return settlemint.storage.resume(id);
|
329767
|
+
}
|
329768
|
+
});
|
329769
|
+
}
|
329770
|
+
|
329771
|
+
// src/commands/platform/storage/minio/resume.ts
|
329772
|
+
function minioStorageResumeCommand() {
|
329773
|
+
return getResumeCommand({
|
329774
|
+
name: "minio",
|
329775
|
+
type: "storage",
|
329776
|
+
alias: "m",
|
329777
|
+
envKey: "SETTLEMINT_MINIO",
|
329778
|
+
resumeFunction: async (settlemint, id) => {
|
329779
|
+
return settlemint.storage.resume(id);
|
329780
|
+
}
|
329781
|
+
});
|
329782
|
+
}
|
329783
|
+
|
329784
|
+
// src/commands/platform/storage/resume.ts
|
329785
|
+
function storageResumeCommand() {
|
329786
|
+
return new Command("storage").alias("st").description("Resume a storage service in the SettleMint platform").addCommand(ipfsStorageResumeCommand()).addCommand(minioStorageResumeCommand());
|
329787
|
+
}
|
329788
|
+
|
329789
|
+
// src/commands/platform/resume.ts
|
329790
|
+
function resumeCommand() {
|
329791
|
+
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());
|
329792
|
+
return cmd2;
|
329793
|
+
}
|
329794
|
+
|
328171
329795
|
// src/commands/platform/custom-deployments/update.ts
|
328172
329796
|
function customDeploymentsUpdateCommand() {
|
328173
329797
|
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([
|
@@ -328232,7 +329856,7 @@ function jsonOutput(data) {
|
|
328232
329856
|
var composer = require_composer();
|
328233
329857
|
var Document = require_Document();
|
328234
329858
|
var Schema = require_Schema();
|
328235
|
-
var
|
329859
|
+
var errors6 = require_errors3();
|
328236
329860
|
var Alias = require_Alias();
|
328237
329861
|
var identity2 = require_identity();
|
328238
329862
|
var Pair = require_Pair();
|
@@ -328248,9 +329872,9 @@ var visit2 = require_visit();
|
|
328248
329872
|
var $Composer = composer.Composer;
|
328249
329873
|
var $Document = Document.Document;
|
328250
329874
|
var $Schema = Schema.Schema;
|
328251
|
-
var $YAMLError =
|
328252
|
-
var $YAMLParseError =
|
328253
|
-
var $YAMLWarning =
|
329875
|
+
var $YAMLError = errors6.YAMLError;
|
329876
|
+
var $YAMLParseError = errors6.YAMLParseError;
|
329877
|
+
var $YAMLWarning = errors6.YAMLWarning;
|
328254
329878
|
var $Alias = Alias.Alias;
|
328255
329879
|
var $isAlias = identity2.isAlias;
|
328256
329880
|
var $isCollection = identity2.isCollection;
|
@@ -328558,7 +330182,7 @@ function servicesCommand() {
|
|
328558
330182
|
if (!applicationUniqueName) {
|
328559
330183
|
return nothingSelectedError("application");
|
328560
330184
|
}
|
328561
|
-
let effectiveTypes
|
330185
|
+
let effectiveTypes;
|
328562
330186
|
if (options.type && options.type.length > 0) {
|
328563
330187
|
effectiveTypes = options.type;
|
328564
330188
|
} else if (typeOperands && typeOperands.length > 0) {
|
@@ -328616,7 +330240,7 @@ async function getServicesAndMapResults({
|
|
328616
330240
|
const application = await settlemint.application.read(applicationUniqueName);
|
328617
330241
|
const services = await servicesSpinner(settlemint, applicationUniqueName, types4);
|
328618
330242
|
const results = (types4 ?? SERVICE_TYPES).filter((serviceType) => !types4 || types4.includes(serviceType)).map((serviceType) => {
|
328619
|
-
const [_6, labels] = Object.entries(LABELS_MAP).find(([
|
330243
|
+
const [_6, labels] = Object.entries(LABELS_MAP).find(([_key, value4]) => value4.command === serviceType) ?? [
|
328620
330244
|
null,
|
328621
330245
|
{ plural: serviceType }
|
328622
330246
|
];
|
@@ -328743,7 +330367,7 @@ function listCommand() {
|
|
328743
330367
|
|
328744
330368
|
// src/commands/platform.ts
|
328745
330369
|
function platformCommand() {
|
328746
|
-
return new Command("platform").description("Manage SettleMint platform resources").addCommand(configCommand()).addCommand(createCommand3()).addCommand(deleteCommand()).addCommand(listCommand()).addCommand(restartCommand()).addCommand(updateCommand());
|
330370
|
+
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());
|
328747
330371
|
}
|
328748
330372
|
|
328749
330373
|
// src/commands/smart-contract-set/create.ts
|
@@ -328793,7 +330417,7 @@ var import_which = __toESM(require_lib5(), 1);
|
|
328793
330417
|
async function executeFoundryCommand(command, args) {
|
328794
330418
|
try {
|
328795
330419
|
await import_which.default(command);
|
328796
|
-
} catch (
|
330420
|
+
} catch (_error) {
|
328797
330421
|
cancel2("Foundry is not installed. Instructions to install Foundry can be found here: https://book.getfoundry.sh/getting-started/installation");
|
328798
330422
|
}
|
328799
330423
|
return executeCommand(command, args);
|
@@ -328857,11 +330481,11 @@ function createCommand4() {
|
|
328857
330481
|
|
328858
330482
|
// src/utils/commands/passthrough-options.ts
|
328859
330483
|
function mapPassthroughOptions(options, command) {
|
328860
|
-
const optionArgs = Object.entries(options).map(([
|
330484
|
+
const optionArgs = Object.entries(options).map(([key4, value4]) => {
|
328861
330485
|
if (value4 === true) {
|
328862
|
-
return `--${
|
330486
|
+
return `--${key4}`;
|
328863
330487
|
}
|
328864
|
-
return `--${
|
330488
|
+
return `--${key4}=${value4}`;
|
328865
330489
|
});
|
328866
330490
|
return [...optionArgs, ...command.args];
|
328867
330491
|
}
|
@@ -328881,7 +330505,7 @@ function foundryBuildCommand() {
|
|
328881
330505
|
description: "Build the smart contracts with additional Forge options",
|
328882
330506
|
command: "scs foundry build --optimize --force"
|
328883
330507
|
}
|
328884
|
-
])).helpOption(false).option("-h, --help", "Get list of possible forge options").passThroughOptions().allowUnknownOption(true).arguments("[operands...]").action(async (operands, options,
|
330508
|
+
])).helpOption(false).option("-h, --help", "Get list of possible forge options").passThroughOptions().allowUnknownOption(true).arguments("[operands...]").action(async (operands, options, _cmd) => {
|
328885
330509
|
intro("Building smart contracts using Foundry");
|
328886
330510
|
const forgeOptions = mapPassthroughOptions(options, { args: operands });
|
328887
330511
|
await executeFoundryCommand("forge", ["build", ...forgeOptions]);
|
@@ -328904,7 +330528,7 @@ function foundryFormatCommand() {
|
|
328904
330528
|
description: "Format the smart contracts with additional Forge options",
|
328905
330529
|
command: "scs foundry format --check"
|
328906
330530
|
}
|
328907
|
-
])).helpOption(false).option("-h, --help", "Get list of possible forge options").passThroughOptions().allowUnknownOption(true).arguments("[operands...]").action(async (operands, options,
|
330531
|
+
])).helpOption(false).option("-h, --help", "Get list of possible forge options").passThroughOptions().allowUnknownOption(true).arguments("[operands...]").action(async (operands, options, _cmd) => {
|
328908
330532
|
intro("Formatting smart contracts using Foundry");
|
328909
330533
|
const forgeOptions = mapPassthroughOptions(options, { args: operands });
|
328910
330534
|
await executeFoundryCommand("forge", ["fmt", ...forgeOptions]);
|
@@ -328927,7 +330551,7 @@ function foundryNetworkCommand() {
|
|
328927
330551
|
description: "Start a development network using Foundry with a specific port",
|
328928
330552
|
command: "scs foundry network --port 3000"
|
328929
330553
|
}
|
328930
|
-
])).helpOption(false).option("-h, --help", "Get list of possible anvil options").passThroughOptions().allowUnknownOption(true).arguments("[operands...]").action(async (operands, options,
|
330554
|
+
])).helpOption(false).option("-h, --help", "Get list of possible anvil options").passThroughOptions().allowUnknownOption(true).arguments("[operands...]").action(async (operands, options, _cmd) => {
|
328931
330555
|
const anvilOptions = mapPassthroughOptions(options, { args: operands });
|
328932
330556
|
await executeFoundryCommand("anvil", anvilOptions);
|
328933
330557
|
});
|
@@ -328948,7 +330572,7 @@ function foundryTestCommand() {
|
|
328948
330572
|
description: "Run a specific test function",
|
328949
330573
|
command: "scs foundry test --match-test testToken"
|
328950
330574
|
}
|
328951
|
-
])).helpOption(false).option("-h, --help", "Get list of possible forge options").passThroughOptions().allowUnknownOption(true).arguments("[operands...]").action(async (operands, options,
|
330575
|
+
])).helpOption(false).option("-h, --help", "Get list of possible forge options").passThroughOptions().allowUnknownOption(true).arguments("[operands...]").action(async (operands, options, _cmd) => {
|
328952
330576
|
intro("Running smart contract tests using Foundry");
|
328953
330577
|
const forgeOptions = mapPassthroughOptions(options, { args: operands });
|
328954
330578
|
await executeFoundryCommand("forge", ["test", ...forgeOptions]);
|
@@ -328962,7 +330586,7 @@ var validateIfRequiredPackagesAreInstalled = async (packages, cwd2) => {
|
|
328962
330586
|
try {
|
328963
330587
|
const isInstalled = await isPackageInstalled(pkg, cwd2);
|
328964
330588
|
return { packageName: pkg, isInstalled };
|
328965
|
-
} catch (
|
330589
|
+
} catch (_err) {
|
328966
330590
|
return { packageName: pkg, isInstalled: false };
|
328967
330591
|
}
|
328968
330592
|
}));
|
@@ -328987,7 +330611,7 @@ function hardhatBuildCommand() {
|
|
328987
330611
|
description: "Build the smart contracts using additional options to the Hardhat compile command",
|
328988
330612
|
command: "scs hardhat build --concurrency 2"
|
328989
330613
|
}
|
328990
|
-
])).helpOption(false).option("-h, --help", "Get list of possible hardhat compile options").passThroughOptions().allowUnknownOption(true).arguments("[operands...]").action(async (operands, options,
|
330614
|
+
])).helpOption(false).option("-h, --help", "Get list of possible hardhat compile options").passThroughOptions().allowUnknownOption(true).arguments("[operands...]").action(async (operands, options, _cmd) => {
|
328991
330615
|
intro("Building smart contracts using Hardhat");
|
328992
330616
|
await validateIfRequiredPackagesAreInstalled(["hardhat"]);
|
328993
330617
|
const hardhatOptions = mapPassthroughOptions(options, { args: operands });
|
@@ -329058,7 +330682,7 @@ async function selectTargetNode({
|
|
329058
330682
|
settlemint
|
329059
330683
|
}) {
|
329060
330684
|
const nodeUniqueName = blockchainNodeUniqueName ?? (autoAccept ? env2.SETTLEMINT_BLOCKCHAIN_NODE : undefined);
|
329061
|
-
let node
|
330685
|
+
let node;
|
329062
330686
|
if (!nodeUniqueName) {
|
329063
330687
|
if (!env2.SETTLEMINT_APPLICATION) {
|
329064
330688
|
return missingApplication();
|
@@ -329282,7 +330906,7 @@ function hardhatDeployRemoteCommand() {
|
|
329282
330906
|
} else {
|
329283
330907
|
note("Smart contract deployment was cancelled");
|
329284
330908
|
}
|
329285
|
-
} catch (
|
330909
|
+
} catch (_error) {
|
329286
330910
|
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.");
|
329287
330911
|
}
|
329288
330912
|
});
|
@@ -329312,7 +330936,7 @@ function hardhatNetworkCommand() {
|
|
329312
330936
|
description: "Start a development network using Hardhat with a specific port",
|
329313
330937
|
command: "scs hardhat network --port 3000"
|
329314
330938
|
}
|
329315
|
-
])).helpOption(false).option("-h, --help", "Get list of possible hardhat node options").passThroughOptions().allowUnknownOption(true).arguments("[operands...]").action(async (operands, options,
|
330939
|
+
])).helpOption(false).option("-h, --help", "Get list of possible hardhat node options").passThroughOptions().allowUnknownOption(true).arguments("[operands...]").action(async (operands, options, _cmd) => {
|
329316
330940
|
intro("Starting development network using Hardhat");
|
329317
330941
|
await validateIfRequiredPackagesAreInstalled(["hardhat"]);
|
329318
330942
|
const hardhatOptions = mapPassthroughOptions(options, { args: operands });
|
@@ -329421,7 +331045,7 @@ function hardhatTestCommand() {
|
|
329421
331045
|
description: "Run a specific test file",
|
329422
331046
|
command: "scs hardhat test test/token.test.ts"
|
329423
331047
|
}
|
329424
|
-
])).helpOption(false).option("-h, --help", "Get list of possible hardhat test options").passThroughOptions().allowUnknownOption(true).arguments("[operands...]").action(async (operands, options,
|
331048
|
+
])).helpOption(false).option("-h, --help", "Get list of possible hardhat test options").passThroughOptions().allowUnknownOption(true).arguments("[operands...]").action(async (operands, options, _cmd) => {
|
329425
331049
|
intro("Running smart contract tests using Hardhat");
|
329426
331050
|
await validateIfRequiredPackagesAreInstalled(["hardhat"]);
|
329427
331051
|
const hardhatOptions = mapPassthroughOptions(options, { args: operands });
|
@@ -329679,12 +331303,12 @@ async function getNodeName({
|
|
329679
331303
|
|
329680
331304
|
// src/commands/smart-contract-set/subgraph/build.ts
|
329681
331305
|
function subgraphBuildCommand() {
|
329682
|
-
return new Command("build").description("Build the subgraph").usage(createExamples([
|
331306
|
+
return new Command("build").description("Build the subgraph").option("--ipfs <ipfs-url>", "The IPFS URL to use for the subgraph deployment").usage(createExamples([
|
329683
331307
|
{
|
329684
331308
|
description: "Build the subgraph",
|
329685
331309
|
command: "scs subgraph build"
|
329686
331310
|
}
|
329687
|
-
])).action(async () => {
|
331311
|
+
])).action(async ({ ipfs }) => {
|
329688
331312
|
intro("Building subgraph");
|
329689
331313
|
await validateIfRequiredPackagesAreInstalled(["@graphprotocol/graph-cli"]);
|
329690
331314
|
await subgraphSetup({
|
@@ -329693,7 +331317,7 @@ function subgraphBuildCommand() {
|
|
329693
331317
|
const { command, args } = await getPackageManagerExecutable();
|
329694
331318
|
const subgraphYamlFile = await getSubgraphYamlFile();
|
329695
331319
|
await executeCommand(command, [...args, "graph", "codegen", subgraphYamlFile]);
|
329696
|
-
await executeCommand(command, [...args, "graph", "build", subgraphYamlFile]);
|
331320
|
+
await executeCommand(command, [...args, "graph", "build", ...ipfs ? ["--ipfs", ipfs] : [], subgraphYamlFile]);
|
329697
331321
|
outro("Subgraph built successfully");
|
329698
331322
|
});
|
329699
331323
|
}
|
@@ -330089,4 +331713,4 @@ async function sdkCliCommand(argv = process.argv) {
|
|
330089
331713
|
// src/cli.ts
|
330090
331714
|
sdkCliCommand();
|
330091
331715
|
|
330092
|
-
//# debugId=
|
331716
|
+
//# debugId=AC19ACB00E01E6DF64756E2164756E21
|