@settlemint/sdk-cli 2.4.0-pr5aacfff3 → 2.4.0-pr5e77a5ab
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 +463 -913
- package/dist/cli.js.map +8 -22
- package/package.json +8 -8
package/dist/cli.js
CHANGED
@@ -161742,7 +161742,7 @@ ${lanes.join(`
|
|
161742
161742
|
function generateOptionOutput(sys2, option, rightAlignOfLeft, leftAlignOfRight) {
|
161743
161743
|
var _a;
|
161744
161744
|
const text = [];
|
161745
|
-
const
|
161745
|
+
const colors3 = createColors(sys2);
|
161746
161746
|
const name2 = getDisplayNameTextOfOption(option);
|
161747
161747
|
const valueCandidates = getValueCandidate(option);
|
161748
161748
|
const defaultValueDescription = typeof option.defaultValueDescription === "object" ? getDiagnosticText(option.defaultValueDescription) : formatDefaultValue(option.defaultValueDescription, option.type === "list" || option.type === "listOrElement" ? option.element.type : option.type);
|
@@ -161763,7 +161763,7 @@ ${lanes.join(`
|
|
161763
161763
|
}
|
161764
161764
|
text.push(sys2.newLine);
|
161765
161765
|
} else {
|
161766
|
-
text.push(
|
161766
|
+
text.push(colors3.blue(name2), sys2.newLine);
|
161767
161767
|
if (option.description) {
|
161768
161768
|
const description3 = getDiagnosticText(option.description);
|
161769
161769
|
text.push(description3);
|
@@ -161808,7 +161808,7 @@ ${lanes.join(`
|
|
161808
161808
|
if (isFirstLine) {
|
161809
161809
|
curLeft = left.padStart(rightAlignOfLeft2);
|
161810
161810
|
curLeft = curLeft.padEnd(leftAlignOfRight2);
|
161811
|
-
curLeft = colorLeft ?
|
161811
|
+
curLeft = colorLeft ? colors3.blue(curLeft) : curLeft;
|
161812
161812
|
} else {
|
161813
161813
|
curLeft = "".padStart(leftAlignOfRight2);
|
161814
161814
|
}
|
@@ -161920,9 +161920,9 @@ ${lanes.join(`
|
|
161920
161920
|
return res;
|
161921
161921
|
}
|
161922
161922
|
function printEasyHelp(sys2, simpleOptions) {
|
161923
|
-
const
|
161923
|
+
const colors3 = createColors(sys2);
|
161924
161924
|
let output = [...getHeader(sys2, `${getDiagnosticText(Diagnostics.tsc_Colon_The_TypeScript_Compiler)} - ${getDiagnosticText(Diagnostics.Version_0, version4)}`)];
|
161925
|
-
output.push(
|
161925
|
+
output.push(colors3.bold(getDiagnosticText(Diagnostics.COMMON_COMMANDS)) + sys2.newLine + sys2.newLine);
|
161926
161926
|
example("tsc", Diagnostics.Compiles_the_current_project_tsconfig_json_in_the_working_directory);
|
161927
161927
|
example("tsc app.ts util.ts", Diagnostics.Ignoring_tsconfig_json_compiles_the_specified_files_with_default_compiler_options);
|
161928
161928
|
example("tsc -b", Diagnostics.Build_a_composite_project_in_the_working_directory);
|
@@ -161943,7 +161943,7 @@ ${lanes.join(`
|
|
161943
161943
|
function example(ex, desc) {
|
161944
161944
|
const examples = typeof ex === "string" ? [ex] : ex;
|
161945
161945
|
for (const example2 of examples) {
|
161946
|
-
output.push(" " +
|
161946
|
+
output.push(" " + colors3.blue(example2) + sys2.newLine);
|
161947
161947
|
}
|
161948
161948
|
output.push(" " + getDiagnosticText(desc) + sys2.newLine + sys2.newLine);
|
161949
161949
|
}
|
@@ -161966,12 +161966,12 @@ ${lanes.join(`
|
|
161966
161966
|
}
|
161967
161967
|
function getHeader(sys2, message) {
|
161968
161968
|
var _a;
|
161969
|
-
const
|
161969
|
+
const colors3 = createColors(sys2);
|
161970
161970
|
const header = [];
|
161971
161971
|
const terminalWidth = ((_a = sys2.getWidthOfTerminal) == null ? undefined : _a.call(sys2)) ?? 0;
|
161972
161972
|
const tsIconLength = 5;
|
161973
|
-
const tsIconFirstLine =
|
161974
|
-
const tsIconSecondLine =
|
161973
|
+
const tsIconFirstLine = colors3.blueBackground("".padStart(tsIconLength));
|
161974
|
+
const tsIconSecondLine = colors3.blueBackground(colors3.brightWhite("TS ".padStart(tsIconLength)));
|
161975
161975
|
if (terminalWidth >= message.length + tsIconLength) {
|
161976
161976
|
const rightAlign = terminalWidth > 120 ? 120 : terminalWidth;
|
161977
161977
|
const leftAlign = rightAlign - tsIconLength;
|
@@ -239297,11 +239297,11 @@ var require_visit = __commonJS((exports) => {
|
|
239297
239297
|
visit2.BREAK = BREAK;
|
239298
239298
|
visit2.SKIP = SKIP;
|
239299
239299
|
visit2.REMOVE = REMOVE;
|
239300
|
-
function visit_(
|
239301
|
-
const ctrl = callVisitor(
|
239300
|
+
function visit_(key3, node, visitor, path7) {
|
239301
|
+
const ctrl = callVisitor(key3, node, visitor, path7);
|
239302
239302
|
if (identity2.isNode(ctrl) || identity2.isPair(ctrl)) {
|
239303
|
-
replaceNode(
|
239304
|
-
return visit_(
|
239303
|
+
replaceNode(key3, path7, ctrl);
|
239304
|
+
return visit_(key3, ctrl, visitor, path7);
|
239305
239305
|
}
|
239306
239306
|
if (typeof ctrl !== "symbol") {
|
239307
239307
|
if (identity2.isCollection(node)) {
|
@@ -239345,11 +239345,11 @@ var require_visit = __commonJS((exports) => {
|
|
239345
239345
|
visitAsync.BREAK = BREAK;
|
239346
239346
|
visitAsync.SKIP = SKIP;
|
239347
239347
|
visitAsync.REMOVE = REMOVE;
|
239348
|
-
async function visitAsync_(
|
239349
|
-
const ctrl = await callVisitor(
|
239348
|
+
async function visitAsync_(key3, node, visitor, path7) {
|
239349
|
+
const ctrl = await callVisitor(key3, node, visitor, path7);
|
239350
239350
|
if (identity2.isNode(ctrl) || identity2.isPair(ctrl)) {
|
239351
|
-
replaceNode(
|
239352
|
-
return visitAsync_(
|
239351
|
+
replaceNode(key3, path7, ctrl);
|
239352
|
+
return visitAsync_(key3, ctrl, visitor, path7);
|
239353
239353
|
}
|
239354
239354
|
if (typeof ctrl !== "symbol") {
|
239355
239355
|
if (identity2.isCollection(node)) {
|
@@ -239399,27 +239399,27 @@ var require_visit = __commonJS((exports) => {
|
|
239399
239399
|
}
|
239400
239400
|
return visitor;
|
239401
239401
|
}
|
239402
|
-
function callVisitor(
|
239402
|
+
function callVisitor(key3, node, visitor, path7) {
|
239403
239403
|
if (typeof visitor === "function")
|
239404
|
-
return visitor(
|
239404
|
+
return visitor(key3, node, path7);
|
239405
239405
|
if (identity2.isMap(node))
|
239406
|
-
return visitor.Map?.(
|
239406
|
+
return visitor.Map?.(key3, node, path7);
|
239407
239407
|
if (identity2.isSeq(node))
|
239408
|
-
return visitor.Seq?.(
|
239408
|
+
return visitor.Seq?.(key3, node, path7);
|
239409
239409
|
if (identity2.isPair(node))
|
239410
|
-
return visitor.Pair?.(
|
239410
|
+
return visitor.Pair?.(key3, node, path7);
|
239411
239411
|
if (identity2.isScalar(node))
|
239412
|
-
return visitor.Scalar?.(
|
239412
|
+
return visitor.Scalar?.(key3, node, path7);
|
239413
239413
|
if (identity2.isAlias(node))
|
239414
|
-
return visitor.Alias?.(
|
239414
|
+
return visitor.Alias?.(key3, node, path7);
|
239415
239415
|
return;
|
239416
239416
|
}
|
239417
|
-
function replaceNode(
|
239417
|
+
function replaceNode(key3, path7, node) {
|
239418
239418
|
const parent = path7[path7.length - 1];
|
239419
239419
|
if (identity2.isCollection(parent)) {
|
239420
|
-
parent.items[
|
239420
|
+
parent.items[key3] = node;
|
239421
239421
|
} else if (identity2.isPair(parent)) {
|
239422
|
-
if (
|
239422
|
+
if (key3 === "key")
|
239423
239423
|
parent.key = node;
|
239424
239424
|
else
|
239425
239425
|
parent.value = node;
|
@@ -239650,7 +239650,7 @@ var require_anchors = __commonJS((exports) => {
|
|
239650
239650
|
|
239651
239651
|
// ../../node_modules/yaml/dist/doc/applyReviver.js
|
239652
239652
|
var require_applyReviver = __commonJS((exports) => {
|
239653
|
-
function applyReviver(reviver, obj,
|
239653
|
+
function applyReviver(reviver, obj, key3, val) {
|
239654
239654
|
if (val && typeof val === "object") {
|
239655
239655
|
if (Array.isArray(val)) {
|
239656
239656
|
for (let i7 = 0, len = val.length;i7 < len; ++i7) {
|
@@ -239690,7 +239690,7 @@ var require_applyReviver = __commonJS((exports) => {
|
|
239690
239690
|
}
|
239691
239691
|
}
|
239692
239692
|
}
|
239693
|
-
return reviver.call(obj,
|
239693
|
+
return reviver.call(obj, key3, val);
|
239694
239694
|
}
|
239695
239695
|
exports.applyReviver = applyReviver;
|
239696
239696
|
});
|
@@ -240019,29 +240019,29 @@ var require_Collection = __commonJS((exports) => {
|
|
240019
240019
|
if (isEmptyPath(path7))
|
240020
240020
|
this.add(value4);
|
240021
240021
|
else {
|
240022
|
-
const [
|
240023
|
-
const node = this.get(
|
240022
|
+
const [key3, ...rest] = path7;
|
240023
|
+
const node = this.get(key3, true);
|
240024
240024
|
if (identity2.isCollection(node))
|
240025
240025
|
node.addIn(rest, value4);
|
240026
240026
|
else if (node === undefined && this.schema)
|
240027
|
-
this.set(
|
240027
|
+
this.set(key3, collectionFromPath(this.schema, rest, value4));
|
240028
240028
|
else
|
240029
|
-
throw new Error(`Expected YAML collection at ${
|
240029
|
+
throw new Error(`Expected YAML collection at ${key3}. Remaining path: ${rest}`);
|
240030
240030
|
}
|
240031
240031
|
}
|
240032
240032
|
deleteIn(path7) {
|
240033
|
-
const [
|
240033
|
+
const [key3, ...rest] = path7;
|
240034
240034
|
if (rest.length === 0)
|
240035
|
-
return this.delete(
|
240036
|
-
const node = this.get(
|
240035
|
+
return this.delete(key3);
|
240036
|
+
const node = this.get(key3, true);
|
240037
240037
|
if (identity2.isCollection(node))
|
240038
240038
|
return node.deleteIn(rest);
|
240039
240039
|
else
|
240040
|
-
throw new Error(`Expected YAML collection at ${
|
240040
|
+
throw new Error(`Expected YAML collection at ${key3}. Remaining path: ${rest}`);
|
240041
240041
|
}
|
240042
240042
|
getIn(path7, keepScalar) {
|
240043
|
-
const [
|
240044
|
-
const node = this.get(
|
240043
|
+
const [key3, ...rest] = path7;
|
240044
|
+
const node = this.get(key3, true);
|
240045
240045
|
if (rest.length === 0)
|
240046
240046
|
return !keepScalar && identity2.isScalar(node) ? node.value : node;
|
240047
240047
|
else
|
@@ -240056,24 +240056,24 @@ var require_Collection = __commonJS((exports) => {
|
|
240056
240056
|
});
|
240057
240057
|
}
|
240058
240058
|
hasIn(path7) {
|
240059
|
-
const [
|
240059
|
+
const [key3, ...rest] = path7;
|
240060
240060
|
if (rest.length === 0)
|
240061
|
-
return this.has(
|
240062
|
-
const node = this.get(
|
240061
|
+
return this.has(key3);
|
240062
|
+
const node = this.get(key3, true);
|
240063
240063
|
return identity2.isCollection(node) ? node.hasIn(rest) : false;
|
240064
240064
|
}
|
240065
240065
|
setIn(path7, value4) {
|
240066
|
-
const [
|
240066
|
+
const [key3, ...rest] = path7;
|
240067
240067
|
if (rest.length === 0) {
|
240068
|
-
this.set(
|
240068
|
+
this.set(key3, value4);
|
240069
240069
|
} else {
|
240070
|
-
const node = this.get(
|
240070
|
+
const node = this.get(key3, true);
|
240071
240071
|
if (identity2.isCollection(node))
|
240072
240072
|
node.setIn(rest, value4);
|
240073
240073
|
else if (node === undefined && this.schema)
|
240074
|
-
this.set(
|
240074
|
+
this.set(key3, collectionFromPath(this.schema, rest, value4));
|
240075
240075
|
else
|
240076
|
-
throw new Error(`Expected YAML collection at ${
|
240076
|
+
throw new Error(`Expected YAML collection at ${key3}. Remaining path: ${rest}`);
|
240077
240077
|
}
|
240078
240078
|
}
|
240079
240079
|
}
|
@@ -240660,19 +240660,19 @@ var require_stringifyPair = __commonJS((exports) => {
|
|
240660
240660
|
var Scalar = require_Scalar();
|
240661
240661
|
var stringify5 = require_stringify();
|
240662
240662
|
var stringifyComment = require_stringifyComment();
|
240663
|
-
function stringifyPair2({ key:
|
240663
|
+
function stringifyPair2({ key: key3, value: value4 }, ctx, onComment, onChompKeep) {
|
240664
240664
|
const { allNullValues, doc: doc2, indent: indent2, indentStep, options: { commentString, indentSeq, simpleKeys } } = ctx;
|
240665
|
-
let keyComment = identity2.isNode(
|
240665
|
+
let keyComment = identity2.isNode(key3) && key3.comment || null;
|
240666
240666
|
if (simpleKeys) {
|
240667
240667
|
if (keyComment) {
|
240668
240668
|
throw new Error("With simple keys, key nodes cannot have comments");
|
240669
240669
|
}
|
240670
|
-
if (identity2.isCollection(
|
240670
|
+
if (identity2.isCollection(key3) || !identity2.isNode(key3) && typeof key3 === "object") {
|
240671
240671
|
const msg = "With simple keys, collection cannot be used as a key value";
|
240672
240672
|
throw new Error(msg);
|
240673
240673
|
}
|
240674
240674
|
}
|
240675
|
-
let explicitKey = !simpleKeys && (!
|
240675
|
+
let explicitKey = !simpleKeys && (!key3 || keyComment && value4 == null && !ctx.inFlow || identity2.isCollection(key3) || (identity2.isScalar(key3) ? key3.type === Scalar.Scalar.BLOCK_FOLDED || key3.type === Scalar.Scalar.BLOCK_LITERAL : typeof key3 === "object"));
|
240676
240676
|
ctx = Object.assign({}, ctx, {
|
240677
240677
|
allNullValues: false,
|
240678
240678
|
implicitKey: !explicitKey && (simpleKeys || !allNullValues),
|
@@ -240680,7 +240680,7 @@ var require_stringifyPair = __commonJS((exports) => {
|
|
240680
240680
|
});
|
240681
240681
|
let keyCommentDone = false;
|
240682
240682
|
let chompKeep = false;
|
240683
|
-
let str = stringify5.stringify(
|
240683
|
+
let str = stringify5.stringify(key3, ctx, () => keyCommentDone = true, () => chompKeep = true);
|
240684
240684
|
if (!explicitKey && !ctx.inFlow && str.length > 1024) {
|
240685
240685
|
if (simpleKeys)
|
240686
240686
|
throw new Error("With simple keys, single line scalar must not span more than 1024 characters");
|
@@ -240824,7 +240824,7 @@ var require_merge = __commonJS((exports) => {
|
|
240824
240824
|
}),
|
240825
240825
|
stringify: () => MERGE_KEY
|
240826
240826
|
};
|
240827
|
-
var isMergeKey = (ctx,
|
240827
|
+
var isMergeKey = (ctx, key3) => (merge7.identify(key3) || identity2.isScalar(key3) && (!key3.type || key3.type === Scalar.Scalar.PLAIN) && merge7.identify(key3.value)) && ctx?.doc.schema.tags.some((tag) => tag.tag === merge7.tag && tag.default);
|
240828
240828
|
function addMergeToJSMap(ctx, map7, value4) {
|
240829
240829
|
value4 = ctx && identity2.isAlias(value4) ? value4.resolve(ctx.doc) : value4;
|
240830
240830
|
if (identity2.isSeq(value4))
|
@@ -240841,14 +240841,14 @@ var require_merge = __commonJS((exports) => {
|
|
240841
240841
|
if (!identity2.isMap(source))
|
240842
240842
|
throw new Error("Merge sources must be maps or map aliases");
|
240843
240843
|
const srcMap = source.toJSON(null, ctx, Map);
|
240844
|
-
for (const [
|
240844
|
+
for (const [key3, value5] of srcMap) {
|
240845
240845
|
if (map7 instanceof Map) {
|
240846
|
-
if (!map7.has(
|
240847
|
-
map7.set(
|
240846
|
+
if (!map7.has(key3))
|
240847
|
+
map7.set(key3, value5);
|
240848
240848
|
} else if (map7 instanceof Set) {
|
240849
|
-
map7.add(
|
240850
|
-
} else if (!Object.prototype.hasOwnProperty.call(map7,
|
240851
|
-
Object.defineProperty(map7,
|
240849
|
+
map7.add(key3);
|
240850
|
+
} else if (!Object.prototype.hasOwnProperty.call(map7, key3)) {
|
240851
|
+
Object.defineProperty(map7, key3, {
|
240852
240852
|
value: value5,
|
240853
240853
|
writable: true,
|
240854
240854
|
enumerable: true,
|
@@ -240870,19 +240870,19 @@ var require_addPairToJSMap = __commonJS((exports) => {
|
|
240870
240870
|
var stringify5 = require_stringify();
|
240871
240871
|
var identity2 = require_identity();
|
240872
240872
|
var toJS = require_toJS();
|
240873
|
-
function addPairToJSMap(ctx, map7, { key:
|
240874
|
-
if (identity2.isNode(
|
240875
|
-
|
240876
|
-
else if (merge7.isMergeKey(ctx,
|
240873
|
+
function addPairToJSMap(ctx, map7, { key: key3, value: value4 }) {
|
240874
|
+
if (identity2.isNode(key3) && key3.addToJSMap)
|
240875
|
+
key3.addToJSMap(ctx, map7, value4);
|
240876
|
+
else if (merge7.isMergeKey(ctx, key3))
|
240877
240877
|
merge7.addMergeToJSMap(ctx, map7, value4);
|
240878
240878
|
else {
|
240879
|
-
const jsKey = toJS.toJS(
|
240879
|
+
const jsKey = toJS.toJS(key3, "", ctx);
|
240880
240880
|
if (map7 instanceof Map) {
|
240881
240881
|
map7.set(jsKey, toJS.toJS(value4, jsKey, ctx));
|
240882
240882
|
} else if (map7 instanceof Set) {
|
240883
240883
|
map7.add(jsKey);
|
240884
240884
|
} else {
|
240885
|
-
const stringKey = stringifyKey(
|
240885
|
+
const stringKey = stringifyKey(key3, jsKey, ctx);
|
240886
240886
|
const jsValue = toJS.toJS(value4, stringKey, ctx);
|
240887
240887
|
if (stringKey in map7)
|
240888
240888
|
Object.defineProperty(map7, stringKey, {
|
@@ -240897,19 +240897,19 @@ var require_addPairToJSMap = __commonJS((exports) => {
|
|
240897
240897
|
}
|
240898
240898
|
return map7;
|
240899
240899
|
}
|
240900
|
-
function stringifyKey(
|
240900
|
+
function stringifyKey(key3, jsKey, ctx) {
|
240901
240901
|
if (jsKey === null)
|
240902
240902
|
return "";
|
240903
240903
|
if (typeof jsKey !== "object")
|
240904
240904
|
return String(jsKey);
|
240905
|
-
if (identity2.isNode(
|
240905
|
+
if (identity2.isNode(key3) && ctx?.doc) {
|
240906
240906
|
const strCtx = stringify5.createStringifyContext(ctx.doc, {});
|
240907
240907
|
strCtx.anchors = new Set;
|
240908
240908
|
for (const node of ctx.anchors.keys())
|
240909
240909
|
strCtx.anchors.add(node.anchor);
|
240910
240910
|
strCtx.inFlow = true;
|
240911
240911
|
strCtx.inStringifyKey = true;
|
240912
|
-
const strKey =
|
240912
|
+
const strKey = key3.toString(strCtx);
|
240913
240913
|
if (!ctx.mapKeyWarned) {
|
240914
240914
|
let jsonStr = JSON.stringify(strKey);
|
240915
240915
|
if (jsonStr.length > 40)
|
@@ -240930,25 +240930,25 @@ var require_Pair = __commonJS((exports) => {
|
|
240930
240930
|
var stringifyPair2 = require_stringifyPair();
|
240931
240931
|
var addPairToJSMap = require_addPairToJSMap();
|
240932
240932
|
var identity2 = require_identity();
|
240933
|
-
function createPair(
|
240934
|
-
const k6 = createNode.createNode(
|
240933
|
+
function createPair(key3, value4, ctx) {
|
240934
|
+
const k6 = createNode.createNode(key3, undefined, ctx);
|
240935
240935
|
const v7 = createNode.createNode(value4, undefined, ctx);
|
240936
240936
|
return new Pair(k6, v7);
|
240937
240937
|
}
|
240938
240938
|
|
240939
240939
|
class Pair {
|
240940
|
-
constructor(
|
240940
|
+
constructor(key3, value4 = null) {
|
240941
240941
|
Object.defineProperty(this, identity2.NODE_TYPE, { value: identity2.PAIR });
|
240942
|
-
this.key =
|
240942
|
+
this.key = key3;
|
240943
240943
|
this.value = value4;
|
240944
240944
|
}
|
240945
240945
|
clone(schema) {
|
240946
|
-
let { key:
|
240947
|
-
if (identity2.isNode(
|
240948
|
-
|
240946
|
+
let { key: key3, value: value4 } = this;
|
240947
|
+
if (identity2.isNode(key3))
|
240948
|
+
key3 = key3.clone(schema);
|
240949
240949
|
if (identity2.isNode(value4))
|
240950
240950
|
value4 = value4.clone(schema);
|
240951
|
-
return new Pair(
|
240951
|
+
return new Pair(key3, value4);
|
240952
240952
|
}
|
240953
240953
|
toJSON(_6, ctx) {
|
240954
240954
|
const pair = ctx?.mapAsMap ? new Map : {};
|
@@ -241115,11 +241115,11 @@ var require_YAMLMap = __commonJS((exports) => {
|
|
241115
241115
|
var identity2 = require_identity();
|
241116
241116
|
var Pair = require_Pair();
|
241117
241117
|
var Scalar = require_Scalar();
|
241118
|
-
function findPair(items,
|
241119
|
-
const k6 = identity2.isScalar(
|
241118
|
+
function findPair(items, key3) {
|
241119
|
+
const k6 = identity2.isScalar(key3) ? key3.value : key3;
|
241120
241120
|
for (const it2 of items) {
|
241121
241121
|
if (identity2.isPair(it2)) {
|
241122
|
-
if (it2.key ===
|
241122
|
+
if (it2.key === key3 || it2.key === k6)
|
241123
241123
|
return it2;
|
241124
241124
|
if (identity2.isScalar(it2.key) && it2.key.value === k6)
|
241125
241125
|
return it2;
|
@@ -241139,20 +241139,20 @@ var require_YAMLMap = __commonJS((exports) => {
|
|
241139
241139
|
static from(schema, obj, ctx) {
|
241140
241140
|
const { keepUndefined, replacer } = ctx;
|
241141
241141
|
const map7 = new this(schema);
|
241142
|
-
const add = (
|
241142
|
+
const add = (key3, value4) => {
|
241143
241143
|
if (typeof replacer === "function")
|
241144
|
-
value4 = replacer.call(obj,
|
241145
|
-
else if (Array.isArray(replacer) && !replacer.includes(
|
241144
|
+
value4 = replacer.call(obj, key3, value4);
|
241145
|
+
else if (Array.isArray(replacer) && !replacer.includes(key3))
|
241146
241146
|
return;
|
241147
241147
|
if (value4 !== undefined || keepUndefined)
|
241148
|
-
map7.items.push(Pair.createPair(
|
241148
|
+
map7.items.push(Pair.createPair(key3, value4, ctx));
|
241149
241149
|
};
|
241150
241150
|
if (obj instanceof Map) {
|
241151
|
-
for (const [
|
241152
|
-
add(
|
241151
|
+
for (const [key3, value4] of obj)
|
241152
|
+
add(key3, value4);
|
241153
241153
|
} else if (obj && typeof obj === "object") {
|
241154
|
-
for (const
|
241155
|
-
add(
|
241154
|
+
for (const key3 of Object.keys(obj))
|
241155
|
+
add(key3, obj[key3]);
|
241156
241156
|
}
|
241157
241157
|
if (typeof schema.sortMapEntries === "function") {
|
241158
241158
|
map7.items.sort(schema.sortMapEntries);
|
@@ -241186,23 +241186,23 @@ var require_YAMLMap = __commonJS((exports) => {
|
|
241186
241186
|
this.items.push(_pair);
|
241187
241187
|
}
|
241188
241188
|
}
|
241189
|
-
delete(
|
241190
|
-
const it2 = findPair(this.items,
|
241189
|
+
delete(key3) {
|
241190
|
+
const it2 = findPair(this.items, key3);
|
241191
241191
|
if (!it2)
|
241192
241192
|
return false;
|
241193
241193
|
const del = this.items.splice(this.items.indexOf(it2), 1);
|
241194
241194
|
return del.length > 0;
|
241195
241195
|
}
|
241196
|
-
get(
|
241197
|
-
const it2 = findPair(this.items,
|
241196
|
+
get(key3, keepScalar) {
|
241197
|
+
const it2 = findPair(this.items, key3);
|
241198
241198
|
const node = it2?.value;
|
241199
241199
|
return (!keepScalar && identity2.isScalar(node) ? node.value : node) ?? undefined;
|
241200
241200
|
}
|
241201
|
-
has(
|
241202
|
-
return !!findPair(this.items,
|
241201
|
+
has(key3) {
|
241202
|
+
return !!findPair(this.items, key3);
|
241203
241203
|
}
|
241204
|
-
set(
|
241205
|
-
this.add(new Pair.Pair(
|
241204
|
+
set(key3, value4) {
|
241205
|
+
this.add(new Pair.Pair(key3, value4), true);
|
241206
241206
|
}
|
241207
241207
|
toJSON(_6, ctx, Type) {
|
241208
241208
|
const map7 = Type ? new Type : ctx?.mapAsMap ? new Map : {};
|
@@ -241273,28 +241273,28 @@ var require_YAMLSeq = __commonJS((exports) => {
|
|
241273
241273
|
add(value4) {
|
241274
241274
|
this.items.push(value4);
|
241275
241275
|
}
|
241276
|
-
delete(
|
241277
|
-
const idx = asItemIndex(
|
241276
|
+
delete(key3) {
|
241277
|
+
const idx = asItemIndex(key3);
|
241278
241278
|
if (typeof idx !== "number")
|
241279
241279
|
return false;
|
241280
241280
|
const del = this.items.splice(idx, 1);
|
241281
241281
|
return del.length > 0;
|
241282
241282
|
}
|
241283
|
-
get(
|
241284
|
-
const idx = asItemIndex(
|
241283
|
+
get(key3, keepScalar) {
|
241284
|
+
const idx = asItemIndex(key3);
|
241285
241285
|
if (typeof idx !== "number")
|
241286
241286
|
return;
|
241287
241287
|
const it2 = this.items[idx];
|
241288
241288
|
return !keepScalar && identity2.isScalar(it2) ? it2.value : it2;
|
241289
241289
|
}
|
241290
|
-
has(
|
241291
|
-
const idx = asItemIndex(
|
241290
|
+
has(key3) {
|
241291
|
+
const idx = asItemIndex(key3);
|
241292
241292
|
return typeof idx === "number" && idx < this.items.length;
|
241293
241293
|
}
|
241294
|
-
set(
|
241295
|
-
const idx = asItemIndex(
|
241294
|
+
set(key3, value4) {
|
241295
|
+
const idx = asItemIndex(key3);
|
241296
241296
|
if (typeof idx !== "number")
|
241297
|
-
throw new Error(`Expected a valid index, not ${
|
241297
|
+
throw new Error(`Expected a valid index, not ${key3}.`);
|
241298
241298
|
const prev = this.items[idx];
|
241299
241299
|
if (identity2.isScalar(prev) && Scalar.isScalarValue(value4))
|
241300
241300
|
prev.value = value4;
|
@@ -241328,8 +241328,8 @@ var require_YAMLSeq = __commonJS((exports) => {
|
|
241328
241328
|
let i7 = 0;
|
241329
241329
|
for (let it2 of obj) {
|
241330
241330
|
if (typeof replacer === "function") {
|
241331
|
-
const
|
241332
|
-
it2 = replacer.call(obj,
|
241331
|
+
const key3 = obj instanceof Set ? it2 : String(i7++);
|
241332
|
+
it2 = replacer.call(obj, key3, it2);
|
241333
241333
|
}
|
241334
241334
|
seq.items.push(createNode.createNode(it2, undefined, ctx));
|
241335
241335
|
}
|
@@ -241337,8 +241337,8 @@ var require_YAMLSeq = __commonJS((exports) => {
|
|
241337
241337
|
return seq;
|
241338
241338
|
}
|
241339
241339
|
}
|
241340
|
-
function asItemIndex(
|
241341
|
-
let idx = identity2.isScalar(
|
241340
|
+
function asItemIndex(key3) {
|
241341
|
+
let idx = identity2.isScalar(key3) ? key3.value : key3;
|
241342
241342
|
if (idx && typeof idx === "string")
|
241343
241343
|
idx = Number(idx);
|
241344
241344
|
return typeof idx === "number" && Number.isInteger(idx) && idx >= 0 ? idx : null;
|
@@ -241711,25 +241711,25 @@ ${cn.comment}` : item.comment;
|
|
241711
241711
|
for (let it2 of iterable) {
|
241712
241712
|
if (typeof replacer === "function")
|
241713
241713
|
it2 = replacer.call(iterable, String(i7++), it2);
|
241714
|
-
let
|
241714
|
+
let key3, value4;
|
241715
241715
|
if (Array.isArray(it2)) {
|
241716
241716
|
if (it2.length === 2) {
|
241717
|
-
|
241717
|
+
key3 = it2[0];
|
241718
241718
|
value4 = it2[1];
|
241719
241719
|
} else
|
241720
241720
|
throw new TypeError(`Expected [key, value] tuple: ${it2}`);
|
241721
241721
|
} else if (it2 && it2 instanceof Object) {
|
241722
241722
|
const keys = Object.keys(it2);
|
241723
241723
|
if (keys.length === 1) {
|
241724
|
-
|
241725
|
-
value4 = it2[
|
241724
|
+
key3 = keys[0];
|
241725
|
+
value4 = it2[key3];
|
241726
241726
|
} else {
|
241727
241727
|
throw new TypeError(`Expected tuple with one key, not ${keys.length} keys`);
|
241728
241728
|
}
|
241729
241729
|
} else {
|
241730
|
-
|
241730
|
+
key3 = it2;
|
241731
241731
|
}
|
241732
|
-
pairs2.items.push(Pair.createPair(
|
241732
|
+
pairs2.items.push(Pair.createPair(key3, value4, ctx));
|
241733
241733
|
}
|
241734
241734
|
return pairs2;
|
241735
241735
|
}
|
@@ -241770,16 +241770,16 @@ var require_omap = __commonJS((exports) => {
|
|
241770
241770
|
if (ctx?.onCreate)
|
241771
241771
|
ctx.onCreate(map7);
|
241772
241772
|
for (const pair of this.items) {
|
241773
|
-
let
|
241773
|
+
let key3, value4;
|
241774
241774
|
if (identity2.isPair(pair)) {
|
241775
|
-
|
241776
|
-
value4 = toJS.toJS(pair.value,
|
241775
|
+
key3 = toJS.toJS(pair.key, "", ctx);
|
241776
|
+
value4 = toJS.toJS(pair.value, key3, ctx);
|
241777
241777
|
} else {
|
241778
|
-
|
241778
|
+
key3 = toJS.toJS(pair, "", ctx);
|
241779
241779
|
}
|
241780
|
-
if (map7.has(
|
241780
|
+
if (map7.has(key3))
|
241781
241781
|
throw new Error("Ordered maps must not include duplicate keys");
|
241782
|
-
map7.set(
|
241782
|
+
map7.set(key3, value4);
|
241783
241783
|
}
|
241784
241784
|
return map7;
|
241785
241785
|
}
|
@@ -241800,12 +241800,12 @@ var require_omap = __commonJS((exports) => {
|
|
241800
241800
|
resolve(seq, onError) {
|
241801
241801
|
const pairs$1 = pairs.resolvePairs(seq, onError);
|
241802
241802
|
const seenKeys = [];
|
241803
|
-
for (const { key:
|
241804
|
-
if (identity2.isScalar(
|
241805
|
-
if (seenKeys.includes(
|
241806
|
-
onError(`Ordered maps must not include duplicate keys: ${
|
241803
|
+
for (const { key: key3 } of pairs$1.items) {
|
241804
|
+
if (identity2.isScalar(key3)) {
|
241805
|
+
if (seenKeys.includes(key3.value)) {
|
241806
|
+
onError(`Ordered maps must not include duplicate keys: ${key3.value}`);
|
241807
241807
|
} else {
|
241808
|
-
seenKeys.push(
|
241808
|
+
seenKeys.push(key3.value);
|
241809
241809
|
}
|
241810
241810
|
}
|
241811
241811
|
}
|
@@ -241979,30 +241979,30 @@ var require_set = __commonJS((exports) => {
|
|
241979
241979
|
super(schema);
|
241980
241980
|
this.tag = YAMLSet.tag;
|
241981
241981
|
}
|
241982
|
-
add(
|
241982
|
+
add(key3) {
|
241983
241983
|
let pair;
|
241984
|
-
if (identity2.isPair(
|
241985
|
-
pair =
|
241986
|
-
else if (
|
241987
|
-
pair = new Pair.Pair(
|
241984
|
+
if (identity2.isPair(key3))
|
241985
|
+
pair = key3;
|
241986
|
+
else if (key3 && typeof key3 === "object" && "key" in key3 && "value" in key3 && key3.value === null)
|
241987
|
+
pair = new Pair.Pair(key3.key, null);
|
241988
241988
|
else
|
241989
|
-
pair = new Pair.Pair(
|
241989
|
+
pair = new Pair.Pair(key3, null);
|
241990
241990
|
const prev = YAMLMap.findPair(this.items, pair.key);
|
241991
241991
|
if (!prev)
|
241992
241992
|
this.items.push(pair);
|
241993
241993
|
}
|
241994
|
-
get(
|
241995
|
-
const pair = YAMLMap.findPair(this.items,
|
241994
|
+
get(key3, keepPair) {
|
241995
|
+
const pair = YAMLMap.findPair(this.items, key3);
|
241996
241996
|
return !keepPair && identity2.isPair(pair) ? identity2.isScalar(pair.key) ? pair.key.value : pair.key : pair;
|
241997
241997
|
}
|
241998
|
-
set(
|
241998
|
+
set(key3, value4) {
|
241999
241999
|
if (typeof value4 !== "boolean")
|
242000
242000
|
throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof value4}`);
|
242001
|
-
const prev = YAMLMap.findPair(this.items,
|
242001
|
+
const prev = YAMLMap.findPair(this.items, key3);
|
242002
242002
|
if (prev && !value4) {
|
242003
242003
|
this.items.splice(this.items.indexOf(prev), 1);
|
242004
242004
|
} else if (!prev && value4) {
|
242005
|
-
this.items.push(new Pair.Pair(
|
242005
|
+
this.items.push(new Pair.Pair(key3));
|
242006
242006
|
}
|
242007
242007
|
}
|
242008
242008
|
toJSON(_6, ctx) {
|
@@ -242237,7 +242237,7 @@ var require_tags = __commonJS((exports) => {
|
|
242237
242237
|
if (Array.isArray(customTags))
|
242238
242238
|
tags = [];
|
242239
242239
|
else {
|
242240
|
-
const keys = Array.from(schemas3.keys()).filter((
|
242240
|
+
const keys = Array.from(schemas3.keys()).filter((key3) => key3 !== "yaml11").map((key3) => JSON.stringify(key3)).join(", ");
|
242241
242241
|
throw new Error(`Unknown schema "${schemaName}"; use one of ${keys} or define customTags array`);
|
242242
242242
|
}
|
242243
242243
|
}
|
@@ -242253,7 +242253,7 @@ var require_tags = __commonJS((exports) => {
|
|
242253
242253
|
const tagObj = typeof tag === "string" ? tagsByName[tag] : tag;
|
242254
242254
|
if (!tagObj) {
|
242255
242255
|
const tagName = JSON.stringify(tag);
|
242256
|
-
const keys = Object.keys(tagsByName).map((
|
242256
|
+
const keys = Object.keys(tagsByName).map((key3) => JSON.stringify(key3)).join(", ");
|
242257
242257
|
throw new Error(`Unknown custom tag ${tagName}; use one of ${keys}`);
|
242258
242258
|
}
|
242259
242259
|
if (!tags2.includes(tagObj))
|
@@ -242488,13 +242488,13 @@ var require_Document = __commonJS((exports) => {
|
|
242488
242488
|
setAnchors();
|
242489
242489
|
return node;
|
242490
242490
|
}
|
242491
|
-
createPair(
|
242492
|
-
const k6 = this.createNode(
|
242491
|
+
createPair(key3, value4, options = {}) {
|
242492
|
+
const k6 = this.createNode(key3, null, options);
|
242493
242493
|
const v7 = this.createNode(value4, null, options);
|
242494
242494
|
return new Pair.Pair(k6, v7);
|
242495
242495
|
}
|
242496
|
-
delete(
|
242497
|
-
return assertCollection(this.contents) ? this.contents.delete(
|
242496
|
+
delete(key3) {
|
242497
|
+
return assertCollection(this.contents) ? this.contents.delete(key3) : false;
|
242498
242498
|
}
|
242499
242499
|
deleteIn(path7) {
|
242500
242500
|
if (Collection.isEmptyPath(path7)) {
|
@@ -242505,27 +242505,27 @@ var require_Document = __commonJS((exports) => {
|
|
242505
242505
|
}
|
242506
242506
|
return assertCollection(this.contents) ? this.contents.deleteIn(path7) : false;
|
242507
242507
|
}
|
242508
|
-
get(
|
242509
|
-
return identity2.isCollection(this.contents) ? this.contents.get(
|
242508
|
+
get(key3, keepScalar) {
|
242509
|
+
return identity2.isCollection(this.contents) ? this.contents.get(key3, keepScalar) : undefined;
|
242510
242510
|
}
|
242511
242511
|
getIn(path7, keepScalar) {
|
242512
242512
|
if (Collection.isEmptyPath(path7))
|
242513
242513
|
return !keepScalar && identity2.isScalar(this.contents) ? this.contents.value : this.contents;
|
242514
242514
|
return identity2.isCollection(this.contents) ? this.contents.getIn(path7, keepScalar) : undefined;
|
242515
242515
|
}
|
242516
|
-
has(
|
242517
|
-
return identity2.isCollection(this.contents) ? this.contents.has(
|
242516
|
+
has(key3) {
|
242517
|
+
return identity2.isCollection(this.contents) ? this.contents.has(key3) : false;
|
242518
242518
|
}
|
242519
242519
|
hasIn(path7) {
|
242520
242520
|
if (Collection.isEmptyPath(path7))
|
242521
242521
|
return this.contents !== undefined;
|
242522
242522
|
return identity2.isCollection(this.contents) ? this.contents.hasIn(path7) : false;
|
242523
242523
|
}
|
242524
|
-
set(
|
242524
|
+
set(key3, value4) {
|
242525
242525
|
if (this.contents == null) {
|
242526
|
-
this.contents = Collection.collectionFromPath(this.schema, [
|
242526
|
+
this.contents = Collection.collectionFromPath(this.schema, [key3], value4);
|
242527
242527
|
} else if (assertCollection(this.contents)) {
|
242528
|
-
this.contents.set(
|
242528
|
+
this.contents.set(key3, value4);
|
242529
242529
|
}
|
242530
242530
|
}
|
242531
242531
|
setIn(path7, value4) {
|
@@ -242807,25 +242807,25 @@ var require_resolve_props = __commonJS((exports) => {
|
|
242807
242807
|
|
242808
242808
|
// ../../node_modules/yaml/dist/compose/util-contains-newline.js
|
242809
242809
|
var require_util_contains_newline = __commonJS((exports) => {
|
242810
|
-
function containsNewline(
|
242811
|
-
if (!
|
242810
|
+
function containsNewline(key3) {
|
242811
|
+
if (!key3)
|
242812
242812
|
return null;
|
242813
|
-
switch (
|
242813
|
+
switch (key3.type) {
|
242814
242814
|
case "alias":
|
242815
242815
|
case "scalar":
|
242816
242816
|
case "double-quoted-scalar":
|
242817
242817
|
case "single-quoted-scalar":
|
242818
|
-
if (
|
242818
|
+
if (key3.source.includes(`
|
242819
242819
|
`))
|
242820
242820
|
return true;
|
242821
|
-
if (
|
242822
|
-
for (const st2 of
|
242821
|
+
if (key3.end) {
|
242822
|
+
for (const st2 of key3.end)
|
242823
242823
|
if (st2.type === "newline")
|
242824
242824
|
return true;
|
242825
242825
|
}
|
242826
242826
|
return false;
|
242827
242827
|
case "flow-collection":
|
242828
|
-
for (const it2 of
|
242828
|
+
for (const it2 of key3.items) {
|
242829
242829
|
for (const st2 of it2.start)
|
242830
242830
|
if (st2.type === "newline")
|
242831
242831
|
return true;
|
@@ -242890,10 +242890,10 @@ var require_resolve_block_map = __commonJS((exports) => {
|
|
242890
242890
|
let offset = bm.offset;
|
242891
242891
|
let commentEnd = null;
|
242892
242892
|
for (const collItem of bm.items) {
|
242893
|
-
const { start: start3, key:
|
242893
|
+
const { start: start3, key: key3, sep: sep5, value: value4 } = collItem;
|
242894
242894
|
const keyProps = resolveProps.resolveProps(start3, {
|
242895
242895
|
indicator: "explicit-key-ind",
|
242896
|
-
next:
|
242896
|
+
next: key3 ?? sep5?.[0],
|
242897
242897
|
offset,
|
242898
242898
|
onError,
|
242899
242899
|
parentIndent: bm.indent,
|
@@ -242901,10 +242901,10 @@ var require_resolve_block_map = __commonJS((exports) => {
|
|
242901
242901
|
});
|
242902
242902
|
const implicitKey = !keyProps.found;
|
242903
242903
|
if (implicitKey) {
|
242904
|
-
if (
|
242905
|
-
if (
|
242904
|
+
if (key3) {
|
242905
|
+
if (key3.type === "block-seq")
|
242906
242906
|
onError(offset, "BLOCK_AS_IMPLICIT_KEY", "A block sequence may not be used as an implicit map key");
|
242907
|
-
else if ("indent" in
|
242907
|
+
else if ("indent" in key3 && key3.indent !== bm.indent)
|
242908
242908
|
onError(offset, "BAD_INDENT", startColMsg);
|
242909
242909
|
}
|
242910
242910
|
if (!keyProps.anchor && !keyProps.tag && !sep5) {
|
@@ -242918,17 +242918,17 @@ var require_resolve_block_map = __commonJS((exports) => {
|
|
242918
242918
|
}
|
242919
242919
|
continue;
|
242920
242920
|
}
|
242921
|
-
if (keyProps.newlineAfterProp || utilContainsNewline.containsNewline(
|
242922
|
-
onError(
|
242921
|
+
if (keyProps.newlineAfterProp || utilContainsNewline.containsNewline(key3)) {
|
242922
|
+
onError(key3 ?? start3[start3.length - 1], "MULTILINE_IMPLICIT_KEY", "Implicit keys need to be on a single line");
|
242923
242923
|
}
|
242924
242924
|
} else if (keyProps.found?.indent !== bm.indent) {
|
242925
242925
|
onError(offset, "BAD_INDENT", startColMsg);
|
242926
242926
|
}
|
242927
242927
|
ctx.atKey = true;
|
242928
242928
|
const keyStart = keyProps.end;
|
242929
|
-
const keyNode =
|
242929
|
+
const keyNode = key3 ? composeNode(ctx, key3, keyProps, onError) : composeEmptyNode(ctx, keyStart, start3, null, keyProps, onError);
|
242930
242930
|
if (ctx.schema.compat)
|
242931
|
-
utilFlowIndentCheck.flowIndentCheck(bm.indent,
|
242931
|
+
utilFlowIndentCheck.flowIndentCheck(bm.indent, key3, onError);
|
242932
242932
|
ctx.atKey = false;
|
242933
242933
|
if (utilMapIncludes.mapIncludes(ctx, map7.items, keyNode))
|
242934
242934
|
onError(keyStart, "DUPLICATE_KEY", "Map keys must be unique");
|
@@ -242938,7 +242938,7 @@ var require_resolve_block_map = __commonJS((exports) => {
|
|
242938
242938
|
offset: keyNode.range[2],
|
242939
242939
|
onError,
|
242940
242940
|
parentIndent: bm.indent,
|
242941
|
-
startOnNewline: !
|
242941
|
+
startOnNewline: !key3 || key3.type === "block-scalar"
|
242942
242942
|
});
|
242943
242943
|
offset = valueProps.end;
|
242944
242944
|
if (valueProps.found) {
|
@@ -243094,11 +243094,11 @@ var require_resolve_flow_collection = __commonJS((exports) => {
|
|
243094
243094
|
let offset = fc.offset + fc.start.source.length;
|
243095
243095
|
for (let i7 = 0;i7 < fc.items.length; ++i7) {
|
243096
243096
|
const collItem = fc.items[i7];
|
243097
|
-
const { start: start3, key:
|
243097
|
+
const { start: start3, key: key3, sep: sep5, value: value4 } = collItem;
|
243098
243098
|
const props = resolveProps.resolveProps(start3, {
|
243099
243099
|
flow: fcName,
|
243100
243100
|
indicator: "explicit-key-ind",
|
243101
|
-
next:
|
243101
|
+
next: key3 ?? sep5?.[0],
|
243102
243102
|
offset,
|
243103
243103
|
onError,
|
243104
243104
|
parentIndent: fc.indent,
|
@@ -243120,8 +243120,8 @@ var require_resolve_flow_collection = __commonJS((exports) => {
|
|
243120
243120
|
offset = props.end;
|
243121
243121
|
continue;
|
243122
243122
|
}
|
243123
|
-
if (!isMap && ctx.options.strict && utilContainsNewline.containsNewline(
|
243124
|
-
onError(
|
243123
|
+
if (!isMap && ctx.options.strict && utilContainsNewline.containsNewline(key3))
|
243124
|
+
onError(key3, "MULTILINE_IMPLICIT_KEY", "Implicit keys of flow sequence pairs need to be on a single line");
|
243125
243125
|
}
|
243126
243126
|
if (i7 === 0) {
|
243127
243127
|
if (props.comma)
|
@@ -243166,8 +243166,8 @@ var require_resolve_flow_collection = __commonJS((exports) => {
|
|
243166
243166
|
} else {
|
243167
243167
|
ctx.atKey = true;
|
243168
243168
|
const keyStart = props.end;
|
243169
|
-
const keyNode =
|
243170
|
-
if (isBlock(
|
243169
|
+
const keyNode = key3 ? composeNode(ctx, key3, props, onError) : composeEmptyNode(ctx, keyStart, start3, null, props, onError);
|
243170
|
+
if (isBlock(key3))
|
243171
243171
|
onError(keyNode.range, "BLOCK_IN_FLOW", blockMsg);
|
243172
243172
|
ctx.atKey = false;
|
243173
243173
|
const valueProps = resolveProps.resolveProps(sep5 ?? [], {
|
@@ -243978,7 +243978,7 @@ var require_composer = __commonJS((exports) => {
|
|
243978
243978
|
var node_process = __require("process");
|
243979
243979
|
var directives4 = require_directives2();
|
243980
243980
|
var Document = require_Document();
|
243981
|
-
var
|
243981
|
+
var errors5 = require_errors3();
|
243982
243982
|
var identity2 = require_identity();
|
243983
243983
|
var composeDoc = require_compose_doc();
|
243984
243984
|
var resolveEnd = require_resolve_end();
|
@@ -244029,9 +244029,9 @@ var require_composer = __commonJS((exports) => {
|
|
244029
244029
|
this.onError = (source, code2, message, warning) => {
|
244030
244030
|
const pos = getErrorPos(source);
|
244031
244031
|
if (warning)
|
244032
|
-
this.warnings.push(new
|
244032
|
+
this.warnings.push(new errors5.YAMLWarning(pos, code2, message));
|
244033
244033
|
else
|
244034
|
-
this.errors.push(new
|
244034
|
+
this.errors.push(new errors5.YAMLParseError(pos, code2, message));
|
244035
244035
|
};
|
244036
244036
|
this.directives = new directives4.Directives({ version: options.version || "1.2" });
|
244037
244037
|
this.options = options;
|
@@ -244115,7 +244115,7 @@ ${cb}` : comment;
|
|
244115
244115
|
break;
|
244116
244116
|
case "error": {
|
244117
244117
|
const msg = token.source ? `${token.message}: ${JSON.stringify(token.source)}` : token.message;
|
244118
|
-
const error45 = new
|
244118
|
+
const error45 = new errors5.YAMLParseError(getErrorPos(token), "UNEXPECTED_TOKEN", msg);
|
244119
244119
|
if (this.atDirectives || !this.doc)
|
244120
244120
|
this.errors.push(error45);
|
244121
244121
|
else
|
@@ -244125,7 +244125,7 @@ ${cb}` : comment;
|
|
244125
244125
|
case "doc-end": {
|
244126
244126
|
if (!this.doc) {
|
244127
244127
|
const msg = "Unexpected doc-end without preceding document";
|
244128
|
-
this.errors.push(new
|
244128
|
+
this.errors.push(new errors5.YAMLParseError(getErrorPos(token), "UNEXPECTED_TOKEN", msg));
|
244129
244129
|
break;
|
244130
244130
|
}
|
244131
244131
|
this.doc.directives.docEnd = true;
|
@@ -244140,7 +244140,7 @@ ${end.comment}` : end.comment;
|
|
244140
244140
|
break;
|
244141
244141
|
}
|
244142
244142
|
default:
|
244143
|
-
this.errors.push(new
|
244143
|
+
this.errors.push(new errors5.YAMLParseError(getErrorPos(token), "UNEXPECTED_TOKEN", `Unsupported token ${token.type}`));
|
244144
244144
|
}
|
244145
244145
|
}
|
244146
244146
|
*end(forceDoc = false, endOffset = -1) {
|
@@ -244166,7 +244166,7 @@ ${end.comment}` : end.comment;
|
|
244166
244166
|
var require_cst_scalar = __commonJS((exports) => {
|
244167
244167
|
var resolveBlockScalar = require_resolve_block_scalar();
|
244168
244168
|
var resolveFlowScalar = require_resolve_flow_scalar();
|
244169
|
-
var
|
244169
|
+
var errors5 = require_errors3();
|
244170
244170
|
var stringifyString = require_stringifyString();
|
244171
244171
|
function resolveAsScalar(token, strict = true, onError) {
|
244172
244172
|
if (token) {
|
@@ -244175,7 +244175,7 @@ var require_cst_scalar = __commonJS((exports) => {
|
|
244175
244175
|
if (onError)
|
244176
244176
|
onError(offset, code2, message);
|
244177
244177
|
else
|
244178
|
-
throw new
|
244178
|
+
throw new errors5.YAMLParseError([offset, offset + 1], code2, message);
|
244179
244179
|
};
|
244180
244180
|
switch (token.type) {
|
244181
244181
|
case "scalar":
|
@@ -244289,9 +244289,9 @@ var require_cst_scalar = __commonJS((exports) => {
|
|
244289
244289
|
if (!addEndtoBlockProps(props, "end" in token ? token.end : undefined))
|
244290
244290
|
props.push({ type: "newline", offset: -1, indent: indent2, source: `
|
244291
244291
|
` });
|
244292
|
-
for (const
|
244293
|
-
if (
|
244294
|
-
delete token[
|
244292
|
+
for (const key3 of Object.keys(token))
|
244293
|
+
if (key3 !== "type" && key3 !== "offset")
|
244294
|
+
delete token[key3];
|
244295
244295
|
Object.assign(token, { type: "block-scalar", indent: indent2, props, source: body });
|
244296
244296
|
}
|
244297
244297
|
}
|
@@ -244340,9 +244340,9 @@ var require_cst_scalar = __commonJS((exports) => {
|
|
244340
244340
|
default: {
|
244341
244341
|
const indent2 = "indent" in token ? token.indent : -1;
|
244342
244342
|
const end = "end" in token && Array.isArray(token.end) ? token.end.filter((st2) => st2.type === "space" || st2.type === "comment" || st2.type === "newline") : [];
|
244343
|
-
for (const
|
244344
|
-
if (
|
244345
|
-
delete token[
|
244343
|
+
for (const key3 of Object.keys(token))
|
244344
|
+
if (key3 !== "type" && key3 !== "offset")
|
244345
|
+
delete token[key3];
|
244346
244346
|
Object.assign(token, { type: type4, indent: indent2, source, end });
|
244347
244347
|
}
|
244348
244348
|
}
|
@@ -244394,12 +244394,12 @@ var require_cst_stringify = __commonJS((exports) => {
|
|
244394
244394
|
}
|
244395
244395
|
}
|
244396
244396
|
}
|
244397
|
-
function stringifyItem({ start: start3, key:
|
244397
|
+
function stringifyItem({ start: start3, key: key3, sep: sep5, value: value4 }) {
|
244398
244398
|
let res = "";
|
244399
244399
|
for (const st2 of start3)
|
244400
244400
|
res += st2.source;
|
244401
|
-
if (
|
244402
|
-
res += stringifyToken(
|
244401
|
+
if (key3)
|
244402
|
+
res += stringifyToken(key3);
|
244403
244403
|
if (sep5)
|
244404
244404
|
for (const st2 of sep5)
|
244405
244405
|
res += st2.source;
|
@@ -245695,7 +245695,7 @@ var require_parser2 = __commonJS((exports) => {
|
|
245695
245695
|
});
|
245696
245696
|
} else if (isFlowToken(it2.key) && !includesToken(it2.sep, "newline")) {
|
245697
245697
|
const start4 = getFirstKeyStartProps(it2.start);
|
245698
|
-
const
|
245698
|
+
const key3 = it2.key;
|
245699
245699
|
const sep5 = it2.sep;
|
245700
245700
|
sep5.push(this.sourceToken);
|
245701
245701
|
delete it2.key;
|
@@ -245704,7 +245704,7 @@ var require_parser2 = __commonJS((exports) => {
|
|
245704
245704
|
type: "block-map",
|
245705
245705
|
offset: this.offset,
|
245706
245706
|
indent: this.indent,
|
245707
|
-
items: [{ start: start4, key:
|
245707
|
+
items: [{ start: start4, key: key3, sep: sep5 }]
|
245708
245708
|
});
|
245709
245709
|
} else if (start3.length > 0) {
|
245710
245710
|
it2.sep = it2.sep.concat(start3, this.sourceToken);
|
@@ -246037,7 +246037,7 @@ var require_parser2 = __commonJS((exports) => {
|
|
246037
246037
|
var require_public_api = __commonJS((exports) => {
|
246038
246038
|
var composer = require_composer();
|
246039
246039
|
var Document = require_Document();
|
246040
|
-
var
|
246040
|
+
var errors5 = require_errors3();
|
246041
246041
|
var log = require_log();
|
246042
246042
|
var identity2 = require_identity();
|
246043
246043
|
var lineCounter = require_line_counter();
|
@@ -246054,8 +246054,8 @@ var require_public_api = __commonJS((exports) => {
|
|
246054
246054
|
const docs = Array.from(composer$1.compose(parser$1.parse(source)));
|
246055
246055
|
if (prettyErrors && lineCounter2)
|
246056
246056
|
for (const doc2 of docs) {
|
246057
|
-
doc2.errors.forEach(
|
246058
|
-
doc2.warnings.forEach(
|
246057
|
+
doc2.errors.forEach(errors5.prettifyError(source, lineCounter2));
|
246058
|
+
doc2.warnings.forEach(errors5.prettifyError(source, lineCounter2));
|
246059
246059
|
}
|
246060
246060
|
if (docs.length > 0)
|
246061
246061
|
return docs;
|
@@ -246070,13 +246070,13 @@ var require_public_api = __commonJS((exports) => {
|
|
246070
246070
|
if (!doc2)
|
246071
246071
|
doc2 = _doc;
|
246072
246072
|
else if (doc2.options.logLevel !== "silent") {
|
246073
|
-
doc2.errors.push(new
|
246073
|
+
doc2.errors.push(new errors5.YAMLParseError(_doc.range.slice(0, 2), "MULTIPLE_DOCS", "Source contains multiple documents; please use YAML.parseAllDocuments()"));
|
246074
246074
|
break;
|
246075
246075
|
}
|
246076
246076
|
}
|
246077
246077
|
if (prettyErrors && lineCounter2) {
|
246078
|
-
doc2.errors.forEach(
|
246079
|
-
doc2.warnings.forEach(
|
246078
|
+
doc2.errors.forEach(errors5.prettifyError(source, lineCounter2));
|
246079
|
+
doc2.warnings.forEach(errors5.prettifyError(source, lineCounter2));
|
246080
246080
|
}
|
246081
246081
|
return doc2;
|
246082
246082
|
}
|
@@ -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-pr5e77a5ab",
|
263844
263844
|
type: "module",
|
263845
263845
|
private: false,
|
263846
263846
|
license: "FSL-1.1-MIT",
|
@@ -263888,13 +263888,13 @@ var package_default = {
|
|
263888
263888
|
"@commander-js/extra-typings": "14.0.0",
|
263889
263889
|
commander: "14.0.0",
|
263890
263890
|
"@inquirer/confirm": "5.1.12",
|
263891
|
-
"@inquirer/input": "4.
|
263892
|
-
"@inquirer/password": "4.0.
|
263893
|
-
"@inquirer/select": "4.2.
|
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.
|
263891
|
+
"@inquirer/input": "4.2.0",
|
263892
|
+
"@inquirer/password": "4.0.15",
|
263893
|
+
"@inquirer/select": "4.2.3",
|
263894
|
+
"@settlemint/sdk-js": "2.4.0-pr5e77a5ab",
|
263895
|
+
"@settlemint/sdk-utils": "2.4.0-pr5e77a5ab",
|
263896
|
+
"@settlemint/sdk-viem": "2.4.0-pr5e77a5ab",
|
263897
|
+
"@types/node": "24.0.8",
|
263898
263898
|
"@types/semver": "7.7.0",
|
263899
263899
|
"@types/which": "3.0.4",
|
263900
263900
|
"get-tsconfig": "4.10.1",
|
@@ -263983,7 +263983,10 @@ var {
|
|
263983
263983
|
} = import__.default;
|
263984
263984
|
|
263985
263985
|
// ../../node_modules/@inquirer/core/dist/esm/lib/key.js
|
263986
|
+
var isUpKey = (key) => key.name === "up" || key.name === "k" || key.ctrl && key.name === "p";
|
263987
|
+
var isDownKey = (key) => key.name === "down" || key.name === "j" || key.ctrl && key.name === "n";
|
263986
263988
|
var isBackspaceKey = (key) => key.name === "backspace";
|
263989
|
+
var isNumberKey = (key) => "1234567890".includes(key.name);
|
263987
263990
|
var isEnterKey = (key) => key.name === "enter" || key.name === "return";
|
263988
263991
|
// ../../node_modules/@inquirer/core/dist/esm/lib/errors.js
|
263989
263992
|
class AbortPromptError extends Error {
|
@@ -264517,11 +264520,22 @@ function usePrefix({ status = "idle", theme }) {
|
|
264517
264520
|
const iconName = status === "loading" ? "idle" : status;
|
264518
264521
|
return typeof prefix === "string" ? prefix : prefix[iconName] ?? prefix["idle"];
|
264519
264522
|
}
|
264523
|
+
// ../../node_modules/@inquirer/core/dist/esm/lib/use-memo.js
|
264524
|
+
function useMemo(fn, dependencies) {
|
264525
|
+
return withPointer((pointer) => {
|
264526
|
+
const prev = pointer.get();
|
264527
|
+
if (!prev || prev.dependencies.length !== dependencies.length || prev.dependencies.some((dep, i) => dep !== dependencies[i])) {
|
264528
|
+
const value = fn();
|
264529
|
+
pointer.set({ value, dependencies });
|
264530
|
+
return value;
|
264531
|
+
}
|
264532
|
+
return prev.value;
|
264533
|
+
});
|
264534
|
+
}
|
264520
264535
|
// ../../node_modules/@inquirer/core/dist/esm/lib/use-ref.js
|
264521
264536
|
function useRef(val) {
|
264522
264537
|
return useState({ current: val })[0];
|
264523
264538
|
}
|
264524
|
-
|
264525
264539
|
// ../../node_modules/@inquirer/core/dist/esm/lib/use-keypress.js
|
264526
264540
|
function useKeypress(userHandler) {
|
264527
264541
|
const signal = useRef(userHandler);
|
@@ -264553,6 +264567,72 @@ function readlineWidth() {
|
|
264553
264567
|
return import_cli_width.default({ defaultWidth: 80, output: readline().output });
|
264554
264568
|
}
|
264555
264569
|
|
264570
|
+
// ../../node_modules/@inquirer/core/dist/esm/lib/pagination/use-pagination.js
|
264571
|
+
function usePointerPosition({ active, renderedItems, pageSize, loop }) {
|
264572
|
+
const state = useRef({
|
264573
|
+
lastPointer: active,
|
264574
|
+
lastActive: undefined
|
264575
|
+
});
|
264576
|
+
const { lastPointer, lastActive } = state.current;
|
264577
|
+
const middle = Math.floor(pageSize / 2);
|
264578
|
+
const renderedLength = renderedItems.reduce((acc, item) => acc + item.length, 0);
|
264579
|
+
const defaultPointerPosition = renderedItems.slice(0, active).reduce((acc, item) => acc + item.length, 0);
|
264580
|
+
let pointer = defaultPointerPosition;
|
264581
|
+
if (renderedLength > pageSize) {
|
264582
|
+
if (loop) {
|
264583
|
+
pointer = lastPointer;
|
264584
|
+
if (lastActive != null && lastActive < active && active - lastActive < pageSize) {
|
264585
|
+
pointer = Math.min(middle, Math.abs(active - lastActive) === 1 ? Math.min(lastPointer + (renderedItems[lastActive]?.length ?? 0), Math.max(defaultPointerPosition, lastPointer)) : lastPointer + active - lastActive);
|
264586
|
+
}
|
264587
|
+
} else {
|
264588
|
+
const spaceUnderActive = renderedItems.slice(active).reduce((acc, item) => acc + item.length, 0);
|
264589
|
+
pointer = spaceUnderActive < pageSize - middle ? pageSize - spaceUnderActive : Math.min(defaultPointerPosition, middle);
|
264590
|
+
}
|
264591
|
+
}
|
264592
|
+
state.current.lastPointer = pointer;
|
264593
|
+
state.current.lastActive = active;
|
264594
|
+
return pointer;
|
264595
|
+
}
|
264596
|
+
function usePagination({ items, active, renderItem, pageSize, loop = true }) {
|
264597
|
+
const width = readlineWidth();
|
264598
|
+
const bound = (num) => (num % items.length + items.length) % items.length;
|
264599
|
+
const renderedItems = items.map((item, index) => {
|
264600
|
+
if (item == null)
|
264601
|
+
return [];
|
264602
|
+
return breakLines(renderItem({ item, index, isActive: index === active }), width).split(`
|
264603
|
+
`);
|
264604
|
+
});
|
264605
|
+
const renderedLength = renderedItems.reduce((acc, item) => acc + item.length, 0);
|
264606
|
+
const renderItemAtIndex = (index) => renderedItems[index] ?? [];
|
264607
|
+
const pointer = usePointerPosition({ active, renderedItems, pageSize, loop });
|
264608
|
+
const activeItem = renderItemAtIndex(active).slice(0, pageSize);
|
264609
|
+
const activeItemPosition = pointer + activeItem.length <= pageSize ? pointer : pageSize - activeItem.length;
|
264610
|
+
const pageBuffer = Array.from({ length: pageSize });
|
264611
|
+
pageBuffer.splice(activeItemPosition, activeItem.length, ...activeItem);
|
264612
|
+
const itemVisited = new Set([active]);
|
264613
|
+
let bufferPointer = activeItemPosition + activeItem.length;
|
264614
|
+
let itemPointer = bound(active + 1);
|
264615
|
+
while (bufferPointer < pageSize && !itemVisited.has(itemPointer) && (loop && renderedLength > pageSize ? itemPointer !== active : itemPointer > active)) {
|
264616
|
+
const lines = renderItemAtIndex(itemPointer);
|
264617
|
+
const linesToAdd = lines.slice(0, pageSize - bufferPointer);
|
264618
|
+
pageBuffer.splice(bufferPointer, linesToAdd.length, ...linesToAdd);
|
264619
|
+
itemVisited.add(itemPointer);
|
264620
|
+
bufferPointer += linesToAdd.length;
|
264621
|
+
itemPointer = bound(itemPointer + 1);
|
264622
|
+
}
|
264623
|
+
bufferPointer = activeItemPosition - 1;
|
264624
|
+
itemPointer = bound(active - 1);
|
264625
|
+
while (bufferPointer >= 0 && !itemVisited.has(itemPointer) && (loop && renderedLength > pageSize ? itemPointer !== active : itemPointer < active)) {
|
264626
|
+
const lines = renderItemAtIndex(itemPointer);
|
264627
|
+
const linesToAdd = lines.slice(Math.max(0, lines.length - bufferPointer - 1));
|
264628
|
+
pageBuffer.splice(bufferPointer - linesToAdd.length + 1, linesToAdd.length, ...linesToAdd);
|
264629
|
+
itemVisited.add(itemPointer);
|
264630
|
+
bufferPointer -= linesToAdd.length;
|
264631
|
+
itemPointer = bound(itemPointer - 1);
|
264632
|
+
}
|
264633
|
+
return pageBuffer.filter((line) => typeof line === "string").join(`
|
264634
|
+
`);
|
264635
|
+
}
|
264556
264636
|
// ../../node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
|
264557
264637
|
var import_mute_stream = __toESM(require_lib(), 1);
|
264558
264638
|
import * as readline2 from "node:readline";
|
@@ -264935,6 +265015,20 @@ function createPrompt(view) {
|
|
264935
265015
|
};
|
264936
265016
|
return prompt;
|
264937
265017
|
}
|
265018
|
+
// ../../node_modules/@inquirer/core/dist/esm/lib/Separator.js
|
265019
|
+
var import_yoctocolors_cjs2 = __toESM(require_yoctocolors_cjs(), 1);
|
265020
|
+
class Separator {
|
265021
|
+
separator = import_yoctocolors_cjs2.default.dim(Array.from({ length: 15 }).join(esm_default.line));
|
265022
|
+
type = "separator";
|
265023
|
+
constructor(separator) {
|
265024
|
+
if (separator) {
|
265025
|
+
this.separator = separator;
|
265026
|
+
}
|
265027
|
+
}
|
265028
|
+
static isSeparator(choice) {
|
265029
|
+
return Boolean(choice && typeof choice === "object" && "type" in choice && choice.type === "separator");
|
265030
|
+
}
|
265031
|
+
}
|
264938
265032
|
// ../utils/dist/terminal.js
|
264939
265033
|
import { spawn } from "node:child_process";
|
264940
265034
|
var import_console_table_printer2 = __toESM(require_dist2(), 1);
|
@@ -303135,97 +303229,10 @@ function sanitizeName(value4, length = 35) {
|
|
303135
303229
|
}).slice(0, length).replaceAll(/(^\d*)/g, "").replaceAll(/(-$)/g, "").replaceAll(/(^-)/g, "");
|
303136
303230
|
}
|
303137
303231
|
|
303138
|
-
// ../../node_modules/@inquirer/input/dist/esm/
|
303139
|
-
var inputTheme = {
|
303140
|
-
validationFailureMode: "keep"
|
303141
|
-
};
|
303142
|
-
var esm_default2 = createPrompt((config4, done) => {
|
303143
|
-
const { required: required4, validate: validate3 = () => true } = config4;
|
303144
|
-
const theme = makeTheme(inputTheme, config4.theme);
|
303145
|
-
const [status, setStatus] = useState("idle");
|
303146
|
-
const [defaultValue = "", setDefaultValue] = useState(config4.default);
|
303147
|
-
const [errorMsg, setError] = useState();
|
303148
|
-
const [value4, setValue] = useState("");
|
303149
|
-
const prefix = usePrefix({ status, theme });
|
303150
|
-
useKeypress(async (key2, rl) => {
|
303151
|
-
if (status !== "idle") {
|
303152
|
-
return;
|
303153
|
-
}
|
303154
|
-
if (isEnterKey(key2)) {
|
303155
|
-
const answer = value4 || defaultValue;
|
303156
|
-
setStatus("loading");
|
303157
|
-
const isValid = required4 && !answer ? "You must provide a value" : await validate3(answer);
|
303158
|
-
if (isValid === true) {
|
303159
|
-
setValue(answer);
|
303160
|
-
setStatus("done");
|
303161
|
-
done(answer);
|
303162
|
-
} else {
|
303163
|
-
if (theme.validationFailureMode === "clear") {
|
303164
|
-
setValue("");
|
303165
|
-
} else {
|
303166
|
-
rl.write(value4);
|
303167
|
-
}
|
303168
|
-
setError(isValid || "You must provide a valid value");
|
303169
|
-
setStatus("idle");
|
303170
|
-
}
|
303171
|
-
} else if (isBackspaceKey(key2) && !value4) {
|
303172
|
-
setDefaultValue(undefined);
|
303173
|
-
} else if (key2.name === "tab" && !value4) {
|
303174
|
-
setDefaultValue(undefined);
|
303175
|
-
rl.clearLine(0);
|
303176
|
-
rl.write(defaultValue);
|
303177
|
-
setValue(defaultValue);
|
303178
|
-
} else {
|
303179
|
-
setValue(rl.line);
|
303180
|
-
setError(undefined);
|
303181
|
-
}
|
303182
|
-
});
|
303183
|
-
const message = theme.style.message(config4.message, status);
|
303184
|
-
let formattedValue = value4;
|
303185
|
-
if (typeof config4.transformer === "function") {
|
303186
|
-
formattedValue = config4.transformer(value4, { isFinal: status === "done" });
|
303187
|
-
} else if (status === "done") {
|
303188
|
-
formattedValue = theme.style.answer(value4);
|
303189
|
-
}
|
303190
|
-
let defaultStr;
|
303191
|
-
if (defaultValue && status !== "done" && !value4) {
|
303192
|
-
defaultStr = theme.style.defaultAnswer(defaultValue);
|
303193
|
-
}
|
303194
|
-
let error44 = "";
|
303195
|
-
if (errorMsg) {
|
303196
|
-
error44 = theme.style.error(errorMsg);
|
303197
|
-
}
|
303198
|
-
return [
|
303199
|
-
[prefix, message, defaultStr, formattedValue].filter((v6) => v6 !== undefined).join(" "),
|
303200
|
-
error44
|
303201
|
-
];
|
303202
|
-
});
|
303203
|
-
|
303204
|
-
// src/prompts/smart-contract-set/subgraph-name.prompt.ts
|
303205
|
-
async function subgraphNamePrompt({
|
303206
|
-
defaultName,
|
303207
|
-
env: env2,
|
303208
|
-
accept
|
303209
|
-
}) {
|
303210
|
-
const defaultSubgraphName = defaultName ? sanitizeName(defaultName) : undefined;
|
303211
|
-
if (accept) {
|
303212
|
-
return defaultSubgraphName ?? env2.SETTLEMINT_THEGRAPH_DEFAULT_SUBGRAPH;
|
303213
|
-
}
|
303214
|
-
const subgraphName = await esm_default2({
|
303215
|
-
message: "What is the name of your subgraph?",
|
303216
|
-
default: defaultSubgraphName,
|
303217
|
-
required: true
|
303218
|
-
});
|
303219
|
-
return sanitizeName(subgraphName);
|
303220
|
-
}
|
303221
|
-
|
303222
|
-
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/key.js
|
303223
|
-
var isUpKey = (key2) => key2.name === "up" || key2.name === "k" || key2.ctrl && key2.name === "p";
|
303224
|
-
var isDownKey = (key2) => key2.name === "down" || key2.name === "j" || key2.ctrl && key2.name === "n";
|
303232
|
+
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/key.js
|
303225
303233
|
var isBackspaceKey2 = (key2) => key2.name === "backspace";
|
303226
|
-
var isNumberKey = (key2) => "1234567890".includes(key2.name);
|
303227
303234
|
var isEnterKey2 = (key2) => key2.name === "enter" || key2.name === "return";
|
303228
|
-
// ../../node_modules/@inquirer/
|
303235
|
+
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/errors.js
|
303229
303236
|
class AbortPromptError2 extends Error {
|
303230
303237
|
name = "AbortPromptError";
|
303231
303238
|
message = "Prompt was aborted";
|
@@ -303251,10 +303258,10 @@ class HookError2 extends Error {
|
|
303251
303258
|
class ValidationError2 extends Error {
|
303252
303259
|
name = "ValidationError";
|
303253
303260
|
}
|
303254
|
-
// ../../node_modules/@inquirer/
|
303261
|
+
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/use-state.js
|
303255
303262
|
import { AsyncResource as AsyncResource5 } from "node:async_hooks";
|
303256
303263
|
|
303257
|
-
// ../../node_modules/@inquirer/
|
303264
|
+
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/hook-engine.js
|
303258
303265
|
import { AsyncLocalStorage as AsyncLocalStorage2, AsyncResource as AsyncResource4 } from "node:async_hooks";
|
303259
303266
|
var hookStorage2 = new AsyncLocalStorage2;
|
303260
303267
|
function createStore2(rl) {
|
@@ -303359,7 +303366,7 @@ var effectScheduler2 = {
|
|
303359
303366
|
}
|
303360
303367
|
};
|
303361
303368
|
|
303362
|
-
// ../../node_modules/@inquirer/
|
303369
|
+
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/use-state.js
|
303363
303370
|
function useState2(defaultValue) {
|
303364
303371
|
return withPointer2((pointer) => {
|
303365
303372
|
const setState = AsyncResource5.bind(function setState(newValue) {
|
@@ -303377,7 +303384,7 @@ function useState2(defaultValue) {
|
|
303377
303384
|
});
|
303378
303385
|
}
|
303379
303386
|
|
303380
|
-
// ../../node_modules/@inquirer/
|
303387
|
+
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/use-effect.js
|
303381
303388
|
function useEffect2(cb, depArray) {
|
303382
303389
|
withPointer2((pointer) => {
|
303383
303390
|
const oldDeps = pointer.get();
|
@@ -303389,29 +303396,29 @@ function useEffect2(cb, depArray) {
|
|
303389
303396
|
});
|
303390
303397
|
}
|
303391
303398
|
|
303392
|
-
// ../../node_modules/@inquirer/
|
303393
|
-
var
|
303399
|
+
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/theme.js
|
303400
|
+
var import_yoctocolors_cjs3 = __toESM(require_yoctocolors_cjs(), 1);
|
303394
303401
|
var defaultTheme2 = {
|
303395
303402
|
prefix: {
|
303396
|
-
idle:
|
303397
|
-
done:
|
303403
|
+
idle: import_yoctocolors_cjs3.default.blue("?"),
|
303404
|
+
done: import_yoctocolors_cjs3.default.green(esm_default.tick)
|
303398
303405
|
},
|
303399
303406
|
spinner: {
|
303400
303407
|
interval: 80,
|
303401
|
-
frames: ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"].map((frame) =>
|
303408
|
+
frames: ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"].map((frame) => import_yoctocolors_cjs3.default.yellow(frame))
|
303402
303409
|
},
|
303403
303410
|
style: {
|
303404
|
-
answer:
|
303405
|
-
message:
|
303406
|
-
error: (text2) =>
|
303407
|
-
defaultAnswer: (text2) =>
|
303408
|
-
help:
|
303409
|
-
highlight:
|
303410
|
-
key: (text2) =>
|
303411
|
+
answer: import_yoctocolors_cjs3.default.cyan,
|
303412
|
+
message: import_yoctocolors_cjs3.default.bold,
|
303413
|
+
error: (text2) => import_yoctocolors_cjs3.default.red(`> ${text2}`),
|
303414
|
+
defaultAnswer: (text2) => import_yoctocolors_cjs3.default.dim(`(${text2})`),
|
303415
|
+
help: import_yoctocolors_cjs3.default.dim,
|
303416
|
+
highlight: import_yoctocolors_cjs3.default.cyan,
|
303417
|
+
key: (text2) => import_yoctocolors_cjs3.default.cyan(import_yoctocolors_cjs3.default.bold(`<${text2}>`))
|
303411
303418
|
}
|
303412
303419
|
};
|
303413
303420
|
|
303414
|
-
// ../../node_modules/@inquirer/
|
303421
|
+
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/make-theme.js
|
303415
303422
|
function isPlainObject6(value4) {
|
303416
303423
|
if (typeof value4 !== "object" || value4 === null)
|
303417
303424
|
return false;
|
@@ -303439,7 +303446,7 @@ function makeTheme2(...themes) {
|
|
303439
303446
|
return deepMerge3(...themesToMerge);
|
303440
303447
|
}
|
303441
303448
|
|
303442
|
-
// ../../node_modules/@inquirer/
|
303449
|
+
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/use-prefix.js
|
303443
303450
|
function usePrefix2({ status = "idle", theme }) {
|
303444
303451
|
const [showLoader, setShowLoader] = useState2(false);
|
303445
303452
|
const [tick, setTick] = useState2(0);
|
@@ -303469,23 +303476,12 @@ function usePrefix2({ status = "idle", theme }) {
|
|
303469
303476
|
const iconName = status === "loading" ? "idle" : status;
|
303470
303477
|
return typeof prefix === "string" ? prefix : prefix[iconName] ?? prefix["idle"];
|
303471
303478
|
}
|
303472
|
-
// ../../node_modules/@inquirer/
|
303473
|
-
function useMemo(fn, dependencies) {
|
303474
|
-
return withPointer2((pointer) => {
|
303475
|
-
const prev = pointer.get();
|
303476
|
-
if (!prev || prev.dependencies.length !== dependencies.length || prev.dependencies.some((dep, i6) => dep !== dependencies[i6])) {
|
303477
|
-
const value4 = fn();
|
303478
|
-
pointer.set({ value: value4, dependencies });
|
303479
|
-
return value4;
|
303480
|
-
}
|
303481
|
-
return prev.value;
|
303482
|
-
});
|
303483
|
-
}
|
303484
|
-
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/use-ref.js
|
303479
|
+
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/use-ref.js
|
303485
303480
|
function useRef2(val) {
|
303486
303481
|
return useState2({ current: val })[0];
|
303487
303482
|
}
|
303488
|
-
|
303483
|
+
|
303484
|
+
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/use-keypress.js
|
303489
303485
|
function useKeypress2(userHandler) {
|
303490
303486
|
const signal = useRef2(userHandler);
|
303491
303487
|
signal.current = userHandler;
|
@@ -303503,7 +303499,7 @@ function useKeypress2(userHandler) {
|
|
303503
303499
|
};
|
303504
303500
|
}, []);
|
303505
303501
|
}
|
303506
|
-
// ../../node_modules/@inquirer/
|
303502
|
+
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/utils.js
|
303507
303503
|
var import_cli_width2 = __toESM(require_cli_width(), 1);
|
303508
303504
|
var import_wrap_ansi2 = __toESM(require_wrap_ansi(), 1);
|
303509
303505
|
function breakLines2(content, width) {
|
@@ -303516,78 +303512,12 @@ function readlineWidth2() {
|
|
303516
303512
|
return import_cli_width2.default({ defaultWidth: 80, output: readline3().output });
|
303517
303513
|
}
|
303518
303514
|
|
303519
|
-
// ../../node_modules/@inquirer/
|
303520
|
-
function usePointerPosition({ active, renderedItems, pageSize, loop }) {
|
303521
|
-
const state = useRef2({
|
303522
|
-
lastPointer: active,
|
303523
|
-
lastActive: undefined
|
303524
|
-
});
|
303525
|
-
const { lastPointer, lastActive } = state.current;
|
303526
|
-
const middle = Math.floor(pageSize / 2);
|
303527
|
-
const renderedLength = renderedItems.reduce((acc, item) => acc + item.length, 0);
|
303528
|
-
const defaultPointerPosition = renderedItems.slice(0, active).reduce((acc, item) => acc + item.length, 0);
|
303529
|
-
let pointer = defaultPointerPosition;
|
303530
|
-
if (renderedLength > pageSize) {
|
303531
|
-
if (loop) {
|
303532
|
-
pointer = lastPointer;
|
303533
|
-
if (lastActive != null && lastActive < active && active - lastActive < pageSize) {
|
303534
|
-
pointer = Math.min(middle, Math.abs(active - lastActive) === 1 ? Math.min(lastPointer + (renderedItems[lastActive]?.length ?? 0), Math.max(defaultPointerPosition, lastPointer)) : lastPointer + active - lastActive);
|
303535
|
-
}
|
303536
|
-
} else {
|
303537
|
-
const spaceUnderActive = renderedItems.slice(active).reduce((acc, item) => acc + item.length, 0);
|
303538
|
-
pointer = spaceUnderActive < pageSize - middle ? pageSize - spaceUnderActive : Math.min(defaultPointerPosition, middle);
|
303539
|
-
}
|
303540
|
-
}
|
303541
|
-
state.current.lastPointer = pointer;
|
303542
|
-
state.current.lastActive = active;
|
303543
|
-
return pointer;
|
303544
|
-
}
|
303545
|
-
function usePagination({ items, active, renderItem, pageSize, loop = true }) {
|
303546
|
-
const width = readlineWidth2();
|
303547
|
-
const bound = (num) => (num % items.length + items.length) % items.length;
|
303548
|
-
const renderedItems = items.map((item, index) => {
|
303549
|
-
if (item == null)
|
303550
|
-
return [];
|
303551
|
-
return breakLines2(renderItem({ item, index, isActive: index === active }), width).split(`
|
303552
|
-
`);
|
303553
|
-
});
|
303554
|
-
const renderedLength = renderedItems.reduce((acc, item) => acc + item.length, 0);
|
303555
|
-
const renderItemAtIndex = (index) => renderedItems[index] ?? [];
|
303556
|
-
const pointer = usePointerPosition({ active, renderedItems, pageSize, loop });
|
303557
|
-
const activeItem = renderItemAtIndex(active).slice(0, pageSize);
|
303558
|
-
const activeItemPosition = pointer + activeItem.length <= pageSize ? pointer : pageSize - activeItem.length;
|
303559
|
-
const pageBuffer = Array.from({ length: pageSize });
|
303560
|
-
pageBuffer.splice(activeItemPosition, activeItem.length, ...activeItem);
|
303561
|
-
const itemVisited = new Set([active]);
|
303562
|
-
let bufferPointer = activeItemPosition + activeItem.length;
|
303563
|
-
let itemPointer = bound(active + 1);
|
303564
|
-
while (bufferPointer < pageSize && !itemVisited.has(itemPointer) && (loop && renderedLength > pageSize ? itemPointer !== active : itemPointer > active)) {
|
303565
|
-
const lines = renderItemAtIndex(itemPointer);
|
303566
|
-
const linesToAdd = lines.slice(0, pageSize - bufferPointer);
|
303567
|
-
pageBuffer.splice(bufferPointer, linesToAdd.length, ...linesToAdd);
|
303568
|
-
itemVisited.add(itemPointer);
|
303569
|
-
bufferPointer += linesToAdd.length;
|
303570
|
-
itemPointer = bound(itemPointer + 1);
|
303571
|
-
}
|
303572
|
-
bufferPointer = activeItemPosition - 1;
|
303573
|
-
itemPointer = bound(active - 1);
|
303574
|
-
while (bufferPointer >= 0 && !itemVisited.has(itemPointer) && (loop && renderedLength > pageSize ? itemPointer !== active : itemPointer < active)) {
|
303575
|
-
const lines = renderItemAtIndex(itemPointer);
|
303576
|
-
const linesToAdd = lines.slice(Math.max(0, lines.length - bufferPointer - 1));
|
303577
|
-
pageBuffer.splice(bufferPointer - linesToAdd.length + 1, linesToAdd.length, ...linesToAdd);
|
303578
|
-
itemVisited.add(itemPointer);
|
303579
|
-
bufferPointer -= linesToAdd.length;
|
303580
|
-
itemPointer = bound(itemPointer - 1);
|
303581
|
-
}
|
303582
|
-
return pageBuffer.filter((line) => typeof line === "string").join(`
|
303583
|
-
`);
|
303584
|
-
}
|
303585
|
-
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
|
303515
|
+
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
|
303586
303516
|
var import_mute_stream2 = __toESM(require_lib(), 1);
|
303587
303517
|
import * as readline4 from "node:readline";
|
303588
303518
|
import { AsyncResource as AsyncResource6 } from "node:async_hooks";
|
303589
303519
|
|
303590
|
-
// ../../node_modules/@inquirer/
|
303520
|
+
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/screen-manager.js
|
303591
303521
|
var import_ansi_escapes2 = __toESM(require_ansi_escapes(), 1);
|
303592
303522
|
import { stripVTControlCharacters as stripVTControlCharacters3 } from "node:util";
|
303593
303523
|
var height2 = (content) => content.split(`
|
@@ -303657,7 +303587,7 @@ class ScreenManager2 {
|
|
303657
303587
|
}
|
303658
303588
|
}
|
303659
303589
|
|
303660
|
-
// ../../node_modules/@inquirer/
|
303590
|
+
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/promise-polyfill.js
|
303661
303591
|
class PromisePolyfill2 extends Promise {
|
303662
303592
|
static withResolver() {
|
303663
303593
|
let resolve5;
|
@@ -303670,7 +303600,7 @@ class PromisePolyfill2 extends Promise {
|
|
303670
303600
|
}
|
303671
303601
|
}
|
303672
303602
|
|
303673
|
-
// ../../node_modules/@inquirer/
|
303603
|
+
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
|
303674
303604
|
function getCallSites2() {
|
303675
303605
|
const _prepareStackTrace = Error.prepareStackTrace;
|
303676
303606
|
let result = [];
|
@@ -303756,20 +303686,96 @@ function createPrompt2(view) {
|
|
303756
303686
|
};
|
303757
303687
|
return prompt;
|
303758
303688
|
}
|
303759
|
-
// ../../node_modules/@inquirer/
|
303760
|
-
var
|
303761
|
-
|
303762
|
-
|
303763
|
-
|
303764
|
-
|
303765
|
-
|
303766
|
-
|
303689
|
+
// ../../node_modules/@inquirer/input/dist/esm/index.js
|
303690
|
+
var inputTheme = {
|
303691
|
+
validationFailureMode: "keep"
|
303692
|
+
};
|
303693
|
+
var esm_default2 = createPrompt2((config4, done) => {
|
303694
|
+
const { required: required4, validate: validate3 = () => true, prefill = "tab" } = config4;
|
303695
|
+
const theme = makeTheme2(inputTheme, config4.theme);
|
303696
|
+
const [status, setStatus] = useState2("idle");
|
303697
|
+
const [defaultValue = "", setDefaultValue] = useState2(config4.default);
|
303698
|
+
const [errorMsg, setError] = useState2();
|
303699
|
+
const [value4, setValue] = useState2("");
|
303700
|
+
const prefix = usePrefix2({ status, theme });
|
303701
|
+
useKeypress2(async (key3, rl) => {
|
303702
|
+
if (status !== "idle") {
|
303703
|
+
return;
|
303767
303704
|
}
|
303705
|
+
if (isEnterKey2(key3)) {
|
303706
|
+
const answer = value4 || defaultValue;
|
303707
|
+
setStatus("loading");
|
303708
|
+
const isValid = required4 && !answer ? "You must provide a value" : await validate3(answer);
|
303709
|
+
if (isValid === true) {
|
303710
|
+
setValue(answer);
|
303711
|
+
setStatus("done");
|
303712
|
+
done(answer);
|
303713
|
+
} else {
|
303714
|
+
if (theme.validationFailureMode === "clear") {
|
303715
|
+
setValue("");
|
303716
|
+
} else {
|
303717
|
+
rl.write(value4);
|
303718
|
+
}
|
303719
|
+
setError(isValid || "You must provide a valid value");
|
303720
|
+
setStatus("idle");
|
303721
|
+
}
|
303722
|
+
} else if (isBackspaceKey2(key3) && !value4) {
|
303723
|
+
setDefaultValue(undefined);
|
303724
|
+
} else if (key3.name === "tab" && !value4) {
|
303725
|
+
setDefaultValue(undefined);
|
303726
|
+
rl.clearLine(0);
|
303727
|
+
rl.write(defaultValue);
|
303728
|
+
setValue(defaultValue);
|
303729
|
+
} else {
|
303730
|
+
setValue(rl.line);
|
303731
|
+
setError(undefined);
|
303732
|
+
}
|
303733
|
+
});
|
303734
|
+
useEffect2((rl) => {
|
303735
|
+
if (prefill === "editable" && defaultValue) {
|
303736
|
+
rl.write(defaultValue);
|
303737
|
+
setValue(defaultValue);
|
303738
|
+
}
|
303739
|
+
}, []);
|
303740
|
+
const message = theme.style.message(config4.message, status);
|
303741
|
+
let formattedValue = value4;
|
303742
|
+
if (typeof config4.transformer === "function") {
|
303743
|
+
formattedValue = config4.transformer(value4, { isFinal: status === "done" });
|
303744
|
+
} else if (status === "done") {
|
303745
|
+
formattedValue = theme.style.answer(value4);
|
303768
303746
|
}
|
303769
|
-
|
303770
|
-
|
303747
|
+
let defaultStr;
|
303748
|
+
if (defaultValue && status !== "done" && !value4) {
|
303749
|
+
defaultStr = theme.style.defaultAnswer(defaultValue);
|
303750
|
+
}
|
303751
|
+
let error44 = "";
|
303752
|
+
if (errorMsg) {
|
303753
|
+
error44 = theme.style.error(errorMsg);
|
303754
|
+
}
|
303755
|
+
return [
|
303756
|
+
[prefix, message, defaultStr, formattedValue].filter((v6) => v6 !== undefined).join(" "),
|
303757
|
+
error44
|
303758
|
+
];
|
303759
|
+
});
|
303760
|
+
|
303761
|
+
// src/prompts/smart-contract-set/subgraph-name.prompt.ts
|
303762
|
+
async function subgraphNamePrompt({
|
303763
|
+
defaultName,
|
303764
|
+
env: env2,
|
303765
|
+
accept
|
303766
|
+
}) {
|
303767
|
+
const defaultSubgraphName = defaultName ? sanitizeName(defaultName) : undefined;
|
303768
|
+
if (accept) {
|
303769
|
+
return defaultSubgraphName ?? env2.SETTLEMINT_THEGRAPH_DEFAULT_SUBGRAPH;
|
303771
303770
|
}
|
303771
|
+
const subgraphName = await esm_default2({
|
303772
|
+
message: "What is the name of your subgraph?",
|
303773
|
+
default: defaultSubgraphName,
|
303774
|
+
required: true
|
303775
|
+
});
|
303776
|
+
return sanitizeName(subgraphName);
|
303772
303777
|
}
|
303778
|
+
|
303773
303779
|
// ../../node_modules/@inquirer/select/dist/esm/index.js
|
303774
303780
|
var import_yoctocolors_cjs4 = __toESM(require_yoctocolors_cjs(), 1);
|
303775
303781
|
var import_ansi_escapes3 = __toESM(require_ansi_escapes(), 1);
|
@@ -303810,19 +303816,19 @@ function normalizeChoices(choices) {
|
|
303810
303816
|
return normalizedChoice;
|
303811
303817
|
});
|
303812
303818
|
}
|
303813
|
-
var esm_default3 =
|
303819
|
+
var esm_default3 = createPrompt((config4, done) => {
|
303814
303820
|
const { loop = true, pageSize = 7 } = config4;
|
303815
|
-
const firstRender =
|
303816
|
-
const theme =
|
303817
|
-
const [status, setStatus] =
|
303818
|
-
const prefix =
|
303819
|
-
const searchTimeoutRef =
|
303821
|
+
const firstRender = useRef(true);
|
303822
|
+
const theme = makeTheme(selectTheme, config4.theme);
|
303823
|
+
const [status, setStatus] = useState("idle");
|
303824
|
+
const prefix = usePrefix({ status, theme });
|
303825
|
+
const searchTimeoutRef = useRef();
|
303820
303826
|
const items = useMemo(() => normalizeChoices(config4.choices), [config4.choices]);
|
303821
303827
|
const bounds = useMemo(() => {
|
303822
303828
|
const first = items.findIndex(isSelectable);
|
303823
303829
|
const last = items.findLastIndex(isSelectable);
|
303824
303830
|
if (first === -1) {
|
303825
|
-
throw new
|
303831
|
+
throw new ValidationError("[select prompt] No selectable choices. All choices are disabled.");
|
303826
303832
|
}
|
303827
303833
|
return { first, last };
|
303828
303834
|
}, [items]);
|
@@ -303831,11 +303837,11 @@ var esm_default3 = createPrompt2((config4, done) => {
|
|
303831
303837
|
return -1;
|
303832
303838
|
return items.findIndex((item) => isSelectable(item) && item.value === config4.default);
|
303833
303839
|
}, [config4.default, items]);
|
303834
|
-
const [active, setActive] =
|
303840
|
+
const [active, setActive] = useState(defaultItemIndex === -1 ? bounds.first : defaultItemIndex);
|
303835
303841
|
const selectedChoice = items[active];
|
303836
|
-
|
303842
|
+
useKeypress((key3, rl) => {
|
303837
303843
|
clearTimeout(searchTimeoutRef.current);
|
303838
|
-
if (
|
303844
|
+
if (isEnterKey(key3)) {
|
303839
303845
|
setStatus("done");
|
303840
303846
|
done(selectedChoice.value);
|
303841
303847
|
} else if (isUpKey(key3) || isDownKey(key3)) {
|
@@ -303857,7 +303863,7 @@ var esm_default3 = createPrompt2((config4, done) => {
|
|
303857
303863
|
searchTimeoutRef.current = setTimeout(() => {
|
303858
303864
|
rl.clearLine(0);
|
303859
303865
|
}, 700);
|
303860
|
-
} else if (
|
303866
|
+
} else if (isBackspaceKey(key3)) {
|
303861
303867
|
rl.clearLine(0);
|
303862
303868
|
} else {
|
303863
303869
|
const searchTerm = rl.line.toLowerCase();
|
@@ -303874,7 +303880,7 @@ var esm_default3 = createPrompt2((config4, done) => {
|
|
303874
303880
|
}, 700);
|
303875
303881
|
}
|
303876
303882
|
});
|
303877
|
-
|
303883
|
+
useEffect(() => () => {
|
303878
303884
|
clearTimeout(searchTimeoutRef.current);
|
303879
303885
|
}, []);
|
303880
303886
|
const message = theme.style.message(config4.message, status);
|
@@ -321151,476 +321157,20 @@ var esm_default4 = createPrompt((config5, done) => {
|
|
321151
321157
|
return `${prefix} ${message}${defaultValue} ${formattedValue}`;
|
321152
321158
|
});
|
321153
321159
|
|
321154
|
-
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/key.js
|
321155
|
-
var isEnterKey3 = (key3) => key3.name === "enter" || key3.name === "return";
|
321156
|
-
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/errors.js
|
321157
|
-
class AbortPromptError3 extends Error {
|
321158
|
-
name = "AbortPromptError";
|
321159
|
-
message = "Prompt was aborted";
|
321160
|
-
constructor(options) {
|
321161
|
-
super();
|
321162
|
-
this.cause = options?.cause;
|
321163
|
-
}
|
321164
|
-
}
|
321165
|
-
|
321166
|
-
class CancelPromptError3 extends Error {
|
321167
|
-
name = "CancelPromptError";
|
321168
|
-
message = "Prompt was canceled";
|
321169
|
-
}
|
321170
|
-
|
321171
|
-
class ExitPromptError3 extends Error {
|
321172
|
-
name = "ExitPromptError";
|
321173
|
-
}
|
321174
|
-
|
321175
|
-
class HookError3 extends Error {
|
321176
|
-
name = "HookError";
|
321177
|
-
}
|
321178
|
-
|
321179
|
-
class ValidationError3 extends Error {
|
321180
|
-
name = "ValidationError";
|
321181
|
-
}
|
321182
|
-
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/use-state.js
|
321183
|
-
import { AsyncResource as AsyncResource8 } from "node:async_hooks";
|
321184
|
-
|
321185
|
-
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/hook-engine.js
|
321186
|
-
import { AsyncLocalStorage as AsyncLocalStorage3, AsyncResource as AsyncResource7 } from "node:async_hooks";
|
321187
|
-
var hookStorage3 = new AsyncLocalStorage3;
|
321188
|
-
function createStore3(rl) {
|
321189
|
-
const store = {
|
321190
|
-
rl,
|
321191
|
-
hooks: [],
|
321192
|
-
hooksCleanup: [],
|
321193
|
-
hooksEffect: [],
|
321194
|
-
index: 0,
|
321195
|
-
handleChange() {}
|
321196
|
-
};
|
321197
|
-
return store;
|
321198
|
-
}
|
321199
|
-
function withHooks3(rl, cb) {
|
321200
|
-
const store = createStore3(rl);
|
321201
|
-
return hookStorage3.run(store, () => {
|
321202
|
-
function cycle(render) {
|
321203
|
-
store.handleChange = () => {
|
321204
|
-
store.index = 0;
|
321205
|
-
render();
|
321206
|
-
};
|
321207
|
-
store.handleChange();
|
321208
|
-
}
|
321209
|
-
return cb(cycle);
|
321210
|
-
});
|
321211
|
-
}
|
321212
|
-
function getStore3() {
|
321213
|
-
const store = hookStorage3.getStore();
|
321214
|
-
if (!store) {
|
321215
|
-
throw new HookError3("[Inquirer] Hook functions can only be called from within a prompt");
|
321216
|
-
}
|
321217
|
-
return store;
|
321218
|
-
}
|
321219
|
-
function readline5() {
|
321220
|
-
return getStore3().rl;
|
321221
|
-
}
|
321222
|
-
function withUpdates3(fn) {
|
321223
|
-
const wrapped = (...args) => {
|
321224
|
-
const store = getStore3();
|
321225
|
-
let shouldUpdate = false;
|
321226
|
-
const oldHandleChange = store.handleChange;
|
321227
|
-
store.handleChange = () => {
|
321228
|
-
shouldUpdate = true;
|
321229
|
-
};
|
321230
|
-
const returnValue = fn(...args);
|
321231
|
-
if (shouldUpdate) {
|
321232
|
-
oldHandleChange();
|
321233
|
-
}
|
321234
|
-
store.handleChange = oldHandleChange;
|
321235
|
-
return returnValue;
|
321236
|
-
};
|
321237
|
-
return AsyncResource7.bind(wrapped);
|
321238
|
-
}
|
321239
|
-
function withPointer3(cb) {
|
321240
|
-
const store = getStore3();
|
321241
|
-
const { index: index2 } = store;
|
321242
|
-
const pointer = {
|
321243
|
-
get() {
|
321244
|
-
return store.hooks[index2];
|
321245
|
-
},
|
321246
|
-
set(value4) {
|
321247
|
-
store.hooks[index2] = value4;
|
321248
|
-
},
|
321249
|
-
initialized: index2 in store.hooks
|
321250
|
-
};
|
321251
|
-
const returnValue = cb(pointer);
|
321252
|
-
store.index++;
|
321253
|
-
return returnValue;
|
321254
|
-
}
|
321255
|
-
function handleChange3() {
|
321256
|
-
getStore3().handleChange();
|
321257
|
-
}
|
321258
|
-
var effectScheduler3 = {
|
321259
|
-
queue(cb) {
|
321260
|
-
const store = getStore3();
|
321261
|
-
const { index: index2 } = store;
|
321262
|
-
store.hooksEffect.push(() => {
|
321263
|
-
store.hooksCleanup[index2]?.();
|
321264
|
-
const cleanFn = cb(readline5());
|
321265
|
-
if (cleanFn != null && typeof cleanFn !== "function") {
|
321266
|
-
throw new ValidationError3("useEffect return value must be a cleanup function or nothing.");
|
321267
|
-
}
|
321268
|
-
store.hooksCleanup[index2] = cleanFn;
|
321269
|
-
});
|
321270
|
-
},
|
321271
|
-
run() {
|
321272
|
-
const store = getStore3();
|
321273
|
-
withUpdates3(() => {
|
321274
|
-
store.hooksEffect.forEach((effect) => {
|
321275
|
-
effect();
|
321276
|
-
});
|
321277
|
-
store.hooksEffect.length = 0;
|
321278
|
-
})();
|
321279
|
-
},
|
321280
|
-
clearAll() {
|
321281
|
-
const store = getStore3();
|
321282
|
-
store.hooksCleanup.forEach((cleanFn) => {
|
321283
|
-
cleanFn?.();
|
321284
|
-
});
|
321285
|
-
store.hooksEffect.length = 0;
|
321286
|
-
store.hooksCleanup.length = 0;
|
321287
|
-
}
|
321288
|
-
};
|
321289
|
-
|
321290
|
-
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/use-state.js
|
321291
|
-
function useState3(defaultValue) {
|
321292
|
-
return withPointer3((pointer) => {
|
321293
|
-
const setState = AsyncResource8.bind(function setState(newValue) {
|
321294
|
-
if (pointer.get() !== newValue) {
|
321295
|
-
pointer.set(newValue);
|
321296
|
-
handleChange3();
|
321297
|
-
}
|
321298
|
-
});
|
321299
|
-
if (pointer.initialized) {
|
321300
|
-
return [pointer.get(), setState];
|
321301
|
-
}
|
321302
|
-
const value4 = typeof defaultValue === "function" ? defaultValue() : defaultValue;
|
321303
|
-
pointer.set(value4);
|
321304
|
-
return [value4, setState];
|
321305
|
-
});
|
321306
|
-
}
|
321307
|
-
|
321308
|
-
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/use-effect.js
|
321309
|
-
function useEffect3(cb, depArray) {
|
321310
|
-
withPointer3((pointer) => {
|
321311
|
-
const oldDeps = pointer.get();
|
321312
|
-
const hasChanged = !Array.isArray(oldDeps) || depArray.some((dep, i6) => !Object.is(dep, oldDeps[i6]));
|
321313
|
-
if (hasChanged) {
|
321314
|
-
effectScheduler3.queue(cb);
|
321315
|
-
}
|
321316
|
-
pointer.set(depArray);
|
321317
|
-
});
|
321318
|
-
}
|
321319
|
-
|
321320
|
-
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/theme.js
|
321321
|
-
var import_yoctocolors_cjs5 = __toESM(require_yoctocolors_cjs(), 1);
|
321322
|
-
var defaultTheme3 = {
|
321323
|
-
prefix: {
|
321324
|
-
idle: import_yoctocolors_cjs5.default.blue("?"),
|
321325
|
-
done: import_yoctocolors_cjs5.default.green(esm_default.tick)
|
321326
|
-
},
|
321327
|
-
spinner: {
|
321328
|
-
interval: 80,
|
321329
|
-
frames: ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"].map((frame) => import_yoctocolors_cjs5.default.yellow(frame))
|
321330
|
-
},
|
321331
|
-
style: {
|
321332
|
-
answer: import_yoctocolors_cjs5.default.cyan,
|
321333
|
-
message: import_yoctocolors_cjs5.default.bold,
|
321334
|
-
error: (text2) => import_yoctocolors_cjs5.default.red(`> ${text2}`),
|
321335
|
-
defaultAnswer: (text2) => import_yoctocolors_cjs5.default.dim(`(${text2})`),
|
321336
|
-
help: import_yoctocolors_cjs5.default.dim,
|
321337
|
-
highlight: import_yoctocolors_cjs5.default.cyan,
|
321338
|
-
key: (text2) => import_yoctocolors_cjs5.default.cyan(import_yoctocolors_cjs5.default.bold(`<${text2}>`))
|
321339
|
-
}
|
321340
|
-
};
|
321341
|
-
|
321342
|
-
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/make-theme.js
|
321343
|
-
function isPlainObject8(value4) {
|
321344
|
-
if (typeof value4 !== "object" || value4 === null)
|
321345
|
-
return false;
|
321346
|
-
let proto = value4;
|
321347
|
-
while (Object.getPrototypeOf(proto) !== null) {
|
321348
|
-
proto = Object.getPrototypeOf(proto);
|
321349
|
-
}
|
321350
|
-
return Object.getPrototypeOf(value4) === proto;
|
321351
|
-
}
|
321352
|
-
function deepMerge4(...objects) {
|
321353
|
-
const output = {};
|
321354
|
-
for (const obj of objects) {
|
321355
|
-
for (const [key3, value4] of Object.entries(obj)) {
|
321356
|
-
const prevValue = output[key3];
|
321357
|
-
output[key3] = isPlainObject8(prevValue) && isPlainObject8(value4) ? deepMerge4(prevValue, value4) : value4;
|
321358
|
-
}
|
321359
|
-
}
|
321360
|
-
return output;
|
321361
|
-
}
|
321362
|
-
function makeTheme3(...themes) {
|
321363
|
-
const themesToMerge = [
|
321364
|
-
defaultTheme3,
|
321365
|
-
...themes.filter((theme) => theme != null)
|
321366
|
-
];
|
321367
|
-
return deepMerge4(...themesToMerge);
|
321368
|
-
}
|
321369
|
-
|
321370
|
-
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/use-prefix.js
|
321371
|
-
function usePrefix3({ status = "idle", theme }) {
|
321372
|
-
const [showLoader, setShowLoader] = useState3(false);
|
321373
|
-
const [tick, setTick] = useState3(0);
|
321374
|
-
const { prefix, spinner: spinner2 } = makeTheme3(theme);
|
321375
|
-
useEffect3(() => {
|
321376
|
-
if (status === "loading") {
|
321377
|
-
let tickInterval;
|
321378
|
-
let inc = -1;
|
321379
|
-
const delayTimeout = setTimeout(() => {
|
321380
|
-
setShowLoader(true);
|
321381
|
-
tickInterval = setInterval(() => {
|
321382
|
-
inc = inc + 1;
|
321383
|
-
setTick(inc % spinner2.frames.length);
|
321384
|
-
}, spinner2.interval);
|
321385
|
-
}, 300);
|
321386
|
-
return () => {
|
321387
|
-
clearTimeout(delayTimeout);
|
321388
|
-
clearInterval(tickInterval);
|
321389
|
-
};
|
321390
|
-
} else {
|
321391
|
-
setShowLoader(false);
|
321392
|
-
}
|
321393
|
-
}, [status]);
|
321394
|
-
if (showLoader) {
|
321395
|
-
return spinner2.frames[tick];
|
321396
|
-
}
|
321397
|
-
const iconName = status === "loading" ? "idle" : status;
|
321398
|
-
return typeof prefix === "string" ? prefix : prefix[iconName] ?? prefix["idle"];
|
321399
|
-
}
|
321400
|
-
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/use-ref.js
|
321401
|
-
function useRef3(val) {
|
321402
|
-
return useState3({ current: val })[0];
|
321403
|
-
}
|
321404
|
-
|
321405
|
-
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/use-keypress.js
|
321406
|
-
function useKeypress3(userHandler) {
|
321407
|
-
const signal = useRef3(userHandler);
|
321408
|
-
signal.current = userHandler;
|
321409
|
-
useEffect3((rl) => {
|
321410
|
-
let ignore = false;
|
321411
|
-
const handler = withUpdates3((_input, event) => {
|
321412
|
-
if (ignore)
|
321413
|
-
return;
|
321414
|
-
signal.current(event, rl);
|
321415
|
-
});
|
321416
|
-
rl.input.on("keypress", handler);
|
321417
|
-
return () => {
|
321418
|
-
ignore = true;
|
321419
|
-
rl.input.removeListener("keypress", handler);
|
321420
|
-
};
|
321421
|
-
}, []);
|
321422
|
-
}
|
321423
|
-
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/utils.js
|
321424
|
-
var import_cli_width3 = __toESM(require_cli_width(), 1);
|
321425
|
-
var import_wrap_ansi3 = __toESM(require_wrap_ansi(), 1);
|
321426
|
-
function breakLines3(content, width) {
|
321427
|
-
return content.split(`
|
321428
|
-
`).flatMap((line) => import_wrap_ansi3.default(line, width, { trim: false, hard: true }).split(`
|
321429
|
-
`).map((str) => str.trimEnd())).join(`
|
321430
|
-
`);
|
321431
|
-
}
|
321432
|
-
function readlineWidth3() {
|
321433
|
-
return import_cli_width3.default({ defaultWidth: 80, output: readline5().output });
|
321434
|
-
}
|
321435
|
-
|
321436
|
-
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
|
321437
|
-
var import_mute_stream3 = __toESM(require_lib(), 1);
|
321438
|
-
import * as readline6 from "node:readline";
|
321439
|
-
import { AsyncResource as AsyncResource9 } from "node:async_hooks";
|
321440
|
-
|
321441
|
-
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/screen-manager.js
|
321442
|
-
var import_ansi_escapes4 = __toESM(require_ansi_escapes(), 1);
|
321443
|
-
import { stripVTControlCharacters as stripVTControlCharacters4 } from "node:util";
|
321444
|
-
var height3 = (content) => content.split(`
|
321445
|
-
`).length;
|
321446
|
-
var lastLine3 = (content) => content.split(`
|
321447
|
-
`).pop() ?? "";
|
321448
|
-
function cursorDown3(n6) {
|
321449
|
-
return n6 > 0 ? import_ansi_escapes4.default.cursorDown(n6) : "";
|
321450
|
-
}
|
321451
|
-
|
321452
|
-
class ScreenManager3 {
|
321453
|
-
height = 0;
|
321454
|
-
extraLinesUnderPrompt = 0;
|
321455
|
-
cursorPos;
|
321456
|
-
rl;
|
321457
|
-
constructor(rl) {
|
321458
|
-
this.rl = rl;
|
321459
|
-
this.cursorPos = rl.getCursorPos();
|
321460
|
-
}
|
321461
|
-
write(content) {
|
321462
|
-
this.rl.output.unmute();
|
321463
|
-
this.rl.output.write(content);
|
321464
|
-
this.rl.output.mute();
|
321465
|
-
}
|
321466
|
-
render(content, bottomContent = "") {
|
321467
|
-
const promptLine = lastLine3(content);
|
321468
|
-
const rawPromptLine = stripVTControlCharacters4(promptLine);
|
321469
|
-
let prompt = rawPromptLine;
|
321470
|
-
if (this.rl.line.length > 0) {
|
321471
|
-
prompt = prompt.slice(0, -this.rl.line.length);
|
321472
|
-
}
|
321473
|
-
this.rl.setPrompt(prompt);
|
321474
|
-
this.cursorPos = this.rl.getCursorPos();
|
321475
|
-
const width = readlineWidth3();
|
321476
|
-
content = breakLines3(content, width);
|
321477
|
-
bottomContent = breakLines3(bottomContent, width);
|
321478
|
-
if (rawPromptLine.length % width === 0) {
|
321479
|
-
content += `
|
321480
|
-
`;
|
321481
|
-
}
|
321482
|
-
let output = content + (bottomContent ? `
|
321483
|
-
` + bottomContent : "");
|
321484
|
-
const promptLineUpDiff = Math.floor(rawPromptLine.length / width) - this.cursorPos.rows;
|
321485
|
-
const bottomContentHeight = promptLineUpDiff + (bottomContent ? height3(bottomContent) : 0);
|
321486
|
-
if (bottomContentHeight > 0)
|
321487
|
-
output += import_ansi_escapes4.default.cursorUp(bottomContentHeight);
|
321488
|
-
output += import_ansi_escapes4.default.cursorTo(this.cursorPos.cols);
|
321489
|
-
this.write(cursorDown3(this.extraLinesUnderPrompt) + import_ansi_escapes4.default.eraseLines(this.height) + output);
|
321490
|
-
this.extraLinesUnderPrompt = bottomContentHeight;
|
321491
|
-
this.height = height3(output);
|
321492
|
-
}
|
321493
|
-
checkCursorPos() {
|
321494
|
-
const cursorPos = this.rl.getCursorPos();
|
321495
|
-
if (cursorPos.cols !== this.cursorPos.cols) {
|
321496
|
-
this.write(import_ansi_escapes4.default.cursorTo(cursorPos.cols));
|
321497
|
-
this.cursorPos = cursorPos;
|
321498
|
-
}
|
321499
|
-
}
|
321500
|
-
done({ clearContent }) {
|
321501
|
-
this.rl.setPrompt("");
|
321502
|
-
let output = cursorDown3(this.extraLinesUnderPrompt);
|
321503
|
-
output += clearContent ? import_ansi_escapes4.default.eraseLines(this.height) : `
|
321504
|
-
`;
|
321505
|
-
output += import_ansi_escapes4.default.cursorShow;
|
321506
|
-
this.write(output);
|
321507
|
-
this.rl.close();
|
321508
|
-
}
|
321509
|
-
}
|
321510
|
-
|
321511
|
-
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/promise-polyfill.js
|
321512
|
-
class PromisePolyfill3 extends Promise {
|
321513
|
-
static withResolver() {
|
321514
|
-
let resolve6;
|
321515
|
-
let reject;
|
321516
|
-
const promise5 = new Promise((res, rej) => {
|
321517
|
-
resolve6 = res;
|
321518
|
-
reject = rej;
|
321519
|
-
});
|
321520
|
-
return { promise: promise5, resolve: resolve6, reject };
|
321521
|
-
}
|
321522
|
-
}
|
321523
|
-
|
321524
|
-
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
|
321525
|
-
function getCallSites3() {
|
321526
|
-
const _prepareStackTrace = Error.prepareStackTrace;
|
321527
|
-
let result = [];
|
321528
|
-
try {
|
321529
|
-
Error.prepareStackTrace = (_5, callSites) => {
|
321530
|
-
const callSitesWithoutCurrent = callSites.slice(1);
|
321531
|
-
result = callSitesWithoutCurrent;
|
321532
|
-
return callSitesWithoutCurrent;
|
321533
|
-
};
|
321534
|
-
new Error().stack;
|
321535
|
-
} catch {
|
321536
|
-
return result;
|
321537
|
-
}
|
321538
|
-
Error.prepareStackTrace = _prepareStackTrace;
|
321539
|
-
return result;
|
321540
|
-
}
|
321541
|
-
function createPrompt3(view) {
|
321542
|
-
const callSites = getCallSites3();
|
321543
|
-
const prompt = (config5, context = {}) => {
|
321544
|
-
const { input = process.stdin, signal } = context;
|
321545
|
-
const cleanups = new Set;
|
321546
|
-
const output = new import_mute_stream3.default;
|
321547
|
-
output.pipe(context.output ?? process.stdout);
|
321548
|
-
const rl = readline6.createInterface({
|
321549
|
-
terminal: true,
|
321550
|
-
input,
|
321551
|
-
output
|
321552
|
-
});
|
321553
|
-
const screen = new ScreenManager3(rl);
|
321554
|
-
const { promise: promise5, resolve: resolve6, reject } = PromisePolyfill3.withResolver();
|
321555
|
-
const cancel3 = () => reject(new CancelPromptError3);
|
321556
|
-
if (signal) {
|
321557
|
-
const abort = () => reject(new AbortPromptError3({ cause: signal.reason }));
|
321558
|
-
if (signal.aborted) {
|
321559
|
-
abort();
|
321560
|
-
return Object.assign(promise5, { cancel: cancel3 });
|
321561
|
-
}
|
321562
|
-
signal.addEventListener("abort", abort);
|
321563
|
-
cleanups.add(() => signal.removeEventListener("abort", abort));
|
321564
|
-
}
|
321565
|
-
cleanups.add(onExit((code2, signal2) => {
|
321566
|
-
reject(new ExitPromptError3(`User force closed the prompt with ${code2} ${signal2}`));
|
321567
|
-
}));
|
321568
|
-
const sigint = () => reject(new ExitPromptError3(`User force closed the prompt with SIGINT`));
|
321569
|
-
rl.on("SIGINT", sigint);
|
321570
|
-
cleanups.add(() => rl.removeListener("SIGINT", sigint));
|
321571
|
-
const checkCursorPos = () => screen.checkCursorPos();
|
321572
|
-
rl.input.on("keypress", checkCursorPos);
|
321573
|
-
cleanups.add(() => rl.input.removeListener("keypress", checkCursorPos));
|
321574
|
-
return withHooks3(rl, (cycle) => {
|
321575
|
-
const hooksCleanup = AsyncResource9.bind(() => effectScheduler3.clearAll());
|
321576
|
-
rl.on("close", hooksCleanup);
|
321577
|
-
cleanups.add(() => rl.removeListener("close", hooksCleanup));
|
321578
|
-
cycle(() => {
|
321579
|
-
try {
|
321580
|
-
const nextView = view(config5, (value4) => {
|
321581
|
-
setImmediate(() => resolve6(value4));
|
321582
|
-
});
|
321583
|
-
if (nextView === undefined) {
|
321584
|
-
const callerFilename = callSites[1]?.getFileName();
|
321585
|
-
throw new Error(`Prompt functions must return a string.
|
321586
|
-
at ${callerFilename}`);
|
321587
|
-
}
|
321588
|
-
const [content, bottomContent] = typeof nextView === "string" ? [nextView] : nextView;
|
321589
|
-
screen.render(content, bottomContent);
|
321590
|
-
effectScheduler3.run();
|
321591
|
-
} catch (error45) {
|
321592
|
-
reject(error45);
|
321593
|
-
}
|
321594
|
-
});
|
321595
|
-
return Object.assign(promise5.then((answer) => {
|
321596
|
-
effectScheduler3.clearAll();
|
321597
|
-
return answer;
|
321598
|
-
}, (error45) => {
|
321599
|
-
effectScheduler3.clearAll();
|
321600
|
-
throw error45;
|
321601
|
-
}).finally(() => {
|
321602
|
-
cleanups.forEach((cleanup) => cleanup());
|
321603
|
-
screen.done({ clearContent: Boolean(context.clearPromptOnDone) });
|
321604
|
-
output.end();
|
321605
|
-
}).then(() => promise5), { cancel: cancel3 });
|
321606
|
-
});
|
321607
|
-
};
|
321608
|
-
return prompt;
|
321609
|
-
}
|
321610
321160
|
// ../../node_modules/@inquirer/password/dist/esm/index.js
|
321611
|
-
var
|
321612
|
-
var esm_default5 =
|
321161
|
+
var import_ansi_escapes4 = __toESM(require_ansi_escapes(), 1);
|
321162
|
+
var esm_default5 = createPrompt((config5, done) => {
|
321613
321163
|
const { validate: validate5 = () => true } = config5;
|
321614
|
-
const theme =
|
321615
|
-
const [status, setStatus] =
|
321616
|
-
const [errorMsg, setError] =
|
321617
|
-
const [value4, setValue] =
|
321618
|
-
const prefix =
|
321619
|
-
|
321164
|
+
const theme = makeTheme(config5.theme);
|
321165
|
+
const [status, setStatus] = useState("idle");
|
321166
|
+
const [errorMsg, setError] = useState();
|
321167
|
+
const [value4, setValue] = useState("");
|
321168
|
+
const prefix = usePrefix({ status, theme });
|
321169
|
+
useKeypress(async (key3, rl) => {
|
321620
321170
|
if (status !== "idle") {
|
321621
321171
|
return;
|
321622
321172
|
}
|
321623
|
-
if (
|
321173
|
+
if (isEnterKey(key3)) {
|
321624
321174
|
const answer = value4;
|
321625
321175
|
setStatus("loading");
|
321626
321176
|
const isValid = await validate5(answer);
|
@@ -321645,7 +321195,7 @@ var esm_default5 = createPrompt3((config5, done) => {
|
|
321645
321195
|
const maskChar = typeof config5.mask === "string" ? config5.mask : "*";
|
321646
321196
|
formattedValue = maskChar.repeat(value4.length);
|
321647
321197
|
} else if (status !== "done") {
|
321648
|
-
helpTip = `${theme.style.help("[input is masked]")}${
|
321198
|
+
helpTip = `${theme.style.help("[input is masked]")}${import_ansi_escapes4.default.cursorHide}`;
|
321649
321199
|
}
|
321650
321200
|
if (status === "done") {
|
321651
321201
|
formattedValue = theme.style.answer(formattedValue);
|
@@ -323376,7 +322926,7 @@ var basename2 = function(p5, extension) {
|
|
323376
322926
|
return extension && lastSegment.endsWith(extension) ? lastSegment.slice(0, -extension.length) : lastSegment;
|
323377
322927
|
};
|
323378
322928
|
// ../../node_modules/defu/dist/defu.mjs
|
323379
|
-
function
|
322929
|
+
function isPlainObject8(value4) {
|
323380
322930
|
if (value4 === null || typeof value4 !== "object") {
|
323381
322931
|
return false;
|
323382
322932
|
}
|
@@ -323393,27 +322943,27 @@ function isPlainObject9(value4) {
|
|
323393
322943
|
return true;
|
323394
322944
|
}
|
323395
322945
|
function _defu(baseObject, defaults4, namespace = ".", merger) {
|
323396
|
-
if (!
|
322946
|
+
if (!isPlainObject8(defaults4)) {
|
323397
322947
|
return _defu(baseObject, {}, namespace, merger);
|
323398
322948
|
}
|
323399
322949
|
const object5 = Object.assign({}, defaults4);
|
323400
|
-
for (const
|
323401
|
-
if (
|
322950
|
+
for (const key3 in baseObject) {
|
322951
|
+
if (key3 === "__proto__" || key3 === "constructor") {
|
323402
322952
|
continue;
|
323403
322953
|
}
|
323404
|
-
const value4 = baseObject[
|
322954
|
+
const value4 = baseObject[key3];
|
323405
322955
|
if (value4 === null || value4 === undefined) {
|
323406
322956
|
continue;
|
323407
322957
|
}
|
323408
|
-
if (merger && merger(object5,
|
322958
|
+
if (merger && merger(object5, key3, value4, namespace)) {
|
323409
322959
|
continue;
|
323410
322960
|
}
|
323411
|
-
if (Array.isArray(value4) && Array.isArray(object5[
|
323412
|
-
object5[
|
323413
|
-
} else if (
|
323414
|
-
object5[
|
322961
|
+
if (Array.isArray(value4) && Array.isArray(object5[key3])) {
|
322962
|
+
object5[key3] = [...value4, ...object5[key3]];
|
322963
|
+
} else if (isPlainObject8(value4) && isPlainObject8(object5[key3])) {
|
322964
|
+
object5[key3] = _defu(value4, object5[key3], (namespace ? `${namespace}.` : "") + key3.toString(), merger);
|
323415
322965
|
} else {
|
323416
|
-
object5[
|
322966
|
+
object5[key3] = value4;
|
323417
322967
|
}
|
323418
322968
|
}
|
323419
322969
|
return object5;
|
@@ -323422,15 +322972,15 @@ function createDefu(merger) {
|
|
323422
322972
|
return (...arguments_4) => arguments_4.reduce((p5, c3) => _defu(p5, c3, "", merger), {});
|
323423
322973
|
}
|
323424
322974
|
var defu = createDefu();
|
323425
|
-
var defuFn = createDefu((object5,
|
323426
|
-
if (object5[
|
323427
|
-
object5[
|
322975
|
+
var defuFn = createDefu((object5, key3, currentValue) => {
|
322976
|
+
if (object5[key3] !== undefined && typeof currentValue === "function") {
|
322977
|
+
object5[key3] = currentValue(object5[key3]);
|
323428
322978
|
return true;
|
323429
322979
|
}
|
323430
322980
|
});
|
323431
|
-
var defuArrayFn = createDefu((object5,
|
323432
|
-
if (Array.isArray(object5[
|
323433
|
-
object5[
|
322981
|
+
var defuArrayFn = createDefu((object5, key3, currentValue) => {
|
322982
|
+
if (Array.isArray(object5[key3]) && typeof currentValue === "function") {
|
322983
|
+
object5[key3] = currentValue(object5[key3]);
|
323434
322984
|
return true;
|
323435
322985
|
}
|
323436
322986
|
});
|
@@ -326640,11 +326190,11 @@ function cacheDirectory() {
|
|
326640
326190
|
}
|
326641
326191
|
function normalizeHeaders(headers = {}) {
|
326642
326192
|
const normalized = {};
|
326643
|
-
for (const [
|
326193
|
+
for (const [key3, value4] of Object.entries(headers)) {
|
326644
326194
|
if (!value4) {
|
326645
326195
|
continue;
|
326646
326196
|
}
|
326647
|
-
normalized[
|
326197
|
+
normalized[key3.toLowerCase()] = value4;
|
326648
326198
|
}
|
326649
326199
|
return normalized;
|
326650
326200
|
}
|
@@ -329850,7 +329400,7 @@ function jsonOutput(data) {
|
|
329850
329400
|
var composer = require_composer();
|
329851
329401
|
var Document = require_Document();
|
329852
329402
|
var Schema = require_Schema();
|
329853
|
-
var
|
329403
|
+
var errors5 = require_errors3();
|
329854
329404
|
var Alias = require_Alias();
|
329855
329405
|
var identity2 = require_identity();
|
329856
329406
|
var Pair = require_Pair();
|
@@ -329866,9 +329416,9 @@ var visit2 = require_visit();
|
|
329866
329416
|
var $Composer = composer.Composer;
|
329867
329417
|
var $Document = Document.Document;
|
329868
329418
|
var $Schema = Schema.Schema;
|
329869
|
-
var $YAMLError =
|
329870
|
-
var $YAMLParseError =
|
329871
|
-
var $YAMLWarning =
|
329419
|
+
var $YAMLError = errors5.YAMLError;
|
329420
|
+
var $YAMLParseError = errors5.YAMLParseError;
|
329421
|
+
var $YAMLWarning = errors5.YAMLWarning;
|
329872
329422
|
var $Alias = Alias.Alias;
|
329873
329423
|
var $isAlias = identity2.isAlias;
|
329874
329424
|
var $isCollection = identity2.isCollection;
|
@@ -330475,11 +330025,11 @@ function createCommand4() {
|
|
330475
330025
|
|
330476
330026
|
// src/utils/commands/passthrough-options.ts
|
330477
330027
|
function mapPassthroughOptions(options, command) {
|
330478
|
-
const optionArgs = Object.entries(options).map(([
|
330028
|
+
const optionArgs = Object.entries(options).map(([key3, value4]) => {
|
330479
330029
|
if (value4 === true) {
|
330480
|
-
return `--${
|
330030
|
+
return `--${key3}`;
|
330481
330031
|
}
|
330482
|
-
return `--${
|
330032
|
+
return `--${key3}=${value4}`;
|
330483
330033
|
});
|
330484
330034
|
return [...optionArgs, ...command.args];
|
330485
330035
|
}
|
@@ -331707,4 +331257,4 @@ async function sdkCliCommand(argv = process.argv) {
|
|
331707
331257
|
// src/cli.ts
|
331708
331258
|
sdkCliCommand();
|
331709
331259
|
|
331710
|
-
//# debugId=
|
331260
|
+
//# debugId=8DF1DD12D908347564756E2164756E21
|