@settlemint/sdk-cli 2.4.0-pr2a53144a → 2.4.0-pr2f691dd7
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 +338 -1498
- package/dist/cli.js.map +44 -92
- package/package.json +9 -11
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.4";
|
231627
231627
|
|
231628
231628
|
// ../../node_modules/viem/_esm/errors/base.js
|
231629
231629
|
function walk(err, fn) {
|
@@ -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] =
|
238858
|
+
responses[i6] = 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_(key2, node, visitor, path7) {
|
239301
|
+
const ctrl = callVisitor(key2, node, visitor, path7);
|
239302
239302
|
if (identity2.isNode(ctrl) || identity2.isPair(ctrl)) {
|
239303
|
-
replaceNode(
|
239304
|
-
return visit_(
|
239303
|
+
replaceNode(key2, path7, ctrl);
|
239304
|
+
return visit_(key2, ctrl, visitor, path7);
|
239305
239305
|
}
|
239306
239306
|
if (typeof ctrl !== "symbol") {
|
239307
239307
|
if (identity2.isCollection(node)) {
|
@@ -239345,11 +239345,11 @@ var require_visit = __commonJS((exports) => {
|
|
239345
239345
|
visitAsync.BREAK = BREAK;
|
239346
239346
|
visitAsync.SKIP = SKIP;
|
239347
239347
|
visitAsync.REMOVE = REMOVE;
|
239348
|
-
async function visitAsync_(
|
239349
|
-
const ctrl = await callVisitor(
|
239348
|
+
async function visitAsync_(key2, node, visitor, path7) {
|
239349
|
+
const ctrl = await callVisitor(key2, node, visitor, path7);
|
239350
239350
|
if (identity2.isNode(ctrl) || identity2.isPair(ctrl)) {
|
239351
|
-
replaceNode(
|
239352
|
-
return visitAsync_(
|
239351
|
+
replaceNode(key2, path7, ctrl);
|
239352
|
+
return visitAsync_(key2, ctrl, visitor, path7);
|
239353
239353
|
}
|
239354
239354
|
if (typeof ctrl !== "symbol") {
|
239355
239355
|
if (identity2.isCollection(node)) {
|
@@ -239399,27 +239399,27 @@ var require_visit = __commonJS((exports) => {
|
|
239399
239399
|
}
|
239400
239400
|
return visitor;
|
239401
239401
|
}
|
239402
|
-
function callVisitor(
|
239402
|
+
function callVisitor(key2, node, visitor, path7) {
|
239403
239403
|
if (typeof visitor === "function")
|
239404
|
-
return visitor(
|
239404
|
+
return visitor(key2, node, path7);
|
239405
239405
|
if (identity2.isMap(node))
|
239406
|
-
return visitor.Map?.(
|
239406
|
+
return visitor.Map?.(key2, node, path7);
|
239407
239407
|
if (identity2.isSeq(node))
|
239408
|
-
return visitor.Seq?.(
|
239408
|
+
return visitor.Seq?.(key2, node, path7);
|
239409
239409
|
if (identity2.isPair(node))
|
239410
|
-
return visitor.Pair?.(
|
239410
|
+
return visitor.Pair?.(key2, node, path7);
|
239411
239411
|
if (identity2.isScalar(node))
|
239412
|
-
return visitor.Scalar?.(
|
239412
|
+
return visitor.Scalar?.(key2, node, path7);
|
239413
239413
|
if (identity2.isAlias(node))
|
239414
|
-
return visitor.Alias?.(
|
239414
|
+
return visitor.Alias?.(key2, node, path7);
|
239415
239415
|
return;
|
239416
239416
|
}
|
239417
|
-
function replaceNode(
|
239417
|
+
function replaceNode(key2, path7, node) {
|
239418
239418
|
const parent = path7[path7.length - 1];
|
239419
239419
|
if (identity2.isCollection(parent)) {
|
239420
|
-
parent.items[
|
239420
|
+
parent.items[key2] = node;
|
239421
239421
|
} else if (identity2.isPair(parent)) {
|
239422
|
-
if (
|
239422
|
+
if (key2 === "key")
|
239423
239423
|
parent.key = node;
|
239424
239424
|
else
|
239425
239425
|
parent.value = node;
|
@@ -239650,7 +239650,7 @@ var require_anchors = __commonJS((exports) => {
|
|
239650
239650
|
|
239651
239651
|
// ../../node_modules/yaml/dist/doc/applyReviver.js
|
239652
239652
|
var require_applyReviver = __commonJS((exports) => {
|
239653
|
-
function applyReviver(reviver, obj,
|
239653
|
+
function applyReviver(reviver, obj, key2, val) {
|
239654
239654
|
if (val && typeof val === "object") {
|
239655
239655
|
if (Array.isArray(val)) {
|
239656
239656
|
for (let i7 = 0, len = val.length;i7 < len; ++i7) {
|
@@ -239690,7 +239690,7 @@ var require_applyReviver = __commonJS((exports) => {
|
|
239690
239690
|
}
|
239691
239691
|
}
|
239692
239692
|
}
|
239693
|
-
return reviver.call(obj,
|
239693
|
+
return reviver.call(obj, key2, val);
|
239694
239694
|
}
|
239695
239695
|
exports.applyReviver = applyReviver;
|
239696
239696
|
});
|
@@ -240019,29 +240019,29 @@ var require_Collection = __commonJS((exports) => {
|
|
240019
240019
|
if (isEmptyPath(path7))
|
240020
240020
|
this.add(value4);
|
240021
240021
|
else {
|
240022
|
-
const [
|
240023
|
-
const node = this.get(
|
240022
|
+
const [key2, ...rest] = path7;
|
240023
|
+
const node = this.get(key2, true);
|
240024
240024
|
if (identity2.isCollection(node))
|
240025
240025
|
node.addIn(rest, value4);
|
240026
240026
|
else if (node === undefined && this.schema)
|
240027
|
-
this.set(
|
240027
|
+
this.set(key2, collectionFromPath(this.schema, rest, value4));
|
240028
240028
|
else
|
240029
|
-
throw new Error(`Expected YAML collection at ${
|
240029
|
+
throw new Error(`Expected YAML collection at ${key2}. Remaining path: ${rest}`);
|
240030
240030
|
}
|
240031
240031
|
}
|
240032
240032
|
deleteIn(path7) {
|
240033
|
-
const [
|
240033
|
+
const [key2, ...rest] = path7;
|
240034
240034
|
if (rest.length === 0)
|
240035
|
-
return this.delete(
|
240036
|
-
const node = this.get(
|
240035
|
+
return this.delete(key2);
|
240036
|
+
const node = this.get(key2, true);
|
240037
240037
|
if (identity2.isCollection(node))
|
240038
240038
|
return node.deleteIn(rest);
|
240039
240039
|
else
|
240040
|
-
throw new Error(`Expected YAML collection at ${
|
240040
|
+
throw new Error(`Expected YAML collection at ${key2}. Remaining path: ${rest}`);
|
240041
240041
|
}
|
240042
240042
|
getIn(path7, keepScalar) {
|
240043
|
-
const [
|
240044
|
-
const node = this.get(
|
240043
|
+
const [key2, ...rest] = path7;
|
240044
|
+
const node = this.get(key2, true);
|
240045
240045
|
if (rest.length === 0)
|
240046
240046
|
return !keepScalar && identity2.isScalar(node) ? node.value : node;
|
240047
240047
|
else
|
@@ -240056,24 +240056,24 @@ var require_Collection = __commonJS((exports) => {
|
|
240056
240056
|
});
|
240057
240057
|
}
|
240058
240058
|
hasIn(path7) {
|
240059
|
-
const [
|
240059
|
+
const [key2, ...rest] = path7;
|
240060
240060
|
if (rest.length === 0)
|
240061
|
-
return this.has(
|
240062
|
-
const node = this.get(
|
240061
|
+
return this.has(key2);
|
240062
|
+
const node = this.get(key2, true);
|
240063
240063
|
return identity2.isCollection(node) ? node.hasIn(rest) : false;
|
240064
240064
|
}
|
240065
240065
|
setIn(path7, value4) {
|
240066
|
-
const [
|
240066
|
+
const [key2, ...rest] = path7;
|
240067
240067
|
if (rest.length === 0) {
|
240068
|
-
this.set(
|
240068
|
+
this.set(key2, value4);
|
240069
240069
|
} else {
|
240070
|
-
const node = this.get(
|
240070
|
+
const node = this.get(key2, true);
|
240071
240071
|
if (identity2.isCollection(node))
|
240072
240072
|
node.setIn(rest, value4);
|
240073
240073
|
else if (node === undefined && this.schema)
|
240074
|
-
this.set(
|
240074
|
+
this.set(key2, collectionFromPath(this.schema, rest, value4));
|
240075
240075
|
else
|
240076
|
-
throw new Error(`Expected YAML collection at ${
|
240076
|
+
throw new Error(`Expected YAML collection at ${key2}. Remaining path: ${rest}`);
|
240077
240077
|
}
|
240078
240078
|
}
|
240079
240079
|
}
|
@@ -240660,19 +240660,19 @@ var require_stringifyPair = __commonJS((exports) => {
|
|
240660
240660
|
var Scalar = require_Scalar();
|
240661
240661
|
var stringify5 = require_stringify();
|
240662
240662
|
var stringifyComment = require_stringifyComment();
|
240663
|
-
function stringifyPair2({ key:
|
240663
|
+
function stringifyPair2({ key: key2, value: value4 }, ctx, onComment, onChompKeep) {
|
240664
240664
|
const { allNullValues, doc: doc2, indent: indent2, indentStep, options: { commentString, indentSeq, simpleKeys } } = ctx;
|
240665
|
-
let keyComment = identity2.isNode(
|
240665
|
+
let keyComment = identity2.isNode(key2) && key2.comment || null;
|
240666
240666
|
if (simpleKeys) {
|
240667
240667
|
if (keyComment) {
|
240668
240668
|
throw new Error("With simple keys, key nodes cannot have comments");
|
240669
240669
|
}
|
240670
|
-
if (identity2.isCollection(
|
240670
|
+
if (identity2.isCollection(key2) || !identity2.isNode(key2) && typeof key2 === "object") {
|
240671
240671
|
const msg = "With simple keys, collection cannot be used as a key value";
|
240672
240672
|
throw new Error(msg);
|
240673
240673
|
}
|
240674
240674
|
}
|
240675
|
-
let explicitKey = !simpleKeys && (!
|
240675
|
+
let explicitKey = !simpleKeys && (!key2 || keyComment && value4 == null && !ctx.inFlow || identity2.isCollection(key2) || (identity2.isScalar(key2) ? key2.type === Scalar.Scalar.BLOCK_FOLDED || key2.type === Scalar.Scalar.BLOCK_LITERAL : typeof key2 === "object"));
|
240676
240676
|
ctx = Object.assign({}, ctx, {
|
240677
240677
|
allNullValues: false,
|
240678
240678
|
implicitKey: !explicitKey && (simpleKeys || !allNullValues),
|
@@ -240680,7 +240680,7 @@ var require_stringifyPair = __commonJS((exports) => {
|
|
240680
240680
|
});
|
240681
240681
|
let keyCommentDone = false;
|
240682
240682
|
let chompKeep = false;
|
240683
|
-
let str = stringify5.stringify(
|
240683
|
+
let str = stringify5.stringify(key2, ctx, () => keyCommentDone = true, () => chompKeep = true);
|
240684
240684
|
if (!explicitKey && !ctx.inFlow && str.length > 1024) {
|
240685
240685
|
if (simpleKeys)
|
240686
240686
|
throw new Error("With simple keys, single line scalar must not span more than 1024 characters");
|
@@ -240824,7 +240824,7 @@ var require_merge = __commonJS((exports) => {
|
|
240824
240824
|
}),
|
240825
240825
|
stringify: () => MERGE_KEY
|
240826
240826
|
};
|
240827
|
-
var isMergeKey = (ctx,
|
240827
|
+
var isMergeKey = (ctx, key2) => (merge7.identify(key2) || identity2.isScalar(key2) && (!key2.type || key2.type === Scalar.Scalar.PLAIN) && merge7.identify(key2.value)) && ctx?.doc.schema.tags.some((tag) => tag.tag === merge7.tag && tag.default);
|
240828
240828
|
function addMergeToJSMap(ctx, map7, value4) {
|
240829
240829
|
value4 = ctx && identity2.isAlias(value4) ? value4.resolve(ctx.doc) : value4;
|
240830
240830
|
if (identity2.isSeq(value4))
|
@@ -240841,14 +240841,14 @@ var require_merge = __commonJS((exports) => {
|
|
240841
240841
|
if (!identity2.isMap(source))
|
240842
240842
|
throw new Error("Merge sources must be maps or map aliases");
|
240843
240843
|
const srcMap = source.toJSON(null, ctx, Map);
|
240844
|
-
for (const [
|
240844
|
+
for (const [key2, value5] of srcMap) {
|
240845
240845
|
if (map7 instanceof Map) {
|
240846
|
-
if (!map7.has(
|
240847
|
-
map7.set(
|
240846
|
+
if (!map7.has(key2))
|
240847
|
+
map7.set(key2, value5);
|
240848
240848
|
} else if (map7 instanceof Set) {
|
240849
|
-
map7.add(
|
240850
|
-
} else if (!Object.prototype.hasOwnProperty.call(map7,
|
240851
|
-
Object.defineProperty(map7,
|
240849
|
+
map7.add(key2);
|
240850
|
+
} else if (!Object.prototype.hasOwnProperty.call(map7, key2)) {
|
240851
|
+
Object.defineProperty(map7, key2, {
|
240852
240852
|
value: value5,
|
240853
240853
|
writable: true,
|
240854
240854
|
enumerable: true,
|
@@ -240870,19 +240870,19 @@ var require_addPairToJSMap = __commonJS((exports) => {
|
|
240870
240870
|
var stringify5 = require_stringify();
|
240871
240871
|
var identity2 = require_identity();
|
240872
240872
|
var toJS = require_toJS();
|
240873
|
-
function addPairToJSMap(ctx, map7, { key:
|
240874
|
-
if (identity2.isNode(
|
240875
|
-
|
240876
|
-
else if (merge7.isMergeKey(ctx,
|
240873
|
+
function addPairToJSMap(ctx, map7, { key: key2, value: value4 }) {
|
240874
|
+
if (identity2.isNode(key2) && key2.addToJSMap)
|
240875
|
+
key2.addToJSMap(ctx, map7, value4);
|
240876
|
+
else if (merge7.isMergeKey(ctx, key2))
|
240877
240877
|
merge7.addMergeToJSMap(ctx, map7, value4);
|
240878
240878
|
else {
|
240879
|
-
const jsKey = toJS.toJS(
|
240879
|
+
const jsKey = toJS.toJS(key2, "", ctx);
|
240880
240880
|
if (map7 instanceof Map) {
|
240881
240881
|
map7.set(jsKey, toJS.toJS(value4, jsKey, ctx));
|
240882
240882
|
} else if (map7 instanceof Set) {
|
240883
240883
|
map7.add(jsKey);
|
240884
240884
|
} else {
|
240885
|
-
const stringKey = stringifyKey(
|
240885
|
+
const stringKey = stringifyKey(key2, jsKey, ctx);
|
240886
240886
|
const jsValue = toJS.toJS(value4, stringKey, ctx);
|
240887
240887
|
if (stringKey in map7)
|
240888
240888
|
Object.defineProperty(map7, stringKey, {
|
@@ -240897,19 +240897,19 @@ var require_addPairToJSMap = __commonJS((exports) => {
|
|
240897
240897
|
}
|
240898
240898
|
return map7;
|
240899
240899
|
}
|
240900
|
-
function stringifyKey(
|
240900
|
+
function stringifyKey(key2, jsKey, ctx) {
|
240901
240901
|
if (jsKey === null)
|
240902
240902
|
return "";
|
240903
240903
|
if (typeof jsKey !== "object")
|
240904
240904
|
return String(jsKey);
|
240905
|
-
if (identity2.isNode(
|
240905
|
+
if (identity2.isNode(key2) && ctx?.doc) {
|
240906
240906
|
const strCtx = stringify5.createStringifyContext(ctx.doc, {});
|
240907
240907
|
strCtx.anchors = new Set;
|
240908
240908
|
for (const node of ctx.anchors.keys())
|
240909
240909
|
strCtx.anchors.add(node.anchor);
|
240910
240910
|
strCtx.inFlow = true;
|
240911
240911
|
strCtx.inStringifyKey = true;
|
240912
|
-
const strKey =
|
240912
|
+
const strKey = key2.toString(strCtx);
|
240913
240913
|
if (!ctx.mapKeyWarned) {
|
240914
240914
|
let jsonStr = JSON.stringify(strKey);
|
240915
240915
|
if (jsonStr.length > 40)
|
@@ -240930,25 +240930,25 @@ var require_Pair = __commonJS((exports) => {
|
|
240930
240930
|
var stringifyPair2 = require_stringifyPair();
|
240931
240931
|
var addPairToJSMap = require_addPairToJSMap();
|
240932
240932
|
var identity2 = require_identity();
|
240933
|
-
function createPair(
|
240934
|
-
const k6 = createNode.createNode(
|
240933
|
+
function createPair(key2, value4, ctx) {
|
240934
|
+
const k6 = createNode.createNode(key2, undefined, ctx);
|
240935
240935
|
const v7 = createNode.createNode(value4, undefined, ctx);
|
240936
240936
|
return new Pair(k6, v7);
|
240937
240937
|
}
|
240938
240938
|
|
240939
240939
|
class Pair {
|
240940
|
-
constructor(
|
240940
|
+
constructor(key2, value4 = null) {
|
240941
240941
|
Object.defineProperty(this, identity2.NODE_TYPE, { value: identity2.PAIR });
|
240942
|
-
this.key =
|
240942
|
+
this.key = key2;
|
240943
240943
|
this.value = value4;
|
240944
240944
|
}
|
240945
240945
|
clone(schema) {
|
240946
|
-
let { key:
|
240947
|
-
if (identity2.isNode(
|
240948
|
-
|
240946
|
+
let { key: key2, value: value4 } = this;
|
240947
|
+
if (identity2.isNode(key2))
|
240948
|
+
key2 = key2.clone(schema);
|
240949
240949
|
if (identity2.isNode(value4))
|
240950
240950
|
value4 = value4.clone(schema);
|
240951
|
-
return new Pair(
|
240951
|
+
return new Pair(key2, value4);
|
240952
240952
|
}
|
240953
240953
|
toJSON(_6, ctx) {
|
240954
240954
|
const pair = ctx?.mapAsMap ? new Map : {};
|
@@ -241115,11 +241115,11 @@ var require_YAMLMap = __commonJS((exports) => {
|
|
241115
241115
|
var identity2 = require_identity();
|
241116
241116
|
var Pair = require_Pair();
|
241117
241117
|
var Scalar = require_Scalar();
|
241118
|
-
function findPair(items,
|
241119
|
-
const k6 = identity2.isScalar(
|
241118
|
+
function findPair(items, key2) {
|
241119
|
+
const k6 = identity2.isScalar(key2) ? key2.value : key2;
|
241120
241120
|
for (const it2 of items) {
|
241121
241121
|
if (identity2.isPair(it2)) {
|
241122
|
-
if (it2.key ===
|
241122
|
+
if (it2.key === key2 || it2.key === k6)
|
241123
241123
|
return it2;
|
241124
241124
|
if (identity2.isScalar(it2.key) && it2.key.value === k6)
|
241125
241125
|
return it2;
|
@@ -241139,20 +241139,20 @@ var require_YAMLMap = __commonJS((exports) => {
|
|
241139
241139
|
static from(schema, obj, ctx) {
|
241140
241140
|
const { keepUndefined, replacer } = ctx;
|
241141
241141
|
const map7 = new this(schema);
|
241142
|
-
const add = (
|
241142
|
+
const add = (key2, value4) => {
|
241143
241143
|
if (typeof replacer === "function")
|
241144
|
-
value4 = replacer.call(obj,
|
241145
|
-
else if (Array.isArray(replacer) && !replacer.includes(
|
241144
|
+
value4 = replacer.call(obj, key2, value4);
|
241145
|
+
else if (Array.isArray(replacer) && !replacer.includes(key2))
|
241146
241146
|
return;
|
241147
241147
|
if (value4 !== undefined || keepUndefined)
|
241148
|
-
map7.items.push(Pair.createPair(
|
241148
|
+
map7.items.push(Pair.createPair(key2, value4, ctx));
|
241149
241149
|
};
|
241150
241150
|
if (obj instanceof Map) {
|
241151
|
-
for (const [
|
241152
|
-
add(
|
241151
|
+
for (const [key2, value4] of obj)
|
241152
|
+
add(key2, value4);
|
241153
241153
|
} else if (obj && typeof obj === "object") {
|
241154
|
-
for (const
|
241155
|
-
add(
|
241154
|
+
for (const key2 of Object.keys(obj))
|
241155
|
+
add(key2, obj[key2]);
|
241156
241156
|
}
|
241157
241157
|
if (typeof schema.sortMapEntries === "function") {
|
241158
241158
|
map7.items.sort(schema.sortMapEntries);
|
@@ -241186,23 +241186,23 @@ var require_YAMLMap = __commonJS((exports) => {
|
|
241186
241186
|
this.items.push(_pair);
|
241187
241187
|
}
|
241188
241188
|
}
|
241189
|
-
delete(
|
241190
|
-
const it2 = findPair(this.items,
|
241189
|
+
delete(key2) {
|
241190
|
+
const it2 = findPair(this.items, key2);
|
241191
241191
|
if (!it2)
|
241192
241192
|
return false;
|
241193
241193
|
const del = this.items.splice(this.items.indexOf(it2), 1);
|
241194
241194
|
return del.length > 0;
|
241195
241195
|
}
|
241196
|
-
get(
|
241197
|
-
const it2 = findPair(this.items,
|
241196
|
+
get(key2, keepScalar) {
|
241197
|
+
const it2 = findPair(this.items, key2);
|
241198
241198
|
const node = it2?.value;
|
241199
241199
|
return (!keepScalar && identity2.isScalar(node) ? node.value : node) ?? undefined;
|
241200
241200
|
}
|
241201
|
-
has(
|
241202
|
-
return !!findPair(this.items,
|
241201
|
+
has(key2) {
|
241202
|
+
return !!findPair(this.items, key2);
|
241203
241203
|
}
|
241204
|
-
set(
|
241205
|
-
this.add(new Pair.Pair(
|
241204
|
+
set(key2, value4) {
|
241205
|
+
this.add(new Pair.Pair(key2, value4), true);
|
241206
241206
|
}
|
241207
241207
|
toJSON(_6, ctx, Type) {
|
241208
241208
|
const map7 = Type ? new Type : ctx?.mapAsMap ? new Map : {};
|
@@ -241273,28 +241273,28 @@ var require_YAMLSeq = __commonJS((exports) => {
|
|
241273
241273
|
add(value4) {
|
241274
241274
|
this.items.push(value4);
|
241275
241275
|
}
|
241276
|
-
delete(
|
241277
|
-
const idx = asItemIndex(
|
241276
|
+
delete(key2) {
|
241277
|
+
const idx = asItemIndex(key2);
|
241278
241278
|
if (typeof idx !== "number")
|
241279
241279
|
return false;
|
241280
241280
|
const del = this.items.splice(idx, 1);
|
241281
241281
|
return del.length > 0;
|
241282
241282
|
}
|
241283
|
-
get(
|
241284
|
-
const idx = asItemIndex(
|
241283
|
+
get(key2, keepScalar) {
|
241284
|
+
const idx = asItemIndex(key2);
|
241285
241285
|
if (typeof idx !== "number")
|
241286
241286
|
return;
|
241287
241287
|
const it2 = this.items[idx];
|
241288
241288
|
return !keepScalar && identity2.isScalar(it2) ? it2.value : it2;
|
241289
241289
|
}
|
241290
|
-
has(
|
241291
|
-
const idx = asItemIndex(
|
241290
|
+
has(key2) {
|
241291
|
+
const idx = asItemIndex(key2);
|
241292
241292
|
return typeof idx === "number" && idx < this.items.length;
|
241293
241293
|
}
|
241294
|
-
set(
|
241295
|
-
const idx = asItemIndex(
|
241294
|
+
set(key2, value4) {
|
241295
|
+
const idx = asItemIndex(key2);
|
241296
241296
|
if (typeof idx !== "number")
|
241297
|
-
throw new Error(`Expected a valid index, not ${
|
241297
|
+
throw new Error(`Expected a valid index, not ${key2}.`);
|
241298
241298
|
const prev = this.items[idx];
|
241299
241299
|
if (identity2.isScalar(prev) && Scalar.isScalarValue(value4))
|
241300
241300
|
prev.value = value4;
|
@@ -241328,8 +241328,8 @@ var require_YAMLSeq = __commonJS((exports) => {
|
|
241328
241328
|
let i7 = 0;
|
241329
241329
|
for (let it2 of obj) {
|
241330
241330
|
if (typeof replacer === "function") {
|
241331
|
-
const
|
241332
|
-
it2 = replacer.call(obj,
|
241331
|
+
const key2 = obj instanceof Set ? it2 : String(i7++);
|
241332
|
+
it2 = replacer.call(obj, key2, it2);
|
241333
241333
|
}
|
241334
241334
|
seq.items.push(createNode.createNode(it2, undefined, ctx));
|
241335
241335
|
}
|
@@ -241337,8 +241337,8 @@ var require_YAMLSeq = __commonJS((exports) => {
|
|
241337
241337
|
return seq;
|
241338
241338
|
}
|
241339
241339
|
}
|
241340
|
-
function asItemIndex(
|
241341
|
-
let idx = identity2.isScalar(
|
241340
|
+
function asItemIndex(key2) {
|
241341
|
+
let idx = identity2.isScalar(key2) ? key2.value : key2;
|
241342
241342
|
if (idx && typeof idx === "string")
|
241343
241343
|
idx = Number(idx);
|
241344
241344
|
return typeof idx === "number" && Number.isInteger(idx) && idx >= 0 ? idx : null;
|
@@ -241711,25 +241711,25 @@ ${cn.comment}` : item.comment;
|
|
241711
241711
|
for (let it2 of iterable) {
|
241712
241712
|
if (typeof replacer === "function")
|
241713
241713
|
it2 = replacer.call(iterable, String(i7++), it2);
|
241714
|
-
let
|
241714
|
+
let key2, value4;
|
241715
241715
|
if (Array.isArray(it2)) {
|
241716
241716
|
if (it2.length === 2) {
|
241717
|
-
|
241717
|
+
key2 = it2[0];
|
241718
241718
|
value4 = it2[1];
|
241719
241719
|
} else
|
241720
241720
|
throw new TypeError(`Expected [key, value] tuple: ${it2}`);
|
241721
241721
|
} else if (it2 && it2 instanceof Object) {
|
241722
241722
|
const keys = Object.keys(it2);
|
241723
241723
|
if (keys.length === 1) {
|
241724
|
-
|
241725
|
-
value4 = it2[
|
241724
|
+
key2 = keys[0];
|
241725
|
+
value4 = it2[key2];
|
241726
241726
|
} else {
|
241727
241727
|
throw new TypeError(`Expected tuple with one key, not ${keys.length} keys`);
|
241728
241728
|
}
|
241729
241729
|
} else {
|
241730
|
-
|
241730
|
+
key2 = it2;
|
241731
241731
|
}
|
241732
|
-
pairs2.items.push(Pair.createPair(
|
241732
|
+
pairs2.items.push(Pair.createPair(key2, value4, ctx));
|
241733
241733
|
}
|
241734
241734
|
return pairs2;
|
241735
241735
|
}
|
@@ -241770,16 +241770,16 @@ var require_omap = __commonJS((exports) => {
|
|
241770
241770
|
if (ctx?.onCreate)
|
241771
241771
|
ctx.onCreate(map7);
|
241772
241772
|
for (const pair of this.items) {
|
241773
|
-
let
|
241773
|
+
let key2, value4;
|
241774
241774
|
if (identity2.isPair(pair)) {
|
241775
|
-
|
241776
|
-
value4 = toJS.toJS(pair.value,
|
241775
|
+
key2 = toJS.toJS(pair.key, "", ctx);
|
241776
|
+
value4 = toJS.toJS(pair.value, key2, ctx);
|
241777
241777
|
} else {
|
241778
|
-
|
241778
|
+
key2 = toJS.toJS(pair, "", ctx);
|
241779
241779
|
}
|
241780
|
-
if (map7.has(
|
241780
|
+
if (map7.has(key2))
|
241781
241781
|
throw new Error("Ordered maps must not include duplicate keys");
|
241782
|
-
map7.set(
|
241782
|
+
map7.set(key2, value4);
|
241783
241783
|
}
|
241784
241784
|
return map7;
|
241785
241785
|
}
|
@@ -241800,12 +241800,12 @@ var require_omap = __commonJS((exports) => {
|
|
241800
241800
|
resolve(seq, onError) {
|
241801
241801
|
const pairs$1 = pairs.resolvePairs(seq, onError);
|
241802
241802
|
const seenKeys = [];
|
241803
|
-
for (const { key:
|
241804
|
-
if (identity2.isScalar(
|
241805
|
-
if (seenKeys.includes(
|
241806
|
-
onError(`Ordered maps must not include duplicate keys: ${
|
241803
|
+
for (const { key: key2 } of pairs$1.items) {
|
241804
|
+
if (identity2.isScalar(key2)) {
|
241805
|
+
if (seenKeys.includes(key2.value)) {
|
241806
|
+
onError(`Ordered maps must not include duplicate keys: ${key2.value}`);
|
241807
241807
|
} else {
|
241808
|
-
seenKeys.push(
|
241808
|
+
seenKeys.push(key2.value);
|
241809
241809
|
}
|
241810
241810
|
}
|
241811
241811
|
}
|
@@ -241979,30 +241979,30 @@ var require_set = __commonJS((exports) => {
|
|
241979
241979
|
super(schema);
|
241980
241980
|
this.tag = YAMLSet.tag;
|
241981
241981
|
}
|
241982
|
-
add(
|
241982
|
+
add(key2) {
|
241983
241983
|
let pair;
|
241984
|
-
if (identity2.isPair(
|
241985
|
-
pair =
|
241986
|
-
else if (
|
241987
|
-
pair = new Pair.Pair(
|
241984
|
+
if (identity2.isPair(key2))
|
241985
|
+
pair = key2;
|
241986
|
+
else if (key2 && typeof key2 === "object" && "key" in key2 && "value" in key2 && key2.value === null)
|
241987
|
+
pair = new Pair.Pair(key2.key, null);
|
241988
241988
|
else
|
241989
|
-
pair = new Pair.Pair(
|
241989
|
+
pair = new Pair.Pair(key2, null);
|
241990
241990
|
const prev = YAMLMap.findPair(this.items, pair.key);
|
241991
241991
|
if (!prev)
|
241992
241992
|
this.items.push(pair);
|
241993
241993
|
}
|
241994
|
-
get(
|
241995
|
-
const pair = YAMLMap.findPair(this.items,
|
241994
|
+
get(key2, keepPair) {
|
241995
|
+
const pair = YAMLMap.findPair(this.items, key2);
|
241996
241996
|
return !keepPair && identity2.isPair(pair) ? identity2.isScalar(pair.key) ? pair.key.value : pair.key : pair;
|
241997
241997
|
}
|
241998
|
-
set(
|
241998
|
+
set(key2, value4) {
|
241999
241999
|
if (typeof value4 !== "boolean")
|
242000
242000
|
throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof value4}`);
|
242001
|
-
const prev = YAMLMap.findPair(this.items,
|
242001
|
+
const prev = YAMLMap.findPair(this.items, key2);
|
242002
242002
|
if (prev && !value4) {
|
242003
242003
|
this.items.splice(this.items.indexOf(prev), 1);
|
242004
242004
|
} else if (!prev && value4) {
|
242005
|
-
this.items.push(new Pair.Pair(
|
242005
|
+
this.items.push(new Pair.Pair(key2));
|
242006
242006
|
}
|
242007
242007
|
}
|
242008
242008
|
toJSON(_6, ctx) {
|
@@ -242237,7 +242237,7 @@ var require_tags = __commonJS((exports) => {
|
|
242237
242237
|
if (Array.isArray(customTags))
|
242238
242238
|
tags = [];
|
242239
242239
|
else {
|
242240
|
-
const keys = Array.from(schemas3.keys()).filter((
|
242240
|
+
const keys = Array.from(schemas3.keys()).filter((key2) => key2 !== "yaml11").map((key2) => JSON.stringify(key2)).join(", ");
|
242241
242241
|
throw new Error(`Unknown schema "${schemaName}"; use one of ${keys} or define customTags array`);
|
242242
242242
|
}
|
242243
242243
|
}
|
@@ -242253,7 +242253,7 @@ var require_tags = __commonJS((exports) => {
|
|
242253
242253
|
const tagObj = typeof tag === "string" ? tagsByName[tag] : tag;
|
242254
242254
|
if (!tagObj) {
|
242255
242255
|
const tagName = JSON.stringify(tag);
|
242256
|
-
const keys = Object.keys(tagsByName).map((
|
242256
|
+
const keys = Object.keys(tagsByName).map((key2) => JSON.stringify(key2)).join(", ");
|
242257
242257
|
throw new Error(`Unknown custom tag ${tagName}; use one of ${keys}`);
|
242258
242258
|
}
|
242259
242259
|
if (!tags2.includes(tagObj))
|
@@ -242488,13 +242488,13 @@ var require_Document = __commonJS((exports) => {
|
|
242488
242488
|
setAnchors();
|
242489
242489
|
return node;
|
242490
242490
|
}
|
242491
|
-
createPair(
|
242492
|
-
const k6 = this.createNode(
|
242491
|
+
createPair(key2, value4, options = {}) {
|
242492
|
+
const k6 = this.createNode(key2, null, options);
|
242493
242493
|
const v7 = this.createNode(value4, null, options);
|
242494
242494
|
return new Pair.Pair(k6, v7);
|
242495
242495
|
}
|
242496
|
-
delete(
|
242497
|
-
return assertCollection(this.contents) ? this.contents.delete(
|
242496
|
+
delete(key2) {
|
242497
|
+
return assertCollection(this.contents) ? this.contents.delete(key2) : false;
|
242498
242498
|
}
|
242499
242499
|
deleteIn(path7) {
|
242500
242500
|
if (Collection.isEmptyPath(path7)) {
|
@@ -242505,27 +242505,27 @@ var require_Document = __commonJS((exports) => {
|
|
242505
242505
|
}
|
242506
242506
|
return assertCollection(this.contents) ? this.contents.deleteIn(path7) : false;
|
242507
242507
|
}
|
242508
|
-
get(
|
242509
|
-
return identity2.isCollection(this.contents) ? this.contents.get(
|
242508
|
+
get(key2, keepScalar) {
|
242509
|
+
return identity2.isCollection(this.contents) ? this.contents.get(key2, keepScalar) : undefined;
|
242510
242510
|
}
|
242511
242511
|
getIn(path7, keepScalar) {
|
242512
242512
|
if (Collection.isEmptyPath(path7))
|
242513
242513
|
return !keepScalar && identity2.isScalar(this.contents) ? this.contents.value : this.contents;
|
242514
242514
|
return identity2.isCollection(this.contents) ? this.contents.getIn(path7, keepScalar) : undefined;
|
242515
242515
|
}
|
242516
|
-
has(
|
242517
|
-
return identity2.isCollection(this.contents) ? this.contents.has(
|
242516
|
+
has(key2) {
|
242517
|
+
return identity2.isCollection(this.contents) ? this.contents.has(key2) : false;
|
242518
242518
|
}
|
242519
242519
|
hasIn(path7) {
|
242520
242520
|
if (Collection.isEmptyPath(path7))
|
242521
242521
|
return this.contents !== undefined;
|
242522
242522
|
return identity2.isCollection(this.contents) ? this.contents.hasIn(path7) : false;
|
242523
242523
|
}
|
242524
|
-
set(
|
242524
|
+
set(key2, value4) {
|
242525
242525
|
if (this.contents == null) {
|
242526
|
-
this.contents = Collection.collectionFromPath(this.schema, [
|
242526
|
+
this.contents = Collection.collectionFromPath(this.schema, [key2], value4);
|
242527
242527
|
} else if (assertCollection(this.contents)) {
|
242528
|
-
this.contents.set(
|
242528
|
+
this.contents.set(key2, value4);
|
242529
242529
|
}
|
242530
242530
|
}
|
242531
242531
|
setIn(path7, value4) {
|
@@ -242807,25 +242807,25 @@ var require_resolve_props = __commonJS((exports) => {
|
|
242807
242807
|
|
242808
242808
|
// ../../node_modules/yaml/dist/compose/util-contains-newline.js
|
242809
242809
|
var require_util_contains_newline = __commonJS((exports) => {
|
242810
|
-
function containsNewline(
|
242811
|
-
if (!
|
242810
|
+
function containsNewline(key2) {
|
242811
|
+
if (!key2)
|
242812
242812
|
return null;
|
242813
|
-
switch (
|
242813
|
+
switch (key2.type) {
|
242814
242814
|
case "alias":
|
242815
242815
|
case "scalar":
|
242816
242816
|
case "double-quoted-scalar":
|
242817
242817
|
case "single-quoted-scalar":
|
242818
|
-
if (
|
242818
|
+
if (key2.source.includes(`
|
242819
242819
|
`))
|
242820
242820
|
return true;
|
242821
|
-
if (
|
242822
|
-
for (const st2 of
|
242821
|
+
if (key2.end) {
|
242822
|
+
for (const st2 of key2.end)
|
242823
242823
|
if (st2.type === "newline")
|
242824
242824
|
return true;
|
242825
242825
|
}
|
242826
242826
|
return false;
|
242827
242827
|
case "flow-collection":
|
242828
|
-
for (const it2 of
|
242828
|
+
for (const it2 of key2.items) {
|
242829
242829
|
for (const st2 of it2.start)
|
242830
242830
|
if (st2.type === "newline")
|
242831
242831
|
return true;
|
@@ -242890,10 +242890,10 @@ var require_resolve_block_map = __commonJS((exports) => {
|
|
242890
242890
|
let offset = bm.offset;
|
242891
242891
|
let commentEnd = null;
|
242892
242892
|
for (const collItem of bm.items) {
|
242893
|
-
const { start: start3, key:
|
242893
|
+
const { start: start3, key: key2, sep: sep5, value: value4 } = collItem;
|
242894
242894
|
const keyProps = resolveProps.resolveProps(start3, {
|
242895
242895
|
indicator: "explicit-key-ind",
|
242896
|
-
next:
|
242896
|
+
next: key2 ?? sep5?.[0],
|
242897
242897
|
offset,
|
242898
242898
|
onError,
|
242899
242899
|
parentIndent: bm.indent,
|
@@ -242901,10 +242901,10 @@ var require_resolve_block_map = __commonJS((exports) => {
|
|
242901
242901
|
});
|
242902
242902
|
const implicitKey = !keyProps.found;
|
242903
242903
|
if (implicitKey) {
|
242904
|
-
if (
|
242905
|
-
if (
|
242904
|
+
if (key2) {
|
242905
|
+
if (key2.type === "block-seq")
|
242906
242906
|
onError(offset, "BLOCK_AS_IMPLICIT_KEY", "A block sequence may not be used as an implicit map key");
|
242907
|
-
else if ("indent" in
|
242907
|
+
else if ("indent" in key2 && key2.indent !== bm.indent)
|
242908
242908
|
onError(offset, "BAD_INDENT", startColMsg);
|
242909
242909
|
}
|
242910
242910
|
if (!keyProps.anchor && !keyProps.tag && !sep5) {
|
@@ -242918,17 +242918,17 @@ var require_resolve_block_map = __commonJS((exports) => {
|
|
242918
242918
|
}
|
242919
242919
|
continue;
|
242920
242920
|
}
|
242921
|
-
if (keyProps.newlineAfterProp || utilContainsNewline.containsNewline(
|
242922
|
-
onError(
|
242921
|
+
if (keyProps.newlineAfterProp || utilContainsNewline.containsNewline(key2)) {
|
242922
|
+
onError(key2 ?? start3[start3.length - 1], "MULTILINE_IMPLICIT_KEY", "Implicit keys need to be on a single line");
|
242923
242923
|
}
|
242924
242924
|
} else if (keyProps.found?.indent !== bm.indent) {
|
242925
242925
|
onError(offset, "BAD_INDENT", startColMsg);
|
242926
242926
|
}
|
242927
242927
|
ctx.atKey = true;
|
242928
242928
|
const keyStart = keyProps.end;
|
242929
|
-
const keyNode =
|
242929
|
+
const keyNode = key2 ? composeNode(ctx, key2, keyProps, onError) : composeEmptyNode(ctx, keyStart, start3, null, keyProps, onError);
|
242930
242930
|
if (ctx.schema.compat)
|
242931
|
-
utilFlowIndentCheck.flowIndentCheck(bm.indent,
|
242931
|
+
utilFlowIndentCheck.flowIndentCheck(bm.indent, key2, onError);
|
242932
242932
|
ctx.atKey = false;
|
242933
242933
|
if (utilMapIncludes.mapIncludes(ctx, map7.items, keyNode))
|
242934
242934
|
onError(keyStart, "DUPLICATE_KEY", "Map keys must be unique");
|
@@ -242938,7 +242938,7 @@ var require_resolve_block_map = __commonJS((exports) => {
|
|
242938
242938
|
offset: keyNode.range[2],
|
242939
242939
|
onError,
|
242940
242940
|
parentIndent: bm.indent,
|
242941
|
-
startOnNewline: !
|
242941
|
+
startOnNewline: !key2 || key2.type === "block-scalar"
|
242942
242942
|
});
|
242943
242943
|
offset = valueProps.end;
|
242944
242944
|
if (valueProps.found) {
|
@@ -243094,11 +243094,11 @@ var require_resolve_flow_collection = __commonJS((exports) => {
|
|
243094
243094
|
let offset = fc.offset + fc.start.source.length;
|
243095
243095
|
for (let i7 = 0;i7 < fc.items.length; ++i7) {
|
243096
243096
|
const collItem = fc.items[i7];
|
243097
|
-
const { start: start3, key:
|
243097
|
+
const { start: start3, key: key2, sep: sep5, value: value4 } = collItem;
|
243098
243098
|
const props = resolveProps.resolveProps(start3, {
|
243099
243099
|
flow: fcName,
|
243100
243100
|
indicator: "explicit-key-ind",
|
243101
|
-
next:
|
243101
|
+
next: key2 ?? sep5?.[0],
|
243102
243102
|
offset,
|
243103
243103
|
onError,
|
243104
243104
|
parentIndent: fc.indent,
|
@@ -243120,8 +243120,8 @@ var require_resolve_flow_collection = __commonJS((exports) => {
|
|
243120
243120
|
offset = props.end;
|
243121
243121
|
continue;
|
243122
243122
|
}
|
243123
|
-
if (!isMap && ctx.options.strict && utilContainsNewline.containsNewline(
|
243124
|
-
onError(
|
243123
|
+
if (!isMap && ctx.options.strict && utilContainsNewline.containsNewline(key2))
|
243124
|
+
onError(key2, "MULTILINE_IMPLICIT_KEY", "Implicit keys of flow sequence pairs need to be on a single line");
|
243125
243125
|
}
|
243126
243126
|
if (i7 === 0) {
|
243127
243127
|
if (props.comma)
|
@@ -243166,8 +243166,8 @@ var require_resolve_flow_collection = __commonJS((exports) => {
|
|
243166
243166
|
} else {
|
243167
243167
|
ctx.atKey = true;
|
243168
243168
|
const keyStart = props.end;
|
243169
|
-
const keyNode =
|
243170
|
-
if (isBlock(
|
243169
|
+
const keyNode = key2 ? composeNode(ctx, key2, props, onError) : composeEmptyNode(ctx, keyStart, start3, null, props, onError);
|
243170
|
+
if (isBlock(key2))
|
243171
243171
|
onError(keyNode.range, "BLOCK_IN_FLOW", blockMsg);
|
243172
243172
|
ctx.atKey = false;
|
243173
243173
|
const valueProps = resolveProps.resolveProps(sep5 ?? [], {
|
@@ -243978,7 +243978,7 @@ var require_composer = __commonJS((exports) => {
|
|
243978
243978
|
var node_process = __require("process");
|
243979
243979
|
var directives4 = require_directives2();
|
243980
243980
|
var Document = require_Document();
|
243981
|
-
var
|
243981
|
+
var errors4 = require_errors3();
|
243982
243982
|
var identity2 = require_identity();
|
243983
243983
|
var composeDoc = require_compose_doc();
|
243984
243984
|
var resolveEnd = require_resolve_end();
|
@@ -244029,9 +244029,9 @@ var require_composer = __commonJS((exports) => {
|
|
244029
244029
|
this.onError = (source, code2, message, warning) => {
|
244030
244030
|
const pos = getErrorPos(source);
|
244031
244031
|
if (warning)
|
244032
|
-
this.warnings.push(new
|
244032
|
+
this.warnings.push(new errors4.YAMLWarning(pos, code2, message));
|
244033
244033
|
else
|
244034
|
-
this.errors.push(new
|
244034
|
+
this.errors.push(new errors4.YAMLParseError(pos, code2, message));
|
244035
244035
|
};
|
244036
244036
|
this.directives = new directives4.Directives({ version: options.version || "1.2" });
|
244037
244037
|
this.options = options;
|
@@ -244115,7 +244115,7 @@ ${cb}` : comment;
|
|
244115
244115
|
break;
|
244116
244116
|
case "error": {
|
244117
244117
|
const msg = token.source ? `${token.message}: ${JSON.stringify(token.source)}` : token.message;
|
244118
|
-
const error45 = new
|
244118
|
+
const error45 = new errors4.YAMLParseError(getErrorPos(token), "UNEXPECTED_TOKEN", msg);
|
244119
244119
|
if (this.atDirectives || !this.doc)
|
244120
244120
|
this.errors.push(error45);
|
244121
244121
|
else
|
@@ -244125,7 +244125,7 @@ ${cb}` : comment;
|
|
244125
244125
|
case "doc-end": {
|
244126
244126
|
if (!this.doc) {
|
244127
244127
|
const msg = "Unexpected doc-end without preceding document";
|
244128
|
-
this.errors.push(new
|
244128
|
+
this.errors.push(new errors4.YAMLParseError(getErrorPos(token), "UNEXPECTED_TOKEN", msg));
|
244129
244129
|
break;
|
244130
244130
|
}
|
244131
244131
|
this.doc.directives.docEnd = true;
|
@@ -244140,7 +244140,7 @@ ${end.comment}` : end.comment;
|
|
244140
244140
|
break;
|
244141
244141
|
}
|
244142
244142
|
default:
|
244143
|
-
this.errors.push(new
|
244143
|
+
this.errors.push(new errors4.YAMLParseError(getErrorPos(token), "UNEXPECTED_TOKEN", `Unsupported token ${token.type}`));
|
244144
244144
|
}
|
244145
244145
|
}
|
244146
244146
|
*end(forceDoc = false, endOffset = -1) {
|
@@ -244166,7 +244166,7 @@ ${end.comment}` : end.comment;
|
|
244166
244166
|
var require_cst_scalar = __commonJS((exports) => {
|
244167
244167
|
var resolveBlockScalar = require_resolve_block_scalar();
|
244168
244168
|
var resolveFlowScalar = require_resolve_flow_scalar();
|
244169
|
-
var
|
244169
|
+
var errors4 = require_errors3();
|
244170
244170
|
var stringifyString = require_stringifyString();
|
244171
244171
|
function resolveAsScalar(token, strict = true, onError) {
|
244172
244172
|
if (token) {
|
@@ -244175,7 +244175,7 @@ var require_cst_scalar = __commonJS((exports) => {
|
|
244175
244175
|
if (onError)
|
244176
244176
|
onError(offset, code2, message);
|
244177
244177
|
else
|
244178
|
-
throw new
|
244178
|
+
throw new errors4.YAMLParseError([offset, offset + 1], code2, message);
|
244179
244179
|
};
|
244180
244180
|
switch (token.type) {
|
244181
244181
|
case "scalar":
|
@@ -244289,9 +244289,9 @@ var require_cst_scalar = __commonJS((exports) => {
|
|
244289
244289
|
if (!addEndtoBlockProps(props, "end" in token ? token.end : undefined))
|
244290
244290
|
props.push({ type: "newline", offset: -1, indent: indent2, source: `
|
244291
244291
|
` });
|
244292
|
-
for (const
|
244293
|
-
if (
|
244294
|
-
delete token[
|
244292
|
+
for (const key2 of Object.keys(token))
|
244293
|
+
if (key2 !== "type" && key2 !== "offset")
|
244294
|
+
delete token[key2];
|
244295
244295
|
Object.assign(token, { type: "block-scalar", indent: indent2, props, source: body });
|
244296
244296
|
}
|
244297
244297
|
}
|
@@ -244340,9 +244340,9 @@ var require_cst_scalar = __commonJS((exports) => {
|
|
244340
244340
|
default: {
|
244341
244341
|
const indent2 = "indent" in token ? token.indent : -1;
|
244342
244342
|
const end = "end" in token && Array.isArray(token.end) ? token.end.filter((st2) => st2.type === "space" || st2.type === "comment" || st2.type === "newline") : [];
|
244343
|
-
for (const
|
244344
|
-
if (
|
244345
|
-
delete token[
|
244343
|
+
for (const key2 of Object.keys(token))
|
244344
|
+
if (key2 !== "type" && key2 !== "offset")
|
244345
|
+
delete token[key2];
|
244346
244346
|
Object.assign(token, { type: type4, indent: indent2, source, end });
|
244347
244347
|
}
|
244348
244348
|
}
|
@@ -244394,12 +244394,12 @@ var require_cst_stringify = __commonJS((exports) => {
|
|
244394
244394
|
}
|
244395
244395
|
}
|
244396
244396
|
}
|
244397
|
-
function stringifyItem({ start: start3, key:
|
244397
|
+
function stringifyItem({ start: start3, key: key2, sep: sep5, value: value4 }) {
|
244398
244398
|
let res = "";
|
244399
244399
|
for (const st2 of start3)
|
244400
244400
|
res += st2.source;
|
244401
|
-
if (
|
244402
|
-
res += stringifyToken(
|
244401
|
+
if (key2)
|
244402
|
+
res += stringifyToken(key2);
|
244403
244403
|
if (sep5)
|
244404
244404
|
for (const st2 of sep5)
|
244405
244405
|
res += st2.source;
|
@@ -245695,7 +245695,7 @@ var require_parser2 = __commonJS((exports) => {
|
|
245695
245695
|
});
|
245696
245696
|
} else if (isFlowToken(it2.key) && !includesToken(it2.sep, "newline")) {
|
245697
245697
|
const start4 = getFirstKeyStartProps(it2.start);
|
245698
|
-
const
|
245698
|
+
const key2 = it2.key;
|
245699
245699
|
const sep5 = it2.sep;
|
245700
245700
|
sep5.push(this.sourceToken);
|
245701
245701
|
delete it2.key;
|
@@ -245704,7 +245704,7 @@ var require_parser2 = __commonJS((exports) => {
|
|
245704
245704
|
type: "block-map",
|
245705
245705
|
offset: this.offset,
|
245706
245706
|
indent: this.indent,
|
245707
|
-
items: [{ start: start4, key:
|
245707
|
+
items: [{ start: start4, key: key2, sep: sep5 }]
|
245708
245708
|
});
|
245709
245709
|
} else if (start3.length > 0) {
|
245710
245710
|
it2.sep = it2.sep.concat(start3, this.sourceToken);
|
@@ -246037,7 +246037,7 @@ var require_parser2 = __commonJS((exports) => {
|
|
246037
246037
|
var require_public_api = __commonJS((exports) => {
|
246038
246038
|
var composer = require_composer();
|
246039
246039
|
var Document = require_Document();
|
246040
|
-
var
|
246040
|
+
var errors4 = require_errors3();
|
246041
246041
|
var log = require_log();
|
246042
246042
|
var identity2 = require_identity();
|
246043
246043
|
var lineCounter = require_line_counter();
|
@@ -246054,8 +246054,8 @@ var require_public_api = __commonJS((exports) => {
|
|
246054
246054
|
const docs = Array.from(composer$1.compose(parser$1.parse(source)));
|
246055
246055
|
if (prettyErrors && lineCounter2)
|
246056
246056
|
for (const doc2 of docs) {
|
246057
|
-
doc2.errors.forEach(
|
246058
|
-
doc2.warnings.forEach(
|
246057
|
+
doc2.errors.forEach(errors4.prettifyError(source, lineCounter2));
|
246058
|
+
doc2.warnings.forEach(errors4.prettifyError(source, lineCounter2));
|
246059
246059
|
}
|
246060
246060
|
if (docs.length > 0)
|
246061
246061
|
return docs;
|
@@ -246070,13 +246070,13 @@ var require_public_api = __commonJS((exports) => {
|
|
246070
246070
|
if (!doc2)
|
246071
246071
|
doc2 = _doc;
|
246072
246072
|
else if (doc2.options.logLevel !== "silent") {
|
246073
|
-
doc2.errors.push(new
|
246073
|
+
doc2.errors.push(new errors4.YAMLParseError(_doc.range.slice(0, 2), "MULTIPLE_DOCS", "Source contains multiple documents; please use YAML.parseAllDocuments()"));
|
246074
246074
|
break;
|
246075
246075
|
}
|
246076
246076
|
}
|
246077
246077
|
if (prettyErrors && lineCounter2) {
|
246078
|
-
doc2.errors.forEach(
|
246079
|
-
doc2.warnings.forEach(
|
246078
|
+
doc2.errors.forEach(errors4.prettifyError(source, lineCounter2));
|
246079
|
+
doc2.warnings.forEach(errors4.prettifyError(source, lineCounter2));
|
246080
246080
|
}
|
246081
246081
|
return doc2;
|
246082
246082
|
}
|
@@ -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(/^
|
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$37) {
|
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-pr2f691dd7",
|
263844
263844
|
type: "module",
|
263845
263845
|
private: false,
|
263846
263846
|
license: "FSL-1.1-MIT",
|
@@ -263859,9 +263859,7 @@ var package_default = {
|
|
263859
263859
|
url: "https://github.com/settlemint/sdk/issues",
|
263860
263860
|
email: "support@settlemint.com"
|
263861
263861
|
},
|
263862
|
-
files: [
|
263863
|
-
"dist"
|
263864
|
-
],
|
263862
|
+
files: ["dist"],
|
263865
263863
|
exports: {
|
263866
263864
|
"./*": {
|
263867
263865
|
types: "./dist/*.d.ts",
|
@@ -263889,12 +263887,12 @@ var package_default = {
|
|
263889
263887
|
commander: "14.0.0",
|
263890
263888
|
"@inquirer/confirm": "5.1.12",
|
263891
263889
|
"@inquirer/input": "4.1.12",
|
263892
|
-
"@inquirer/password": "4.0.
|
263890
|
+
"@inquirer/password": "4.0.15",
|
263893
263891
|
"@inquirer/select": "4.2.3",
|
263894
|
-
"@settlemint/sdk-js": "2.4.0-
|
263895
|
-
"@settlemint/sdk-utils": "2.4.0-
|
263896
|
-
"@settlemint/sdk-viem": "2.4.0-
|
263897
|
-
"@types/node": "24.0.
|
263892
|
+
"@settlemint/sdk-js": "2.4.0-pr2f691dd7",
|
263893
|
+
"@settlemint/sdk-utils": "2.4.0-pr2f691dd7",
|
263894
|
+
"@settlemint/sdk-viem": "2.4.0-pr2f691dd7",
|
263895
|
+
"@types/node": "24.0.3",
|
263898
263896
|
"@types/semver": "7.7.0",
|
263899
263897
|
"@types/which": "3.0.4",
|
263900
263898
|
"get-tsconfig": "4.10.1",
|
@@ -263902,13 +263900,13 @@ var package_default = {
|
|
263902
263900
|
"is-in-ci": "1.0.0",
|
263903
263901
|
semver: "7.7.2",
|
263904
263902
|
slugify: "1.6.6",
|
263905
|
-
viem: "2.31.
|
263903
|
+
viem: "2.31.4",
|
263906
263904
|
which: "5.0.0",
|
263907
263905
|
yaml: "2.8.0",
|
263908
263906
|
yoctocolors: "2.1.1"
|
263909
263907
|
},
|
263910
263908
|
peerDependencies: {
|
263911
|
-
hardhat: "2.
|
263909
|
+
hardhat: "2.24.3"
|
263912
263910
|
},
|
263913
263911
|
peerDependenciesMeta: {
|
263914
263912
|
hardhat: {
|
@@ -263963,7 +263961,7 @@ async function telemetry(data) {
|
|
263963
263961
|
signal: controller.signal
|
263964
263962
|
});
|
263965
263963
|
clearTimeout(timeout);
|
263966
|
-
} catch (
|
263964
|
+
} catch (error2) {}
|
263967
263965
|
}
|
263968
263966
|
|
263969
263967
|
// ../../node_modules/@commander-js/extra-typings/esm.mjs
|
@@ -276515,9 +276513,9 @@ ${formattedErrors}`);
|
|
276515
276513
|
throw error$372;
|
276516
276514
|
}
|
276517
276515
|
}
|
276518
|
-
var ApplicationAccessTokenSchema2 = string$12().regex(/^sm_aat_
|
276519
|
-
var PersonalAccessTokenSchema2 = string$12().regex(/^sm_pat_
|
276520
|
-
var AccessTokenSchema2 = string$12().regex(/^
|
276516
|
+
var ApplicationAccessTokenSchema2 = string$12().regex(/^sm_aat_.*$/);
|
276517
|
+
var PersonalAccessTokenSchema2 = string$12().regex(/^sm_pat_.*$/);
|
276518
|
+
var AccessTokenSchema2 = string$12().regex(/^sm_pat_.*|sm_aat_.*$/);
|
276521
276519
|
function tryParseJson2(value, defaultValue = null) {
|
276522
276520
|
try {
|
276523
276521
|
const parsed = JSON.parse(value);
|
@@ -276525,7 +276523,7 @@ function tryParseJson2(value, defaultValue = null) {
|
|
276525
276523
|
return defaultValue;
|
276526
276524
|
}
|
276527
276525
|
return parsed;
|
276528
|
-
} catch (
|
276526
|
+
} catch (err) {
|
276529
276527
|
return defaultValue;
|
276530
276528
|
}
|
276531
276529
|
}
|
@@ -288291,20 +288289,6 @@ var restartBlockchainNetwork = graphql(`
|
|
288291
288289
|
}
|
288292
288290
|
}
|
288293
288291
|
`, [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]);
|
288308
288292
|
var blockchainNetworkList = (gqlClient) => {
|
288309
288293
|
return async (applicationUniqueName) => {
|
288310
288294
|
const { blockchainNetworksByUniqueName: { items } } = await gqlClient.request(getBlockchainNetworks, { applicationUniqueName });
|
@@ -288339,14 +288323,6 @@ var blockchainNetworkRestart = (gqlClient) => async (blockchainNetworkUniqueName
|
|
288339
288323
|
const { restartBlockchainNetworkByUniqueName: blockchainNetwork } = await gqlClient.request(restartBlockchainNetwork, { uniqueName: blockchainNetworkUniqueName });
|
288340
288324
|
return blockchainNetwork;
|
288341
288325
|
};
|
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
|
-
};
|
288350
288326
|
var BlockchainNodeFragment = graphql(`
|
288351
288327
|
fragment BlockchainNode on BlockchainNode {
|
288352
288328
|
__typename
|
@@ -288480,20 +288456,6 @@ var restartBlockchainNode = graphql(`
|
|
288480
288456
|
}
|
288481
288457
|
}
|
288482
288458
|
`, [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]);
|
288497
288459
|
var blockchainNodeList = (gqlClient) => {
|
288498
288460
|
return async (applicationUniqueName) => {
|
288499
288461
|
const { blockchainNodesByUniqueName: { items } } = await gqlClient.request(getBlockchainNodes, { applicationUniqueName });
|
@@ -288522,14 +288484,6 @@ var blockchainNodeRestart = (gqlClient) => async (blockchainNodeUniqueName) => {
|
|
288522
288484
|
const { restartBlockchainNodeByUniqueName: blockchainNode } = await gqlClient.request(restartBlockchainNode, { uniqueName: blockchainNodeUniqueName });
|
288523
288485
|
return blockchainNode;
|
288524
288486
|
};
|
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
|
-
};
|
288533
288487
|
var CustomDeploymentFragment = graphql(`
|
288534
288488
|
fragment CustomDeployment on CustomDeployment {
|
288535
288489
|
id
|
@@ -288612,20 +288566,6 @@ var restartCustomDeployment = graphql(`
|
|
288612
288566
|
}
|
288613
288567
|
}
|
288614
288568
|
`, [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]);
|
288629
288569
|
var customdeploymentList = (gqlClient) => {
|
288630
288570
|
return async (applicationUniqueName) => {
|
288631
288571
|
const { customDeploymentsByUniqueName: { items } } = await gqlClient.request(getCustomDeployments, { applicationUniqueName });
|
@@ -288662,14 +288602,6 @@ var customDeploymentRestart = (gqlClient) => async (customDeploymentUniqueName)
|
|
288662
288602
|
const { restartCustomDeploymentByUniqueName: customDeployment } = await gqlClient.request(restartCustomDeployment, { uniqueName: customDeploymentUniqueName });
|
288663
288603
|
return customDeployment;
|
288664
288604
|
};
|
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
|
-
};
|
288673
288605
|
var getFoundryEnvConfig = graphql(`
|
288674
288606
|
query GetFoundryEnvConfig($blockchainNodeUniqueName: String!) {
|
288675
288607
|
foundryEnvConfigByUniqueName(blockchainNodeUniqueName: $blockchainNodeUniqueName)
|
@@ -288746,20 +288678,6 @@ var restartLoadBalancer = graphql(`
|
|
288746
288678
|
}
|
288747
288679
|
}
|
288748
288680
|
`, [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]);
|
288763
288681
|
var loadBalancerRead = (gqlClient) => {
|
288764
288682
|
return async (loadBalancerUniqueName) => {
|
288765
288683
|
const { loadBalancerByUniqueName: loadBalancer } = await gqlClient.request(getLoadBalancer, { uniqueName: loadBalancerUniqueName });
|
@@ -288793,14 +288711,6 @@ var loadBalancerRestart = (gqlClient) => async (loadBalancerUniqueName) => {
|
|
288793
288711
|
const { restartLoadBalancerByUniqueName: loadBalancer } = await gqlClient.request(restartLoadBalancer, { uniqueName: loadBalancerUniqueName });
|
288794
288712
|
return loadBalancer;
|
288795
288713
|
};
|
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
|
-
};
|
288804
288714
|
var InsightsFragment = graphql(`
|
288805
288715
|
fragment Insights on Insights {
|
288806
288716
|
__typename
|
@@ -288874,20 +288784,6 @@ var restartInsights = graphql(`
|
|
288874
288784
|
}
|
288875
288785
|
}
|
288876
288786
|
`, [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]);
|
288891
288787
|
var insightsList = (gqlClient) => {
|
288892
288788
|
return async (applicationUniqueName) => {
|
288893
288789
|
const { insightsListByUniqueName: { items } } = await gqlClient.request(getInsights, { applicationUniqueName });
|
@@ -288921,14 +288817,6 @@ var insightsRestart = (gqlClient) => async (insightsUniqueName) => {
|
|
288921
288817
|
const { restartInsightsByUniqueName: insights } = await gqlClient.request(restartInsights, { uniqueName: insightsUniqueName });
|
288922
288818
|
return insights;
|
288923
288819
|
};
|
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
|
-
};
|
288932
288820
|
var IntegrationFragment = graphql(`
|
288933
288821
|
fragment Integration on Integration {
|
288934
288822
|
__typename
|
@@ -288998,20 +288886,6 @@ var restartIntegrationTool = graphql(`
|
|
288998
288886
|
}
|
288999
288887
|
}
|
289000
288888
|
`, [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]);
|
289015
288889
|
var integrationToolList = (gqlClient) => {
|
289016
288890
|
return async (applicationUniqueName) => {
|
289017
288891
|
const { integrationsByUniqueName: { items } } = await gqlClient.request(getIntegrations, { applicationUniqueName });
|
@@ -289039,14 +288913,6 @@ var integrationToolRestart = (gqlClient) => async (integrationUniqueName) => {
|
|
289039
288913
|
const { restartIntegrationByUniqueName: integration } = await gqlClient.request(restartIntegrationTool, { uniqueName: integrationUniqueName });
|
289040
288914
|
return integration;
|
289041
288915
|
};
|
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
|
-
};
|
289050
288916
|
var StorageFragment = graphql(`
|
289051
288917
|
fragment Storage on Storage {
|
289052
288918
|
__typename
|
@@ -289116,20 +288982,6 @@ var restartStorage = graphql(`
|
|
289116
288982
|
}
|
289117
288983
|
}
|
289118
288984
|
`, [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]);
|
289133
288985
|
var storageList = (gqlClient) => {
|
289134
288986
|
return async (applicationUniqueName) => {
|
289135
288987
|
const { storagesByUniqueName: { items } } = await gqlClient.request(getStorages, { applicationUniqueName });
|
@@ -289157,14 +289009,6 @@ var storageRestart = (gqlClient) => async (storageUniqueName) => {
|
|
289157
289009
|
const { restartStorageByUniqueName: storage } = await gqlClient.request(restartStorage, { uniqueName: storageUniqueName });
|
289158
289010
|
return storage;
|
289159
289011
|
};
|
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
|
-
};
|
289168
289012
|
var MiddlewareFragment = graphql(`
|
289169
289013
|
fragment Middleware on Middleware {
|
289170
289014
|
__typename
|
@@ -289265,20 +289109,6 @@ var restartMiddleware = graphql(`
|
|
289265
289109
|
}
|
289266
289110
|
}
|
289267
289111
|
`, [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]);
|
289282
289112
|
var middlewareList = (gqlClient) => {
|
289283
289113
|
return async (applicationUniqueName) => {
|
289284
289114
|
const { middlewaresByUniqueName: { items } } = await gqlClient.request(getMiddlewares, { applicationUniqueName });
|
@@ -289323,14 +289153,6 @@ var middlewareRestart = (gqlClient) => async (middlewareUniqueName) => {
|
|
289323
289153
|
const { restartMiddlewareByUniqueName: middleware } = await gqlClient.request(restartMiddleware, { uniqueName: middlewareUniqueName });
|
289324
289154
|
return middleware;
|
289325
289155
|
};
|
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
|
-
};
|
289334
289156
|
var getPlatformConfigQuery = graphql(`
|
289335
289157
|
query platformConfig {
|
289336
289158
|
config {
|
@@ -289463,20 +289285,6 @@ var restartPrivateKey = graphql(`
|
|
289463
289285
|
}
|
289464
289286
|
}
|
289465
289287
|
`, [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]);
|
289480
289288
|
var privateKeyList = (gqlClient) => {
|
289481
289289
|
return async (applicationUniqueName) => {
|
289482
289290
|
const { privateKeysByUniqueName: { items } } = await gqlClient.request(getPrivateKeys, { applicationUniqueName });
|
@@ -289515,14 +289323,6 @@ var privateKeyRestart = (gqlClient) => async (privateKeyUniqueName) => {
|
|
289515
289323
|
const { restartPrivateKeyByUniqueName: privateKey } = await gqlClient.request(restartPrivateKey, { uniqueName: privateKeyUniqueName });
|
289516
289324
|
return privateKey;
|
289517
289325
|
};
|
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
|
-
};
|
289526
289326
|
var ClientOptionsSchema = exports_external.object({
|
289527
289327
|
accessToken: AccessTokenSchema2,
|
289528
289328
|
instance: UrlSchema2
|
@@ -289602,75 +289402,57 @@ function createSettleMintClient(options) {
|
|
289602
289402
|
read: blockchainNetworkRead(gqlClient),
|
289603
289403
|
create: blockchainNetworkCreate(gqlClient),
|
289604
289404
|
delete: blockchainNetworkDelete(gqlClient),
|
289605
|
-
restart: blockchainNetworkRestart(gqlClient)
|
289606
|
-
pause: blockchainNetworkPause(gqlClient),
|
289607
|
-
resume: blockchainNetworkResume(gqlClient)
|
289405
|
+
restart: blockchainNetworkRestart(gqlClient)
|
289608
289406
|
},
|
289609
289407
|
blockchainNode: {
|
289610
289408
|
list: blockchainNodeList(gqlClient),
|
289611
289409
|
read: blockchainNodeRead(gqlClient),
|
289612
289410
|
create: blockchainNodeCreate(gqlClient),
|
289613
|
-
restart: blockchainNodeRestart(gqlClient)
|
289614
|
-
pause: blockchainNodePause(gqlClient),
|
289615
|
-
resume: blockchainNodeResume(gqlClient)
|
289411
|
+
restart: blockchainNodeRestart(gqlClient)
|
289616
289412
|
},
|
289617
289413
|
loadBalancer: {
|
289618
289414
|
list: loadBalancerList(gqlClient),
|
289619
289415
|
read: loadBalancerRead(gqlClient),
|
289620
289416
|
create: loadBalancerCreate(gqlClient),
|
289621
|
-
restart: loadBalancerRestart(gqlClient)
|
289622
|
-
pause: loadBalancerPause(gqlClient),
|
289623
|
-
resume: loadBalancerResume(gqlClient)
|
289417
|
+
restart: loadBalancerRestart(gqlClient)
|
289624
289418
|
},
|
289625
289419
|
middleware: {
|
289626
289420
|
list: middlewareList(gqlClient),
|
289627
289421
|
read: middlewareRead(gqlClient),
|
289628
289422
|
graphSubgraphs: graphMiddlewareSubgraphs(gqlClient),
|
289629
289423
|
create: middlewareCreate(gqlClient),
|
289630
|
-
restart: middlewareRestart(gqlClient)
|
289631
|
-
pause: middlewarePause(gqlClient),
|
289632
|
-
resume: middlewareResume(gqlClient)
|
289424
|
+
restart: middlewareRestart(gqlClient)
|
289633
289425
|
},
|
289634
289426
|
integrationTool: {
|
289635
289427
|
list: integrationToolList(gqlClient),
|
289636
289428
|
read: integrationToolRead(gqlClient),
|
289637
289429
|
create: integrationToolCreate(gqlClient),
|
289638
|
-
restart: integrationToolRestart(gqlClient)
|
289639
|
-
pause: integrationToolPause(gqlClient),
|
289640
|
-
resume: integrationToolResume(gqlClient)
|
289430
|
+
restart: integrationToolRestart(gqlClient)
|
289641
289431
|
},
|
289642
289432
|
storage: {
|
289643
289433
|
list: storageList(gqlClient),
|
289644
289434
|
read: storageRead(gqlClient),
|
289645
289435
|
create: storageCreate(gqlClient),
|
289646
|
-
restart: storageRestart(gqlClient)
|
289647
|
-
pause: storagePause(gqlClient),
|
289648
|
-
resume: storageResume(gqlClient)
|
289436
|
+
restart: storageRestart(gqlClient)
|
289649
289437
|
},
|
289650
289438
|
privateKey: {
|
289651
289439
|
list: privateKeyList(gqlClient),
|
289652
289440
|
read: privatekeyRead(gqlClient),
|
289653
289441
|
create: privateKeyCreate(gqlClient),
|
289654
|
-
restart: privateKeyRestart(gqlClient)
|
289655
|
-
pause: privateKeyPause(gqlClient),
|
289656
|
-
resume: privateKeyResume(gqlClient)
|
289442
|
+
restart: privateKeyRestart(gqlClient)
|
289657
289443
|
},
|
289658
289444
|
insights: {
|
289659
289445
|
list: insightsList(gqlClient),
|
289660
289446
|
read: insightsRead(gqlClient),
|
289661
289447
|
create: insightsCreate(gqlClient),
|
289662
|
-
restart: insightsRestart(gqlClient)
|
289663
|
-
pause: insightsPause(gqlClient),
|
289664
|
-
resume: insightsResume(gqlClient)
|
289448
|
+
restart: insightsRestart(gqlClient)
|
289665
289449
|
},
|
289666
289450
|
customDeployment: {
|
289667
289451
|
list: customdeploymentList(gqlClient),
|
289668
289452
|
read: customdeploymentRead(gqlClient),
|
289669
289453
|
create: customdeploymentCreate(gqlClient),
|
289670
289454
|
update: customdeploymentUpdate(gqlClient),
|
289671
|
-
restart: customDeploymentRestart(gqlClient)
|
289672
|
-
pause: customDeploymentPause(gqlClient),
|
289673
|
-
resume: customDeploymentResume(gqlClient)
|
289455
|
+
restart: customDeploymentRestart(gqlClient)
|
289674
289456
|
},
|
289675
289457
|
foundry: { env: getEnv(gqlClient) },
|
289676
289458
|
applicationAccessToken: { create: applicationAccessTokenCreate(gqlClient) },
|
@@ -296087,6 +295869,17 @@ async function exists3(path$1) {
|
|
296087
295869
|
return false;
|
296088
295870
|
}
|
296089
295871
|
}
|
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
|
+
}
|
296090
295883
|
var require_balanced_match4 = __commonJS4({ "../../node_modules/balanced-match/index.js"(exports, module) {
|
296091
295884
|
module.exports = balanced$1;
|
296092
295885
|
function balanced$1(a3, b, str) {
|
@@ -301565,17 +301358,6 @@ var glob3 = Object.assign(glob_3, {
|
|
301565
301358
|
unescape: unescape4
|
301566
301359
|
});
|
301567
301360
|
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
|
-
}
|
301579
301361
|
async function findMonoRepoRoot2(startDir) {
|
301580
301362
|
const lockFilePath = await findUp([
|
301581
301363
|
"package-lock.json",
|
@@ -301621,7 +301403,7 @@ function tryParseJson4(value2, defaultValue = null) {
|
|
301621
301403
|
return defaultValue;
|
301622
301404
|
}
|
301623
301405
|
return parsed;
|
301624
|
-
} catch (
|
301406
|
+
} catch (err) {
|
301625
301407
|
return defaultValue;
|
301626
301408
|
}
|
301627
301409
|
}
|
@@ -301649,7 +301431,7 @@ async function readConfig() {
|
|
301649
301431
|
try {
|
301650
301432
|
const content = await readFile4(CONFIG_FILE, "utf-8");
|
301651
301433
|
return tryParseJson4(content, { instances: {} });
|
301652
|
-
} catch (
|
301434
|
+
} catch (error41) {
|
301653
301435
|
return { instances: {} };
|
301654
301436
|
}
|
301655
301437
|
}
|
@@ -320694,476 +320476,20 @@ var esm_default4 = createPrompt((config5, done) => {
|
|
320694
320476
|
return `${prefix} ${message}${defaultValue} ${formattedValue}`;
|
320695
320477
|
});
|
320696
320478
|
|
320697
|
-
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/key.js
|
320698
|
-
var isEnterKey2 = (key2) => key2.name === "enter" || key2.name === "return";
|
320699
|
-
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/errors.js
|
320700
|
-
class AbortPromptError2 extends Error {
|
320701
|
-
name = "AbortPromptError";
|
320702
|
-
message = "Prompt was aborted";
|
320703
|
-
constructor(options) {
|
320704
|
-
super();
|
320705
|
-
this.cause = options?.cause;
|
320706
|
-
}
|
320707
|
-
}
|
320708
|
-
|
320709
|
-
class CancelPromptError2 extends Error {
|
320710
|
-
name = "CancelPromptError";
|
320711
|
-
message = "Prompt was canceled";
|
320712
|
-
}
|
320713
|
-
|
320714
|
-
class ExitPromptError2 extends Error {
|
320715
|
-
name = "ExitPromptError";
|
320716
|
-
}
|
320717
|
-
|
320718
|
-
class HookError2 extends Error {
|
320719
|
-
name = "HookError";
|
320720
|
-
}
|
320721
|
-
|
320722
|
-
class ValidationError2 extends Error {
|
320723
|
-
name = "ValidationError";
|
320724
|
-
}
|
320725
|
-
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/use-state.js
|
320726
|
-
import { AsyncResource as AsyncResource5 } from "node:async_hooks";
|
320727
|
-
|
320728
|
-
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/hook-engine.js
|
320729
|
-
import { AsyncLocalStorage as AsyncLocalStorage2, AsyncResource as AsyncResource4 } from "node:async_hooks";
|
320730
|
-
var hookStorage2 = new AsyncLocalStorage2;
|
320731
|
-
function createStore2(rl) {
|
320732
|
-
const store = {
|
320733
|
-
rl,
|
320734
|
-
hooks: [],
|
320735
|
-
hooksCleanup: [],
|
320736
|
-
hooksEffect: [],
|
320737
|
-
index: 0,
|
320738
|
-
handleChange() {}
|
320739
|
-
};
|
320740
|
-
return store;
|
320741
|
-
}
|
320742
|
-
function withHooks2(rl, cb) {
|
320743
|
-
const store = createStore2(rl);
|
320744
|
-
return hookStorage2.run(store, () => {
|
320745
|
-
function cycle(render) {
|
320746
|
-
store.handleChange = () => {
|
320747
|
-
store.index = 0;
|
320748
|
-
render();
|
320749
|
-
};
|
320750
|
-
store.handleChange();
|
320751
|
-
}
|
320752
|
-
return cb(cycle);
|
320753
|
-
});
|
320754
|
-
}
|
320755
|
-
function getStore2() {
|
320756
|
-
const store = hookStorage2.getStore();
|
320757
|
-
if (!store) {
|
320758
|
-
throw new HookError2("[Inquirer] Hook functions can only be called from within a prompt");
|
320759
|
-
}
|
320760
|
-
return store;
|
320761
|
-
}
|
320762
|
-
function readline3() {
|
320763
|
-
return getStore2().rl;
|
320764
|
-
}
|
320765
|
-
function withUpdates2(fn) {
|
320766
|
-
const wrapped = (...args) => {
|
320767
|
-
const store = getStore2();
|
320768
|
-
let shouldUpdate = false;
|
320769
|
-
const oldHandleChange = store.handleChange;
|
320770
|
-
store.handleChange = () => {
|
320771
|
-
shouldUpdate = true;
|
320772
|
-
};
|
320773
|
-
const returnValue = fn(...args);
|
320774
|
-
if (shouldUpdate) {
|
320775
|
-
oldHandleChange();
|
320776
|
-
}
|
320777
|
-
store.handleChange = oldHandleChange;
|
320778
|
-
return returnValue;
|
320779
|
-
};
|
320780
|
-
return AsyncResource4.bind(wrapped);
|
320781
|
-
}
|
320782
|
-
function withPointer2(cb) {
|
320783
|
-
const store = getStore2();
|
320784
|
-
const { index: index2 } = store;
|
320785
|
-
const pointer = {
|
320786
|
-
get() {
|
320787
|
-
return store.hooks[index2];
|
320788
|
-
},
|
320789
|
-
set(value4) {
|
320790
|
-
store.hooks[index2] = value4;
|
320791
|
-
},
|
320792
|
-
initialized: index2 in store.hooks
|
320793
|
-
};
|
320794
|
-
const returnValue = cb(pointer);
|
320795
|
-
store.index++;
|
320796
|
-
return returnValue;
|
320797
|
-
}
|
320798
|
-
function handleChange2() {
|
320799
|
-
getStore2().handleChange();
|
320800
|
-
}
|
320801
|
-
var effectScheduler2 = {
|
320802
|
-
queue(cb) {
|
320803
|
-
const store = getStore2();
|
320804
|
-
const { index: index2 } = store;
|
320805
|
-
store.hooksEffect.push(() => {
|
320806
|
-
store.hooksCleanup[index2]?.();
|
320807
|
-
const cleanFn = cb(readline3());
|
320808
|
-
if (cleanFn != null && typeof cleanFn !== "function") {
|
320809
|
-
throw new ValidationError2("useEffect return value must be a cleanup function or nothing.");
|
320810
|
-
}
|
320811
|
-
store.hooksCleanup[index2] = cleanFn;
|
320812
|
-
});
|
320813
|
-
},
|
320814
|
-
run() {
|
320815
|
-
const store = getStore2();
|
320816
|
-
withUpdates2(() => {
|
320817
|
-
store.hooksEffect.forEach((effect) => {
|
320818
|
-
effect();
|
320819
|
-
});
|
320820
|
-
store.hooksEffect.length = 0;
|
320821
|
-
})();
|
320822
|
-
},
|
320823
|
-
clearAll() {
|
320824
|
-
const store = getStore2();
|
320825
|
-
store.hooksCleanup.forEach((cleanFn) => {
|
320826
|
-
cleanFn?.();
|
320827
|
-
});
|
320828
|
-
store.hooksEffect.length = 0;
|
320829
|
-
store.hooksCleanup.length = 0;
|
320830
|
-
}
|
320831
|
-
};
|
320832
|
-
|
320833
|
-
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/use-state.js
|
320834
|
-
function useState2(defaultValue) {
|
320835
|
-
return withPointer2((pointer) => {
|
320836
|
-
const setState = AsyncResource5.bind(function setState(newValue) {
|
320837
|
-
if (pointer.get() !== newValue) {
|
320838
|
-
pointer.set(newValue);
|
320839
|
-
handleChange2();
|
320840
|
-
}
|
320841
|
-
});
|
320842
|
-
if (pointer.initialized) {
|
320843
|
-
return [pointer.get(), setState];
|
320844
|
-
}
|
320845
|
-
const value4 = typeof defaultValue === "function" ? defaultValue() : defaultValue;
|
320846
|
-
pointer.set(value4);
|
320847
|
-
return [value4, setState];
|
320848
|
-
});
|
320849
|
-
}
|
320850
|
-
|
320851
|
-
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/use-effect.js
|
320852
|
-
function useEffect2(cb, depArray) {
|
320853
|
-
withPointer2((pointer) => {
|
320854
|
-
const oldDeps = pointer.get();
|
320855
|
-
const hasChanged = !Array.isArray(oldDeps) || depArray.some((dep, i6) => !Object.is(dep, oldDeps[i6]));
|
320856
|
-
if (hasChanged) {
|
320857
|
-
effectScheduler2.queue(cb);
|
320858
|
-
}
|
320859
|
-
pointer.set(depArray);
|
320860
|
-
});
|
320861
|
-
}
|
320862
|
-
|
320863
|
-
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/theme.js
|
320864
|
-
var import_yoctocolors_cjs4 = __toESM(require_yoctocolors_cjs(), 1);
|
320865
|
-
var defaultTheme2 = {
|
320866
|
-
prefix: {
|
320867
|
-
idle: import_yoctocolors_cjs4.default.blue("?"),
|
320868
|
-
done: import_yoctocolors_cjs4.default.green(esm_default.tick)
|
320869
|
-
},
|
320870
|
-
spinner: {
|
320871
|
-
interval: 80,
|
320872
|
-
frames: ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"].map((frame) => import_yoctocolors_cjs4.default.yellow(frame))
|
320873
|
-
},
|
320874
|
-
style: {
|
320875
|
-
answer: import_yoctocolors_cjs4.default.cyan,
|
320876
|
-
message: import_yoctocolors_cjs4.default.bold,
|
320877
|
-
error: (text2) => import_yoctocolors_cjs4.default.red(`> ${text2}`),
|
320878
|
-
defaultAnswer: (text2) => import_yoctocolors_cjs4.default.dim(`(${text2})`),
|
320879
|
-
help: import_yoctocolors_cjs4.default.dim,
|
320880
|
-
highlight: import_yoctocolors_cjs4.default.cyan,
|
320881
|
-
key: (text2) => import_yoctocolors_cjs4.default.cyan(import_yoctocolors_cjs4.default.bold(`<${text2}>`))
|
320882
|
-
}
|
320883
|
-
};
|
320884
|
-
|
320885
|
-
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/make-theme.js
|
320886
|
-
function isPlainObject7(value4) {
|
320887
|
-
if (typeof value4 !== "object" || value4 === null)
|
320888
|
-
return false;
|
320889
|
-
let proto = value4;
|
320890
|
-
while (Object.getPrototypeOf(proto) !== null) {
|
320891
|
-
proto = Object.getPrototypeOf(proto);
|
320892
|
-
}
|
320893
|
-
return Object.getPrototypeOf(value4) === proto;
|
320894
|
-
}
|
320895
|
-
function deepMerge3(...objects) {
|
320896
|
-
const output = {};
|
320897
|
-
for (const obj of objects) {
|
320898
|
-
for (const [key2, value4] of Object.entries(obj)) {
|
320899
|
-
const prevValue = output[key2];
|
320900
|
-
output[key2] = isPlainObject7(prevValue) && isPlainObject7(value4) ? deepMerge3(prevValue, value4) : value4;
|
320901
|
-
}
|
320902
|
-
}
|
320903
|
-
return output;
|
320904
|
-
}
|
320905
|
-
function makeTheme2(...themes) {
|
320906
|
-
const themesToMerge = [
|
320907
|
-
defaultTheme2,
|
320908
|
-
...themes.filter((theme) => theme != null)
|
320909
|
-
];
|
320910
|
-
return deepMerge3(...themesToMerge);
|
320911
|
-
}
|
320912
|
-
|
320913
|
-
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/use-prefix.js
|
320914
|
-
function usePrefix2({ status = "idle", theme }) {
|
320915
|
-
const [showLoader, setShowLoader] = useState2(false);
|
320916
|
-
const [tick, setTick] = useState2(0);
|
320917
|
-
const { prefix, spinner: spinner2 } = makeTheme2(theme);
|
320918
|
-
useEffect2(() => {
|
320919
|
-
if (status === "loading") {
|
320920
|
-
let tickInterval;
|
320921
|
-
let inc = -1;
|
320922
|
-
const delayTimeout = setTimeout(() => {
|
320923
|
-
setShowLoader(true);
|
320924
|
-
tickInterval = setInterval(() => {
|
320925
|
-
inc = inc + 1;
|
320926
|
-
setTick(inc % spinner2.frames.length);
|
320927
|
-
}, spinner2.interval);
|
320928
|
-
}, 300);
|
320929
|
-
return () => {
|
320930
|
-
clearTimeout(delayTimeout);
|
320931
|
-
clearInterval(tickInterval);
|
320932
|
-
};
|
320933
|
-
} else {
|
320934
|
-
setShowLoader(false);
|
320935
|
-
}
|
320936
|
-
}, [status]);
|
320937
|
-
if (showLoader) {
|
320938
|
-
return spinner2.frames[tick];
|
320939
|
-
}
|
320940
|
-
const iconName = status === "loading" ? "idle" : status;
|
320941
|
-
return typeof prefix === "string" ? prefix : prefix[iconName] ?? prefix["idle"];
|
320942
|
-
}
|
320943
|
-
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/use-ref.js
|
320944
|
-
function useRef2(val) {
|
320945
|
-
return useState2({ current: val })[0];
|
320946
|
-
}
|
320947
|
-
|
320948
|
-
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/use-keypress.js
|
320949
|
-
function useKeypress2(userHandler) {
|
320950
|
-
const signal = useRef2(userHandler);
|
320951
|
-
signal.current = userHandler;
|
320952
|
-
useEffect2((rl) => {
|
320953
|
-
let ignore = false;
|
320954
|
-
const handler = withUpdates2((_input, event) => {
|
320955
|
-
if (ignore)
|
320956
|
-
return;
|
320957
|
-
signal.current(event, rl);
|
320958
|
-
});
|
320959
|
-
rl.input.on("keypress", handler);
|
320960
|
-
return () => {
|
320961
|
-
ignore = true;
|
320962
|
-
rl.input.removeListener("keypress", handler);
|
320963
|
-
};
|
320964
|
-
}, []);
|
320965
|
-
}
|
320966
|
-
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/utils.js
|
320967
|
-
var import_cli_width2 = __toESM(require_cli_width(), 1);
|
320968
|
-
var import_wrap_ansi2 = __toESM(require_wrap_ansi(), 1);
|
320969
|
-
function breakLines2(content, width) {
|
320970
|
-
return content.split(`
|
320971
|
-
`).flatMap((line) => import_wrap_ansi2.default(line, width, { trim: false, hard: true }).split(`
|
320972
|
-
`).map((str) => str.trimEnd())).join(`
|
320973
|
-
`);
|
320974
|
-
}
|
320975
|
-
function readlineWidth2() {
|
320976
|
-
return import_cli_width2.default({ defaultWidth: 80, output: readline3().output });
|
320977
|
-
}
|
320978
|
-
|
320979
|
-
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
|
320980
|
-
var import_mute_stream2 = __toESM(require_lib(), 1);
|
320981
|
-
import * as readline4 from "node:readline";
|
320982
|
-
import { AsyncResource as AsyncResource6 } from "node:async_hooks";
|
320983
|
-
|
320984
|
-
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/screen-manager.js
|
320985
|
-
var import_ansi_escapes3 = __toESM(require_ansi_escapes(), 1);
|
320986
|
-
import { stripVTControlCharacters as stripVTControlCharacters3 } from "node:util";
|
320987
|
-
var height2 = (content) => content.split(`
|
320988
|
-
`).length;
|
320989
|
-
var lastLine2 = (content) => content.split(`
|
320990
|
-
`).pop() ?? "";
|
320991
|
-
function cursorDown2(n6) {
|
320992
|
-
return n6 > 0 ? import_ansi_escapes3.default.cursorDown(n6) : "";
|
320993
|
-
}
|
320994
|
-
|
320995
|
-
class ScreenManager2 {
|
320996
|
-
height = 0;
|
320997
|
-
extraLinesUnderPrompt = 0;
|
320998
|
-
cursorPos;
|
320999
|
-
rl;
|
321000
|
-
constructor(rl) {
|
321001
|
-
this.rl = rl;
|
321002
|
-
this.cursorPos = rl.getCursorPos();
|
321003
|
-
}
|
321004
|
-
write(content) {
|
321005
|
-
this.rl.output.unmute();
|
321006
|
-
this.rl.output.write(content);
|
321007
|
-
this.rl.output.mute();
|
321008
|
-
}
|
321009
|
-
render(content, bottomContent = "") {
|
321010
|
-
const promptLine = lastLine2(content);
|
321011
|
-
const rawPromptLine = stripVTControlCharacters3(promptLine);
|
321012
|
-
let prompt = rawPromptLine;
|
321013
|
-
if (this.rl.line.length > 0) {
|
321014
|
-
prompt = prompt.slice(0, -this.rl.line.length);
|
321015
|
-
}
|
321016
|
-
this.rl.setPrompt(prompt);
|
321017
|
-
this.cursorPos = this.rl.getCursorPos();
|
321018
|
-
const width = readlineWidth2();
|
321019
|
-
content = breakLines2(content, width);
|
321020
|
-
bottomContent = breakLines2(bottomContent, width);
|
321021
|
-
if (rawPromptLine.length % width === 0) {
|
321022
|
-
content += `
|
321023
|
-
`;
|
321024
|
-
}
|
321025
|
-
let output = content + (bottomContent ? `
|
321026
|
-
` + bottomContent : "");
|
321027
|
-
const promptLineUpDiff = Math.floor(rawPromptLine.length / width) - this.cursorPos.rows;
|
321028
|
-
const bottomContentHeight = promptLineUpDiff + (bottomContent ? height2(bottomContent) : 0);
|
321029
|
-
if (bottomContentHeight > 0)
|
321030
|
-
output += import_ansi_escapes3.default.cursorUp(bottomContentHeight);
|
321031
|
-
output += import_ansi_escapes3.default.cursorTo(this.cursorPos.cols);
|
321032
|
-
this.write(cursorDown2(this.extraLinesUnderPrompt) + import_ansi_escapes3.default.eraseLines(this.height) + output);
|
321033
|
-
this.extraLinesUnderPrompt = bottomContentHeight;
|
321034
|
-
this.height = height2(output);
|
321035
|
-
}
|
321036
|
-
checkCursorPos() {
|
321037
|
-
const cursorPos = this.rl.getCursorPos();
|
321038
|
-
if (cursorPos.cols !== this.cursorPos.cols) {
|
321039
|
-
this.write(import_ansi_escapes3.default.cursorTo(cursorPos.cols));
|
321040
|
-
this.cursorPos = cursorPos;
|
321041
|
-
}
|
321042
|
-
}
|
321043
|
-
done({ clearContent }) {
|
321044
|
-
this.rl.setPrompt("");
|
321045
|
-
let output = cursorDown2(this.extraLinesUnderPrompt);
|
321046
|
-
output += clearContent ? import_ansi_escapes3.default.eraseLines(this.height) : `
|
321047
|
-
`;
|
321048
|
-
output += import_ansi_escapes3.default.cursorShow;
|
321049
|
-
this.write(output);
|
321050
|
-
this.rl.close();
|
321051
|
-
}
|
321052
|
-
}
|
321053
|
-
|
321054
|
-
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/promise-polyfill.js
|
321055
|
-
class PromisePolyfill2 extends Promise {
|
321056
|
-
static withResolver() {
|
321057
|
-
let resolve6;
|
321058
|
-
let reject;
|
321059
|
-
const promise5 = new Promise((res, rej) => {
|
321060
|
-
resolve6 = res;
|
321061
|
-
reject = rej;
|
321062
|
-
});
|
321063
|
-
return { promise: promise5, resolve: resolve6, reject };
|
321064
|
-
}
|
321065
|
-
}
|
321066
|
-
|
321067
|
-
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
|
321068
|
-
function getCallSites2() {
|
321069
|
-
const _prepareStackTrace = Error.prepareStackTrace;
|
321070
|
-
let result = [];
|
321071
|
-
try {
|
321072
|
-
Error.prepareStackTrace = (_5, callSites) => {
|
321073
|
-
const callSitesWithoutCurrent = callSites.slice(1);
|
321074
|
-
result = callSitesWithoutCurrent;
|
321075
|
-
return callSitesWithoutCurrent;
|
321076
|
-
};
|
321077
|
-
new Error().stack;
|
321078
|
-
} catch {
|
321079
|
-
return result;
|
321080
|
-
}
|
321081
|
-
Error.prepareStackTrace = _prepareStackTrace;
|
321082
|
-
return result;
|
321083
|
-
}
|
321084
|
-
function createPrompt2(view) {
|
321085
|
-
const callSites = getCallSites2();
|
321086
|
-
const prompt = (config5, context = {}) => {
|
321087
|
-
const { input = process.stdin, signal } = context;
|
321088
|
-
const cleanups = new Set;
|
321089
|
-
const output = new import_mute_stream2.default;
|
321090
|
-
output.pipe(context.output ?? process.stdout);
|
321091
|
-
const rl = readline4.createInterface({
|
321092
|
-
terminal: true,
|
321093
|
-
input,
|
321094
|
-
output
|
321095
|
-
});
|
321096
|
-
const screen = new ScreenManager2(rl);
|
321097
|
-
const { promise: promise5, resolve: resolve6, reject } = PromisePolyfill2.withResolver();
|
321098
|
-
const cancel3 = () => reject(new CancelPromptError2);
|
321099
|
-
if (signal) {
|
321100
|
-
const abort = () => reject(new AbortPromptError2({ cause: signal.reason }));
|
321101
|
-
if (signal.aborted) {
|
321102
|
-
abort();
|
321103
|
-
return Object.assign(promise5, { cancel: cancel3 });
|
321104
|
-
}
|
321105
|
-
signal.addEventListener("abort", abort);
|
321106
|
-
cleanups.add(() => signal.removeEventListener("abort", abort));
|
321107
|
-
}
|
321108
|
-
cleanups.add(onExit((code2, signal2) => {
|
321109
|
-
reject(new ExitPromptError2(`User force closed the prompt with ${code2} ${signal2}`));
|
321110
|
-
}));
|
321111
|
-
const sigint = () => reject(new ExitPromptError2(`User force closed the prompt with SIGINT`));
|
321112
|
-
rl.on("SIGINT", sigint);
|
321113
|
-
cleanups.add(() => rl.removeListener("SIGINT", sigint));
|
321114
|
-
const checkCursorPos = () => screen.checkCursorPos();
|
321115
|
-
rl.input.on("keypress", checkCursorPos);
|
321116
|
-
cleanups.add(() => rl.input.removeListener("keypress", checkCursorPos));
|
321117
|
-
return withHooks2(rl, (cycle) => {
|
321118
|
-
const hooksCleanup = AsyncResource6.bind(() => effectScheduler2.clearAll());
|
321119
|
-
rl.on("close", hooksCleanup);
|
321120
|
-
cleanups.add(() => rl.removeListener("close", hooksCleanup));
|
321121
|
-
cycle(() => {
|
321122
|
-
try {
|
321123
|
-
const nextView = view(config5, (value4) => {
|
321124
|
-
setImmediate(() => resolve6(value4));
|
321125
|
-
});
|
321126
|
-
if (nextView === undefined) {
|
321127
|
-
const callerFilename = callSites[1]?.getFileName();
|
321128
|
-
throw new Error(`Prompt functions must return a string.
|
321129
|
-
at ${callerFilename}`);
|
321130
|
-
}
|
321131
|
-
const [content, bottomContent] = typeof nextView === "string" ? [nextView] : nextView;
|
321132
|
-
screen.render(content, bottomContent);
|
321133
|
-
effectScheduler2.run();
|
321134
|
-
} catch (error45) {
|
321135
|
-
reject(error45);
|
321136
|
-
}
|
321137
|
-
});
|
321138
|
-
return Object.assign(promise5.then((answer) => {
|
321139
|
-
effectScheduler2.clearAll();
|
321140
|
-
return answer;
|
321141
|
-
}, (error45) => {
|
321142
|
-
effectScheduler2.clearAll();
|
321143
|
-
throw error45;
|
321144
|
-
}).finally(() => {
|
321145
|
-
cleanups.forEach((cleanup) => cleanup());
|
321146
|
-
screen.done({ clearContent: Boolean(context.clearPromptOnDone) });
|
321147
|
-
output.end();
|
321148
|
-
}).then(() => promise5), { cancel: cancel3 });
|
321149
|
-
});
|
321150
|
-
};
|
321151
|
-
return prompt;
|
321152
|
-
}
|
321153
320479
|
// ../../node_modules/@inquirer/password/dist/esm/index.js
|
321154
|
-
var
|
321155
|
-
var esm_default5 =
|
320480
|
+
var import_ansi_escapes3 = __toESM(require_ansi_escapes(), 1);
|
320481
|
+
var esm_default5 = createPrompt((config5, done) => {
|
321156
320482
|
const { validate: validate5 = () => true } = config5;
|
321157
|
-
const theme =
|
321158
|
-
const [status, setStatus] =
|
321159
|
-
const [errorMsg, setError] =
|
321160
|
-
const [value4, setValue] =
|
321161
|
-
const prefix =
|
321162
|
-
|
320483
|
+
const theme = makeTheme(config5.theme);
|
320484
|
+
const [status, setStatus] = useState("idle");
|
320485
|
+
const [errorMsg, setError] = useState();
|
320486
|
+
const [value4, setValue] = useState("");
|
320487
|
+
const prefix = usePrefix({ status, theme });
|
320488
|
+
useKeypress(async (key2, rl) => {
|
321163
320489
|
if (status !== "idle") {
|
321164
320490
|
return;
|
321165
320491
|
}
|
321166
|
-
if (
|
320492
|
+
if (isEnterKey(key2)) {
|
321167
320493
|
const answer = value4;
|
321168
320494
|
setStatus("loading");
|
321169
320495
|
const isValid = await validate5(answer);
|
@@ -321188,7 +320514,7 @@ var esm_default5 = createPrompt2((config5, done) => {
|
|
321188
320514
|
const maskChar = typeof config5.mask === "string" ? config5.mask : "*";
|
321189
320515
|
formattedValue = maskChar.repeat(value4.length);
|
321190
320516
|
} else if (status !== "done") {
|
321191
|
-
helpTip = `${theme.style.help("[input is masked]")}${
|
320517
|
+
helpTip = `${theme.style.help("[input is masked]")}${import_ansi_escapes3.default.cursorHide}`;
|
321192
320518
|
}
|
321193
320519
|
if (status === "done") {
|
321194
320520
|
formattedValue = theme.style.answer(formattedValue);
|
@@ -321231,7 +320557,7 @@ async function applicationAccessTokenPrompt(env2, application, settlemint, accep
|
|
321231
320557
|
try {
|
321232
320558
|
validate2(exports_external.string(), value4);
|
321233
320559
|
return true;
|
321234
|
-
} catch (
|
320560
|
+
} catch (error45) {
|
321235
320561
|
return "Invalid token name";
|
321236
320562
|
}
|
321237
320563
|
}
|
@@ -321284,7 +320610,7 @@ async function applicationAccessTokenPrompt(env2, application, settlemint, accep
|
|
321284
320610
|
try {
|
321285
320611
|
validate2(ApplicationAccessTokenSchema2, aat);
|
321286
320612
|
return aat;
|
321287
|
-
} catch (
|
320613
|
+
} catch (error45) {}
|
321288
320614
|
}
|
321289
320615
|
return esm_default5({
|
321290
320616
|
message: "What is the application access token for your application in SettleMint? (format: sm_aat_...)",
|
@@ -321292,7 +320618,7 @@ async function applicationAccessTokenPrompt(env2, application, settlemint, accep
|
|
321292
320618
|
try {
|
321293
320619
|
validate2(ApplicationAccessTokenSchema2, value4);
|
321294
320620
|
return true;
|
321295
|
-
} catch (
|
320621
|
+
} catch (error45) {
|
321296
320622
|
return "Invalid application access token, it should start with sm_aat_...";
|
321297
320623
|
}
|
321298
320624
|
}
|
@@ -321697,7 +321023,7 @@ async function instancePrompt({
|
|
321697
321023
|
try {
|
321698
321024
|
validate2(UrlSchema2, value4);
|
321699
321025
|
return true;
|
321700
|
-
} catch (
|
321026
|
+
} catch (error45) {
|
321701
321027
|
return "Invalid URL";
|
321702
321028
|
}
|
321703
321029
|
},
|
@@ -321781,7 +321107,7 @@ async function serviceUrlPrompt({
|
|
321781
321107
|
try {
|
321782
321108
|
validate2(UrlSchema2, value4);
|
321783
321109
|
return true;
|
321784
|
-
} catch (
|
321110
|
+
} catch (error45) {
|
321785
321111
|
return "Invalid URL";
|
321786
321112
|
}
|
321787
321113
|
},
|
@@ -322725,7 +322051,7 @@ async function projectNamePrompt(env2, argument) {
|
|
322725
322051
|
try {
|
322726
322052
|
validate2(exports_external.string(), value4);
|
322727
322053
|
return true;
|
322728
|
-
} catch (
|
322054
|
+
} catch (error45) {
|
322729
322055
|
return "Invalid projectname";
|
322730
322056
|
}
|
322731
322057
|
}
|
@@ -322919,7 +322245,7 @@ var basename2 = function(p5, extension) {
|
|
322919
322245
|
return extension && lastSegment.endsWith(extension) ? lastSegment.slice(0, -extension.length) : lastSegment;
|
322920
322246
|
};
|
322921
322247
|
// ../../node_modules/defu/dist/defu.mjs
|
322922
|
-
function
|
322248
|
+
function isPlainObject7(value4) {
|
322923
322249
|
if (value4 === null || typeof value4 !== "object") {
|
322924
322250
|
return false;
|
322925
322251
|
}
|
@@ -322936,27 +322262,27 @@ function isPlainObject8(value4) {
|
|
322936
322262
|
return true;
|
322937
322263
|
}
|
322938
322264
|
function _defu(baseObject, defaults4, namespace = ".", merger) {
|
322939
|
-
if (!
|
322265
|
+
if (!isPlainObject7(defaults4)) {
|
322940
322266
|
return _defu(baseObject, {}, namespace, merger);
|
322941
322267
|
}
|
322942
322268
|
const object5 = Object.assign({}, defaults4);
|
322943
|
-
for (const
|
322944
|
-
if (
|
322269
|
+
for (const key2 in baseObject) {
|
322270
|
+
if (key2 === "__proto__" || key2 === "constructor") {
|
322945
322271
|
continue;
|
322946
322272
|
}
|
322947
|
-
const value4 = baseObject[
|
322273
|
+
const value4 = baseObject[key2];
|
322948
322274
|
if (value4 === null || value4 === undefined) {
|
322949
322275
|
continue;
|
322950
322276
|
}
|
322951
|
-
if (merger && merger(object5,
|
322277
|
+
if (merger && merger(object5, key2, value4, namespace)) {
|
322952
322278
|
continue;
|
322953
322279
|
}
|
322954
|
-
if (Array.isArray(value4) && Array.isArray(object5[
|
322955
|
-
object5[
|
322956
|
-
} else if (
|
322957
|
-
object5[
|
322280
|
+
if (Array.isArray(value4) && Array.isArray(object5[key2])) {
|
322281
|
+
object5[key2] = [...value4, ...object5[key2]];
|
322282
|
+
} else if (isPlainObject7(value4) && isPlainObject7(object5[key2])) {
|
322283
|
+
object5[key2] = _defu(value4, object5[key2], (namespace ? `${namespace}.` : "") + key2.toString(), merger);
|
322958
322284
|
} else {
|
322959
|
-
object5[
|
322285
|
+
object5[key2] = value4;
|
322960
322286
|
}
|
322961
322287
|
}
|
322962
322288
|
return object5;
|
@@ -322965,15 +322291,15 @@ function createDefu(merger) {
|
|
322965
322291
|
return (...arguments_4) => arguments_4.reduce((p5, c3) => _defu(p5, c3, "", merger), {});
|
322966
322292
|
}
|
322967
322293
|
var defu = createDefu();
|
322968
|
-
var defuFn = createDefu((object5,
|
322969
|
-
if (object5[
|
322970
|
-
object5[
|
322294
|
+
var defuFn = createDefu((object5, key2, currentValue) => {
|
322295
|
+
if (object5[key2] !== undefined && typeof currentValue === "function") {
|
322296
|
+
object5[key2] = currentValue(object5[key2]);
|
322971
322297
|
return true;
|
322972
322298
|
}
|
322973
322299
|
});
|
322974
|
-
var defuArrayFn = createDefu((object5,
|
322975
|
-
if (Array.isArray(object5[
|
322976
|
-
object5[
|
322300
|
+
var defuArrayFn = createDefu((object5, key2, currentValue) => {
|
322301
|
+
if (Array.isArray(object5[key2]) && typeof currentValue === "function") {
|
322302
|
+
object5[key2] = currentValue(object5[key2]);
|
322977
322303
|
return true;
|
322978
322304
|
}
|
322979
322305
|
});
|
@@ -326183,11 +325509,11 @@ function cacheDirectory() {
|
|
326183
325509
|
}
|
326184
325510
|
function normalizeHeaders(headers = {}) {
|
326185
325511
|
const normalized = {};
|
326186
|
-
for (const [
|
325512
|
+
for (const [key2, value4] of Object.entries(headers)) {
|
326187
325513
|
if (!value4) {
|
326188
325514
|
continue;
|
326189
325515
|
}
|
326190
|
-
normalized[
|
325516
|
+
normalized[key2.toLowerCase()] = value4;
|
326191
325517
|
}
|
326192
325518
|
return normalized;
|
326193
325519
|
}
|
@@ -326713,7 +326039,7 @@ async function personalAccessTokenPrompt(env2, instance, accept) {
|
|
326713
326039
|
try {
|
326714
326040
|
validate2(PersonalAccessTokenSchema2, value4);
|
326715
326041
|
return true;
|
326716
|
-
} catch (
|
326042
|
+
} catch (error45) {
|
326717
326043
|
return "Invalid personal access token, it should start with sm_pat_...";
|
326718
326044
|
}
|
326719
326045
|
}
|
@@ -326794,7 +326120,7 @@ function loginCommand() {
|
|
326794
326120
|
});
|
326795
326121
|
try {
|
326796
326122
|
await loginSpinner(client);
|
326797
|
-
} catch (
|
326123
|
+
} catch (error45) {
|
326798
326124
|
cancel2(`Invalid personal access token for instance ${selectedInstance}`);
|
326799
326125
|
}
|
326800
326126
|
await storeCredentials(personalAccessToken, selectedInstance);
|
@@ -326944,17 +326270,13 @@ function addClusterServiceArgs(cmd2) {
|
|
326944
326270
|
// src/commands/platform/utils/wait-for-completion.ts
|
326945
326271
|
class TimeoutError2 extends Error {
|
326946
326272
|
}
|
326947
|
-
|
326948
|
-
class DeploymentFailedError extends Error {
|
326949
|
-
}
|
326950
326273
|
async function waitForCompletion({
|
326951
326274
|
settlemint,
|
326952
326275
|
type: type4,
|
326953
326276
|
uniqueName,
|
326954
326277
|
action,
|
326955
326278
|
maxTimeout = 10 * 60 * 1000,
|
326956
|
-
restartIfTimeout = false
|
326957
|
-
restartOnError = false
|
326279
|
+
restartIfTimeout = false
|
326958
326280
|
}) {
|
326959
326281
|
const serviceType = SETTLEMINT_CLIENT_MAP[type4];
|
326960
326282
|
if (serviceType === "workspace" || serviceType === "application" || serviceType === "foundry" || serviceType === "applicationAccessToken" || serviceType === "platform" || serviceType === "wallet") {
|
@@ -326964,7 +326286,6 @@ async function waitForCompletion({
|
|
326964
326286
|
if (!service || !("read" in service)) {
|
326965
326287
|
throw new Error(`Service ${serviceType} does not support status checking`);
|
326966
326288
|
}
|
326967
|
-
let hasRestarted = false;
|
326968
326289
|
function showSpinner() {
|
326969
326290
|
return spinner({
|
326970
326291
|
startMessage: `Waiting for ${type4} to be ${getActionLabel(action)}`,
|
@@ -326974,20 +326295,33 @@ async function waitForCompletion({
|
|
326974
326295
|
while (true) {
|
326975
326296
|
try {
|
326976
326297
|
const resource = await service.read(uniqueName);
|
326298
|
+
if (resource.status === "COMPLETED") {
|
326299
|
+
if (spinner2) {
|
326300
|
+
spinner2.text = `${capitalizeFirstLetter2(type4)} is ${getActionLabel(action)}`;
|
326301
|
+
} else {
|
326302
|
+
note(`${capitalizeFirstLetter2(type4)} is ${getActionLabel(action)}`);
|
326303
|
+
}
|
326304
|
+
return true;
|
326305
|
+
}
|
326977
326306
|
if (resource.status === "FAILED") {
|
326978
|
-
|
326979
|
-
|
326980
|
-
|
326307
|
+
if (spinner2) {
|
326308
|
+
spinner2.text = `${capitalizeFirstLetter2(type4)} failed to ${getActionLabel(action)}`;
|
326309
|
+
} else {
|
326310
|
+
note(`${capitalizeFirstLetter2(type4)} failed to ${getActionLabel(action)}`);
|
326981
326311
|
}
|
326982
326312
|
return false;
|
326983
326313
|
}
|
326984
|
-
if (
|
326985
|
-
|
326986
|
-
|
326314
|
+
if (spinner2) {
|
326315
|
+
spinner2.text = `${capitalizeFirstLetter2(type4)} is not ready yet (status: ${resource.status})`;
|
326316
|
+
} else {
|
326317
|
+
note(`${capitalizeFirstLetter2(type4)} is not ready yet (status: ${resource.status})`);
|
326318
|
+
}
|
326319
|
+
} catch (error45) {
|
326320
|
+
if (spinner2) {
|
326321
|
+
spinner2.text = `${capitalizeFirstLetter2(type4)} is not ready yet (status: UNKNOWN)`;
|
326322
|
+
} else {
|
326323
|
+
note(`${capitalizeFirstLetter2(type4)} is not ready yet (status: UNKNOWN)`);
|
326987
326324
|
}
|
326988
|
-
updateStatus(spinner2, `${capitalizeFirstLetter2(type4)} is not ready yet (status: ${resource.status})`);
|
326989
|
-
} catch (_error) {
|
326990
|
-
updateStatus(spinner2, `${capitalizeFirstLetter2(type4)} is not ready yet (status: UNKNOWN)`);
|
326991
326325
|
}
|
326992
326326
|
if (Date.now() - startTime > maxTimeout) {
|
326993
326327
|
throw new TimeoutError2(`Operation timed out after ${maxTimeout / 60000} minutes for ${type4} with unique name ${uniqueName}`);
|
@@ -327000,59 +326334,23 @@ async function waitForCompletion({
|
|
327000
326334
|
try {
|
327001
326335
|
return await showSpinner();
|
327002
326336
|
} catch (error45) {
|
327003
|
-
|
326337
|
+
const isTimeoutError = error45 instanceof SpinnerError && error45.originalError instanceof TimeoutError2;
|
326338
|
+
if (restartIfTimeout && isTimeoutError) {
|
327004
326339
|
note(`Restarting ${capitalizeFirstLetter2(type4)}`);
|
327005
|
-
hasRestarted = true;
|
327006
326340
|
await service.restart(uniqueName);
|
327007
326341
|
return showSpinner();
|
327008
326342
|
}
|
327009
326343
|
throw error45;
|
327010
326344
|
}
|
327011
326345
|
}
|
327012
|
-
function shouldRestart(error45, restartIfTimeout) {
|
327013
|
-
const isSpinnerError = error45 instanceof SpinnerError;
|
327014
|
-
const isDeploymentFailedError = error45 instanceof DeploymentFailedError || isSpinnerError && error45.originalError instanceof DeploymentFailedError;
|
327015
|
-
if (isDeploymentFailedError) {
|
327016
|
-
return true;
|
327017
|
-
}
|
327018
|
-
const isTimeoutError = error45 instanceof TimeoutError2 || isSpinnerError && error45.originalError instanceof TimeoutError2;
|
327019
|
-
return restartIfTimeout && isTimeoutError;
|
327020
|
-
}
|
327021
|
-
function updateStatus(spinner2, message) {
|
327022
|
-
if (spinner2) {
|
327023
|
-
spinner2.text = message;
|
327024
|
-
} else {
|
327025
|
-
note(message);
|
327026
|
-
}
|
327027
|
-
}
|
327028
|
-
function isActionComplete(action, status) {
|
327029
|
-
switch (action) {
|
327030
|
-
case "pause":
|
327031
|
-
return status === "PAUSED" || status === "AUTO_PAUSED";
|
327032
|
-
case "resume":
|
327033
|
-
case "deploy":
|
327034
|
-
case "destroy":
|
327035
|
-
case "restart":
|
327036
|
-
return status === "COMPLETED";
|
327037
|
-
default:
|
327038
|
-
return false;
|
327039
|
-
}
|
327040
|
-
}
|
327041
326346
|
function getActionLabel(action) {
|
327042
|
-
|
327043
|
-
|
327044
|
-
|
327045
|
-
|
327046
|
-
|
327047
|
-
case "pause":
|
327048
|
-
return "paused";
|
327049
|
-
case "resume":
|
327050
|
-
return "resumed";
|
327051
|
-
case "deploy":
|
327052
|
-
return "deployed";
|
327053
|
-
default:
|
327054
|
-
return "deployed";
|
326347
|
+
if (action === "restart") {
|
326348
|
+
return "restarted";
|
326349
|
+
}
|
326350
|
+
if (action === "destroy") {
|
326351
|
+
return "destroyed";
|
327055
326352
|
}
|
326353
|
+
return "deployed";
|
327056
326354
|
}
|
327057
326355
|
|
327058
326356
|
// src/prompts/provider.prompt.ts
|
@@ -327133,9 +326431,9 @@ function getCreateCommand({
|
|
327133
326431
|
cmd2.alias(alias);
|
327134
326432
|
}
|
327135
326433
|
if (requiresDeployment) {
|
327136
|
-
cmd2.option("-w, --wait", "Wait until deployed").option("--restart-if-timeout", "Restart if wait time is exceeded")
|
326434
|
+
cmd2.option("-w, --wait", "Wait until deployed").option("-r, --restart-if-timeout", "Restart if wait time is exceeded");
|
327137
326435
|
}
|
327138
|
-
execute2(cmd2, async ({ acceptDefaults, prod, default: isDefault, wait: wait2, restartIfTimeout,
|
326436
|
+
execute2(cmd2, async ({ acceptDefaults, prod, default: isDefault, wait: wait2, restartIfTimeout, provider, region }, createFunction) => {
|
327139
326437
|
intro(`Creating ${type4} in the SettleMint platform`);
|
327140
326438
|
const env2 = await loadEnv(false, !!prod);
|
327141
326439
|
const instance = await instancePrompt({ env: env2, accept: acceptDefaults });
|
@@ -327149,8 +326447,8 @@ function getCreateCommand({
|
|
327149
326447
|
instance
|
327150
326448
|
});
|
327151
326449
|
const platformConfig = await settlemint.platform.config();
|
327152
|
-
let selectedProvider;
|
327153
|
-
let selectedRegion;
|
326450
|
+
let selectedProvider = undefined;
|
326451
|
+
let selectedRegion = undefined;
|
327154
326452
|
if (cmd2.options.some((option) => option.long === "--provider")) {
|
327155
326453
|
selectedProvider = await providerPrompt(platformConfig, provider);
|
327156
326454
|
if (!selectedProvider) {
|
@@ -327179,8 +326477,7 @@ function getCreateCommand({
|
|
327179
326477
|
type: waitFor?.resourceType ?? type4,
|
327180
326478
|
uniqueName: waitFor?.uniqueName ?? result.uniqueName,
|
327181
326479
|
action: "deploy",
|
327182
|
-
restartIfTimeout
|
327183
|
-
restartOnError
|
326480
|
+
restartIfTimeout
|
327184
326481
|
});
|
327185
326482
|
if (!isDeployed) {
|
327186
326483
|
throw new Error(`Failed to deploy ${waitFor?.resourceType ?? type4} ${waitFor?.uniqueName ?? result.uniqueName}`);
|
@@ -328362,7 +327659,7 @@ function privateKeyHsmCreateCommand() {
|
|
328362
327659
|
return baseAction({
|
328363
327660
|
...defaultArgs,
|
328364
327661
|
acceptDefaults
|
328365
|
-
}, async ({ settlemint, env: env2, showSpinner, provider
|
327662
|
+
}, async ({ settlemint, env: env2, showSpinner, provider, region }) => {
|
328366
327663
|
const applicationUniqueName = application ?? env2.SETTLEMINT_APPLICATION;
|
328367
327664
|
if (!applicationUniqueName) {
|
328368
327665
|
return missingApplication();
|
@@ -328651,256 +327948,25 @@ function deleteCommand() {
|
|
328651
327948
|
return new Command("delete").alias("d").description("Delete a resource in the SettleMint platform").addCommand(applicationDeleteCommand()).addCommand(workspaceDeleteCommand());
|
328652
327949
|
}
|
328653
327950
|
|
328654
|
-
// src/commands/platform/common/pause-command.ts
|
328655
|
-
function getPauseCommand({
|
328656
|
-
name: name3,
|
328657
|
-
type: type4,
|
328658
|
-
alias,
|
328659
|
-
envKey,
|
328660
|
-
pauseFunction,
|
328661
|
-
usePersonalAccessToken = true
|
328662
|
-
}) {
|
328663
|
-
const commandName = sanitizeCommandName(name3);
|
328664
|
-
const typeCommandName = sanitizeCommandName(type4);
|
328665
|
-
const exampleCommandPrefix = `platform pause ${typeCommandName !== commandName ? `${typeCommandName} ` : ""}${commandName}`;
|
328666
|
-
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([
|
328667
|
-
{
|
328668
|
-
description: `Pauses the specified ${type4} by unique name`,
|
328669
|
-
command: `${exampleCommandPrefix} <unique-name>`
|
328670
|
-
},
|
328671
|
-
{
|
328672
|
-
description: `Pauses the default ${type4} in the production environment`,
|
328673
|
-
command: `${exampleCommandPrefix} default --prod`
|
328674
|
-
}
|
328675
|
-
])).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 }) => {
|
328676
|
-
intro(`Pausing ${type4} in the SettleMint platform`);
|
328677
|
-
const env2 = await loadEnv(false, !!prod);
|
328678
|
-
const instance = await instancePrompt({ env: env2, accept: acceptDefaults });
|
328679
|
-
const accessToken = await getApplicationOrPersonalAccessToken({
|
328680
|
-
env: env2,
|
328681
|
-
instance,
|
328682
|
-
prefer: usePersonalAccessToken ? "personal" : "application"
|
328683
|
-
});
|
328684
|
-
const settlemint = createSettleMintClient({
|
328685
|
-
accessToken,
|
328686
|
-
instance
|
328687
|
-
});
|
328688
|
-
const isDefaultUniqueName = uniqueName === "default";
|
328689
|
-
const serviceUniqueName = isDefaultUniqueName ? typeof env2[envKey] === "string" ? env2[envKey] : null : uniqueName;
|
328690
|
-
if (!serviceUniqueName) {
|
328691
|
-
cancel2(`No default ${type4} found in your .env file. Please provide a valid ${type4} unique name or set a default ${type4} first.`);
|
328692
|
-
}
|
328693
|
-
const result = await spinner({
|
328694
|
-
startMessage: `Pausing ${type4}`,
|
328695
|
-
task: async () => {
|
328696
|
-
return pauseFunction(settlemint, serviceUniqueName);
|
328697
|
-
},
|
328698
|
-
stopMessage: `${capitalizeFirstLetter2(type4)} pause initiated`
|
328699
|
-
});
|
328700
|
-
if (wait2) {
|
328701
|
-
const isPaused = await waitForCompletion({
|
328702
|
-
settlemint,
|
328703
|
-
type: type4,
|
328704
|
-
uniqueName: serviceUniqueName,
|
328705
|
-
action: "pause"
|
328706
|
-
});
|
328707
|
-
if (!isPaused) {
|
328708
|
-
throw new Error(`Failed to pause ${type4} ${serviceUniqueName}`);
|
328709
|
-
}
|
328710
|
-
}
|
328711
|
-
outro(`${capitalizeFirstLetter2(type4)} ${result.name} pause initiated successfully`);
|
328712
|
-
});
|
328713
|
-
}
|
328714
|
-
|
328715
|
-
// src/commands/platform/blockchain-network/pause.ts
|
328716
|
-
function blockchainNetworkPauseCommand() {
|
328717
|
-
return getPauseCommand({
|
328718
|
-
name: "blockchain-network",
|
328719
|
-
type: "blockchain network",
|
328720
|
-
alias: "bnw",
|
328721
|
-
envKey: "SETTLEMINT_BLOCKCHAIN_NETWORK",
|
328722
|
-
pauseFunction: async (settlemint, id) => {
|
328723
|
-
return settlemint.blockchainNetwork.pause(id);
|
328724
|
-
}
|
328725
|
-
});
|
328726
|
-
}
|
328727
|
-
|
328728
|
-
// src/commands/platform/blockchain-node/pause.ts
|
328729
|
-
function blockchainNodePauseCommand() {
|
328730
|
-
return getPauseCommand({
|
328731
|
-
name: "blockchain-node",
|
328732
|
-
type: "blockchain node",
|
328733
|
-
alias: "bn",
|
328734
|
-
envKey: "SETTLEMINT_BLOCKCHAIN_NODE",
|
328735
|
-
pauseFunction: async (settlemint, id) => {
|
328736
|
-
return settlemint.blockchainNode.pause(id);
|
328737
|
-
}
|
328738
|
-
});
|
328739
|
-
}
|
328740
|
-
|
328741
|
-
// src/commands/platform/custom-deployments/pause.ts
|
328742
|
-
function customDeploymentPauseCommand() {
|
328743
|
-
return getPauseCommand({
|
328744
|
-
name: "custom-deployment",
|
328745
|
-
type: "custom deployment",
|
328746
|
-
alias: "cd",
|
328747
|
-
envKey: "SETTLEMINT_CUSTOM_DEPLOYMENT",
|
328748
|
-
pauseFunction: async (settlemint, id) => {
|
328749
|
-
return settlemint.customDeployment.pause(id);
|
328750
|
-
}
|
328751
|
-
});
|
328752
|
-
}
|
328753
|
-
|
328754
|
-
// src/commands/platform/insights/blockscout/pause.ts
|
328755
|
-
function blockscoutPauseCommand() {
|
328756
|
-
return getPauseCommand({
|
328757
|
-
name: "blockscout",
|
328758
|
-
type: "insights",
|
328759
|
-
alias: "bs",
|
328760
|
-
envKey: "SETTLEMINT_BLOCKSCOUT",
|
328761
|
-
pauseFunction: async (settlemint, id) => {
|
328762
|
-
return settlemint.insights.pause(id);
|
328763
|
-
}
|
328764
|
-
});
|
328765
|
-
}
|
328766
|
-
|
328767
|
-
// src/commands/platform/insights/pause.ts
|
328768
|
-
function insightsPauseCommand() {
|
328769
|
-
return new Command("insights").alias("in").description("Pause an insights service in the SettleMint platform").addCommand(blockscoutPauseCommand());
|
328770
|
-
}
|
328771
|
-
|
328772
|
-
// src/commands/platform/integration-tools/hasura/pause.ts
|
328773
|
-
function hasuraPauseCommand() {
|
328774
|
-
return getPauseCommand({
|
328775
|
-
name: "hasura",
|
328776
|
-
type: "integration tool",
|
328777
|
-
alias: "ha",
|
328778
|
-
envKey: "SETTLEMINT_HASURA",
|
328779
|
-
pauseFunction: async (settlemint, id) => {
|
328780
|
-
return settlemint.integrationTool.pause(id);
|
328781
|
-
}
|
328782
|
-
});
|
328783
|
-
}
|
328784
|
-
|
328785
|
-
// src/commands/platform/integration-tools/pause.ts
|
328786
|
-
function integrationToolPauseCommand() {
|
328787
|
-
return new Command("integration-tool").alias("it").description("Pause an integration tool service in the SettleMint platform").addCommand(hasuraPauseCommand());
|
328788
|
-
}
|
328789
|
-
|
328790
|
-
// src/commands/platform/load-balancer/pause.ts
|
328791
|
-
function loadBalancerPauseCommand() {
|
328792
|
-
return getPauseCommand({
|
328793
|
-
name: "evm",
|
328794
|
-
type: "load balancer",
|
328795
|
-
alias: "lb",
|
328796
|
-
envKey: "SETTLEMINT_BLOCKCHAIN_NODE_OR_LOAD_BALANCER",
|
328797
|
-
pauseFunction: async (settlemint, id) => {
|
328798
|
-
return settlemint.loadBalancer.pause(id);
|
328799
|
-
}
|
328800
|
-
});
|
328801
|
-
}
|
328802
|
-
|
328803
|
-
// src/commands/platform/middleware/graph/pause.ts
|
328804
|
-
function graphMiddlewarePauseCommand() {
|
328805
|
-
return getPauseCommand({
|
328806
|
-
name: "graph",
|
328807
|
-
type: "middleware",
|
328808
|
-
alias: "gr",
|
328809
|
-
envKey: "SETTLEMINT_THEGRAPH",
|
328810
|
-
pauseFunction: async (settlemint, id) => {
|
328811
|
-
return settlemint.middleware.pause(id);
|
328812
|
-
}
|
328813
|
-
});
|
328814
|
-
}
|
328815
|
-
|
328816
|
-
// src/commands/platform/middleware/smart-contract-portal/pause.ts
|
328817
|
-
function smartContractPortalMiddlewarePauseCommand() {
|
328818
|
-
return getPauseCommand({
|
328819
|
-
name: "smart-contract-portal",
|
328820
|
-
type: "middleware",
|
328821
|
-
alias: "scp",
|
328822
|
-
envKey: "SETTLEMINT_PORTAL",
|
328823
|
-
pauseFunction: async (settlemint, id) => {
|
328824
|
-
return settlemint.middleware.pause(id);
|
328825
|
-
}
|
328826
|
-
});
|
328827
|
-
}
|
328828
|
-
|
328829
|
-
// src/commands/platform/middleware/pause.ts
|
328830
|
-
function middlewarePauseCommand() {
|
328831
|
-
return new Command("middleware").alias("mw").description("Pause a middleware service in the SettleMint platform").addCommand(graphMiddlewarePauseCommand()).addCommand(smartContractPortalMiddlewarePauseCommand());
|
328832
|
-
}
|
328833
|
-
|
328834
|
-
// src/commands/platform/private-key/pause.ts
|
328835
|
-
function privateKeyPauseCommand() {
|
328836
|
-
return getPauseCommand({
|
328837
|
-
name: "private-key",
|
328838
|
-
type: "private key",
|
328839
|
-
alias: "pk",
|
328840
|
-
envKey: "SETTLEMINT_ACCESSIBLE_PRIVATE_KEY",
|
328841
|
-
pauseFunction: async (settlemint, id) => {
|
328842
|
-
return settlemint.privateKey.pause(id);
|
328843
|
-
}
|
328844
|
-
});
|
328845
|
-
}
|
328846
|
-
|
328847
|
-
// src/commands/platform/storage/ipfs/pause.ts
|
328848
|
-
function ipfsStoragePauseCommand() {
|
328849
|
-
return getPauseCommand({
|
328850
|
-
name: "ipfs",
|
328851
|
-
type: "storage",
|
328852
|
-
alias: "ip",
|
328853
|
-
envKey: "SETTLEMINT_IPFS",
|
328854
|
-
pauseFunction: async (settlemint, id) => {
|
328855
|
-
return settlemint.storage.pause(id);
|
328856
|
-
}
|
328857
|
-
});
|
328858
|
-
}
|
328859
|
-
|
328860
|
-
// src/commands/platform/storage/minio/pause.ts
|
328861
|
-
function minioStoragePauseCommand() {
|
328862
|
-
return getPauseCommand({
|
328863
|
-
name: "minio",
|
328864
|
-
type: "storage",
|
328865
|
-
alias: "m",
|
328866
|
-
envKey: "SETTLEMINT_MINIO",
|
328867
|
-
pauseFunction: async (settlemint, id) => {
|
328868
|
-
return settlemint.storage.pause(id);
|
328869
|
-
}
|
328870
|
-
});
|
328871
|
-
}
|
328872
|
-
|
328873
|
-
// src/commands/platform/storage/pause.ts
|
328874
|
-
function storagePauseCommand() {
|
328875
|
-
return new Command("storage").alias("st").description("Pause a storage service in the SettleMint platform").addCommand(ipfsStoragePauseCommand()).addCommand(minioStoragePauseCommand());
|
328876
|
-
}
|
328877
|
-
|
328878
|
-
// src/commands/platform/pause.ts
|
328879
|
-
function pauseCommand() {
|
328880
|
-
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());
|
328881
|
-
return cmd2;
|
328882
|
-
}
|
328883
|
-
|
328884
327951
|
// src/commands/platform/common/restart-command.ts
|
328885
327952
|
function getRestartCommand({
|
328886
327953
|
name: name3,
|
328887
327954
|
type: type4,
|
327955
|
+
subType,
|
328888
327956
|
alias,
|
328889
327957
|
envKey,
|
328890
327958
|
restartFunction,
|
328891
327959
|
usePersonalAccessToken = true
|
328892
327960
|
}) {
|
328893
327961
|
const commandName = sanitizeCommandName(name3);
|
328894
|
-
const typeCommandName = sanitizeCommandName(type4);
|
328895
|
-
const exampleCommandPrefix = `platform restart ${typeCommandName !== commandName ? `${typeCommandName} ` : ""}${commandName}`;
|
328896
327962
|
return new Command(commandName).alias(alias).description(`Restart a ${type4} in the SettleMint platform. Provide the ${type4} unique name or use 'default' to restart the default ${type4} from your .env file.`).usage(createExamples([
|
328897
327963
|
{
|
328898
|
-
description: `Restarts the specified ${type4} by
|
328899
|
-
command:
|
327964
|
+
description: `Restarts the specified ${type4} by id`,
|
327965
|
+
command: `platform restart ${commandName}${subType ? ` ${subType}` : ""} <${type4}-id>`
|
328900
327966
|
},
|
328901
327967
|
{
|
328902
327968
|
description: `Restarts the default ${type4} in the production environment`,
|
328903
|
-
command:
|
327969
|
+
command: `platform restart ${commandName}${subType ? ` ${subType}` : ""} default --prod`
|
328904
327970
|
}
|
328905
327971
|
])).argument("<unique-name>", `The unique name of the ${type4}, use 'default' to restart the default one from your .env file`).option("-a, --accept-defaults", "Accept the default and previously set values").option("--prod", "Connect to your production environment").option("-w, --wait", "Wait until restarted").action(async (uniqueName, { acceptDefaults, prod, wait: wait2 }) => {
|
328906
327972
|
intro(`Restarting ${type4} in the SettleMint platform`);
|
@@ -328987,6 +328053,7 @@ function blockscoutRestartCommand() {
|
|
328987
328053
|
return getRestartCommand({
|
328988
328054
|
name: "blockscout",
|
328989
328055
|
type: "insights",
|
328056
|
+
subType: "blockscout",
|
328990
328057
|
alias: "bs",
|
328991
328058
|
envKey: "SETTLEMINT_BLOCKSCOUT",
|
328992
328059
|
restartFunction: async (settlemint, uniqueName) => {
|
@@ -329005,6 +328072,7 @@ function hasuraRestartCommand() {
|
|
329005
328072
|
return getRestartCommand({
|
329006
328073
|
name: "hasura",
|
329007
328074
|
type: "integration tool",
|
328075
|
+
subType: "hasura",
|
329008
328076
|
alias: "ha",
|
329009
328077
|
envKey: "SETTLEMINT_HASURA",
|
329010
328078
|
restartFunction: async (settlemint, uniqueName) => {
|
@@ -329036,6 +328104,7 @@ function graphRestartCommand() {
|
|
329036
328104
|
return getRestartCommand({
|
329037
328105
|
name: "graph",
|
329038
328106
|
type: "middleware",
|
328107
|
+
subType: "graph",
|
329039
328108
|
alias: "gr",
|
329040
328109
|
envKey: "SETTLEMINT_THEGRAPH",
|
329041
328110
|
restartFunction: async (settlemint, id) => {
|
@@ -329049,6 +328118,7 @@ function smartContractPortalRestartCommand() {
|
|
329049
328118
|
return getRestartCommand({
|
329050
328119
|
name: "smart-contract-portal",
|
329051
328120
|
type: "middleware",
|
328121
|
+
subType: "smart-contract-portal",
|
329052
328122
|
alias: "scp",
|
329053
328123
|
envKey: "SETTLEMINT_PORTAL",
|
329054
328124
|
restartFunction: async (settlemint, uniqueName) => {
|
@@ -329099,236 +328169,6 @@ function restartCommand() {
|
|
329099
328169
|
return cmd2;
|
329100
328170
|
}
|
329101
328171
|
|
329102
|
-
// src/commands/platform/common/resume-command.ts
|
329103
|
-
function getResumeCommand({
|
329104
|
-
name: name3,
|
329105
|
-
type: type4,
|
329106
|
-
alias,
|
329107
|
-
envKey,
|
329108
|
-
resumeFunction,
|
329109
|
-
usePersonalAccessToken = true
|
329110
|
-
}) {
|
329111
|
-
const commandName = sanitizeCommandName(name3);
|
329112
|
-
const typeCommandName = sanitizeCommandName(type4);
|
329113
|
-
const exampleCommandPrefix = `platform resume ${typeCommandName !== commandName ? `${typeCommandName} ` : ""}${commandName}`;
|
329114
|
-
return new Command(commandName).alias(alias).description(`Resume a ${type4} in the SettleMint platform. Provide the ${type4} unique name or use 'default' to resume the default ${type4} from your .env file.`).usage(createExamples([
|
329115
|
-
{
|
329116
|
-
description: `Resumes the specified ${type4} by unique name`,
|
329117
|
-
command: `${exampleCommandPrefix} <unique-name>`
|
329118
|
-
},
|
329119
|
-
{
|
329120
|
-
description: `Resumes the default ${type4} in the production environment`,
|
329121
|
-
command: `${exampleCommandPrefix} default --prod`
|
329122
|
-
}
|
329123
|
-
])).argument("<unique-name>", `The unique name of the ${type4}, use 'default' to resume the default one from your .env file`).option("-a, --accept-defaults", "Accept the default and previously set values").option("--prod", "Connect to your production environment").option("-w, --wait", "Wait until resumed").action(async (uniqueName, { acceptDefaults, prod, wait: wait2 }) => {
|
329124
|
-
intro(`Resuming ${type4} in the SettleMint platform`);
|
329125
|
-
const env2 = await loadEnv(false, !!prod);
|
329126
|
-
const instance = await instancePrompt({ env: env2, accept: acceptDefaults });
|
329127
|
-
const accessToken = await getApplicationOrPersonalAccessToken({
|
329128
|
-
env: env2,
|
329129
|
-
instance,
|
329130
|
-
prefer: usePersonalAccessToken ? "personal" : "application"
|
329131
|
-
});
|
329132
|
-
const settlemint = createSettleMintClient({
|
329133
|
-
accessToken,
|
329134
|
-
instance
|
329135
|
-
});
|
329136
|
-
const isDefaultUniqueName = uniqueName === "default";
|
329137
|
-
const serviceUniqueName = isDefaultUniqueName ? typeof env2[envKey] === "string" ? env2[envKey] : null : uniqueName;
|
329138
|
-
if (!serviceUniqueName) {
|
329139
|
-
cancel2(`No default ${type4} found in your .env file. Please provide a valid ${type4} unique name or set a default ${type4} first.`);
|
329140
|
-
}
|
329141
|
-
const result = await spinner({
|
329142
|
-
startMessage: `Resuming ${type4}`,
|
329143
|
-
task: async () => {
|
329144
|
-
return resumeFunction(settlemint, serviceUniqueName);
|
329145
|
-
},
|
329146
|
-
stopMessage: `${capitalizeFirstLetter2(type4)} resume initiated`
|
329147
|
-
});
|
329148
|
-
if (wait2) {
|
329149
|
-
const isResumed = await waitForCompletion({
|
329150
|
-
settlemint,
|
329151
|
-
type: type4,
|
329152
|
-
uniqueName: serviceUniqueName,
|
329153
|
-
action: "resume"
|
329154
|
-
});
|
329155
|
-
if (!isResumed) {
|
329156
|
-
throw new Error(`Failed to resume ${type4} ${serviceUniqueName}`);
|
329157
|
-
}
|
329158
|
-
}
|
329159
|
-
outro(`${capitalizeFirstLetter2(type4)} ${result.name} resume initiated successfully`);
|
329160
|
-
});
|
329161
|
-
}
|
329162
|
-
|
329163
|
-
// src/commands/platform/blockchain-network/resume.ts
|
329164
|
-
function blockchainNetworkResumeCommand() {
|
329165
|
-
return getResumeCommand({
|
329166
|
-
name: "blockchain-network",
|
329167
|
-
type: "blockchain network",
|
329168
|
-
alias: "bnw",
|
329169
|
-
envKey: "SETTLEMINT_BLOCKCHAIN_NETWORK",
|
329170
|
-
resumeFunction: async (settlemint, id) => {
|
329171
|
-
return settlemint.blockchainNetwork.resume(id);
|
329172
|
-
}
|
329173
|
-
});
|
329174
|
-
}
|
329175
|
-
|
329176
|
-
// src/commands/platform/blockchain-node/resume.ts
|
329177
|
-
function blockchainNodeResumeCommand() {
|
329178
|
-
return getResumeCommand({
|
329179
|
-
name: "blockchain-node",
|
329180
|
-
type: "blockchain node",
|
329181
|
-
alias: "bn",
|
329182
|
-
envKey: "SETTLEMINT_BLOCKCHAIN_NODE",
|
329183
|
-
resumeFunction: async (settlemint, id) => {
|
329184
|
-
return settlemint.blockchainNode.resume(id);
|
329185
|
-
}
|
329186
|
-
});
|
329187
|
-
}
|
329188
|
-
|
329189
|
-
// src/commands/platform/custom-deployments/resume.ts
|
329190
|
-
function customDeploymentResumeCommand() {
|
329191
|
-
return getResumeCommand({
|
329192
|
-
name: "custom-deployment",
|
329193
|
-
type: "custom deployment",
|
329194
|
-
alias: "cd",
|
329195
|
-
envKey: "SETTLEMINT_CUSTOM_DEPLOYMENT",
|
329196
|
-
resumeFunction: async (settlemint, id) => {
|
329197
|
-
return settlemint.customDeployment.resume(id);
|
329198
|
-
}
|
329199
|
-
});
|
329200
|
-
}
|
329201
|
-
|
329202
|
-
// src/commands/platform/insights/blockscout/resume.ts
|
329203
|
-
function blockscoutResumeCommand() {
|
329204
|
-
return getResumeCommand({
|
329205
|
-
name: "blockscout",
|
329206
|
-
type: "insights",
|
329207
|
-
alias: "bs",
|
329208
|
-
envKey: "SETTLEMINT_BLOCKSCOUT",
|
329209
|
-
resumeFunction: async (settlemint, id) => {
|
329210
|
-
return settlemint.insights.resume(id);
|
329211
|
-
}
|
329212
|
-
});
|
329213
|
-
}
|
329214
|
-
|
329215
|
-
// src/commands/platform/insights/resume.ts
|
329216
|
-
function insightsResumeCommand() {
|
329217
|
-
return new Command("insights").alias("in").description("Resume an insights service in the SettleMint platform").addCommand(blockscoutResumeCommand());
|
329218
|
-
}
|
329219
|
-
|
329220
|
-
// src/commands/platform/integration-tools/hasura/resume.ts
|
329221
|
-
function hasuraResumeCommand() {
|
329222
|
-
return getResumeCommand({
|
329223
|
-
name: "hasura",
|
329224
|
-
type: "integration tool",
|
329225
|
-
alias: "ha",
|
329226
|
-
envKey: "SETTLEMINT_HASURA",
|
329227
|
-
resumeFunction: async (settlemint, id) => {
|
329228
|
-
return settlemint.integrationTool.resume(id);
|
329229
|
-
}
|
329230
|
-
});
|
329231
|
-
}
|
329232
|
-
|
329233
|
-
// src/commands/platform/integration-tools/resume.ts
|
329234
|
-
function integrationToolResumeCommand() {
|
329235
|
-
return new Command("integration-tool").alias("it").description("Resume an integration tool service in the SettleMint platform").addCommand(hasuraResumeCommand());
|
329236
|
-
}
|
329237
|
-
|
329238
|
-
// src/commands/platform/load-balancer/resume.ts
|
329239
|
-
function loadBalancerResumeCommand() {
|
329240
|
-
return getResumeCommand({
|
329241
|
-
name: "load-balancer",
|
329242
|
-
type: "load balancer",
|
329243
|
-
alias: "lb",
|
329244
|
-
envKey: "SETTLEMINT_BLOCKCHAIN_NODE_OR_LOAD_BALANCER",
|
329245
|
-
resumeFunction: async (settlemint, id) => {
|
329246
|
-
return settlemint.loadBalancer.resume(id);
|
329247
|
-
}
|
329248
|
-
});
|
329249
|
-
}
|
329250
|
-
|
329251
|
-
// src/commands/platform/middleware/graph/resume.ts
|
329252
|
-
function graphMiddlewareResumeCommand() {
|
329253
|
-
return getResumeCommand({
|
329254
|
-
name: "graph",
|
329255
|
-
type: "middleware",
|
329256
|
-
alias: "gr",
|
329257
|
-
envKey: "SETTLEMINT_THEGRAPH",
|
329258
|
-
resumeFunction: async (settlemint, id) => {
|
329259
|
-
return settlemint.middleware.resume(id);
|
329260
|
-
}
|
329261
|
-
});
|
329262
|
-
}
|
329263
|
-
|
329264
|
-
// src/commands/platform/middleware/smart-contract-portal/resume.ts
|
329265
|
-
function smartContractPortalMiddlewareResumeCommand() {
|
329266
|
-
return getResumeCommand({
|
329267
|
-
name: "smart-contract-portal",
|
329268
|
-
type: "middleware",
|
329269
|
-
alias: "scp",
|
329270
|
-
envKey: "SETTLEMINT_PORTAL",
|
329271
|
-
resumeFunction: async (settlemint, id) => {
|
329272
|
-
return settlemint.middleware.resume(id);
|
329273
|
-
}
|
329274
|
-
});
|
329275
|
-
}
|
329276
|
-
|
329277
|
-
// src/commands/platform/middleware/resume.ts
|
329278
|
-
function middlewareResumeCommand() {
|
329279
|
-
return new Command("middleware").alias("mw").description("Resume a middleware service in the SettleMint platform").addCommand(graphMiddlewareResumeCommand()).addCommand(smartContractPortalMiddlewareResumeCommand());
|
329280
|
-
}
|
329281
|
-
|
329282
|
-
// src/commands/platform/private-key/resume.ts
|
329283
|
-
function privateKeyResumeCommand() {
|
329284
|
-
return getResumeCommand({
|
329285
|
-
name: "private-key",
|
329286
|
-
type: "private key",
|
329287
|
-
alias: "pk",
|
329288
|
-
envKey: "SETTLEMINT_ACCESSIBLE_PRIVATE_KEY",
|
329289
|
-
resumeFunction: async (settlemint, id) => {
|
329290
|
-
return settlemint.privateKey.resume(id);
|
329291
|
-
}
|
329292
|
-
});
|
329293
|
-
}
|
329294
|
-
|
329295
|
-
// src/commands/platform/storage/ipfs/resume.ts
|
329296
|
-
function ipfsStorageResumeCommand() {
|
329297
|
-
return getResumeCommand({
|
329298
|
-
name: "ipfs",
|
329299
|
-
type: "storage",
|
329300
|
-
alias: "ip",
|
329301
|
-
envKey: "SETTLEMINT_IPFS",
|
329302
|
-
resumeFunction: async (settlemint, id) => {
|
329303
|
-
return settlemint.storage.resume(id);
|
329304
|
-
}
|
329305
|
-
});
|
329306
|
-
}
|
329307
|
-
|
329308
|
-
// src/commands/platform/storage/minio/resume.ts
|
329309
|
-
function minioStorageResumeCommand() {
|
329310
|
-
return getResumeCommand({
|
329311
|
-
name: "minio",
|
329312
|
-
type: "storage",
|
329313
|
-
alias: "m",
|
329314
|
-
envKey: "SETTLEMINT_MINIO",
|
329315
|
-
resumeFunction: async (settlemint, id) => {
|
329316
|
-
return settlemint.storage.resume(id);
|
329317
|
-
}
|
329318
|
-
});
|
329319
|
-
}
|
329320
|
-
|
329321
|
-
// src/commands/platform/storage/resume.ts
|
329322
|
-
function storageResumeCommand() {
|
329323
|
-
return new Command("storage").alias("st").description("Resume a storage service in the SettleMint platform").addCommand(ipfsStorageResumeCommand()).addCommand(minioStorageResumeCommand());
|
329324
|
-
}
|
329325
|
-
|
329326
|
-
// src/commands/platform/resume.ts
|
329327
|
-
function resumeCommand() {
|
329328
|
-
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());
|
329329
|
-
return cmd2;
|
329330
|
-
}
|
329331
|
-
|
329332
328172
|
// src/commands/platform/custom-deployments/update.ts
|
329333
328173
|
function customDeploymentsUpdateCommand() {
|
329334
328174
|
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([
|
@@ -329393,7 +328233,7 @@ function jsonOutput(data) {
|
|
329393
328233
|
var composer = require_composer();
|
329394
328234
|
var Document = require_Document();
|
329395
328235
|
var Schema = require_Schema();
|
329396
|
-
var
|
328236
|
+
var errors4 = require_errors3();
|
329397
328237
|
var Alias = require_Alias();
|
329398
328238
|
var identity2 = require_identity();
|
329399
328239
|
var Pair = require_Pair();
|
@@ -329409,9 +328249,9 @@ var visit2 = require_visit();
|
|
329409
328249
|
var $Composer = composer.Composer;
|
329410
328250
|
var $Document = Document.Document;
|
329411
328251
|
var $Schema = Schema.Schema;
|
329412
|
-
var $YAMLError =
|
329413
|
-
var $YAMLParseError =
|
329414
|
-
var $YAMLWarning =
|
328252
|
+
var $YAMLError = errors4.YAMLError;
|
328253
|
+
var $YAMLParseError = errors4.YAMLParseError;
|
328254
|
+
var $YAMLWarning = errors4.YAMLWarning;
|
329415
328255
|
var $Alias = Alias.Alias;
|
329416
328256
|
var $isAlias = identity2.isAlias;
|
329417
328257
|
var $isCollection = identity2.isCollection;
|
@@ -329719,7 +328559,7 @@ function servicesCommand() {
|
|
329719
328559
|
if (!applicationUniqueName) {
|
329720
328560
|
return nothingSelectedError("application");
|
329721
328561
|
}
|
329722
|
-
let effectiveTypes;
|
328562
|
+
let effectiveTypes = undefined;
|
329723
328563
|
if (options.type && options.type.length > 0) {
|
329724
328564
|
effectiveTypes = options.type;
|
329725
328565
|
} else if (typeOperands && typeOperands.length > 0) {
|
@@ -329777,7 +328617,7 @@ async function getServicesAndMapResults({
|
|
329777
328617
|
const application = await settlemint.application.read(applicationUniqueName);
|
329778
328618
|
const services = await servicesSpinner(settlemint, applicationUniqueName, types4);
|
329779
328619
|
const results = (types4 ?? SERVICE_TYPES).filter((serviceType) => !types4 || types4.includes(serviceType)).map((serviceType) => {
|
329780
|
-
const [_6, labels] = Object.entries(LABELS_MAP).find(([
|
328620
|
+
const [_6, labels] = Object.entries(LABELS_MAP).find(([key2, value4]) => value4.command === serviceType) ?? [
|
329781
328621
|
null,
|
329782
328622
|
{ plural: serviceType }
|
329783
328623
|
];
|
@@ -329904,7 +328744,7 @@ function listCommand() {
|
|
329904
328744
|
|
329905
328745
|
// src/commands/platform.ts
|
329906
328746
|
function platformCommand() {
|
329907
|
-
return new Command("platform").description("Manage SettleMint platform resources").addCommand(configCommand()).addCommand(createCommand3()).addCommand(deleteCommand()).addCommand(listCommand()).addCommand(
|
328747
|
+
return new Command("platform").description("Manage SettleMint platform resources").addCommand(configCommand()).addCommand(createCommand3()).addCommand(deleteCommand()).addCommand(listCommand()).addCommand(restartCommand()).addCommand(updateCommand());
|
329908
328748
|
}
|
329909
328749
|
|
329910
328750
|
// src/commands/smart-contract-set/create.ts
|
@@ -329954,7 +328794,7 @@ var import_which = __toESM(require_lib5(), 1);
|
|
329954
328794
|
async function executeFoundryCommand(command, args) {
|
329955
328795
|
try {
|
329956
328796
|
await import_which.default(command);
|
329957
|
-
} catch (
|
328797
|
+
} catch (error45) {
|
329958
328798
|
cancel2("Foundry is not installed. Instructions to install Foundry can be found here: https://book.getfoundry.sh/getting-started/installation");
|
329959
328799
|
}
|
329960
328800
|
return executeCommand(command, args);
|
@@ -330018,11 +328858,11 @@ function createCommand4() {
|
|
330018
328858
|
|
330019
328859
|
// src/utils/commands/passthrough-options.ts
|
330020
328860
|
function mapPassthroughOptions(options, command) {
|
330021
|
-
const optionArgs = Object.entries(options).map(([
|
328861
|
+
const optionArgs = Object.entries(options).map(([key2, value4]) => {
|
330022
328862
|
if (value4 === true) {
|
330023
|
-
return `--${
|
328863
|
+
return `--${key2}`;
|
330024
328864
|
}
|
330025
|
-
return `--${
|
328865
|
+
return `--${key2}=${value4}`;
|
330026
328866
|
});
|
330027
328867
|
return [...optionArgs, ...command.args];
|
330028
328868
|
}
|
@@ -330042,7 +328882,7 @@ function foundryBuildCommand() {
|
|
330042
328882
|
description: "Build the smart contracts with additional Forge options",
|
330043
328883
|
command: "scs foundry build --optimize --force"
|
330044
328884
|
}
|
330045
|
-
])).helpOption(false).option("-h, --help", "Get list of possible forge options").passThroughOptions().allowUnknownOption(true).arguments("[operands...]").action(async (operands, options,
|
328885
|
+
])).helpOption(false).option("-h, --help", "Get list of possible forge options").passThroughOptions().allowUnknownOption(true).arguments("[operands...]").action(async (operands, options, cmd2) => {
|
330046
328886
|
intro("Building smart contracts using Foundry");
|
330047
328887
|
const forgeOptions = mapPassthroughOptions(options, { args: operands });
|
330048
328888
|
await executeFoundryCommand("forge", ["build", ...forgeOptions]);
|
@@ -330065,7 +328905,7 @@ function foundryFormatCommand() {
|
|
330065
328905
|
description: "Format the smart contracts with additional Forge options",
|
330066
328906
|
command: "scs foundry format --check"
|
330067
328907
|
}
|
330068
|
-
])).helpOption(false).option("-h, --help", "Get list of possible forge options").passThroughOptions().allowUnknownOption(true).arguments("[operands...]").action(async (operands, options,
|
328908
|
+
])).helpOption(false).option("-h, --help", "Get list of possible forge options").passThroughOptions().allowUnknownOption(true).arguments("[operands...]").action(async (operands, options, cmd2) => {
|
330069
328909
|
intro("Formatting smart contracts using Foundry");
|
330070
328910
|
const forgeOptions = mapPassthroughOptions(options, { args: operands });
|
330071
328911
|
await executeFoundryCommand("forge", ["fmt", ...forgeOptions]);
|
@@ -330088,7 +328928,7 @@ function foundryNetworkCommand() {
|
|
330088
328928
|
description: "Start a development network using Foundry with a specific port",
|
330089
328929
|
command: "scs foundry network --port 3000"
|
330090
328930
|
}
|
330091
|
-
])).helpOption(false).option("-h, --help", "Get list of possible anvil options").passThroughOptions().allowUnknownOption(true).arguments("[operands...]").action(async (operands, options,
|
328931
|
+
])).helpOption(false).option("-h, --help", "Get list of possible anvil options").passThroughOptions().allowUnknownOption(true).arguments("[operands...]").action(async (operands, options, cmd2) => {
|
330092
328932
|
const anvilOptions = mapPassthroughOptions(options, { args: operands });
|
330093
328933
|
await executeFoundryCommand("anvil", anvilOptions);
|
330094
328934
|
});
|
@@ -330109,7 +328949,7 @@ function foundryTestCommand() {
|
|
330109
328949
|
description: "Run a specific test function",
|
330110
328950
|
command: "scs foundry test --match-test testToken"
|
330111
328951
|
}
|
330112
|
-
])).helpOption(false).option("-h, --help", "Get list of possible forge options").passThroughOptions().allowUnknownOption(true).arguments("[operands...]").action(async (operands, options,
|
328952
|
+
])).helpOption(false).option("-h, --help", "Get list of possible forge options").passThroughOptions().allowUnknownOption(true).arguments("[operands...]").action(async (operands, options, cmd2) => {
|
330113
328953
|
intro("Running smart contract tests using Foundry");
|
330114
328954
|
const forgeOptions = mapPassthroughOptions(options, { args: operands });
|
330115
328955
|
await executeFoundryCommand("forge", ["test", ...forgeOptions]);
|
@@ -330123,7 +328963,7 @@ var validateIfRequiredPackagesAreInstalled = async (packages, cwd2) => {
|
|
330123
328963
|
try {
|
330124
328964
|
const isInstalled = await isPackageInstalled(pkg, cwd2);
|
330125
328965
|
return { packageName: pkg, isInstalled };
|
330126
|
-
} catch (
|
328966
|
+
} catch (err) {
|
330127
328967
|
return { packageName: pkg, isInstalled: false };
|
330128
328968
|
}
|
330129
328969
|
}));
|
@@ -330148,7 +328988,7 @@ function hardhatBuildCommand() {
|
|
330148
328988
|
description: "Build the smart contracts using additional options to the Hardhat compile command",
|
330149
328989
|
command: "scs hardhat build --concurrency 2"
|
330150
328990
|
}
|
330151
|
-
])).helpOption(false).option("-h, --help", "Get list of possible hardhat compile options").passThroughOptions().allowUnknownOption(true).arguments("[operands...]").action(async (operands, options,
|
328991
|
+
])).helpOption(false).option("-h, --help", "Get list of possible hardhat compile options").passThroughOptions().allowUnknownOption(true).arguments("[operands...]").action(async (operands, options, cmd2) => {
|
330152
328992
|
intro("Building smart contracts using Hardhat");
|
330153
328993
|
await validateIfRequiredPackagesAreInstalled(["hardhat"]);
|
330154
328994
|
const hardhatOptions = mapPassthroughOptions(options, { args: operands });
|
@@ -330219,7 +329059,7 @@ async function selectTargetNode({
|
|
330219
329059
|
settlemint
|
330220
329060
|
}) {
|
330221
329061
|
const nodeUniqueName = blockchainNodeUniqueName ?? (autoAccept ? env2.SETTLEMINT_BLOCKCHAIN_NODE : undefined);
|
330222
|
-
let node;
|
329062
|
+
let node = undefined;
|
330223
329063
|
if (!nodeUniqueName) {
|
330224
329064
|
if (!env2.SETTLEMINT_APPLICATION) {
|
330225
329065
|
return missingApplication();
|
@@ -330443,7 +329283,7 @@ function hardhatDeployRemoteCommand() {
|
|
330443
329283
|
} else {
|
330444
329284
|
note("Smart contract deployment was cancelled");
|
330445
329285
|
}
|
330446
|
-
} catch (
|
329286
|
+
} catch (error45) {
|
330447
329287
|
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.");
|
330448
329288
|
}
|
330449
329289
|
});
|
@@ -330473,7 +329313,7 @@ function hardhatNetworkCommand() {
|
|
330473
329313
|
description: "Start a development network using Hardhat with a specific port",
|
330474
329314
|
command: "scs hardhat network --port 3000"
|
330475
329315
|
}
|
330476
|
-
])).helpOption(false).option("-h, --help", "Get list of possible hardhat node options").passThroughOptions().allowUnknownOption(true).arguments("[operands...]").action(async (operands, options,
|
329316
|
+
])).helpOption(false).option("-h, --help", "Get list of possible hardhat node options").passThroughOptions().allowUnknownOption(true).arguments("[operands...]").action(async (operands, options, cmd2) => {
|
330477
329317
|
intro("Starting development network using Hardhat");
|
330478
329318
|
await validateIfRequiredPackagesAreInstalled(["hardhat"]);
|
330479
329319
|
const hardhatOptions = mapPassthroughOptions(options, { args: operands });
|
@@ -330582,7 +329422,7 @@ function hardhatTestCommand() {
|
|
330582
329422
|
description: "Run a specific test file",
|
330583
329423
|
command: "scs hardhat test test/token.test.ts"
|
330584
329424
|
}
|
330585
|
-
])).helpOption(false).option("-h, --help", "Get list of possible hardhat test options").passThroughOptions().allowUnknownOption(true).arguments("[operands...]").action(async (operands, options,
|
329425
|
+
])).helpOption(false).option("-h, --help", "Get list of possible hardhat test options").passThroughOptions().allowUnknownOption(true).arguments("[operands...]").action(async (operands, options, cmd2) => {
|
330586
329426
|
intro("Running smart contract tests using Hardhat");
|
330587
329427
|
await validateIfRequiredPackagesAreInstalled(["hardhat"]);
|
330588
329428
|
const hardhatOptions = mapPassthroughOptions(options, { args: operands });
|
@@ -330840,12 +329680,12 @@ async function getNodeName({
|
|
330840
329680
|
|
330841
329681
|
// src/commands/smart-contract-set/subgraph/build.ts
|
330842
329682
|
function subgraphBuildCommand() {
|
330843
|
-
return new Command("build").description("Build the subgraph").
|
329683
|
+
return new Command("build").description("Build the subgraph").usage(createExamples([
|
330844
329684
|
{
|
330845
329685
|
description: "Build the subgraph",
|
330846
329686
|
command: "scs subgraph build"
|
330847
329687
|
}
|
330848
|
-
])).action(async (
|
329688
|
+
])).action(async () => {
|
330849
329689
|
intro("Building subgraph");
|
330850
329690
|
await validateIfRequiredPackagesAreInstalled(["@graphprotocol/graph-cli"]);
|
330851
329691
|
await subgraphSetup({
|
@@ -330854,7 +329694,7 @@ function subgraphBuildCommand() {
|
|
330854
329694
|
const { command, args } = await getPackageManagerExecutable();
|
330855
329695
|
const subgraphYamlFile = await getSubgraphYamlFile();
|
330856
329696
|
await executeCommand(command, [...args, "graph", "codegen", subgraphYamlFile]);
|
330857
|
-
await executeCommand(command, [...args, "graph", "build",
|
329697
|
+
await executeCommand(command, [...args, "graph", "build", subgraphYamlFile]);
|
330858
329698
|
outro("Subgraph built successfully");
|
330859
329699
|
});
|
330860
329700
|
}
|
@@ -331250,4 +330090,4 @@ async function sdkCliCommand(argv = process.argv) {
|
|
331250
330090
|
// src/cli.ts
|
331251
330091
|
sdkCliCommand();
|
331252
330092
|
|
331253
|
-
//# debugId=
|
330093
|
+
//# debugId=5BDC28DD8973A77B64756E2164756E21
|