@settlemint/sdk-cli 2.0.0-prae2ddec7 → 2.0.0-prcdfe8bfe
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 +515 -968
- package/dist/cli.js.map +3 -17
- package/package.json +4 -4
package/dist/cli.js
CHANGED
@@ -232122,8 +232122,8 @@ var require_lib13 = __commonJS((exports, module) => {
|
|
232122
232122
|
function fetch2(input, options) {
|
232123
232123
|
return nodeFetch.fetch(input, options);
|
232124
232124
|
}
|
232125
|
-
for (const
|
232126
|
-
fetch2[
|
232125
|
+
for (const key4 in nodeFetch) {
|
232126
|
+
fetch2[key4] = nodeFetch[key4];
|
232127
232127
|
}
|
232128
232128
|
module.exports = fetch2;
|
232129
232129
|
});
|
@@ -232216,11 +232216,11 @@ var require_proxy = __commonJS((exports) => {
|
|
232216
232216
|
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;
|
232217
232217
|
}
|
232218
232218
|
e10(requireSymbols$4, "requireSymbols$4");
|
232219
|
-
var
|
232219
|
+
var errors4;
|
232220
232220
|
var hasRequiredErrors;
|
232221
232221
|
function requireErrors() {
|
232222
232222
|
if (hasRequiredErrors)
|
232223
|
-
return
|
232223
|
+
return errors4;
|
232224
232224
|
hasRequiredErrors = 1;
|
232225
232225
|
|
232226
232226
|
class A5 extends Error {
|
@@ -232429,7 +232429,7 @@ var require_proxy = __commonJS((exports) => {
|
|
232429
232429
|
super(i6, { cause: k5, ...F3 ?? {} }), this.name = "SecureProxyConnectionError", this.message = i6 || "Secure Proxy Connection failed", this.code = "UND_ERR_PRX_TLS", this.cause = k5;
|
232430
232430
|
}
|
232431
232431
|
}
|
232432
|
-
return
|
232432
|
+
return errors4 = { AbortError: Q4, HTTPParserError: Y4, UndiciError: A5, HeadersTimeoutError: c3, HeadersOverflowError: E6, BodyTimeoutError: t8, RequestContentLengthMismatchError: r6, ConnectTimeoutError: p6, ResponseStatusCodeError: B4, InvalidArgumentError: f5, InvalidReturnValueError: l3, RequestAbortedError: u6, ClientDestroyedError: a7, ClientClosedError: g5, InformationalError: n6, SocketError: d6, NotSupportedError: N7, ResponseContentLengthMismatchError: o8, BalancedPoolMissingUpstreamError: M5, ResponseExceededMaxSizeError: J4, RequestRetryError: V5, ResponseError: H4, SecureProxyConnectionError: h8 }, errors4;
|
232433
232433
|
}
|
232434
232434
|
e10(requireErrors, "requireErrors");
|
232435
232435
|
var constants$4;
|
@@ -242380,11 +242380,11 @@ var require_visit = __commonJS((exports) => {
|
|
242380
242380
|
visit2.BREAK = BREAK;
|
242381
242381
|
visit2.SKIP = SKIP;
|
242382
242382
|
visit2.REMOVE = REMOVE;
|
242383
|
-
function visit_(
|
242384
|
-
const ctrl = callVisitor(
|
242383
|
+
function visit_(key4, node, visitor, path6) {
|
242384
|
+
const ctrl = callVisitor(key4, node, visitor, path6);
|
242385
242385
|
if (identity2.isNode(ctrl) || identity2.isPair(ctrl)) {
|
242386
|
-
replaceNode(
|
242387
|
-
return visit_(
|
242386
|
+
replaceNode(key4, path6, ctrl);
|
242387
|
+
return visit_(key4, ctrl, visitor, path6);
|
242388
242388
|
}
|
242389
242389
|
if (typeof ctrl !== "symbol") {
|
242390
242390
|
if (identity2.isCollection(node)) {
|
@@ -242428,11 +242428,11 @@ var require_visit = __commonJS((exports) => {
|
|
242428
242428
|
visitAsync.BREAK = BREAK;
|
242429
242429
|
visitAsync.SKIP = SKIP;
|
242430
242430
|
visitAsync.REMOVE = REMOVE;
|
242431
|
-
async function visitAsync_(
|
242432
|
-
const ctrl = await callVisitor(
|
242431
|
+
async function visitAsync_(key4, node, visitor, path6) {
|
242432
|
+
const ctrl = await callVisitor(key4, node, visitor, path6);
|
242433
242433
|
if (identity2.isNode(ctrl) || identity2.isPair(ctrl)) {
|
242434
|
-
replaceNode(
|
242435
|
-
return visitAsync_(
|
242434
|
+
replaceNode(key4, path6, ctrl);
|
242435
|
+
return visitAsync_(key4, ctrl, visitor, path6);
|
242436
242436
|
}
|
242437
242437
|
if (typeof ctrl !== "symbol") {
|
242438
242438
|
if (identity2.isCollection(node)) {
|
@@ -242482,27 +242482,27 @@ var require_visit = __commonJS((exports) => {
|
|
242482
242482
|
}
|
242483
242483
|
return visitor;
|
242484
242484
|
}
|
242485
|
-
function callVisitor(
|
242485
|
+
function callVisitor(key4, node, visitor, path6) {
|
242486
242486
|
if (typeof visitor === "function")
|
242487
|
-
return visitor(
|
242487
|
+
return visitor(key4, node, path6);
|
242488
242488
|
if (identity2.isMap(node))
|
242489
|
-
return visitor.Map?.(
|
242489
|
+
return visitor.Map?.(key4, node, path6);
|
242490
242490
|
if (identity2.isSeq(node))
|
242491
|
-
return visitor.Seq?.(
|
242491
|
+
return visitor.Seq?.(key4, node, path6);
|
242492
242492
|
if (identity2.isPair(node))
|
242493
|
-
return visitor.Pair?.(
|
242493
|
+
return visitor.Pair?.(key4, node, path6);
|
242494
242494
|
if (identity2.isScalar(node))
|
242495
|
-
return visitor.Scalar?.(
|
242495
|
+
return visitor.Scalar?.(key4, node, path6);
|
242496
242496
|
if (identity2.isAlias(node))
|
242497
|
-
return visitor.Alias?.(
|
242497
|
+
return visitor.Alias?.(key4, node, path6);
|
242498
242498
|
return;
|
242499
242499
|
}
|
242500
|
-
function replaceNode(
|
242500
|
+
function replaceNode(key4, path6, node) {
|
242501
242501
|
const parent = path6[path6.length - 1];
|
242502
242502
|
if (identity2.isCollection(parent)) {
|
242503
|
-
parent.items[
|
242503
|
+
parent.items[key4] = node;
|
242504
242504
|
} else if (identity2.isPair(parent)) {
|
242505
|
-
if (
|
242505
|
+
if (key4 === "key")
|
242506
242506
|
parent.key = node;
|
242507
242507
|
else
|
242508
242508
|
parent.value = node;
|
@@ -242734,7 +242734,7 @@ var require_anchors = __commonJS((exports) => {
|
|
242734
242734
|
|
242735
242735
|
// ../../node_modules/yaml/dist/doc/applyReviver.js
|
242736
242736
|
var require_applyReviver = __commonJS((exports) => {
|
242737
|
-
function applyReviver(reviver, obj,
|
242737
|
+
function applyReviver(reviver, obj, key4, val) {
|
242738
242738
|
if (val && typeof val === "object") {
|
242739
242739
|
if (Array.isArray(val)) {
|
242740
242740
|
for (let i7 = 0, len = val.length;i7 < len; ++i7) {
|
@@ -242774,7 +242774,7 @@ var require_applyReviver = __commonJS((exports) => {
|
|
242774
242774
|
}
|
242775
242775
|
}
|
242776
242776
|
}
|
242777
|
-
return reviver.call(obj,
|
242777
|
+
return reviver.call(obj, key4, val);
|
242778
242778
|
}
|
242779
242779
|
exports.applyReviver = applyReviver;
|
242780
242780
|
});
|
@@ -243092,29 +243092,29 @@ var require_Collection = __commonJS((exports) => {
|
|
243092
243092
|
if (isEmptyPath(path6))
|
243093
243093
|
this.add(value4);
|
243094
243094
|
else {
|
243095
|
-
const [
|
243096
|
-
const node = this.get(
|
243095
|
+
const [key4, ...rest] = path6;
|
243096
|
+
const node = this.get(key4, true);
|
243097
243097
|
if (identity2.isCollection(node))
|
243098
243098
|
node.addIn(rest, value4);
|
243099
243099
|
else if (node === undefined && this.schema)
|
243100
|
-
this.set(
|
243100
|
+
this.set(key4, collectionFromPath(this.schema, rest, value4));
|
243101
243101
|
else
|
243102
|
-
throw new Error(`Expected YAML collection at ${
|
243102
|
+
throw new Error(`Expected YAML collection at ${key4}. Remaining path: ${rest}`);
|
243103
243103
|
}
|
243104
243104
|
}
|
243105
243105
|
deleteIn(path6) {
|
243106
|
-
const [
|
243106
|
+
const [key4, ...rest] = path6;
|
243107
243107
|
if (rest.length === 0)
|
243108
|
-
return this.delete(
|
243109
|
-
const node = this.get(
|
243108
|
+
return this.delete(key4);
|
243109
|
+
const node = this.get(key4, true);
|
243110
243110
|
if (identity2.isCollection(node))
|
243111
243111
|
return node.deleteIn(rest);
|
243112
243112
|
else
|
243113
|
-
throw new Error(`Expected YAML collection at ${
|
243113
|
+
throw new Error(`Expected YAML collection at ${key4}. Remaining path: ${rest}`);
|
243114
243114
|
}
|
243115
243115
|
getIn(path6, keepScalar) {
|
243116
|
-
const [
|
243117
|
-
const node = this.get(
|
243116
|
+
const [key4, ...rest] = path6;
|
243117
|
+
const node = this.get(key4, true);
|
243118
243118
|
if (rest.length === 0)
|
243119
243119
|
return !keepScalar && identity2.isScalar(node) ? node.value : node;
|
243120
243120
|
else
|
@@ -243129,24 +243129,24 @@ var require_Collection = __commonJS((exports) => {
|
|
243129
243129
|
});
|
243130
243130
|
}
|
243131
243131
|
hasIn(path6) {
|
243132
|
-
const [
|
243132
|
+
const [key4, ...rest] = path6;
|
243133
243133
|
if (rest.length === 0)
|
243134
|
-
return this.has(
|
243135
|
-
const node = this.get(
|
243134
|
+
return this.has(key4);
|
243135
|
+
const node = this.get(key4, true);
|
243136
243136
|
return identity2.isCollection(node) ? node.hasIn(rest) : false;
|
243137
243137
|
}
|
243138
243138
|
setIn(path6, value4) {
|
243139
|
-
const [
|
243139
|
+
const [key4, ...rest] = path6;
|
243140
243140
|
if (rest.length === 0) {
|
243141
|
-
this.set(
|
243141
|
+
this.set(key4, value4);
|
243142
243142
|
} else {
|
243143
|
-
const node = this.get(
|
243143
|
+
const node = this.get(key4, true);
|
243144
243144
|
if (identity2.isCollection(node))
|
243145
243145
|
node.setIn(rest, value4);
|
243146
243146
|
else if (node === undefined && this.schema)
|
243147
|
-
this.set(
|
243147
|
+
this.set(key4, collectionFromPath(this.schema, rest, value4));
|
243148
243148
|
else
|
243149
|
-
throw new Error(`Expected YAML collection at ${
|
243149
|
+
throw new Error(`Expected YAML collection at ${key4}. Remaining path: ${rest}`);
|
243150
243150
|
}
|
243151
243151
|
}
|
243152
243152
|
}
|
@@ -243734,19 +243734,19 @@ var require_stringifyPair = __commonJS((exports) => {
|
|
243734
243734
|
var Scalar = require_Scalar();
|
243735
243735
|
var stringify3 = require_stringify();
|
243736
243736
|
var stringifyComment = require_stringifyComment();
|
243737
|
-
function stringifyPair2({ key:
|
243737
|
+
function stringifyPair2({ key: key4, value: value4 }, ctx, onComment, onChompKeep) {
|
243738
243738
|
const { allNullValues, doc, indent: indent2, indentStep, options: { commentString, indentSeq, simpleKeys } } = ctx;
|
243739
|
-
let keyComment = identity2.isNode(
|
243739
|
+
let keyComment = identity2.isNode(key4) && key4.comment || null;
|
243740
243740
|
if (simpleKeys) {
|
243741
243741
|
if (keyComment) {
|
243742
243742
|
throw new Error("With simple keys, key nodes cannot have comments");
|
243743
243743
|
}
|
243744
|
-
if (identity2.isCollection(
|
243744
|
+
if (identity2.isCollection(key4) || !identity2.isNode(key4) && typeof key4 === "object") {
|
243745
243745
|
const msg = "With simple keys, collection cannot be used as a key value";
|
243746
243746
|
throw new Error(msg);
|
243747
243747
|
}
|
243748
243748
|
}
|
243749
|
-
let explicitKey = !simpleKeys && (!
|
243749
|
+
let explicitKey = !simpleKeys && (!key4 || keyComment && value4 == null && !ctx.inFlow || identity2.isCollection(key4) || (identity2.isScalar(key4) ? key4.type === Scalar.Scalar.BLOCK_FOLDED || key4.type === Scalar.Scalar.BLOCK_LITERAL : typeof key4 === "object"));
|
243750
243750
|
ctx = Object.assign({}, ctx, {
|
243751
243751
|
allNullValues: false,
|
243752
243752
|
implicitKey: !explicitKey && (simpleKeys || !allNullValues),
|
@@ -243754,7 +243754,7 @@ var require_stringifyPair = __commonJS((exports) => {
|
|
243754
243754
|
});
|
243755
243755
|
let keyCommentDone = false;
|
243756
243756
|
let chompKeep = false;
|
243757
|
-
let str = stringify3.stringify(
|
243757
|
+
let str = stringify3.stringify(key4, ctx, () => keyCommentDone = true, () => chompKeep = true);
|
243758
243758
|
if (!explicitKey && !ctx.inFlow && str.length > 1024) {
|
243759
243759
|
if (simpleKeys)
|
243760
243760
|
throw new Error("With simple keys, single line scalar must not span more than 1024 characters");
|
@@ -243898,7 +243898,7 @@ var require_merge = __commonJS((exports) => {
|
|
243898
243898
|
}),
|
243899
243899
|
stringify: () => MERGE_KEY
|
243900
243900
|
};
|
243901
|
-
var isMergeKey = (ctx,
|
243901
|
+
var isMergeKey = (ctx, key4) => (merge3.identify(key4) || identity2.isScalar(key4) && (!key4.type || key4.type === Scalar.Scalar.PLAIN) && merge3.identify(key4.value)) && ctx?.doc.schema.tags.some((tag) => tag.tag === merge3.tag && tag.default);
|
243902
243902
|
function addMergeToJSMap(ctx, map3, value4) {
|
243903
243903
|
value4 = ctx && identity2.isAlias(value4) ? value4.resolve(ctx.doc) : value4;
|
243904
243904
|
if (identity2.isSeq(value4))
|
@@ -243915,14 +243915,14 @@ var require_merge = __commonJS((exports) => {
|
|
243915
243915
|
if (!identity2.isMap(source))
|
243916
243916
|
throw new Error("Merge sources must be maps or map aliases");
|
243917
243917
|
const srcMap = source.toJSON(null, ctx, Map);
|
243918
|
-
for (const [
|
243918
|
+
for (const [key4, value5] of srcMap) {
|
243919
243919
|
if (map3 instanceof Map) {
|
243920
|
-
if (!map3.has(
|
243921
|
-
map3.set(
|
243920
|
+
if (!map3.has(key4))
|
243921
|
+
map3.set(key4, value5);
|
243922
243922
|
} else if (map3 instanceof Set) {
|
243923
|
-
map3.add(
|
243924
|
-
} else if (!Object.prototype.hasOwnProperty.call(map3,
|
243925
|
-
Object.defineProperty(map3,
|
243923
|
+
map3.add(key4);
|
243924
|
+
} else if (!Object.prototype.hasOwnProperty.call(map3, key4)) {
|
243925
|
+
Object.defineProperty(map3, key4, {
|
243926
243926
|
value: value5,
|
243927
243927
|
writable: true,
|
243928
243928
|
enumerable: true,
|
@@ -243944,19 +243944,19 @@ var require_addPairToJSMap = __commonJS((exports) => {
|
|
243944
243944
|
var stringify3 = require_stringify();
|
243945
243945
|
var identity2 = require_identity();
|
243946
243946
|
var toJS = require_toJS();
|
243947
|
-
function addPairToJSMap(ctx, map3, { key:
|
243948
|
-
if (identity2.isNode(
|
243949
|
-
|
243950
|
-
else if (merge3.isMergeKey(ctx,
|
243947
|
+
function addPairToJSMap(ctx, map3, { key: key4, value: value4 }) {
|
243948
|
+
if (identity2.isNode(key4) && key4.addToJSMap)
|
243949
|
+
key4.addToJSMap(ctx, map3, value4);
|
243950
|
+
else if (merge3.isMergeKey(ctx, key4))
|
243951
243951
|
merge3.addMergeToJSMap(ctx, map3, value4);
|
243952
243952
|
else {
|
243953
|
-
const jsKey = toJS.toJS(
|
243953
|
+
const jsKey = toJS.toJS(key4, "", ctx);
|
243954
243954
|
if (map3 instanceof Map) {
|
243955
243955
|
map3.set(jsKey, toJS.toJS(value4, jsKey, ctx));
|
243956
243956
|
} else if (map3 instanceof Set) {
|
243957
243957
|
map3.add(jsKey);
|
243958
243958
|
} else {
|
243959
|
-
const stringKey = stringifyKey(
|
243959
|
+
const stringKey = stringifyKey(key4, jsKey, ctx);
|
243960
243960
|
const jsValue = toJS.toJS(value4, stringKey, ctx);
|
243961
243961
|
if (stringKey in map3)
|
243962
243962
|
Object.defineProperty(map3, stringKey, {
|
@@ -243971,19 +243971,19 @@ var require_addPairToJSMap = __commonJS((exports) => {
|
|
243971
243971
|
}
|
243972
243972
|
return map3;
|
243973
243973
|
}
|
243974
|
-
function stringifyKey(
|
243974
|
+
function stringifyKey(key4, jsKey, ctx) {
|
243975
243975
|
if (jsKey === null)
|
243976
243976
|
return "";
|
243977
243977
|
if (typeof jsKey !== "object")
|
243978
243978
|
return String(jsKey);
|
243979
|
-
if (identity2.isNode(
|
243979
|
+
if (identity2.isNode(key4) && ctx?.doc) {
|
243980
243980
|
const strCtx = stringify3.createStringifyContext(ctx.doc, {});
|
243981
243981
|
strCtx.anchors = new Set;
|
243982
243982
|
for (const node of ctx.anchors.keys())
|
243983
243983
|
strCtx.anchors.add(node.anchor);
|
243984
243984
|
strCtx.inFlow = true;
|
243985
243985
|
strCtx.inStringifyKey = true;
|
243986
|
-
const strKey =
|
243986
|
+
const strKey = key4.toString(strCtx);
|
243987
243987
|
if (!ctx.mapKeyWarned) {
|
243988
243988
|
let jsonStr = JSON.stringify(strKey);
|
243989
243989
|
if (jsonStr.length > 40)
|
@@ -244004,25 +244004,25 @@ var require_Pair = __commonJS((exports) => {
|
|
244004
244004
|
var stringifyPair2 = require_stringifyPair();
|
244005
244005
|
var addPairToJSMap = require_addPairToJSMap();
|
244006
244006
|
var identity2 = require_identity();
|
244007
|
-
function createPair(
|
244008
|
-
const k6 = createNode.createNode(
|
244007
|
+
function createPair(key4, value4, ctx) {
|
244008
|
+
const k6 = createNode.createNode(key4, undefined, ctx);
|
244009
244009
|
const v7 = createNode.createNode(value4, undefined, ctx);
|
244010
244010
|
return new Pair(k6, v7);
|
244011
244011
|
}
|
244012
244012
|
|
244013
244013
|
class Pair {
|
244014
|
-
constructor(
|
244014
|
+
constructor(key4, value4 = null) {
|
244015
244015
|
Object.defineProperty(this, identity2.NODE_TYPE, { value: identity2.PAIR });
|
244016
|
-
this.key =
|
244016
|
+
this.key = key4;
|
244017
244017
|
this.value = value4;
|
244018
244018
|
}
|
244019
244019
|
clone(schema) {
|
244020
|
-
let { key:
|
244021
|
-
if (identity2.isNode(
|
244022
|
-
|
244020
|
+
let { key: key4, value: value4 } = this;
|
244021
|
+
if (identity2.isNode(key4))
|
244022
|
+
key4 = key4.clone(schema);
|
244023
244023
|
if (identity2.isNode(value4))
|
244024
244024
|
value4 = value4.clone(schema);
|
244025
|
-
return new Pair(
|
244025
|
+
return new Pair(key4, value4);
|
244026
244026
|
}
|
244027
244027
|
toJSON(_6, ctx) {
|
244028
244028
|
const pair = ctx?.mapAsMap ? new Map : {};
|
@@ -244189,11 +244189,11 @@ var require_YAMLMap = __commonJS((exports) => {
|
|
244189
244189
|
var identity2 = require_identity();
|
244190
244190
|
var Pair = require_Pair();
|
244191
244191
|
var Scalar = require_Scalar();
|
244192
|
-
function findPair(items,
|
244193
|
-
const k6 = identity2.isScalar(
|
244192
|
+
function findPair(items, key4) {
|
244193
|
+
const k6 = identity2.isScalar(key4) ? key4.value : key4;
|
244194
244194
|
for (const it2 of items) {
|
244195
244195
|
if (identity2.isPair(it2)) {
|
244196
|
-
if (it2.key ===
|
244196
|
+
if (it2.key === key4 || it2.key === k6)
|
244197
244197
|
return it2;
|
244198
244198
|
if (identity2.isScalar(it2.key) && it2.key.value === k6)
|
244199
244199
|
return it2;
|
@@ -244213,20 +244213,20 @@ var require_YAMLMap = __commonJS((exports) => {
|
|
244213
244213
|
static from(schema, obj, ctx) {
|
244214
244214
|
const { keepUndefined, replacer } = ctx;
|
244215
244215
|
const map3 = new this(schema);
|
244216
|
-
const add = (
|
244216
|
+
const add = (key4, value4) => {
|
244217
244217
|
if (typeof replacer === "function")
|
244218
|
-
value4 = replacer.call(obj,
|
244219
|
-
else if (Array.isArray(replacer) && !replacer.includes(
|
244218
|
+
value4 = replacer.call(obj, key4, value4);
|
244219
|
+
else if (Array.isArray(replacer) && !replacer.includes(key4))
|
244220
244220
|
return;
|
244221
244221
|
if (value4 !== undefined || keepUndefined)
|
244222
|
-
map3.items.push(Pair.createPair(
|
244222
|
+
map3.items.push(Pair.createPair(key4, value4, ctx));
|
244223
244223
|
};
|
244224
244224
|
if (obj instanceof Map) {
|
244225
|
-
for (const [
|
244226
|
-
add(
|
244225
|
+
for (const [key4, value4] of obj)
|
244226
|
+
add(key4, value4);
|
244227
244227
|
} else if (obj && typeof obj === "object") {
|
244228
|
-
for (const
|
244229
|
-
add(
|
244228
|
+
for (const key4 of Object.keys(obj))
|
244229
|
+
add(key4, obj[key4]);
|
244230
244230
|
}
|
244231
244231
|
if (typeof schema.sortMapEntries === "function") {
|
244232
244232
|
map3.items.sort(schema.sortMapEntries);
|
@@ -244260,23 +244260,23 @@ var require_YAMLMap = __commonJS((exports) => {
|
|
244260
244260
|
this.items.push(_pair);
|
244261
244261
|
}
|
244262
244262
|
}
|
244263
|
-
delete(
|
244264
|
-
const it2 = findPair(this.items,
|
244263
|
+
delete(key4) {
|
244264
|
+
const it2 = findPair(this.items, key4);
|
244265
244265
|
if (!it2)
|
244266
244266
|
return false;
|
244267
244267
|
const del = this.items.splice(this.items.indexOf(it2), 1);
|
244268
244268
|
return del.length > 0;
|
244269
244269
|
}
|
244270
|
-
get(
|
244271
|
-
const it2 = findPair(this.items,
|
244270
|
+
get(key4, keepScalar) {
|
244271
|
+
const it2 = findPair(this.items, key4);
|
244272
244272
|
const node = it2?.value;
|
244273
244273
|
return (!keepScalar && identity2.isScalar(node) ? node.value : node) ?? undefined;
|
244274
244274
|
}
|
244275
|
-
has(
|
244276
|
-
return !!findPair(this.items,
|
244275
|
+
has(key4) {
|
244276
|
+
return !!findPair(this.items, key4);
|
244277
244277
|
}
|
244278
|
-
set(
|
244279
|
-
this.add(new Pair.Pair(
|
244278
|
+
set(key4, value4) {
|
244279
|
+
this.add(new Pair.Pair(key4, value4), true);
|
244280
244280
|
}
|
244281
244281
|
toJSON(_6, ctx, Type) {
|
244282
244282
|
const map3 = Type ? new Type : ctx?.mapAsMap ? new Map : {};
|
@@ -244347,28 +244347,28 @@ var require_YAMLSeq = __commonJS((exports) => {
|
|
244347
244347
|
add(value4) {
|
244348
244348
|
this.items.push(value4);
|
244349
244349
|
}
|
244350
|
-
delete(
|
244351
|
-
const idx = asItemIndex(
|
244350
|
+
delete(key4) {
|
244351
|
+
const idx = asItemIndex(key4);
|
244352
244352
|
if (typeof idx !== "number")
|
244353
244353
|
return false;
|
244354
244354
|
const del = this.items.splice(idx, 1);
|
244355
244355
|
return del.length > 0;
|
244356
244356
|
}
|
244357
|
-
get(
|
244358
|
-
const idx = asItemIndex(
|
244357
|
+
get(key4, keepScalar) {
|
244358
|
+
const idx = asItemIndex(key4);
|
244359
244359
|
if (typeof idx !== "number")
|
244360
244360
|
return;
|
244361
244361
|
const it2 = this.items[idx];
|
244362
244362
|
return !keepScalar && identity2.isScalar(it2) ? it2.value : it2;
|
244363
244363
|
}
|
244364
|
-
has(
|
244365
|
-
const idx = asItemIndex(
|
244364
|
+
has(key4) {
|
244365
|
+
const idx = asItemIndex(key4);
|
244366
244366
|
return typeof idx === "number" && idx < this.items.length;
|
244367
244367
|
}
|
244368
|
-
set(
|
244369
|
-
const idx = asItemIndex(
|
244368
|
+
set(key4, value4) {
|
244369
|
+
const idx = asItemIndex(key4);
|
244370
244370
|
if (typeof idx !== "number")
|
244371
|
-
throw new Error(`Expected a valid index, not ${
|
244371
|
+
throw new Error(`Expected a valid index, not ${key4}.`);
|
244372
244372
|
const prev = this.items[idx];
|
244373
244373
|
if (identity2.isScalar(prev) && Scalar.isScalarValue(value4))
|
244374
244374
|
prev.value = value4;
|
@@ -244402,8 +244402,8 @@ var require_YAMLSeq = __commonJS((exports) => {
|
|
244402
244402
|
let i7 = 0;
|
244403
244403
|
for (let it2 of obj) {
|
244404
244404
|
if (typeof replacer === "function") {
|
244405
|
-
const
|
244406
|
-
it2 = replacer.call(obj,
|
244405
|
+
const key4 = obj instanceof Set ? it2 : String(i7++);
|
244406
|
+
it2 = replacer.call(obj, key4, it2);
|
244407
244407
|
}
|
244408
244408
|
seq.items.push(createNode.createNode(it2, undefined, ctx));
|
244409
244409
|
}
|
@@ -244411,8 +244411,8 @@ var require_YAMLSeq = __commonJS((exports) => {
|
|
244411
244411
|
return seq;
|
244412
244412
|
}
|
244413
244413
|
}
|
244414
|
-
function asItemIndex(
|
244415
|
-
let idx = identity2.isScalar(
|
244414
|
+
function asItemIndex(key4) {
|
244415
|
+
let idx = identity2.isScalar(key4) ? key4.value : key4;
|
244416
244416
|
if (idx && typeof idx === "string")
|
244417
244417
|
idx = Number(idx);
|
244418
244418
|
return typeof idx === "number" && Number.isInteger(idx) && idx >= 0 ? idx : null;
|
@@ -244786,25 +244786,25 @@ ${cn.comment}` : item.comment;
|
|
244786
244786
|
for (let it2 of iterable) {
|
244787
244787
|
if (typeof replacer === "function")
|
244788
244788
|
it2 = replacer.call(iterable, String(i7++), it2);
|
244789
|
-
let
|
244789
|
+
let key4, value4;
|
244790
244790
|
if (Array.isArray(it2)) {
|
244791
244791
|
if (it2.length === 2) {
|
244792
|
-
|
244792
|
+
key4 = it2[0];
|
244793
244793
|
value4 = it2[1];
|
244794
244794
|
} else
|
244795
244795
|
throw new TypeError(`Expected [key, value] tuple: ${it2}`);
|
244796
244796
|
} else if (it2 && it2 instanceof Object) {
|
244797
244797
|
const keys = Object.keys(it2);
|
244798
244798
|
if (keys.length === 1) {
|
244799
|
-
|
244800
|
-
value4 = it2[
|
244799
|
+
key4 = keys[0];
|
244800
|
+
value4 = it2[key4];
|
244801
244801
|
} else {
|
244802
244802
|
throw new TypeError(`Expected tuple with one key, not ${keys.length} keys`);
|
244803
244803
|
}
|
244804
244804
|
} else {
|
244805
|
-
|
244805
|
+
key4 = it2;
|
244806
244806
|
}
|
244807
|
-
pairs2.items.push(Pair.createPair(
|
244807
|
+
pairs2.items.push(Pair.createPair(key4, value4, ctx));
|
244808
244808
|
}
|
244809
244809
|
return pairs2;
|
244810
244810
|
}
|
@@ -244845,16 +244845,16 @@ var require_omap = __commonJS((exports) => {
|
|
244845
244845
|
if (ctx?.onCreate)
|
244846
244846
|
ctx.onCreate(map3);
|
244847
244847
|
for (const pair of this.items) {
|
244848
|
-
let
|
244848
|
+
let key4, value4;
|
244849
244849
|
if (identity2.isPair(pair)) {
|
244850
|
-
|
244851
|
-
value4 = toJS.toJS(pair.value,
|
244850
|
+
key4 = toJS.toJS(pair.key, "", ctx);
|
244851
|
+
value4 = toJS.toJS(pair.value, key4, ctx);
|
244852
244852
|
} else {
|
244853
|
-
|
244853
|
+
key4 = toJS.toJS(pair, "", ctx);
|
244854
244854
|
}
|
244855
|
-
if (map3.has(
|
244855
|
+
if (map3.has(key4))
|
244856
244856
|
throw new Error("Ordered maps must not include duplicate keys");
|
244857
|
-
map3.set(
|
244857
|
+
map3.set(key4, value4);
|
244858
244858
|
}
|
244859
244859
|
return map3;
|
244860
244860
|
}
|
@@ -244875,12 +244875,12 @@ var require_omap = __commonJS((exports) => {
|
|
244875
244875
|
resolve(seq, onError) {
|
244876
244876
|
const pairs$1 = pairs.resolvePairs(seq, onError);
|
244877
244877
|
const seenKeys = [];
|
244878
|
-
for (const { key:
|
244879
|
-
if (identity2.isScalar(
|
244880
|
-
if (seenKeys.includes(
|
244881
|
-
onError(`Ordered maps must not include duplicate keys: ${
|
244878
|
+
for (const { key: key4 } of pairs$1.items) {
|
244879
|
+
if (identity2.isScalar(key4)) {
|
244880
|
+
if (seenKeys.includes(key4.value)) {
|
244881
|
+
onError(`Ordered maps must not include duplicate keys: ${key4.value}`);
|
244882
244882
|
} else {
|
244883
|
-
seenKeys.push(
|
244883
|
+
seenKeys.push(key4.value);
|
244884
244884
|
}
|
244885
244885
|
}
|
244886
244886
|
}
|
@@ -245054,30 +245054,30 @@ var require_set = __commonJS((exports) => {
|
|
245054
245054
|
super(schema);
|
245055
245055
|
this.tag = YAMLSet.tag;
|
245056
245056
|
}
|
245057
|
-
add(
|
245057
|
+
add(key4) {
|
245058
245058
|
let pair;
|
245059
|
-
if (identity2.isPair(
|
245060
|
-
pair =
|
245061
|
-
else if (
|
245062
|
-
pair = new Pair.Pair(
|
245059
|
+
if (identity2.isPair(key4))
|
245060
|
+
pair = key4;
|
245061
|
+
else if (key4 && typeof key4 === "object" && "key" in key4 && "value" in key4 && key4.value === null)
|
245062
|
+
pair = new Pair.Pair(key4.key, null);
|
245063
245063
|
else
|
245064
|
-
pair = new Pair.Pair(
|
245064
|
+
pair = new Pair.Pair(key4, null);
|
245065
245065
|
const prev = YAMLMap.findPair(this.items, pair.key);
|
245066
245066
|
if (!prev)
|
245067
245067
|
this.items.push(pair);
|
245068
245068
|
}
|
245069
|
-
get(
|
245070
|
-
const pair = YAMLMap.findPair(this.items,
|
245069
|
+
get(key4, keepPair) {
|
245070
|
+
const pair = YAMLMap.findPair(this.items, key4);
|
245071
245071
|
return !keepPair && identity2.isPair(pair) ? identity2.isScalar(pair.key) ? pair.key.value : pair.key : pair;
|
245072
245072
|
}
|
245073
|
-
set(
|
245073
|
+
set(key4, value4) {
|
245074
245074
|
if (typeof value4 !== "boolean")
|
245075
245075
|
throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof value4}`);
|
245076
|
-
const prev = YAMLMap.findPair(this.items,
|
245076
|
+
const prev = YAMLMap.findPair(this.items, key4);
|
245077
245077
|
if (prev && !value4) {
|
245078
245078
|
this.items.splice(this.items.indexOf(prev), 1);
|
245079
245079
|
} else if (!prev && value4) {
|
245080
|
-
this.items.push(new Pair.Pair(
|
245080
|
+
this.items.push(new Pair.Pair(key4));
|
245081
245081
|
}
|
245082
245082
|
}
|
245083
245083
|
toJSON(_6, ctx) {
|
@@ -245312,7 +245312,7 @@ var require_tags = __commonJS((exports) => {
|
|
245312
245312
|
if (Array.isArray(customTags))
|
245313
245313
|
tags = [];
|
245314
245314
|
else {
|
245315
|
-
const keys = Array.from(schemas.keys()).filter((
|
245315
|
+
const keys = Array.from(schemas.keys()).filter((key4) => key4 !== "yaml11").map((key4) => JSON.stringify(key4)).join(", ");
|
245316
245316
|
throw new Error(`Unknown schema "${schemaName}"; use one of ${keys} or define customTags array`);
|
245317
245317
|
}
|
245318
245318
|
}
|
@@ -245328,7 +245328,7 @@ var require_tags = __commonJS((exports) => {
|
|
245328
245328
|
const tagObj = typeof tag === "string" ? tagsByName[tag] : tag;
|
245329
245329
|
if (!tagObj) {
|
245330
245330
|
const tagName = JSON.stringify(tag);
|
245331
|
-
const keys = Object.keys(tagsByName).map((
|
245331
|
+
const keys = Object.keys(tagsByName).map((key4) => JSON.stringify(key4)).join(", ");
|
245332
245332
|
throw new Error(`Unknown custom tag ${tagName}; use one of ${keys}`);
|
245333
245333
|
}
|
245334
245334
|
if (!tags2.includes(tagObj))
|
@@ -245563,13 +245563,13 @@ var require_Document = __commonJS((exports) => {
|
|
245563
245563
|
setAnchors();
|
245564
245564
|
return node;
|
245565
245565
|
}
|
245566
|
-
createPair(
|
245567
|
-
const k6 = this.createNode(
|
245566
|
+
createPair(key4, value4, options = {}) {
|
245567
|
+
const k6 = this.createNode(key4, null, options);
|
245568
245568
|
const v7 = this.createNode(value4, null, options);
|
245569
245569
|
return new Pair.Pair(k6, v7);
|
245570
245570
|
}
|
245571
|
-
delete(
|
245572
|
-
return assertCollection(this.contents) ? this.contents.delete(
|
245571
|
+
delete(key4) {
|
245572
|
+
return assertCollection(this.contents) ? this.contents.delete(key4) : false;
|
245573
245573
|
}
|
245574
245574
|
deleteIn(path6) {
|
245575
245575
|
if (Collection.isEmptyPath(path6)) {
|
@@ -245580,27 +245580,27 @@ var require_Document = __commonJS((exports) => {
|
|
245580
245580
|
}
|
245581
245581
|
return assertCollection(this.contents) ? this.contents.deleteIn(path6) : false;
|
245582
245582
|
}
|
245583
|
-
get(
|
245584
|
-
return identity2.isCollection(this.contents) ? this.contents.get(
|
245583
|
+
get(key4, keepScalar) {
|
245584
|
+
return identity2.isCollection(this.contents) ? this.contents.get(key4, keepScalar) : undefined;
|
245585
245585
|
}
|
245586
245586
|
getIn(path6, keepScalar) {
|
245587
245587
|
if (Collection.isEmptyPath(path6))
|
245588
245588
|
return !keepScalar && identity2.isScalar(this.contents) ? this.contents.value : this.contents;
|
245589
245589
|
return identity2.isCollection(this.contents) ? this.contents.getIn(path6, keepScalar) : undefined;
|
245590
245590
|
}
|
245591
|
-
has(
|
245592
|
-
return identity2.isCollection(this.contents) ? this.contents.has(
|
245591
|
+
has(key4) {
|
245592
|
+
return identity2.isCollection(this.contents) ? this.contents.has(key4) : false;
|
245593
245593
|
}
|
245594
245594
|
hasIn(path6) {
|
245595
245595
|
if (Collection.isEmptyPath(path6))
|
245596
245596
|
return this.contents !== undefined;
|
245597
245597
|
return identity2.isCollection(this.contents) ? this.contents.hasIn(path6) : false;
|
245598
245598
|
}
|
245599
|
-
set(
|
245599
|
+
set(key4, value4) {
|
245600
245600
|
if (this.contents == null) {
|
245601
|
-
this.contents = Collection.collectionFromPath(this.schema, [
|
245601
|
+
this.contents = Collection.collectionFromPath(this.schema, [key4], value4);
|
245602
245602
|
} else if (assertCollection(this.contents)) {
|
245603
|
-
this.contents.set(
|
245603
|
+
this.contents.set(key4, value4);
|
245604
245604
|
}
|
245605
245605
|
}
|
245606
245606
|
setIn(path6, value4) {
|
@@ -245884,25 +245884,25 @@ var require_resolve_props = __commonJS((exports) => {
|
|
245884
245884
|
|
245885
245885
|
// ../../node_modules/yaml/dist/compose/util-contains-newline.js
|
245886
245886
|
var require_util_contains_newline = __commonJS((exports) => {
|
245887
|
-
function containsNewline(
|
245888
|
-
if (!
|
245887
|
+
function containsNewline(key4) {
|
245888
|
+
if (!key4)
|
245889
245889
|
return null;
|
245890
|
-
switch (
|
245890
|
+
switch (key4.type) {
|
245891
245891
|
case "alias":
|
245892
245892
|
case "scalar":
|
245893
245893
|
case "double-quoted-scalar":
|
245894
245894
|
case "single-quoted-scalar":
|
245895
|
-
if (
|
245895
|
+
if (key4.source.includes(`
|
245896
245896
|
`))
|
245897
245897
|
return true;
|
245898
|
-
if (
|
245899
|
-
for (const st2 of
|
245898
|
+
if (key4.end) {
|
245899
|
+
for (const st2 of key4.end)
|
245900
245900
|
if (st2.type === "newline")
|
245901
245901
|
return true;
|
245902
245902
|
}
|
245903
245903
|
return false;
|
245904
245904
|
case "flow-collection":
|
245905
|
-
for (const it2 of
|
245905
|
+
for (const it2 of key4.items) {
|
245906
245906
|
for (const st2 of it2.start)
|
245907
245907
|
if (st2.type === "newline")
|
245908
245908
|
return true;
|
@@ -245967,10 +245967,10 @@ var require_resolve_block_map = __commonJS((exports) => {
|
|
245967
245967
|
let offset = bm.offset;
|
245968
245968
|
let commentEnd = null;
|
245969
245969
|
for (const collItem of bm.items) {
|
245970
|
-
const { start: start3, key:
|
245970
|
+
const { start: start3, key: key4, sep: sep3, value: value4 } = collItem;
|
245971
245971
|
const keyProps = resolveProps.resolveProps(start3, {
|
245972
245972
|
indicator: "explicit-key-ind",
|
245973
|
-
next:
|
245973
|
+
next: key4 ?? sep3?.[0],
|
245974
245974
|
offset,
|
245975
245975
|
onError,
|
245976
245976
|
parentIndent: bm.indent,
|
@@ -245978,10 +245978,10 @@ var require_resolve_block_map = __commonJS((exports) => {
|
|
245978
245978
|
});
|
245979
245979
|
const implicitKey = !keyProps.found;
|
245980
245980
|
if (implicitKey) {
|
245981
|
-
if (
|
245982
|
-
if (
|
245981
|
+
if (key4) {
|
245982
|
+
if (key4.type === "block-seq")
|
245983
245983
|
onError(offset, "BLOCK_AS_IMPLICIT_KEY", "A block sequence may not be used as an implicit map key");
|
245984
|
-
else if ("indent" in
|
245984
|
+
else if ("indent" in key4 && key4.indent !== bm.indent)
|
245985
245985
|
onError(offset, "BAD_INDENT", startColMsg);
|
245986
245986
|
}
|
245987
245987
|
if (!keyProps.anchor && !keyProps.tag && !sep3) {
|
@@ -245995,17 +245995,17 @@ var require_resolve_block_map = __commonJS((exports) => {
|
|
245995
245995
|
}
|
245996
245996
|
continue;
|
245997
245997
|
}
|
245998
|
-
if (keyProps.newlineAfterProp || utilContainsNewline.containsNewline(
|
245999
|
-
onError(
|
245998
|
+
if (keyProps.newlineAfterProp || utilContainsNewline.containsNewline(key4)) {
|
245999
|
+
onError(key4 ?? start3[start3.length - 1], "MULTILINE_IMPLICIT_KEY", "Implicit keys need to be on a single line");
|
246000
246000
|
}
|
246001
246001
|
} else if (keyProps.found?.indent !== bm.indent) {
|
246002
246002
|
onError(offset, "BAD_INDENT", startColMsg);
|
246003
246003
|
}
|
246004
246004
|
ctx.atKey = true;
|
246005
246005
|
const keyStart = keyProps.end;
|
246006
|
-
const keyNode =
|
246006
|
+
const keyNode = key4 ? composeNode(ctx, key4, keyProps, onError) : composeEmptyNode(ctx, keyStart, start3, null, keyProps, onError);
|
246007
246007
|
if (ctx.schema.compat)
|
246008
|
-
utilFlowIndentCheck.flowIndentCheck(bm.indent,
|
246008
|
+
utilFlowIndentCheck.flowIndentCheck(bm.indent, key4, onError);
|
246009
246009
|
ctx.atKey = false;
|
246010
246010
|
if (utilMapIncludes.mapIncludes(ctx, map3.items, keyNode))
|
246011
246011
|
onError(keyStart, "DUPLICATE_KEY", "Map keys must be unique");
|
@@ -246015,7 +246015,7 @@ var require_resolve_block_map = __commonJS((exports) => {
|
|
246015
246015
|
offset: keyNode.range[2],
|
246016
246016
|
onError,
|
246017
246017
|
parentIndent: bm.indent,
|
246018
|
-
startOnNewline: !
|
246018
|
+
startOnNewline: !key4 || key4.type === "block-scalar"
|
246019
246019
|
});
|
246020
246020
|
offset = valueProps.end;
|
246021
246021
|
if (valueProps.found) {
|
@@ -246171,11 +246171,11 @@ var require_resolve_flow_collection = __commonJS((exports) => {
|
|
246171
246171
|
let offset = fc.offset + fc.start.source.length;
|
246172
246172
|
for (let i7 = 0;i7 < fc.items.length; ++i7) {
|
246173
246173
|
const collItem = fc.items[i7];
|
246174
|
-
const { start: start3, key:
|
246174
|
+
const { start: start3, key: key4, sep: sep3, value: value4 } = collItem;
|
246175
246175
|
const props = resolveProps.resolveProps(start3, {
|
246176
246176
|
flow: fcName,
|
246177
246177
|
indicator: "explicit-key-ind",
|
246178
|
-
next:
|
246178
|
+
next: key4 ?? sep3?.[0],
|
246179
246179
|
offset,
|
246180
246180
|
onError,
|
246181
246181
|
parentIndent: fc.indent,
|
@@ -246197,8 +246197,8 @@ var require_resolve_flow_collection = __commonJS((exports) => {
|
|
246197
246197
|
offset = props.end;
|
246198
246198
|
continue;
|
246199
246199
|
}
|
246200
|
-
if (!isMap && ctx.options.strict && utilContainsNewline.containsNewline(
|
246201
|
-
onError(
|
246200
|
+
if (!isMap && ctx.options.strict && utilContainsNewline.containsNewline(key4))
|
246201
|
+
onError(key4, "MULTILINE_IMPLICIT_KEY", "Implicit keys of flow sequence pairs need to be on a single line");
|
246202
246202
|
}
|
246203
246203
|
if (i7 === 0) {
|
246204
246204
|
if (props.comma)
|
@@ -246243,8 +246243,8 @@ var require_resolve_flow_collection = __commonJS((exports) => {
|
|
246243
246243
|
} else {
|
246244
246244
|
ctx.atKey = true;
|
246245
246245
|
const keyStart = props.end;
|
246246
|
-
const keyNode =
|
246247
|
-
if (isBlock(
|
246246
|
+
const keyNode = key4 ? composeNode(ctx, key4, props, onError) : composeEmptyNode(ctx, keyStart, start3, null, props, onError);
|
246247
|
+
if (isBlock(key4))
|
246248
246248
|
onError(keyNode.range, "BLOCK_IN_FLOW", blockMsg);
|
246249
246249
|
ctx.atKey = false;
|
246250
246250
|
const valueProps = resolveProps.resolveProps(sep3 ?? [], {
|
@@ -247056,7 +247056,7 @@ var require_composer = __commonJS((exports) => {
|
|
247056
247056
|
var node_process = __require("node:process");
|
247057
247057
|
var directives4 = require_directives2();
|
247058
247058
|
var Document = require_Document();
|
247059
|
-
var
|
247059
|
+
var errors4 = require_errors3();
|
247060
247060
|
var identity2 = require_identity();
|
247061
247061
|
var composeDoc = require_compose_doc();
|
247062
247062
|
var resolveEnd = require_resolve_end();
|
@@ -247107,9 +247107,9 @@ var require_composer = __commonJS((exports) => {
|
|
247107
247107
|
this.onError = (source, code2, message, warning) => {
|
247108
247108
|
const pos = getErrorPos(source);
|
247109
247109
|
if (warning)
|
247110
|
-
this.warnings.push(new
|
247110
|
+
this.warnings.push(new errors4.YAMLWarning(pos, code2, message));
|
247111
247111
|
else
|
247112
|
-
this.errors.push(new
|
247112
|
+
this.errors.push(new errors4.YAMLParseError(pos, code2, message));
|
247113
247113
|
};
|
247114
247114
|
this.directives = new directives4.Directives({ version: options.version || "1.2" });
|
247115
247115
|
this.options = options;
|
@@ -247193,7 +247193,7 @@ ${cb}` : comment;
|
|
247193
247193
|
break;
|
247194
247194
|
case "error": {
|
247195
247195
|
const msg = token.source ? `${token.message}: ${JSON.stringify(token.source)}` : token.message;
|
247196
|
-
const error5 = new
|
247196
|
+
const error5 = new errors4.YAMLParseError(getErrorPos(token), "UNEXPECTED_TOKEN", msg);
|
247197
247197
|
if (this.atDirectives || !this.doc)
|
247198
247198
|
this.errors.push(error5);
|
247199
247199
|
else
|
@@ -247203,7 +247203,7 @@ ${cb}` : comment;
|
|
247203
247203
|
case "doc-end": {
|
247204
247204
|
if (!this.doc) {
|
247205
247205
|
const msg = "Unexpected doc-end without preceding document";
|
247206
|
-
this.errors.push(new
|
247206
|
+
this.errors.push(new errors4.YAMLParseError(getErrorPos(token), "UNEXPECTED_TOKEN", msg));
|
247207
247207
|
break;
|
247208
247208
|
}
|
247209
247209
|
this.doc.directives.docEnd = true;
|
@@ -247218,7 +247218,7 @@ ${end.comment}` : end.comment;
|
|
247218
247218
|
break;
|
247219
247219
|
}
|
247220
247220
|
default:
|
247221
|
-
this.errors.push(new
|
247221
|
+
this.errors.push(new errors4.YAMLParseError(getErrorPos(token), "UNEXPECTED_TOKEN", `Unsupported token ${token.type}`));
|
247222
247222
|
}
|
247223
247223
|
}
|
247224
247224
|
*end(forceDoc = false, endOffset = -1) {
|
@@ -247244,7 +247244,7 @@ ${end.comment}` : end.comment;
|
|
247244
247244
|
var require_cst_scalar = __commonJS((exports) => {
|
247245
247245
|
var resolveBlockScalar = require_resolve_block_scalar();
|
247246
247246
|
var resolveFlowScalar = require_resolve_flow_scalar();
|
247247
|
-
var
|
247247
|
+
var errors4 = require_errors3();
|
247248
247248
|
var stringifyString = require_stringifyString();
|
247249
247249
|
function resolveAsScalar(token, strict = true, onError) {
|
247250
247250
|
if (token) {
|
@@ -247253,7 +247253,7 @@ var require_cst_scalar = __commonJS((exports) => {
|
|
247253
247253
|
if (onError)
|
247254
247254
|
onError(offset, code2, message);
|
247255
247255
|
else
|
247256
|
-
throw new
|
247256
|
+
throw new errors4.YAMLParseError([offset, offset + 1], code2, message);
|
247257
247257
|
};
|
247258
247258
|
switch (token.type) {
|
247259
247259
|
case "scalar":
|
@@ -247367,9 +247367,9 @@ var require_cst_scalar = __commonJS((exports) => {
|
|
247367
247367
|
if (!addEndtoBlockProps(props, "end" in token ? token.end : undefined))
|
247368
247368
|
props.push({ type: "newline", offset: -1, indent: indent2, source: `
|
247369
247369
|
` });
|
247370
|
-
for (const
|
247371
|
-
if (
|
247372
|
-
delete token[
|
247370
|
+
for (const key4 of Object.keys(token))
|
247371
|
+
if (key4 !== "type" && key4 !== "offset")
|
247372
|
+
delete token[key4];
|
247373
247373
|
Object.assign(token, { type: "block-scalar", indent: indent2, props, source: body });
|
247374
247374
|
}
|
247375
247375
|
}
|
@@ -247418,9 +247418,9 @@ var require_cst_scalar = __commonJS((exports) => {
|
|
247418
247418
|
default: {
|
247419
247419
|
const indent2 = "indent" in token ? token.indent : -1;
|
247420
247420
|
const end = "end" in token && Array.isArray(token.end) ? token.end.filter((st2) => st2.type === "space" || st2.type === "comment" || st2.type === "newline") : [];
|
247421
|
-
for (const
|
247422
|
-
if (
|
247423
|
-
delete token[
|
247421
|
+
for (const key4 of Object.keys(token))
|
247422
|
+
if (key4 !== "type" && key4 !== "offset")
|
247423
|
+
delete token[key4];
|
247424
247424
|
Object.assign(token, { type: type4, indent: indent2, source, end });
|
247425
247425
|
}
|
247426
247426
|
}
|
@@ -247472,12 +247472,12 @@ var require_cst_stringify = __commonJS((exports) => {
|
|
247472
247472
|
}
|
247473
247473
|
}
|
247474
247474
|
}
|
247475
|
-
function stringifyItem({ start: start3, key:
|
247475
|
+
function stringifyItem({ start: start3, key: key4, sep: sep3, value: value4 }) {
|
247476
247476
|
let res = "";
|
247477
247477
|
for (const st2 of start3)
|
247478
247478
|
res += st2.source;
|
247479
|
-
if (
|
247480
|
-
res += stringifyToken(
|
247479
|
+
if (key4)
|
247480
|
+
res += stringifyToken(key4);
|
247481
247481
|
if (sep3)
|
247482
247482
|
for (const st2 of sep3)
|
247483
247483
|
res += st2.source;
|
@@ -248773,7 +248773,7 @@ var require_parser2 = __commonJS((exports) => {
|
|
248773
248773
|
});
|
248774
248774
|
} else if (isFlowToken(it2.key) && !includesToken(it2.sep, "newline")) {
|
248775
248775
|
const start4 = getFirstKeyStartProps(it2.start);
|
248776
|
-
const
|
248776
|
+
const key4 = it2.key;
|
248777
248777
|
const sep3 = it2.sep;
|
248778
248778
|
sep3.push(this.sourceToken);
|
248779
248779
|
delete it2.key;
|
@@ -248782,7 +248782,7 @@ var require_parser2 = __commonJS((exports) => {
|
|
248782
248782
|
type: "block-map",
|
248783
248783
|
offset: this.offset,
|
248784
248784
|
indent: this.indent,
|
248785
|
-
items: [{ start: start4, key:
|
248785
|
+
items: [{ start: start4, key: key4, sep: sep3 }]
|
248786
248786
|
});
|
248787
248787
|
} else if (start3.length > 0) {
|
248788
248788
|
it2.sep = it2.sep.concat(start3, this.sourceToken);
|
@@ -249115,7 +249115,7 @@ var require_parser2 = __commonJS((exports) => {
|
|
249115
249115
|
var require_public_api = __commonJS((exports) => {
|
249116
249116
|
var composer = require_composer();
|
249117
249117
|
var Document = require_Document();
|
249118
|
-
var
|
249118
|
+
var errors4 = require_errors3();
|
249119
249119
|
var log = require_log();
|
249120
249120
|
var identity2 = require_identity();
|
249121
249121
|
var lineCounter = require_line_counter();
|
@@ -249132,8 +249132,8 @@ var require_public_api = __commonJS((exports) => {
|
|
249132
249132
|
const docs = Array.from(composer$1.compose(parser$1.parse(source)));
|
249133
249133
|
if (prettyErrors && lineCounter2)
|
249134
249134
|
for (const doc of docs) {
|
249135
|
-
doc.errors.forEach(
|
249136
|
-
doc.warnings.forEach(
|
249135
|
+
doc.errors.forEach(errors4.prettifyError(source, lineCounter2));
|
249136
|
+
doc.warnings.forEach(errors4.prettifyError(source, lineCounter2));
|
249137
249137
|
}
|
249138
249138
|
if (docs.length > 0)
|
249139
249139
|
return docs;
|
@@ -249148,13 +249148,13 @@ var require_public_api = __commonJS((exports) => {
|
|
249148
249148
|
if (!doc)
|
249149
249149
|
doc = _doc;
|
249150
249150
|
else if (doc.options.logLevel !== "silent") {
|
249151
|
-
doc.errors.push(new
|
249151
|
+
doc.errors.push(new errors4.YAMLParseError(_doc.range.slice(0, 2), "MULTIPLE_DOCS", "Source contains multiple documents; please use YAML.parseAllDocuments()"));
|
249152
249152
|
break;
|
249153
249153
|
}
|
249154
249154
|
}
|
249155
249155
|
if (prettyErrors && lineCounter2) {
|
249156
|
-
doc.errors.forEach(
|
249157
|
-
doc.warnings.forEach(
|
249156
|
+
doc.errors.forEach(errors4.prettifyError(source, lineCounter2));
|
249157
|
+
doc.warnings.forEach(errors4.prettifyError(source, lineCounter2));
|
249158
249158
|
}
|
249159
249159
|
return doc;
|
249160
249160
|
}
|
@@ -259536,7 +259536,7 @@ function pruneCurrentEnv(currentEnv, env2) {
|
|
259536
259536
|
var package_default = {
|
259537
259537
|
name: "@settlemint/sdk-cli",
|
259538
259538
|
description: "Command-line interface for SettleMint SDK, providing development tools and project management capabilities",
|
259539
|
-
version: "2.0.0-
|
259539
|
+
version: "2.0.0-prcdfe8bfe",
|
259540
259540
|
type: "module",
|
259541
259541
|
private: false,
|
259542
259542
|
license: "FSL-1.1-MIT",
|
@@ -259580,11 +259580,11 @@ var package_default = {
|
|
259580
259580
|
"@commander-js/extra-typings": "11.1.0",
|
259581
259581
|
commander: "11.1.0",
|
259582
259582
|
"@inquirer/confirm": "5.1.9",
|
259583
|
-
"@inquirer/input": "4.1.
|
259583
|
+
"@inquirer/input": "4.1.9",
|
259584
259584
|
"@inquirer/password": "4.0.11",
|
259585
259585
|
"@inquirer/select": "4.1.0",
|
259586
|
-
"@settlemint/sdk-js": "2.0.0-
|
259587
|
-
"@settlemint/sdk-utils": "2.0.0-
|
259586
|
+
"@settlemint/sdk-js": "2.0.0-prcdfe8bfe",
|
259587
|
+
"@settlemint/sdk-utils": "2.0.0-prcdfe8bfe",
|
259588
259588
|
"@types/node": "22.14.0",
|
259589
259589
|
"@types/semver": "7.7.0",
|
259590
259590
|
"@types/which": "3.0.4",
|
@@ -259673,6 +259673,7 @@ var {
|
|
259673
259673
|
} = import__.default;
|
259674
259674
|
|
259675
259675
|
// ../../node_modules/@inquirer/core/dist/esm/lib/key.js
|
259676
|
+
var isBackspaceKey = (key) => key.name === "backspace";
|
259676
259677
|
var isEnterKey = (key) => key.name === "enter" || key.name === "return";
|
259677
259678
|
// ../../node_modules/@inquirer/core/dist/esm/lib/errors.js
|
259678
259679
|
class AbortPromptError extends Error {
|
@@ -265477,477 +265478,23 @@ function sanitizeName(value4, length = 35) {
|
|
265477
265478
|
}).slice(0, length).replaceAll(/(^\d*)/g, "").replaceAll(/(-$)/g, "").replaceAll(/(^-)/g, "");
|
265478
265479
|
}
|
265479
265480
|
|
265480
|
-
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/key.js
|
265481
|
-
var isBackspaceKey = (key2) => key2.name === "backspace";
|
265482
|
-
var isEnterKey2 = (key2) => key2.name === "enter" || key2.name === "return";
|
265483
|
-
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/errors.js
|
265484
|
-
class AbortPromptError2 extends Error {
|
265485
|
-
name = "AbortPromptError";
|
265486
|
-
message = "Prompt was aborted";
|
265487
|
-
constructor(options) {
|
265488
|
-
super();
|
265489
|
-
this.cause = options?.cause;
|
265490
|
-
}
|
265491
|
-
}
|
265492
|
-
|
265493
|
-
class CancelPromptError2 extends Error {
|
265494
|
-
name = "CancelPromptError";
|
265495
|
-
message = "Prompt was canceled";
|
265496
|
-
}
|
265497
|
-
|
265498
|
-
class ExitPromptError2 extends Error {
|
265499
|
-
name = "ExitPromptError";
|
265500
|
-
}
|
265501
|
-
|
265502
|
-
class HookError2 extends Error {
|
265503
|
-
name = "HookError";
|
265504
|
-
}
|
265505
|
-
|
265506
|
-
class ValidationError2 extends Error {
|
265507
|
-
name = "ValidationError";
|
265508
|
-
}
|
265509
|
-
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/use-prefix.js
|
265510
|
-
import { AsyncResource as AsyncResource5 } from "node:async_hooks";
|
265511
|
-
|
265512
|
-
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/hook-engine.js
|
265513
|
-
import { AsyncLocalStorage as AsyncLocalStorage2, AsyncResource as AsyncResource4 } from "node:async_hooks";
|
265514
|
-
var hookStorage2 = new AsyncLocalStorage2;
|
265515
|
-
function createStore2(rl) {
|
265516
|
-
const store = {
|
265517
|
-
rl,
|
265518
|
-
hooks: [],
|
265519
|
-
hooksCleanup: [],
|
265520
|
-
hooksEffect: [],
|
265521
|
-
index: 0,
|
265522
|
-
handleChange() {}
|
265523
|
-
};
|
265524
|
-
return store;
|
265525
|
-
}
|
265526
|
-
function withHooks2(rl, cb) {
|
265527
|
-
const store = createStore2(rl);
|
265528
|
-
return hookStorage2.run(store, () => {
|
265529
|
-
function cycle(render) {
|
265530
|
-
store.handleChange = () => {
|
265531
|
-
store.index = 0;
|
265532
|
-
render();
|
265533
|
-
};
|
265534
|
-
store.handleChange();
|
265535
|
-
}
|
265536
|
-
return cb(cycle);
|
265537
|
-
});
|
265538
|
-
}
|
265539
|
-
function getStore2() {
|
265540
|
-
const store = hookStorage2.getStore();
|
265541
|
-
if (!store) {
|
265542
|
-
throw new HookError2("[Inquirer] Hook functions can only be called from within a prompt");
|
265543
|
-
}
|
265544
|
-
return store;
|
265545
|
-
}
|
265546
|
-
function readline3() {
|
265547
|
-
return getStore2().rl;
|
265548
|
-
}
|
265549
|
-
function withUpdates2(fn) {
|
265550
|
-
const wrapped = (...args) => {
|
265551
|
-
const store = getStore2();
|
265552
|
-
let shouldUpdate = false;
|
265553
|
-
const oldHandleChange = store.handleChange;
|
265554
|
-
store.handleChange = () => {
|
265555
|
-
shouldUpdate = true;
|
265556
|
-
};
|
265557
|
-
const returnValue = fn(...args);
|
265558
|
-
if (shouldUpdate) {
|
265559
|
-
oldHandleChange();
|
265560
|
-
}
|
265561
|
-
store.handleChange = oldHandleChange;
|
265562
|
-
return returnValue;
|
265563
|
-
};
|
265564
|
-
return AsyncResource4.bind(wrapped);
|
265565
|
-
}
|
265566
|
-
function withPointer2(cb) {
|
265567
|
-
const store = getStore2();
|
265568
|
-
const { index } = store;
|
265569
|
-
const pointer = {
|
265570
|
-
get() {
|
265571
|
-
return store.hooks[index];
|
265572
|
-
},
|
265573
|
-
set(value4) {
|
265574
|
-
store.hooks[index] = value4;
|
265575
|
-
},
|
265576
|
-
initialized: index in store.hooks
|
265577
|
-
};
|
265578
|
-
const returnValue = cb(pointer);
|
265579
|
-
store.index++;
|
265580
|
-
return returnValue;
|
265581
|
-
}
|
265582
|
-
function handleChange2() {
|
265583
|
-
getStore2().handleChange();
|
265584
|
-
}
|
265585
|
-
var effectScheduler2 = {
|
265586
|
-
queue(cb) {
|
265587
|
-
const store = getStore2();
|
265588
|
-
const { index } = store;
|
265589
|
-
store.hooksEffect.push(() => {
|
265590
|
-
store.hooksCleanup[index]?.();
|
265591
|
-
const cleanFn = cb(readline3());
|
265592
|
-
if (cleanFn != null && typeof cleanFn !== "function") {
|
265593
|
-
throw new ValidationError2("useEffect return value must be a cleanup function or nothing.");
|
265594
|
-
}
|
265595
|
-
store.hooksCleanup[index] = cleanFn;
|
265596
|
-
});
|
265597
|
-
},
|
265598
|
-
run() {
|
265599
|
-
const store = getStore2();
|
265600
|
-
withUpdates2(() => {
|
265601
|
-
store.hooksEffect.forEach((effect) => {
|
265602
|
-
effect();
|
265603
|
-
});
|
265604
|
-
store.hooksEffect.length = 0;
|
265605
|
-
})();
|
265606
|
-
},
|
265607
|
-
clearAll() {
|
265608
|
-
const store = getStore2();
|
265609
|
-
store.hooksCleanup.forEach((cleanFn) => {
|
265610
|
-
cleanFn?.();
|
265611
|
-
});
|
265612
|
-
store.hooksEffect.length = 0;
|
265613
|
-
store.hooksCleanup.length = 0;
|
265614
|
-
}
|
265615
|
-
};
|
265616
|
-
|
265617
|
-
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/use-state.js
|
265618
|
-
function useState2(defaultValue) {
|
265619
|
-
return withPointer2((pointer) => {
|
265620
|
-
const setFn = (newValue) => {
|
265621
|
-
if (pointer.get() !== newValue) {
|
265622
|
-
pointer.set(newValue);
|
265623
|
-
handleChange2();
|
265624
|
-
}
|
265625
|
-
};
|
265626
|
-
if (pointer.initialized) {
|
265627
|
-
return [pointer.get(), setFn];
|
265628
|
-
}
|
265629
|
-
const value4 = typeof defaultValue === "function" ? defaultValue() : defaultValue;
|
265630
|
-
pointer.set(value4);
|
265631
|
-
return [value4, setFn];
|
265632
|
-
});
|
265633
|
-
}
|
265634
|
-
|
265635
|
-
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/use-effect.js
|
265636
|
-
function useEffect2(cb, depArray) {
|
265637
|
-
withPointer2((pointer) => {
|
265638
|
-
const oldDeps = pointer.get();
|
265639
|
-
const hasChanged = !Array.isArray(oldDeps) || depArray.some((dep, i6) => !Object.is(dep, oldDeps[i6]));
|
265640
|
-
if (hasChanged) {
|
265641
|
-
effectScheduler2.queue(cb);
|
265642
|
-
}
|
265643
|
-
pointer.set(depArray);
|
265644
|
-
});
|
265645
|
-
}
|
265646
|
-
|
265647
|
-
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/theme.js
|
265648
|
-
var import_yoctocolors_cjs2 = __toESM(require_yoctocolors_cjs(), 1);
|
265649
|
-
var defaultTheme2 = {
|
265650
|
-
prefix: {
|
265651
|
-
idle: import_yoctocolors_cjs2.default.blue("?"),
|
265652
|
-
done: import_yoctocolors_cjs2.default.green(esm_default.tick)
|
265653
|
-
},
|
265654
|
-
spinner: {
|
265655
|
-
interval: 80,
|
265656
|
-
frames: ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"].map((frame) => import_yoctocolors_cjs2.default.yellow(frame))
|
265657
|
-
},
|
265658
|
-
style: {
|
265659
|
-
answer: import_yoctocolors_cjs2.default.cyan,
|
265660
|
-
message: import_yoctocolors_cjs2.default.bold,
|
265661
|
-
error: (text2) => import_yoctocolors_cjs2.default.red(`> ${text2}`),
|
265662
|
-
defaultAnswer: (text2) => import_yoctocolors_cjs2.default.dim(`(${text2})`),
|
265663
|
-
help: import_yoctocolors_cjs2.default.dim,
|
265664
|
-
highlight: import_yoctocolors_cjs2.default.cyan,
|
265665
|
-
key: (text2) => import_yoctocolors_cjs2.default.cyan(import_yoctocolors_cjs2.default.bold(`<${text2}>`))
|
265666
|
-
}
|
265667
|
-
};
|
265668
|
-
|
265669
|
-
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/make-theme.js
|
265670
|
-
function isPlainObject3(value4) {
|
265671
|
-
if (typeof value4 !== "object" || value4 === null)
|
265672
|
-
return false;
|
265673
|
-
let proto = value4;
|
265674
|
-
while (Object.getPrototypeOf(proto) !== null) {
|
265675
|
-
proto = Object.getPrototypeOf(proto);
|
265676
|
-
}
|
265677
|
-
return Object.getPrototypeOf(value4) === proto;
|
265678
|
-
}
|
265679
|
-
function deepMerge3(...objects) {
|
265680
|
-
const output = {};
|
265681
|
-
for (const obj of objects) {
|
265682
|
-
for (const [key2, value4] of Object.entries(obj)) {
|
265683
|
-
const prevValue = output[key2];
|
265684
|
-
output[key2] = isPlainObject3(prevValue) && isPlainObject3(value4) ? deepMerge3(prevValue, value4) : value4;
|
265685
|
-
}
|
265686
|
-
}
|
265687
|
-
return output;
|
265688
|
-
}
|
265689
|
-
function makeTheme2(...themes) {
|
265690
|
-
const themesToMerge = [
|
265691
|
-
defaultTheme2,
|
265692
|
-
...themes.filter((theme) => theme != null)
|
265693
|
-
];
|
265694
|
-
return deepMerge3(...themesToMerge);
|
265695
|
-
}
|
265696
|
-
|
265697
|
-
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/use-prefix.js
|
265698
|
-
function usePrefix2({ status = "idle", theme }) {
|
265699
|
-
const [showLoader, setShowLoader] = useState2(false);
|
265700
|
-
const [tick, setTick] = useState2(0);
|
265701
|
-
const { prefix, spinner: spinner2 } = makeTheme2(theme);
|
265702
|
-
useEffect2(() => {
|
265703
|
-
if (status === "loading") {
|
265704
|
-
let tickInterval;
|
265705
|
-
let inc = -1;
|
265706
|
-
const delayTimeout = setTimeout(AsyncResource5.bind(() => {
|
265707
|
-
setShowLoader(true);
|
265708
|
-
tickInterval = setInterval(AsyncResource5.bind(() => {
|
265709
|
-
inc = inc + 1;
|
265710
|
-
setTick(inc % spinner2.frames.length);
|
265711
|
-
}), spinner2.interval);
|
265712
|
-
}), 300);
|
265713
|
-
return () => {
|
265714
|
-
clearTimeout(delayTimeout);
|
265715
|
-
clearInterval(tickInterval);
|
265716
|
-
};
|
265717
|
-
} else {
|
265718
|
-
setShowLoader(false);
|
265719
|
-
}
|
265720
|
-
}, [status]);
|
265721
|
-
if (showLoader) {
|
265722
|
-
return spinner2.frames[tick];
|
265723
|
-
}
|
265724
|
-
const iconName = status === "loading" ? "idle" : status;
|
265725
|
-
return typeof prefix === "string" ? prefix : prefix[iconName] ?? prefix["idle"];
|
265726
|
-
}
|
265727
|
-
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/use-ref.js
|
265728
|
-
function useRef2(val) {
|
265729
|
-
return useState2({ current: val })[0];
|
265730
|
-
}
|
265731
|
-
|
265732
|
-
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/use-keypress.js
|
265733
|
-
function useKeypress2(userHandler) {
|
265734
|
-
const signal = useRef2(userHandler);
|
265735
|
-
signal.current = userHandler;
|
265736
|
-
useEffect2((rl) => {
|
265737
|
-
let ignore = false;
|
265738
|
-
const handler = withUpdates2((_input, event) => {
|
265739
|
-
if (ignore)
|
265740
|
-
return;
|
265741
|
-
signal.current(event, rl);
|
265742
|
-
});
|
265743
|
-
rl.input.on("keypress", handler);
|
265744
|
-
return () => {
|
265745
|
-
ignore = true;
|
265746
|
-
rl.input.removeListener("keypress", handler);
|
265747
|
-
};
|
265748
|
-
}, []);
|
265749
|
-
}
|
265750
|
-
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/utils.js
|
265751
|
-
var import_cli_width2 = __toESM(require_cli_width(), 1);
|
265752
|
-
var import_wrap_ansi2 = __toESM(require_wrap_ansi(), 1);
|
265753
|
-
function breakLines2(content, width) {
|
265754
|
-
return content.split(`
|
265755
|
-
`).flatMap((line) => import_wrap_ansi2.default(line, width, { trim: false, hard: true }).split(`
|
265756
|
-
`).map((str) => str.trimEnd())).join(`
|
265757
|
-
`);
|
265758
|
-
}
|
265759
|
-
function readlineWidth2() {
|
265760
|
-
return import_cli_width2.default({ defaultWidth: 80, output: readline3().output });
|
265761
|
-
}
|
265762
|
-
|
265763
|
-
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
|
265764
|
-
var import_mute_stream2 = __toESM(require_lib(), 1);
|
265765
|
-
import * as readline4 from "node:readline";
|
265766
|
-
import { AsyncResource as AsyncResource6 } from "node:async_hooks";
|
265767
|
-
|
265768
|
-
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/screen-manager.js
|
265769
|
-
var import_ansi_escapes2 = __toESM(require_ansi_escapes(), 1);
|
265770
|
-
import { stripVTControlCharacters as stripVTControlCharacters3 } from "node:util";
|
265771
|
-
var height2 = (content) => content.split(`
|
265772
|
-
`).length;
|
265773
|
-
var lastLine2 = (content) => content.split(`
|
265774
|
-
`).pop() ?? "";
|
265775
|
-
function cursorDown2(n6) {
|
265776
|
-
return n6 > 0 ? import_ansi_escapes2.default.cursorDown(n6) : "";
|
265777
|
-
}
|
265778
|
-
|
265779
|
-
class ScreenManager2 {
|
265780
|
-
height = 0;
|
265781
|
-
extraLinesUnderPrompt = 0;
|
265782
|
-
cursorPos;
|
265783
|
-
rl;
|
265784
|
-
constructor(rl) {
|
265785
|
-
this.rl = rl;
|
265786
|
-
this.cursorPos = rl.getCursorPos();
|
265787
|
-
}
|
265788
|
-
write(content) {
|
265789
|
-
this.rl.output.unmute();
|
265790
|
-
this.rl.output.write(content);
|
265791
|
-
this.rl.output.mute();
|
265792
|
-
}
|
265793
|
-
render(content, bottomContent = "") {
|
265794
|
-
const promptLine = lastLine2(content);
|
265795
|
-
const rawPromptLine = stripVTControlCharacters3(promptLine);
|
265796
|
-
let prompt = rawPromptLine;
|
265797
|
-
if (this.rl.line.length > 0) {
|
265798
|
-
prompt = prompt.slice(0, -this.rl.line.length);
|
265799
|
-
}
|
265800
|
-
this.rl.setPrompt(prompt);
|
265801
|
-
this.cursorPos = this.rl.getCursorPos();
|
265802
|
-
const width = readlineWidth2();
|
265803
|
-
content = breakLines2(content, width);
|
265804
|
-
bottomContent = breakLines2(bottomContent, width);
|
265805
|
-
if (rawPromptLine.length % width === 0) {
|
265806
|
-
content += `
|
265807
|
-
`;
|
265808
|
-
}
|
265809
|
-
let output = content + (bottomContent ? `
|
265810
|
-
` + bottomContent : "");
|
265811
|
-
const promptLineUpDiff = Math.floor(rawPromptLine.length / width) - this.cursorPos.rows;
|
265812
|
-
const bottomContentHeight = promptLineUpDiff + (bottomContent ? height2(bottomContent) : 0);
|
265813
|
-
if (bottomContentHeight > 0)
|
265814
|
-
output += import_ansi_escapes2.default.cursorUp(bottomContentHeight);
|
265815
|
-
output += import_ansi_escapes2.default.cursorTo(this.cursorPos.cols);
|
265816
|
-
this.write(cursorDown2(this.extraLinesUnderPrompt) + import_ansi_escapes2.default.eraseLines(this.height) + output);
|
265817
|
-
this.extraLinesUnderPrompt = bottomContentHeight;
|
265818
|
-
this.height = height2(output);
|
265819
|
-
}
|
265820
|
-
checkCursorPos() {
|
265821
|
-
const cursorPos = this.rl.getCursorPos();
|
265822
|
-
if (cursorPos.cols !== this.cursorPos.cols) {
|
265823
|
-
this.write(import_ansi_escapes2.default.cursorTo(cursorPos.cols));
|
265824
|
-
this.cursorPos = cursorPos;
|
265825
|
-
}
|
265826
|
-
}
|
265827
|
-
done({ clearContent }) {
|
265828
|
-
this.rl.setPrompt("");
|
265829
|
-
let output = cursorDown2(this.extraLinesUnderPrompt);
|
265830
|
-
output += clearContent ? import_ansi_escapes2.default.eraseLines(this.height) : `
|
265831
|
-
`;
|
265832
|
-
output += import_ansi_escapes2.default.cursorShow;
|
265833
|
-
this.write(output);
|
265834
|
-
this.rl.close();
|
265835
|
-
}
|
265836
|
-
}
|
265837
|
-
|
265838
|
-
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/promise-polyfill.js
|
265839
|
-
class PromisePolyfill2 extends Promise {
|
265840
|
-
static withResolver() {
|
265841
|
-
let resolve5;
|
265842
|
-
let reject;
|
265843
|
-
const promise = new Promise((res, rej) => {
|
265844
|
-
resolve5 = res;
|
265845
|
-
reject = rej;
|
265846
|
-
});
|
265847
|
-
return { promise, resolve: resolve5, reject };
|
265848
|
-
}
|
265849
|
-
}
|
265850
|
-
|
265851
|
-
// ../../node_modules/@inquirer/input/node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
|
265852
|
-
function getCallSites2() {
|
265853
|
-
const _prepareStackTrace = Error.prepareStackTrace;
|
265854
|
-
let result = [];
|
265855
|
-
try {
|
265856
|
-
Error.prepareStackTrace = (_5, callSites) => {
|
265857
|
-
const callSitesWithoutCurrent = callSites.slice(1);
|
265858
|
-
result = callSitesWithoutCurrent;
|
265859
|
-
return callSitesWithoutCurrent;
|
265860
|
-
};
|
265861
|
-
new Error().stack;
|
265862
|
-
} catch {
|
265863
|
-
return result;
|
265864
|
-
}
|
265865
|
-
Error.prepareStackTrace = _prepareStackTrace;
|
265866
|
-
return result;
|
265867
|
-
}
|
265868
|
-
function createPrompt2(view) {
|
265869
|
-
const callSites = getCallSites2();
|
265870
|
-
const prompt = (config3, context = {}) => {
|
265871
|
-
const { input = process.stdin, signal } = context;
|
265872
|
-
const cleanups = new Set;
|
265873
|
-
const output = new import_mute_stream2.default;
|
265874
|
-
output.pipe(context.output ?? process.stdout);
|
265875
|
-
const rl = readline4.createInterface({
|
265876
|
-
terminal: true,
|
265877
|
-
input,
|
265878
|
-
output
|
265879
|
-
});
|
265880
|
-
const screen = new ScreenManager2(rl);
|
265881
|
-
const { promise, resolve: resolve5, reject } = PromisePolyfill2.withResolver();
|
265882
|
-
const cancel3 = () => reject(new CancelPromptError2);
|
265883
|
-
if (signal) {
|
265884
|
-
const abort = () => reject(new AbortPromptError2({ cause: signal.reason }));
|
265885
|
-
if (signal.aborted) {
|
265886
|
-
abort();
|
265887
|
-
return Object.assign(promise, { cancel: cancel3 });
|
265888
|
-
}
|
265889
|
-
signal.addEventListener("abort", abort);
|
265890
|
-
cleanups.add(() => signal.removeEventListener("abort", abort));
|
265891
|
-
}
|
265892
|
-
cleanups.add(onExit((code2, signal2) => {
|
265893
|
-
reject(new ExitPromptError2(`User force closed the prompt with ${code2} ${signal2}`));
|
265894
|
-
}));
|
265895
|
-
const checkCursorPos = () => screen.checkCursorPos();
|
265896
|
-
rl.input.on("keypress", checkCursorPos);
|
265897
|
-
cleanups.add(() => rl.input.removeListener("keypress", checkCursorPos));
|
265898
|
-
return withHooks2(rl, (cycle) => {
|
265899
|
-
const hooksCleanup = AsyncResource6.bind(() => effectScheduler2.clearAll());
|
265900
|
-
rl.on("close", hooksCleanup);
|
265901
|
-
cleanups.add(() => rl.removeListener("close", hooksCleanup));
|
265902
|
-
cycle(() => {
|
265903
|
-
try {
|
265904
|
-
const nextView = view(config3, (value4) => {
|
265905
|
-
setImmediate(() => resolve5(value4));
|
265906
|
-
});
|
265907
|
-
if (nextView === undefined) {
|
265908
|
-
const callerFilename = callSites[1]?.getFileName?.();
|
265909
|
-
throw new Error(`Prompt functions must return a string.
|
265910
|
-
at ${callerFilename}`);
|
265911
|
-
}
|
265912
|
-
const [content, bottomContent] = typeof nextView === "string" ? [nextView] : nextView;
|
265913
|
-
screen.render(content, bottomContent);
|
265914
|
-
effectScheduler2.run();
|
265915
|
-
} catch (error5) {
|
265916
|
-
reject(error5);
|
265917
|
-
}
|
265918
|
-
});
|
265919
|
-
return Object.assign(promise.then((answer) => {
|
265920
|
-
effectScheduler2.clearAll();
|
265921
|
-
return answer;
|
265922
|
-
}, (error5) => {
|
265923
|
-
effectScheduler2.clearAll();
|
265924
|
-
throw error5;
|
265925
|
-
}).finally(() => {
|
265926
|
-
cleanups.forEach((cleanup) => cleanup());
|
265927
|
-
screen.done({ clearContent: Boolean(context.clearPromptOnDone) });
|
265928
|
-
output.end();
|
265929
|
-
}).then(() => promise), { cancel: cancel3 });
|
265930
|
-
});
|
265931
|
-
};
|
265932
|
-
return prompt;
|
265933
|
-
}
|
265934
265481
|
// ../../node_modules/@inquirer/input/dist/esm/index.js
|
265935
265482
|
var inputTheme = {
|
265936
265483
|
validationFailureMode: "keep"
|
265937
265484
|
};
|
265938
|
-
var esm_default2 =
|
265485
|
+
var esm_default2 = createPrompt((config3, done) => {
|
265939
265486
|
const { required, validate: validate3 = () => true } = config3;
|
265940
|
-
const theme =
|
265941
|
-
const [status, setStatus] =
|
265942
|
-
const [defaultValue = "", setDefaultValue] =
|
265943
|
-
const [errorMsg, setError] =
|
265944
|
-
const [value4, setValue] =
|
265945
|
-
const prefix =
|
265946
|
-
|
265487
|
+
const theme = makeTheme(inputTheme, config3.theme);
|
265488
|
+
const [status, setStatus] = useState("idle");
|
265489
|
+
const [defaultValue = "", setDefaultValue] = useState(config3.default);
|
265490
|
+
const [errorMsg, setError] = useState();
|
265491
|
+
const [value4, setValue] = useState("");
|
265492
|
+
const prefix = usePrefix({ status, theme });
|
265493
|
+
useKeypress(async (key2, rl) => {
|
265947
265494
|
if (status !== "idle") {
|
265948
265495
|
return;
|
265949
265496
|
}
|
265950
|
-
if (
|
265497
|
+
if (isEnterKey(key2)) {
|
265951
265498
|
const answer = value4 || defaultValue;
|
265952
265499
|
setStatus("loading");
|
265953
265500
|
const isValid2 = required && !answer ? "You must provide a value" : await validate3(answer);
|
@@ -265964,9 +265511,9 @@ var esm_default2 = createPrompt2((config3, done) => {
|
|
265964
265511
|
setError(isValid2 || "You must provide a valid value");
|
265965
265512
|
setStatus("idle");
|
265966
265513
|
}
|
265967
|
-
} else if (isBackspaceKey(
|
265514
|
+
} else if (isBackspaceKey(key2) && !value4) {
|
265968
265515
|
setDefaultValue(undefined);
|
265969
|
-
} else if (
|
265516
|
+
} else if (key2.name === "tab" && !value4) {
|
265970
265517
|
setDefaultValue(undefined);
|
265971
265518
|
rl.clearLine(0);
|
265972
265519
|
rl.write(defaultValue);
|
@@ -266016,13 +265563,13 @@ async function subgraphNamePrompt({
|
|
266016
265563
|
}
|
266017
265564
|
|
266018
265565
|
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/key.js
|
266019
|
-
var isUpKey = (
|
266020
|
-
var isDownKey = (
|
266021
|
-
var isBackspaceKey2 = (
|
266022
|
-
var isNumberKey = (
|
266023
|
-
var
|
265566
|
+
var isUpKey = (key2) => key2.name === "up" || key2.name === "k" || key2.ctrl && key2.name === "p";
|
265567
|
+
var isDownKey = (key2) => key2.name === "down" || key2.name === "j" || key2.ctrl && key2.name === "n";
|
265568
|
+
var isBackspaceKey2 = (key2) => key2.name === "backspace";
|
265569
|
+
var isNumberKey = (key2) => "1234567890".includes(key2.name);
|
265570
|
+
var isEnterKey2 = (key2) => key2.name === "enter" || key2.name === "return";
|
266024
265571
|
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/errors.js
|
266025
|
-
class
|
265572
|
+
class AbortPromptError2 extends Error {
|
266026
265573
|
name = "AbortPromptError";
|
266027
265574
|
message = "Prompt was aborted";
|
266028
265575
|
constructor(options) {
|
@@ -266031,29 +265578,29 @@ class AbortPromptError3 extends Error {
|
|
266031
265578
|
}
|
266032
265579
|
}
|
266033
265580
|
|
266034
|
-
class
|
265581
|
+
class CancelPromptError2 extends Error {
|
266035
265582
|
name = "CancelPromptError";
|
266036
265583
|
message = "Prompt was canceled";
|
266037
265584
|
}
|
266038
265585
|
|
266039
|
-
class
|
265586
|
+
class ExitPromptError2 extends Error {
|
266040
265587
|
name = "ExitPromptError";
|
266041
265588
|
}
|
266042
265589
|
|
266043
|
-
class
|
265590
|
+
class HookError2 extends Error {
|
266044
265591
|
name = "HookError";
|
266045
265592
|
}
|
266046
265593
|
|
266047
|
-
class
|
265594
|
+
class ValidationError2 extends Error {
|
266048
265595
|
name = "ValidationError";
|
266049
265596
|
}
|
266050
265597
|
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/use-prefix.js
|
266051
|
-
import { AsyncResource as
|
265598
|
+
import { AsyncResource as AsyncResource5 } from "node:async_hooks";
|
266052
265599
|
|
266053
265600
|
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/hook-engine.js
|
266054
|
-
import { AsyncLocalStorage as
|
266055
|
-
var
|
266056
|
-
function
|
265601
|
+
import { AsyncLocalStorage as AsyncLocalStorage2, AsyncResource as AsyncResource4 } from "node:async_hooks";
|
265602
|
+
var hookStorage2 = new AsyncLocalStorage2;
|
265603
|
+
function createStore2(rl) {
|
266057
265604
|
const store = {
|
266058
265605
|
rl,
|
266059
265606
|
hooks: [],
|
@@ -266064,9 +265611,9 @@ function createStore3(rl) {
|
|
266064
265611
|
};
|
266065
265612
|
return store;
|
266066
265613
|
}
|
266067
|
-
function
|
266068
|
-
const store =
|
266069
|
-
return
|
265614
|
+
function withHooks2(rl, cb) {
|
265615
|
+
const store = createStore2(rl);
|
265616
|
+
return hookStorage2.run(store, () => {
|
266070
265617
|
function cycle(render) {
|
266071
265618
|
store.handleChange = () => {
|
266072
265619
|
store.index = 0;
|
@@ -266077,19 +265624,19 @@ function withHooks3(rl, cb) {
|
|
266077
265624
|
return cb(cycle);
|
266078
265625
|
});
|
266079
265626
|
}
|
266080
|
-
function
|
266081
|
-
const store =
|
265627
|
+
function getStore2() {
|
265628
|
+
const store = hookStorage2.getStore();
|
266082
265629
|
if (!store) {
|
266083
|
-
throw new
|
265630
|
+
throw new HookError2("[Inquirer] Hook functions can only be called from within a prompt");
|
266084
265631
|
}
|
266085
265632
|
return store;
|
266086
265633
|
}
|
266087
|
-
function
|
266088
|
-
return
|
265634
|
+
function readline3() {
|
265635
|
+
return getStore2().rl;
|
266089
265636
|
}
|
266090
|
-
function
|
265637
|
+
function withUpdates2(fn) {
|
266091
265638
|
const wrapped = (...args) => {
|
266092
|
-
const store =
|
265639
|
+
const store = getStore2();
|
266093
265640
|
let shouldUpdate = false;
|
266094
265641
|
const oldHandleChange = store.handleChange;
|
266095
265642
|
store.handleChange = () => {
|
@@ -266102,10 +265649,10 @@ function withUpdates3(fn) {
|
|
266102
265649
|
store.handleChange = oldHandleChange;
|
266103
265650
|
return returnValue;
|
266104
265651
|
};
|
266105
|
-
return
|
265652
|
+
return AsyncResource4.bind(wrapped);
|
266106
265653
|
}
|
266107
|
-
function
|
266108
|
-
const store =
|
265654
|
+
function withPointer2(cb) {
|
265655
|
+
const store = getStore2();
|
266109
265656
|
const { index } = store;
|
266110
265657
|
const pointer = {
|
266111
265658
|
get() {
|
@@ -266120,25 +265667,25 @@ function withPointer3(cb) {
|
|
266120
265667
|
store.index++;
|
266121
265668
|
return returnValue;
|
266122
265669
|
}
|
266123
|
-
function
|
266124
|
-
|
265670
|
+
function handleChange2() {
|
265671
|
+
getStore2().handleChange();
|
266125
265672
|
}
|
266126
|
-
var
|
265673
|
+
var effectScheduler2 = {
|
266127
265674
|
queue(cb) {
|
266128
|
-
const store =
|
265675
|
+
const store = getStore2();
|
266129
265676
|
const { index } = store;
|
266130
265677
|
store.hooksEffect.push(() => {
|
266131
265678
|
store.hooksCleanup[index]?.();
|
266132
|
-
const cleanFn = cb(
|
265679
|
+
const cleanFn = cb(readline3());
|
266133
265680
|
if (cleanFn != null && typeof cleanFn !== "function") {
|
266134
|
-
throw new
|
265681
|
+
throw new ValidationError2("useEffect return value must be a cleanup function or nothing.");
|
266135
265682
|
}
|
266136
265683
|
store.hooksCleanup[index] = cleanFn;
|
266137
265684
|
});
|
266138
265685
|
},
|
266139
265686
|
run() {
|
266140
|
-
const store =
|
266141
|
-
|
265687
|
+
const store = getStore2();
|
265688
|
+
withUpdates2(() => {
|
266142
265689
|
store.hooksEffect.forEach((effect) => {
|
266143
265690
|
effect();
|
266144
265691
|
});
|
@@ -266146,7 +265693,7 @@ var effectScheduler3 = {
|
|
266146
265693
|
})();
|
266147
265694
|
},
|
266148
265695
|
clearAll() {
|
266149
|
-
const store =
|
265696
|
+
const store = getStore2();
|
266150
265697
|
store.hooksCleanup.forEach((cleanFn) => {
|
266151
265698
|
cleanFn?.();
|
266152
265699
|
});
|
@@ -266156,12 +265703,12 @@ var effectScheduler3 = {
|
|
266156
265703
|
};
|
266157
265704
|
|
266158
265705
|
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/use-state.js
|
266159
|
-
function
|
266160
|
-
return
|
265706
|
+
function useState2(defaultValue) {
|
265707
|
+
return withPointer2((pointer) => {
|
266161
265708
|
const setFn = (newValue) => {
|
266162
265709
|
if (pointer.get() !== newValue) {
|
266163
265710
|
pointer.set(newValue);
|
266164
|
-
|
265711
|
+
handleChange2();
|
266165
265712
|
}
|
266166
265713
|
};
|
266167
265714
|
if (pointer.initialized) {
|
@@ -266174,41 +265721,41 @@ function useState3(defaultValue) {
|
|
266174
265721
|
}
|
266175
265722
|
|
266176
265723
|
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/use-effect.js
|
266177
|
-
function
|
266178
|
-
|
265724
|
+
function useEffect2(cb, depArray) {
|
265725
|
+
withPointer2((pointer) => {
|
266179
265726
|
const oldDeps = pointer.get();
|
266180
265727
|
const hasChanged = !Array.isArray(oldDeps) || depArray.some((dep, i6) => !Object.is(dep, oldDeps[i6]));
|
266181
265728
|
if (hasChanged) {
|
266182
|
-
|
265729
|
+
effectScheduler2.queue(cb);
|
266183
265730
|
}
|
266184
265731
|
pointer.set(depArray);
|
266185
265732
|
});
|
266186
265733
|
}
|
266187
265734
|
|
266188
265735
|
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/theme.js
|
266189
|
-
var
|
266190
|
-
var
|
265736
|
+
var import_yoctocolors_cjs2 = __toESM(require_yoctocolors_cjs(), 1);
|
265737
|
+
var defaultTheme2 = {
|
266191
265738
|
prefix: {
|
266192
|
-
idle:
|
266193
|
-
done:
|
265739
|
+
idle: import_yoctocolors_cjs2.default.blue("?"),
|
265740
|
+
done: import_yoctocolors_cjs2.default.green(esm_default.tick)
|
266194
265741
|
},
|
266195
265742
|
spinner: {
|
266196
265743
|
interval: 80,
|
266197
|
-
frames: ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"].map((frame) =>
|
265744
|
+
frames: ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"].map((frame) => import_yoctocolors_cjs2.default.yellow(frame))
|
266198
265745
|
},
|
266199
265746
|
style: {
|
266200
|
-
answer:
|
266201
|
-
message:
|
266202
|
-
error: (text2) =>
|
266203
|
-
defaultAnswer: (text2) =>
|
266204
|
-
help:
|
266205
|
-
highlight:
|
266206
|
-
key: (text2) =>
|
265747
|
+
answer: import_yoctocolors_cjs2.default.cyan,
|
265748
|
+
message: import_yoctocolors_cjs2.default.bold,
|
265749
|
+
error: (text2) => import_yoctocolors_cjs2.default.red(`> ${text2}`),
|
265750
|
+
defaultAnswer: (text2) => import_yoctocolors_cjs2.default.dim(`(${text2})`),
|
265751
|
+
help: import_yoctocolors_cjs2.default.dim,
|
265752
|
+
highlight: import_yoctocolors_cjs2.default.cyan,
|
265753
|
+
key: (text2) => import_yoctocolors_cjs2.default.cyan(import_yoctocolors_cjs2.default.bold(`<${text2}>`))
|
266207
265754
|
}
|
266208
265755
|
};
|
266209
265756
|
|
266210
265757
|
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/make-theme.js
|
266211
|
-
function
|
265758
|
+
function isPlainObject3(value4) {
|
266212
265759
|
if (typeof value4 !== "object" || value4 === null)
|
266213
265760
|
return false;
|
266214
265761
|
let proto = value4;
|
@@ -266217,36 +265764,36 @@ function isPlainObject4(value4) {
|
|
266217
265764
|
}
|
266218
265765
|
return Object.getPrototypeOf(value4) === proto;
|
266219
265766
|
}
|
266220
|
-
function
|
265767
|
+
function deepMerge3(...objects) {
|
266221
265768
|
const output = {};
|
266222
265769
|
for (const obj of objects) {
|
266223
|
-
for (const [
|
266224
|
-
const prevValue = output[
|
266225
|
-
output[
|
265770
|
+
for (const [key2, value4] of Object.entries(obj)) {
|
265771
|
+
const prevValue = output[key2];
|
265772
|
+
output[key2] = isPlainObject3(prevValue) && isPlainObject3(value4) ? deepMerge3(prevValue, value4) : value4;
|
266226
265773
|
}
|
266227
265774
|
}
|
266228
265775
|
return output;
|
266229
265776
|
}
|
266230
|
-
function
|
265777
|
+
function makeTheme2(...themes) {
|
266231
265778
|
const themesToMerge = [
|
266232
|
-
|
265779
|
+
defaultTheme2,
|
266233
265780
|
...themes.filter((theme) => theme != null)
|
266234
265781
|
];
|
266235
|
-
return
|
265782
|
+
return deepMerge3(...themesToMerge);
|
266236
265783
|
}
|
266237
265784
|
|
266238
265785
|
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/use-prefix.js
|
266239
|
-
function
|
266240
|
-
const [showLoader, setShowLoader] =
|
266241
|
-
const [tick, setTick] =
|
266242
|
-
const { prefix, spinner: spinner2 } =
|
266243
|
-
|
265786
|
+
function usePrefix2({ status = "idle", theme }) {
|
265787
|
+
const [showLoader, setShowLoader] = useState2(false);
|
265788
|
+
const [tick, setTick] = useState2(0);
|
265789
|
+
const { prefix, spinner: spinner2 } = makeTheme2(theme);
|
265790
|
+
useEffect2(() => {
|
266244
265791
|
if (status === "loading") {
|
266245
265792
|
let tickInterval;
|
266246
265793
|
let inc = -1;
|
266247
|
-
const delayTimeout = setTimeout(
|
265794
|
+
const delayTimeout = setTimeout(AsyncResource5.bind(() => {
|
266248
265795
|
setShowLoader(true);
|
266249
|
-
tickInterval = setInterval(
|
265796
|
+
tickInterval = setInterval(AsyncResource5.bind(() => {
|
266250
265797
|
inc = inc + 1;
|
266251
265798
|
setTick(inc % spinner2.frames.length);
|
266252
265799
|
}), spinner2.interval);
|
@@ -266267,7 +265814,7 @@ function usePrefix3({ status = "idle", theme }) {
|
|
266267
265814
|
}
|
266268
265815
|
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/use-memo.js
|
266269
265816
|
function useMemo(fn, dependencies) {
|
266270
|
-
return
|
265817
|
+
return withPointer2((pointer) => {
|
266271
265818
|
const prev = pointer.get();
|
266272
265819
|
if (!prev || prev.dependencies.length !== dependencies.length || prev.dependencies.some((dep, i6) => dep !== dependencies[i6])) {
|
266273
265820
|
const value4 = fn();
|
@@ -266278,16 +265825,16 @@ function useMemo(fn, dependencies) {
|
|
266278
265825
|
});
|
266279
265826
|
}
|
266280
265827
|
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/use-ref.js
|
266281
|
-
function
|
266282
|
-
return
|
265828
|
+
function useRef2(val) {
|
265829
|
+
return useState2({ current: val })[0];
|
266283
265830
|
}
|
266284
265831
|
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/use-keypress.js
|
266285
|
-
function
|
266286
|
-
const signal =
|
265832
|
+
function useKeypress2(userHandler) {
|
265833
|
+
const signal = useRef2(userHandler);
|
266287
265834
|
signal.current = userHandler;
|
266288
|
-
|
265835
|
+
useEffect2((rl) => {
|
266289
265836
|
let ignore = false;
|
266290
|
-
const handler =
|
265837
|
+
const handler = withUpdates2((_input, event) => {
|
266291
265838
|
if (ignore)
|
266292
265839
|
return;
|
266293
265840
|
signal.current(event, rl);
|
@@ -266300,21 +265847,21 @@ function useKeypress3(userHandler) {
|
|
266300
265847
|
}, []);
|
266301
265848
|
}
|
266302
265849
|
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/utils.js
|
266303
|
-
var
|
266304
|
-
var
|
266305
|
-
function
|
265850
|
+
var import_cli_width2 = __toESM(require_cli_width(), 1);
|
265851
|
+
var import_wrap_ansi2 = __toESM(require_wrap_ansi(), 1);
|
265852
|
+
function breakLines2(content, width) {
|
266306
265853
|
return content.split(`
|
266307
|
-
`).flatMap((line) =>
|
265854
|
+
`).flatMap((line) => import_wrap_ansi2.default(line, width, { trim: false, hard: true }).split(`
|
266308
265855
|
`).map((str) => str.trimEnd())).join(`
|
266309
265856
|
`);
|
266310
265857
|
}
|
266311
|
-
function
|
266312
|
-
return
|
265858
|
+
function readlineWidth2() {
|
265859
|
+
return import_cli_width2.default({ defaultWidth: 80, output: readline3().output });
|
266313
265860
|
}
|
266314
265861
|
|
266315
265862
|
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/pagination/lines.js
|
266316
265863
|
function split2(content, width) {
|
266317
|
-
return
|
265864
|
+
return breakLines2(content, width).split(`
|
266318
265865
|
`);
|
266319
265866
|
}
|
266320
265867
|
function rotate(count, items) {
|
@@ -266377,7 +265924,7 @@ function infinite({ active, lastActive, total, pageSize, pointer }) {
|
|
266377
265924
|
|
266378
265925
|
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/pagination/use-pagination.js
|
266379
265926
|
function usePagination({ items, active, renderItem, pageSize, loop = true }) {
|
266380
|
-
const state =
|
265927
|
+
const state = useRef2({ position: 0, lastActive: 0 });
|
266381
265928
|
const position = loop ? infinite({
|
266382
265929
|
active,
|
266383
265930
|
lastActive: state.current.lastActive,
|
@@ -266393,7 +265940,7 @@ function usePagination({ items, active, renderItem, pageSize, loop = true }) {
|
|
266393
265940
|
state.current.lastActive = active;
|
266394
265941
|
return lines({
|
266395
265942
|
items,
|
266396
|
-
width:
|
265943
|
+
width: readlineWidth2(),
|
266397
265944
|
renderItem,
|
266398
265945
|
active,
|
266399
265946
|
position,
|
@@ -266402,22 +265949,22 @@ function usePagination({ items, active, renderItem, pageSize, loop = true }) {
|
|
266402
265949
|
`);
|
266403
265950
|
}
|
266404
265951
|
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
|
266405
|
-
var
|
266406
|
-
import * as
|
266407
|
-
import { AsyncResource as
|
265952
|
+
var import_mute_stream2 = __toESM(require_lib(), 1);
|
265953
|
+
import * as readline4 from "node:readline";
|
265954
|
+
import { AsyncResource as AsyncResource6 } from "node:async_hooks";
|
266408
265955
|
|
266409
265956
|
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/screen-manager.js
|
266410
|
-
var
|
266411
|
-
import { stripVTControlCharacters as
|
266412
|
-
var
|
265957
|
+
var import_ansi_escapes2 = __toESM(require_ansi_escapes(), 1);
|
265958
|
+
import { stripVTControlCharacters as stripVTControlCharacters3 } from "node:util";
|
265959
|
+
var height2 = (content) => content.split(`
|
266413
265960
|
`).length;
|
266414
|
-
var
|
265961
|
+
var lastLine2 = (content) => content.split(`
|
266415
265962
|
`).pop() ?? "";
|
266416
|
-
function
|
266417
|
-
return n6 > 0 ?
|
265963
|
+
function cursorDown2(n6) {
|
265964
|
+
return n6 > 0 ? import_ansi_escapes2.default.cursorDown(n6) : "";
|
266418
265965
|
}
|
266419
265966
|
|
266420
|
-
class
|
265967
|
+
class ScreenManager2 {
|
266421
265968
|
height = 0;
|
266422
265969
|
extraLinesUnderPrompt = 0;
|
266423
265970
|
cursorPos;
|
@@ -266432,17 +265979,17 @@ class ScreenManager3 {
|
|
266432
265979
|
this.rl.output.mute();
|
266433
265980
|
}
|
266434
265981
|
render(content, bottomContent = "") {
|
266435
|
-
const promptLine =
|
266436
|
-
const rawPromptLine =
|
265982
|
+
const promptLine = lastLine2(content);
|
265983
|
+
const rawPromptLine = stripVTControlCharacters3(promptLine);
|
266437
265984
|
let prompt = rawPromptLine;
|
266438
265985
|
if (this.rl.line.length > 0) {
|
266439
265986
|
prompt = prompt.slice(0, -this.rl.line.length);
|
266440
265987
|
}
|
266441
265988
|
this.rl.setPrompt(prompt);
|
266442
265989
|
this.cursorPos = this.rl.getCursorPos();
|
266443
|
-
const width =
|
266444
|
-
content =
|
266445
|
-
bottomContent =
|
265990
|
+
const width = readlineWidth2();
|
265991
|
+
content = breakLines2(content, width);
|
265992
|
+
bottomContent = breakLines2(bottomContent, width);
|
266446
265993
|
if (rawPromptLine.length % width === 0) {
|
266447
265994
|
content += `
|
266448
265995
|
`;
|
@@ -266450,34 +265997,34 @@ class ScreenManager3 {
|
|
266450
265997
|
let output = content + (bottomContent ? `
|
266451
265998
|
` + bottomContent : "");
|
266452
265999
|
const promptLineUpDiff = Math.floor(rawPromptLine.length / width) - this.cursorPos.rows;
|
266453
|
-
const bottomContentHeight = promptLineUpDiff + (bottomContent ?
|
266000
|
+
const bottomContentHeight = promptLineUpDiff + (bottomContent ? height2(bottomContent) : 0);
|
266454
266001
|
if (bottomContentHeight > 0)
|
266455
|
-
output +=
|
266456
|
-
output +=
|
266457
|
-
this.write(
|
266002
|
+
output += import_ansi_escapes2.default.cursorUp(bottomContentHeight);
|
266003
|
+
output += import_ansi_escapes2.default.cursorTo(this.cursorPos.cols);
|
266004
|
+
this.write(cursorDown2(this.extraLinesUnderPrompt) + import_ansi_escapes2.default.eraseLines(this.height) + output);
|
266458
266005
|
this.extraLinesUnderPrompt = bottomContentHeight;
|
266459
|
-
this.height =
|
266006
|
+
this.height = height2(output);
|
266460
266007
|
}
|
266461
266008
|
checkCursorPos() {
|
266462
266009
|
const cursorPos = this.rl.getCursorPos();
|
266463
266010
|
if (cursorPos.cols !== this.cursorPos.cols) {
|
266464
|
-
this.write(
|
266011
|
+
this.write(import_ansi_escapes2.default.cursorTo(cursorPos.cols));
|
266465
266012
|
this.cursorPos = cursorPos;
|
266466
266013
|
}
|
266467
266014
|
}
|
266468
266015
|
done({ clearContent }) {
|
266469
266016
|
this.rl.setPrompt("");
|
266470
|
-
let output =
|
266471
|
-
output += clearContent ?
|
266017
|
+
let output = cursorDown2(this.extraLinesUnderPrompt);
|
266018
|
+
output += clearContent ? import_ansi_escapes2.default.eraseLines(this.height) : `
|
266472
266019
|
`;
|
266473
|
-
output +=
|
266020
|
+
output += import_ansi_escapes2.default.cursorShow;
|
266474
266021
|
this.write(output);
|
266475
266022
|
this.rl.close();
|
266476
266023
|
}
|
266477
266024
|
}
|
266478
266025
|
|
266479
266026
|
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/promise-polyfill.js
|
266480
|
-
class
|
266027
|
+
class PromisePolyfill2 extends Promise {
|
266481
266028
|
static withResolver() {
|
266482
266029
|
let resolve5;
|
266483
266030
|
let reject;
|
@@ -266490,7 +266037,7 @@ class PromisePolyfill3 extends Promise {
|
|
266490
266037
|
}
|
266491
266038
|
|
266492
266039
|
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
|
266493
|
-
function
|
266040
|
+
function getCallSites2() {
|
266494
266041
|
const _prepareStackTrace = Error.prepareStackTrace;
|
266495
266042
|
let result = [];
|
266496
266043
|
try {
|
@@ -266506,23 +266053,23 @@ function getCallSites3() {
|
|
266506
266053
|
Error.prepareStackTrace = _prepareStackTrace;
|
266507
266054
|
return result;
|
266508
266055
|
}
|
266509
|
-
function
|
266510
|
-
const callSites =
|
266056
|
+
function createPrompt2(view) {
|
266057
|
+
const callSites = getCallSites2();
|
266511
266058
|
const prompt = (config3, context = {}) => {
|
266512
266059
|
const { input = process.stdin, signal } = context;
|
266513
266060
|
const cleanups = new Set;
|
266514
|
-
const output = new
|
266061
|
+
const output = new import_mute_stream2.default;
|
266515
266062
|
output.pipe(context.output ?? process.stdout);
|
266516
|
-
const rl =
|
266063
|
+
const rl = readline4.createInterface({
|
266517
266064
|
terminal: true,
|
266518
266065
|
input,
|
266519
266066
|
output
|
266520
266067
|
});
|
266521
|
-
const screen = new
|
266522
|
-
const { promise, resolve: resolve5, reject } =
|
266523
|
-
const cancel3 = () => reject(new
|
266068
|
+
const screen = new ScreenManager2(rl);
|
266069
|
+
const { promise, resolve: resolve5, reject } = PromisePolyfill2.withResolver();
|
266070
|
+
const cancel3 = () => reject(new CancelPromptError2);
|
266524
266071
|
if (signal) {
|
266525
|
-
const abort = () => reject(new
|
266072
|
+
const abort = () => reject(new AbortPromptError2({ cause: signal.reason }));
|
266526
266073
|
if (signal.aborted) {
|
266527
266074
|
abort();
|
266528
266075
|
return Object.assign(promise, { cancel: cancel3 });
|
@@ -266531,13 +266078,13 @@ function createPrompt3(view) {
|
|
266531
266078
|
cleanups.add(() => signal.removeEventListener("abort", abort));
|
266532
266079
|
}
|
266533
266080
|
cleanups.add(onExit((code2, signal2) => {
|
266534
|
-
reject(new
|
266081
|
+
reject(new ExitPromptError2(`User force closed the prompt with ${code2} ${signal2}`));
|
266535
266082
|
}));
|
266536
266083
|
const checkCursorPos = () => screen.checkCursorPos();
|
266537
266084
|
rl.input.on("keypress", checkCursorPos);
|
266538
266085
|
cleanups.add(() => rl.input.removeListener("keypress", checkCursorPos));
|
266539
|
-
return
|
266540
|
-
const hooksCleanup =
|
266086
|
+
return withHooks2(rl, (cycle) => {
|
266087
|
+
const hooksCleanup = AsyncResource6.bind(() => effectScheduler2.clearAll());
|
266541
266088
|
rl.on("close", hooksCleanup);
|
266542
266089
|
cleanups.add(() => rl.removeListener("close", hooksCleanup));
|
266543
266090
|
cycle(() => {
|
@@ -266552,16 +266099,16 @@ function createPrompt3(view) {
|
|
266552
266099
|
}
|
266553
266100
|
const [content, bottomContent] = typeof nextView === "string" ? [nextView] : nextView;
|
266554
266101
|
screen.render(content, bottomContent);
|
266555
|
-
|
266102
|
+
effectScheduler2.run();
|
266556
266103
|
} catch (error5) {
|
266557
266104
|
reject(error5);
|
266558
266105
|
}
|
266559
266106
|
});
|
266560
266107
|
return Object.assign(promise.then((answer) => {
|
266561
|
-
|
266108
|
+
effectScheduler2.clearAll();
|
266562
266109
|
return answer;
|
266563
266110
|
}, (error5) => {
|
266564
|
-
|
266111
|
+
effectScheduler2.clearAll();
|
266565
266112
|
throw error5;
|
266566
266113
|
}).finally(() => {
|
266567
266114
|
cleanups.forEach((cleanup) => cleanup());
|
@@ -266573,9 +266120,9 @@ function createPrompt3(view) {
|
|
266573
266120
|
return prompt;
|
266574
266121
|
}
|
266575
266122
|
// ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/Separator.js
|
266576
|
-
var
|
266123
|
+
var import_yoctocolors_cjs3 = __toESM(require_yoctocolors_cjs(), 1);
|
266577
266124
|
class Separator {
|
266578
|
-
separator =
|
266125
|
+
separator = import_yoctocolors_cjs3.default.dim(Array.from({ length: 15 }).join(esm_default.line));
|
266579
266126
|
type = "separator";
|
266580
266127
|
constructor(separator) {
|
266581
266128
|
if (separator) {
|
@@ -266587,13 +266134,13 @@ class Separator {
|
|
266587
266134
|
}
|
266588
266135
|
}
|
266589
266136
|
// ../../node_modules/@inquirer/select/dist/esm/index.js
|
266590
|
-
var
|
266591
|
-
var
|
266137
|
+
var import_yoctocolors_cjs4 = __toESM(require_yoctocolors_cjs(), 1);
|
266138
|
+
var import_ansi_escapes3 = __toESM(require_ansi_escapes(), 1);
|
266592
266139
|
var selectTheme = {
|
266593
266140
|
icon: { cursor: esm_default.pointer },
|
266594
266141
|
style: {
|
266595
|
-
disabled: (text2) =>
|
266596
|
-
description: (text2) =>
|
266142
|
+
disabled: (text2) => import_yoctocolors_cjs4.default.dim(`- ${text2}`),
|
266143
|
+
description: (text2) => import_yoctocolors_cjs4.default.cyan(text2)
|
266597
266144
|
},
|
266598
266145
|
helpMode: "auto",
|
266599
266146
|
indexMode: "hidden"
|
@@ -266623,19 +266170,19 @@ function normalizeChoices(choices) {
|
|
266623
266170
|
};
|
266624
266171
|
});
|
266625
266172
|
}
|
266626
|
-
var esm_default3 =
|
266173
|
+
var esm_default3 = createPrompt2((config3, done) => {
|
266627
266174
|
const { loop = true, pageSize = 7 } = config3;
|
266628
|
-
const firstRender =
|
266629
|
-
const theme =
|
266630
|
-
const [status, setStatus] =
|
266631
|
-
const prefix =
|
266632
|
-
const searchTimeoutRef =
|
266175
|
+
const firstRender = useRef2(true);
|
266176
|
+
const theme = makeTheme2(selectTheme, config3.theme);
|
266177
|
+
const [status, setStatus] = useState2("idle");
|
266178
|
+
const prefix = usePrefix2({ status, theme });
|
266179
|
+
const searchTimeoutRef = useRef2();
|
266633
266180
|
const items = useMemo(() => normalizeChoices(config3.choices), [config3.choices]);
|
266634
266181
|
const bounds = useMemo(() => {
|
266635
266182
|
const first = items.findIndex(isSelectable);
|
266636
266183
|
const last = items.findLastIndex(isSelectable);
|
266637
266184
|
if (first === -1) {
|
266638
|
-
throw new
|
266185
|
+
throw new ValidationError2("[select prompt] No selectable choices. All choices are disabled.");
|
266639
266186
|
}
|
266640
266187
|
return { first, last };
|
266641
266188
|
}, [items]);
|
@@ -266644,24 +266191,24 @@ var esm_default3 = createPrompt3((config3, done) => {
|
|
266644
266191
|
return -1;
|
266645
266192
|
return items.findIndex((item) => isSelectable(item) && item.value === config3.default);
|
266646
266193
|
}, [config3.default, items]);
|
266647
|
-
const [active, setActive] =
|
266194
|
+
const [active, setActive] = useState2(defaultItemIndex === -1 ? bounds.first : defaultItemIndex);
|
266648
266195
|
const selectedChoice = items[active];
|
266649
|
-
|
266196
|
+
useKeypress2((key3, rl) => {
|
266650
266197
|
clearTimeout(searchTimeoutRef.current);
|
266651
|
-
if (
|
266198
|
+
if (isEnterKey2(key3)) {
|
266652
266199
|
setStatus("done");
|
266653
266200
|
done(selectedChoice.value);
|
266654
|
-
} else if (isUpKey(
|
266201
|
+
} else if (isUpKey(key3) || isDownKey(key3)) {
|
266655
266202
|
rl.clearLine(0);
|
266656
|
-
if (loop || isUpKey(
|
266657
|
-
const offset = isUpKey(
|
266203
|
+
if (loop || isUpKey(key3) && active !== bounds.first || isDownKey(key3) && active !== bounds.last) {
|
266204
|
+
const offset = isUpKey(key3) ? -1 : 1;
|
266658
266205
|
let next = active;
|
266659
266206
|
do {
|
266660
266207
|
next = (next + offset + items.length) % items.length;
|
266661
266208
|
} while (!isSelectable(items[next]));
|
266662
266209
|
setActive(next);
|
266663
266210
|
}
|
266664
|
-
} else if (isNumberKey(
|
266211
|
+
} else if (isNumberKey(key3) && !Number.isNaN(Number(rl.line))) {
|
266665
266212
|
const position = Number(rl.line) - 1;
|
266666
266213
|
const item = items[position];
|
266667
266214
|
if (item != null && isSelectable(item)) {
|
@@ -266670,7 +266217,7 @@ var esm_default3 = createPrompt3((config3, done) => {
|
|
266670
266217
|
searchTimeoutRef.current = setTimeout(() => {
|
266671
266218
|
rl.clearLine(0);
|
266672
266219
|
}, 700);
|
266673
|
-
} else if (isBackspaceKey2(
|
266220
|
+
} else if (isBackspaceKey2(key3)) {
|
266674
266221
|
rl.clearLine(0);
|
266675
266222
|
} else {
|
266676
266223
|
const searchTerm = rl.line.toLowerCase();
|
@@ -266687,7 +266234,7 @@ var esm_default3 = createPrompt3((config3, done) => {
|
|
266687
266234
|
}, 700);
|
266688
266235
|
}
|
266689
266236
|
});
|
266690
|
-
|
266237
|
+
useEffect2(() => () => {
|
266691
266238
|
clearTimeout(searchTimeoutRef.current);
|
266692
266239
|
}, []);
|
266693
266240
|
const message = theme.style.message(config3.message, status);
|
@@ -266727,7 +266274,7 @@ ${theme.style.help("(Use arrow keys to reveal more choices)")}`;
|
|
266727
266274
|
const choiceDescription = selectedChoice.description ? `
|
266728
266275
|
${theme.style.description(selectedChoice.description)}` : ``;
|
266729
266276
|
return `${[prefix, message, helpTipTop].filter(Boolean).join(" ")}
|
266730
|
-
${page}${helpTipBottom}${choiceDescription}${
|
266277
|
+
${page}${helpTipBottom}${choiceDescription}${import_ansi_escapes3.default.cursorHide}`;
|
266731
266278
|
});
|
266732
266279
|
|
266733
266280
|
// src/prompts/smart-contract-set/subgraph.prompt.ts
|
@@ -267123,13 +266670,13 @@ var esm_default4 = createPrompt((config3, done) => {
|
|
267123
266670
|
const [value4, setValue] = useState("");
|
267124
266671
|
const theme = makeTheme(config3.theme);
|
267125
266672
|
const prefix = usePrefix({ status, theme });
|
267126
|
-
useKeypress((
|
267127
|
-
if (isEnterKey(
|
266673
|
+
useKeypress((key3, rl) => {
|
266674
|
+
if (isEnterKey(key3)) {
|
267128
266675
|
const answer = getBooleanValue(value4, config3.default);
|
267129
266676
|
setValue(transformer(answer));
|
267130
266677
|
setStatus("done");
|
267131
266678
|
done(answer);
|
267132
|
-
} else if (
|
266679
|
+
} else if (key3.name === "tab") {
|
267133
266680
|
const answer = boolToString(!getBooleanValue(value4, config3.default));
|
267134
266681
|
rl.clearLine(0);
|
267135
266682
|
rl.write(answer);
|
@@ -267150,9 +266697,9 @@ var esm_default4 = createPrompt((config3, done) => {
|
|
267150
266697
|
});
|
267151
266698
|
|
267152
266699
|
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/key.js
|
267153
|
-
var
|
266700
|
+
var isEnterKey3 = (key3) => key3.name === "enter" || key3.name === "return";
|
267154
266701
|
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/errors.js
|
267155
|
-
class
|
266702
|
+
class AbortPromptError3 extends Error {
|
267156
266703
|
name = "AbortPromptError";
|
267157
266704
|
message = "Prompt was aborted";
|
267158
266705
|
constructor(options) {
|
@@ -267161,29 +266708,29 @@ class AbortPromptError4 extends Error {
|
|
267161
266708
|
}
|
267162
266709
|
}
|
267163
266710
|
|
267164
|
-
class
|
266711
|
+
class CancelPromptError3 extends Error {
|
267165
266712
|
name = "CancelPromptError";
|
267166
266713
|
message = "Prompt was canceled";
|
267167
266714
|
}
|
267168
266715
|
|
267169
|
-
class
|
266716
|
+
class ExitPromptError3 extends Error {
|
267170
266717
|
name = "ExitPromptError";
|
267171
266718
|
}
|
267172
266719
|
|
267173
|
-
class
|
266720
|
+
class HookError3 extends Error {
|
267174
266721
|
name = "HookError";
|
267175
266722
|
}
|
267176
266723
|
|
267177
|
-
class
|
266724
|
+
class ValidationError3 extends Error {
|
267178
266725
|
name = "ValidationError";
|
267179
266726
|
}
|
267180
266727
|
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/use-prefix.js
|
267181
|
-
import { AsyncResource as
|
266728
|
+
import { AsyncResource as AsyncResource8 } from "node:async_hooks";
|
267182
266729
|
|
267183
266730
|
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/hook-engine.js
|
267184
|
-
import { AsyncLocalStorage as
|
267185
|
-
var
|
267186
|
-
function
|
266731
|
+
import { AsyncLocalStorage as AsyncLocalStorage3, AsyncResource as AsyncResource7 } from "node:async_hooks";
|
266732
|
+
var hookStorage3 = new AsyncLocalStorage3;
|
266733
|
+
function createStore3(rl) {
|
267187
266734
|
const store = {
|
267188
266735
|
rl,
|
267189
266736
|
hooks: [],
|
@@ -267194,9 +266741,9 @@ function createStore4(rl) {
|
|
267194
266741
|
};
|
267195
266742
|
return store;
|
267196
266743
|
}
|
267197
|
-
function
|
267198
|
-
const store =
|
267199
|
-
return
|
266744
|
+
function withHooks3(rl, cb) {
|
266745
|
+
const store = createStore3(rl);
|
266746
|
+
return hookStorage3.run(store, () => {
|
267200
266747
|
function cycle(render) {
|
267201
266748
|
store.handleChange = () => {
|
267202
266749
|
store.index = 0;
|
@@ -267207,19 +266754,19 @@ function withHooks4(rl, cb) {
|
|
267207
266754
|
return cb(cycle);
|
267208
266755
|
});
|
267209
266756
|
}
|
267210
|
-
function
|
267211
|
-
const store =
|
266757
|
+
function getStore3() {
|
266758
|
+
const store = hookStorage3.getStore();
|
267212
266759
|
if (!store) {
|
267213
|
-
throw new
|
266760
|
+
throw new HookError3("[Inquirer] Hook functions can only be called from within a prompt");
|
267214
266761
|
}
|
267215
266762
|
return store;
|
267216
266763
|
}
|
267217
|
-
function
|
267218
|
-
return
|
266764
|
+
function readline5() {
|
266765
|
+
return getStore3().rl;
|
267219
266766
|
}
|
267220
|
-
function
|
266767
|
+
function withUpdates3(fn) {
|
267221
266768
|
const wrapped = (...args) => {
|
267222
|
-
const store =
|
266769
|
+
const store = getStore3();
|
267223
266770
|
let shouldUpdate = false;
|
267224
266771
|
const oldHandleChange = store.handleChange;
|
267225
266772
|
store.handleChange = () => {
|
@@ -267232,10 +266779,10 @@ function withUpdates4(fn) {
|
|
267232
266779
|
store.handleChange = oldHandleChange;
|
267233
266780
|
return returnValue;
|
267234
266781
|
};
|
267235
|
-
return
|
266782
|
+
return AsyncResource7.bind(wrapped);
|
267236
266783
|
}
|
267237
|
-
function
|
267238
|
-
const store =
|
266784
|
+
function withPointer3(cb) {
|
266785
|
+
const store = getStore3();
|
267239
266786
|
const { index } = store;
|
267240
266787
|
const pointer = {
|
267241
266788
|
get() {
|
@@ -267250,25 +266797,25 @@ function withPointer4(cb) {
|
|
267250
266797
|
store.index++;
|
267251
266798
|
return returnValue;
|
267252
266799
|
}
|
267253
|
-
function
|
267254
|
-
|
266800
|
+
function handleChange3() {
|
266801
|
+
getStore3().handleChange();
|
267255
266802
|
}
|
267256
|
-
var
|
266803
|
+
var effectScheduler3 = {
|
267257
266804
|
queue(cb) {
|
267258
|
-
const store =
|
266805
|
+
const store = getStore3();
|
267259
266806
|
const { index } = store;
|
267260
266807
|
store.hooksEffect.push(() => {
|
267261
266808
|
store.hooksCleanup[index]?.();
|
267262
|
-
const cleanFn = cb(
|
266809
|
+
const cleanFn = cb(readline5());
|
267263
266810
|
if (cleanFn != null && typeof cleanFn !== "function") {
|
267264
|
-
throw new
|
266811
|
+
throw new ValidationError3("useEffect return value must be a cleanup function or nothing.");
|
267265
266812
|
}
|
267266
266813
|
store.hooksCleanup[index] = cleanFn;
|
267267
266814
|
});
|
267268
266815
|
},
|
267269
266816
|
run() {
|
267270
|
-
const store =
|
267271
|
-
|
266817
|
+
const store = getStore3();
|
266818
|
+
withUpdates3(() => {
|
267272
266819
|
store.hooksEffect.forEach((effect) => {
|
267273
266820
|
effect();
|
267274
266821
|
});
|
@@ -267276,7 +266823,7 @@ var effectScheduler4 = {
|
|
267276
266823
|
})();
|
267277
266824
|
},
|
267278
266825
|
clearAll() {
|
267279
|
-
const store =
|
266826
|
+
const store = getStore3();
|
267280
266827
|
store.hooksCleanup.forEach((cleanFn) => {
|
267281
266828
|
cleanFn?.();
|
267282
266829
|
});
|
@@ -267286,12 +266833,12 @@ var effectScheduler4 = {
|
|
267286
266833
|
};
|
267287
266834
|
|
267288
266835
|
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/use-state.js
|
267289
|
-
function
|
267290
|
-
return
|
266836
|
+
function useState3(defaultValue) {
|
266837
|
+
return withPointer3((pointer) => {
|
267291
266838
|
const setFn = (newValue) => {
|
267292
266839
|
if (pointer.get() !== newValue) {
|
267293
266840
|
pointer.set(newValue);
|
267294
|
-
|
266841
|
+
handleChange3();
|
267295
266842
|
}
|
267296
266843
|
};
|
267297
266844
|
if (pointer.initialized) {
|
@@ -267304,41 +266851,41 @@ function useState4(defaultValue) {
|
|
267304
266851
|
}
|
267305
266852
|
|
267306
266853
|
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/use-effect.js
|
267307
|
-
function
|
267308
|
-
|
266854
|
+
function useEffect3(cb, depArray) {
|
266855
|
+
withPointer3((pointer) => {
|
267309
266856
|
const oldDeps = pointer.get();
|
267310
266857
|
const hasChanged = !Array.isArray(oldDeps) || depArray.some((dep, i6) => !Object.is(dep, oldDeps[i6]));
|
267311
266858
|
if (hasChanged) {
|
267312
|
-
|
266859
|
+
effectScheduler3.queue(cb);
|
267313
266860
|
}
|
267314
266861
|
pointer.set(depArray);
|
267315
266862
|
});
|
267316
266863
|
}
|
267317
266864
|
|
267318
266865
|
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/theme.js
|
267319
|
-
var
|
267320
|
-
var
|
266866
|
+
var import_yoctocolors_cjs5 = __toESM(require_yoctocolors_cjs(), 1);
|
266867
|
+
var defaultTheme3 = {
|
267321
266868
|
prefix: {
|
267322
|
-
idle:
|
267323
|
-
done:
|
266869
|
+
idle: import_yoctocolors_cjs5.default.blue("?"),
|
266870
|
+
done: import_yoctocolors_cjs5.default.green(esm_default.tick)
|
267324
266871
|
},
|
267325
266872
|
spinner: {
|
267326
266873
|
interval: 80,
|
267327
|
-
frames: ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"].map((frame) =>
|
266874
|
+
frames: ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"].map((frame) => import_yoctocolors_cjs5.default.yellow(frame))
|
267328
266875
|
},
|
267329
266876
|
style: {
|
267330
|
-
answer:
|
267331
|
-
message:
|
267332
|
-
error: (text2) =>
|
267333
|
-
defaultAnswer: (text2) =>
|
267334
|
-
help:
|
267335
|
-
highlight:
|
267336
|
-
key: (text2) =>
|
266877
|
+
answer: import_yoctocolors_cjs5.default.cyan,
|
266878
|
+
message: import_yoctocolors_cjs5.default.bold,
|
266879
|
+
error: (text2) => import_yoctocolors_cjs5.default.red(`> ${text2}`),
|
266880
|
+
defaultAnswer: (text2) => import_yoctocolors_cjs5.default.dim(`(${text2})`),
|
266881
|
+
help: import_yoctocolors_cjs5.default.dim,
|
266882
|
+
highlight: import_yoctocolors_cjs5.default.cyan,
|
266883
|
+
key: (text2) => import_yoctocolors_cjs5.default.cyan(import_yoctocolors_cjs5.default.bold(`<${text2}>`))
|
267337
266884
|
}
|
267338
266885
|
};
|
267339
266886
|
|
267340
266887
|
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/make-theme.js
|
267341
|
-
function
|
266888
|
+
function isPlainObject4(value4) {
|
267342
266889
|
if (typeof value4 !== "object" || value4 === null)
|
267343
266890
|
return false;
|
267344
266891
|
let proto = value4;
|
@@ -267347,36 +266894,36 @@ function isPlainObject5(value4) {
|
|
267347
266894
|
}
|
267348
266895
|
return Object.getPrototypeOf(value4) === proto;
|
267349
266896
|
}
|
267350
|
-
function
|
266897
|
+
function deepMerge4(...objects) {
|
267351
266898
|
const output = {};
|
267352
266899
|
for (const obj of objects) {
|
267353
|
-
for (const [
|
267354
|
-
const prevValue = output[
|
267355
|
-
output[
|
266900
|
+
for (const [key3, value4] of Object.entries(obj)) {
|
266901
|
+
const prevValue = output[key3];
|
266902
|
+
output[key3] = isPlainObject4(prevValue) && isPlainObject4(value4) ? deepMerge4(prevValue, value4) : value4;
|
267356
266903
|
}
|
267357
266904
|
}
|
267358
266905
|
return output;
|
267359
266906
|
}
|
267360
|
-
function
|
266907
|
+
function makeTheme3(...themes) {
|
267361
266908
|
const themesToMerge = [
|
267362
|
-
|
266909
|
+
defaultTheme3,
|
267363
266910
|
...themes.filter((theme) => theme != null)
|
267364
266911
|
];
|
267365
|
-
return
|
266912
|
+
return deepMerge4(...themesToMerge);
|
267366
266913
|
}
|
267367
266914
|
|
267368
266915
|
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/use-prefix.js
|
267369
|
-
function
|
267370
|
-
const [showLoader, setShowLoader] =
|
267371
|
-
const [tick, setTick] =
|
267372
|
-
const { prefix, spinner: spinner2 } =
|
267373
|
-
|
266916
|
+
function usePrefix3({ status = "idle", theme }) {
|
266917
|
+
const [showLoader, setShowLoader] = useState3(false);
|
266918
|
+
const [tick, setTick] = useState3(0);
|
266919
|
+
const { prefix, spinner: spinner2 } = makeTheme3(theme);
|
266920
|
+
useEffect3(() => {
|
267374
266921
|
if (status === "loading") {
|
267375
266922
|
let tickInterval;
|
267376
266923
|
let inc = -1;
|
267377
|
-
const delayTimeout = setTimeout(
|
266924
|
+
const delayTimeout = setTimeout(AsyncResource8.bind(() => {
|
267378
266925
|
setShowLoader(true);
|
267379
|
-
tickInterval = setInterval(
|
266926
|
+
tickInterval = setInterval(AsyncResource8.bind(() => {
|
267380
266927
|
inc = inc + 1;
|
267381
266928
|
setTick(inc % spinner2.frames.length);
|
267382
266929
|
}), spinner2.interval);
|
@@ -267396,17 +266943,17 @@ function usePrefix4({ status = "idle", theme }) {
|
|
267396
266943
|
return typeof prefix === "string" ? prefix : prefix[iconName] ?? prefix["idle"];
|
267397
266944
|
}
|
267398
266945
|
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/use-ref.js
|
267399
|
-
function
|
267400
|
-
return
|
266946
|
+
function useRef3(val) {
|
266947
|
+
return useState3({ current: val })[0];
|
267401
266948
|
}
|
267402
266949
|
|
267403
266950
|
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/use-keypress.js
|
267404
|
-
function
|
267405
|
-
const signal =
|
266951
|
+
function useKeypress3(userHandler) {
|
266952
|
+
const signal = useRef3(userHandler);
|
267406
266953
|
signal.current = userHandler;
|
267407
|
-
|
266954
|
+
useEffect3((rl) => {
|
267408
266955
|
let ignore = false;
|
267409
|
-
const handler =
|
266956
|
+
const handler = withUpdates3((_input, event) => {
|
267410
266957
|
if (ignore)
|
267411
266958
|
return;
|
267412
266959
|
signal.current(event, rl);
|
@@ -267419,35 +266966,35 @@ function useKeypress4(userHandler) {
|
|
267419
266966
|
}, []);
|
267420
266967
|
}
|
267421
266968
|
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/utils.js
|
267422
|
-
var
|
267423
|
-
var
|
267424
|
-
function
|
266969
|
+
var import_cli_width3 = __toESM(require_cli_width(), 1);
|
266970
|
+
var import_wrap_ansi3 = __toESM(require_wrap_ansi(), 1);
|
266971
|
+
function breakLines3(content, width) {
|
267425
266972
|
return content.split(`
|
267426
|
-
`).flatMap((line) =>
|
266973
|
+
`).flatMap((line) => import_wrap_ansi3.default(line, width, { trim: false, hard: true }).split(`
|
267427
266974
|
`).map((str) => str.trimEnd())).join(`
|
267428
266975
|
`);
|
267429
266976
|
}
|
267430
|
-
function
|
267431
|
-
return
|
266977
|
+
function readlineWidth3() {
|
266978
|
+
return import_cli_width3.default({ defaultWidth: 80, output: readline5().output });
|
267432
266979
|
}
|
267433
266980
|
|
267434
266981
|
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
|
267435
|
-
var
|
267436
|
-
import * as
|
267437
|
-
import { AsyncResource as
|
266982
|
+
var import_mute_stream3 = __toESM(require_lib(), 1);
|
266983
|
+
import * as readline6 from "node:readline";
|
266984
|
+
import { AsyncResource as AsyncResource9 } from "node:async_hooks";
|
267438
266985
|
|
267439
266986
|
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/screen-manager.js
|
267440
|
-
var
|
267441
|
-
import { stripVTControlCharacters as
|
267442
|
-
var
|
266987
|
+
var import_ansi_escapes4 = __toESM(require_ansi_escapes(), 1);
|
266988
|
+
import { stripVTControlCharacters as stripVTControlCharacters4 } from "node:util";
|
266989
|
+
var height3 = (content) => content.split(`
|
267443
266990
|
`).length;
|
267444
|
-
var
|
266991
|
+
var lastLine3 = (content) => content.split(`
|
267445
266992
|
`).pop() ?? "";
|
267446
|
-
function
|
267447
|
-
return n6 > 0 ?
|
266993
|
+
function cursorDown3(n6) {
|
266994
|
+
return n6 > 0 ? import_ansi_escapes4.default.cursorDown(n6) : "";
|
267448
266995
|
}
|
267449
266996
|
|
267450
|
-
class
|
266997
|
+
class ScreenManager3 {
|
267451
266998
|
height = 0;
|
267452
266999
|
extraLinesUnderPrompt = 0;
|
267453
267000
|
cursorPos;
|
@@ -267462,17 +267009,17 @@ class ScreenManager4 {
|
|
267462
267009
|
this.rl.output.mute();
|
267463
267010
|
}
|
267464
267011
|
render(content, bottomContent = "") {
|
267465
|
-
const promptLine =
|
267466
|
-
const rawPromptLine =
|
267012
|
+
const promptLine = lastLine3(content);
|
267013
|
+
const rawPromptLine = stripVTControlCharacters4(promptLine);
|
267467
267014
|
let prompt = rawPromptLine;
|
267468
267015
|
if (this.rl.line.length > 0) {
|
267469
267016
|
prompt = prompt.slice(0, -this.rl.line.length);
|
267470
267017
|
}
|
267471
267018
|
this.rl.setPrompt(prompt);
|
267472
267019
|
this.cursorPos = this.rl.getCursorPos();
|
267473
|
-
const width =
|
267474
|
-
content =
|
267475
|
-
bottomContent =
|
267020
|
+
const width = readlineWidth3();
|
267021
|
+
content = breakLines3(content, width);
|
267022
|
+
bottomContent = breakLines3(bottomContent, width);
|
267476
267023
|
if (rawPromptLine.length % width === 0) {
|
267477
267024
|
content += `
|
267478
267025
|
`;
|
@@ -267480,34 +267027,34 @@ class ScreenManager4 {
|
|
267480
267027
|
let output = content + (bottomContent ? `
|
267481
267028
|
` + bottomContent : "");
|
267482
267029
|
const promptLineUpDiff = Math.floor(rawPromptLine.length / width) - this.cursorPos.rows;
|
267483
|
-
const bottomContentHeight = promptLineUpDiff + (bottomContent ?
|
267030
|
+
const bottomContentHeight = promptLineUpDiff + (bottomContent ? height3(bottomContent) : 0);
|
267484
267031
|
if (bottomContentHeight > 0)
|
267485
|
-
output +=
|
267486
|
-
output +=
|
267487
|
-
this.write(
|
267032
|
+
output += import_ansi_escapes4.default.cursorUp(bottomContentHeight);
|
267033
|
+
output += import_ansi_escapes4.default.cursorTo(this.cursorPos.cols);
|
267034
|
+
this.write(cursorDown3(this.extraLinesUnderPrompt) + import_ansi_escapes4.default.eraseLines(this.height) + output);
|
267488
267035
|
this.extraLinesUnderPrompt = bottomContentHeight;
|
267489
|
-
this.height =
|
267036
|
+
this.height = height3(output);
|
267490
267037
|
}
|
267491
267038
|
checkCursorPos() {
|
267492
267039
|
const cursorPos = this.rl.getCursorPos();
|
267493
267040
|
if (cursorPos.cols !== this.cursorPos.cols) {
|
267494
|
-
this.write(
|
267041
|
+
this.write(import_ansi_escapes4.default.cursorTo(cursorPos.cols));
|
267495
267042
|
this.cursorPos = cursorPos;
|
267496
267043
|
}
|
267497
267044
|
}
|
267498
267045
|
done({ clearContent }) {
|
267499
267046
|
this.rl.setPrompt("");
|
267500
|
-
let output =
|
267501
|
-
output += clearContent ?
|
267047
|
+
let output = cursorDown3(this.extraLinesUnderPrompt);
|
267048
|
+
output += clearContent ? import_ansi_escapes4.default.eraseLines(this.height) : `
|
267502
267049
|
`;
|
267503
|
-
output +=
|
267050
|
+
output += import_ansi_escapes4.default.cursorShow;
|
267504
267051
|
this.write(output);
|
267505
267052
|
this.rl.close();
|
267506
267053
|
}
|
267507
267054
|
}
|
267508
267055
|
|
267509
267056
|
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/promise-polyfill.js
|
267510
|
-
class
|
267057
|
+
class PromisePolyfill3 extends Promise {
|
267511
267058
|
static withResolver() {
|
267512
267059
|
let resolve6;
|
267513
267060
|
let reject;
|
@@ -267520,7 +267067,7 @@ class PromisePolyfill4 extends Promise {
|
|
267520
267067
|
}
|
267521
267068
|
|
267522
267069
|
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
|
267523
|
-
function
|
267070
|
+
function getCallSites3() {
|
267524
267071
|
const _prepareStackTrace = Error.prepareStackTrace;
|
267525
267072
|
let result = [];
|
267526
267073
|
try {
|
@@ -267536,23 +267083,23 @@ function getCallSites4() {
|
|
267536
267083
|
Error.prepareStackTrace = _prepareStackTrace;
|
267537
267084
|
return result;
|
267538
267085
|
}
|
267539
|
-
function
|
267540
|
-
const callSites =
|
267086
|
+
function createPrompt3(view) {
|
267087
|
+
const callSites = getCallSites3();
|
267541
267088
|
const prompt = (config3, context = {}) => {
|
267542
267089
|
const { input = process.stdin, signal } = context;
|
267543
267090
|
const cleanups = new Set;
|
267544
|
-
const output = new
|
267091
|
+
const output = new import_mute_stream3.default;
|
267545
267092
|
output.pipe(context.output ?? process.stdout);
|
267546
|
-
const rl =
|
267093
|
+
const rl = readline6.createInterface({
|
267547
267094
|
terminal: true,
|
267548
267095
|
input,
|
267549
267096
|
output
|
267550
267097
|
});
|
267551
|
-
const screen = new
|
267552
|
-
const { promise, resolve: resolve6, reject } =
|
267553
|
-
const cancel3 = () => reject(new
|
267098
|
+
const screen = new ScreenManager3(rl);
|
267099
|
+
const { promise, resolve: resolve6, reject } = PromisePolyfill3.withResolver();
|
267100
|
+
const cancel3 = () => reject(new CancelPromptError3);
|
267554
267101
|
if (signal) {
|
267555
|
-
const abort = () => reject(new
|
267102
|
+
const abort = () => reject(new AbortPromptError3({ cause: signal.reason }));
|
267556
267103
|
if (signal.aborted) {
|
267557
267104
|
abort();
|
267558
267105
|
return Object.assign(promise, { cancel: cancel3 });
|
@@ -267561,13 +267108,13 @@ function createPrompt4(view) {
|
|
267561
267108
|
cleanups.add(() => signal.removeEventListener("abort", abort));
|
267562
267109
|
}
|
267563
267110
|
cleanups.add(onExit((code2, signal2) => {
|
267564
|
-
reject(new
|
267111
|
+
reject(new ExitPromptError3(`User force closed the prompt with ${code2} ${signal2}`));
|
267565
267112
|
}));
|
267566
267113
|
const checkCursorPos = () => screen.checkCursorPos();
|
267567
267114
|
rl.input.on("keypress", checkCursorPos);
|
267568
267115
|
cleanups.add(() => rl.input.removeListener("keypress", checkCursorPos));
|
267569
|
-
return
|
267570
|
-
const hooksCleanup =
|
267116
|
+
return withHooks3(rl, (cycle) => {
|
267117
|
+
const hooksCleanup = AsyncResource9.bind(() => effectScheduler3.clearAll());
|
267571
267118
|
rl.on("close", hooksCleanup);
|
267572
267119
|
cleanups.add(() => rl.removeListener("close", hooksCleanup));
|
267573
267120
|
cycle(() => {
|
@@ -267582,16 +267129,16 @@ function createPrompt4(view) {
|
|
267582
267129
|
}
|
267583
267130
|
const [content, bottomContent] = typeof nextView === "string" ? [nextView] : nextView;
|
267584
267131
|
screen.render(content, bottomContent);
|
267585
|
-
|
267132
|
+
effectScheduler3.run();
|
267586
267133
|
} catch (error5) {
|
267587
267134
|
reject(error5);
|
267588
267135
|
}
|
267589
267136
|
});
|
267590
267137
|
return Object.assign(promise.then((answer) => {
|
267591
|
-
|
267138
|
+
effectScheduler3.clearAll();
|
267592
267139
|
return answer;
|
267593
267140
|
}, (error5) => {
|
267594
|
-
|
267141
|
+
effectScheduler3.clearAll();
|
267595
267142
|
throw error5;
|
267596
267143
|
}).finally(() => {
|
267597
267144
|
cleanups.forEach((cleanup) => cleanup());
|
@@ -267603,19 +267150,19 @@ function createPrompt4(view) {
|
|
267603
267150
|
return prompt;
|
267604
267151
|
}
|
267605
267152
|
// ../../node_modules/@inquirer/password/dist/esm/index.js
|
267606
|
-
var
|
267607
|
-
var esm_default5 =
|
267153
|
+
var import_ansi_escapes5 = __toESM(require_ansi_escapes(), 1);
|
267154
|
+
var esm_default5 = createPrompt3((config3, done) => {
|
267608
267155
|
const { validate: validate3 = () => true } = config3;
|
267609
|
-
const theme =
|
267610
|
-
const [status, setStatus] =
|
267611
|
-
const [errorMsg, setError] =
|
267612
|
-
const [value4, setValue] =
|
267613
|
-
const prefix =
|
267614
|
-
|
267156
|
+
const theme = makeTheme3(config3.theme);
|
267157
|
+
const [status, setStatus] = useState3("idle");
|
267158
|
+
const [errorMsg, setError] = useState3();
|
267159
|
+
const [value4, setValue] = useState3("");
|
267160
|
+
const prefix = usePrefix3({ status, theme });
|
267161
|
+
useKeypress3(async (key4, rl) => {
|
267615
267162
|
if (status !== "idle") {
|
267616
267163
|
return;
|
267617
267164
|
}
|
267618
|
-
if (
|
267165
|
+
if (isEnterKey3(key4)) {
|
267619
267166
|
const answer = value4;
|
267620
267167
|
setStatus("loading");
|
267621
267168
|
const isValid2 = await validate3(answer);
|
@@ -267640,7 +267187,7 @@ var esm_default5 = createPrompt4((config3, done) => {
|
|
267640
267187
|
const maskChar = typeof config3.mask === "string" ? config3.mask : "*";
|
267641
267188
|
formattedValue = maskChar.repeat(value4.length);
|
267642
267189
|
} else if (status !== "done") {
|
267643
|
-
helpTip = `${theme.style.help("[input is masked]")}${
|
267190
|
+
helpTip = `${theme.style.help("[input is masked]")}${import_ansi_escapes5.default.cursorHide}`;
|
267644
267191
|
}
|
267645
267192
|
if (status === "done") {
|
267646
267193
|
formattedValue = theme.style.answer(formattedValue);
|
@@ -268731,7 +268278,7 @@ var basename2 = function(p6, extension) {
|
|
268731
268278
|
return extension && lastSegment.endsWith(extension) ? lastSegment.slice(0, -extension.length) : lastSegment;
|
268732
268279
|
};
|
268733
268280
|
// ../../node_modules/defu/dist/defu.mjs
|
268734
|
-
function
|
268281
|
+
function isPlainObject5(value4) {
|
268735
268282
|
if (value4 === null || typeof value4 !== "object") {
|
268736
268283
|
return false;
|
268737
268284
|
}
|
@@ -268748,27 +268295,27 @@ function isPlainObject6(value4) {
|
|
268748
268295
|
return true;
|
268749
268296
|
}
|
268750
268297
|
function _defu(baseObject, defaults2, namespace = ".", merger) {
|
268751
|
-
if (!
|
268298
|
+
if (!isPlainObject5(defaults2)) {
|
268752
268299
|
return _defu(baseObject, {}, namespace, merger);
|
268753
268300
|
}
|
268754
268301
|
const object = Object.assign({}, defaults2);
|
268755
|
-
for (const
|
268756
|
-
if (
|
268302
|
+
for (const key4 in baseObject) {
|
268303
|
+
if (key4 === "__proto__" || key4 === "constructor") {
|
268757
268304
|
continue;
|
268758
268305
|
}
|
268759
|
-
const value4 = baseObject[
|
268306
|
+
const value4 = baseObject[key4];
|
268760
268307
|
if (value4 === null || value4 === undefined) {
|
268761
268308
|
continue;
|
268762
268309
|
}
|
268763
|
-
if (merger && merger(object,
|
268310
|
+
if (merger && merger(object, key4, value4, namespace)) {
|
268764
268311
|
continue;
|
268765
268312
|
}
|
268766
|
-
if (Array.isArray(value4) && Array.isArray(object[
|
268767
|
-
object[
|
268768
|
-
} else if (
|
268769
|
-
object[
|
268313
|
+
if (Array.isArray(value4) && Array.isArray(object[key4])) {
|
268314
|
+
object[key4] = [...value4, ...object[key4]];
|
268315
|
+
} else if (isPlainObject5(value4) && isPlainObject5(object[key4])) {
|
268316
|
+
object[key4] = _defu(value4, object[key4], (namespace ? `${namespace}.` : "") + key4.toString(), merger);
|
268770
268317
|
} else {
|
268771
|
-
object[
|
268318
|
+
object[key4] = value4;
|
268772
268319
|
}
|
268773
268320
|
}
|
268774
268321
|
return object;
|
@@ -268777,15 +268324,15 @@ function createDefu(merger) {
|
|
268777
268324
|
return (...arguments_4) => arguments_4.reduce((p6, c3) => _defu(p6, c3, "", merger), {});
|
268778
268325
|
}
|
268779
268326
|
var defu = createDefu();
|
268780
|
-
var defuFn = createDefu((object,
|
268781
|
-
if (object[
|
268782
|
-
object[
|
268327
|
+
var defuFn = createDefu((object, key4, currentValue) => {
|
268328
|
+
if (object[key4] !== undefined && typeof currentValue === "function") {
|
268329
|
+
object[key4] = currentValue(object[key4]);
|
268783
268330
|
return true;
|
268784
268331
|
}
|
268785
268332
|
});
|
268786
|
-
var defuArrayFn = createDefu((object,
|
268787
|
-
if (Array.isArray(object[
|
268788
|
-
object[
|
268333
|
+
var defuArrayFn = createDefu((object, key4, currentValue) => {
|
268334
|
+
if (Array.isArray(object[key4]) && typeof currentValue === "function") {
|
268335
|
+
object[key4] = currentValue(object[key4]);
|
268789
268336
|
return true;
|
268790
268337
|
}
|
268791
268338
|
});
|
@@ -271482,11 +271029,11 @@ function cacheDirectory() {
|
|
271482
271029
|
}
|
271483
271030
|
function normalizeHeaders(headers = {}) {
|
271484
271031
|
const normalized = {};
|
271485
|
-
for (const [
|
271032
|
+
for (const [key4, value4] of Object.entries(headers)) {
|
271486
271033
|
if (!value4) {
|
271487
271034
|
continue;
|
271488
271035
|
}
|
271489
|
-
normalized[
|
271036
|
+
normalized[key4.toLowerCase()] = value4;
|
271490
271037
|
}
|
271491
271038
|
return normalized;
|
271492
271039
|
}
|
@@ -273849,7 +273396,7 @@ function jsonOutput(data) {
|
|
273849
273396
|
var composer = require_composer();
|
273850
273397
|
var Document = require_Document();
|
273851
273398
|
var Schema = require_Schema();
|
273852
|
-
var
|
273399
|
+
var errors4 = require_errors3();
|
273853
273400
|
var Alias = require_Alias();
|
273854
273401
|
var identity2 = require_identity();
|
273855
273402
|
var Pair = require_Pair();
|
@@ -273865,9 +273412,9 @@ var visit2 = require_visit();
|
|
273865
273412
|
var $Composer = composer.Composer;
|
273866
273413
|
var $Document = Document.Document;
|
273867
273414
|
var $Schema = Schema.Schema;
|
273868
|
-
var $YAMLError =
|
273869
|
-
var $YAMLParseError =
|
273870
|
-
var $YAMLWarning =
|
273415
|
+
var $YAMLError = errors4.YAMLError;
|
273416
|
+
var $YAMLParseError = errors4.YAMLParseError;
|
273417
|
+
var $YAMLWarning = errors4.YAMLWarning;
|
273871
273418
|
var $Alias = Alias.Alias;
|
273872
273419
|
var $isAlias = identity2.isAlias;
|
273873
273420
|
var $isCollection = identity2.isCollection;
|
@@ -274215,7 +273762,7 @@ async function getServicesAndMapResults({
|
|
274215
273762
|
const application = await settlemint.application.read(applicationUniqueName);
|
274216
273763
|
const services = await servicesSpinner(settlemint, applicationUniqueName, types2);
|
274217
273764
|
const results = (types2 ?? SERVICE_TYPES).filter((serviceType) => !types2 || types2.includes(serviceType)).map((serviceType) => {
|
274218
|
-
const [_6, labels] = Object.entries(LABELS_MAP).find(([
|
273765
|
+
const [_6, labels] = Object.entries(LABELS_MAP).find(([key4, value4]) => value4.command === serviceType) ?? [
|
274219
273766
|
null,
|
274220
273767
|
{ plural: serviceType }
|
274221
273768
|
];
|
@@ -274443,11 +273990,11 @@ function createCommand4() {
|
|
274443
273990
|
|
274444
273991
|
// src/utils/commands/passthrough-options.ts
|
274445
273992
|
function mapPassthroughOptions(options, command) {
|
274446
|
-
const optionArgs = Object.entries(options).map(([
|
273993
|
+
const optionArgs = Object.entries(options).map(([key4, value4]) => {
|
274447
273994
|
if (value4 === true) {
|
274448
|
-
return `--${
|
273995
|
+
return `--${key4}`;
|
274449
273996
|
}
|
274450
|
-
return `--${
|
273997
|
+
return `--${key4}=${value4}`;
|
274451
273998
|
});
|
274452
273999
|
return [...optionArgs, ...command.args];
|
274453
274000
|
}
|
@@ -275462,4 +275009,4 @@ async function sdkCliCommand(argv = process.argv) {
|
|
275462
275009
|
// src/cli.ts
|
275463
275010
|
sdkCliCommand();
|
275464
275011
|
|
275465
|
-
//# debugId=
|
275012
|
+
//# debugId=C21D96926DC1962464756E2164756E21
|