@settlemint/sdk-cli 2.6.2-pr54b9710c → 2.6.2-pr58a3d130
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 +461 -919
- package/dist/cli.js.map +10 -24
- package/package.json +10 -10
package/dist/cli.js
CHANGED
@@ -161542,7 +161542,7 @@ ${lanes.join(`
|
|
161542
161542
|
function generateOptionOutput(sys2, option, rightAlignOfLeft, leftAlignOfRight) {
|
161543
161543
|
var _a;
|
161544
161544
|
const text = [];
|
161545
|
-
const
|
161545
|
+
const colors3 = createColors(sys2);
|
161546
161546
|
const name2 = getDisplayNameTextOfOption(option);
|
161547
161547
|
const valueCandidates = getValueCandidate(option);
|
161548
161548
|
const defaultValueDescription = typeof option.defaultValueDescription === "object" ? getDiagnosticText(option.defaultValueDescription) : formatDefaultValue(option.defaultValueDescription, option.type === "list" || option.type === "listOrElement" ? option.element.type : option.type);
|
@@ -161563,7 +161563,7 @@ ${lanes.join(`
|
|
161563
161563
|
}
|
161564
161564
|
text.push(sys2.newLine);
|
161565
161565
|
} else {
|
161566
|
-
text.push(
|
161566
|
+
text.push(colors3.blue(name2), sys2.newLine);
|
161567
161567
|
if (option.description) {
|
161568
161568
|
const description3 = getDiagnosticText(option.description);
|
161569
161569
|
text.push(description3);
|
@@ -161608,7 +161608,7 @@ ${lanes.join(`
|
|
161608
161608
|
if (isFirstLine) {
|
161609
161609
|
curLeft = left.padStart(rightAlignOfLeft2);
|
161610
161610
|
curLeft = curLeft.padEnd(leftAlignOfRight2);
|
161611
|
-
curLeft = colorLeft ?
|
161611
|
+
curLeft = colorLeft ? colors3.blue(curLeft) : curLeft;
|
161612
161612
|
} else {
|
161613
161613
|
curLeft = "".padStart(leftAlignOfRight2);
|
161614
161614
|
}
|
@@ -161720,9 +161720,9 @@ ${lanes.join(`
|
|
161720
161720
|
return res;
|
161721
161721
|
}
|
161722
161722
|
function printEasyHelp(sys2, simpleOptions) {
|
161723
|
-
const
|
161723
|
+
const colors3 = createColors(sys2);
|
161724
161724
|
let output = [...getHeader(sys2, `${getDiagnosticText(Diagnostics.tsc_Colon_The_TypeScript_Compiler)} - ${getDiagnosticText(Diagnostics.Version_0, version2)}`)];
|
161725
|
-
output.push(
|
161725
|
+
output.push(colors3.bold(getDiagnosticText(Diagnostics.COMMON_COMMANDS)) + sys2.newLine + sys2.newLine);
|
161726
161726
|
example("tsc", Diagnostics.Compiles_the_current_project_tsconfig_json_in_the_working_directory);
|
161727
161727
|
example("tsc app.ts util.ts", Diagnostics.Ignoring_tsconfig_json_compiles_the_specified_files_with_default_compiler_options);
|
161728
161728
|
example("tsc -b", Diagnostics.Build_a_composite_project_in_the_working_directory);
|
@@ -161743,7 +161743,7 @@ ${lanes.join(`
|
|
161743
161743
|
function example(ex, desc) {
|
161744
161744
|
const examples = typeof ex === "string" ? [ex] : ex;
|
161745
161745
|
for (const example2 of examples) {
|
161746
|
-
output.push(" " +
|
161746
|
+
output.push(" " + colors3.blue(example2) + sys2.newLine);
|
161747
161747
|
}
|
161748
161748
|
output.push(" " + getDiagnosticText(desc) + sys2.newLine + sys2.newLine);
|
161749
161749
|
}
|
@@ -161766,12 +161766,12 @@ ${lanes.join(`
|
|
161766
161766
|
}
|
161767
161767
|
function getHeader(sys2, message) {
|
161768
161768
|
var _a;
|
161769
|
-
const
|
161769
|
+
const colors3 = createColors(sys2);
|
161770
161770
|
const header = [];
|
161771
161771
|
const terminalWidth = ((_a = sys2.getWidthOfTerminal) == null ? undefined : _a.call(sys2)) ?? 0;
|
161772
161772
|
const tsIconLength = 5;
|
161773
|
-
const tsIconFirstLine =
|
161774
|
-
const tsIconSecondLine =
|
161773
|
+
const tsIconFirstLine = colors3.blueBackground("".padStart(tsIconLength));
|
161774
|
+
const tsIconSecondLine = colors3.blueBackground(colors3.brightWhite("TS ".padStart(tsIconLength)));
|
161775
161775
|
if (terminalWidth >= message.length + tsIconLength) {
|
161776
161776
|
const rightAlign = terminalWidth > 120 ? 120 : terminalWidth;
|
161777
161777
|
const leftAlign = rightAlign - tsIconLength;
|
@@ -240664,11 +240664,11 @@ var require_visit = __commonJS((exports) => {
|
|
240664
240664
|
visit2.BREAK = BREAK;
|
240665
240665
|
visit2.SKIP = SKIP;
|
240666
240666
|
visit2.REMOVE = REMOVE;
|
240667
|
-
function visit_(
|
240668
|
-
const ctrl = callVisitor(
|
240667
|
+
function visit_(key3, node, visitor, path5) {
|
240668
|
+
const ctrl = callVisitor(key3, node, visitor, path5);
|
240669
240669
|
if (identity2.isNode(ctrl) || identity2.isPair(ctrl)) {
|
240670
|
-
replaceNode(
|
240671
|
-
return visit_(
|
240670
|
+
replaceNode(key3, path5, ctrl);
|
240671
|
+
return visit_(key3, ctrl, visitor, path5);
|
240672
240672
|
}
|
240673
240673
|
if (typeof ctrl !== "symbol") {
|
240674
240674
|
if (identity2.isCollection(node)) {
|
@@ -240712,11 +240712,11 @@ var require_visit = __commonJS((exports) => {
|
|
240712
240712
|
visitAsync.BREAK = BREAK;
|
240713
240713
|
visitAsync.SKIP = SKIP;
|
240714
240714
|
visitAsync.REMOVE = REMOVE;
|
240715
|
-
async function visitAsync_(
|
240716
|
-
const ctrl = await callVisitor(
|
240715
|
+
async function visitAsync_(key3, node, visitor, path5) {
|
240716
|
+
const ctrl = await callVisitor(key3, node, visitor, path5);
|
240717
240717
|
if (identity2.isNode(ctrl) || identity2.isPair(ctrl)) {
|
240718
|
-
replaceNode(
|
240719
|
-
return visitAsync_(
|
240718
|
+
replaceNode(key3, path5, ctrl);
|
240719
|
+
return visitAsync_(key3, ctrl, visitor, path5);
|
240720
240720
|
}
|
240721
240721
|
if (typeof ctrl !== "symbol") {
|
240722
240722
|
if (identity2.isCollection(node)) {
|
@@ -240766,27 +240766,27 @@ var require_visit = __commonJS((exports) => {
|
|
240766
240766
|
}
|
240767
240767
|
return visitor;
|
240768
240768
|
}
|
240769
|
-
function callVisitor(
|
240769
|
+
function callVisitor(key3, node, visitor, path5) {
|
240770
240770
|
if (typeof visitor === "function")
|
240771
|
-
return visitor(
|
240771
|
+
return visitor(key3, node, path5);
|
240772
240772
|
if (identity2.isMap(node))
|
240773
|
-
return visitor.Map?.(
|
240773
|
+
return visitor.Map?.(key3, node, path5);
|
240774
240774
|
if (identity2.isSeq(node))
|
240775
|
-
return visitor.Seq?.(
|
240775
|
+
return visitor.Seq?.(key3, node, path5);
|
240776
240776
|
if (identity2.isPair(node))
|
240777
|
-
return visitor.Pair?.(
|
240777
|
+
return visitor.Pair?.(key3, node, path5);
|
240778
240778
|
if (identity2.isScalar(node))
|
240779
|
-
return visitor.Scalar?.(
|
240779
|
+
return visitor.Scalar?.(key3, node, path5);
|
240780
240780
|
if (identity2.isAlias(node))
|
240781
|
-
return visitor.Alias?.(
|
240781
|
+
return visitor.Alias?.(key3, node, path5);
|
240782
240782
|
return;
|
240783
240783
|
}
|
240784
|
-
function replaceNode(
|
240784
|
+
function replaceNode(key3, path5, node) {
|
240785
240785
|
const parent = path5[path5.length - 1];
|
240786
240786
|
if (identity2.isCollection(parent)) {
|
240787
|
-
parent.items[
|
240787
|
+
parent.items[key3] = node;
|
240788
240788
|
} else if (identity2.isPair(parent)) {
|
240789
|
-
if (
|
240789
|
+
if (key3 === "key")
|
240790
240790
|
parent.key = node;
|
240791
240791
|
else
|
240792
240792
|
parent.value = node;
|
@@ -241017,7 +241017,7 @@ var require_anchors = __commonJS((exports) => {
|
|
241017
241017
|
|
241018
241018
|
// ../../node_modules/.bun/yaml@2.8.1/node_modules/yaml/dist/doc/applyReviver.js
|
241019
241019
|
var require_applyReviver = __commonJS((exports) => {
|
241020
|
-
function applyReviver(reviver, obj,
|
241020
|
+
function applyReviver(reviver, obj, key3, val) {
|
241021
241021
|
if (val && typeof val === "object") {
|
241022
241022
|
if (Array.isArray(val)) {
|
241023
241023
|
for (let i8 = 0, len = val.length;i8 < len; ++i8) {
|
@@ -241057,7 +241057,7 @@ var require_applyReviver = __commonJS((exports) => {
|
|
241057
241057
|
}
|
241058
241058
|
}
|
241059
241059
|
}
|
241060
|
-
return reviver.call(obj,
|
241060
|
+
return reviver.call(obj, key3, val);
|
241061
241061
|
}
|
241062
241062
|
exports.applyReviver = applyReviver;
|
241063
241063
|
});
|
@@ -241386,29 +241386,29 @@ var require_Collection = __commonJS((exports) => {
|
|
241386
241386
|
if (isEmptyPath(path5))
|
241387
241387
|
this.add(value5);
|
241388
241388
|
else {
|
241389
|
-
const [
|
241390
|
-
const node = this.get(
|
241389
|
+
const [key3, ...rest] = path5;
|
241390
|
+
const node = this.get(key3, true);
|
241391
241391
|
if (identity2.isCollection(node))
|
241392
241392
|
node.addIn(rest, value5);
|
241393
241393
|
else if (node === undefined && this.schema)
|
241394
|
-
this.set(
|
241394
|
+
this.set(key3, collectionFromPath(this.schema, rest, value5));
|
241395
241395
|
else
|
241396
|
-
throw new Error(`Expected YAML collection at ${
|
241396
|
+
throw new Error(`Expected YAML collection at ${key3}. Remaining path: ${rest}`);
|
241397
241397
|
}
|
241398
241398
|
}
|
241399
241399
|
deleteIn(path5) {
|
241400
|
-
const [
|
241400
|
+
const [key3, ...rest] = path5;
|
241401
241401
|
if (rest.length === 0)
|
241402
|
-
return this.delete(
|
241403
|
-
const node = this.get(
|
241402
|
+
return this.delete(key3);
|
241403
|
+
const node = this.get(key3, true);
|
241404
241404
|
if (identity2.isCollection(node))
|
241405
241405
|
return node.deleteIn(rest);
|
241406
241406
|
else
|
241407
|
-
throw new Error(`Expected YAML collection at ${
|
241407
|
+
throw new Error(`Expected YAML collection at ${key3}. Remaining path: ${rest}`);
|
241408
241408
|
}
|
241409
241409
|
getIn(path5, keepScalar) {
|
241410
|
-
const [
|
241411
|
-
const node = this.get(
|
241410
|
+
const [key3, ...rest] = path5;
|
241411
|
+
const node = this.get(key3, true);
|
241412
241412
|
if (rest.length === 0)
|
241413
241413
|
return !keepScalar && identity2.isScalar(node) ? node.value : node;
|
241414
241414
|
else
|
@@ -241423,24 +241423,24 @@ var require_Collection = __commonJS((exports) => {
|
|
241423
241423
|
});
|
241424
241424
|
}
|
241425
241425
|
hasIn(path5) {
|
241426
|
-
const [
|
241426
|
+
const [key3, ...rest] = path5;
|
241427
241427
|
if (rest.length === 0)
|
241428
|
-
return this.has(
|
241429
|
-
const node = this.get(
|
241428
|
+
return this.has(key3);
|
241429
|
+
const node = this.get(key3, true);
|
241430
241430
|
return identity2.isCollection(node) ? node.hasIn(rest) : false;
|
241431
241431
|
}
|
241432
241432
|
setIn(path5, value5) {
|
241433
|
-
const [
|
241433
|
+
const [key3, ...rest] = path5;
|
241434
241434
|
if (rest.length === 0) {
|
241435
|
-
this.set(
|
241435
|
+
this.set(key3, value5);
|
241436
241436
|
} else {
|
241437
|
-
const node = this.get(
|
241437
|
+
const node = this.get(key3, true);
|
241438
241438
|
if (identity2.isCollection(node))
|
241439
241439
|
node.setIn(rest, value5);
|
241440
241440
|
else if (node === undefined && this.schema)
|
241441
|
-
this.set(
|
241441
|
+
this.set(key3, collectionFromPath(this.schema, rest, value5));
|
241442
241442
|
else
|
241443
|
-
throw new Error(`Expected YAML collection at ${
|
241443
|
+
throw new Error(`Expected YAML collection at ${key3}. Remaining path: ${rest}`);
|
241444
241444
|
}
|
241445
241445
|
}
|
241446
241446
|
}
|
@@ -242027,19 +242027,19 @@ var require_stringifyPair = __commonJS((exports) => {
|
|
242027
242027
|
var Scalar = require_Scalar();
|
242028
242028
|
var stringify5 = require_stringify();
|
242029
242029
|
var stringifyComment = require_stringifyComment();
|
242030
|
-
function stringifyPair2({ key:
|
242030
|
+
function stringifyPair2({ key: key3, value: value5 }, ctx, onComment, onChompKeep) {
|
242031
242031
|
const { allNullValues, doc: doc2, indent: indent2, indentStep, options: { commentString, indentSeq, simpleKeys } } = ctx;
|
242032
|
-
let keyComment = identity2.isNode(
|
242032
|
+
let keyComment = identity2.isNode(key3) && key3.comment || null;
|
242033
242033
|
if (simpleKeys) {
|
242034
242034
|
if (keyComment) {
|
242035
242035
|
throw new Error("With simple keys, key nodes cannot have comments");
|
242036
242036
|
}
|
242037
|
-
if (identity2.isCollection(
|
242037
|
+
if (identity2.isCollection(key3) || !identity2.isNode(key3) && typeof key3 === "object") {
|
242038
242038
|
const msg = "With simple keys, collection cannot be used as a key value";
|
242039
242039
|
throw new Error(msg);
|
242040
242040
|
}
|
242041
242041
|
}
|
242042
|
-
let explicitKey = !simpleKeys && (!
|
242042
|
+
let explicitKey = !simpleKeys && (!key3 || keyComment && value5 == null && !ctx.inFlow || identity2.isCollection(key3) || (identity2.isScalar(key3) ? key3.type === Scalar.Scalar.BLOCK_FOLDED || key3.type === Scalar.Scalar.BLOCK_LITERAL : typeof key3 === "object"));
|
242043
242043
|
ctx = Object.assign({}, ctx, {
|
242044
242044
|
allNullValues: false,
|
242045
242045
|
implicitKey: !explicitKey && (simpleKeys || !allNullValues),
|
@@ -242047,7 +242047,7 @@ var require_stringifyPair = __commonJS((exports) => {
|
|
242047
242047
|
});
|
242048
242048
|
let keyCommentDone = false;
|
242049
242049
|
let chompKeep = false;
|
242050
|
-
let str = stringify5.stringify(
|
242050
|
+
let str = stringify5.stringify(key3, ctx, () => keyCommentDone = true, () => chompKeep = true);
|
242051
242051
|
if (!explicitKey && !ctx.inFlow && str.length > 1024) {
|
242052
242052
|
if (simpleKeys)
|
242053
242053
|
throw new Error("With simple keys, single line scalar must not span more than 1024 characters");
|
@@ -242191,7 +242191,7 @@ var require_merge = __commonJS((exports) => {
|
|
242191
242191
|
}),
|
242192
242192
|
stringify: () => MERGE_KEY
|
242193
242193
|
};
|
242194
|
-
var isMergeKey = (ctx,
|
242194
|
+
var isMergeKey = (ctx, key3) => (merge4.identify(key3) || identity2.isScalar(key3) && (!key3.type || key3.type === Scalar.Scalar.PLAIN) && merge4.identify(key3.value)) && ctx?.doc.schema.tags.some((tag) => tag.tag === merge4.tag && tag.default);
|
242195
242195
|
function addMergeToJSMap(ctx, map4, value5) {
|
242196
242196
|
value5 = ctx && identity2.isAlias(value5) ? value5.resolve(ctx.doc) : value5;
|
242197
242197
|
if (identity2.isSeq(value5))
|
@@ -242208,14 +242208,14 @@ var require_merge = __commonJS((exports) => {
|
|
242208
242208
|
if (!identity2.isMap(source))
|
242209
242209
|
throw new Error("Merge sources must be maps or map aliases");
|
242210
242210
|
const srcMap = source.toJSON(null, ctx, Map);
|
242211
|
-
for (const [
|
242211
|
+
for (const [key3, value6] of srcMap) {
|
242212
242212
|
if (map4 instanceof Map) {
|
242213
|
-
if (!map4.has(
|
242214
|
-
map4.set(
|
242213
|
+
if (!map4.has(key3))
|
242214
|
+
map4.set(key3, value6);
|
242215
242215
|
} else if (map4 instanceof Set) {
|
242216
|
-
map4.add(
|
242217
|
-
} else if (!Object.prototype.hasOwnProperty.call(map4,
|
242218
|
-
Object.defineProperty(map4,
|
242216
|
+
map4.add(key3);
|
242217
|
+
} else if (!Object.prototype.hasOwnProperty.call(map4, key3)) {
|
242218
|
+
Object.defineProperty(map4, key3, {
|
242219
242219
|
value: value6,
|
242220
242220
|
writable: true,
|
242221
242221
|
enumerable: true,
|
@@ -242237,19 +242237,19 @@ var require_addPairToJSMap = __commonJS((exports) => {
|
|
242237
242237
|
var stringify5 = require_stringify();
|
242238
242238
|
var identity2 = require_identity();
|
242239
242239
|
var toJS = require_toJS();
|
242240
|
-
function addPairToJSMap(ctx, map4, { key:
|
242241
|
-
if (identity2.isNode(
|
242242
|
-
|
242243
|
-
else if (merge4.isMergeKey(ctx,
|
242240
|
+
function addPairToJSMap(ctx, map4, { key: key3, value: value5 }) {
|
242241
|
+
if (identity2.isNode(key3) && key3.addToJSMap)
|
242242
|
+
key3.addToJSMap(ctx, map4, value5);
|
242243
|
+
else if (merge4.isMergeKey(ctx, key3))
|
242244
242244
|
merge4.addMergeToJSMap(ctx, map4, value5);
|
242245
242245
|
else {
|
242246
|
-
const jsKey = toJS.toJS(
|
242246
|
+
const jsKey = toJS.toJS(key3, "", ctx);
|
242247
242247
|
if (map4 instanceof Map) {
|
242248
242248
|
map4.set(jsKey, toJS.toJS(value5, jsKey, ctx));
|
242249
242249
|
} else if (map4 instanceof Set) {
|
242250
242250
|
map4.add(jsKey);
|
242251
242251
|
} else {
|
242252
|
-
const stringKey = stringifyKey(
|
242252
|
+
const stringKey = stringifyKey(key3, jsKey, ctx);
|
242253
242253
|
const jsValue = toJS.toJS(value5, stringKey, ctx);
|
242254
242254
|
if (stringKey in map4)
|
242255
242255
|
Object.defineProperty(map4, stringKey, {
|
@@ -242264,19 +242264,19 @@ var require_addPairToJSMap = __commonJS((exports) => {
|
|
242264
242264
|
}
|
242265
242265
|
return map4;
|
242266
242266
|
}
|
242267
|
-
function stringifyKey(
|
242267
|
+
function stringifyKey(key3, jsKey, ctx) {
|
242268
242268
|
if (jsKey === null)
|
242269
242269
|
return "";
|
242270
242270
|
if (typeof jsKey !== "object")
|
242271
242271
|
return String(jsKey);
|
242272
|
-
if (identity2.isNode(
|
242272
|
+
if (identity2.isNode(key3) && ctx?.doc) {
|
242273
242273
|
const strCtx = stringify5.createStringifyContext(ctx.doc, {});
|
242274
242274
|
strCtx.anchors = new Set;
|
242275
242275
|
for (const node of ctx.anchors.keys())
|
242276
242276
|
strCtx.anchors.add(node.anchor);
|
242277
242277
|
strCtx.inFlow = true;
|
242278
242278
|
strCtx.inStringifyKey = true;
|
242279
|
-
const strKey =
|
242279
|
+
const strKey = key3.toString(strCtx);
|
242280
242280
|
if (!ctx.mapKeyWarned) {
|
242281
242281
|
let jsonStr = JSON.stringify(strKey);
|
242282
242282
|
if (jsonStr.length > 40)
|
@@ -242297,25 +242297,25 @@ var require_Pair = __commonJS((exports) => {
|
|
242297
242297
|
var stringifyPair2 = require_stringifyPair();
|
242298
242298
|
var addPairToJSMap = require_addPairToJSMap();
|
242299
242299
|
var identity2 = require_identity();
|
242300
|
-
function createPair(
|
242301
|
-
const k6 = createNode.createNode(
|
242300
|
+
function createPair(key3, value5, ctx) {
|
242301
|
+
const k6 = createNode.createNode(key3, undefined, ctx);
|
242302
242302
|
const v7 = createNode.createNode(value5, undefined, ctx);
|
242303
242303
|
return new Pair(k6, v7);
|
242304
242304
|
}
|
242305
242305
|
|
242306
242306
|
class Pair {
|
242307
|
-
constructor(
|
242307
|
+
constructor(key3, value5 = null) {
|
242308
242308
|
Object.defineProperty(this, identity2.NODE_TYPE, { value: identity2.PAIR });
|
242309
|
-
this.key =
|
242309
|
+
this.key = key3;
|
242310
242310
|
this.value = value5;
|
242311
242311
|
}
|
242312
242312
|
clone(schema) {
|
242313
|
-
let { key:
|
242314
|
-
if (identity2.isNode(
|
242315
|
-
|
242313
|
+
let { key: key3, value: value5 } = this;
|
242314
|
+
if (identity2.isNode(key3))
|
242315
|
+
key3 = key3.clone(schema);
|
242316
242316
|
if (identity2.isNode(value5))
|
242317
242317
|
value5 = value5.clone(schema);
|
242318
|
-
return new Pair(
|
242318
|
+
return new Pair(key3, value5);
|
242319
242319
|
}
|
242320
242320
|
toJSON(_6, ctx) {
|
242321
242321
|
const pair = ctx?.mapAsMap ? new Map : {};
|
@@ -242482,11 +242482,11 @@ var require_YAMLMap = __commonJS((exports) => {
|
|
242482
242482
|
var identity2 = require_identity();
|
242483
242483
|
var Pair = require_Pair();
|
242484
242484
|
var Scalar = require_Scalar();
|
242485
|
-
function findPair(items,
|
242486
|
-
const k6 = identity2.isScalar(
|
242485
|
+
function findPair(items, key3) {
|
242486
|
+
const k6 = identity2.isScalar(key3) ? key3.value : key3;
|
242487
242487
|
for (const it2 of items) {
|
242488
242488
|
if (identity2.isPair(it2)) {
|
242489
|
-
if (it2.key ===
|
242489
|
+
if (it2.key === key3 || it2.key === k6)
|
242490
242490
|
return it2;
|
242491
242491
|
if (identity2.isScalar(it2.key) && it2.key.value === k6)
|
242492
242492
|
return it2;
|
@@ -242506,20 +242506,20 @@ var require_YAMLMap = __commonJS((exports) => {
|
|
242506
242506
|
static from(schema, obj, ctx) {
|
242507
242507
|
const { keepUndefined, replacer } = ctx;
|
242508
242508
|
const map4 = new this(schema);
|
242509
|
-
const add = (
|
242509
|
+
const add = (key3, value5) => {
|
242510
242510
|
if (typeof replacer === "function")
|
242511
|
-
value5 = replacer.call(obj,
|
242512
|
-
else if (Array.isArray(replacer) && !replacer.includes(
|
242511
|
+
value5 = replacer.call(obj, key3, value5);
|
242512
|
+
else if (Array.isArray(replacer) && !replacer.includes(key3))
|
242513
242513
|
return;
|
242514
242514
|
if (value5 !== undefined || keepUndefined)
|
242515
|
-
map4.items.push(Pair.createPair(
|
242515
|
+
map4.items.push(Pair.createPair(key3, value5, ctx));
|
242516
242516
|
};
|
242517
242517
|
if (obj instanceof Map) {
|
242518
|
-
for (const [
|
242519
|
-
add(
|
242518
|
+
for (const [key3, value5] of obj)
|
242519
|
+
add(key3, value5);
|
242520
242520
|
} else if (obj && typeof obj === "object") {
|
242521
|
-
for (const
|
242522
|
-
add(
|
242521
|
+
for (const key3 of Object.keys(obj))
|
242522
|
+
add(key3, obj[key3]);
|
242523
242523
|
}
|
242524
242524
|
if (typeof schema.sortMapEntries === "function") {
|
242525
242525
|
map4.items.sort(schema.sortMapEntries);
|
@@ -242553,23 +242553,23 @@ var require_YAMLMap = __commonJS((exports) => {
|
|
242553
242553
|
this.items.push(_pair);
|
242554
242554
|
}
|
242555
242555
|
}
|
242556
|
-
delete(
|
242557
|
-
const it2 = findPair(this.items,
|
242556
|
+
delete(key3) {
|
242557
|
+
const it2 = findPair(this.items, key3);
|
242558
242558
|
if (!it2)
|
242559
242559
|
return false;
|
242560
242560
|
const del = this.items.splice(this.items.indexOf(it2), 1);
|
242561
242561
|
return del.length > 0;
|
242562
242562
|
}
|
242563
|
-
get(
|
242564
|
-
const it2 = findPair(this.items,
|
242563
|
+
get(key3, keepScalar) {
|
242564
|
+
const it2 = findPair(this.items, key3);
|
242565
242565
|
const node = it2?.value;
|
242566
242566
|
return (!keepScalar && identity2.isScalar(node) ? node.value : node) ?? undefined;
|
242567
242567
|
}
|
242568
|
-
has(
|
242569
|
-
return !!findPair(this.items,
|
242568
|
+
has(key3) {
|
242569
|
+
return !!findPair(this.items, key3);
|
242570
242570
|
}
|
242571
|
-
set(
|
242572
|
-
this.add(new Pair.Pair(
|
242571
|
+
set(key3, value5) {
|
242572
|
+
this.add(new Pair.Pair(key3, value5), true);
|
242573
242573
|
}
|
242574
242574
|
toJSON(_6, ctx, Type) {
|
242575
242575
|
const map4 = Type ? new Type : ctx?.mapAsMap ? new Map : {};
|
@@ -242640,28 +242640,28 @@ var require_YAMLSeq = __commonJS((exports) => {
|
|
242640
242640
|
add(value5) {
|
242641
242641
|
this.items.push(value5);
|
242642
242642
|
}
|
242643
|
-
delete(
|
242644
|
-
const idx = asItemIndex(
|
242643
|
+
delete(key3) {
|
242644
|
+
const idx = asItemIndex(key3);
|
242645
242645
|
if (typeof idx !== "number")
|
242646
242646
|
return false;
|
242647
242647
|
const del = this.items.splice(idx, 1);
|
242648
242648
|
return del.length > 0;
|
242649
242649
|
}
|
242650
|
-
get(
|
242651
|
-
const idx = asItemIndex(
|
242650
|
+
get(key3, keepScalar) {
|
242651
|
+
const idx = asItemIndex(key3);
|
242652
242652
|
if (typeof idx !== "number")
|
242653
242653
|
return;
|
242654
242654
|
const it2 = this.items[idx];
|
242655
242655
|
return !keepScalar && identity2.isScalar(it2) ? it2.value : it2;
|
242656
242656
|
}
|
242657
|
-
has(
|
242658
|
-
const idx = asItemIndex(
|
242657
|
+
has(key3) {
|
242658
|
+
const idx = asItemIndex(key3);
|
242659
242659
|
return typeof idx === "number" && idx < this.items.length;
|
242660
242660
|
}
|
242661
|
-
set(
|
242662
|
-
const idx = asItemIndex(
|
242661
|
+
set(key3, value5) {
|
242662
|
+
const idx = asItemIndex(key3);
|
242663
242663
|
if (typeof idx !== "number")
|
242664
|
-
throw new Error(`Expected a valid index, not ${
|
242664
|
+
throw new Error(`Expected a valid index, not ${key3}.`);
|
242665
242665
|
const prev = this.items[idx];
|
242666
242666
|
if (identity2.isScalar(prev) && Scalar.isScalarValue(value5))
|
242667
242667
|
prev.value = value5;
|
@@ -242695,8 +242695,8 @@ var require_YAMLSeq = __commonJS((exports) => {
|
|
242695
242695
|
let i8 = 0;
|
242696
242696
|
for (let it2 of obj) {
|
242697
242697
|
if (typeof replacer === "function") {
|
242698
|
-
const
|
242699
|
-
it2 = replacer.call(obj,
|
242698
|
+
const key3 = obj instanceof Set ? it2 : String(i8++);
|
242699
|
+
it2 = replacer.call(obj, key3, it2);
|
242700
242700
|
}
|
242701
242701
|
seq.items.push(createNode.createNode(it2, undefined, ctx));
|
242702
242702
|
}
|
@@ -242704,8 +242704,8 @@ var require_YAMLSeq = __commonJS((exports) => {
|
|
242704
242704
|
return seq;
|
242705
242705
|
}
|
242706
242706
|
}
|
242707
|
-
function asItemIndex(
|
242708
|
-
let idx = identity2.isScalar(
|
242707
|
+
function asItemIndex(key3) {
|
242708
|
+
let idx = identity2.isScalar(key3) ? key3.value : key3;
|
242709
242709
|
if (idx && typeof idx === "string")
|
242710
242710
|
idx = Number(idx);
|
242711
242711
|
return typeof idx === "number" && Number.isInteger(idx) && idx >= 0 ? idx : null;
|
@@ -243078,25 +243078,25 @@ ${cn.comment}` : item.comment;
|
|
243078
243078
|
for (let it2 of iterable) {
|
243079
243079
|
if (typeof replacer === "function")
|
243080
243080
|
it2 = replacer.call(iterable, String(i8++), it2);
|
243081
|
-
let
|
243081
|
+
let key3, value5;
|
243082
243082
|
if (Array.isArray(it2)) {
|
243083
243083
|
if (it2.length === 2) {
|
243084
|
-
|
243084
|
+
key3 = it2[0];
|
243085
243085
|
value5 = it2[1];
|
243086
243086
|
} else
|
243087
243087
|
throw new TypeError(`Expected [key, value] tuple: ${it2}`);
|
243088
243088
|
} else if (it2 && it2 instanceof Object) {
|
243089
243089
|
const keys = Object.keys(it2);
|
243090
243090
|
if (keys.length === 1) {
|
243091
|
-
|
243092
|
-
value5 = it2[
|
243091
|
+
key3 = keys[0];
|
243092
|
+
value5 = it2[key3];
|
243093
243093
|
} else {
|
243094
243094
|
throw new TypeError(`Expected tuple with one key, not ${keys.length} keys`);
|
243095
243095
|
}
|
243096
243096
|
} else {
|
243097
|
-
|
243097
|
+
key3 = it2;
|
243098
243098
|
}
|
243099
|
-
pairs2.items.push(Pair.createPair(
|
243099
|
+
pairs2.items.push(Pair.createPair(key3, value5, ctx));
|
243100
243100
|
}
|
243101
243101
|
return pairs2;
|
243102
243102
|
}
|
@@ -243137,16 +243137,16 @@ var require_omap = __commonJS((exports) => {
|
|
243137
243137
|
if (ctx?.onCreate)
|
243138
243138
|
ctx.onCreate(map4);
|
243139
243139
|
for (const pair of this.items) {
|
243140
|
-
let
|
243140
|
+
let key3, value5;
|
243141
243141
|
if (identity2.isPair(pair)) {
|
243142
|
-
|
243143
|
-
value5 = toJS.toJS(pair.value,
|
243142
|
+
key3 = toJS.toJS(pair.key, "", ctx);
|
243143
|
+
value5 = toJS.toJS(pair.value, key3, ctx);
|
243144
243144
|
} else {
|
243145
|
-
|
243145
|
+
key3 = toJS.toJS(pair, "", ctx);
|
243146
243146
|
}
|
243147
|
-
if (map4.has(
|
243147
|
+
if (map4.has(key3))
|
243148
243148
|
throw new Error("Ordered maps must not include duplicate keys");
|
243149
|
-
map4.set(
|
243149
|
+
map4.set(key3, value5);
|
243150
243150
|
}
|
243151
243151
|
return map4;
|
243152
243152
|
}
|
@@ -243167,12 +243167,12 @@ var require_omap = __commonJS((exports) => {
|
|
243167
243167
|
resolve(seq, onError) {
|
243168
243168
|
const pairs$1 = pairs.resolvePairs(seq, onError);
|
243169
243169
|
const seenKeys = [];
|
243170
|
-
for (const { key:
|
243171
|
-
if (identity2.isScalar(
|
243172
|
-
if (seenKeys.includes(
|
243173
|
-
onError(`Ordered maps must not include duplicate keys: ${
|
243170
|
+
for (const { key: key3 } of pairs$1.items) {
|
243171
|
+
if (identity2.isScalar(key3)) {
|
243172
|
+
if (seenKeys.includes(key3.value)) {
|
243173
|
+
onError(`Ordered maps must not include duplicate keys: ${key3.value}`);
|
243174
243174
|
} else {
|
243175
|
-
seenKeys.push(
|
243175
|
+
seenKeys.push(key3.value);
|
243176
243176
|
}
|
243177
243177
|
}
|
243178
243178
|
}
|
@@ -243346,30 +243346,30 @@ var require_set = __commonJS((exports) => {
|
|
243346
243346
|
super(schema);
|
243347
243347
|
this.tag = YAMLSet.tag;
|
243348
243348
|
}
|
243349
|
-
add(
|
243349
|
+
add(key3) {
|
243350
243350
|
let pair;
|
243351
|
-
if (identity2.isPair(
|
243352
|
-
pair =
|
243353
|
-
else if (
|
243354
|
-
pair = new Pair.Pair(
|
243351
|
+
if (identity2.isPair(key3))
|
243352
|
+
pair = key3;
|
243353
|
+
else if (key3 && typeof key3 === "object" && "key" in key3 && "value" in key3 && key3.value === null)
|
243354
|
+
pair = new Pair.Pair(key3.key, null);
|
243355
243355
|
else
|
243356
|
-
pair = new Pair.Pair(
|
243356
|
+
pair = new Pair.Pair(key3, null);
|
243357
243357
|
const prev = YAMLMap.findPair(this.items, pair.key);
|
243358
243358
|
if (!prev)
|
243359
243359
|
this.items.push(pair);
|
243360
243360
|
}
|
243361
|
-
get(
|
243362
|
-
const pair = YAMLMap.findPair(this.items,
|
243361
|
+
get(key3, keepPair) {
|
243362
|
+
const pair = YAMLMap.findPair(this.items, key3);
|
243363
243363
|
return !keepPair && identity2.isPair(pair) ? identity2.isScalar(pair.key) ? pair.key.value : pair.key : pair;
|
243364
243364
|
}
|
243365
|
-
set(
|
243365
|
+
set(key3, value5) {
|
243366
243366
|
if (typeof value5 !== "boolean")
|
243367
243367
|
throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof value5}`);
|
243368
|
-
const prev = YAMLMap.findPair(this.items,
|
243368
|
+
const prev = YAMLMap.findPair(this.items, key3);
|
243369
243369
|
if (prev && !value5) {
|
243370
243370
|
this.items.splice(this.items.indexOf(prev), 1);
|
243371
243371
|
} else if (!prev && value5) {
|
243372
|
-
this.items.push(new Pair.Pair(
|
243372
|
+
this.items.push(new Pair.Pair(key3));
|
243373
243373
|
}
|
243374
243374
|
}
|
243375
243375
|
toJSON(_6, ctx) {
|
@@ -243604,7 +243604,7 @@ var require_tags = __commonJS((exports) => {
|
|
243604
243604
|
if (Array.isArray(customTags))
|
243605
243605
|
tags = [];
|
243606
243606
|
else {
|
243607
|
-
const keys = Array.from(schemas3.keys()).filter((
|
243607
|
+
const keys = Array.from(schemas3.keys()).filter((key3) => key3 !== "yaml11").map((key3) => JSON.stringify(key3)).join(", ");
|
243608
243608
|
throw new Error(`Unknown schema "${schemaName}"; use one of ${keys} or define customTags array`);
|
243609
243609
|
}
|
243610
243610
|
}
|
@@ -243620,7 +243620,7 @@ var require_tags = __commonJS((exports) => {
|
|
243620
243620
|
const tagObj = typeof tag === "string" ? tagsByName[tag] : tag;
|
243621
243621
|
if (!tagObj) {
|
243622
243622
|
const tagName = JSON.stringify(tag);
|
243623
|
-
const keys = Object.keys(tagsByName).map((
|
243623
|
+
const keys = Object.keys(tagsByName).map((key3) => JSON.stringify(key3)).join(", ");
|
243624
243624
|
throw new Error(`Unknown custom tag ${tagName}; use one of ${keys}`);
|
243625
243625
|
}
|
243626
243626
|
if (!tags2.includes(tagObj))
|
@@ -243855,13 +243855,13 @@ var require_Document = __commonJS((exports) => {
|
|
243855
243855
|
setAnchors();
|
243856
243856
|
return node;
|
243857
243857
|
}
|
243858
|
-
createPair(
|
243859
|
-
const k6 = this.createNode(
|
243858
|
+
createPair(key3, value5, options = {}) {
|
243859
|
+
const k6 = this.createNode(key3, null, options);
|
243860
243860
|
const v7 = this.createNode(value5, null, options);
|
243861
243861
|
return new Pair.Pair(k6, v7);
|
243862
243862
|
}
|
243863
|
-
delete(
|
243864
|
-
return assertCollection(this.contents) ? this.contents.delete(
|
243863
|
+
delete(key3) {
|
243864
|
+
return assertCollection(this.contents) ? this.contents.delete(key3) : false;
|
243865
243865
|
}
|
243866
243866
|
deleteIn(path5) {
|
243867
243867
|
if (Collection.isEmptyPath(path5)) {
|
@@ -243872,27 +243872,27 @@ var require_Document = __commonJS((exports) => {
|
|
243872
243872
|
}
|
243873
243873
|
return assertCollection(this.contents) ? this.contents.deleteIn(path5) : false;
|
243874
243874
|
}
|
243875
|
-
get(
|
243876
|
-
return identity2.isCollection(this.contents) ? this.contents.get(
|
243875
|
+
get(key3, keepScalar) {
|
243876
|
+
return identity2.isCollection(this.contents) ? this.contents.get(key3, keepScalar) : undefined;
|
243877
243877
|
}
|
243878
243878
|
getIn(path5, keepScalar) {
|
243879
243879
|
if (Collection.isEmptyPath(path5))
|
243880
243880
|
return !keepScalar && identity2.isScalar(this.contents) ? this.contents.value : this.contents;
|
243881
243881
|
return identity2.isCollection(this.contents) ? this.contents.getIn(path5, keepScalar) : undefined;
|
243882
243882
|
}
|
243883
|
-
has(
|
243884
|
-
return identity2.isCollection(this.contents) ? this.contents.has(
|
243883
|
+
has(key3) {
|
243884
|
+
return identity2.isCollection(this.contents) ? this.contents.has(key3) : false;
|
243885
243885
|
}
|
243886
243886
|
hasIn(path5) {
|
243887
243887
|
if (Collection.isEmptyPath(path5))
|
243888
243888
|
return this.contents !== undefined;
|
243889
243889
|
return identity2.isCollection(this.contents) ? this.contents.hasIn(path5) : false;
|
243890
243890
|
}
|
243891
|
-
set(
|
243891
|
+
set(key3, value5) {
|
243892
243892
|
if (this.contents == null) {
|
243893
|
-
this.contents = Collection.collectionFromPath(this.schema, [
|
243893
|
+
this.contents = Collection.collectionFromPath(this.schema, [key3], value5);
|
243894
243894
|
} else if (assertCollection(this.contents)) {
|
243895
|
-
this.contents.set(
|
243895
|
+
this.contents.set(key3, value5);
|
243896
243896
|
}
|
243897
243897
|
}
|
243898
243898
|
setIn(path5, value5) {
|
@@ -244174,25 +244174,25 @@ var require_resolve_props = __commonJS((exports) => {
|
|
244174
244174
|
|
244175
244175
|
// ../../node_modules/.bun/yaml@2.8.1/node_modules/yaml/dist/compose/util-contains-newline.js
|
244176
244176
|
var require_util_contains_newline = __commonJS((exports) => {
|
244177
|
-
function containsNewline(
|
244178
|
-
if (!
|
244177
|
+
function containsNewline(key3) {
|
244178
|
+
if (!key3)
|
244179
244179
|
return null;
|
244180
|
-
switch (
|
244180
|
+
switch (key3.type) {
|
244181
244181
|
case "alias":
|
244182
244182
|
case "scalar":
|
244183
244183
|
case "double-quoted-scalar":
|
244184
244184
|
case "single-quoted-scalar":
|
244185
|
-
if (
|
244185
|
+
if (key3.source.includes(`
|
244186
244186
|
`))
|
244187
244187
|
return true;
|
244188
|
-
if (
|
244189
|
-
for (const st2 of
|
244188
|
+
if (key3.end) {
|
244189
|
+
for (const st2 of key3.end)
|
244190
244190
|
if (st2.type === "newline")
|
244191
244191
|
return true;
|
244192
244192
|
}
|
244193
244193
|
return false;
|
244194
244194
|
case "flow-collection":
|
244195
|
-
for (const it2 of
|
244195
|
+
for (const it2 of key3.items) {
|
244196
244196
|
for (const st2 of it2.start)
|
244197
244197
|
if (st2.type === "newline")
|
244198
244198
|
return true;
|
@@ -244257,10 +244257,10 @@ var require_resolve_block_map = __commonJS((exports) => {
|
|
244257
244257
|
let offset = bm.offset;
|
244258
244258
|
let commentEnd = null;
|
244259
244259
|
for (const collItem of bm.items) {
|
244260
|
-
const { start: start3, key:
|
244260
|
+
const { start: start3, key: key3, sep: sep4, value: value5 } = collItem;
|
244261
244261
|
const keyProps = resolveProps.resolveProps(start3, {
|
244262
244262
|
indicator: "explicit-key-ind",
|
244263
|
-
next:
|
244263
|
+
next: key3 ?? sep4?.[0],
|
244264
244264
|
offset,
|
244265
244265
|
onError,
|
244266
244266
|
parentIndent: bm.indent,
|
@@ -244268,10 +244268,10 @@ var require_resolve_block_map = __commonJS((exports) => {
|
|
244268
244268
|
});
|
244269
244269
|
const implicitKey = !keyProps.found;
|
244270
244270
|
if (implicitKey) {
|
244271
|
-
if (
|
244272
|
-
if (
|
244271
|
+
if (key3) {
|
244272
|
+
if (key3.type === "block-seq")
|
244273
244273
|
onError(offset, "BLOCK_AS_IMPLICIT_KEY", "A block sequence may not be used as an implicit map key");
|
244274
|
-
else if ("indent" in
|
244274
|
+
else if ("indent" in key3 && key3.indent !== bm.indent)
|
244275
244275
|
onError(offset, "BAD_INDENT", startColMsg);
|
244276
244276
|
}
|
244277
244277
|
if (!keyProps.anchor && !keyProps.tag && !sep4) {
|
@@ -244285,17 +244285,17 @@ var require_resolve_block_map = __commonJS((exports) => {
|
|
244285
244285
|
}
|
244286
244286
|
continue;
|
244287
244287
|
}
|
244288
|
-
if (keyProps.newlineAfterProp || utilContainsNewline.containsNewline(
|
244289
|
-
onError(
|
244288
|
+
if (keyProps.newlineAfterProp || utilContainsNewline.containsNewline(key3)) {
|
244289
|
+
onError(key3 ?? start3[start3.length - 1], "MULTILINE_IMPLICIT_KEY", "Implicit keys need to be on a single line");
|
244290
244290
|
}
|
244291
244291
|
} else if (keyProps.found?.indent !== bm.indent) {
|
244292
244292
|
onError(offset, "BAD_INDENT", startColMsg);
|
244293
244293
|
}
|
244294
244294
|
ctx.atKey = true;
|
244295
244295
|
const keyStart = keyProps.end;
|
244296
|
-
const keyNode =
|
244296
|
+
const keyNode = key3 ? composeNode(ctx, key3, keyProps, onError) : composeEmptyNode(ctx, keyStart, start3, null, keyProps, onError);
|
244297
244297
|
if (ctx.schema.compat)
|
244298
|
-
utilFlowIndentCheck.flowIndentCheck(bm.indent,
|
244298
|
+
utilFlowIndentCheck.flowIndentCheck(bm.indent, key3, onError);
|
244299
244299
|
ctx.atKey = false;
|
244300
244300
|
if (utilMapIncludes.mapIncludes(ctx, map4.items, keyNode))
|
244301
244301
|
onError(keyStart, "DUPLICATE_KEY", "Map keys must be unique");
|
@@ -244305,7 +244305,7 @@ var require_resolve_block_map = __commonJS((exports) => {
|
|
244305
244305
|
offset: keyNode.range[2],
|
244306
244306
|
onError,
|
244307
244307
|
parentIndent: bm.indent,
|
244308
|
-
startOnNewline: !
|
244308
|
+
startOnNewline: !key3 || key3.type === "block-scalar"
|
244309
244309
|
});
|
244310
244310
|
offset = valueProps.end;
|
244311
244311
|
if (valueProps.found) {
|
@@ -244461,11 +244461,11 @@ var require_resolve_flow_collection = __commonJS((exports) => {
|
|
244461
244461
|
let offset = fc.offset + fc.start.source.length;
|
244462
244462
|
for (let i8 = 0;i8 < fc.items.length; ++i8) {
|
244463
244463
|
const collItem = fc.items[i8];
|
244464
|
-
const { start: start3, key:
|
244464
|
+
const { start: start3, key: key3, sep: sep4, value: value5 } = collItem;
|
244465
244465
|
const props = resolveProps.resolveProps(start3, {
|
244466
244466
|
flow: fcName,
|
244467
244467
|
indicator: "explicit-key-ind",
|
244468
|
-
next:
|
244468
|
+
next: key3 ?? sep4?.[0],
|
244469
244469
|
offset,
|
244470
244470
|
onError,
|
244471
244471
|
parentIndent: fc.indent,
|
@@ -244487,8 +244487,8 @@ var require_resolve_flow_collection = __commonJS((exports) => {
|
|
244487
244487
|
offset = props.end;
|
244488
244488
|
continue;
|
244489
244489
|
}
|
244490
|
-
if (!isMap && ctx.options.strict && utilContainsNewline.containsNewline(
|
244491
|
-
onError(
|
244490
|
+
if (!isMap && ctx.options.strict && utilContainsNewline.containsNewline(key3))
|
244491
|
+
onError(key3, "MULTILINE_IMPLICIT_KEY", "Implicit keys of flow sequence pairs need to be on a single line");
|
244492
244492
|
}
|
244493
244493
|
if (i8 === 0) {
|
244494
244494
|
if (props.comma)
|
@@ -244533,8 +244533,8 @@ var require_resolve_flow_collection = __commonJS((exports) => {
|
|
244533
244533
|
} else {
|
244534
244534
|
ctx.atKey = true;
|
244535
244535
|
const keyStart = props.end;
|
244536
|
-
const keyNode =
|
244537
|
-
if (isBlock(
|
244536
|
+
const keyNode = key3 ? composeNode(ctx, key3, props, onError) : composeEmptyNode(ctx, keyStart, start3, null, props, onError);
|
244537
|
+
if (isBlock(key3))
|
244538
244538
|
onError(keyNode.range, "BLOCK_IN_FLOW", blockMsg);
|
244539
244539
|
ctx.atKey = false;
|
244540
244540
|
const valueProps = resolveProps.resolveProps(sep4 ?? [], {
|
@@ -245345,7 +245345,7 @@ var require_composer = __commonJS((exports) => {
|
|
245345
245345
|
var node_process = __require("process");
|
245346
245346
|
var directives5 = require_directives2();
|
245347
245347
|
var Document = require_Document();
|
245348
|
-
var
|
245348
|
+
var errors5 = require_errors3();
|
245349
245349
|
var identity2 = require_identity();
|
245350
245350
|
var composeDoc = require_compose_doc();
|
245351
245351
|
var resolveEnd = require_resolve_end();
|
@@ -245396,9 +245396,9 @@ var require_composer = __commonJS((exports) => {
|
|
245396
245396
|
this.onError = (source, code2, message, warning) => {
|
245397
245397
|
const pos = getErrorPos(source);
|
245398
245398
|
if (warning)
|
245399
|
-
this.warnings.push(new
|
245399
|
+
this.warnings.push(new errors5.YAMLWarning(pos, code2, message));
|
245400
245400
|
else
|
245401
|
-
this.errors.push(new
|
245401
|
+
this.errors.push(new errors5.YAMLParseError(pos, code2, message));
|
245402
245402
|
};
|
245403
245403
|
this.directives = new directives5.Directives({ version: options.version || "1.2" });
|
245404
245404
|
this.options = options;
|
@@ -245482,7 +245482,7 @@ ${cb}` : comment;
|
|
245482
245482
|
break;
|
245483
245483
|
case "error": {
|
245484
245484
|
const msg = token.source ? `${token.message}: ${JSON.stringify(token.source)}` : token.message;
|
245485
|
-
const error48 = new
|
245485
|
+
const error48 = new errors5.YAMLParseError(getErrorPos(token), "UNEXPECTED_TOKEN", msg);
|
245486
245486
|
if (this.atDirectives || !this.doc)
|
245487
245487
|
this.errors.push(error48);
|
245488
245488
|
else
|
@@ -245492,7 +245492,7 @@ ${cb}` : comment;
|
|
245492
245492
|
case "doc-end": {
|
245493
245493
|
if (!this.doc) {
|
245494
245494
|
const msg = "Unexpected doc-end without preceding document";
|
245495
|
-
this.errors.push(new
|
245495
|
+
this.errors.push(new errors5.YAMLParseError(getErrorPos(token), "UNEXPECTED_TOKEN", msg));
|
245496
245496
|
break;
|
245497
245497
|
}
|
245498
245498
|
this.doc.directives.docEnd = true;
|
@@ -245507,7 +245507,7 @@ ${end.comment}` : end.comment;
|
|
245507
245507
|
break;
|
245508
245508
|
}
|
245509
245509
|
default:
|
245510
|
-
this.errors.push(new
|
245510
|
+
this.errors.push(new errors5.YAMLParseError(getErrorPos(token), "UNEXPECTED_TOKEN", `Unsupported token ${token.type}`));
|
245511
245511
|
}
|
245512
245512
|
}
|
245513
245513
|
*end(forceDoc = false, endOffset = -1) {
|
@@ -245533,7 +245533,7 @@ ${end.comment}` : end.comment;
|
|
245533
245533
|
var require_cst_scalar = __commonJS((exports) => {
|
245534
245534
|
var resolveBlockScalar = require_resolve_block_scalar();
|
245535
245535
|
var resolveFlowScalar = require_resolve_flow_scalar();
|
245536
|
-
var
|
245536
|
+
var errors5 = require_errors3();
|
245537
245537
|
var stringifyString = require_stringifyString();
|
245538
245538
|
function resolveAsScalar(token, strict = true, onError) {
|
245539
245539
|
if (token) {
|
@@ -245542,7 +245542,7 @@ var require_cst_scalar = __commonJS((exports) => {
|
|
245542
245542
|
if (onError)
|
245543
245543
|
onError(offset, code2, message);
|
245544
245544
|
else
|
245545
|
-
throw new
|
245545
|
+
throw new errors5.YAMLParseError([offset, offset + 1], code2, message);
|
245546
245546
|
};
|
245547
245547
|
switch (token.type) {
|
245548
245548
|
case "scalar":
|
@@ -245656,9 +245656,9 @@ var require_cst_scalar = __commonJS((exports) => {
|
|
245656
245656
|
if (!addEndtoBlockProps(props, "end" in token ? token.end : undefined))
|
245657
245657
|
props.push({ type: "newline", offset: -1, indent: indent2, source: `
|
245658
245658
|
` });
|
245659
|
-
for (const
|
245660
|
-
if (
|
245661
|
-
delete token[
|
245659
|
+
for (const key3 of Object.keys(token))
|
245660
|
+
if (key3 !== "type" && key3 !== "offset")
|
245661
|
+
delete token[key3];
|
245662
245662
|
Object.assign(token, { type: "block-scalar", indent: indent2, props, source: body });
|
245663
245663
|
}
|
245664
245664
|
}
|
@@ -245707,9 +245707,9 @@ var require_cst_scalar = __commonJS((exports) => {
|
|
245707
245707
|
default: {
|
245708
245708
|
const indent2 = "indent" in token ? token.indent : -1;
|
245709
245709
|
const end = "end" in token && Array.isArray(token.end) ? token.end.filter((st2) => st2.type === "space" || st2.type === "comment" || st2.type === "newline") : [];
|
245710
|
-
for (const
|
245711
|
-
if (
|
245712
|
-
delete token[
|
245710
|
+
for (const key3 of Object.keys(token))
|
245711
|
+
if (key3 !== "type" && key3 !== "offset")
|
245712
|
+
delete token[key3];
|
245713
245713
|
Object.assign(token, { type: type5, indent: indent2, source, end });
|
245714
245714
|
}
|
245715
245715
|
}
|
@@ -245761,12 +245761,12 @@ var require_cst_stringify = __commonJS((exports) => {
|
|
245761
245761
|
}
|
245762
245762
|
}
|
245763
245763
|
}
|
245764
|
-
function stringifyItem({ start: start3, key:
|
245764
|
+
function stringifyItem({ start: start3, key: key3, sep: sep4, value: value5 }) {
|
245765
245765
|
let res = "";
|
245766
245766
|
for (const st2 of start3)
|
245767
245767
|
res += st2.source;
|
245768
|
-
if (
|
245769
|
-
res += stringifyToken(
|
245768
|
+
if (key3)
|
245769
|
+
res += stringifyToken(key3);
|
245770
245770
|
if (sep4)
|
245771
245771
|
for (const st2 of sep4)
|
245772
245772
|
res += st2.source;
|
@@ -247062,7 +247062,7 @@ var require_parser2 = __commonJS((exports) => {
|
|
247062
247062
|
});
|
247063
247063
|
} else if (isFlowToken(it2.key) && !includesToken(it2.sep, "newline")) {
|
247064
247064
|
const start4 = getFirstKeyStartProps(it2.start);
|
247065
|
-
const
|
247065
|
+
const key3 = it2.key;
|
247066
247066
|
const sep4 = it2.sep;
|
247067
247067
|
sep4.push(this.sourceToken);
|
247068
247068
|
delete it2.key;
|
@@ -247071,7 +247071,7 @@ var require_parser2 = __commonJS((exports) => {
|
|
247071
247071
|
type: "block-map",
|
247072
247072
|
offset: this.offset,
|
247073
247073
|
indent: this.indent,
|
247074
|
-
items: [{ start: start4, key:
|
247074
|
+
items: [{ start: start4, key: key3, sep: sep4 }]
|
247075
247075
|
});
|
247076
247076
|
} else if (start3.length > 0) {
|
247077
247077
|
it2.sep = it2.sep.concat(start3, this.sourceToken);
|
@@ -247404,7 +247404,7 @@ var require_parser2 = __commonJS((exports) => {
|
|
247404
247404
|
var require_public_api = __commonJS((exports) => {
|
247405
247405
|
var composer = require_composer();
|
247406
247406
|
var Document = require_Document();
|
247407
|
-
var
|
247407
|
+
var errors5 = require_errors3();
|
247408
247408
|
var log = require_log();
|
247409
247409
|
var identity2 = require_identity();
|
247410
247410
|
var lineCounter = require_line_counter();
|
@@ -247421,8 +247421,8 @@ var require_public_api = __commonJS((exports) => {
|
|
247421
247421
|
const docs = Array.from(composer$1.compose(parser$1.parse(source)));
|
247422
247422
|
if (prettyErrors && lineCounter2)
|
247423
247423
|
for (const doc2 of docs) {
|
247424
|
-
doc2.errors.forEach(
|
247425
|
-
doc2.warnings.forEach(
|
247424
|
+
doc2.errors.forEach(errors5.prettifyError(source, lineCounter2));
|
247425
|
+
doc2.warnings.forEach(errors5.prettifyError(source, lineCounter2));
|
247426
247426
|
}
|
247427
247427
|
if (docs.length > 0)
|
247428
247428
|
return docs;
|
@@ -247437,13 +247437,13 @@ var require_public_api = __commonJS((exports) => {
|
|
247437
247437
|
if (!doc2)
|
247438
247438
|
doc2 = _doc;
|
247439
247439
|
else if (doc2.options.logLevel !== "silent") {
|
247440
|
-
doc2.errors.push(new
|
247440
|
+
doc2.errors.push(new errors5.YAMLParseError(_doc.range.slice(0, 2), "MULTIPLE_DOCS", "Source contains multiple documents; please use YAML.parseAllDocuments()"));
|
247441
247441
|
break;
|
247442
247442
|
}
|
247443
247443
|
}
|
247444
247444
|
if (prettyErrors && lineCounter2) {
|
247445
|
-
doc2.errors.forEach(
|
247446
|
-
doc2.warnings.forEach(
|
247445
|
+
doc2.errors.forEach(errors5.prettifyError(source, lineCounter2));
|
247446
|
+
doc2.warnings.forEach(errors5.prettifyError(source, lineCounter2));
|
247447
247447
|
}
|
247448
247448
|
return doc2;
|
247449
247449
|
}
|
@@ -247511,8 +247511,11 @@ var {
|
|
247511
247511
|
} = import__.default;
|
247512
247512
|
|
247513
247513
|
// ../../node_modules/.bun/@inquirer+core@10.2.2+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/key.js
|
247514
|
+
var isUpKey = (key) => key.name === "up";
|
247515
|
+
var isDownKey = (key) => key.name === "down";
|
247514
247516
|
var isBackspaceKey = (key) => key.name === "backspace";
|
247515
247517
|
var isTabKey = (key) => key.name === "tab";
|
247518
|
+
var isNumberKey = (key) => "1234567890".includes(key.name);
|
247516
247519
|
var isEnterKey = (key) => key.name === "enter" || key.name === "return";
|
247517
247520
|
// ../../node_modules/.bun/@inquirer+core@10.2.2+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/errors.js
|
247518
247521
|
class AbortPromptError extends Error {
|
@@ -248046,11 +248049,22 @@ function usePrefix({ status = "idle", theme }) {
|
|
248046
248049
|
const iconName = status === "loading" ? "idle" : status;
|
248047
248050
|
return typeof prefix === "string" ? prefix : prefix[iconName] ?? prefix["idle"];
|
248048
248051
|
}
|
248052
|
+
// ../../node_modules/.bun/@inquirer+core@10.2.2+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/use-memo.js
|
248053
|
+
function useMemo(fn, dependencies) {
|
248054
|
+
return withPointer((pointer) => {
|
248055
|
+
const prev = pointer.get();
|
248056
|
+
if (!prev || prev.dependencies.length !== dependencies.length || prev.dependencies.some((dep, i) => dep !== dependencies[i])) {
|
248057
|
+
const value = fn();
|
248058
|
+
pointer.set({ value, dependencies });
|
248059
|
+
return value;
|
248060
|
+
}
|
248061
|
+
return prev.value;
|
248062
|
+
});
|
248063
|
+
}
|
248049
248064
|
// ../../node_modules/.bun/@inquirer+core@10.2.2+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/use-ref.js
|
248050
248065
|
function useRef(val) {
|
248051
248066
|
return useState({ current: val })[0];
|
248052
248067
|
}
|
248053
|
-
|
248054
248068
|
// ../../node_modules/.bun/@inquirer+core@10.2.2+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/use-keypress.js
|
248055
248069
|
function useKeypress(userHandler) {
|
248056
248070
|
const signal = useRef(userHandler);
|
@@ -248082,6 +248096,72 @@ function readlineWidth() {
|
|
248082
248096
|
return import_cli_width.default({ defaultWidth: 80, output: readline().output });
|
248083
248097
|
}
|
248084
248098
|
|
248099
|
+
// ../../node_modules/.bun/@inquirer+core@10.2.2+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/pagination/use-pagination.js
|
248100
|
+
function usePointerPosition({ active, renderedItems, pageSize, loop }) {
|
248101
|
+
const state = useRef({
|
248102
|
+
lastPointer: active,
|
248103
|
+
lastActive: undefined
|
248104
|
+
});
|
248105
|
+
const { lastPointer, lastActive } = state.current;
|
248106
|
+
const middle = Math.floor(pageSize / 2);
|
248107
|
+
const renderedLength = renderedItems.reduce((acc, item) => acc + item.length, 0);
|
248108
|
+
const defaultPointerPosition = renderedItems.slice(0, active).reduce((acc, item) => acc + item.length, 0);
|
248109
|
+
let pointer = defaultPointerPosition;
|
248110
|
+
if (renderedLength > pageSize) {
|
248111
|
+
if (loop) {
|
248112
|
+
pointer = lastPointer;
|
248113
|
+
if (lastActive != null && lastActive < active && active - lastActive < pageSize) {
|
248114
|
+
pointer = Math.min(middle, Math.abs(active - lastActive) === 1 ? Math.min(lastPointer + (renderedItems[lastActive]?.length ?? 0), Math.max(defaultPointerPosition, lastPointer)) : lastPointer + active - lastActive);
|
248115
|
+
}
|
248116
|
+
} else {
|
248117
|
+
const spaceUnderActive = renderedItems.slice(active).reduce((acc, item) => acc + item.length, 0);
|
248118
|
+
pointer = spaceUnderActive < pageSize - middle ? pageSize - spaceUnderActive : Math.min(defaultPointerPosition, middle);
|
248119
|
+
}
|
248120
|
+
}
|
248121
|
+
state.current.lastPointer = pointer;
|
248122
|
+
state.current.lastActive = active;
|
248123
|
+
return pointer;
|
248124
|
+
}
|
248125
|
+
function usePagination({ items, active, renderItem, pageSize, loop = true }) {
|
248126
|
+
const width = readlineWidth();
|
248127
|
+
const bound = (num) => (num % items.length + items.length) % items.length;
|
248128
|
+
const renderedItems = items.map((item, index) => {
|
248129
|
+
if (item == null)
|
248130
|
+
return [];
|
248131
|
+
return breakLines(renderItem({ item, index, isActive: index === active }), width).split(`
|
248132
|
+
`);
|
248133
|
+
});
|
248134
|
+
const renderedLength = renderedItems.reduce((acc, item) => acc + item.length, 0);
|
248135
|
+
const renderItemAtIndex = (index) => renderedItems[index] ?? [];
|
248136
|
+
const pointer = usePointerPosition({ active, renderedItems, pageSize, loop });
|
248137
|
+
const activeItem = renderItemAtIndex(active).slice(0, pageSize);
|
248138
|
+
const activeItemPosition = pointer + activeItem.length <= pageSize ? pointer : pageSize - activeItem.length;
|
248139
|
+
const pageBuffer = Array.from({ length: pageSize });
|
248140
|
+
pageBuffer.splice(activeItemPosition, activeItem.length, ...activeItem);
|
248141
|
+
const itemVisited = new Set([active]);
|
248142
|
+
let bufferPointer = activeItemPosition + activeItem.length;
|
248143
|
+
let itemPointer = bound(active + 1);
|
248144
|
+
while (bufferPointer < pageSize && !itemVisited.has(itemPointer) && (loop && renderedLength > pageSize ? itemPointer !== active : itemPointer > active)) {
|
248145
|
+
const lines = renderItemAtIndex(itemPointer);
|
248146
|
+
const linesToAdd = lines.slice(0, pageSize - bufferPointer);
|
248147
|
+
pageBuffer.splice(bufferPointer, linesToAdd.length, ...linesToAdd);
|
248148
|
+
itemVisited.add(itemPointer);
|
248149
|
+
bufferPointer += linesToAdd.length;
|
248150
|
+
itemPointer = bound(itemPointer + 1);
|
248151
|
+
}
|
248152
|
+
bufferPointer = activeItemPosition - 1;
|
248153
|
+
itemPointer = bound(active - 1);
|
248154
|
+
while (bufferPointer >= 0 && !itemVisited.has(itemPointer) && (loop && renderedLength > pageSize ? itemPointer !== active : itemPointer < active)) {
|
248155
|
+
const lines = renderItemAtIndex(itemPointer);
|
248156
|
+
const linesToAdd = lines.slice(Math.max(0, lines.length - bufferPointer - 1));
|
248157
|
+
pageBuffer.splice(bufferPointer - linesToAdd.length + 1, linesToAdd.length, ...linesToAdd);
|
248158
|
+
itemVisited.add(itemPointer);
|
248159
|
+
bufferPointer -= linesToAdd.length;
|
248160
|
+
itemPointer = bound(itemPointer - 1);
|
248161
|
+
}
|
248162
|
+
return pageBuffer.filter((line) => typeof line === "string").join(`
|
248163
|
+
`);
|
248164
|
+
}
|
248085
248165
|
// ../../node_modules/.bun/@inquirer+core@10.2.2+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
|
248086
248166
|
var import_mute_stream = __toESM(require_lib(), 1);
|
248087
248167
|
import * as readline2 from "node:readline";
|
@@ -248478,6 +248558,20 @@ function createPrompt(view) {
|
|
248478
248558
|
};
|
248479
248559
|
return prompt;
|
248480
248560
|
}
|
248561
|
+
// ../../node_modules/.bun/@inquirer+core@10.2.2+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/Separator.js
|
248562
|
+
var import_yoctocolors_cjs2 = __toESM(require_yoctocolors_cjs(), 1);
|
248563
|
+
class Separator {
|
248564
|
+
separator = import_yoctocolors_cjs2.default.dim(Array.from({ length: 15 }).join(esm_default.line));
|
248565
|
+
type = "separator";
|
248566
|
+
constructor(separator) {
|
248567
|
+
if (separator) {
|
248568
|
+
this.separator = separator;
|
248569
|
+
}
|
248570
|
+
}
|
248571
|
+
static isSeparator(choice) {
|
248572
|
+
return Boolean(choice && typeof choice === "object" && "type" in choice && choice.type === "separator");
|
248573
|
+
}
|
248574
|
+
}
|
248481
248575
|
// ../../node_modules/.bun/yoctocolors@2.1.2/node_modules/yoctocolors/base.js
|
248482
248576
|
var exports_base = {};
|
248483
248577
|
__export(exports_base, {
|
@@ -267135,7 +267229,7 @@ function pruneCurrentEnv(currentEnv, env2) {
|
|
267135
267229
|
var package_default = {
|
267136
267230
|
name: "@settlemint/sdk-cli",
|
267137
267231
|
description: "Command-line interface for SettleMint SDK, providing development tools and project management capabilities",
|
267138
|
-
version: "2.6.2-
|
267232
|
+
version: "2.6.2-pr58a3d130",
|
267139
267233
|
type: "module",
|
267140
267234
|
private: false,
|
267141
267235
|
license: "FSL-1.1-MIT",
|
@@ -267185,14 +267279,14 @@ var package_default = {
|
|
267185
267279
|
devDependencies: {
|
267186
267280
|
"@commander-js/extra-typings": "14.0.0",
|
267187
267281
|
commander: "14.0.1",
|
267188
|
-
"@inquirer/confirm": "5.1.
|
267189
|
-
"@inquirer/input": "4.2.
|
267190
|
-
"@inquirer/password": "4.0.
|
267191
|
-
"@inquirer/select": "4.3.
|
267192
|
-
"@settlemint/sdk-hasura": "2.6.2-
|
267193
|
-
"@settlemint/sdk-js": "2.6.2-
|
267194
|
-
"@settlemint/sdk-utils": "2.6.2-
|
267195
|
-
"@settlemint/sdk-viem": "2.6.2-
|
267282
|
+
"@inquirer/confirm": "5.1.18",
|
267283
|
+
"@inquirer/input": "4.2.2",
|
267284
|
+
"@inquirer/password": "4.0.20",
|
267285
|
+
"@inquirer/select": "4.3.4",
|
267286
|
+
"@settlemint/sdk-hasura": "2.6.2-pr58a3d130",
|
267287
|
+
"@settlemint/sdk-js": "2.6.2-pr58a3d130",
|
267288
|
+
"@settlemint/sdk-utils": "2.6.2-pr58a3d130",
|
267289
|
+
"@settlemint/sdk-viem": "2.6.2-pr58a3d130",
|
267196
267290
|
"@types/node": "24.4.0",
|
267197
267291
|
"@types/semver": "7.7.1",
|
267198
267292
|
"@types/which": "3.0.4",
|
@@ -267209,7 +267303,7 @@ var package_default = {
|
|
267209
267303
|
},
|
267210
267304
|
peerDependencies: {
|
267211
267305
|
hardhat: "<= 4",
|
267212
|
-
"@settlemint/sdk-js": "2.6.2-
|
267306
|
+
"@settlemint/sdk-js": "2.6.2-pr58a3d130"
|
267213
267307
|
},
|
267214
267308
|
peerDependenciesMeta: {
|
267215
267309
|
hardhat: {
|
@@ -273027,101 +273121,9 @@ function sanitizeName(value5, length = 35) {
|
|
273027
273121
|
}).slice(0, length).replaceAll(/(^\d*)/g, "").replaceAll(/(-$)/g, "").replaceAll(/(^-)/g, "");
|
273028
273122
|
}
|
273029
273123
|
|
273030
|
-
// ../../node_modules/.bun/@inquirer+input@4.2.4+e9dc26b4af2fda18/node_modules/@inquirer/input/dist/esm/index.js
|
273031
|
-
var inputTheme = {
|
273032
|
-
validationFailureMode: "keep"
|
273033
|
-
};
|
273034
|
-
var esm_default2 = createPrompt((config3, done) => {
|
273035
|
-
const { required: required2, validate: validate3 = () => true, prefill = "tab" } = config3;
|
273036
|
-
const theme = makeTheme(inputTheme, config3.theme);
|
273037
|
-
const [status, setStatus] = useState("idle");
|
273038
|
-
const [defaultValue = "", setDefaultValue] = useState(config3.default);
|
273039
|
-
const [errorMsg, setError] = useState();
|
273040
|
-
const [value5, setValue] = useState("");
|
273041
|
-
const prefix = usePrefix({ status, theme });
|
273042
|
-
useKeypress(async (key2, rl) => {
|
273043
|
-
if (status !== "idle") {
|
273044
|
-
return;
|
273045
|
-
}
|
273046
|
-
if (isEnterKey(key2)) {
|
273047
|
-
const answer = value5 || defaultValue;
|
273048
|
-
setStatus("loading");
|
273049
|
-
const isValid = required2 && !answer ? "You must provide a value" : await validate3(answer);
|
273050
|
-
if (isValid === true) {
|
273051
|
-
setValue(answer);
|
273052
|
-
setStatus("done");
|
273053
|
-
done(answer);
|
273054
|
-
} else {
|
273055
|
-
if (theme.validationFailureMode === "clear") {
|
273056
|
-
setValue("");
|
273057
|
-
} else {
|
273058
|
-
rl.write(value5);
|
273059
|
-
}
|
273060
|
-
setError(isValid || "You must provide a valid value");
|
273061
|
-
setStatus("idle");
|
273062
|
-
}
|
273063
|
-
} else if (isBackspaceKey(key2) && !value5) {
|
273064
|
-
setDefaultValue(undefined);
|
273065
|
-
} else if (isTabKey(key2) && !value5) {
|
273066
|
-
setDefaultValue(undefined);
|
273067
|
-
rl.clearLine(0);
|
273068
|
-
rl.write(defaultValue);
|
273069
|
-
setValue(defaultValue);
|
273070
|
-
} else {
|
273071
|
-
setValue(rl.line);
|
273072
|
-
setError(undefined);
|
273073
|
-
}
|
273074
|
-
});
|
273075
|
-
useEffect((rl) => {
|
273076
|
-
if (prefill === "editable" && defaultValue) {
|
273077
|
-
rl.write(defaultValue);
|
273078
|
-
setValue(defaultValue);
|
273079
|
-
}
|
273080
|
-
}, []);
|
273081
|
-
const message = theme.style.message(config3.message, status);
|
273082
|
-
let formattedValue = value5;
|
273083
|
-
if (typeof config3.transformer === "function") {
|
273084
|
-
formattedValue = config3.transformer(value5, { isFinal: status === "done" });
|
273085
|
-
} else if (status === "done") {
|
273086
|
-
formattedValue = theme.style.answer(value5);
|
273087
|
-
}
|
273088
|
-
let defaultStr;
|
273089
|
-
if (defaultValue && status !== "done" && !value5) {
|
273090
|
-
defaultStr = theme.style.defaultAnswer(defaultValue);
|
273091
|
-
}
|
273092
|
-
let error48 = "";
|
273093
|
-
if (errorMsg) {
|
273094
|
-
error48 = theme.style.error(errorMsg);
|
273095
|
-
}
|
273096
|
-
return [
|
273097
|
-
[prefix, message, defaultStr, formattedValue].filter((v6) => v6 !== undefined).join(" "),
|
273098
|
-
error48
|
273099
|
-
];
|
273100
|
-
});
|
273101
|
-
|
273102
|
-
// src/prompts/smart-contract-set/subgraph-name.prompt.ts
|
273103
|
-
async function subgraphNamePrompt({
|
273104
|
-
defaultName,
|
273105
|
-
env: env2,
|
273106
|
-
accept
|
273107
|
-
}) {
|
273108
|
-
const defaultSubgraphName = defaultName ? sanitizeName(defaultName) : undefined;
|
273109
|
-
if (accept) {
|
273110
|
-
return defaultSubgraphName ?? env2.SETTLEMINT_THEGRAPH_DEFAULT_SUBGRAPH;
|
273111
|
-
}
|
273112
|
-
const subgraphName = await esm_default2({
|
273113
|
-
message: "What is the name of your subgraph?",
|
273114
|
-
default: defaultSubgraphName,
|
273115
|
-
required: true
|
273116
|
-
});
|
273117
|
-
return sanitizeName(subgraphName);
|
273118
|
-
}
|
273119
|
-
|
273120
273124
|
// ../../node_modules/.bun/@inquirer+core@10.2.0+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/key.js
|
273121
|
-
var isUpKey = (key2) => key2.name === "up";
|
273122
|
-
var isDownKey = (key2) => key2.name === "down";
|
273123
273125
|
var isBackspaceKey2 = (key2) => key2.name === "backspace";
|
273124
|
-
var
|
273126
|
+
var isTabKey2 = (key2) => key2.name === "tab";
|
273125
273127
|
var isEnterKey2 = (key2) => key2.name === "enter" || key2.name === "return";
|
273126
273128
|
// ../../node_modules/.bun/@inquirer+core@10.2.0+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/errors.js
|
273127
273129
|
class AbortPromptError2 extends Error {
|
@@ -273288,24 +273290,24 @@ function useEffect2(cb, depArray) {
|
|
273288
273290
|
}
|
273289
273291
|
|
273290
273292
|
// ../../node_modules/.bun/@inquirer+core@10.2.0+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/theme.js
|
273291
|
-
var
|
273293
|
+
var import_yoctocolors_cjs3 = __toESM(require_yoctocolors_cjs(), 1);
|
273292
273294
|
var defaultTheme2 = {
|
273293
273295
|
prefix: {
|
273294
|
-
idle:
|
273295
|
-
done:
|
273296
|
+
idle: import_yoctocolors_cjs3.default.blue("?"),
|
273297
|
+
done: import_yoctocolors_cjs3.default.green(esm_default.tick)
|
273296
273298
|
},
|
273297
273299
|
spinner: {
|
273298
273300
|
interval: 80,
|
273299
|
-
frames: ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"].map((frame) =>
|
273301
|
+
frames: ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"].map((frame) => import_yoctocolors_cjs3.default.yellow(frame))
|
273300
273302
|
},
|
273301
273303
|
style: {
|
273302
|
-
answer:
|
273303
|
-
message:
|
273304
|
-
error: (text2) =>
|
273305
|
-
defaultAnswer: (text2) =>
|
273306
|
-
help:
|
273307
|
-
highlight:
|
273308
|
-
key: (text2) =>
|
273304
|
+
answer: import_yoctocolors_cjs3.default.cyan,
|
273305
|
+
message: import_yoctocolors_cjs3.default.bold,
|
273306
|
+
error: (text2) => import_yoctocolors_cjs3.default.red(`> ${text2}`),
|
273307
|
+
defaultAnswer: (text2) => import_yoctocolors_cjs3.default.dim(`(${text2})`),
|
273308
|
+
help: import_yoctocolors_cjs3.default.dim,
|
273309
|
+
highlight: import_yoctocolors_cjs3.default.cyan,
|
273310
|
+
key: (text2) => import_yoctocolors_cjs3.default.cyan(import_yoctocolors_cjs3.default.bold(`<${text2}>`))
|
273309
273311
|
}
|
273310
273312
|
};
|
273311
273313
|
|
@@ -273367,22 +273369,11 @@ function usePrefix2({ status = "idle", theme }) {
|
|
273367
273369
|
const iconName = status === "loading" ? "idle" : status;
|
273368
273370
|
return typeof prefix === "string" ? prefix : prefix[iconName] ?? prefix["idle"];
|
273369
273371
|
}
|
273370
|
-
// ../../node_modules/.bun/@inquirer+core@10.2.0+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/use-memo.js
|
273371
|
-
function useMemo(fn, dependencies) {
|
273372
|
-
return withPointer2((pointer) => {
|
273373
|
-
const prev = pointer.get();
|
273374
|
-
if (!prev || prev.dependencies.length !== dependencies.length || prev.dependencies.some((dep, i7) => dep !== dependencies[i7])) {
|
273375
|
-
const value5 = fn();
|
273376
|
-
pointer.set({ value: value5, dependencies });
|
273377
|
-
return value5;
|
273378
|
-
}
|
273379
|
-
return prev.value;
|
273380
|
-
});
|
273381
|
-
}
|
273382
273372
|
// ../../node_modules/.bun/@inquirer+core@10.2.0+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/use-ref.js
|
273383
273373
|
function useRef2(val) {
|
273384
273374
|
return useState2({ current: val })[0];
|
273385
273375
|
}
|
273376
|
+
|
273386
273377
|
// ../../node_modules/.bun/@inquirer+core@10.2.0+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/use-keypress.js
|
273387
273378
|
function useKeypress2(userHandler) {
|
273388
273379
|
const signal = useRef2(userHandler);
|
@@ -273414,72 +273405,6 @@ function readlineWidth2() {
|
|
273414
273405
|
return import_cli_width2.default({ defaultWidth: 80, output: readline3().output });
|
273415
273406
|
}
|
273416
273407
|
|
273417
|
-
// ../../node_modules/.bun/@inquirer+core@10.2.0+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/pagination/use-pagination.js
|
273418
|
-
function usePointerPosition({ active, renderedItems, pageSize, loop }) {
|
273419
|
-
const state = useRef2({
|
273420
|
-
lastPointer: active,
|
273421
|
-
lastActive: undefined
|
273422
|
-
});
|
273423
|
-
const { lastPointer, lastActive } = state.current;
|
273424
|
-
const middle = Math.floor(pageSize / 2);
|
273425
|
-
const renderedLength = renderedItems.reduce((acc, item) => acc + item.length, 0);
|
273426
|
-
const defaultPointerPosition = renderedItems.slice(0, active).reduce((acc, item) => acc + item.length, 0);
|
273427
|
-
let pointer = defaultPointerPosition;
|
273428
|
-
if (renderedLength > pageSize) {
|
273429
|
-
if (loop) {
|
273430
|
-
pointer = lastPointer;
|
273431
|
-
if (lastActive != null && lastActive < active && active - lastActive < pageSize) {
|
273432
|
-
pointer = Math.min(middle, Math.abs(active - lastActive) === 1 ? Math.min(lastPointer + (renderedItems[lastActive]?.length ?? 0), Math.max(defaultPointerPosition, lastPointer)) : lastPointer + active - lastActive);
|
273433
|
-
}
|
273434
|
-
} else {
|
273435
|
-
const spaceUnderActive = renderedItems.slice(active).reduce((acc, item) => acc + item.length, 0);
|
273436
|
-
pointer = spaceUnderActive < pageSize - middle ? pageSize - spaceUnderActive : Math.min(defaultPointerPosition, middle);
|
273437
|
-
}
|
273438
|
-
}
|
273439
|
-
state.current.lastPointer = pointer;
|
273440
|
-
state.current.lastActive = active;
|
273441
|
-
return pointer;
|
273442
|
-
}
|
273443
|
-
function usePagination({ items, active, renderItem, pageSize, loop = true }) {
|
273444
|
-
const width = readlineWidth2();
|
273445
|
-
const bound = (num) => (num % items.length + items.length) % items.length;
|
273446
|
-
const renderedItems = items.map((item, index) => {
|
273447
|
-
if (item == null)
|
273448
|
-
return [];
|
273449
|
-
return breakLines2(renderItem({ item, index, isActive: index === active }), width).split(`
|
273450
|
-
`);
|
273451
|
-
});
|
273452
|
-
const renderedLength = renderedItems.reduce((acc, item) => acc + item.length, 0);
|
273453
|
-
const renderItemAtIndex = (index) => renderedItems[index] ?? [];
|
273454
|
-
const pointer = usePointerPosition({ active, renderedItems, pageSize, loop });
|
273455
|
-
const activeItem = renderItemAtIndex(active).slice(0, pageSize);
|
273456
|
-
const activeItemPosition = pointer + activeItem.length <= pageSize ? pointer : pageSize - activeItem.length;
|
273457
|
-
const pageBuffer = Array.from({ length: pageSize });
|
273458
|
-
pageBuffer.splice(activeItemPosition, activeItem.length, ...activeItem);
|
273459
|
-
const itemVisited = new Set([active]);
|
273460
|
-
let bufferPointer = activeItemPosition + activeItem.length;
|
273461
|
-
let itemPointer = bound(active + 1);
|
273462
|
-
while (bufferPointer < pageSize && !itemVisited.has(itemPointer) && (loop && renderedLength > pageSize ? itemPointer !== active : itemPointer > active)) {
|
273463
|
-
const lines = renderItemAtIndex(itemPointer);
|
273464
|
-
const linesToAdd = lines.slice(0, pageSize - bufferPointer);
|
273465
|
-
pageBuffer.splice(bufferPointer, linesToAdd.length, ...linesToAdd);
|
273466
|
-
itemVisited.add(itemPointer);
|
273467
|
-
bufferPointer += linesToAdd.length;
|
273468
|
-
itemPointer = bound(itemPointer + 1);
|
273469
|
-
}
|
273470
|
-
bufferPointer = activeItemPosition - 1;
|
273471
|
-
itemPointer = bound(active - 1);
|
273472
|
-
while (bufferPointer >= 0 && !itemVisited.has(itemPointer) && (loop && renderedLength > pageSize ? itemPointer !== active : itemPointer < active)) {
|
273473
|
-
const lines = renderItemAtIndex(itemPointer);
|
273474
|
-
const linesToAdd = lines.slice(Math.max(0, lines.length - bufferPointer - 1));
|
273475
|
-
pageBuffer.splice(bufferPointer - linesToAdd.length + 1, linesToAdd.length, ...linesToAdd);
|
273476
|
-
itemVisited.add(itemPointer);
|
273477
|
-
bufferPointer -= linesToAdd.length;
|
273478
|
-
itemPointer = bound(itemPointer - 1);
|
273479
|
-
}
|
273480
|
-
return pageBuffer.filter((line) => typeof line === "string").join(`
|
273481
|
-
`);
|
273482
|
-
}
|
273483
273408
|
// ../../node_modules/.bun/@inquirer+core@10.2.0+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
|
273484
273409
|
var import_mute_stream2 = __toESM(require_lib(), 1);
|
273485
273410
|
import * as readline4 from "node:readline";
|
@@ -273654,23 +273579,98 @@ function createPrompt2(view) {
|
|
273654
273579
|
};
|
273655
273580
|
return prompt;
|
273656
273581
|
}
|
273657
|
-
// ../../node_modules/.bun/@inquirer+
|
273658
|
-
var
|
273659
|
-
|
273660
|
-
|
273661
|
-
|
273662
|
-
|
273663
|
-
|
273664
|
-
|
273582
|
+
// ../../node_modules/.bun/@inquirer+input@4.2.2+e9dc26b4af2fda18/node_modules/@inquirer/input/dist/esm/index.js
|
273583
|
+
var inputTheme = {
|
273584
|
+
validationFailureMode: "keep"
|
273585
|
+
};
|
273586
|
+
var esm_default2 = createPrompt2((config3, done) => {
|
273587
|
+
const { required: required2, validate: validate3 = () => true, prefill = "tab" } = config3;
|
273588
|
+
const theme = makeTheme2(inputTheme, config3.theme);
|
273589
|
+
const [status, setStatus] = useState2("idle");
|
273590
|
+
const [defaultValue = "", setDefaultValue] = useState2(config3.default);
|
273591
|
+
const [errorMsg, setError] = useState2();
|
273592
|
+
const [value5, setValue] = useState2("");
|
273593
|
+
const prefix = usePrefix2({ status, theme });
|
273594
|
+
useKeypress2(async (key3, rl) => {
|
273595
|
+
if (status !== "idle") {
|
273596
|
+
return;
|
273597
|
+
}
|
273598
|
+
if (isEnterKey2(key3)) {
|
273599
|
+
const answer = value5 || defaultValue;
|
273600
|
+
setStatus("loading");
|
273601
|
+
const isValid = required2 && !answer ? "You must provide a value" : await validate3(answer);
|
273602
|
+
if (isValid === true) {
|
273603
|
+
setValue(answer);
|
273604
|
+
setStatus("done");
|
273605
|
+
done(answer);
|
273606
|
+
} else {
|
273607
|
+
if (theme.validationFailureMode === "clear") {
|
273608
|
+
setValue("");
|
273609
|
+
} else {
|
273610
|
+
rl.write(value5);
|
273611
|
+
}
|
273612
|
+
setError(isValid || "You must provide a valid value");
|
273613
|
+
setStatus("idle");
|
273614
|
+
}
|
273615
|
+
} else if (isBackspaceKey2(key3) && !value5) {
|
273616
|
+
setDefaultValue(undefined);
|
273617
|
+
} else if (isTabKey2(key3) && !value5) {
|
273618
|
+
setDefaultValue(undefined);
|
273619
|
+
rl.clearLine(0);
|
273620
|
+
rl.write(defaultValue);
|
273621
|
+
setValue(defaultValue);
|
273622
|
+
} else {
|
273623
|
+
setValue(rl.line);
|
273624
|
+
setError(undefined);
|
273625
|
+
}
|
273626
|
+
});
|
273627
|
+
useEffect2((rl) => {
|
273628
|
+
if (prefill === "editable" && defaultValue) {
|
273629
|
+
rl.write(defaultValue);
|
273630
|
+
setValue(defaultValue);
|
273665
273631
|
}
|
273632
|
+
}, []);
|
273633
|
+
const message = theme.style.message(config3.message, status);
|
273634
|
+
let formattedValue = value5;
|
273635
|
+
if (typeof config3.transformer === "function") {
|
273636
|
+
formattedValue = config3.transformer(value5, { isFinal: status === "done" });
|
273637
|
+
} else if (status === "done") {
|
273638
|
+
formattedValue = theme.style.answer(value5);
|
273666
273639
|
}
|
273667
|
-
|
273668
|
-
|
273640
|
+
let defaultStr;
|
273641
|
+
if (defaultValue && status !== "done" && !value5) {
|
273642
|
+
defaultStr = theme.style.defaultAnswer(defaultValue);
|
273669
273643
|
}
|
273644
|
+
let error48 = "";
|
273645
|
+
if (errorMsg) {
|
273646
|
+
error48 = theme.style.error(errorMsg);
|
273647
|
+
}
|
273648
|
+
return [
|
273649
|
+
[prefix, message, defaultStr, formattedValue].filter((v6) => v6 !== undefined).join(" "),
|
273650
|
+
error48
|
273651
|
+
];
|
273652
|
+
});
|
273653
|
+
|
273654
|
+
// src/prompts/smart-contract-set/subgraph-name.prompt.ts
|
273655
|
+
async function subgraphNamePrompt({
|
273656
|
+
defaultName,
|
273657
|
+
env: env2,
|
273658
|
+
accept
|
273659
|
+
}) {
|
273660
|
+
const defaultSubgraphName = defaultName ? sanitizeName(defaultName) : undefined;
|
273661
|
+
if (accept) {
|
273662
|
+
return defaultSubgraphName ?? env2.SETTLEMINT_THEGRAPH_DEFAULT_SUBGRAPH;
|
273663
|
+
}
|
273664
|
+
const subgraphName = await esm_default2({
|
273665
|
+
message: "What is the name of your subgraph?",
|
273666
|
+
default: defaultSubgraphName,
|
273667
|
+
required: true
|
273668
|
+
});
|
273669
|
+
return sanitizeName(subgraphName);
|
273670
273670
|
}
|
273671
|
-
|
273671
|
+
|
273672
|
+
// ../../node_modules/.bun/@inquirer+select@4.3.4+e9dc26b4af2fda18/node_modules/@inquirer/select/dist/esm/index.js
|
273672
273673
|
var import_yoctocolors_cjs4 = __toESM(require_yoctocolors_cjs(), 1);
|
273673
|
-
var import_ansi_escapes2 = __toESM(require_ansi_escapes(), 1);
|
273674
273674
|
var selectTheme = {
|
273675
273675
|
icon: { cursor: esm_default.pointer },
|
273676
273676
|
style: {
|
@@ -273708,19 +273708,19 @@ function normalizeChoices(choices) {
|
|
273708
273708
|
return normalizedChoice;
|
273709
273709
|
});
|
273710
273710
|
}
|
273711
|
-
var esm_default3 =
|
273711
|
+
var esm_default3 = createPrompt((config3, done) => {
|
273712
273712
|
const { loop = true, pageSize = 7 } = config3;
|
273713
|
-
const firstRender =
|
273714
|
-
const theme =
|
273715
|
-
const [status, setStatus] =
|
273716
|
-
const prefix =
|
273717
|
-
const searchTimeoutRef =
|
273713
|
+
const firstRender = useRef(true);
|
273714
|
+
const theme = makeTheme(selectTheme, config3.theme);
|
273715
|
+
const [status, setStatus] = useState("idle");
|
273716
|
+
const prefix = usePrefix({ status, theme });
|
273717
|
+
const searchTimeoutRef = useRef();
|
273718
273718
|
const items = useMemo(() => normalizeChoices(config3.choices), [config3.choices]);
|
273719
273719
|
const bounds = useMemo(() => {
|
273720
273720
|
const first = items.findIndex(isSelectable);
|
273721
273721
|
const last = items.findLastIndex(isSelectable);
|
273722
273722
|
if (first === -1) {
|
273723
|
-
throw new
|
273723
|
+
throw new ValidationError("[select prompt] No selectable choices. All choices are disabled.");
|
273724
273724
|
}
|
273725
273725
|
return { first, last };
|
273726
273726
|
}, [items]);
|
@@ -273729,11 +273729,11 @@ var esm_default3 = createPrompt2((config3, done) => {
|
|
273729
273729
|
return -1;
|
273730
273730
|
return items.findIndex((item) => isSelectable(item) && item.value === config3.default);
|
273731
273731
|
}, [config3.default, items]);
|
273732
|
-
const [active, setActive] =
|
273732
|
+
const [active, setActive] = useState(defaultItemIndex === -1 ? bounds.first : defaultItemIndex);
|
273733
273733
|
const selectedChoice = items[active];
|
273734
|
-
|
273734
|
+
useKeypress((key3, rl) => {
|
273735
273735
|
clearTimeout(searchTimeoutRef.current);
|
273736
|
-
if (
|
273736
|
+
if (isEnterKey(key3)) {
|
273737
273737
|
setStatus("done");
|
273738
273738
|
done(selectedChoice.value);
|
273739
273739
|
} else if (isUpKey(key3) || isDownKey(key3)) {
|
@@ -273762,7 +273762,7 @@ var esm_default3 = createPrompt2((config3, done) => {
|
|
273762
273762
|
searchTimeoutRef.current = setTimeout(() => {
|
273763
273763
|
rl.clearLine(0);
|
273764
273764
|
}, 700);
|
273765
|
-
} else if (
|
273765
|
+
} else if (isBackspaceKey(key3)) {
|
273766
273766
|
rl.clearLine(0);
|
273767
273767
|
} else {
|
273768
273768
|
const searchTerm = rl.line.toLowerCase();
|
@@ -273779,7 +273779,7 @@ var esm_default3 = createPrompt2((config3, done) => {
|
|
273779
273779
|
}, 700);
|
273780
273780
|
}
|
273781
273781
|
});
|
273782
|
-
|
273782
|
+
useEffect(() => () => {
|
273783
273783
|
clearTimeout(searchTimeoutRef.current);
|
273784
273784
|
}, []);
|
273785
273785
|
const message = theme.style.message(config3.message, status);
|
@@ -273821,7 +273821,7 @@ ${theme.style.help(`(${config3.instructions?.pager ?? "Use arrow keys to reveal
|
|
273821
273821
|
const choiceDescription = selectedChoice.description ? `
|
273822
273822
|
${theme.style.description(selectedChoice.description)}` : ``;
|
273823
273823
|
return `${[prefix, message, helpTipTop].filter(Boolean).join(" ")}
|
273824
|
-
${page}${helpTipBottom}${choiceDescription}${
|
273824
|
+
${page}${helpTipBottom}${choiceDescription}${cursorHide}`;
|
273825
273825
|
});
|
273826
273826
|
|
273827
273827
|
// src/prompts/smart-contract-set/subgraph.prompt.ts
|
@@ -299407,464 +299407,7 @@ function extractInfoFromBody(body) {
|
|
299407
299407
|
}
|
299408
299408
|
}
|
299409
299409
|
|
299410
|
-
// ../../node_modules/.bun/@inquirer+
|
299411
|
-
var isTabKey2 = (key3) => key3.name === "tab";
|
299412
|
-
var isEnterKey3 = (key3) => key3.name === "enter" || key3.name === "return";
|
299413
|
-
// ../../node_modules/.bun/@inquirer+core@10.2.1+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/errors.js
|
299414
|
-
class AbortPromptError3 extends Error {
|
299415
|
-
name = "AbortPromptError";
|
299416
|
-
message = "Prompt was aborted";
|
299417
|
-
constructor(options) {
|
299418
|
-
super();
|
299419
|
-
this.cause = options?.cause;
|
299420
|
-
}
|
299421
|
-
}
|
299422
|
-
|
299423
|
-
class CancelPromptError3 extends Error {
|
299424
|
-
name = "CancelPromptError";
|
299425
|
-
message = "Prompt was canceled";
|
299426
|
-
}
|
299427
|
-
|
299428
|
-
class ExitPromptError3 extends Error {
|
299429
|
-
name = "ExitPromptError";
|
299430
|
-
}
|
299431
|
-
|
299432
|
-
class HookError3 extends Error {
|
299433
|
-
name = "HookError";
|
299434
|
-
}
|
299435
|
-
|
299436
|
-
class ValidationError3 extends Error {
|
299437
|
-
name = "ValidationError";
|
299438
|
-
}
|
299439
|
-
// ../../node_modules/.bun/@inquirer+core@10.2.1+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/use-state.js
|
299440
|
-
import { AsyncResource as AsyncResource8 } from "node:async_hooks";
|
299441
|
-
|
299442
|
-
// ../../node_modules/.bun/@inquirer+core@10.2.1+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/hook-engine.js
|
299443
|
-
import { AsyncLocalStorage as AsyncLocalStorage3, AsyncResource as AsyncResource7 } from "node:async_hooks";
|
299444
|
-
var hookStorage3 = new AsyncLocalStorage3;
|
299445
|
-
function createStore3(rl) {
|
299446
|
-
const store = {
|
299447
|
-
rl,
|
299448
|
-
hooks: [],
|
299449
|
-
hooksCleanup: [],
|
299450
|
-
hooksEffect: [],
|
299451
|
-
index: 0,
|
299452
|
-
handleChange() {}
|
299453
|
-
};
|
299454
|
-
return store;
|
299455
|
-
}
|
299456
|
-
function withHooks3(rl, cb) {
|
299457
|
-
const store = createStore3(rl);
|
299458
|
-
return hookStorage3.run(store, () => {
|
299459
|
-
function cycle(render) {
|
299460
|
-
store.handleChange = () => {
|
299461
|
-
store.index = 0;
|
299462
|
-
render();
|
299463
|
-
};
|
299464
|
-
store.handleChange();
|
299465
|
-
}
|
299466
|
-
return cb(cycle);
|
299467
|
-
});
|
299468
|
-
}
|
299469
|
-
function getStore3() {
|
299470
|
-
const store = hookStorage3.getStore();
|
299471
|
-
if (!store) {
|
299472
|
-
throw new HookError3("[Inquirer] Hook functions can only be called from within a prompt");
|
299473
|
-
}
|
299474
|
-
return store;
|
299475
|
-
}
|
299476
|
-
function readline5() {
|
299477
|
-
return getStore3().rl;
|
299478
|
-
}
|
299479
|
-
function withUpdates3(fn) {
|
299480
|
-
const wrapped = (...args) => {
|
299481
|
-
const store = getStore3();
|
299482
|
-
let shouldUpdate = false;
|
299483
|
-
const oldHandleChange = store.handleChange;
|
299484
|
-
store.handleChange = () => {
|
299485
|
-
shouldUpdate = true;
|
299486
|
-
};
|
299487
|
-
const returnValue = fn(...args);
|
299488
|
-
if (shouldUpdate) {
|
299489
|
-
oldHandleChange();
|
299490
|
-
}
|
299491
|
-
store.handleChange = oldHandleChange;
|
299492
|
-
return returnValue;
|
299493
|
-
};
|
299494
|
-
return AsyncResource7.bind(wrapped);
|
299495
|
-
}
|
299496
|
-
function withPointer3(cb) {
|
299497
|
-
const store = getStore3();
|
299498
|
-
const { index: index2 } = store;
|
299499
|
-
const pointer = {
|
299500
|
-
get() {
|
299501
|
-
return store.hooks[index2];
|
299502
|
-
},
|
299503
|
-
set(value5) {
|
299504
|
-
store.hooks[index2] = value5;
|
299505
|
-
},
|
299506
|
-
initialized: index2 in store.hooks
|
299507
|
-
};
|
299508
|
-
const returnValue = cb(pointer);
|
299509
|
-
store.index++;
|
299510
|
-
return returnValue;
|
299511
|
-
}
|
299512
|
-
function handleChange3() {
|
299513
|
-
getStore3().handleChange();
|
299514
|
-
}
|
299515
|
-
var effectScheduler3 = {
|
299516
|
-
queue(cb) {
|
299517
|
-
const store = getStore3();
|
299518
|
-
const { index: index2 } = store;
|
299519
|
-
store.hooksEffect.push(() => {
|
299520
|
-
store.hooksCleanup[index2]?.();
|
299521
|
-
const cleanFn = cb(readline5());
|
299522
|
-
if (cleanFn != null && typeof cleanFn !== "function") {
|
299523
|
-
throw new ValidationError3("useEffect return value must be a cleanup function or nothing.");
|
299524
|
-
}
|
299525
|
-
store.hooksCleanup[index2] = cleanFn;
|
299526
|
-
});
|
299527
|
-
},
|
299528
|
-
run() {
|
299529
|
-
const store = getStore3();
|
299530
|
-
withUpdates3(() => {
|
299531
|
-
store.hooksEffect.forEach((effect) => {
|
299532
|
-
effect();
|
299533
|
-
});
|
299534
|
-
store.hooksEffect.length = 0;
|
299535
|
-
})();
|
299536
|
-
},
|
299537
|
-
clearAll() {
|
299538
|
-
const store = getStore3();
|
299539
|
-
store.hooksCleanup.forEach((cleanFn) => {
|
299540
|
-
cleanFn?.();
|
299541
|
-
});
|
299542
|
-
store.hooksEffect.length = 0;
|
299543
|
-
store.hooksCleanup.length = 0;
|
299544
|
-
}
|
299545
|
-
};
|
299546
|
-
|
299547
|
-
// ../../node_modules/.bun/@inquirer+core@10.2.1+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/use-state.js
|
299548
|
-
function useState3(defaultValue) {
|
299549
|
-
return withPointer3((pointer) => {
|
299550
|
-
const setState = AsyncResource8.bind(function setState(newValue) {
|
299551
|
-
if (pointer.get() !== newValue) {
|
299552
|
-
pointer.set(newValue);
|
299553
|
-
handleChange3();
|
299554
|
-
}
|
299555
|
-
});
|
299556
|
-
if (pointer.initialized) {
|
299557
|
-
return [pointer.get(), setState];
|
299558
|
-
}
|
299559
|
-
const value5 = typeof defaultValue === "function" ? defaultValue() : defaultValue;
|
299560
|
-
pointer.set(value5);
|
299561
|
-
return [value5, setState];
|
299562
|
-
});
|
299563
|
-
}
|
299564
|
-
|
299565
|
-
// ../../node_modules/.bun/@inquirer+core@10.2.1+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/use-effect.js
|
299566
|
-
function useEffect3(cb, depArray) {
|
299567
|
-
withPointer3((pointer) => {
|
299568
|
-
const oldDeps = pointer.get();
|
299569
|
-
const hasChanged = !Array.isArray(oldDeps) || depArray.some((dep, i7) => !Object.is(dep, oldDeps[i7]));
|
299570
|
-
if (hasChanged) {
|
299571
|
-
effectScheduler3.queue(cb);
|
299572
|
-
}
|
299573
|
-
pointer.set(depArray);
|
299574
|
-
});
|
299575
|
-
}
|
299576
|
-
|
299577
|
-
// ../../node_modules/.bun/@inquirer+core@10.2.1+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/theme.js
|
299578
|
-
var import_yoctocolors_cjs5 = __toESM(require_yoctocolors_cjs(), 1);
|
299579
|
-
var defaultTheme3 = {
|
299580
|
-
prefix: {
|
299581
|
-
idle: import_yoctocolors_cjs5.default.blue("?"),
|
299582
|
-
done: import_yoctocolors_cjs5.default.green(esm_default.tick)
|
299583
|
-
},
|
299584
|
-
spinner: {
|
299585
|
-
interval: 80,
|
299586
|
-
frames: ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"].map((frame) => import_yoctocolors_cjs5.default.yellow(frame))
|
299587
|
-
},
|
299588
|
-
style: {
|
299589
|
-
answer: import_yoctocolors_cjs5.default.cyan,
|
299590
|
-
message: import_yoctocolors_cjs5.default.bold,
|
299591
|
-
error: (text2) => import_yoctocolors_cjs5.default.red(`> ${text2}`),
|
299592
|
-
defaultAnswer: (text2) => import_yoctocolors_cjs5.default.dim(`(${text2})`),
|
299593
|
-
help: import_yoctocolors_cjs5.default.dim,
|
299594
|
-
highlight: import_yoctocolors_cjs5.default.cyan,
|
299595
|
-
key: (text2) => import_yoctocolors_cjs5.default.cyan(import_yoctocolors_cjs5.default.bold(`<${text2}>`))
|
299596
|
-
}
|
299597
|
-
};
|
299598
|
-
|
299599
|
-
// ../../node_modules/.bun/@inquirer+core@10.2.1+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/make-theme.js
|
299600
|
-
function isPlainObject5(value5) {
|
299601
|
-
if (typeof value5 !== "object" || value5 === null)
|
299602
|
-
return false;
|
299603
|
-
let proto = value5;
|
299604
|
-
while (Object.getPrototypeOf(proto) !== null) {
|
299605
|
-
proto = Object.getPrototypeOf(proto);
|
299606
|
-
}
|
299607
|
-
return Object.getPrototypeOf(value5) === proto;
|
299608
|
-
}
|
299609
|
-
function deepMerge4(...objects) {
|
299610
|
-
const output = {};
|
299611
|
-
for (const obj of objects) {
|
299612
|
-
for (const [key3, value5] of Object.entries(obj)) {
|
299613
|
-
const prevValue = output[key3];
|
299614
|
-
output[key3] = isPlainObject5(prevValue) && isPlainObject5(value5) ? deepMerge4(prevValue, value5) : value5;
|
299615
|
-
}
|
299616
|
-
}
|
299617
|
-
return output;
|
299618
|
-
}
|
299619
|
-
function makeTheme3(...themes) {
|
299620
|
-
const themesToMerge = [
|
299621
|
-
defaultTheme3,
|
299622
|
-
...themes.filter((theme) => theme != null)
|
299623
|
-
];
|
299624
|
-
return deepMerge4(...themesToMerge);
|
299625
|
-
}
|
299626
|
-
|
299627
|
-
// ../../node_modules/.bun/@inquirer+core@10.2.1+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/use-prefix.js
|
299628
|
-
function usePrefix3({ status = "idle", theme }) {
|
299629
|
-
const [showLoader, setShowLoader] = useState3(false);
|
299630
|
-
const [tick, setTick] = useState3(0);
|
299631
|
-
const { prefix, spinner: spinner2 } = makeTheme3(theme);
|
299632
|
-
useEffect3(() => {
|
299633
|
-
if (status === "loading") {
|
299634
|
-
let tickInterval;
|
299635
|
-
let inc = -1;
|
299636
|
-
const delayTimeout = setTimeout(() => {
|
299637
|
-
setShowLoader(true);
|
299638
|
-
tickInterval = setInterval(() => {
|
299639
|
-
inc = inc + 1;
|
299640
|
-
setTick(inc % spinner2.frames.length);
|
299641
|
-
}, spinner2.interval);
|
299642
|
-
}, 300);
|
299643
|
-
return () => {
|
299644
|
-
clearTimeout(delayTimeout);
|
299645
|
-
clearInterval(tickInterval);
|
299646
|
-
};
|
299647
|
-
} else {
|
299648
|
-
setShowLoader(false);
|
299649
|
-
}
|
299650
|
-
}, [status]);
|
299651
|
-
if (showLoader) {
|
299652
|
-
return spinner2.frames[tick];
|
299653
|
-
}
|
299654
|
-
const iconName = status === "loading" ? "idle" : status;
|
299655
|
-
return typeof prefix === "string" ? prefix : prefix[iconName] ?? prefix["idle"];
|
299656
|
-
}
|
299657
|
-
// ../../node_modules/.bun/@inquirer+core@10.2.1+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/use-ref.js
|
299658
|
-
function useRef3(val) {
|
299659
|
-
return useState3({ current: val })[0];
|
299660
|
-
}
|
299661
|
-
|
299662
|
-
// ../../node_modules/.bun/@inquirer+core@10.2.1+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/use-keypress.js
|
299663
|
-
function useKeypress3(userHandler) {
|
299664
|
-
const signal = useRef3(userHandler);
|
299665
|
-
signal.current = userHandler;
|
299666
|
-
useEffect3((rl) => {
|
299667
|
-
let ignore = false;
|
299668
|
-
const handler = withUpdates3((_input, event) => {
|
299669
|
-
if (ignore)
|
299670
|
-
return;
|
299671
|
-
signal.current(event, rl);
|
299672
|
-
});
|
299673
|
-
rl.input.on("keypress", handler);
|
299674
|
-
return () => {
|
299675
|
-
ignore = true;
|
299676
|
-
rl.input.removeListener("keypress", handler);
|
299677
|
-
};
|
299678
|
-
}, []);
|
299679
|
-
}
|
299680
|
-
// ../../node_modules/.bun/@inquirer+core@10.2.1+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/utils.js
|
299681
|
-
var import_cli_width3 = __toESM(require_cli_width(), 1);
|
299682
|
-
var import_wrap_ansi3 = __toESM(require_wrap_ansi(), 1);
|
299683
|
-
function breakLines3(content, width) {
|
299684
|
-
return content.split(`
|
299685
|
-
`).flatMap((line) => import_wrap_ansi3.default(line, width, { trim: false, hard: true }).split(`
|
299686
|
-
`).map((str) => str.trimEnd())).join(`
|
299687
|
-
`);
|
299688
|
-
}
|
299689
|
-
function readlineWidth3() {
|
299690
|
-
return import_cli_width3.default({ defaultWidth: 80, output: readline5().output });
|
299691
|
-
}
|
299692
|
-
|
299693
|
-
// ../../node_modules/.bun/@inquirer+core@10.2.1+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
|
299694
|
-
var import_mute_stream3 = __toESM(require_lib(), 1);
|
299695
|
-
import * as readline6 from "node:readline";
|
299696
|
-
import { AsyncResource as AsyncResource9 } from "node:async_hooks";
|
299697
|
-
|
299698
|
-
// ../../node_modules/.bun/@inquirer+core@10.2.1+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/screen-manager.js
|
299699
|
-
var import_ansi_escapes3 = __toESM(require_ansi_escapes(), 1);
|
299700
|
-
import { stripVTControlCharacters as stripVTControlCharacters4 } from "node:util";
|
299701
|
-
var height3 = (content) => content.split(`
|
299702
|
-
`).length;
|
299703
|
-
var lastLine3 = (content) => content.split(`
|
299704
|
-
`).pop() ?? "";
|
299705
|
-
function cursorDown3(n7) {
|
299706
|
-
return n7 > 0 ? import_ansi_escapes3.default.cursorDown(n7) : "";
|
299707
|
-
}
|
299708
|
-
|
299709
|
-
class ScreenManager3 {
|
299710
|
-
height = 0;
|
299711
|
-
extraLinesUnderPrompt = 0;
|
299712
|
-
cursorPos;
|
299713
|
-
rl;
|
299714
|
-
constructor(rl) {
|
299715
|
-
this.rl = rl;
|
299716
|
-
this.cursorPos = rl.getCursorPos();
|
299717
|
-
}
|
299718
|
-
write(content) {
|
299719
|
-
this.rl.output.unmute();
|
299720
|
-
this.rl.output.write(content);
|
299721
|
-
this.rl.output.mute();
|
299722
|
-
}
|
299723
|
-
render(content, bottomContent = "") {
|
299724
|
-
const promptLine = lastLine3(content);
|
299725
|
-
const rawPromptLine = stripVTControlCharacters4(promptLine);
|
299726
|
-
let prompt = rawPromptLine;
|
299727
|
-
if (this.rl.line.length > 0) {
|
299728
|
-
prompt = prompt.slice(0, -this.rl.line.length);
|
299729
|
-
}
|
299730
|
-
this.rl.setPrompt(prompt);
|
299731
|
-
this.cursorPos = this.rl.getCursorPos();
|
299732
|
-
const width = readlineWidth3();
|
299733
|
-
content = breakLines3(content, width);
|
299734
|
-
bottomContent = breakLines3(bottomContent, width);
|
299735
|
-
if (rawPromptLine.length % width === 0) {
|
299736
|
-
content += `
|
299737
|
-
`;
|
299738
|
-
}
|
299739
|
-
let output = content + (bottomContent ? `
|
299740
|
-
` + bottomContent : "");
|
299741
|
-
const promptLineUpDiff = Math.floor(rawPromptLine.length / width) - this.cursorPos.rows;
|
299742
|
-
const bottomContentHeight = promptLineUpDiff + (bottomContent ? height3(bottomContent) : 0);
|
299743
|
-
if (bottomContentHeight > 0)
|
299744
|
-
output += import_ansi_escapes3.default.cursorUp(bottomContentHeight);
|
299745
|
-
output += import_ansi_escapes3.default.cursorTo(this.cursorPos.cols);
|
299746
|
-
this.write(cursorDown3(this.extraLinesUnderPrompt) + import_ansi_escapes3.default.eraseLines(this.height) + output);
|
299747
|
-
this.extraLinesUnderPrompt = bottomContentHeight;
|
299748
|
-
this.height = height3(output);
|
299749
|
-
}
|
299750
|
-
checkCursorPos() {
|
299751
|
-
const cursorPos = this.rl.getCursorPos();
|
299752
|
-
if (cursorPos.cols !== this.cursorPos.cols) {
|
299753
|
-
this.write(import_ansi_escapes3.default.cursorTo(cursorPos.cols));
|
299754
|
-
this.cursorPos = cursorPos;
|
299755
|
-
}
|
299756
|
-
}
|
299757
|
-
done({ clearContent }) {
|
299758
|
-
this.rl.setPrompt("");
|
299759
|
-
let output = cursorDown3(this.extraLinesUnderPrompt);
|
299760
|
-
output += clearContent ? import_ansi_escapes3.default.eraseLines(this.height) : `
|
299761
|
-
`;
|
299762
|
-
output += import_ansi_escapes3.default.cursorShow;
|
299763
|
-
this.write(output);
|
299764
|
-
this.rl.close();
|
299765
|
-
}
|
299766
|
-
}
|
299767
|
-
|
299768
|
-
// ../../node_modules/.bun/@inquirer+core@10.2.1+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/promise-polyfill.js
|
299769
|
-
class PromisePolyfill3 extends Promise {
|
299770
|
-
static withResolver() {
|
299771
|
-
let resolve7;
|
299772
|
-
let reject;
|
299773
|
-
const promise2 = new Promise((res, rej) => {
|
299774
|
-
resolve7 = res;
|
299775
|
-
reject = rej;
|
299776
|
-
});
|
299777
|
-
return { promise: promise2, resolve: resolve7, reject };
|
299778
|
-
}
|
299779
|
-
}
|
299780
|
-
|
299781
|
-
// ../../node_modules/.bun/@inquirer+core@10.2.1+e9dc26b4af2fda18/node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
|
299782
|
-
function getCallSites3() {
|
299783
|
-
const _prepareStackTrace = Error.prepareStackTrace;
|
299784
|
-
let result = [];
|
299785
|
-
try {
|
299786
|
-
Error.prepareStackTrace = (_5, callSites) => {
|
299787
|
-
const callSitesWithoutCurrent = callSites.slice(1);
|
299788
|
-
result = callSitesWithoutCurrent;
|
299789
|
-
return callSitesWithoutCurrent;
|
299790
|
-
};
|
299791
|
-
new Error().stack;
|
299792
|
-
} catch {
|
299793
|
-
return result;
|
299794
|
-
}
|
299795
|
-
Error.prepareStackTrace = _prepareStackTrace;
|
299796
|
-
return result;
|
299797
|
-
}
|
299798
|
-
function createPrompt3(view) {
|
299799
|
-
const callSites = getCallSites3();
|
299800
|
-
const prompt = (config3, context = {}) => {
|
299801
|
-
const { input = process.stdin, signal } = context;
|
299802
|
-
const cleanups = new Set;
|
299803
|
-
const output = new import_mute_stream3.default;
|
299804
|
-
output.pipe(context.output ?? process.stdout);
|
299805
|
-
const rl = readline6.createInterface({
|
299806
|
-
terminal: true,
|
299807
|
-
input,
|
299808
|
-
output
|
299809
|
-
});
|
299810
|
-
const screen = new ScreenManager3(rl);
|
299811
|
-
const { promise: promise2, resolve: resolve7, reject } = PromisePolyfill3.withResolver();
|
299812
|
-
const cancel3 = () => reject(new CancelPromptError3);
|
299813
|
-
if (signal) {
|
299814
|
-
const abort = () => reject(new AbortPromptError3({ cause: signal.reason }));
|
299815
|
-
if (signal.aborted) {
|
299816
|
-
abort();
|
299817
|
-
return Object.assign(promise2, { cancel: cancel3 });
|
299818
|
-
}
|
299819
|
-
signal.addEventListener("abort", abort);
|
299820
|
-
cleanups.add(() => signal.removeEventListener("abort", abort));
|
299821
|
-
}
|
299822
|
-
cleanups.add(onExit((code2, signal2) => {
|
299823
|
-
reject(new ExitPromptError3(`User force closed the prompt with ${code2} ${signal2}`));
|
299824
|
-
}));
|
299825
|
-
const sigint = () => reject(new ExitPromptError3(`User force closed the prompt with SIGINT`));
|
299826
|
-
rl.on("SIGINT", sigint);
|
299827
|
-
cleanups.add(() => rl.removeListener("SIGINT", sigint));
|
299828
|
-
const checkCursorPos = () => screen.checkCursorPos();
|
299829
|
-
rl.input.on("keypress", checkCursorPos);
|
299830
|
-
cleanups.add(() => rl.input.removeListener("keypress", checkCursorPos));
|
299831
|
-
return withHooks3(rl, (cycle) => {
|
299832
|
-
const hooksCleanup = AsyncResource9.bind(() => effectScheduler3.clearAll());
|
299833
|
-
rl.on("close", hooksCleanup);
|
299834
|
-
cleanups.add(() => rl.removeListener("close", hooksCleanup));
|
299835
|
-
cycle(() => {
|
299836
|
-
try {
|
299837
|
-
const nextView = view(config3, (value5) => {
|
299838
|
-
setImmediate(() => resolve7(value5));
|
299839
|
-
});
|
299840
|
-
if (nextView === undefined) {
|
299841
|
-
const callerFilename = callSites[1]?.getFileName();
|
299842
|
-
throw new Error(`Prompt functions must return a string.
|
299843
|
-
at ${callerFilename}`);
|
299844
|
-
}
|
299845
|
-
const [content, bottomContent] = typeof nextView === "string" ? [nextView] : nextView;
|
299846
|
-
screen.render(content, bottomContent);
|
299847
|
-
effectScheduler3.run();
|
299848
|
-
} catch (error48) {
|
299849
|
-
reject(error48);
|
299850
|
-
}
|
299851
|
-
});
|
299852
|
-
return Object.assign(promise2.then((answer) => {
|
299853
|
-
effectScheduler3.clearAll();
|
299854
|
-
return answer;
|
299855
|
-
}, (error48) => {
|
299856
|
-
effectScheduler3.clearAll();
|
299857
|
-
throw error48;
|
299858
|
-
}).finally(() => {
|
299859
|
-
cleanups.forEach((cleanup) => cleanup());
|
299860
|
-
screen.done({ clearContent: Boolean(context.clearPromptOnDone) });
|
299861
|
-
output.end();
|
299862
|
-
}).then(() => promise2), { cancel: cancel3 });
|
299863
|
-
});
|
299864
|
-
};
|
299865
|
-
return prompt;
|
299866
|
-
}
|
299867
|
-
// ../../node_modules/.bun/@inquirer+confirm@5.1.17+e9dc26b4af2fda18/node_modules/@inquirer/confirm/dist/esm/index.js
|
299410
|
+
// ../../node_modules/.bun/@inquirer+confirm@5.1.18+e9dc26b4af2fda18/node_modules/@inquirer/confirm/dist/esm/index.js
|
299868
299411
|
function getBooleanValue(value5, defaultValue) {
|
299869
299412
|
let answer = defaultValue !== false;
|
299870
299413
|
if (/^(y|yes)/i.test(value5))
|
@@ -299876,21 +299419,21 @@ function getBooleanValue(value5, defaultValue) {
|
|
299876
299419
|
function boolToString(value5) {
|
299877
299420
|
return value5 ? "Yes" : "No";
|
299878
299421
|
}
|
299879
|
-
var esm_default4 =
|
299422
|
+
var esm_default4 = createPrompt((config3, done) => {
|
299880
299423
|
const { transformer = boolToString } = config3;
|
299881
|
-
const [status, setStatus] =
|
299882
|
-
const [value5, setValue] =
|
299883
|
-
const theme =
|
299884
|
-
const prefix =
|
299885
|
-
|
299424
|
+
const [status, setStatus] = useState("idle");
|
299425
|
+
const [value5, setValue] = useState("");
|
299426
|
+
const theme = makeTheme(config3.theme);
|
299427
|
+
const prefix = usePrefix({ status, theme });
|
299428
|
+
useKeypress((key3, rl) => {
|
299886
299429
|
if (status !== "idle")
|
299887
299430
|
return;
|
299888
|
-
if (
|
299431
|
+
if (isEnterKey(key3)) {
|
299889
299432
|
const answer = getBooleanValue(value5, config3.default);
|
299890
299433
|
setValue(transformer(answer));
|
299891
299434
|
setStatus("done");
|
299892
299435
|
done(answer);
|
299893
|
-
} else if (
|
299436
|
+
} else if (isTabKey(key3)) {
|
299894
299437
|
const answer = boolToString(!getBooleanValue(value5, config3.default));
|
299895
299438
|
rl.clearLine(0);
|
299896
299439
|
rl.write(answer);
|
@@ -299910,20 +299453,19 @@ var esm_default4 = createPrompt3((config3, done) => {
|
|
299910
299453
|
return `${prefix} ${message}${defaultValue} ${formattedValue}`;
|
299911
299454
|
});
|
299912
299455
|
|
299913
|
-
// ../../node_modules/.bun/@inquirer+password@4.0.
|
299914
|
-
var
|
299915
|
-
var esm_default5 = createPrompt2((config3, done) => {
|
299456
|
+
// ../../node_modules/.bun/@inquirer+password@4.0.20+e9dc26b4af2fda18/node_modules/@inquirer/password/dist/esm/index.js
|
299457
|
+
var esm_default5 = createPrompt((config3, done) => {
|
299916
299458
|
const { validate: validate8 = () => true } = config3;
|
299917
|
-
const theme =
|
299918
|
-
const [status, setStatus] =
|
299919
|
-
const [errorMsg, setError] =
|
299920
|
-
const [value5, setValue] =
|
299921
|
-
const prefix =
|
299922
|
-
|
299459
|
+
const theme = makeTheme(config3.theme);
|
299460
|
+
const [status, setStatus] = useState("idle");
|
299461
|
+
const [errorMsg, setError] = useState();
|
299462
|
+
const [value5, setValue] = useState("");
|
299463
|
+
const prefix = usePrefix({ status, theme });
|
299464
|
+
useKeypress(async (key3, rl) => {
|
299923
299465
|
if (status !== "idle") {
|
299924
299466
|
return;
|
299925
299467
|
}
|
299926
|
-
if (
|
299468
|
+
if (isEnterKey(key3)) {
|
299927
299469
|
const answer = value5;
|
299928
299470
|
setStatus("loading");
|
299929
299471
|
const isValid = await validate8(answer);
|
@@ -299948,7 +299490,7 @@ var esm_default5 = createPrompt2((config3, done) => {
|
|
299948
299490
|
const maskChar = typeof config3.mask === "string" ? config3.mask : "*";
|
299949
299491
|
formattedValue = maskChar.repeat(value5.length);
|
299950
299492
|
} else if (status !== "done") {
|
299951
|
-
helpTip = `${theme.style.help("[input is masked]")}${
|
299493
|
+
helpTip = `${theme.style.help("[input is masked]")}${cursorHide}`;
|
299952
299494
|
}
|
299953
299495
|
if (status === "done") {
|
299954
299496
|
formattedValue = theme.style.answer(formattedValue);
|
@@ -301626,7 +301168,7 @@ var basename2 = function(p5, extension) {
|
|
301626
301168
|
return extension && lastSegment.endsWith(extension) ? lastSegment.slice(0, -extension.length) : lastSegment;
|
301627
301169
|
};
|
301628
301170
|
// ../../node_modules/.bun/defu@6.1.4/node_modules/defu/dist/defu.mjs
|
301629
|
-
function
|
301171
|
+
function isPlainObject5(value5) {
|
301630
301172
|
if (value5 === null || typeof value5 !== "object") {
|
301631
301173
|
return false;
|
301632
301174
|
}
|
@@ -301643,27 +301185,27 @@ function isPlainObject6(value5) {
|
|
301643
301185
|
return true;
|
301644
301186
|
}
|
301645
301187
|
function _defu(baseObject, defaults2, namespace = ".", merger) {
|
301646
|
-
if (!
|
301188
|
+
if (!isPlainObject5(defaults2)) {
|
301647
301189
|
return _defu(baseObject, {}, namespace, merger);
|
301648
301190
|
}
|
301649
301191
|
const object2 = Object.assign({}, defaults2);
|
301650
|
-
for (const
|
301651
|
-
if (
|
301192
|
+
for (const key3 in baseObject) {
|
301193
|
+
if (key3 === "__proto__" || key3 === "constructor") {
|
301652
301194
|
continue;
|
301653
301195
|
}
|
301654
|
-
const value5 = baseObject[
|
301196
|
+
const value5 = baseObject[key3];
|
301655
301197
|
if (value5 === null || value5 === undefined) {
|
301656
301198
|
continue;
|
301657
301199
|
}
|
301658
|
-
if (merger && merger(object2,
|
301200
|
+
if (merger && merger(object2, key3, value5, namespace)) {
|
301659
301201
|
continue;
|
301660
301202
|
}
|
301661
|
-
if (Array.isArray(value5) && Array.isArray(object2[
|
301662
|
-
object2[
|
301663
|
-
} else if (
|
301664
|
-
object2[
|
301203
|
+
if (Array.isArray(value5) && Array.isArray(object2[key3])) {
|
301204
|
+
object2[key3] = [...value5, ...object2[key3]];
|
301205
|
+
} else if (isPlainObject5(value5) && isPlainObject5(object2[key3])) {
|
301206
|
+
object2[key3] = _defu(value5, object2[key3], (namespace ? `${namespace}.` : "") + key3.toString(), merger);
|
301665
301207
|
} else {
|
301666
|
-
object2[
|
301208
|
+
object2[key3] = value5;
|
301667
301209
|
}
|
301668
301210
|
}
|
301669
301211
|
return object2;
|
@@ -301672,15 +301214,15 @@ function createDefu(merger) {
|
|
301672
301214
|
return (...arguments_5) => arguments_5.reduce((p5, c3) => _defu(p5, c3, "", merger), {});
|
301673
301215
|
}
|
301674
301216
|
var defu = createDefu();
|
301675
|
-
var defuFn = createDefu((object2,
|
301676
|
-
if (object2[
|
301677
|
-
object2[
|
301217
|
+
var defuFn = createDefu((object2, key3, currentValue) => {
|
301218
|
+
if (object2[key3] !== undefined && typeof currentValue === "function") {
|
301219
|
+
object2[key3] = currentValue(object2[key3]);
|
301678
301220
|
return true;
|
301679
301221
|
}
|
301680
301222
|
});
|
301681
|
-
var defuArrayFn = createDefu((object2,
|
301682
|
-
if (Array.isArray(object2[
|
301683
|
-
object2[
|
301223
|
+
var defuArrayFn = createDefu((object2, key3, currentValue) => {
|
301224
|
+
if (Array.isArray(object2[key3]) && typeof currentValue === "function") {
|
301225
|
+
object2[key3] = currentValue(object2[key3]);
|
301684
301226
|
return true;
|
301685
301227
|
}
|
301686
301228
|
});
|
@@ -304386,11 +303928,11 @@ function cacheDirectory() {
|
|
304386
303928
|
}
|
304387
303929
|
function normalizeHeaders(headers = {}) {
|
304388
303930
|
const normalized = {};
|
304389
|
-
for (const [
|
303931
|
+
for (const [key3, value5] of Object.entries(headers)) {
|
304390
303932
|
if (!value5) {
|
304391
303933
|
continue;
|
304392
303934
|
}
|
304393
|
-
normalized[
|
303935
|
+
normalized[key3.toLowerCase()] = value5;
|
304394
303936
|
}
|
304395
303937
|
return normalized;
|
304396
303938
|
}
|
@@ -307639,7 +307181,7 @@ function jsonOutput(data) {
|
|
307639
307181
|
var composer = require_composer();
|
307640
307182
|
var Document = require_Document();
|
307641
307183
|
var Schema = require_Schema();
|
307642
|
-
var
|
307184
|
+
var errors5 = require_errors3();
|
307643
307185
|
var Alias = require_Alias();
|
307644
307186
|
var identity2 = require_identity();
|
307645
307187
|
var Pair = require_Pair();
|
@@ -307655,9 +307197,9 @@ var visit2 = require_visit();
|
|
307655
307197
|
var $Composer = composer.Composer;
|
307656
307198
|
var $Document = Document.Document;
|
307657
307199
|
var $Schema = Schema.Schema;
|
307658
|
-
var $YAMLError =
|
307659
|
-
var $YAMLParseError =
|
307660
|
-
var $YAMLWarning =
|
307200
|
+
var $YAMLError = errors5.YAMLError;
|
307201
|
+
var $YAMLParseError = errors5.YAMLParseError;
|
307202
|
+
var $YAMLWarning = errors5.YAMLWarning;
|
307661
307203
|
var $Alias = Alias.Alias;
|
307662
307204
|
var $isAlias = identity2.isAlias;
|
307663
307205
|
var $isCollection = identity2.isCollection;
|
@@ -308264,11 +307806,11 @@ function createCommand4() {
|
|
308264
307806
|
|
308265
307807
|
// src/utils/commands/passthrough-options.ts
|
308266
307808
|
function mapPassthroughOptions(options, command) {
|
308267
|
-
const optionArgs = Object.entries(options).map(([
|
307809
|
+
const optionArgs = Object.entries(options).map(([key3, value5]) => {
|
308268
307810
|
if (value5 === true) {
|
308269
|
-
return `--${
|
307811
|
+
return `--${key3}`;
|
308270
307812
|
}
|
308271
|
-
return `--${
|
307813
|
+
return `--${key3}=${value5}`;
|
308272
307814
|
});
|
308273
307815
|
return [...optionArgs, ...command.args];
|
308274
307816
|
}
|
@@ -309521,4 +309063,4 @@ async function sdkCliCommand(argv = process.argv) {
|
|
309521
309063
|
// src/cli.ts
|
309522
309064
|
sdkCliCommand();
|
309523
309065
|
|
309524
|
-
//# debugId=
|
309066
|
+
//# debugId=3F17D0A278A0756D64756E2164756E21
|