@settlemint/sdk-cli 1.2.2-pra8d95e6e → 1.2.2-prc6ef5d96
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 +409 -1311
- package/dist/cli.js.map +6 -34
- package/package.json +5 -5
package/dist/cli.js
CHANGED
@@ -232114,8 +232114,8 @@ var require_lib13 = __commonJS((exports, module) => {
|
|
232114
232114
|
function fetch2(input, options) {
|
232115
232115
|
return nodeFetch.fetch(input, options);
|
232116
232116
|
}
|
232117
|
-
for (const
|
232118
|
-
fetch2[
|
232117
|
+
for (const key3 in nodeFetch) {
|
232118
|
+
fetch2[key3] = nodeFetch[key3];
|
232119
232119
|
}
|
232120
232120
|
module.exports = fetch2;
|
232121
232121
|
});
|
@@ -232208,11 +232208,11 @@ var require_proxy = __commonJS((exports) => {
|
|
232208
232208
|
return hasRequiredSymbols$4 || (hasRequiredSymbols$4 = 1, symbols$4 = { kClose: Symbol("close"), kDestroy: Symbol("destroy"), kDispatch: Symbol("dispatch"), kUrl: Symbol("url"), kWriting: Symbol("writing"), kResuming: Symbol("resuming"), kQueue: Symbol("queue"), kConnect: Symbol("connect"), kConnecting: Symbol("connecting"), kKeepAliveDefaultTimeout: Symbol("default keep alive timeout"), kKeepAliveMaxTimeout: Symbol("max keep alive timeout"), kKeepAliveTimeoutThreshold: Symbol("keep alive timeout threshold"), kKeepAliveTimeoutValue: Symbol("keep alive timeout"), kKeepAlive: Symbol("keep alive"), kHeadersTimeout: Symbol("headers timeout"), kBodyTimeout: Symbol("body timeout"), kServerName: Symbol("server name"), kLocalAddress: Symbol("local address"), kHost: Symbol("host"), kNoRef: Symbol("no ref"), kBodyUsed: Symbol("used"), kBody: Symbol("abstracted request body"), kRunning: Symbol("running"), kBlocking: Symbol("blocking"), kPending: Symbol("pending"), kSize: Symbol("size"), kBusy: Symbol("busy"), kQueued: Symbol("queued"), kFree: Symbol("free"), kConnected: Symbol("connected"), kClosed: Symbol("closed"), kNeedDrain: Symbol("need drain"), kReset: Symbol("reset"), kDestroyed: Symbol.for("nodejs.stream.destroyed"), kResume: Symbol("resume"), kOnError: Symbol("on error"), kMaxHeadersSize: Symbol("max headers size"), kRunningIdx: Symbol("running index"), kPendingIdx: Symbol("pending index"), kError: Symbol("error"), kClients: Symbol("clients"), kClient: Symbol("client"), kParser: Symbol("parser"), kOnDestroyed: Symbol("destroy callbacks"), kPipelining: Symbol("pipelining"), kSocket: Symbol("socket"), kHostHeader: Symbol("host header"), kConnector: Symbol("connector"), kStrictContentLength: Symbol("strict content length"), kMaxRedirections: Symbol("maxRedirections"), kMaxRequests: Symbol("maxRequestsPerClient"), kProxy: Symbol("proxy agent options"), kCounter: Symbol("socket request counter"), kInterceptors: Symbol("dispatch interceptors"), kMaxResponseSize: Symbol("max response size"), kHTTP2Session: Symbol("http2Session"), kHTTP2SessionState: Symbol("http2Session state"), kRetryHandlerDefaultRetry: Symbol("retry agent default retry"), kConstruct: Symbol("constructable"), kListeners: Symbol("listeners"), kHTTPContext: Symbol("http context"), kMaxConcurrentStreams: Symbol("max concurrent streams"), kNoProxyAgent: Symbol("no proxy agent"), kHttpProxyAgent: Symbol("http proxy agent"), kHttpsProxyAgent: Symbol("https proxy agent") }), symbols$4;
|
232209
232209
|
}
|
232210
232210
|
e10(requireSymbols$4, "requireSymbols$4");
|
232211
|
-
var
|
232211
|
+
var errors3;
|
232212
232212
|
var hasRequiredErrors;
|
232213
232213
|
function requireErrors() {
|
232214
232214
|
if (hasRequiredErrors)
|
232215
|
-
return
|
232215
|
+
return errors3;
|
232216
232216
|
hasRequiredErrors = 1;
|
232217
232217
|
|
232218
232218
|
class A5 extends Error {
|
@@ -232421,7 +232421,7 @@ var require_proxy = __commonJS((exports) => {
|
|
232421
232421
|
super(i6, { cause: k5, ...F3 ?? {} }), this.name = "SecureProxyConnectionError", this.message = i6 || "Secure Proxy Connection failed", this.code = "UND_ERR_PRX_TLS", this.cause = k5;
|
232422
232422
|
}
|
232423
232423
|
}
|
232424
|
-
return
|
232424
|
+
return errors3 = { AbortError: Q4, HTTPParserError: Y4, UndiciError: A5, HeadersTimeoutError: c3, HeadersOverflowError: E6, BodyTimeoutError: t8, RequestContentLengthMismatchError: r6, ConnectTimeoutError: p6, ResponseStatusCodeError: B4, InvalidArgumentError: f5, InvalidReturnValueError: l2, RequestAbortedError: u6, ClientDestroyedError: a7, ClientClosedError: g5, InformationalError: n6, SocketError: d6, NotSupportedError: N6, ResponseContentLengthMismatchError: o8, BalancedPoolMissingUpstreamError: M5, ResponseExceededMaxSizeError: J4, RequestRetryError: V5, ResponseError: H4, SecureProxyConnectionError: h7 }, errors3;
|
232425
232425
|
}
|
232426
232426
|
e10(requireErrors, "requireErrors");
|
232427
232427
|
var constants$4;
|
@@ -242372,11 +242372,11 @@ var require_visit = __commonJS((exports) => {
|
|
242372
242372
|
visit2.BREAK = BREAK;
|
242373
242373
|
visit2.SKIP = SKIP;
|
242374
242374
|
visit2.REMOVE = REMOVE;
|
242375
|
-
function visit_(
|
242376
|
-
const ctrl = callVisitor(
|
242375
|
+
function visit_(key3, node, visitor, path6) {
|
242376
|
+
const ctrl = callVisitor(key3, node, visitor, path6);
|
242377
242377
|
if (identity2.isNode(ctrl) || identity2.isPair(ctrl)) {
|
242378
|
-
replaceNode(
|
242379
|
-
return visit_(
|
242378
|
+
replaceNode(key3, path6, ctrl);
|
242379
|
+
return visit_(key3, ctrl, visitor, path6);
|
242380
242380
|
}
|
242381
242381
|
if (typeof ctrl !== "symbol") {
|
242382
242382
|
if (identity2.isCollection(node)) {
|
@@ -242420,11 +242420,11 @@ var require_visit = __commonJS((exports) => {
|
|
242420
242420
|
visitAsync.BREAK = BREAK;
|
242421
242421
|
visitAsync.SKIP = SKIP;
|
242422
242422
|
visitAsync.REMOVE = REMOVE;
|
242423
|
-
async function visitAsync_(
|
242424
|
-
const ctrl = await callVisitor(
|
242423
|
+
async function visitAsync_(key3, node, visitor, path6) {
|
242424
|
+
const ctrl = await callVisitor(key3, node, visitor, path6);
|
242425
242425
|
if (identity2.isNode(ctrl) || identity2.isPair(ctrl)) {
|
242426
|
-
replaceNode(
|
242427
|
-
return visitAsync_(
|
242426
|
+
replaceNode(key3, path6, ctrl);
|
242427
|
+
return visitAsync_(key3, ctrl, visitor, path6);
|
242428
242428
|
}
|
242429
242429
|
if (typeof ctrl !== "symbol") {
|
242430
242430
|
if (identity2.isCollection(node)) {
|
@@ -242474,27 +242474,27 @@ var require_visit = __commonJS((exports) => {
|
|
242474
242474
|
}
|
242475
242475
|
return visitor;
|
242476
242476
|
}
|
242477
|
-
function callVisitor(
|
242477
|
+
function callVisitor(key3, node, visitor, path6) {
|
242478
242478
|
if (typeof visitor === "function")
|
242479
|
-
return visitor(
|
242479
|
+
return visitor(key3, node, path6);
|
242480
242480
|
if (identity2.isMap(node))
|
242481
|
-
return visitor.Map?.(
|
242481
|
+
return visitor.Map?.(key3, node, path6);
|
242482
242482
|
if (identity2.isSeq(node))
|
242483
|
-
return visitor.Seq?.(
|
242483
|
+
return visitor.Seq?.(key3, node, path6);
|
242484
242484
|
if (identity2.isPair(node))
|
242485
|
-
return visitor.Pair?.(
|
242485
|
+
return visitor.Pair?.(key3, node, path6);
|
242486
242486
|
if (identity2.isScalar(node))
|
242487
|
-
return visitor.Scalar?.(
|
242487
|
+
return visitor.Scalar?.(key3, node, path6);
|
242488
242488
|
if (identity2.isAlias(node))
|
242489
|
-
return visitor.Alias?.(
|
242489
|
+
return visitor.Alias?.(key3, node, path6);
|
242490
242490
|
return;
|
242491
242491
|
}
|
242492
|
-
function replaceNode(
|
242492
|
+
function replaceNode(key3, path6, node) {
|
242493
242493
|
const parent = path6[path6.length - 1];
|
242494
242494
|
if (identity2.isCollection(parent)) {
|
242495
|
-
parent.items[
|
242495
|
+
parent.items[key3] = node;
|
242496
242496
|
} else if (identity2.isPair(parent)) {
|
242497
|
-
if (
|
242497
|
+
if (key3 === "key")
|
242498
242498
|
parent.key = node;
|
242499
242499
|
else
|
242500
242500
|
parent.value = node;
|
@@ -242726,7 +242726,7 @@ var require_anchors = __commonJS((exports) => {
|
|
242726
242726
|
|
242727
242727
|
// ../../node_modules/yaml/dist/doc/applyReviver.js
|
242728
242728
|
var require_applyReviver = __commonJS((exports) => {
|
242729
|
-
function applyReviver(reviver, obj,
|
242729
|
+
function applyReviver(reviver, obj, key3, val) {
|
242730
242730
|
if (val && typeof val === "object") {
|
242731
242731
|
if (Array.isArray(val)) {
|
242732
242732
|
for (let i7 = 0, len = val.length;i7 < len; ++i7) {
|
@@ -242766,7 +242766,7 @@ var require_applyReviver = __commonJS((exports) => {
|
|
242766
242766
|
}
|
242767
242767
|
}
|
242768
242768
|
}
|
242769
|
-
return reviver.call(obj,
|
242769
|
+
return reviver.call(obj, key3, val);
|
242770
242770
|
}
|
242771
242771
|
exports.applyReviver = applyReviver;
|
242772
242772
|
});
|
@@ -243084,29 +243084,29 @@ var require_Collection = __commonJS((exports) => {
|
|
243084
243084
|
if (isEmptyPath(path6))
|
243085
243085
|
this.add(value4);
|
243086
243086
|
else {
|
243087
|
-
const [
|
243088
|
-
const node = this.get(
|
243087
|
+
const [key3, ...rest] = path6;
|
243088
|
+
const node = this.get(key3, true);
|
243089
243089
|
if (identity2.isCollection(node))
|
243090
243090
|
node.addIn(rest, value4);
|
243091
243091
|
else if (node === undefined && this.schema)
|
243092
|
-
this.set(
|
243092
|
+
this.set(key3, collectionFromPath(this.schema, rest, value4));
|
243093
243093
|
else
|
243094
|
-
throw new Error(`Expected YAML collection at ${
|
243094
|
+
throw new Error(`Expected YAML collection at ${key3}. Remaining path: ${rest}`);
|
243095
243095
|
}
|
243096
243096
|
}
|
243097
243097
|
deleteIn(path6) {
|
243098
|
-
const [
|
243098
|
+
const [key3, ...rest] = path6;
|
243099
243099
|
if (rest.length === 0)
|
243100
|
-
return this.delete(
|
243101
|
-
const node = this.get(
|
243100
|
+
return this.delete(key3);
|
243101
|
+
const node = this.get(key3, true);
|
243102
243102
|
if (identity2.isCollection(node))
|
243103
243103
|
return node.deleteIn(rest);
|
243104
243104
|
else
|
243105
|
-
throw new Error(`Expected YAML collection at ${
|
243105
|
+
throw new Error(`Expected YAML collection at ${key3}. Remaining path: ${rest}`);
|
243106
243106
|
}
|
243107
243107
|
getIn(path6, keepScalar) {
|
243108
|
-
const [
|
243109
|
-
const node = this.get(
|
243108
|
+
const [key3, ...rest] = path6;
|
243109
|
+
const node = this.get(key3, true);
|
243110
243110
|
if (rest.length === 0)
|
243111
243111
|
return !keepScalar && identity2.isScalar(node) ? node.value : node;
|
243112
243112
|
else
|
@@ -243121,24 +243121,24 @@ var require_Collection = __commonJS((exports) => {
|
|
243121
243121
|
});
|
243122
243122
|
}
|
243123
243123
|
hasIn(path6) {
|
243124
|
-
const [
|
243124
|
+
const [key3, ...rest] = path6;
|
243125
243125
|
if (rest.length === 0)
|
243126
|
-
return this.has(
|
243127
|
-
const node = this.get(
|
243126
|
+
return this.has(key3);
|
243127
|
+
const node = this.get(key3, true);
|
243128
243128
|
return identity2.isCollection(node) ? node.hasIn(rest) : false;
|
243129
243129
|
}
|
243130
243130
|
setIn(path6, value4) {
|
243131
|
-
const [
|
243131
|
+
const [key3, ...rest] = path6;
|
243132
243132
|
if (rest.length === 0) {
|
243133
|
-
this.set(
|
243133
|
+
this.set(key3, value4);
|
243134
243134
|
} else {
|
243135
|
-
const node = this.get(
|
243135
|
+
const node = this.get(key3, true);
|
243136
243136
|
if (identity2.isCollection(node))
|
243137
243137
|
node.setIn(rest, value4);
|
243138
243138
|
else if (node === undefined && this.schema)
|
243139
|
-
this.set(
|
243139
|
+
this.set(key3, collectionFromPath(this.schema, rest, value4));
|
243140
243140
|
else
|
243141
|
-
throw new Error(`Expected YAML collection at ${
|
243141
|
+
throw new Error(`Expected YAML collection at ${key3}. Remaining path: ${rest}`);
|
243142
243142
|
}
|
243143
243143
|
}
|
243144
243144
|
}
|
@@ -243726,19 +243726,19 @@ var require_stringifyPair = __commonJS((exports) => {
|
|
243726
243726
|
var Scalar = require_Scalar();
|
243727
243727
|
var stringify3 = require_stringify();
|
243728
243728
|
var stringifyComment = require_stringifyComment();
|
243729
|
-
function stringifyPair2({ key:
|
243729
|
+
function stringifyPair2({ key: key3, value: value4 }, ctx, onComment, onChompKeep) {
|
243730
243730
|
const { allNullValues, doc, indent: indent2, indentStep, options: { commentString, indentSeq, simpleKeys } } = ctx;
|
243731
|
-
let keyComment = identity2.isNode(
|
243731
|
+
let keyComment = identity2.isNode(key3) && key3.comment || null;
|
243732
243732
|
if (simpleKeys) {
|
243733
243733
|
if (keyComment) {
|
243734
243734
|
throw new Error("With simple keys, key nodes cannot have comments");
|
243735
243735
|
}
|
243736
|
-
if (identity2.isCollection(
|
243736
|
+
if (identity2.isCollection(key3) || !identity2.isNode(key3) && typeof key3 === "object") {
|
243737
243737
|
const msg = "With simple keys, collection cannot be used as a key value";
|
243738
243738
|
throw new Error(msg);
|
243739
243739
|
}
|
243740
243740
|
}
|
243741
|
-
let explicitKey = !simpleKeys && (!
|
243741
|
+
let explicitKey = !simpleKeys && (!key3 || keyComment && value4 == null && !ctx.inFlow || identity2.isCollection(key3) || (identity2.isScalar(key3) ? key3.type === Scalar.Scalar.BLOCK_FOLDED || key3.type === Scalar.Scalar.BLOCK_LITERAL : typeof key3 === "object"));
|
243742
243742
|
ctx = Object.assign({}, ctx, {
|
243743
243743
|
allNullValues: false,
|
243744
243744
|
implicitKey: !explicitKey && (simpleKeys || !allNullValues),
|
@@ -243746,7 +243746,7 @@ var require_stringifyPair = __commonJS((exports) => {
|
|
243746
243746
|
});
|
243747
243747
|
let keyCommentDone = false;
|
243748
243748
|
let chompKeep = false;
|
243749
|
-
let str = stringify3.stringify(
|
243749
|
+
let str = stringify3.stringify(key3, ctx, () => keyCommentDone = true, () => chompKeep = true);
|
243750
243750
|
if (!explicitKey && !ctx.inFlow && str.length > 1024) {
|
243751
243751
|
if (simpleKeys)
|
243752
243752
|
throw new Error("With simple keys, single line scalar must not span more than 1024 characters");
|
@@ -243890,7 +243890,7 @@ var require_merge = __commonJS((exports) => {
|
|
243890
243890
|
}),
|
243891
243891
|
stringify: () => MERGE_KEY
|
243892
243892
|
};
|
243893
|
-
var isMergeKey = (ctx,
|
243893
|
+
var isMergeKey = (ctx, key3) => (merge3.identify(key3) || identity2.isScalar(key3) && (!key3.type || key3.type === Scalar.Scalar.PLAIN) && merge3.identify(key3.value)) && ctx?.doc.schema.tags.some((tag) => tag.tag === merge3.tag && tag.default);
|
243894
243894
|
function addMergeToJSMap(ctx, map3, value4) {
|
243895
243895
|
value4 = ctx && identity2.isAlias(value4) ? value4.resolve(ctx.doc) : value4;
|
243896
243896
|
if (identity2.isSeq(value4))
|
@@ -243907,14 +243907,14 @@ var require_merge = __commonJS((exports) => {
|
|
243907
243907
|
if (!identity2.isMap(source))
|
243908
243908
|
throw new Error("Merge sources must be maps or map aliases");
|
243909
243909
|
const srcMap = source.toJSON(null, ctx, Map);
|
243910
|
-
for (const [
|
243910
|
+
for (const [key3, value5] of srcMap) {
|
243911
243911
|
if (map3 instanceof Map) {
|
243912
|
-
if (!map3.has(
|
243913
|
-
map3.set(
|
243912
|
+
if (!map3.has(key3))
|
243913
|
+
map3.set(key3, value5);
|
243914
243914
|
} else if (map3 instanceof Set) {
|
243915
|
-
map3.add(
|
243916
|
-
} else if (!Object.prototype.hasOwnProperty.call(map3,
|
243917
|
-
Object.defineProperty(map3,
|
243915
|
+
map3.add(key3);
|
243916
|
+
} else if (!Object.prototype.hasOwnProperty.call(map3, key3)) {
|
243917
|
+
Object.defineProperty(map3, key3, {
|
243918
243918
|
value: value5,
|
243919
243919
|
writable: true,
|
243920
243920
|
enumerable: true,
|
@@ -243936,19 +243936,19 @@ var require_addPairToJSMap = __commonJS((exports) => {
|
|
243936
243936
|
var stringify3 = require_stringify();
|
243937
243937
|
var identity2 = require_identity();
|
243938
243938
|
var toJS = require_toJS();
|
243939
|
-
function addPairToJSMap(ctx, map3, { key:
|
243940
|
-
if (identity2.isNode(
|
243941
|
-
|
243942
|
-
else if (merge3.isMergeKey(ctx,
|
243939
|
+
function addPairToJSMap(ctx, map3, { key: key3, value: value4 }) {
|
243940
|
+
if (identity2.isNode(key3) && key3.addToJSMap)
|
243941
|
+
key3.addToJSMap(ctx, map3, value4);
|
243942
|
+
else if (merge3.isMergeKey(ctx, key3))
|
243943
243943
|
merge3.addMergeToJSMap(ctx, map3, value4);
|
243944
243944
|
else {
|
243945
|
-
const jsKey = toJS.toJS(
|
243945
|
+
const jsKey = toJS.toJS(key3, "", ctx);
|
243946
243946
|
if (map3 instanceof Map) {
|
243947
243947
|
map3.set(jsKey, toJS.toJS(value4, jsKey, ctx));
|
243948
243948
|
} else if (map3 instanceof Set) {
|
243949
243949
|
map3.add(jsKey);
|
243950
243950
|
} else {
|
243951
|
-
const stringKey = stringifyKey(
|
243951
|
+
const stringKey = stringifyKey(key3, jsKey, ctx);
|
243952
243952
|
const jsValue = toJS.toJS(value4, stringKey, ctx);
|
243953
243953
|
if (stringKey in map3)
|
243954
243954
|
Object.defineProperty(map3, stringKey, {
|
@@ -243963,19 +243963,19 @@ var require_addPairToJSMap = __commonJS((exports) => {
|
|
243963
243963
|
}
|
243964
243964
|
return map3;
|
243965
243965
|
}
|
243966
|
-
function stringifyKey(
|
243966
|
+
function stringifyKey(key3, jsKey, ctx) {
|
243967
243967
|
if (jsKey === null)
|
243968
243968
|
return "";
|
243969
243969
|
if (typeof jsKey !== "object")
|
243970
243970
|
return String(jsKey);
|
243971
|
-
if (identity2.isNode(
|
243971
|
+
if (identity2.isNode(key3) && ctx?.doc) {
|
243972
243972
|
const strCtx = stringify3.createStringifyContext(ctx.doc, {});
|
243973
243973
|
strCtx.anchors = new Set;
|
243974
243974
|
for (const node of ctx.anchors.keys())
|
243975
243975
|
strCtx.anchors.add(node.anchor);
|
243976
243976
|
strCtx.inFlow = true;
|
243977
243977
|
strCtx.inStringifyKey = true;
|
243978
|
-
const strKey =
|
243978
|
+
const strKey = key3.toString(strCtx);
|
243979
243979
|
if (!ctx.mapKeyWarned) {
|
243980
243980
|
let jsonStr = JSON.stringify(strKey);
|
243981
243981
|
if (jsonStr.length > 40)
|
@@ -243996,25 +243996,25 @@ var require_Pair = __commonJS((exports) => {
|
|
243996
243996
|
var stringifyPair2 = require_stringifyPair();
|
243997
243997
|
var addPairToJSMap = require_addPairToJSMap();
|
243998
243998
|
var identity2 = require_identity();
|
243999
|
-
function createPair(
|
244000
|
-
const k6 = createNode.createNode(
|
243999
|
+
function createPair(key3, value4, ctx) {
|
244000
|
+
const k6 = createNode.createNode(key3, undefined, ctx);
|
244001
244001
|
const v7 = createNode.createNode(value4, undefined, ctx);
|
244002
244002
|
return new Pair(k6, v7);
|
244003
244003
|
}
|
244004
244004
|
|
244005
244005
|
class Pair {
|
244006
|
-
constructor(
|
244006
|
+
constructor(key3, value4 = null) {
|
244007
244007
|
Object.defineProperty(this, identity2.NODE_TYPE, { value: identity2.PAIR });
|
244008
|
-
this.key =
|
244008
|
+
this.key = key3;
|
244009
244009
|
this.value = value4;
|
244010
244010
|
}
|
244011
244011
|
clone(schema) {
|
244012
|
-
let { key:
|
244013
|
-
if (identity2.isNode(
|
244014
|
-
|
244012
|
+
let { key: key3, value: value4 } = this;
|
244013
|
+
if (identity2.isNode(key3))
|
244014
|
+
key3 = key3.clone(schema);
|
244015
244015
|
if (identity2.isNode(value4))
|
244016
244016
|
value4 = value4.clone(schema);
|
244017
|
-
return new Pair(
|
244017
|
+
return new Pair(key3, value4);
|
244018
244018
|
}
|
244019
244019
|
toJSON(_6, ctx) {
|
244020
244020
|
const pair = ctx?.mapAsMap ? new Map : {};
|
@@ -244181,11 +244181,11 @@ var require_YAMLMap = __commonJS((exports) => {
|
|
244181
244181
|
var identity2 = require_identity();
|
244182
244182
|
var Pair = require_Pair();
|
244183
244183
|
var Scalar = require_Scalar();
|
244184
|
-
function findPair(items,
|
244185
|
-
const k6 = identity2.isScalar(
|
244184
|
+
function findPair(items, key3) {
|
244185
|
+
const k6 = identity2.isScalar(key3) ? key3.value : key3;
|
244186
244186
|
for (const it2 of items) {
|
244187
244187
|
if (identity2.isPair(it2)) {
|
244188
|
-
if (it2.key ===
|
244188
|
+
if (it2.key === key3 || it2.key === k6)
|
244189
244189
|
return it2;
|
244190
244190
|
if (identity2.isScalar(it2.key) && it2.key.value === k6)
|
244191
244191
|
return it2;
|
@@ -244205,20 +244205,20 @@ var require_YAMLMap = __commonJS((exports) => {
|
|
244205
244205
|
static from(schema, obj, ctx) {
|
244206
244206
|
const { keepUndefined, replacer } = ctx;
|
244207
244207
|
const map3 = new this(schema);
|
244208
|
-
const add = (
|
244208
|
+
const add = (key3, value4) => {
|
244209
244209
|
if (typeof replacer === "function")
|
244210
|
-
value4 = replacer.call(obj,
|
244211
|
-
else if (Array.isArray(replacer) && !replacer.includes(
|
244210
|
+
value4 = replacer.call(obj, key3, value4);
|
244211
|
+
else if (Array.isArray(replacer) && !replacer.includes(key3))
|
244212
244212
|
return;
|
244213
244213
|
if (value4 !== undefined || keepUndefined)
|
244214
|
-
map3.items.push(Pair.createPair(
|
244214
|
+
map3.items.push(Pair.createPair(key3, value4, ctx));
|
244215
244215
|
};
|
244216
244216
|
if (obj instanceof Map) {
|
244217
|
-
for (const [
|
244218
|
-
add(
|
244217
|
+
for (const [key3, value4] of obj)
|
244218
|
+
add(key3, value4);
|
244219
244219
|
} else if (obj && typeof obj === "object") {
|
244220
|
-
for (const
|
244221
|
-
add(
|
244220
|
+
for (const key3 of Object.keys(obj))
|
244221
|
+
add(key3, obj[key3]);
|
244222
244222
|
}
|
244223
244223
|
if (typeof schema.sortMapEntries === "function") {
|
244224
244224
|
map3.items.sort(schema.sortMapEntries);
|
@@ -244252,23 +244252,23 @@ var require_YAMLMap = __commonJS((exports) => {
|
|
244252
244252
|
this.items.push(_pair);
|
244253
244253
|
}
|
244254
244254
|
}
|
244255
|
-
delete(
|
244256
|
-
const it2 = findPair(this.items,
|
244255
|
+
delete(key3) {
|
244256
|
+
const it2 = findPair(this.items, key3);
|
244257
244257
|
if (!it2)
|
244258
244258
|
return false;
|
244259
244259
|
const del = this.items.splice(this.items.indexOf(it2), 1);
|
244260
244260
|
return del.length > 0;
|
244261
244261
|
}
|
244262
|
-
get(
|
244263
|
-
const it2 = findPair(this.items,
|
244262
|
+
get(key3, keepScalar) {
|
244263
|
+
const it2 = findPair(this.items, key3);
|
244264
244264
|
const node = it2?.value;
|
244265
244265
|
return (!keepScalar && identity2.isScalar(node) ? node.value : node) ?? undefined;
|
244266
244266
|
}
|
244267
|
-
has(
|
244268
|
-
return !!findPair(this.items,
|
244267
|
+
has(key3) {
|
244268
|
+
return !!findPair(this.items, key3);
|
244269
244269
|
}
|
244270
|
-
set(
|
244271
|
-
this.add(new Pair.Pair(
|
244270
|
+
set(key3, value4) {
|
244271
|
+
this.add(new Pair.Pair(key3, value4), true);
|
244272
244272
|
}
|
244273
244273
|
toJSON(_6, ctx, Type) {
|
244274
244274
|
const map3 = Type ? new Type : ctx?.mapAsMap ? new Map : {};
|
@@ -244339,28 +244339,28 @@ var require_YAMLSeq = __commonJS((exports) => {
|
|
244339
244339
|
add(value4) {
|
244340
244340
|
this.items.push(value4);
|
244341
244341
|
}
|
244342
|
-
delete(
|
244343
|
-
const idx = asItemIndex(
|
244342
|
+
delete(key3) {
|
244343
|
+
const idx = asItemIndex(key3);
|
244344
244344
|
if (typeof idx !== "number")
|
244345
244345
|
return false;
|
244346
244346
|
const del = this.items.splice(idx, 1);
|
244347
244347
|
return del.length > 0;
|
244348
244348
|
}
|
244349
|
-
get(
|
244350
|
-
const idx = asItemIndex(
|
244349
|
+
get(key3, keepScalar) {
|
244350
|
+
const idx = asItemIndex(key3);
|
244351
244351
|
if (typeof idx !== "number")
|
244352
244352
|
return;
|
244353
244353
|
const it2 = this.items[idx];
|
244354
244354
|
return !keepScalar && identity2.isScalar(it2) ? it2.value : it2;
|
244355
244355
|
}
|
244356
|
-
has(
|
244357
|
-
const idx = asItemIndex(
|
244356
|
+
has(key3) {
|
244357
|
+
const idx = asItemIndex(key3);
|
244358
244358
|
return typeof idx === "number" && idx < this.items.length;
|
244359
244359
|
}
|
244360
|
-
set(
|
244361
|
-
const idx = asItemIndex(
|
244360
|
+
set(key3, value4) {
|
244361
|
+
const idx = asItemIndex(key3);
|
244362
244362
|
if (typeof idx !== "number")
|
244363
|
-
throw new Error(`Expected a valid index, not ${
|
244363
|
+
throw new Error(`Expected a valid index, not ${key3}.`);
|
244364
244364
|
const prev = this.items[idx];
|
244365
244365
|
if (identity2.isScalar(prev) && Scalar.isScalarValue(value4))
|
244366
244366
|
prev.value = value4;
|
@@ -244394,8 +244394,8 @@ var require_YAMLSeq = __commonJS((exports) => {
|
|
244394
244394
|
let i7 = 0;
|
244395
244395
|
for (let it2 of obj) {
|
244396
244396
|
if (typeof replacer === "function") {
|
244397
|
-
const
|
244398
|
-
it2 = replacer.call(obj,
|
244397
|
+
const key3 = obj instanceof Set ? it2 : String(i7++);
|
244398
|
+
it2 = replacer.call(obj, key3, it2);
|
244399
244399
|
}
|
244400
244400
|
seq.items.push(createNode.createNode(it2, undefined, ctx));
|
244401
244401
|
}
|
@@ -244403,8 +244403,8 @@ var require_YAMLSeq = __commonJS((exports) => {
|
|
244403
244403
|
return seq;
|
244404
244404
|
}
|
244405
244405
|
}
|
244406
|
-
function asItemIndex(
|
244407
|
-
let idx = identity2.isScalar(
|
244406
|
+
function asItemIndex(key3) {
|
244407
|
+
let idx = identity2.isScalar(key3) ? key3.value : key3;
|
244408
244408
|
if (idx && typeof idx === "string")
|
244409
244409
|
idx = Number(idx);
|
244410
244410
|
return typeof idx === "number" && Number.isInteger(idx) && idx >= 0 ? idx : null;
|
@@ -244776,25 +244776,25 @@ ${cn.comment}` : item.comment;
|
|
244776
244776
|
for (let it2 of iterable) {
|
244777
244777
|
if (typeof replacer === "function")
|
244778
244778
|
it2 = replacer.call(iterable, String(i7++), it2);
|
244779
|
-
let
|
244779
|
+
let key3, value4;
|
244780
244780
|
if (Array.isArray(it2)) {
|
244781
244781
|
if (it2.length === 2) {
|
244782
|
-
|
244782
|
+
key3 = it2[0];
|
244783
244783
|
value4 = it2[1];
|
244784
244784
|
} else
|
244785
244785
|
throw new TypeError(`Expected [key, value] tuple: ${it2}`);
|
244786
244786
|
} else if (it2 && it2 instanceof Object) {
|
244787
244787
|
const keys = Object.keys(it2);
|
244788
244788
|
if (keys.length === 1) {
|
244789
|
-
|
244790
|
-
value4 = it2[
|
244789
|
+
key3 = keys[0];
|
244790
|
+
value4 = it2[key3];
|
244791
244791
|
} else {
|
244792
244792
|
throw new TypeError(`Expected tuple with one key, not ${keys.length} keys`);
|
244793
244793
|
}
|
244794
244794
|
} else {
|
244795
|
-
|
244795
|
+
key3 = it2;
|
244796
244796
|
}
|
244797
|
-
pairs2.items.push(Pair.createPair(
|
244797
|
+
pairs2.items.push(Pair.createPair(key3, value4, ctx));
|
244798
244798
|
}
|
244799
244799
|
return pairs2;
|
244800
244800
|
}
|
@@ -244835,16 +244835,16 @@ var require_omap = __commonJS((exports) => {
|
|
244835
244835
|
if (ctx?.onCreate)
|
244836
244836
|
ctx.onCreate(map3);
|
244837
244837
|
for (const pair of this.items) {
|
244838
|
-
let
|
244838
|
+
let key3, value4;
|
244839
244839
|
if (identity2.isPair(pair)) {
|
244840
|
-
|
244841
|
-
value4 = toJS.toJS(pair.value,
|
244840
|
+
key3 = toJS.toJS(pair.key, "", ctx);
|
244841
|
+
value4 = toJS.toJS(pair.value, key3, ctx);
|
244842
244842
|
} else {
|
244843
|
-
|
244843
|
+
key3 = toJS.toJS(pair, "", ctx);
|
244844
244844
|
}
|
244845
|
-
if (map3.has(
|
244845
|
+
if (map3.has(key3))
|
244846
244846
|
throw new Error("Ordered maps must not include duplicate keys");
|
244847
|
-
map3.set(
|
244847
|
+
map3.set(key3, value4);
|
244848
244848
|
}
|
244849
244849
|
return map3;
|
244850
244850
|
}
|
@@ -244865,12 +244865,12 @@ var require_omap = __commonJS((exports) => {
|
|
244865
244865
|
resolve(seq, onError) {
|
244866
244866
|
const pairs$1 = pairs.resolvePairs(seq, onError);
|
244867
244867
|
const seenKeys = [];
|
244868
|
-
for (const { key:
|
244869
|
-
if (identity2.isScalar(
|
244870
|
-
if (seenKeys.includes(
|
244871
|
-
onError(`Ordered maps must not include duplicate keys: ${
|
244868
|
+
for (const { key: key3 } of pairs$1.items) {
|
244869
|
+
if (identity2.isScalar(key3)) {
|
244870
|
+
if (seenKeys.includes(key3.value)) {
|
244871
|
+
onError(`Ordered maps must not include duplicate keys: ${key3.value}`);
|
244872
244872
|
} else {
|
244873
|
-
seenKeys.push(
|
244873
|
+
seenKeys.push(key3.value);
|
244874
244874
|
}
|
244875
244875
|
}
|
244876
244876
|
}
|
@@ -245044,30 +245044,30 @@ var require_set = __commonJS((exports) => {
|
|
245044
245044
|
super(schema);
|
245045
245045
|
this.tag = YAMLSet.tag;
|
245046
245046
|
}
|
245047
|
-
add(
|
245047
|
+
add(key3) {
|
245048
245048
|
let pair;
|
245049
|
-
if (identity2.isPair(
|
245050
|
-
pair =
|
245051
|
-
else if (
|
245052
|
-
pair = new Pair.Pair(
|
245049
|
+
if (identity2.isPair(key3))
|
245050
|
+
pair = key3;
|
245051
|
+
else if (key3 && typeof key3 === "object" && "key" in key3 && "value" in key3 && key3.value === null)
|
245052
|
+
pair = new Pair.Pair(key3.key, null);
|
245053
245053
|
else
|
245054
|
-
pair = new Pair.Pair(
|
245054
|
+
pair = new Pair.Pair(key3, null);
|
245055
245055
|
const prev = YAMLMap.findPair(this.items, pair.key);
|
245056
245056
|
if (!prev)
|
245057
245057
|
this.items.push(pair);
|
245058
245058
|
}
|
245059
|
-
get(
|
245060
|
-
const pair = YAMLMap.findPair(this.items,
|
245059
|
+
get(key3, keepPair) {
|
245060
|
+
const pair = YAMLMap.findPair(this.items, key3);
|
245061
245061
|
return !keepPair && identity2.isPair(pair) ? identity2.isScalar(pair.key) ? pair.key.value : pair.key : pair;
|
245062
245062
|
}
|
245063
|
-
set(
|
245063
|
+
set(key3, value4) {
|
245064
245064
|
if (typeof value4 !== "boolean")
|
245065
245065
|
throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof value4}`);
|
245066
|
-
const prev = YAMLMap.findPair(this.items,
|
245066
|
+
const prev = YAMLMap.findPair(this.items, key3);
|
245067
245067
|
if (prev && !value4) {
|
245068
245068
|
this.items.splice(this.items.indexOf(prev), 1);
|
245069
245069
|
} else if (!prev && value4) {
|
245070
|
-
this.items.push(new Pair.Pair(
|
245070
|
+
this.items.push(new Pair.Pair(key3));
|
245071
245071
|
}
|
245072
245072
|
}
|
245073
245073
|
toJSON(_6, ctx) {
|
@@ -245302,7 +245302,7 @@ var require_tags = __commonJS((exports) => {
|
|
245302
245302
|
if (Array.isArray(customTags))
|
245303
245303
|
tags = [];
|
245304
245304
|
else {
|
245305
|
-
const keys = Array.from(schemas.keys()).filter((
|
245305
|
+
const keys = Array.from(schemas.keys()).filter((key3) => key3 !== "yaml11").map((key3) => JSON.stringify(key3)).join(", ");
|
245306
245306
|
throw new Error(`Unknown schema "${schemaName}"; use one of ${keys} or define customTags array`);
|
245307
245307
|
}
|
245308
245308
|
}
|
@@ -245318,7 +245318,7 @@ var require_tags = __commonJS((exports) => {
|
|
245318
245318
|
const tagObj = typeof tag === "string" ? tagsByName[tag] : tag;
|
245319
245319
|
if (!tagObj) {
|
245320
245320
|
const tagName = JSON.stringify(tag);
|
245321
|
-
const keys = Object.keys(tagsByName).map((
|
245321
|
+
const keys = Object.keys(tagsByName).map((key3) => JSON.stringify(key3)).join(", ");
|
245322
245322
|
throw new Error(`Unknown custom tag ${tagName}; use one of ${keys}`);
|
245323
245323
|
}
|
245324
245324
|
if (!tags2.includes(tagObj))
|
@@ -245553,13 +245553,13 @@ var require_Document = __commonJS((exports) => {
|
|
245553
245553
|
setAnchors();
|
245554
245554
|
return node;
|
245555
245555
|
}
|
245556
|
-
createPair(
|
245557
|
-
const k6 = this.createNode(
|
245556
|
+
createPair(key3, value4, options = {}) {
|
245557
|
+
const k6 = this.createNode(key3, null, options);
|
245558
245558
|
const v7 = this.createNode(value4, null, options);
|
245559
245559
|
return new Pair.Pair(k6, v7);
|
245560
245560
|
}
|
245561
|
-
delete(
|
245562
|
-
return assertCollection(this.contents) ? this.contents.delete(
|
245561
|
+
delete(key3) {
|
245562
|
+
return assertCollection(this.contents) ? this.contents.delete(key3) : false;
|
245563
245563
|
}
|
245564
245564
|
deleteIn(path6) {
|
245565
245565
|
if (Collection.isEmptyPath(path6)) {
|
@@ -245570,27 +245570,27 @@ var require_Document = __commonJS((exports) => {
|
|
245570
245570
|
}
|
245571
245571
|
return assertCollection(this.contents) ? this.contents.deleteIn(path6) : false;
|
245572
245572
|
}
|
245573
|
-
get(
|
245574
|
-
return identity2.isCollection(this.contents) ? this.contents.get(
|
245573
|
+
get(key3, keepScalar) {
|
245574
|
+
return identity2.isCollection(this.contents) ? this.contents.get(key3, keepScalar) : undefined;
|
245575
245575
|
}
|
245576
245576
|
getIn(path6, keepScalar) {
|
245577
245577
|
if (Collection.isEmptyPath(path6))
|
245578
245578
|
return !keepScalar && identity2.isScalar(this.contents) ? this.contents.value : this.contents;
|
245579
245579
|
return identity2.isCollection(this.contents) ? this.contents.getIn(path6, keepScalar) : undefined;
|
245580
245580
|
}
|
245581
|
-
has(
|
245582
|
-
return identity2.isCollection(this.contents) ? this.contents.has(
|
245581
|
+
has(key3) {
|
245582
|
+
return identity2.isCollection(this.contents) ? this.contents.has(key3) : false;
|
245583
245583
|
}
|
245584
245584
|
hasIn(path6) {
|
245585
245585
|
if (Collection.isEmptyPath(path6))
|
245586
245586
|
return this.contents !== undefined;
|
245587
245587
|
return identity2.isCollection(this.contents) ? this.contents.hasIn(path6) : false;
|
245588
245588
|
}
|
245589
|
-
set(
|
245589
|
+
set(key3, value4) {
|
245590
245590
|
if (this.contents == null) {
|
245591
|
-
this.contents = Collection.collectionFromPath(this.schema, [
|
245591
|
+
this.contents = Collection.collectionFromPath(this.schema, [key3], value4);
|
245592
245592
|
} else if (assertCollection(this.contents)) {
|
245593
|
-
this.contents.set(
|
245593
|
+
this.contents.set(key3, value4);
|
245594
245594
|
}
|
245595
245595
|
}
|
245596
245596
|
setIn(path6, value4) {
|
@@ -245874,25 +245874,25 @@ var require_resolve_props = __commonJS((exports) => {
|
|
245874
245874
|
|
245875
245875
|
// ../../node_modules/yaml/dist/compose/util-contains-newline.js
|
245876
245876
|
var require_util_contains_newline = __commonJS((exports) => {
|
245877
|
-
function containsNewline(
|
245878
|
-
if (!
|
245877
|
+
function containsNewline(key3) {
|
245878
|
+
if (!key3)
|
245879
245879
|
return null;
|
245880
|
-
switch (
|
245880
|
+
switch (key3.type) {
|
245881
245881
|
case "alias":
|
245882
245882
|
case "scalar":
|
245883
245883
|
case "double-quoted-scalar":
|
245884
245884
|
case "single-quoted-scalar":
|
245885
|
-
if (
|
245885
|
+
if (key3.source.includes(`
|
245886
245886
|
`))
|
245887
245887
|
return true;
|
245888
|
-
if (
|
245889
|
-
for (const st2 of
|
245888
|
+
if (key3.end) {
|
245889
|
+
for (const st2 of key3.end)
|
245890
245890
|
if (st2.type === "newline")
|
245891
245891
|
return true;
|
245892
245892
|
}
|
245893
245893
|
return false;
|
245894
245894
|
case "flow-collection":
|
245895
|
-
for (const it2 of
|
245895
|
+
for (const it2 of key3.items) {
|
245896
245896
|
for (const st2 of it2.start)
|
245897
245897
|
if (st2.type === "newline")
|
245898
245898
|
return true;
|
@@ -245957,10 +245957,10 @@ var require_resolve_block_map = __commonJS((exports) => {
|
|
245957
245957
|
let offset = bm.offset;
|
245958
245958
|
let commentEnd = null;
|
245959
245959
|
for (const collItem of bm.items) {
|
245960
|
-
const { start: start3, key:
|
245960
|
+
const { start: start3, key: key3, sep: sep3, value: value4 } = collItem;
|
245961
245961
|
const keyProps = resolveProps.resolveProps(start3, {
|
245962
245962
|
indicator: "explicit-key-ind",
|
245963
|
-
next:
|
245963
|
+
next: key3 ?? sep3?.[0],
|
245964
245964
|
offset,
|
245965
245965
|
onError,
|
245966
245966
|
parentIndent: bm.indent,
|
@@ -245968,10 +245968,10 @@ var require_resolve_block_map = __commonJS((exports) => {
|
|
245968
245968
|
});
|
245969
245969
|
const implicitKey = !keyProps.found;
|
245970
245970
|
if (implicitKey) {
|
245971
|
-
if (
|
245972
|
-
if (
|
245971
|
+
if (key3) {
|
245972
|
+
if (key3.type === "block-seq")
|
245973
245973
|
onError(offset, "BLOCK_AS_IMPLICIT_KEY", "A block sequence may not be used as an implicit map key");
|
245974
|
-
else if ("indent" in
|
245974
|
+
else if ("indent" in key3 && key3.indent !== bm.indent)
|
245975
245975
|
onError(offset, "BAD_INDENT", startColMsg);
|
245976
245976
|
}
|
245977
245977
|
if (!keyProps.anchor && !keyProps.tag && !sep3) {
|
@@ -245985,17 +245985,17 @@ var require_resolve_block_map = __commonJS((exports) => {
|
|
245985
245985
|
}
|
245986
245986
|
continue;
|
245987
245987
|
}
|
245988
|
-
if (keyProps.newlineAfterProp || utilContainsNewline.containsNewline(
|
245989
|
-
onError(
|
245988
|
+
if (keyProps.newlineAfterProp || utilContainsNewline.containsNewline(key3)) {
|
245989
|
+
onError(key3 ?? start3[start3.length - 1], "MULTILINE_IMPLICIT_KEY", "Implicit keys need to be on a single line");
|
245990
245990
|
}
|
245991
245991
|
} else if (keyProps.found?.indent !== bm.indent) {
|
245992
245992
|
onError(offset, "BAD_INDENT", startColMsg);
|
245993
245993
|
}
|
245994
245994
|
ctx.atKey = true;
|
245995
245995
|
const keyStart = keyProps.end;
|
245996
|
-
const keyNode =
|
245996
|
+
const keyNode = key3 ? composeNode(ctx, key3, keyProps, onError) : composeEmptyNode(ctx, keyStart, start3, null, keyProps, onError);
|
245997
245997
|
if (ctx.schema.compat)
|
245998
|
-
utilFlowIndentCheck.flowIndentCheck(bm.indent,
|
245998
|
+
utilFlowIndentCheck.flowIndentCheck(bm.indent, key3, onError);
|
245999
245999
|
ctx.atKey = false;
|
246000
246000
|
if (utilMapIncludes.mapIncludes(ctx, map3.items, keyNode))
|
246001
246001
|
onError(keyStart, "DUPLICATE_KEY", "Map keys must be unique");
|
@@ -246005,7 +246005,7 @@ var require_resolve_block_map = __commonJS((exports) => {
|
|
246005
246005
|
offset: keyNode.range[2],
|
246006
246006
|
onError,
|
246007
246007
|
parentIndent: bm.indent,
|
246008
|
-
startOnNewline: !
|
246008
|
+
startOnNewline: !key3 || key3.type === "block-scalar"
|
246009
246009
|
});
|
246010
246010
|
offset = valueProps.end;
|
246011
246011
|
if (valueProps.found) {
|
@@ -246161,11 +246161,11 @@ var require_resolve_flow_collection = __commonJS((exports) => {
|
|
246161
246161
|
let offset = fc.offset + fc.start.source.length;
|
246162
246162
|
for (let i7 = 0;i7 < fc.items.length; ++i7) {
|
246163
246163
|
const collItem = fc.items[i7];
|
246164
|
-
const { start: start3, key:
|
246164
|
+
const { start: start3, key: key3, sep: sep3, value: value4 } = collItem;
|
246165
246165
|
const props = resolveProps.resolveProps(start3, {
|
246166
246166
|
flow: fcName,
|
246167
246167
|
indicator: "explicit-key-ind",
|
246168
|
-
next:
|
246168
|
+
next: key3 ?? sep3?.[0],
|
246169
246169
|
offset,
|
246170
246170
|
onError,
|
246171
246171
|
parentIndent: fc.indent,
|
@@ -246187,8 +246187,8 @@ var require_resolve_flow_collection = __commonJS((exports) => {
|
|
246187
246187
|
offset = props.end;
|
246188
246188
|
continue;
|
246189
246189
|
}
|
246190
|
-
if (!isMap && ctx.options.strict && utilContainsNewline.containsNewline(
|
246191
|
-
onError(
|
246190
|
+
if (!isMap && ctx.options.strict && utilContainsNewline.containsNewline(key3))
|
246191
|
+
onError(key3, "MULTILINE_IMPLICIT_KEY", "Implicit keys of flow sequence pairs need to be on a single line");
|
246192
246192
|
}
|
246193
246193
|
if (i7 === 0) {
|
246194
246194
|
if (props.comma)
|
@@ -246233,8 +246233,8 @@ var require_resolve_flow_collection = __commonJS((exports) => {
|
|
246233
246233
|
} else {
|
246234
246234
|
ctx.atKey = true;
|
246235
246235
|
const keyStart = props.end;
|
246236
|
-
const keyNode =
|
246237
|
-
if (isBlock(
|
246236
|
+
const keyNode = key3 ? composeNode(ctx, key3, props, onError) : composeEmptyNode(ctx, keyStart, start3, null, props, onError);
|
246237
|
+
if (isBlock(key3))
|
246238
246238
|
onError(keyNode.range, "BLOCK_IN_FLOW", blockMsg);
|
246239
246239
|
ctx.atKey = false;
|
246240
246240
|
const valueProps = resolveProps.resolveProps(sep3 ?? [], {
|
@@ -247046,7 +247046,7 @@ var require_composer = __commonJS((exports) => {
|
|
247046
247046
|
var node_process = __require("node:process");
|
247047
247047
|
var directives4 = require_directives2();
|
247048
247048
|
var Document = require_Document();
|
247049
|
-
var
|
247049
|
+
var errors3 = require_errors3();
|
247050
247050
|
var identity2 = require_identity();
|
247051
247051
|
var composeDoc = require_compose_doc();
|
247052
247052
|
var resolveEnd = require_resolve_end();
|
@@ -247097,9 +247097,9 @@ var require_composer = __commonJS((exports) => {
|
|
247097
247097
|
this.onError = (source, code2, message, warning) => {
|
247098
247098
|
const pos = getErrorPos(source);
|
247099
247099
|
if (warning)
|
247100
|
-
this.warnings.push(new
|
247100
|
+
this.warnings.push(new errors3.YAMLWarning(pos, code2, message));
|
247101
247101
|
else
|
247102
|
-
this.errors.push(new
|
247102
|
+
this.errors.push(new errors3.YAMLParseError(pos, code2, message));
|
247103
247103
|
};
|
247104
247104
|
this.directives = new directives4.Directives({ version: options.version || "1.2" });
|
247105
247105
|
this.options = options;
|
@@ -247183,7 +247183,7 @@ ${cb}` : comment;
|
|
247183
247183
|
break;
|
247184
247184
|
case "error": {
|
247185
247185
|
const msg = token.source ? `${token.message}: ${JSON.stringify(token.source)}` : token.message;
|
247186
|
-
const error5 = new
|
247186
|
+
const error5 = new errors3.YAMLParseError(getErrorPos(token), "UNEXPECTED_TOKEN", msg);
|
247187
247187
|
if (this.atDirectives || !this.doc)
|
247188
247188
|
this.errors.push(error5);
|
247189
247189
|
else
|
@@ -247193,7 +247193,7 @@ ${cb}` : comment;
|
|
247193
247193
|
case "doc-end": {
|
247194
247194
|
if (!this.doc) {
|
247195
247195
|
const msg = "Unexpected doc-end without preceding document";
|
247196
|
-
this.errors.push(new
|
247196
|
+
this.errors.push(new errors3.YAMLParseError(getErrorPos(token), "UNEXPECTED_TOKEN", msg));
|
247197
247197
|
break;
|
247198
247198
|
}
|
247199
247199
|
this.doc.directives.docEnd = true;
|
@@ -247208,7 +247208,7 @@ ${end.comment}` : end.comment;
|
|
247208
247208
|
break;
|
247209
247209
|
}
|
247210
247210
|
default:
|
247211
|
-
this.errors.push(new
|
247211
|
+
this.errors.push(new errors3.YAMLParseError(getErrorPos(token), "UNEXPECTED_TOKEN", `Unsupported token ${token.type}`));
|
247212
247212
|
}
|
247213
247213
|
}
|
247214
247214
|
*end(forceDoc = false, endOffset = -1) {
|
@@ -247234,7 +247234,7 @@ ${end.comment}` : end.comment;
|
|
247234
247234
|
var require_cst_scalar = __commonJS((exports) => {
|
247235
247235
|
var resolveBlockScalar = require_resolve_block_scalar();
|
247236
247236
|
var resolveFlowScalar = require_resolve_flow_scalar();
|
247237
|
-
var
|
247237
|
+
var errors3 = require_errors3();
|
247238
247238
|
var stringifyString = require_stringifyString();
|
247239
247239
|
function resolveAsScalar(token, strict = true, onError) {
|
247240
247240
|
if (token) {
|
@@ -247243,7 +247243,7 @@ var require_cst_scalar = __commonJS((exports) => {
|
|
247243
247243
|
if (onError)
|
247244
247244
|
onError(offset, code2, message);
|
247245
247245
|
else
|
247246
|
-
throw new
|
247246
|
+
throw new errors3.YAMLParseError([offset, offset + 1], code2, message);
|
247247
247247
|
};
|
247248
247248
|
switch (token.type) {
|
247249
247249
|
case "scalar":
|
@@ -247357,9 +247357,9 @@ var require_cst_scalar = __commonJS((exports) => {
|
|
247357
247357
|
if (!addEndtoBlockProps(props, "end" in token ? token.end : undefined))
|
247358
247358
|
props.push({ type: "newline", offset: -1, indent: indent2, source: `
|
247359
247359
|
` });
|
247360
|
-
for (const
|
247361
|
-
if (
|
247362
|
-
delete token[
|
247360
|
+
for (const key3 of Object.keys(token))
|
247361
|
+
if (key3 !== "type" && key3 !== "offset")
|
247362
|
+
delete token[key3];
|
247363
247363
|
Object.assign(token, { type: "block-scalar", indent: indent2, props, source: body });
|
247364
247364
|
}
|
247365
247365
|
}
|
@@ -247408,9 +247408,9 @@ var require_cst_scalar = __commonJS((exports) => {
|
|
247408
247408
|
default: {
|
247409
247409
|
const indent2 = "indent" in token ? token.indent : -1;
|
247410
247410
|
const end = "end" in token && Array.isArray(token.end) ? token.end.filter((st2) => st2.type === "space" || st2.type === "comment" || st2.type === "newline") : [];
|
247411
|
-
for (const
|
247412
|
-
if (
|
247413
|
-
delete token[
|
247411
|
+
for (const key3 of Object.keys(token))
|
247412
|
+
if (key3 !== "type" && key3 !== "offset")
|
247413
|
+
delete token[key3];
|
247414
247414
|
Object.assign(token, { type: type4, indent: indent2, source, end });
|
247415
247415
|
}
|
247416
247416
|
}
|
@@ -247462,12 +247462,12 @@ var require_cst_stringify = __commonJS((exports) => {
|
|
247462
247462
|
}
|
247463
247463
|
}
|
247464
247464
|
}
|
247465
|
-
function stringifyItem({ start: start3, key:
|
247465
|
+
function stringifyItem({ start: start3, key: key3, sep: sep3, value: value4 }) {
|
247466
247466
|
let res = "";
|
247467
247467
|
for (const st2 of start3)
|
247468
247468
|
res += st2.source;
|
247469
|
-
if (
|
247470
|
-
res += stringifyToken(
|
247469
|
+
if (key3)
|
247470
|
+
res += stringifyToken(key3);
|
247471
247471
|
if (sep3)
|
247472
247472
|
for (const st2 of sep3)
|
247473
247473
|
res += st2.source;
|
@@ -248763,7 +248763,7 @@ var require_parser2 = __commonJS((exports) => {
|
|
248763
248763
|
});
|
248764
248764
|
} else if (isFlowToken(it2.key) && !includesToken(it2.sep, "newline")) {
|
248765
248765
|
const start4 = getFirstKeyStartProps(it2.start);
|
248766
|
-
const
|
248766
|
+
const key3 = it2.key;
|
248767
248767
|
const sep3 = it2.sep;
|
248768
248768
|
sep3.push(this.sourceToken);
|
248769
248769
|
delete it2.key;
|
@@ -248772,7 +248772,7 @@ var require_parser2 = __commonJS((exports) => {
|
|
248772
248772
|
type: "block-map",
|
248773
248773
|
offset: this.offset,
|
248774
248774
|
indent: this.indent,
|
248775
|
-
items: [{ start: start4, key:
|
248775
|
+
items: [{ start: start4, key: key3, sep: sep3 }]
|
248776
248776
|
});
|
248777
248777
|
} else if (start3.length > 0) {
|
248778
248778
|
it2.sep = it2.sep.concat(start3, this.sourceToken);
|
@@ -249095,7 +249095,7 @@ var require_parser2 = __commonJS((exports) => {
|
|
249095
249095
|
var require_public_api = __commonJS((exports) => {
|
249096
249096
|
var composer = require_composer();
|
249097
249097
|
var Document = require_Document();
|
249098
|
-
var
|
249098
|
+
var errors3 = require_errors3();
|
249099
249099
|
var log = require_log();
|
249100
249100
|
var identity2 = require_identity();
|
249101
249101
|
var lineCounter = require_line_counter();
|
@@ -249112,8 +249112,8 @@ var require_public_api = __commonJS((exports) => {
|
|
249112
249112
|
const docs = Array.from(composer$1.compose(parser$1.parse(source)));
|
249113
249113
|
if (prettyErrors && lineCounter2)
|
249114
249114
|
for (const doc of docs) {
|
249115
|
-
doc.errors.forEach(
|
249116
|
-
doc.warnings.forEach(
|
249115
|
+
doc.errors.forEach(errors3.prettifyError(source, lineCounter2));
|
249116
|
+
doc.warnings.forEach(errors3.prettifyError(source, lineCounter2));
|
249117
249117
|
}
|
249118
249118
|
if (docs.length > 0)
|
249119
249119
|
return docs;
|
@@ -249128,13 +249128,13 @@ var require_public_api = __commonJS((exports) => {
|
|
249128
249128
|
if (!doc)
|
249129
249129
|
doc = _doc;
|
249130
249130
|
else if (doc.options.logLevel !== "silent") {
|
249131
|
-
doc.errors.push(new
|
249131
|
+
doc.errors.push(new errors3.YAMLParseError(_doc.range.slice(0, 2), "MULTIPLE_DOCS", "Source contains multiple documents; please use YAML.parseAllDocuments()"));
|
249132
249132
|
break;
|
249133
249133
|
}
|
249134
249134
|
}
|
249135
249135
|
if (prettyErrors && lineCounter2) {
|
249136
|
-
doc.errors.forEach(
|
249137
|
-
doc.warnings.forEach(
|
249136
|
+
doc.errors.forEach(errors3.prettifyError(source, lineCounter2));
|
249137
|
+
doc.warnings.forEach(errors3.prettifyError(source, lineCounter2));
|
249138
249138
|
}
|
249139
249139
|
return doc;
|
249140
249140
|
}
|
@@ -259517,7 +259517,7 @@ function pruneCurrentEnv(currentEnv, env2) {
|
|
259517
259517
|
var package_default = {
|
259518
259518
|
name: "@settlemint/sdk-cli",
|
259519
259519
|
description: "Command-line interface for SettleMint SDK, providing development tools and project management capabilities",
|
259520
|
-
version: "1.2.2-
|
259520
|
+
version: "1.2.2-prc6ef5d96",
|
259521
259521
|
type: "module",
|
259522
259522
|
private: false,
|
259523
259523
|
license: "FSL-1.1-MIT",
|
@@ -259562,12 +259562,12 @@ var package_default = {
|
|
259562
259562
|
devDependencies: {
|
259563
259563
|
"@commander-js/extra-typings": "11.1.0",
|
259564
259564
|
commander: "11.1.0",
|
259565
|
-
"@inquirer/confirm": "5.1.
|
259565
|
+
"@inquirer/confirm": "5.1.7",
|
259566
259566
|
"@inquirer/input": "4.1.7",
|
259567
259567
|
"@inquirer/password": "4.0.10",
|
259568
|
-
"@inquirer/select": "4.0
|
259569
|
-
"@settlemint/sdk-js": "1.2.2-
|
259570
|
-
"@settlemint/sdk-utils": "1.2.2-
|
259568
|
+
"@inquirer/select": "4.1.0",
|
259569
|
+
"@settlemint/sdk-js": "1.2.2-prc6ef5d96",
|
259570
|
+
"@settlemint/sdk-utils": "1.2.2-prc6ef5d96",
|
259571
259571
|
"@types/node": "22.13.10",
|
259572
259572
|
"@types/semver": "7.5.8",
|
259573
259573
|
"@types/which": "3.0.4",
|
@@ -259656,6 +259656,7 @@ var {
|
|
259656
259656
|
} = import__.default;
|
259657
259657
|
|
259658
259658
|
// ../../node_modules/@inquirer/core/dist/esm/lib/key.js
|
259659
|
+
var isBackspaceKey = (key) => key.name === "backspace";
|
259659
259660
|
var isEnterKey = (key) => key.name === "enter" || key.name === "return";
|
259660
259661
|
// ../../node_modules/@inquirer/core/dist/esm/lib/errors.js
|
259661
259662
|
class AbortPromptError extends Error {
|
@@ -264924,477 +264925,23 @@ function sanitizeName(value4, length = 35) {
|
|
264924
264925
|
}).slice(0, length).replaceAll(/(^\d*)/g, "").replaceAll(/(-$)/g, "").replaceAll(/(^-)/g, "");
|
264925
264926
|
}
|
264926
264927
|
|
264927
|
-
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/key.js
|
264928
|
-
var isBackspaceKey = (key2) => key2.name === "backspace";
|
264929
|
-
var isEnterKey2 = (key2) => key2.name === "enter" || key2.name === "return";
|
264930
|
-
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/errors.js
|
264931
|
-
class AbortPromptError2 extends Error {
|
264932
|
-
name = "AbortPromptError";
|
264933
|
-
message = "Prompt was aborted";
|
264934
|
-
constructor(options) {
|
264935
|
-
super();
|
264936
|
-
this.cause = options?.cause;
|
264937
|
-
}
|
264938
|
-
}
|
264939
|
-
|
264940
|
-
class CancelPromptError2 extends Error {
|
264941
|
-
name = "CancelPromptError";
|
264942
|
-
message = "Prompt was canceled";
|
264943
|
-
}
|
264944
|
-
|
264945
|
-
class ExitPromptError2 extends Error {
|
264946
|
-
name = "ExitPromptError";
|
264947
|
-
}
|
264948
|
-
|
264949
|
-
class HookError2 extends Error {
|
264950
|
-
name = "HookError";
|
264951
|
-
}
|
264952
|
-
|
264953
|
-
class ValidationError2 extends Error {
|
264954
|
-
name = "ValidationError";
|
264955
|
-
}
|
264956
|
-
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/use-prefix.js
|
264957
|
-
import { AsyncResource as AsyncResource5 } from "node:async_hooks";
|
264958
|
-
|
264959
|
-
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/hook-engine.js
|
264960
|
-
import { AsyncLocalStorage as AsyncLocalStorage2, AsyncResource as AsyncResource4 } from "node:async_hooks";
|
264961
|
-
var hookStorage2 = new AsyncLocalStorage2;
|
264962
|
-
function createStore2(rl) {
|
264963
|
-
const store = {
|
264964
|
-
rl,
|
264965
|
-
hooks: [],
|
264966
|
-
hooksCleanup: [],
|
264967
|
-
hooksEffect: [],
|
264968
|
-
index: 0,
|
264969
|
-
handleChange() {}
|
264970
|
-
};
|
264971
|
-
return store;
|
264972
|
-
}
|
264973
|
-
function withHooks2(rl, cb) {
|
264974
|
-
const store = createStore2(rl);
|
264975
|
-
return hookStorage2.run(store, () => {
|
264976
|
-
function cycle(render) {
|
264977
|
-
store.handleChange = () => {
|
264978
|
-
store.index = 0;
|
264979
|
-
render();
|
264980
|
-
};
|
264981
|
-
store.handleChange();
|
264982
|
-
}
|
264983
|
-
return cb(cycle);
|
264984
|
-
});
|
264985
|
-
}
|
264986
|
-
function getStore2() {
|
264987
|
-
const store = hookStorage2.getStore();
|
264988
|
-
if (!store) {
|
264989
|
-
throw new HookError2("[Inquirer] Hook functions can only be called from within a prompt");
|
264990
|
-
}
|
264991
|
-
return store;
|
264992
|
-
}
|
264993
|
-
function readline3() {
|
264994
|
-
return getStore2().rl;
|
264995
|
-
}
|
264996
|
-
function withUpdates2(fn) {
|
264997
|
-
const wrapped = (...args) => {
|
264998
|
-
const store = getStore2();
|
264999
|
-
let shouldUpdate = false;
|
265000
|
-
const oldHandleChange = store.handleChange;
|
265001
|
-
store.handleChange = () => {
|
265002
|
-
shouldUpdate = true;
|
265003
|
-
};
|
265004
|
-
const returnValue = fn(...args);
|
265005
|
-
if (shouldUpdate) {
|
265006
|
-
oldHandleChange();
|
265007
|
-
}
|
265008
|
-
store.handleChange = oldHandleChange;
|
265009
|
-
return returnValue;
|
265010
|
-
};
|
265011
|
-
return AsyncResource4.bind(wrapped);
|
265012
|
-
}
|
265013
|
-
function withPointer2(cb) {
|
265014
|
-
const store = getStore2();
|
265015
|
-
const { index } = store;
|
265016
|
-
const pointer = {
|
265017
|
-
get() {
|
265018
|
-
return store.hooks[index];
|
265019
|
-
},
|
265020
|
-
set(value4) {
|
265021
|
-
store.hooks[index] = value4;
|
265022
|
-
},
|
265023
|
-
initialized: index in store.hooks
|
265024
|
-
};
|
265025
|
-
const returnValue = cb(pointer);
|
265026
|
-
store.index++;
|
265027
|
-
return returnValue;
|
265028
|
-
}
|
265029
|
-
function handleChange2() {
|
265030
|
-
getStore2().handleChange();
|
265031
|
-
}
|
265032
|
-
var effectScheduler2 = {
|
265033
|
-
queue(cb) {
|
265034
|
-
const store = getStore2();
|
265035
|
-
const { index } = store;
|
265036
|
-
store.hooksEffect.push(() => {
|
265037
|
-
store.hooksCleanup[index]?.();
|
265038
|
-
const cleanFn = cb(readline3());
|
265039
|
-
if (cleanFn != null && typeof cleanFn !== "function") {
|
265040
|
-
throw new ValidationError2("useEffect return value must be a cleanup function or nothing.");
|
265041
|
-
}
|
265042
|
-
store.hooksCleanup[index] = cleanFn;
|
265043
|
-
});
|
265044
|
-
},
|
265045
|
-
run() {
|
265046
|
-
const store = getStore2();
|
265047
|
-
withUpdates2(() => {
|
265048
|
-
store.hooksEffect.forEach((effect) => {
|
265049
|
-
effect();
|
265050
|
-
});
|
265051
|
-
store.hooksEffect.length = 0;
|
265052
|
-
})();
|
265053
|
-
},
|
265054
|
-
clearAll() {
|
265055
|
-
const store = getStore2();
|
265056
|
-
store.hooksCleanup.forEach((cleanFn) => {
|
265057
|
-
cleanFn?.();
|
265058
|
-
});
|
265059
|
-
store.hooksEffect.length = 0;
|
265060
|
-
store.hooksCleanup.length = 0;
|
265061
|
-
}
|
265062
|
-
};
|
265063
|
-
|
265064
|
-
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/use-state.js
|
265065
|
-
function useState2(defaultValue) {
|
265066
|
-
return withPointer2((pointer) => {
|
265067
|
-
const setFn = (newValue) => {
|
265068
|
-
if (pointer.get() !== newValue) {
|
265069
|
-
pointer.set(newValue);
|
265070
|
-
handleChange2();
|
265071
|
-
}
|
265072
|
-
};
|
265073
|
-
if (pointer.initialized) {
|
265074
|
-
return [pointer.get(), setFn];
|
265075
|
-
}
|
265076
|
-
const value4 = typeof defaultValue === "function" ? defaultValue() : defaultValue;
|
265077
|
-
pointer.set(value4);
|
265078
|
-
return [value4, setFn];
|
265079
|
-
});
|
265080
|
-
}
|
265081
|
-
|
265082
|
-
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/use-effect.js
|
265083
|
-
function useEffect2(cb, depArray) {
|
265084
|
-
withPointer2((pointer) => {
|
265085
|
-
const oldDeps = pointer.get();
|
265086
|
-
const hasChanged = !Array.isArray(oldDeps) || depArray.some((dep, i6) => !Object.is(dep, oldDeps[i6]));
|
265087
|
-
if (hasChanged) {
|
265088
|
-
effectScheduler2.queue(cb);
|
265089
|
-
}
|
265090
|
-
pointer.set(depArray);
|
265091
|
-
});
|
265092
|
-
}
|
265093
|
-
|
265094
|
-
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/theme.js
|
265095
|
-
var import_yoctocolors_cjs2 = __toESM(require_yoctocolors_cjs(), 1);
|
265096
|
-
var defaultTheme2 = {
|
265097
|
-
prefix: {
|
265098
|
-
idle: import_yoctocolors_cjs2.default.blue("?"),
|
265099
|
-
done: import_yoctocolors_cjs2.default.green(esm_default.tick)
|
265100
|
-
},
|
265101
|
-
spinner: {
|
265102
|
-
interval: 80,
|
265103
|
-
frames: ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"].map((frame) => import_yoctocolors_cjs2.default.yellow(frame))
|
265104
|
-
},
|
265105
|
-
style: {
|
265106
|
-
answer: import_yoctocolors_cjs2.default.cyan,
|
265107
|
-
message: import_yoctocolors_cjs2.default.bold,
|
265108
|
-
error: (text2) => import_yoctocolors_cjs2.default.red(`> ${text2}`),
|
265109
|
-
defaultAnswer: (text2) => import_yoctocolors_cjs2.default.dim(`(${text2})`),
|
265110
|
-
help: import_yoctocolors_cjs2.default.dim,
|
265111
|
-
highlight: import_yoctocolors_cjs2.default.cyan,
|
265112
|
-
key: (text2) => import_yoctocolors_cjs2.default.cyan(import_yoctocolors_cjs2.default.bold(`<${text2}>`))
|
265113
|
-
}
|
265114
|
-
};
|
265115
|
-
|
265116
|
-
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/make-theme.js
|
265117
|
-
function isPlainObject3(value4) {
|
265118
|
-
if (typeof value4 !== "object" || value4 === null)
|
265119
|
-
return false;
|
265120
|
-
let proto = value4;
|
265121
|
-
while (Object.getPrototypeOf(proto) !== null) {
|
265122
|
-
proto = Object.getPrototypeOf(proto);
|
265123
|
-
}
|
265124
|
-
return Object.getPrototypeOf(value4) === proto;
|
265125
|
-
}
|
265126
|
-
function deepMerge3(...objects) {
|
265127
|
-
const output = {};
|
265128
|
-
for (const obj of objects) {
|
265129
|
-
for (const [key2, value4] of Object.entries(obj)) {
|
265130
|
-
const prevValue = output[key2];
|
265131
|
-
output[key2] = isPlainObject3(prevValue) && isPlainObject3(value4) ? deepMerge3(prevValue, value4) : value4;
|
265132
|
-
}
|
265133
|
-
}
|
265134
|
-
return output;
|
265135
|
-
}
|
265136
|
-
function makeTheme2(...themes) {
|
265137
|
-
const themesToMerge = [
|
265138
|
-
defaultTheme2,
|
265139
|
-
...themes.filter((theme) => theme != null)
|
265140
|
-
];
|
265141
|
-
return deepMerge3(...themesToMerge);
|
265142
|
-
}
|
265143
|
-
|
265144
|
-
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/use-prefix.js
|
265145
|
-
function usePrefix2({ status = "idle", theme }) {
|
265146
|
-
const [showLoader, setShowLoader] = useState2(false);
|
265147
|
-
const [tick, setTick] = useState2(0);
|
265148
|
-
const { prefix, spinner: spinner2 } = makeTheme2(theme);
|
265149
|
-
useEffect2(() => {
|
265150
|
-
if (status === "loading") {
|
265151
|
-
let tickInterval;
|
265152
|
-
let inc = -1;
|
265153
|
-
const delayTimeout = setTimeout(AsyncResource5.bind(() => {
|
265154
|
-
setShowLoader(true);
|
265155
|
-
tickInterval = setInterval(AsyncResource5.bind(() => {
|
265156
|
-
inc = inc + 1;
|
265157
|
-
setTick(inc % spinner2.frames.length);
|
265158
|
-
}), spinner2.interval);
|
265159
|
-
}), 300);
|
265160
|
-
return () => {
|
265161
|
-
clearTimeout(delayTimeout);
|
265162
|
-
clearInterval(tickInterval);
|
265163
|
-
};
|
265164
|
-
} else {
|
265165
|
-
setShowLoader(false);
|
265166
|
-
}
|
265167
|
-
}, [status]);
|
265168
|
-
if (showLoader) {
|
265169
|
-
return spinner2.frames[tick];
|
265170
|
-
}
|
265171
|
-
const iconName = status === "loading" ? "idle" : status;
|
265172
|
-
return typeof prefix === "string" ? prefix : prefix[iconName] ?? prefix["idle"];
|
265173
|
-
}
|
265174
|
-
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/use-ref.js
|
265175
|
-
function useRef2(val) {
|
265176
|
-
return useState2({ current: val })[0];
|
265177
|
-
}
|
265178
|
-
|
265179
|
-
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/use-keypress.js
|
265180
|
-
function useKeypress2(userHandler) {
|
265181
|
-
const signal = useRef2(userHandler);
|
265182
|
-
signal.current = userHandler;
|
265183
|
-
useEffect2((rl) => {
|
265184
|
-
let ignore = false;
|
265185
|
-
const handler = withUpdates2((_input, event) => {
|
265186
|
-
if (ignore)
|
265187
|
-
return;
|
265188
|
-
signal.current(event, rl);
|
265189
|
-
});
|
265190
|
-
rl.input.on("keypress", handler);
|
265191
|
-
return () => {
|
265192
|
-
ignore = true;
|
265193
|
-
rl.input.removeListener("keypress", handler);
|
265194
|
-
};
|
265195
|
-
}, []);
|
265196
|
-
}
|
265197
|
-
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/utils.js
|
265198
|
-
var import_cli_width2 = __toESM(require_cli_width(), 1);
|
265199
|
-
var import_wrap_ansi2 = __toESM(require_wrap_ansi(), 1);
|
265200
|
-
function breakLines2(content, width) {
|
265201
|
-
return content.split(`
|
265202
|
-
`).flatMap((line) => import_wrap_ansi2.default(line, width, { trim: false, hard: true }).split(`
|
265203
|
-
`).map((str) => str.trimEnd())).join(`
|
265204
|
-
`);
|
265205
|
-
}
|
265206
|
-
function readlineWidth2() {
|
265207
|
-
return import_cli_width2.default({ defaultWidth: 80, output: readline3().output });
|
265208
|
-
}
|
265209
|
-
|
265210
|
-
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
|
265211
|
-
var import_mute_stream2 = __toESM(require_lib(), 1);
|
265212
|
-
import * as readline4 from "node:readline";
|
265213
|
-
import { AsyncResource as AsyncResource6 } from "node:async_hooks";
|
265214
|
-
|
265215
|
-
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/screen-manager.js
|
265216
|
-
var import_ansi_escapes2 = __toESM(require_ansi_escapes(), 1);
|
265217
|
-
import { stripVTControlCharacters as stripVTControlCharacters3 } from "node:util";
|
265218
|
-
var height2 = (content) => content.split(`
|
265219
|
-
`).length;
|
265220
|
-
var lastLine2 = (content) => content.split(`
|
265221
|
-
`).pop() ?? "";
|
265222
|
-
function cursorDown2(n6) {
|
265223
|
-
return n6 > 0 ? import_ansi_escapes2.default.cursorDown(n6) : "";
|
265224
|
-
}
|
265225
|
-
|
265226
|
-
class ScreenManager2 {
|
265227
|
-
height = 0;
|
265228
|
-
extraLinesUnderPrompt = 0;
|
265229
|
-
cursorPos;
|
265230
|
-
rl;
|
265231
|
-
constructor(rl) {
|
265232
|
-
this.rl = rl;
|
265233
|
-
this.cursorPos = rl.getCursorPos();
|
265234
|
-
}
|
265235
|
-
write(content) {
|
265236
|
-
this.rl.output.unmute();
|
265237
|
-
this.rl.output.write(content);
|
265238
|
-
this.rl.output.mute();
|
265239
|
-
}
|
265240
|
-
render(content, bottomContent = "") {
|
265241
|
-
const promptLine = lastLine2(content);
|
265242
|
-
const rawPromptLine = stripVTControlCharacters3(promptLine);
|
265243
|
-
let prompt = rawPromptLine;
|
265244
|
-
if (this.rl.line.length > 0) {
|
265245
|
-
prompt = prompt.slice(0, -this.rl.line.length);
|
265246
|
-
}
|
265247
|
-
this.rl.setPrompt(prompt);
|
265248
|
-
this.cursorPos = this.rl.getCursorPos();
|
265249
|
-
const width = readlineWidth2();
|
265250
|
-
content = breakLines2(content, width);
|
265251
|
-
bottomContent = breakLines2(bottomContent, width);
|
265252
|
-
if (rawPromptLine.length % width === 0) {
|
265253
|
-
content += `
|
265254
|
-
`;
|
265255
|
-
}
|
265256
|
-
let output = content + (bottomContent ? `
|
265257
|
-
` + bottomContent : "");
|
265258
|
-
const promptLineUpDiff = Math.floor(rawPromptLine.length / width) - this.cursorPos.rows;
|
265259
|
-
const bottomContentHeight = promptLineUpDiff + (bottomContent ? height2(bottomContent) : 0);
|
265260
|
-
if (bottomContentHeight > 0)
|
265261
|
-
output += import_ansi_escapes2.default.cursorUp(bottomContentHeight);
|
265262
|
-
output += import_ansi_escapes2.default.cursorTo(this.cursorPos.cols);
|
265263
|
-
this.write(cursorDown2(this.extraLinesUnderPrompt) + import_ansi_escapes2.default.eraseLines(this.height) + output);
|
265264
|
-
this.extraLinesUnderPrompt = bottomContentHeight;
|
265265
|
-
this.height = height2(output);
|
265266
|
-
}
|
265267
|
-
checkCursorPos() {
|
265268
|
-
const cursorPos = this.rl.getCursorPos();
|
265269
|
-
if (cursorPos.cols !== this.cursorPos.cols) {
|
265270
|
-
this.write(import_ansi_escapes2.default.cursorTo(cursorPos.cols));
|
265271
|
-
this.cursorPos = cursorPos;
|
265272
|
-
}
|
265273
|
-
}
|
265274
|
-
done({ clearContent }) {
|
265275
|
-
this.rl.setPrompt("");
|
265276
|
-
let output = cursorDown2(this.extraLinesUnderPrompt);
|
265277
|
-
output += clearContent ? import_ansi_escapes2.default.eraseLines(this.height) : `
|
265278
|
-
`;
|
265279
|
-
output += import_ansi_escapes2.default.cursorShow;
|
265280
|
-
this.write(output);
|
265281
|
-
this.rl.close();
|
265282
|
-
}
|
265283
|
-
}
|
265284
|
-
|
265285
|
-
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/promise-polyfill.js
|
265286
|
-
class PromisePolyfill2 extends Promise {
|
265287
|
-
static withResolver() {
|
265288
|
-
let resolve5;
|
265289
|
-
let reject;
|
265290
|
-
const promise = new Promise((res, rej) => {
|
265291
|
-
resolve5 = res;
|
265292
|
-
reject = rej;
|
265293
|
-
});
|
265294
|
-
return { promise, resolve: resolve5, reject };
|
265295
|
-
}
|
265296
|
-
}
|
265297
|
-
|
265298
|
-
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
|
265299
|
-
function getCallSites2() {
|
265300
|
-
const _prepareStackTrace = Error.prepareStackTrace;
|
265301
|
-
let result = [];
|
265302
|
-
try {
|
265303
|
-
Error.prepareStackTrace = (_5, callSites) => {
|
265304
|
-
const callSitesWithoutCurrent = callSites.slice(1);
|
265305
|
-
result = callSitesWithoutCurrent;
|
265306
|
-
return callSitesWithoutCurrent;
|
265307
|
-
};
|
265308
|
-
new Error().stack;
|
265309
|
-
} catch {
|
265310
|
-
return result;
|
265311
|
-
}
|
265312
|
-
Error.prepareStackTrace = _prepareStackTrace;
|
265313
|
-
return result;
|
265314
|
-
}
|
265315
|
-
function createPrompt2(view) {
|
265316
|
-
const callSites = getCallSites2();
|
265317
|
-
const prompt = (config3, context = {}) => {
|
265318
|
-
const { input = process.stdin, signal } = context;
|
265319
|
-
const cleanups = new Set;
|
265320
|
-
const output = new import_mute_stream2.default;
|
265321
|
-
output.pipe(context.output ?? process.stdout);
|
265322
|
-
const rl = readline4.createInterface({
|
265323
|
-
terminal: true,
|
265324
|
-
input,
|
265325
|
-
output
|
265326
|
-
});
|
265327
|
-
const screen = new ScreenManager2(rl);
|
265328
|
-
const { promise, resolve: resolve5, reject } = PromisePolyfill2.withResolver();
|
265329
|
-
const cancel3 = () => reject(new CancelPromptError2);
|
265330
|
-
if (signal) {
|
265331
|
-
const abort = () => reject(new AbortPromptError2({ cause: signal.reason }));
|
265332
|
-
if (signal.aborted) {
|
265333
|
-
abort();
|
265334
|
-
return Object.assign(promise, { cancel: cancel3 });
|
265335
|
-
}
|
265336
|
-
signal.addEventListener("abort", abort);
|
265337
|
-
cleanups.add(() => signal.removeEventListener("abort", abort));
|
265338
|
-
}
|
265339
|
-
cleanups.add(onExit((code2, signal2) => {
|
265340
|
-
reject(new ExitPromptError2(`User force closed the prompt with ${code2} ${signal2}`));
|
265341
|
-
}));
|
265342
|
-
const checkCursorPos = () => screen.checkCursorPos();
|
265343
|
-
rl.input.on("keypress", checkCursorPos);
|
265344
|
-
cleanups.add(() => rl.input.removeListener("keypress", checkCursorPos));
|
265345
|
-
return withHooks2(rl, (cycle) => {
|
265346
|
-
const hooksCleanup = AsyncResource6.bind(() => effectScheduler2.clearAll());
|
265347
|
-
rl.on("close", hooksCleanup);
|
265348
|
-
cleanups.add(() => rl.removeListener("close", hooksCleanup));
|
265349
|
-
cycle(() => {
|
265350
|
-
try {
|
265351
|
-
const nextView = view(config3, (value4) => {
|
265352
|
-
setImmediate(() => resolve5(value4));
|
265353
|
-
});
|
265354
|
-
if (nextView === undefined) {
|
265355
|
-
const callerFilename = callSites[1]?.getFileName?.();
|
265356
|
-
throw new Error(`Prompt functions must return a string.
|
265357
|
-
at ${callerFilename}`);
|
265358
|
-
}
|
265359
|
-
const [content, bottomContent] = typeof nextView === "string" ? [nextView] : nextView;
|
265360
|
-
screen.render(content, bottomContent);
|
265361
|
-
effectScheduler2.run();
|
265362
|
-
} catch (error5) {
|
265363
|
-
reject(error5);
|
265364
|
-
}
|
265365
|
-
});
|
265366
|
-
return Object.assign(promise.then((answer) => {
|
265367
|
-
effectScheduler2.clearAll();
|
265368
|
-
return answer;
|
265369
|
-
}, (error5) => {
|
265370
|
-
effectScheduler2.clearAll();
|
265371
|
-
throw error5;
|
265372
|
-
}).finally(() => {
|
265373
|
-
cleanups.forEach((cleanup) => cleanup());
|
265374
|
-
screen.done({ clearContent: Boolean(context.clearPromptOnDone) });
|
265375
|
-
output.end();
|
265376
|
-
}).then(() => promise), { cancel: cancel3 });
|
265377
|
-
});
|
265378
|
-
};
|
265379
|
-
return prompt;
|
265380
|
-
}
|
265381
264928
|
// ../../node_modules/@inquirer/input/dist/esm/index.js
|
265382
264929
|
var inputTheme = {
|
265383
264930
|
validationFailureMode: "keep"
|
265384
264931
|
};
|
265385
|
-
var esm_default2 =
|
264932
|
+
var esm_default2 = createPrompt((config3, done) => {
|
265386
264933
|
const { required, validate: validate3 = () => true } = config3;
|
265387
|
-
const theme =
|
265388
|
-
const [status, setStatus] =
|
265389
|
-
const [defaultValue = "", setDefaultValue] =
|
265390
|
-
const [errorMsg, setError] =
|
265391
|
-
const [value4, setValue] =
|
265392
|
-
const prefix =
|
265393
|
-
|
264934
|
+
const theme = makeTheme(inputTheme, config3.theme);
|
264935
|
+
const [status, setStatus] = useState("idle");
|
264936
|
+
const [defaultValue = "", setDefaultValue] = useState(config3.default);
|
264937
|
+
const [errorMsg, setError] = useState();
|
264938
|
+
const [value4, setValue] = useState("");
|
264939
|
+
const prefix = usePrefix({ status, theme });
|
264940
|
+
useKeypress(async (key2, rl) => {
|
265394
264941
|
if (status !== "idle") {
|
265395
264942
|
return;
|
265396
264943
|
}
|
265397
|
-
if (
|
264944
|
+
if (isEnterKey(key2)) {
|
265398
264945
|
const answer = value4 || defaultValue;
|
265399
264946
|
setStatus("loading");
|
265400
264947
|
const isValid2 = required && !answer ? "You must provide a value" : await validate3(answer);
|
@@ -265411,9 +264958,9 @@ var esm_default2 = createPrompt2((config3, done) => {
|
|
265411
264958
|
setError(isValid2 || "You must provide a valid value");
|
265412
264959
|
setStatus("idle");
|
265413
264960
|
}
|
265414
|
-
} else if (isBackspaceKey(
|
264961
|
+
} else if (isBackspaceKey(key2) && !value4) {
|
265415
264962
|
setDefaultValue(undefined);
|
265416
|
-
} else if (
|
264963
|
+
} else if (key2.name === "tab" && !value4) {
|
265417
264964
|
setDefaultValue(undefined);
|
265418
264965
|
rl.clearLine(0);
|
265419
264966
|
rl.write(defaultValue);
|
@@ -265463,13 +265010,13 @@ async function subgraphNamePrompt({
|
|
265463
265010
|
}
|
265464
265011
|
|
265465
265012
|
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/key.js
|
265466
|
-
var isUpKey = (
|
265467
|
-
var isDownKey = (
|
265468
|
-
var isBackspaceKey2 = (
|
265469
|
-
var isNumberKey = (
|
265470
|
-
var
|
265013
|
+
var isUpKey = (key2) => key2.name === "up" || key2.name === "k" || key2.ctrl && key2.name === "p";
|
265014
|
+
var isDownKey = (key2) => key2.name === "down" || key2.name === "j" || key2.ctrl && key2.name === "n";
|
265015
|
+
var isBackspaceKey2 = (key2) => key2.name === "backspace";
|
265016
|
+
var isNumberKey = (key2) => "1234567890".includes(key2.name);
|
265017
|
+
var isEnterKey2 = (key2) => key2.name === "enter" || key2.name === "return";
|
265471
265018
|
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/errors.js
|
265472
|
-
class
|
265019
|
+
class AbortPromptError2 extends Error {
|
265473
265020
|
name = "AbortPromptError";
|
265474
265021
|
message = "Prompt was aborted";
|
265475
265022
|
constructor(options) {
|
@@ -265478,29 +265025,29 @@ class AbortPromptError3 extends Error {
|
|
265478
265025
|
}
|
265479
265026
|
}
|
265480
265027
|
|
265481
|
-
class
|
265028
|
+
class CancelPromptError2 extends Error {
|
265482
265029
|
name = "CancelPromptError";
|
265483
265030
|
message = "Prompt was canceled";
|
265484
265031
|
}
|
265485
265032
|
|
265486
|
-
class
|
265033
|
+
class ExitPromptError2 extends Error {
|
265487
265034
|
name = "ExitPromptError";
|
265488
265035
|
}
|
265489
265036
|
|
265490
|
-
class
|
265037
|
+
class HookError2 extends Error {
|
265491
265038
|
name = "HookError";
|
265492
265039
|
}
|
265493
265040
|
|
265494
|
-
class
|
265041
|
+
class ValidationError2 extends Error {
|
265495
265042
|
name = "ValidationError";
|
265496
265043
|
}
|
265497
265044
|
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/use-prefix.js
|
265498
|
-
import { AsyncResource as
|
265045
|
+
import { AsyncResource as AsyncResource5 } from "node:async_hooks";
|
265499
265046
|
|
265500
265047
|
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/hook-engine.js
|
265501
|
-
import { AsyncLocalStorage as
|
265502
|
-
var
|
265503
|
-
function
|
265048
|
+
import { AsyncLocalStorage as AsyncLocalStorage2, AsyncResource as AsyncResource4 } from "node:async_hooks";
|
265049
|
+
var hookStorage2 = new AsyncLocalStorage2;
|
265050
|
+
function createStore2(rl) {
|
265504
265051
|
const store = {
|
265505
265052
|
rl,
|
265506
265053
|
hooks: [],
|
@@ -265511,9 +265058,9 @@ function createStore3(rl) {
|
|
265511
265058
|
};
|
265512
265059
|
return store;
|
265513
265060
|
}
|
265514
|
-
function
|
265515
|
-
const store =
|
265516
|
-
return
|
265061
|
+
function withHooks2(rl, cb) {
|
265062
|
+
const store = createStore2(rl);
|
265063
|
+
return hookStorage2.run(store, () => {
|
265517
265064
|
function cycle(render) {
|
265518
265065
|
store.handleChange = () => {
|
265519
265066
|
store.index = 0;
|
@@ -265524,19 +265071,19 @@ function withHooks3(rl, cb) {
|
|
265524
265071
|
return cb(cycle);
|
265525
265072
|
});
|
265526
265073
|
}
|
265527
|
-
function
|
265528
|
-
const store =
|
265074
|
+
function getStore2() {
|
265075
|
+
const store = hookStorage2.getStore();
|
265529
265076
|
if (!store) {
|
265530
|
-
throw new
|
265077
|
+
throw new HookError2("[Inquirer] Hook functions can only be called from within a prompt");
|
265531
265078
|
}
|
265532
265079
|
return store;
|
265533
265080
|
}
|
265534
|
-
function
|
265535
|
-
return
|
265081
|
+
function readline3() {
|
265082
|
+
return getStore2().rl;
|
265536
265083
|
}
|
265537
|
-
function
|
265084
|
+
function withUpdates2(fn) {
|
265538
265085
|
const wrapped = (...args) => {
|
265539
|
-
const store =
|
265086
|
+
const store = getStore2();
|
265540
265087
|
let shouldUpdate = false;
|
265541
265088
|
const oldHandleChange = store.handleChange;
|
265542
265089
|
store.handleChange = () => {
|
@@ -265549,10 +265096,10 @@ function withUpdates3(fn) {
|
|
265549
265096
|
store.handleChange = oldHandleChange;
|
265550
265097
|
return returnValue;
|
265551
265098
|
};
|
265552
|
-
return
|
265099
|
+
return AsyncResource4.bind(wrapped);
|
265553
265100
|
}
|
265554
|
-
function
|
265555
|
-
const store =
|
265101
|
+
function withPointer2(cb) {
|
265102
|
+
const store = getStore2();
|
265556
265103
|
const { index } = store;
|
265557
265104
|
const pointer = {
|
265558
265105
|
get() {
|
@@ -265567,25 +265114,25 @@ function withPointer3(cb) {
|
|
265567
265114
|
store.index++;
|
265568
265115
|
return returnValue;
|
265569
265116
|
}
|
265570
|
-
function
|
265571
|
-
|
265117
|
+
function handleChange2() {
|
265118
|
+
getStore2().handleChange();
|
265572
265119
|
}
|
265573
|
-
var
|
265120
|
+
var effectScheduler2 = {
|
265574
265121
|
queue(cb) {
|
265575
|
-
const store =
|
265122
|
+
const store = getStore2();
|
265576
265123
|
const { index } = store;
|
265577
265124
|
store.hooksEffect.push(() => {
|
265578
265125
|
store.hooksCleanup[index]?.();
|
265579
|
-
const cleanFn = cb(
|
265126
|
+
const cleanFn = cb(readline3());
|
265580
265127
|
if (cleanFn != null && typeof cleanFn !== "function") {
|
265581
|
-
throw new
|
265128
|
+
throw new ValidationError2("useEffect return value must be a cleanup function or nothing.");
|
265582
265129
|
}
|
265583
265130
|
store.hooksCleanup[index] = cleanFn;
|
265584
265131
|
});
|
265585
265132
|
},
|
265586
265133
|
run() {
|
265587
|
-
const store =
|
265588
|
-
|
265134
|
+
const store = getStore2();
|
265135
|
+
withUpdates2(() => {
|
265589
265136
|
store.hooksEffect.forEach((effect) => {
|
265590
265137
|
effect();
|
265591
265138
|
});
|
@@ -265593,7 +265140,7 @@ var effectScheduler3 = {
|
|
265593
265140
|
})();
|
265594
265141
|
},
|
265595
265142
|
clearAll() {
|
265596
|
-
const store =
|
265143
|
+
const store = getStore2();
|
265597
265144
|
store.hooksCleanup.forEach((cleanFn) => {
|
265598
265145
|
cleanFn?.();
|
265599
265146
|
});
|
@@ -265603,12 +265150,12 @@ var effectScheduler3 = {
|
|
265603
265150
|
};
|
265604
265151
|
|
265605
265152
|
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/use-state.js
|
265606
|
-
function
|
265607
|
-
return
|
265153
|
+
function useState2(defaultValue) {
|
265154
|
+
return withPointer2((pointer) => {
|
265608
265155
|
const setFn = (newValue) => {
|
265609
265156
|
if (pointer.get() !== newValue) {
|
265610
265157
|
pointer.set(newValue);
|
265611
|
-
|
265158
|
+
handleChange2();
|
265612
265159
|
}
|
265613
265160
|
};
|
265614
265161
|
if (pointer.initialized) {
|
@@ -265621,41 +265168,41 @@ function useState3(defaultValue) {
|
|
265621
265168
|
}
|
265622
265169
|
|
265623
265170
|
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/use-effect.js
|
265624
|
-
function
|
265625
|
-
|
265171
|
+
function useEffect2(cb, depArray) {
|
265172
|
+
withPointer2((pointer) => {
|
265626
265173
|
const oldDeps = pointer.get();
|
265627
265174
|
const hasChanged = !Array.isArray(oldDeps) || depArray.some((dep, i6) => !Object.is(dep, oldDeps[i6]));
|
265628
265175
|
if (hasChanged) {
|
265629
|
-
|
265176
|
+
effectScheduler2.queue(cb);
|
265630
265177
|
}
|
265631
265178
|
pointer.set(depArray);
|
265632
265179
|
});
|
265633
265180
|
}
|
265634
265181
|
|
265635
265182
|
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/theme.js
|
265636
|
-
var
|
265637
|
-
var
|
265183
|
+
var import_yoctocolors_cjs2 = __toESM(require_yoctocolors_cjs(), 1);
|
265184
|
+
var defaultTheme2 = {
|
265638
265185
|
prefix: {
|
265639
|
-
idle:
|
265640
|
-
done:
|
265186
|
+
idle: import_yoctocolors_cjs2.default.blue("?"),
|
265187
|
+
done: import_yoctocolors_cjs2.default.green(esm_default.tick)
|
265641
265188
|
},
|
265642
265189
|
spinner: {
|
265643
265190
|
interval: 80,
|
265644
|
-
frames: ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"].map((frame) =>
|
265191
|
+
frames: ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"].map((frame) => import_yoctocolors_cjs2.default.yellow(frame))
|
265645
265192
|
},
|
265646
265193
|
style: {
|
265647
|
-
answer:
|
265648
|
-
message:
|
265649
|
-
error: (text2) =>
|
265650
|
-
defaultAnswer: (text2) =>
|
265651
|
-
help:
|
265652
|
-
highlight:
|
265653
|
-
key: (text2) =>
|
265194
|
+
answer: import_yoctocolors_cjs2.default.cyan,
|
265195
|
+
message: import_yoctocolors_cjs2.default.bold,
|
265196
|
+
error: (text2) => import_yoctocolors_cjs2.default.red(`> ${text2}`),
|
265197
|
+
defaultAnswer: (text2) => import_yoctocolors_cjs2.default.dim(`(${text2})`),
|
265198
|
+
help: import_yoctocolors_cjs2.default.dim,
|
265199
|
+
highlight: import_yoctocolors_cjs2.default.cyan,
|
265200
|
+
key: (text2) => import_yoctocolors_cjs2.default.cyan(import_yoctocolors_cjs2.default.bold(`<${text2}>`))
|
265654
265201
|
}
|
265655
265202
|
};
|
265656
265203
|
|
265657
265204
|
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/make-theme.js
|
265658
|
-
function
|
265205
|
+
function isPlainObject3(value4) {
|
265659
265206
|
if (typeof value4 !== "object" || value4 === null)
|
265660
265207
|
return false;
|
265661
265208
|
let proto = value4;
|
@@ -265664,36 +265211,36 @@ function isPlainObject4(value4) {
|
|
265664
265211
|
}
|
265665
265212
|
return Object.getPrototypeOf(value4) === proto;
|
265666
265213
|
}
|
265667
|
-
function
|
265214
|
+
function deepMerge3(...objects) {
|
265668
265215
|
const output = {};
|
265669
265216
|
for (const obj of objects) {
|
265670
|
-
for (const [
|
265671
|
-
const prevValue = output[
|
265672
|
-
output[
|
265217
|
+
for (const [key2, value4] of Object.entries(obj)) {
|
265218
|
+
const prevValue = output[key2];
|
265219
|
+
output[key2] = isPlainObject3(prevValue) && isPlainObject3(value4) ? deepMerge3(prevValue, value4) : value4;
|
265673
265220
|
}
|
265674
265221
|
}
|
265675
265222
|
return output;
|
265676
265223
|
}
|
265677
|
-
function
|
265224
|
+
function makeTheme2(...themes) {
|
265678
265225
|
const themesToMerge = [
|
265679
|
-
|
265226
|
+
defaultTheme2,
|
265680
265227
|
...themes.filter((theme) => theme != null)
|
265681
265228
|
];
|
265682
|
-
return
|
265229
|
+
return deepMerge3(...themesToMerge);
|
265683
265230
|
}
|
265684
265231
|
|
265685
265232
|
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/use-prefix.js
|
265686
|
-
function
|
265687
|
-
const [showLoader, setShowLoader] =
|
265688
|
-
const [tick, setTick] =
|
265689
|
-
const { prefix, spinner: spinner2 } =
|
265690
|
-
|
265233
|
+
function usePrefix2({ status = "idle", theme }) {
|
265234
|
+
const [showLoader, setShowLoader] = useState2(false);
|
265235
|
+
const [tick, setTick] = useState2(0);
|
265236
|
+
const { prefix, spinner: spinner2 } = makeTheme2(theme);
|
265237
|
+
useEffect2(() => {
|
265691
265238
|
if (status === "loading") {
|
265692
265239
|
let tickInterval;
|
265693
265240
|
let inc = -1;
|
265694
|
-
const delayTimeout = setTimeout(
|
265241
|
+
const delayTimeout = setTimeout(AsyncResource5.bind(() => {
|
265695
265242
|
setShowLoader(true);
|
265696
|
-
tickInterval = setInterval(
|
265243
|
+
tickInterval = setInterval(AsyncResource5.bind(() => {
|
265697
265244
|
inc = inc + 1;
|
265698
265245
|
setTick(inc % spinner2.frames.length);
|
265699
265246
|
}), spinner2.interval);
|
@@ -265714,7 +265261,7 @@ function usePrefix3({ status = "idle", theme }) {
|
|
265714
265261
|
}
|
265715
265262
|
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/use-memo.js
|
265716
265263
|
function useMemo(fn, dependencies) {
|
265717
|
-
return
|
265264
|
+
return withPointer2((pointer) => {
|
265718
265265
|
const prev = pointer.get();
|
265719
265266
|
if (!prev || prev.dependencies.length !== dependencies.length || prev.dependencies.some((dep, i6) => dep !== dependencies[i6])) {
|
265720
265267
|
const value4 = fn();
|
@@ -265725,16 +265272,16 @@ function useMemo(fn, dependencies) {
|
|
265725
265272
|
});
|
265726
265273
|
}
|
265727
265274
|
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/use-ref.js
|
265728
|
-
function
|
265729
|
-
return
|
265275
|
+
function useRef2(val) {
|
265276
|
+
return useState2({ current: val })[0];
|
265730
265277
|
}
|
265731
265278
|
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/use-keypress.js
|
265732
|
-
function
|
265733
|
-
const signal =
|
265279
|
+
function useKeypress2(userHandler) {
|
265280
|
+
const signal = useRef2(userHandler);
|
265734
265281
|
signal.current = userHandler;
|
265735
|
-
|
265282
|
+
useEffect2((rl) => {
|
265736
265283
|
let ignore = false;
|
265737
|
-
const handler =
|
265284
|
+
const handler = withUpdates2((_input, event) => {
|
265738
265285
|
if (ignore)
|
265739
265286
|
return;
|
265740
265287
|
signal.current(event, rl);
|
@@ -265747,21 +265294,21 @@ function useKeypress3(userHandler) {
|
|
265747
265294
|
}, []);
|
265748
265295
|
}
|
265749
265296
|
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/utils.js
|
265750
|
-
var
|
265751
|
-
var
|
265752
|
-
function
|
265297
|
+
var import_cli_width2 = __toESM(require_cli_width(), 1);
|
265298
|
+
var import_wrap_ansi2 = __toESM(require_wrap_ansi(), 1);
|
265299
|
+
function breakLines2(content, width) {
|
265753
265300
|
return content.split(`
|
265754
|
-
`).flatMap((line) =>
|
265301
|
+
`).flatMap((line) => import_wrap_ansi2.default(line, width, { trim: false, hard: true }).split(`
|
265755
265302
|
`).map((str) => str.trimEnd())).join(`
|
265756
265303
|
`);
|
265757
265304
|
}
|
265758
|
-
function
|
265759
|
-
return
|
265305
|
+
function readlineWidth2() {
|
265306
|
+
return import_cli_width2.default({ defaultWidth: 80, output: readline3().output });
|
265760
265307
|
}
|
265761
265308
|
|
265762
265309
|
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/pagination/lines.js
|
265763
265310
|
function split2(content, width) {
|
265764
|
-
return
|
265311
|
+
return breakLines2(content, width).split(`
|
265765
265312
|
`);
|
265766
265313
|
}
|
265767
265314
|
function rotate(count, items) {
|
@@ -265824,7 +265371,7 @@ function infinite({ active, lastActive, total, pageSize, pointer }) {
|
|
265824
265371
|
|
265825
265372
|
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/pagination/use-pagination.js
|
265826
265373
|
function usePagination({ items, active, renderItem, pageSize, loop = true }) {
|
265827
|
-
const state =
|
265374
|
+
const state = useRef2({ position: 0, lastActive: 0 });
|
265828
265375
|
const position = loop ? infinite({
|
265829
265376
|
active,
|
265830
265377
|
lastActive: state.current.lastActive,
|
@@ -265840,7 +265387,7 @@ function usePagination({ items, active, renderItem, pageSize, loop = true }) {
|
|
265840
265387
|
state.current.lastActive = active;
|
265841
265388
|
return lines({
|
265842
265389
|
items,
|
265843
|
-
width:
|
265390
|
+
width: readlineWidth2(),
|
265844
265391
|
renderItem,
|
265845
265392
|
active,
|
265846
265393
|
position,
|
@@ -265849,22 +265396,22 @@ function usePagination({ items, active, renderItem, pageSize, loop = true }) {
|
|
265849
265396
|
`);
|
265850
265397
|
}
|
265851
265398
|
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
|
265852
|
-
var
|
265853
|
-
import * as
|
265854
|
-
import { AsyncResource as
|
265399
|
+
var import_mute_stream2 = __toESM(require_lib(), 1);
|
265400
|
+
import * as readline4 from "node:readline";
|
265401
|
+
import { AsyncResource as AsyncResource6 } from "node:async_hooks";
|
265855
265402
|
|
265856
265403
|
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/screen-manager.js
|
265857
|
-
var
|
265858
|
-
import { stripVTControlCharacters as
|
265859
|
-
var
|
265404
|
+
var import_ansi_escapes2 = __toESM(require_ansi_escapes(), 1);
|
265405
|
+
import { stripVTControlCharacters as stripVTControlCharacters3 } from "node:util";
|
265406
|
+
var height2 = (content) => content.split(`
|
265860
265407
|
`).length;
|
265861
|
-
var
|
265408
|
+
var lastLine2 = (content) => content.split(`
|
265862
265409
|
`).pop() ?? "";
|
265863
|
-
function
|
265864
|
-
return n6 > 0 ?
|
265410
|
+
function cursorDown2(n6) {
|
265411
|
+
return n6 > 0 ? import_ansi_escapes2.default.cursorDown(n6) : "";
|
265865
265412
|
}
|
265866
265413
|
|
265867
|
-
class
|
265414
|
+
class ScreenManager2 {
|
265868
265415
|
height = 0;
|
265869
265416
|
extraLinesUnderPrompt = 0;
|
265870
265417
|
cursorPos;
|
@@ -265879,17 +265426,17 @@ class ScreenManager3 {
|
|
265879
265426
|
this.rl.output.mute();
|
265880
265427
|
}
|
265881
265428
|
render(content, bottomContent = "") {
|
265882
|
-
const promptLine =
|
265883
|
-
const rawPromptLine =
|
265429
|
+
const promptLine = lastLine2(content);
|
265430
|
+
const rawPromptLine = stripVTControlCharacters3(promptLine);
|
265884
265431
|
let prompt = rawPromptLine;
|
265885
265432
|
if (this.rl.line.length > 0) {
|
265886
265433
|
prompt = prompt.slice(0, -this.rl.line.length);
|
265887
265434
|
}
|
265888
265435
|
this.rl.setPrompt(prompt);
|
265889
265436
|
this.cursorPos = this.rl.getCursorPos();
|
265890
|
-
const width =
|
265891
|
-
content =
|
265892
|
-
bottomContent =
|
265437
|
+
const width = readlineWidth2();
|
265438
|
+
content = breakLines2(content, width);
|
265439
|
+
bottomContent = breakLines2(bottomContent, width);
|
265893
265440
|
if (rawPromptLine.length % width === 0) {
|
265894
265441
|
content += `
|
265895
265442
|
`;
|
@@ -265897,34 +265444,34 @@ class ScreenManager3 {
|
|
265897
265444
|
let output = content + (bottomContent ? `
|
265898
265445
|
` + bottomContent : "");
|
265899
265446
|
const promptLineUpDiff = Math.floor(rawPromptLine.length / width) - this.cursorPos.rows;
|
265900
|
-
const bottomContentHeight = promptLineUpDiff + (bottomContent ?
|
265447
|
+
const bottomContentHeight = promptLineUpDiff + (bottomContent ? height2(bottomContent) : 0);
|
265901
265448
|
if (bottomContentHeight > 0)
|
265902
|
-
output +=
|
265903
|
-
output +=
|
265904
|
-
this.write(
|
265449
|
+
output += import_ansi_escapes2.default.cursorUp(bottomContentHeight);
|
265450
|
+
output += import_ansi_escapes2.default.cursorTo(this.cursorPos.cols);
|
265451
|
+
this.write(cursorDown2(this.extraLinesUnderPrompt) + import_ansi_escapes2.default.eraseLines(this.height) + output);
|
265905
265452
|
this.extraLinesUnderPrompt = bottomContentHeight;
|
265906
|
-
this.height =
|
265453
|
+
this.height = height2(output);
|
265907
265454
|
}
|
265908
265455
|
checkCursorPos() {
|
265909
265456
|
const cursorPos = this.rl.getCursorPos();
|
265910
265457
|
if (cursorPos.cols !== this.cursorPos.cols) {
|
265911
|
-
this.write(
|
265458
|
+
this.write(import_ansi_escapes2.default.cursorTo(cursorPos.cols));
|
265912
265459
|
this.cursorPos = cursorPos;
|
265913
265460
|
}
|
265914
265461
|
}
|
265915
265462
|
done({ clearContent }) {
|
265916
265463
|
this.rl.setPrompt("");
|
265917
|
-
let output =
|
265918
|
-
output += clearContent ?
|
265464
|
+
let output = cursorDown2(this.extraLinesUnderPrompt);
|
265465
|
+
output += clearContent ? import_ansi_escapes2.default.eraseLines(this.height) : `
|
265919
265466
|
`;
|
265920
|
-
output +=
|
265467
|
+
output += import_ansi_escapes2.default.cursorShow;
|
265921
265468
|
this.write(output);
|
265922
265469
|
this.rl.close();
|
265923
265470
|
}
|
265924
265471
|
}
|
265925
265472
|
|
265926
265473
|
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/promise-polyfill.js
|
265927
|
-
class
|
265474
|
+
class PromisePolyfill2 extends Promise {
|
265928
265475
|
static withResolver() {
|
265929
265476
|
let resolve5;
|
265930
265477
|
let reject;
|
@@ -265937,7 +265484,7 @@ class PromisePolyfill3 extends Promise {
|
|
265937
265484
|
}
|
265938
265485
|
|
265939
265486
|
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
|
265940
|
-
function
|
265487
|
+
function getCallSites2() {
|
265941
265488
|
const _prepareStackTrace = Error.prepareStackTrace;
|
265942
265489
|
let result = [];
|
265943
265490
|
try {
|
@@ -265953,23 +265500,23 @@ function getCallSites3() {
|
|
265953
265500
|
Error.prepareStackTrace = _prepareStackTrace;
|
265954
265501
|
return result;
|
265955
265502
|
}
|
265956
|
-
function
|
265957
|
-
const callSites =
|
265503
|
+
function createPrompt2(view) {
|
265504
|
+
const callSites = getCallSites2();
|
265958
265505
|
const prompt = (config3, context = {}) => {
|
265959
265506
|
const { input = process.stdin, signal } = context;
|
265960
265507
|
const cleanups = new Set;
|
265961
|
-
const output = new
|
265508
|
+
const output = new import_mute_stream2.default;
|
265962
265509
|
output.pipe(context.output ?? process.stdout);
|
265963
|
-
const rl =
|
265510
|
+
const rl = readline4.createInterface({
|
265964
265511
|
terminal: true,
|
265965
265512
|
input,
|
265966
265513
|
output
|
265967
265514
|
});
|
265968
|
-
const screen = new
|
265969
|
-
const { promise, resolve: resolve5, reject } =
|
265970
|
-
const cancel3 = () => reject(new
|
265515
|
+
const screen = new ScreenManager2(rl);
|
265516
|
+
const { promise, resolve: resolve5, reject } = PromisePolyfill2.withResolver();
|
265517
|
+
const cancel3 = () => reject(new CancelPromptError2);
|
265971
265518
|
if (signal) {
|
265972
|
-
const abort = () => reject(new
|
265519
|
+
const abort = () => reject(new AbortPromptError2({ cause: signal.reason }));
|
265973
265520
|
if (signal.aborted) {
|
265974
265521
|
abort();
|
265975
265522
|
return Object.assign(promise, { cancel: cancel3 });
|
@@ -265978,13 +265525,13 @@ function createPrompt3(view) {
|
|
265978
265525
|
cleanups.add(() => signal.removeEventListener("abort", abort));
|
265979
265526
|
}
|
265980
265527
|
cleanups.add(onExit((code2, signal2) => {
|
265981
|
-
reject(new
|
265528
|
+
reject(new ExitPromptError2(`User force closed the prompt with ${code2} ${signal2}`));
|
265982
265529
|
}));
|
265983
265530
|
const checkCursorPos = () => screen.checkCursorPos();
|
265984
265531
|
rl.input.on("keypress", checkCursorPos);
|
265985
265532
|
cleanups.add(() => rl.input.removeListener("keypress", checkCursorPos));
|
265986
|
-
return
|
265987
|
-
const hooksCleanup =
|
265533
|
+
return withHooks2(rl, (cycle) => {
|
265534
|
+
const hooksCleanup = AsyncResource6.bind(() => effectScheduler2.clearAll());
|
265988
265535
|
rl.on("close", hooksCleanup);
|
265989
265536
|
cleanups.add(() => rl.removeListener("close", hooksCleanup));
|
265990
265537
|
cycle(() => {
|
@@ -265999,16 +265546,16 @@ function createPrompt3(view) {
|
|
265999
265546
|
}
|
266000
265547
|
const [content, bottomContent] = typeof nextView === "string" ? [nextView] : nextView;
|
266001
265548
|
screen.render(content, bottomContent);
|
266002
|
-
|
265549
|
+
effectScheduler2.run();
|
266003
265550
|
} catch (error5) {
|
266004
265551
|
reject(error5);
|
266005
265552
|
}
|
266006
265553
|
});
|
266007
265554
|
return Object.assign(promise.then((answer) => {
|
266008
|
-
|
265555
|
+
effectScheduler2.clearAll();
|
266009
265556
|
return answer;
|
266010
265557
|
}, (error5) => {
|
266011
|
-
|
265558
|
+
effectScheduler2.clearAll();
|
266012
265559
|
throw error5;
|
266013
265560
|
}).finally(() => {
|
266014
265561
|
cleanups.forEach((cleanup) => cleanup());
|
@@ -266020,9 +265567,9 @@ function createPrompt3(view) {
|
|
266020
265567
|
return prompt;
|
266021
265568
|
}
|
266022
265569
|
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/Separator.js
|
266023
|
-
var
|
265570
|
+
var import_yoctocolors_cjs3 = __toESM(require_yoctocolors_cjs(), 1);
|
266024
265571
|
class Separator {
|
266025
|
-
separator =
|
265572
|
+
separator = import_yoctocolors_cjs3.default.dim(Array.from({ length: 15 }).join(esm_default.line));
|
266026
265573
|
type = "separator";
|
266027
265574
|
constructor(separator) {
|
266028
265575
|
if (separator) {
|
@@ -266034,15 +265581,16 @@ class Separator {
|
|
266034
265581
|
}
|
266035
265582
|
}
|
266036
265583
|
// ../../node_modules/@inquirer/select/dist/esm/index.js
|
266037
|
-
var
|
266038
|
-
var
|
265584
|
+
var import_yoctocolors_cjs4 = __toESM(require_yoctocolors_cjs(), 1);
|
265585
|
+
var import_ansi_escapes3 = __toESM(require_ansi_escapes(), 1);
|
266039
265586
|
var selectTheme = {
|
266040
265587
|
icon: { cursor: esm_default.pointer },
|
266041
265588
|
style: {
|
266042
|
-
disabled: (text2) =>
|
266043
|
-
description: (text2) =>
|
265589
|
+
disabled: (text2) => import_yoctocolors_cjs4.default.dim(`- ${text2}`),
|
265590
|
+
description: (text2) => import_yoctocolors_cjs4.default.cyan(text2)
|
266044
265591
|
},
|
266045
|
-
helpMode: "auto"
|
265592
|
+
helpMode: "auto",
|
265593
|
+
indexMode: "hidden"
|
266046
265594
|
};
|
266047
265595
|
function isSelectable(item) {
|
266048
265596
|
return !Separator.isSeparator(item) && !item.disabled;
|
@@ -266069,19 +265617,19 @@ function normalizeChoices(choices) {
|
|
266069
265617
|
};
|
266070
265618
|
});
|
266071
265619
|
}
|
266072
|
-
var esm_default3 =
|
265620
|
+
var esm_default3 = createPrompt2((config3, done) => {
|
266073
265621
|
const { loop = true, pageSize = 7 } = config3;
|
266074
|
-
const firstRender =
|
266075
|
-
const theme =
|
266076
|
-
const [status, setStatus] =
|
266077
|
-
const prefix =
|
266078
|
-
const searchTimeoutRef =
|
265622
|
+
const firstRender = useRef2(true);
|
265623
|
+
const theme = makeTheme2(selectTheme, config3.theme);
|
265624
|
+
const [status, setStatus] = useState2("idle");
|
265625
|
+
const prefix = usePrefix2({ status, theme });
|
265626
|
+
const searchTimeoutRef = useRef2();
|
266079
265627
|
const items = useMemo(() => normalizeChoices(config3.choices), [config3.choices]);
|
266080
265628
|
const bounds = useMemo(() => {
|
266081
265629
|
const first = items.findIndex(isSelectable);
|
266082
265630
|
const last = items.findLastIndex(isSelectable);
|
266083
265631
|
if (first === -1) {
|
266084
|
-
throw new
|
265632
|
+
throw new ValidationError2("[select prompt] No selectable choices. All choices are disabled.");
|
266085
265633
|
}
|
266086
265634
|
return { first, last };
|
266087
265635
|
}, [items]);
|
@@ -266090,31 +265638,33 @@ var esm_default3 = createPrompt3((config3, done) => {
|
|
266090
265638
|
return -1;
|
266091
265639
|
return items.findIndex((item) => isSelectable(item) && item.value === config3.default);
|
266092
265640
|
}, [config3.default, items]);
|
266093
|
-
const [active, setActive] =
|
265641
|
+
const [active, setActive] = useState2(defaultItemIndex === -1 ? bounds.first : defaultItemIndex);
|
266094
265642
|
const selectedChoice = items[active];
|
266095
|
-
|
265643
|
+
useKeypress2((key3, rl) => {
|
266096
265644
|
clearTimeout(searchTimeoutRef.current);
|
266097
|
-
if (
|
265645
|
+
if (isEnterKey2(key3)) {
|
266098
265646
|
setStatus("done");
|
266099
265647
|
done(selectedChoice.value);
|
266100
|
-
} else if (isUpKey(
|
265648
|
+
} else if (isUpKey(key3) || isDownKey(key3)) {
|
266101
265649
|
rl.clearLine(0);
|
266102
|
-
if (loop || isUpKey(
|
266103
|
-
const offset = isUpKey(
|
265650
|
+
if (loop || isUpKey(key3) && active !== bounds.first || isDownKey(key3) && active !== bounds.last) {
|
265651
|
+
const offset = isUpKey(key3) ? -1 : 1;
|
266104
265652
|
let next = active;
|
266105
265653
|
do {
|
266106
265654
|
next = (next + offset + items.length) % items.length;
|
266107
265655
|
} while (!isSelectable(items[next]));
|
266108
265656
|
setActive(next);
|
266109
265657
|
}
|
266110
|
-
} else if (isNumberKey(
|
266111
|
-
rl.
|
266112
|
-
const position = Number(key4.name) - 1;
|
265658
|
+
} else if (isNumberKey(key3) && !Number.isNaN(Number(rl.line))) {
|
265659
|
+
const position = Number(rl.line) - 1;
|
266113
265660
|
const item = items[position];
|
266114
265661
|
if (item != null && isSelectable(item)) {
|
266115
265662
|
setActive(position);
|
266116
265663
|
}
|
266117
|
-
|
265664
|
+
searchTimeoutRef.current = setTimeout(() => {
|
265665
|
+
rl.clearLine(0);
|
265666
|
+
}, 700);
|
265667
|
+
} else if (isBackspaceKey2(key3)) {
|
266118
265668
|
rl.clearLine(0);
|
266119
265669
|
} else {
|
266120
265670
|
const searchTerm = rl.line.toLowerCase();
|
@@ -266131,7 +265681,7 @@ var esm_default3 = createPrompt3((config3, done) => {
|
|
266131
265681
|
}, 700);
|
266132
265682
|
}
|
266133
265683
|
});
|
266134
|
-
|
265684
|
+
useEffect2(() => () => {
|
266135
265685
|
clearTimeout(searchTimeoutRef.current);
|
266136
265686
|
}, []);
|
266137
265687
|
const message = theme.style.message(config3.message, status);
|
@@ -266149,17 +265699,18 @@ ${theme.style.help("(Use arrow keys to reveal more choices)")}`;
|
|
266149
265699
|
const page = usePagination({
|
266150
265700
|
items,
|
266151
265701
|
active,
|
266152
|
-
renderItem({ item, isActive }) {
|
265702
|
+
renderItem({ item, isActive, index }) {
|
266153
265703
|
if (Separator.isSeparator(item)) {
|
266154
265704
|
return ` ${item.separator}`;
|
266155
265705
|
}
|
265706
|
+
const indexLabel = theme.indexMode === "number" ? `${index + 1}. ` : "";
|
266156
265707
|
if (item.disabled) {
|
266157
265708
|
const disabledLabel = typeof item.disabled === "string" ? item.disabled : "(disabled)";
|
266158
|
-
return theme.style.disabled(`${item.name} ${disabledLabel}`);
|
265709
|
+
return theme.style.disabled(`${indexLabel}${item.name} ${disabledLabel}`);
|
266159
265710
|
}
|
266160
265711
|
const color = isActive ? theme.style.highlight : (x6) => x6;
|
266161
265712
|
const cursor = isActive ? theme.icon.cursor : ` `;
|
266162
|
-
return color(`${cursor} ${item.name}`);
|
265713
|
+
return color(`${cursor} ${indexLabel}${item.name}`);
|
266163
265714
|
},
|
266164
265715
|
pageSize,
|
266165
265716
|
loop
|
@@ -266170,7 +265721,7 @@ ${theme.style.help("(Use arrow keys to reveal more choices)")}`;
|
|
266170
265721
|
const choiceDescription = selectedChoice.description ? `
|
266171
265722
|
${theme.style.description(selectedChoice.description)}` : ``;
|
266172
265723
|
return `${[prefix, message, helpTipTop].filter(Boolean).join(" ")}
|
266173
|
-
${page}${helpTipBottom}${choiceDescription}${
|
265724
|
+
${page}${helpTipBottom}${choiceDescription}${import_ansi_escapes3.default.cursorHide}`;
|
266174
265725
|
});
|
266175
265726
|
|
266176
265727
|
// src/prompts/smart-contract-set/subgraph.prompt.ts
|
@@ -266566,13 +266117,13 @@ var esm_default4 = createPrompt((config3, done) => {
|
|
266566
266117
|
const [value4, setValue] = useState("");
|
266567
266118
|
const theme = makeTheme(config3.theme);
|
266568
266119
|
const prefix = usePrefix({ status, theme });
|
266569
|
-
useKeypress((
|
266570
|
-
if (isEnterKey(
|
266120
|
+
useKeypress((key3, rl) => {
|
266121
|
+
if (isEnterKey(key3)) {
|
266571
266122
|
const answer = getBooleanValue(value4, config3.default);
|
266572
266123
|
setValue(transformer(answer));
|
266573
266124
|
setStatus("done");
|
266574
266125
|
done(answer);
|
266575
|
-
} else if (
|
266126
|
+
} else if (key3.name === "tab") {
|
266576
266127
|
const answer = boolToString(!getBooleanValue(value4, config3.default));
|
266577
266128
|
rl.clearLine(0);
|
266578
266129
|
rl.write(answer);
|
@@ -266592,473 +266143,20 @@ var esm_default4 = createPrompt((config3, done) => {
|
|
266592
266143
|
return `${prefix} ${message}${defaultValue} ${formattedValue}`;
|
266593
266144
|
});
|
266594
266145
|
|
266595
|
-
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/key.js
|
266596
|
-
var isEnterKey4 = (key4) => key4.name === "enter" || key4.name === "return";
|
266597
|
-
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/errors.js
|
266598
|
-
class AbortPromptError4 extends Error {
|
266599
|
-
name = "AbortPromptError";
|
266600
|
-
message = "Prompt was aborted";
|
266601
|
-
constructor(options) {
|
266602
|
-
super();
|
266603
|
-
this.cause = options?.cause;
|
266604
|
-
}
|
266605
|
-
}
|
266606
|
-
|
266607
|
-
class CancelPromptError4 extends Error {
|
266608
|
-
name = "CancelPromptError";
|
266609
|
-
message = "Prompt was canceled";
|
266610
|
-
}
|
266611
|
-
|
266612
|
-
class ExitPromptError4 extends Error {
|
266613
|
-
name = "ExitPromptError";
|
266614
|
-
}
|
266615
|
-
|
266616
|
-
class HookError4 extends Error {
|
266617
|
-
name = "HookError";
|
266618
|
-
}
|
266619
|
-
|
266620
|
-
class ValidationError4 extends Error {
|
266621
|
-
name = "ValidationError";
|
266622
|
-
}
|
266623
|
-
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/use-prefix.js
|
266624
|
-
import { AsyncResource as AsyncResource11 } from "node:async_hooks";
|
266625
|
-
|
266626
|
-
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/hook-engine.js
|
266627
|
-
import { AsyncLocalStorage as AsyncLocalStorage4, AsyncResource as AsyncResource10 } from "node:async_hooks";
|
266628
|
-
var hookStorage4 = new AsyncLocalStorage4;
|
266629
|
-
function createStore4(rl) {
|
266630
|
-
const store = {
|
266631
|
-
rl,
|
266632
|
-
hooks: [],
|
266633
|
-
hooksCleanup: [],
|
266634
|
-
hooksEffect: [],
|
266635
|
-
index: 0,
|
266636
|
-
handleChange() {}
|
266637
|
-
};
|
266638
|
-
return store;
|
266639
|
-
}
|
266640
|
-
function withHooks4(rl, cb) {
|
266641
|
-
const store = createStore4(rl);
|
266642
|
-
return hookStorage4.run(store, () => {
|
266643
|
-
function cycle(render) {
|
266644
|
-
store.handleChange = () => {
|
266645
|
-
store.index = 0;
|
266646
|
-
render();
|
266647
|
-
};
|
266648
|
-
store.handleChange();
|
266649
|
-
}
|
266650
|
-
return cb(cycle);
|
266651
|
-
});
|
266652
|
-
}
|
266653
|
-
function getStore4() {
|
266654
|
-
const store = hookStorage4.getStore();
|
266655
|
-
if (!store) {
|
266656
|
-
throw new HookError4("[Inquirer] Hook functions can only be called from within a prompt");
|
266657
|
-
}
|
266658
|
-
return store;
|
266659
|
-
}
|
266660
|
-
function readline7() {
|
266661
|
-
return getStore4().rl;
|
266662
|
-
}
|
266663
|
-
function withUpdates4(fn) {
|
266664
|
-
const wrapped = (...args) => {
|
266665
|
-
const store = getStore4();
|
266666
|
-
let shouldUpdate = false;
|
266667
|
-
const oldHandleChange = store.handleChange;
|
266668
|
-
store.handleChange = () => {
|
266669
|
-
shouldUpdate = true;
|
266670
|
-
};
|
266671
|
-
const returnValue = fn(...args);
|
266672
|
-
if (shouldUpdate) {
|
266673
|
-
oldHandleChange();
|
266674
|
-
}
|
266675
|
-
store.handleChange = oldHandleChange;
|
266676
|
-
return returnValue;
|
266677
|
-
};
|
266678
|
-
return AsyncResource10.bind(wrapped);
|
266679
|
-
}
|
266680
|
-
function withPointer4(cb) {
|
266681
|
-
const store = getStore4();
|
266682
|
-
const { index } = store;
|
266683
|
-
const pointer = {
|
266684
|
-
get() {
|
266685
|
-
return store.hooks[index];
|
266686
|
-
},
|
266687
|
-
set(value4) {
|
266688
|
-
store.hooks[index] = value4;
|
266689
|
-
},
|
266690
|
-
initialized: index in store.hooks
|
266691
|
-
};
|
266692
|
-
const returnValue = cb(pointer);
|
266693
|
-
store.index++;
|
266694
|
-
return returnValue;
|
266695
|
-
}
|
266696
|
-
function handleChange4() {
|
266697
|
-
getStore4().handleChange();
|
266698
|
-
}
|
266699
|
-
var effectScheduler4 = {
|
266700
|
-
queue(cb) {
|
266701
|
-
const store = getStore4();
|
266702
|
-
const { index } = store;
|
266703
|
-
store.hooksEffect.push(() => {
|
266704
|
-
store.hooksCleanup[index]?.();
|
266705
|
-
const cleanFn = cb(readline7());
|
266706
|
-
if (cleanFn != null && typeof cleanFn !== "function") {
|
266707
|
-
throw new ValidationError4("useEffect return value must be a cleanup function or nothing.");
|
266708
|
-
}
|
266709
|
-
store.hooksCleanup[index] = cleanFn;
|
266710
|
-
});
|
266711
|
-
},
|
266712
|
-
run() {
|
266713
|
-
const store = getStore4();
|
266714
|
-
withUpdates4(() => {
|
266715
|
-
store.hooksEffect.forEach((effect) => {
|
266716
|
-
effect();
|
266717
|
-
});
|
266718
|
-
store.hooksEffect.length = 0;
|
266719
|
-
})();
|
266720
|
-
},
|
266721
|
-
clearAll() {
|
266722
|
-
const store = getStore4();
|
266723
|
-
store.hooksCleanup.forEach((cleanFn) => {
|
266724
|
-
cleanFn?.();
|
266725
|
-
});
|
266726
|
-
store.hooksEffect.length = 0;
|
266727
|
-
store.hooksCleanup.length = 0;
|
266728
|
-
}
|
266729
|
-
};
|
266730
|
-
|
266731
|
-
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/use-state.js
|
266732
|
-
function useState4(defaultValue) {
|
266733
|
-
return withPointer4((pointer) => {
|
266734
|
-
const setFn = (newValue) => {
|
266735
|
-
if (pointer.get() !== newValue) {
|
266736
|
-
pointer.set(newValue);
|
266737
|
-
handleChange4();
|
266738
|
-
}
|
266739
|
-
};
|
266740
|
-
if (pointer.initialized) {
|
266741
|
-
return [pointer.get(), setFn];
|
266742
|
-
}
|
266743
|
-
const value4 = typeof defaultValue === "function" ? defaultValue() : defaultValue;
|
266744
|
-
pointer.set(value4);
|
266745
|
-
return [value4, setFn];
|
266746
|
-
});
|
266747
|
-
}
|
266748
|
-
|
266749
|
-
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/use-effect.js
|
266750
|
-
function useEffect4(cb, depArray) {
|
266751
|
-
withPointer4((pointer) => {
|
266752
|
-
const oldDeps = pointer.get();
|
266753
|
-
const hasChanged = !Array.isArray(oldDeps) || depArray.some((dep, i6) => !Object.is(dep, oldDeps[i6]));
|
266754
|
-
if (hasChanged) {
|
266755
|
-
effectScheduler4.queue(cb);
|
266756
|
-
}
|
266757
|
-
pointer.set(depArray);
|
266758
|
-
});
|
266759
|
-
}
|
266760
|
-
|
266761
|
-
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/theme.js
|
266762
|
-
var import_yoctocolors_cjs6 = __toESM(require_yoctocolors_cjs(), 1);
|
266763
|
-
var defaultTheme4 = {
|
266764
|
-
prefix: {
|
266765
|
-
idle: import_yoctocolors_cjs6.default.blue("?"),
|
266766
|
-
done: import_yoctocolors_cjs6.default.green(esm_default.tick)
|
266767
|
-
},
|
266768
|
-
spinner: {
|
266769
|
-
interval: 80,
|
266770
|
-
frames: ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"].map((frame) => import_yoctocolors_cjs6.default.yellow(frame))
|
266771
|
-
},
|
266772
|
-
style: {
|
266773
|
-
answer: import_yoctocolors_cjs6.default.cyan,
|
266774
|
-
message: import_yoctocolors_cjs6.default.bold,
|
266775
|
-
error: (text2) => import_yoctocolors_cjs6.default.red(`> ${text2}`),
|
266776
|
-
defaultAnswer: (text2) => import_yoctocolors_cjs6.default.dim(`(${text2})`),
|
266777
|
-
help: import_yoctocolors_cjs6.default.dim,
|
266778
|
-
highlight: import_yoctocolors_cjs6.default.cyan,
|
266779
|
-
key: (text2) => import_yoctocolors_cjs6.default.cyan(import_yoctocolors_cjs6.default.bold(`<${text2}>`))
|
266780
|
-
}
|
266781
|
-
};
|
266782
|
-
|
266783
|
-
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/make-theme.js
|
266784
|
-
function isPlainObject5(value4) {
|
266785
|
-
if (typeof value4 !== "object" || value4 === null)
|
266786
|
-
return false;
|
266787
|
-
let proto = value4;
|
266788
|
-
while (Object.getPrototypeOf(proto) !== null) {
|
266789
|
-
proto = Object.getPrototypeOf(proto);
|
266790
|
-
}
|
266791
|
-
return Object.getPrototypeOf(value4) === proto;
|
266792
|
-
}
|
266793
|
-
function deepMerge5(...objects) {
|
266794
|
-
const output = {};
|
266795
|
-
for (const obj of objects) {
|
266796
|
-
for (const [key4, value4] of Object.entries(obj)) {
|
266797
|
-
const prevValue = output[key4];
|
266798
|
-
output[key4] = isPlainObject5(prevValue) && isPlainObject5(value4) ? deepMerge5(prevValue, value4) : value4;
|
266799
|
-
}
|
266800
|
-
}
|
266801
|
-
return output;
|
266802
|
-
}
|
266803
|
-
function makeTheme4(...themes) {
|
266804
|
-
const themesToMerge = [
|
266805
|
-
defaultTheme4,
|
266806
|
-
...themes.filter((theme) => theme != null)
|
266807
|
-
];
|
266808
|
-
return deepMerge5(...themesToMerge);
|
266809
|
-
}
|
266810
|
-
|
266811
|
-
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/use-prefix.js
|
266812
|
-
function usePrefix4({ status = "idle", theme }) {
|
266813
|
-
const [showLoader, setShowLoader] = useState4(false);
|
266814
|
-
const [tick, setTick] = useState4(0);
|
266815
|
-
const { prefix, spinner: spinner2 } = makeTheme4(theme);
|
266816
|
-
useEffect4(() => {
|
266817
|
-
if (status === "loading") {
|
266818
|
-
let tickInterval;
|
266819
|
-
let inc = -1;
|
266820
|
-
const delayTimeout = setTimeout(AsyncResource11.bind(() => {
|
266821
|
-
setShowLoader(true);
|
266822
|
-
tickInterval = setInterval(AsyncResource11.bind(() => {
|
266823
|
-
inc = inc + 1;
|
266824
|
-
setTick(inc % spinner2.frames.length);
|
266825
|
-
}), spinner2.interval);
|
266826
|
-
}), 300);
|
266827
|
-
return () => {
|
266828
|
-
clearTimeout(delayTimeout);
|
266829
|
-
clearInterval(tickInterval);
|
266830
|
-
};
|
266831
|
-
} else {
|
266832
|
-
setShowLoader(false);
|
266833
|
-
}
|
266834
|
-
}, [status]);
|
266835
|
-
if (showLoader) {
|
266836
|
-
return spinner2.frames[tick];
|
266837
|
-
}
|
266838
|
-
const iconName = status === "loading" ? "idle" : status;
|
266839
|
-
return typeof prefix === "string" ? prefix : prefix[iconName] ?? prefix["idle"];
|
266840
|
-
}
|
266841
|
-
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/use-ref.js
|
266842
|
-
function useRef4(val) {
|
266843
|
-
return useState4({ current: val })[0];
|
266844
|
-
}
|
266845
|
-
|
266846
|
-
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/use-keypress.js
|
266847
|
-
function useKeypress4(userHandler) {
|
266848
|
-
const signal = useRef4(userHandler);
|
266849
|
-
signal.current = userHandler;
|
266850
|
-
useEffect4((rl) => {
|
266851
|
-
let ignore = false;
|
266852
|
-
const handler = withUpdates4((_input, event) => {
|
266853
|
-
if (ignore)
|
266854
|
-
return;
|
266855
|
-
signal.current(event, rl);
|
266856
|
-
});
|
266857
|
-
rl.input.on("keypress", handler);
|
266858
|
-
return () => {
|
266859
|
-
ignore = true;
|
266860
|
-
rl.input.removeListener("keypress", handler);
|
266861
|
-
};
|
266862
|
-
}, []);
|
266863
|
-
}
|
266864
|
-
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/utils.js
|
266865
|
-
var import_cli_width4 = __toESM(require_cli_width(), 1);
|
266866
|
-
var import_wrap_ansi4 = __toESM(require_wrap_ansi(), 1);
|
266867
|
-
function breakLines4(content, width) {
|
266868
|
-
return content.split(`
|
266869
|
-
`).flatMap((line) => import_wrap_ansi4.default(line, width, { trim: false, hard: true }).split(`
|
266870
|
-
`).map((str) => str.trimEnd())).join(`
|
266871
|
-
`);
|
266872
|
-
}
|
266873
|
-
function readlineWidth4() {
|
266874
|
-
return import_cli_width4.default({ defaultWidth: 80, output: readline7().output });
|
266875
|
-
}
|
266876
|
-
|
266877
|
-
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
|
266878
|
-
var import_mute_stream4 = __toESM(require_lib(), 1);
|
266879
|
-
import * as readline8 from "node:readline";
|
266880
|
-
import { AsyncResource as AsyncResource12 } from "node:async_hooks";
|
266881
|
-
|
266882
|
-
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/screen-manager.js
|
266883
|
-
var import_ansi_escapes5 = __toESM(require_ansi_escapes(), 1);
|
266884
|
-
import { stripVTControlCharacters as stripVTControlCharacters5 } from "node:util";
|
266885
|
-
var height4 = (content) => content.split(`
|
266886
|
-
`).length;
|
266887
|
-
var lastLine4 = (content) => content.split(`
|
266888
|
-
`).pop() ?? "";
|
266889
|
-
function cursorDown4(n6) {
|
266890
|
-
return n6 > 0 ? import_ansi_escapes5.default.cursorDown(n6) : "";
|
266891
|
-
}
|
266892
|
-
|
266893
|
-
class ScreenManager4 {
|
266894
|
-
height = 0;
|
266895
|
-
extraLinesUnderPrompt = 0;
|
266896
|
-
cursorPos;
|
266897
|
-
rl;
|
266898
|
-
constructor(rl) {
|
266899
|
-
this.rl = rl;
|
266900
|
-
this.cursorPos = rl.getCursorPos();
|
266901
|
-
}
|
266902
|
-
write(content) {
|
266903
|
-
this.rl.output.unmute();
|
266904
|
-
this.rl.output.write(content);
|
266905
|
-
this.rl.output.mute();
|
266906
|
-
}
|
266907
|
-
render(content, bottomContent = "") {
|
266908
|
-
const promptLine = lastLine4(content);
|
266909
|
-
const rawPromptLine = stripVTControlCharacters5(promptLine);
|
266910
|
-
let prompt = rawPromptLine;
|
266911
|
-
if (this.rl.line.length > 0) {
|
266912
|
-
prompt = prompt.slice(0, -this.rl.line.length);
|
266913
|
-
}
|
266914
|
-
this.rl.setPrompt(prompt);
|
266915
|
-
this.cursorPos = this.rl.getCursorPos();
|
266916
|
-
const width = readlineWidth4();
|
266917
|
-
content = breakLines4(content, width);
|
266918
|
-
bottomContent = breakLines4(bottomContent, width);
|
266919
|
-
if (rawPromptLine.length % width === 0) {
|
266920
|
-
content += `
|
266921
|
-
`;
|
266922
|
-
}
|
266923
|
-
let output = content + (bottomContent ? `
|
266924
|
-
` + bottomContent : "");
|
266925
|
-
const promptLineUpDiff = Math.floor(rawPromptLine.length / width) - this.cursorPos.rows;
|
266926
|
-
const bottomContentHeight = promptLineUpDiff + (bottomContent ? height4(bottomContent) : 0);
|
266927
|
-
if (bottomContentHeight > 0)
|
266928
|
-
output += import_ansi_escapes5.default.cursorUp(bottomContentHeight);
|
266929
|
-
output += import_ansi_escapes5.default.cursorTo(this.cursorPos.cols);
|
266930
|
-
this.write(cursorDown4(this.extraLinesUnderPrompt) + import_ansi_escapes5.default.eraseLines(this.height) + output);
|
266931
|
-
this.extraLinesUnderPrompt = bottomContentHeight;
|
266932
|
-
this.height = height4(output);
|
266933
|
-
}
|
266934
|
-
checkCursorPos() {
|
266935
|
-
const cursorPos = this.rl.getCursorPos();
|
266936
|
-
if (cursorPos.cols !== this.cursorPos.cols) {
|
266937
|
-
this.write(import_ansi_escapes5.default.cursorTo(cursorPos.cols));
|
266938
|
-
this.cursorPos = cursorPos;
|
266939
|
-
}
|
266940
|
-
}
|
266941
|
-
done({ clearContent }) {
|
266942
|
-
this.rl.setPrompt("");
|
266943
|
-
let output = cursorDown4(this.extraLinesUnderPrompt);
|
266944
|
-
output += clearContent ? import_ansi_escapes5.default.eraseLines(this.height) : `
|
266945
|
-
`;
|
266946
|
-
output += import_ansi_escapes5.default.cursorShow;
|
266947
|
-
this.write(output);
|
266948
|
-
this.rl.close();
|
266949
|
-
}
|
266950
|
-
}
|
266951
|
-
|
266952
|
-
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/promise-polyfill.js
|
266953
|
-
class PromisePolyfill4 extends Promise {
|
266954
|
-
static withResolver() {
|
266955
|
-
let resolve6;
|
266956
|
-
let reject;
|
266957
|
-
const promise = new Promise((res, rej) => {
|
266958
|
-
resolve6 = res;
|
266959
|
-
reject = rej;
|
266960
|
-
});
|
266961
|
-
return { promise, resolve: resolve6, reject };
|
266962
|
-
}
|
266963
|
-
}
|
266964
|
-
|
266965
|
-
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
|
266966
|
-
function getCallSites4() {
|
266967
|
-
const _prepareStackTrace = Error.prepareStackTrace;
|
266968
|
-
let result = [];
|
266969
|
-
try {
|
266970
|
-
Error.prepareStackTrace = (_5, callSites) => {
|
266971
|
-
const callSitesWithoutCurrent = callSites.slice(1);
|
266972
|
-
result = callSitesWithoutCurrent;
|
266973
|
-
return callSitesWithoutCurrent;
|
266974
|
-
};
|
266975
|
-
new Error().stack;
|
266976
|
-
} catch {
|
266977
|
-
return result;
|
266978
|
-
}
|
266979
|
-
Error.prepareStackTrace = _prepareStackTrace;
|
266980
|
-
return result;
|
266981
|
-
}
|
266982
|
-
function createPrompt4(view) {
|
266983
|
-
const callSites = getCallSites4();
|
266984
|
-
const prompt = (config3, context = {}) => {
|
266985
|
-
const { input = process.stdin, signal } = context;
|
266986
|
-
const cleanups = new Set;
|
266987
|
-
const output = new import_mute_stream4.default;
|
266988
|
-
output.pipe(context.output ?? process.stdout);
|
266989
|
-
const rl = readline8.createInterface({
|
266990
|
-
terminal: true,
|
266991
|
-
input,
|
266992
|
-
output
|
266993
|
-
});
|
266994
|
-
const screen = new ScreenManager4(rl);
|
266995
|
-
const { promise, resolve: resolve6, reject } = PromisePolyfill4.withResolver();
|
266996
|
-
const cancel3 = () => reject(new CancelPromptError4);
|
266997
|
-
if (signal) {
|
266998
|
-
const abort = () => reject(new AbortPromptError4({ cause: signal.reason }));
|
266999
|
-
if (signal.aborted) {
|
267000
|
-
abort();
|
267001
|
-
return Object.assign(promise, { cancel: cancel3 });
|
267002
|
-
}
|
267003
|
-
signal.addEventListener("abort", abort);
|
267004
|
-
cleanups.add(() => signal.removeEventListener("abort", abort));
|
267005
|
-
}
|
267006
|
-
cleanups.add(onExit((code2, signal2) => {
|
267007
|
-
reject(new ExitPromptError4(`User force closed the prompt with ${code2} ${signal2}`));
|
267008
|
-
}));
|
267009
|
-
const checkCursorPos = () => screen.checkCursorPos();
|
267010
|
-
rl.input.on("keypress", checkCursorPos);
|
267011
|
-
cleanups.add(() => rl.input.removeListener("keypress", checkCursorPos));
|
267012
|
-
return withHooks4(rl, (cycle) => {
|
267013
|
-
const hooksCleanup = AsyncResource12.bind(() => effectScheduler4.clearAll());
|
267014
|
-
rl.on("close", hooksCleanup);
|
267015
|
-
cleanups.add(() => rl.removeListener("close", hooksCleanup));
|
267016
|
-
cycle(() => {
|
267017
|
-
try {
|
267018
|
-
const nextView = view(config3, (value4) => {
|
267019
|
-
setImmediate(() => resolve6(value4));
|
267020
|
-
});
|
267021
|
-
if (nextView === undefined) {
|
267022
|
-
const callerFilename = callSites[1]?.getFileName?.();
|
267023
|
-
throw new Error(`Prompt functions must return a string.
|
267024
|
-
at ${callerFilename}`);
|
267025
|
-
}
|
267026
|
-
const [content, bottomContent] = typeof nextView === "string" ? [nextView] : nextView;
|
267027
|
-
screen.render(content, bottomContent);
|
267028
|
-
effectScheduler4.run();
|
267029
|
-
} catch (error5) {
|
267030
|
-
reject(error5);
|
267031
|
-
}
|
267032
|
-
});
|
267033
|
-
return Object.assign(promise.then((answer) => {
|
267034
|
-
effectScheduler4.clearAll();
|
267035
|
-
return answer;
|
267036
|
-
}, (error5) => {
|
267037
|
-
effectScheduler4.clearAll();
|
267038
|
-
throw error5;
|
267039
|
-
}).finally(() => {
|
267040
|
-
cleanups.forEach((cleanup) => cleanup());
|
267041
|
-
screen.done({ clearContent: Boolean(context.clearPromptOnDone) });
|
267042
|
-
output.end();
|
267043
|
-
}).then(() => promise), { cancel: cancel3 });
|
267044
|
-
});
|
267045
|
-
};
|
267046
|
-
return prompt;
|
267047
|
-
}
|
267048
266146
|
// ../../node_modules/@inquirer/password/dist/esm/index.js
|
267049
|
-
var
|
267050
|
-
var esm_default5 =
|
266147
|
+
var import_ansi_escapes4 = __toESM(require_ansi_escapes(), 1);
|
266148
|
+
var esm_default5 = createPrompt((config3, done) => {
|
267051
266149
|
const { validate: validate3 = () => true } = config3;
|
267052
|
-
const theme =
|
267053
|
-
const [status, setStatus] =
|
267054
|
-
const [errorMsg, setError] =
|
267055
|
-
const [value4, setValue] =
|
267056
|
-
const prefix =
|
267057
|
-
|
266150
|
+
const theme = makeTheme(config3.theme);
|
266151
|
+
const [status, setStatus] = useState("idle");
|
266152
|
+
const [errorMsg, setError] = useState();
|
266153
|
+
const [value4, setValue] = useState("");
|
266154
|
+
const prefix = usePrefix({ status, theme });
|
266155
|
+
useKeypress(async (key3, rl) => {
|
267058
266156
|
if (status !== "idle") {
|
267059
266157
|
return;
|
267060
266158
|
}
|
267061
|
-
if (
|
266159
|
+
if (isEnterKey(key3)) {
|
267062
266160
|
const answer = value4;
|
267063
266161
|
setStatus("loading");
|
267064
266162
|
const isValid2 = await validate3(answer);
|
@@ -267083,7 +266181,7 @@ var esm_default5 = createPrompt4((config3, done) => {
|
|
267083
266181
|
const maskChar = typeof config3.mask === "string" ? config3.mask : "*";
|
267084
266182
|
formattedValue = maskChar.repeat(value4.length);
|
267085
266183
|
} else if (status !== "done") {
|
267086
|
-
helpTip = `${theme.style.help("[input is masked]")}${
|
266184
|
+
helpTip = `${theme.style.help("[input is masked]")}${import_ansi_escapes4.default.cursorHide}`;
|
267087
266185
|
}
|
267088
266186
|
if (status === "done") {
|
267089
266187
|
formattedValue = theme.style.answer(formattedValue);
|
@@ -268171,7 +267269,7 @@ var basename2 = function(p6, extension) {
|
|
268171
267269
|
return extension && lastSegment.endsWith(extension) ? lastSegment.slice(0, -extension.length) : lastSegment;
|
268172
267270
|
};
|
268173
267271
|
// ../../node_modules/defu/dist/defu.mjs
|
268174
|
-
function
|
267272
|
+
function isPlainObject4(value4) {
|
268175
267273
|
if (value4 === null || typeof value4 !== "object") {
|
268176
267274
|
return false;
|
268177
267275
|
}
|
@@ -268188,27 +267286,27 @@ function isPlainObject6(value4) {
|
|
268188
267286
|
return true;
|
268189
267287
|
}
|
268190
267288
|
function _defu(baseObject, defaults2, namespace = ".", merger) {
|
268191
|
-
if (!
|
267289
|
+
if (!isPlainObject4(defaults2)) {
|
268192
267290
|
return _defu(baseObject, {}, namespace, merger);
|
268193
267291
|
}
|
268194
267292
|
const object = Object.assign({}, defaults2);
|
268195
|
-
for (const
|
268196
|
-
if (
|
267293
|
+
for (const key3 in baseObject) {
|
267294
|
+
if (key3 === "__proto__" || key3 === "constructor") {
|
268197
267295
|
continue;
|
268198
267296
|
}
|
268199
|
-
const value4 = baseObject[
|
267297
|
+
const value4 = baseObject[key3];
|
268200
267298
|
if (value4 === null || value4 === undefined) {
|
268201
267299
|
continue;
|
268202
267300
|
}
|
268203
|
-
if (merger && merger(object,
|
267301
|
+
if (merger && merger(object, key3, value4, namespace)) {
|
268204
267302
|
continue;
|
268205
267303
|
}
|
268206
|
-
if (Array.isArray(value4) && Array.isArray(object[
|
268207
|
-
object[
|
268208
|
-
} else if (
|
268209
|
-
object[
|
267304
|
+
if (Array.isArray(value4) && Array.isArray(object[key3])) {
|
267305
|
+
object[key3] = [...value4, ...object[key3]];
|
267306
|
+
} else if (isPlainObject4(value4) && isPlainObject4(object[key3])) {
|
267307
|
+
object[key3] = _defu(value4, object[key3], (namespace ? `${namespace}.` : "") + key3.toString(), merger);
|
268210
267308
|
} else {
|
268211
|
-
object[
|
267309
|
+
object[key3] = value4;
|
268212
267310
|
}
|
268213
267311
|
}
|
268214
267312
|
return object;
|
@@ -268217,15 +267315,15 @@ function createDefu(merger) {
|
|
268217
267315
|
return (...arguments_4) => arguments_4.reduce((p6, c3) => _defu(p6, c3, "", merger), {});
|
268218
267316
|
}
|
268219
267317
|
var defu = createDefu();
|
268220
|
-
var defuFn = createDefu((object,
|
268221
|
-
if (object[
|
268222
|
-
object[
|
267318
|
+
var defuFn = createDefu((object, key3, currentValue) => {
|
267319
|
+
if (object[key3] !== undefined && typeof currentValue === "function") {
|
267320
|
+
object[key3] = currentValue(object[key3]);
|
268223
267321
|
return true;
|
268224
267322
|
}
|
268225
267323
|
});
|
268226
|
-
var defuArrayFn = createDefu((object,
|
268227
|
-
if (Array.isArray(object[
|
268228
|
-
object[
|
267324
|
+
var defuArrayFn = createDefu((object, key3, currentValue) => {
|
267325
|
+
if (Array.isArray(object[key3]) && typeof currentValue === "function") {
|
267326
|
+
object[key3] = currentValue(object[key3]);
|
268229
267327
|
return true;
|
268230
267328
|
}
|
268231
267329
|
});
|
@@ -270926,11 +270024,11 @@ function cacheDirectory() {
|
|
270926
270024
|
}
|
270927
270025
|
function normalizeHeaders(headers = {}) {
|
270928
270026
|
const normalized = {};
|
270929
|
-
for (const [
|
270027
|
+
for (const [key3, value4] of Object.entries(headers)) {
|
270930
270028
|
if (!value4) {
|
270931
270029
|
continue;
|
270932
270030
|
}
|
270933
|
-
normalized[
|
270031
|
+
normalized[key3.toLowerCase()] = value4;
|
270934
270032
|
}
|
270935
270033
|
return normalized;
|
270936
270034
|
}
|
@@ -273173,7 +272271,7 @@ function jsonOutput(data) {
|
|
273173
272271
|
var composer = require_composer();
|
273174
272272
|
var Document = require_Document();
|
273175
272273
|
var Schema = require_Schema();
|
273176
|
-
var
|
272274
|
+
var errors3 = require_errors3();
|
273177
272275
|
var Alias = require_Alias();
|
273178
272276
|
var identity2 = require_identity();
|
273179
272277
|
var Pair = require_Pair();
|
@@ -273189,9 +272287,9 @@ var visit2 = require_visit();
|
|
273189
272287
|
var $Composer = composer.Composer;
|
273190
272288
|
var $Document = Document.Document;
|
273191
272289
|
var $Schema = Schema.Schema;
|
273192
|
-
var $YAMLError =
|
273193
|
-
var $YAMLParseError =
|
273194
|
-
var $YAMLWarning =
|
272290
|
+
var $YAMLError = errors3.YAMLError;
|
272291
|
+
var $YAMLParseError = errors3.YAMLParseError;
|
272292
|
+
var $YAMLWarning = errors3.YAMLWarning;
|
273195
272293
|
var $Alias = Alias.Alias;
|
273196
272294
|
var $isAlias = identity2.isAlias;
|
273197
272295
|
var $isCollection = identity2.isCollection;
|
@@ -273539,7 +272637,7 @@ async function getServicesAndMapResults({
|
|
273539
272637
|
const application = await settlemint.application.read(applicationUniqueName);
|
273540
272638
|
const services = await servicesSpinner(settlemint, applicationUniqueName, types2);
|
273541
272639
|
const results = (types2 ?? SERVICE_TYPES).filter((serviceType) => !types2 || types2.includes(serviceType)).map((serviceType) => {
|
273542
|
-
const [_6, labels] = Object.entries(LABELS_MAP).find(([
|
272640
|
+
const [_6, labels] = Object.entries(LABELS_MAP).find(([key3, value4]) => value4.command === serviceType) ?? [
|
273543
272641
|
null,
|
273544
272642
|
{ plural: serviceType }
|
273545
272643
|
];
|
@@ -273767,11 +272865,11 @@ function createCommand4() {
|
|
273767
272865
|
|
273768
272866
|
// src/utils/commands/passthrough-options.ts
|
273769
272867
|
function mapPassthroughOptions(options, command) {
|
273770
|
-
const optionArgs = Object.entries(options).map(([
|
272868
|
+
const optionArgs = Object.entries(options).map(([key3, value4]) => {
|
273771
272869
|
if (value4 === true) {
|
273772
|
-
return `--${
|
272870
|
+
return `--${key3}`;
|
273773
272871
|
}
|
273774
|
-
return `--${
|
272872
|
+
return `--${key3}=${value4}`;
|
273775
272873
|
});
|
273776
272874
|
return [...optionArgs, ...command.args];
|
273777
272875
|
}
|
@@ -274782,4 +273880,4 @@ async function sdkCliCommand(argv = process.argv) {
|
|
274782
273880
|
// src/cli.ts
|
274783
273881
|
sdkCliCommand();
|
274784
273882
|
|
274785
|
-
//# debugId=
|
273883
|
+
//# debugId=7BF399762D56F2B364756E2164756E21
|