@settlemint/sdk-cli 1.1.3-pr5ebbdf33 → 1.1.3-pr72c20505
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 +698 -349
- package/dist/cli.js.map +22 -9
- package/package.json +6 -6
package/dist/cli.js
CHANGED
|
@@ -48070,7 +48070,6 @@ var require_re6 = __commonJS((exports, module) => {
|
|
|
48070
48070
|
var re = exports.re = [];
|
|
48071
48071
|
var safeRe = exports.safeRe = [];
|
|
48072
48072
|
var src = exports.src = [];
|
|
48073
|
-
var safeSrc = exports.safeSrc = [];
|
|
48074
48073
|
var t3 = exports.t = {};
|
|
48075
48074
|
var R = 0;
|
|
48076
48075
|
var LETTERDASHNUMBER = "[a-zA-Z0-9-]";
|
|
@@ -48091,7 +48090,6 @@ var require_re6 = __commonJS((exports, module) => {
|
|
|
48091
48090
|
debug(name, index, value2);
|
|
48092
48091
|
t3[name] = index;
|
|
48093
48092
|
src[index] = value2;
|
|
48094
|
-
safeSrc[index] = safe;
|
|
48095
48093
|
re[index] = new RegExp(value2, isGlobal ? "g" : undefined);
|
|
48096
48094
|
safeRe[index] = new RegExp(safe, isGlobal ? "g" : undefined);
|
|
48097
48095
|
};
|
|
@@ -48182,7 +48180,7 @@ var require_identifiers6 = __commonJS((exports, module) => {
|
|
|
48182
48180
|
var require_semver10 = __commonJS((exports, module) => {
|
|
48183
48181
|
var debug = require_debug6();
|
|
48184
48182
|
var { MAX_LENGTH, MAX_SAFE_INTEGER } = require_constants7();
|
|
48185
|
-
var { safeRe: re,
|
|
48183
|
+
var { safeRe: re, t: t3 } = require_re6();
|
|
48186
48184
|
var parseOptions = require_parse_options6();
|
|
48187
48185
|
var { compareIdentifiers } = require_identifiers6();
|
|
48188
48186
|
|
|
@@ -48324,8 +48322,7 @@ var require_semver10 = __commonJS((exports, module) => {
|
|
|
48324
48322
|
throw new Error("invalid increment argument: identifier is empty");
|
|
48325
48323
|
}
|
|
48326
48324
|
if (identifier) {
|
|
48327
|
-
const
|
|
48328
|
-
const match2 = `-${identifier}`.match(r2);
|
|
48325
|
+
const match2 = `-${identifier}`.match(this.options.loose ? re[t3.PRERELEASELOOSE] : re[t3.PRERELEASE]);
|
|
48329
48326
|
if (!match2 || match2[1] !== identifier) {
|
|
48330
48327
|
throw new Error(`invalid identifier: ${identifier}`);
|
|
48331
48328
|
}
|
|
@@ -241161,8 +241158,8 @@ var require_mkdir = __commonJS((exports, module) => {
|
|
|
241161
241158
|
return "CwdError";
|
|
241162
241159
|
}
|
|
241163
241160
|
}
|
|
241164
|
-
var cGet = (cache,
|
|
241165
|
-
var cSet = (cache,
|
|
241161
|
+
var cGet = (cache, key3) => cache.get(normPath(key3));
|
|
241162
|
+
var cSet = (cache, key3, val) => cache.set(normPath(key3), val);
|
|
241166
241163
|
var checkCwd = (dir, cb) => {
|
|
241167
241164
|
fs3.stat(dir, (er2, st2) => {
|
|
241168
241165
|
if (er2 || !st2.isDirectory()) {
|
|
@@ -241533,8 +241530,8 @@ var require_unpack = __commonJS((exports, module) => {
|
|
|
241533
241530
|
}
|
|
241534
241531
|
};
|
|
241535
241532
|
var dropCache = (cache) => {
|
|
241536
|
-
for (const
|
|
241537
|
-
cache.delete(
|
|
241533
|
+
for (const key3 of cache.keys()) {
|
|
241534
|
+
cache.delete(key3);
|
|
241538
241535
|
}
|
|
241539
241536
|
};
|
|
241540
241537
|
|
|
@@ -246331,8 +246328,8 @@ var require_lib13 = __commonJS((exports, module) => {
|
|
|
246331
246328
|
function fetch2(input, options) {
|
|
246332
246329
|
return nodeFetch.fetch(input, options);
|
|
246333
246330
|
}
|
|
246334
|
-
for (const
|
|
246335
|
-
fetch2[
|
|
246331
|
+
for (const key3 in nodeFetch) {
|
|
246332
|
+
fetch2[key3] = nodeFetch[key3];
|
|
246336
246333
|
}
|
|
246337
246334
|
module.exports = fetch2;
|
|
246338
246335
|
});
|
|
@@ -246425,11 +246422,11 @@ var require_proxy = __commonJS((exports) => {
|
|
|
246425
246422
|
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;
|
|
246426
246423
|
}
|
|
246427
246424
|
e10(requireSymbols$4, "requireSymbols$4");
|
|
246428
|
-
var
|
|
246425
|
+
var errors3;
|
|
246429
246426
|
var hasRequiredErrors;
|
|
246430
246427
|
function requireErrors() {
|
|
246431
246428
|
if (hasRequiredErrors)
|
|
246432
|
-
return
|
|
246429
|
+
return errors3;
|
|
246433
246430
|
hasRequiredErrors = 1;
|
|
246434
246431
|
|
|
246435
246432
|
class A5 extends Error {
|
|
@@ -246638,7 +246635,7 @@ var require_proxy = __commonJS((exports) => {
|
|
|
246638
246635
|
super(i6, { cause: k5, ...F3 ?? {} }), this.name = "SecureProxyConnectionError", this.message = i6 || "Secure Proxy Connection failed", this.code = "UND_ERR_PRX_TLS", this.cause = k5;
|
|
246639
246636
|
}
|
|
246640
246637
|
}
|
|
246641
|
-
return
|
|
246638
|
+
return errors3 = { AbortError: Q4, HTTPParserError: Y4, UndiciError: A5, HeadersTimeoutError: c3, HeadersOverflowError: E6, BodyTimeoutError: t8, RequestContentLengthMismatchError: r6, ConnectTimeoutError: p6, ResponseStatusCodeError: B4, InvalidArgumentError: f6, InvalidReturnValueError: l3, RequestAbortedError: u6, ClientDestroyedError: a7, ClientClosedError: g6, InformationalError: n6, SocketError: d6, NotSupportedError: N6, ResponseContentLengthMismatchError: o8, BalancedPoolMissingUpstreamError: M5, ResponseExceededMaxSizeError: J4, RequestRetryError: V5, ResponseError: H4, SecureProxyConnectionError: h7 }, errors3;
|
|
246642
246639
|
}
|
|
246643
246640
|
e10(requireErrors, "requireErrors");
|
|
246644
246641
|
var constants$4;
|
|
@@ -256611,11 +256608,11 @@ var require_visit = __commonJS((exports) => {
|
|
|
256611
256608
|
visit2.BREAK = BREAK;
|
|
256612
256609
|
visit2.SKIP = SKIP;
|
|
256613
256610
|
visit2.REMOVE = REMOVE;
|
|
256614
|
-
function visit_(
|
|
256615
|
-
const ctrl = callVisitor(
|
|
256611
|
+
function visit_(key3, node, visitor, path5) {
|
|
256612
|
+
const ctrl = callVisitor(key3, node, visitor, path5);
|
|
256616
256613
|
if (identity2.isNode(ctrl) || identity2.isPair(ctrl)) {
|
|
256617
|
-
replaceNode(
|
|
256618
|
-
return visit_(
|
|
256614
|
+
replaceNode(key3, path5, ctrl);
|
|
256615
|
+
return visit_(key3, ctrl, visitor, path5);
|
|
256619
256616
|
}
|
|
256620
256617
|
if (typeof ctrl !== "symbol") {
|
|
256621
256618
|
if (identity2.isCollection(node)) {
|
|
@@ -256659,11 +256656,11 @@ var require_visit = __commonJS((exports) => {
|
|
|
256659
256656
|
visitAsync.BREAK = BREAK;
|
|
256660
256657
|
visitAsync.SKIP = SKIP;
|
|
256661
256658
|
visitAsync.REMOVE = REMOVE;
|
|
256662
|
-
async function visitAsync_(
|
|
256663
|
-
const ctrl = await callVisitor(
|
|
256659
|
+
async function visitAsync_(key3, node, visitor, path5) {
|
|
256660
|
+
const ctrl = await callVisitor(key3, node, visitor, path5);
|
|
256664
256661
|
if (identity2.isNode(ctrl) || identity2.isPair(ctrl)) {
|
|
256665
|
-
replaceNode(
|
|
256666
|
-
return visitAsync_(
|
|
256662
|
+
replaceNode(key3, path5, ctrl);
|
|
256663
|
+
return visitAsync_(key3, ctrl, visitor, path5);
|
|
256667
256664
|
}
|
|
256668
256665
|
if (typeof ctrl !== "symbol") {
|
|
256669
256666
|
if (identity2.isCollection(node)) {
|
|
@@ -256713,27 +256710,27 @@ var require_visit = __commonJS((exports) => {
|
|
|
256713
256710
|
}
|
|
256714
256711
|
return visitor;
|
|
256715
256712
|
}
|
|
256716
|
-
function callVisitor(
|
|
256713
|
+
function callVisitor(key3, node, visitor, path5) {
|
|
256717
256714
|
if (typeof visitor === "function")
|
|
256718
|
-
return visitor(
|
|
256715
|
+
return visitor(key3, node, path5);
|
|
256719
256716
|
if (identity2.isMap(node))
|
|
256720
|
-
return visitor.Map?.(
|
|
256717
|
+
return visitor.Map?.(key3, node, path5);
|
|
256721
256718
|
if (identity2.isSeq(node))
|
|
256722
|
-
return visitor.Seq?.(
|
|
256719
|
+
return visitor.Seq?.(key3, node, path5);
|
|
256723
256720
|
if (identity2.isPair(node))
|
|
256724
|
-
return visitor.Pair?.(
|
|
256721
|
+
return visitor.Pair?.(key3, node, path5);
|
|
256725
256722
|
if (identity2.isScalar(node))
|
|
256726
|
-
return visitor.Scalar?.(
|
|
256723
|
+
return visitor.Scalar?.(key3, node, path5);
|
|
256727
256724
|
if (identity2.isAlias(node))
|
|
256728
|
-
return visitor.Alias?.(
|
|
256725
|
+
return visitor.Alias?.(key3, node, path5);
|
|
256729
256726
|
return;
|
|
256730
256727
|
}
|
|
256731
|
-
function replaceNode(
|
|
256728
|
+
function replaceNode(key3, path5, node) {
|
|
256732
256729
|
const parent = path5[path5.length - 1];
|
|
256733
256730
|
if (identity2.isCollection(parent)) {
|
|
256734
|
-
parent.items[
|
|
256731
|
+
parent.items[key3] = node;
|
|
256735
256732
|
} else if (identity2.isPair(parent)) {
|
|
256736
|
-
if (
|
|
256733
|
+
if (key3 === "key")
|
|
256737
256734
|
parent.key = node;
|
|
256738
256735
|
else
|
|
256739
256736
|
parent.value = node;
|
|
@@ -256965,7 +256962,7 @@ var require_anchors = __commonJS((exports) => {
|
|
|
256965
256962
|
|
|
256966
256963
|
// ../../node_modules/yaml/dist/doc/applyReviver.js
|
|
256967
256964
|
var require_applyReviver = __commonJS((exports) => {
|
|
256968
|
-
function applyReviver(reviver, obj,
|
|
256965
|
+
function applyReviver(reviver, obj, key3, val) {
|
|
256969
256966
|
if (val && typeof val === "object") {
|
|
256970
256967
|
if (Array.isArray(val)) {
|
|
256971
256968
|
for (let i6 = 0, len = val.length;i6 < len; ++i6) {
|
|
@@ -257005,7 +257002,7 @@ var require_applyReviver = __commonJS((exports) => {
|
|
|
257005
257002
|
}
|
|
257006
257003
|
}
|
|
257007
257004
|
}
|
|
257008
|
-
return reviver.call(obj,
|
|
257005
|
+
return reviver.call(obj, key3, val);
|
|
257009
257006
|
}
|
|
257010
257007
|
exports.applyReviver = applyReviver;
|
|
257011
257008
|
});
|
|
@@ -257323,29 +257320,29 @@ var require_Collection = __commonJS((exports) => {
|
|
|
257323
257320
|
if (isEmptyPath(path5))
|
|
257324
257321
|
this.add(value4);
|
|
257325
257322
|
else {
|
|
257326
|
-
const [
|
|
257327
|
-
const node = this.get(
|
|
257323
|
+
const [key3, ...rest] = path5;
|
|
257324
|
+
const node = this.get(key3, true);
|
|
257328
257325
|
if (identity2.isCollection(node))
|
|
257329
257326
|
node.addIn(rest, value4);
|
|
257330
257327
|
else if (node === undefined && this.schema)
|
|
257331
|
-
this.set(
|
|
257328
|
+
this.set(key3, collectionFromPath(this.schema, rest, value4));
|
|
257332
257329
|
else
|
|
257333
|
-
throw new Error(`Expected YAML collection at ${
|
|
257330
|
+
throw new Error(`Expected YAML collection at ${key3}. Remaining path: ${rest}`);
|
|
257334
257331
|
}
|
|
257335
257332
|
}
|
|
257336
257333
|
deleteIn(path5) {
|
|
257337
|
-
const [
|
|
257334
|
+
const [key3, ...rest] = path5;
|
|
257338
257335
|
if (rest.length === 0)
|
|
257339
|
-
return this.delete(
|
|
257340
|
-
const node = this.get(
|
|
257336
|
+
return this.delete(key3);
|
|
257337
|
+
const node = this.get(key3, true);
|
|
257341
257338
|
if (identity2.isCollection(node))
|
|
257342
257339
|
return node.deleteIn(rest);
|
|
257343
257340
|
else
|
|
257344
|
-
throw new Error(`Expected YAML collection at ${
|
|
257341
|
+
throw new Error(`Expected YAML collection at ${key3}. Remaining path: ${rest}`);
|
|
257345
257342
|
}
|
|
257346
257343
|
getIn(path5, keepScalar) {
|
|
257347
|
-
const [
|
|
257348
|
-
const node = this.get(
|
|
257344
|
+
const [key3, ...rest] = path5;
|
|
257345
|
+
const node = this.get(key3, true);
|
|
257349
257346
|
if (rest.length === 0)
|
|
257350
257347
|
return !keepScalar && identity2.isScalar(node) ? node.value : node;
|
|
257351
257348
|
else
|
|
@@ -257360,24 +257357,24 @@ var require_Collection = __commonJS((exports) => {
|
|
|
257360
257357
|
});
|
|
257361
257358
|
}
|
|
257362
257359
|
hasIn(path5) {
|
|
257363
|
-
const [
|
|
257360
|
+
const [key3, ...rest] = path5;
|
|
257364
257361
|
if (rest.length === 0)
|
|
257365
|
-
return this.has(
|
|
257366
|
-
const node = this.get(
|
|
257362
|
+
return this.has(key3);
|
|
257363
|
+
const node = this.get(key3, true);
|
|
257367
257364
|
return identity2.isCollection(node) ? node.hasIn(rest) : false;
|
|
257368
257365
|
}
|
|
257369
257366
|
setIn(path5, value4) {
|
|
257370
|
-
const [
|
|
257367
|
+
const [key3, ...rest] = path5;
|
|
257371
257368
|
if (rest.length === 0) {
|
|
257372
|
-
this.set(
|
|
257369
|
+
this.set(key3, value4);
|
|
257373
257370
|
} else {
|
|
257374
|
-
const node = this.get(
|
|
257371
|
+
const node = this.get(key3, true);
|
|
257375
257372
|
if (identity2.isCollection(node))
|
|
257376
257373
|
node.setIn(rest, value4);
|
|
257377
257374
|
else if (node === undefined && this.schema)
|
|
257378
|
-
this.set(
|
|
257375
|
+
this.set(key3, collectionFromPath(this.schema, rest, value4));
|
|
257379
257376
|
else
|
|
257380
|
-
throw new Error(`Expected YAML collection at ${
|
|
257377
|
+
throw new Error(`Expected YAML collection at ${key3}. Remaining path: ${rest}`);
|
|
257381
257378
|
}
|
|
257382
257379
|
}
|
|
257383
257380
|
}
|
|
@@ -257965,19 +257962,19 @@ var require_stringifyPair = __commonJS((exports) => {
|
|
|
257965
257962
|
var Scalar = require_Scalar();
|
|
257966
257963
|
var stringify3 = require_stringify();
|
|
257967
257964
|
var stringifyComment = require_stringifyComment();
|
|
257968
|
-
function stringifyPair2({ key:
|
|
257965
|
+
function stringifyPair2({ key: key3, value: value4 }, ctx, onComment, onChompKeep) {
|
|
257969
257966
|
const { allNullValues, doc, indent: indent2, indentStep, options: { commentString, indentSeq, simpleKeys } } = ctx;
|
|
257970
|
-
let keyComment = identity2.isNode(
|
|
257967
|
+
let keyComment = identity2.isNode(key3) && key3.comment || null;
|
|
257971
257968
|
if (simpleKeys) {
|
|
257972
257969
|
if (keyComment) {
|
|
257973
257970
|
throw new Error("With simple keys, key nodes cannot have comments");
|
|
257974
257971
|
}
|
|
257975
|
-
if (identity2.isCollection(
|
|
257972
|
+
if (identity2.isCollection(key3) || !identity2.isNode(key3) && typeof key3 === "object") {
|
|
257976
257973
|
const msg = "With simple keys, collection cannot be used as a key value";
|
|
257977
257974
|
throw new Error(msg);
|
|
257978
257975
|
}
|
|
257979
257976
|
}
|
|
257980
|
-
let explicitKey = !simpleKeys && (!
|
|
257977
|
+
let explicitKey = !simpleKeys && (!key3 || keyComment && value4 == null && !ctx.inFlow || identity2.isCollection(key3) || (identity2.isScalar(key3) ? key3.type === Scalar.Scalar.BLOCK_FOLDED || key3.type === Scalar.Scalar.BLOCK_LITERAL : typeof key3 === "object"));
|
|
257981
257978
|
ctx = Object.assign({}, ctx, {
|
|
257982
257979
|
allNullValues: false,
|
|
257983
257980
|
implicitKey: !explicitKey && (simpleKeys || !allNullValues),
|
|
@@ -257985,7 +257982,7 @@ var require_stringifyPair = __commonJS((exports) => {
|
|
|
257985
257982
|
});
|
|
257986
257983
|
let keyCommentDone = false;
|
|
257987
257984
|
let chompKeep = false;
|
|
257988
|
-
let str = stringify3.stringify(
|
|
257985
|
+
let str = stringify3.stringify(key3, ctx, () => keyCommentDone = true, () => chompKeep = true);
|
|
257989
257986
|
if (!explicitKey && !ctx.inFlow && str.length > 1024) {
|
|
257990
257987
|
if (simpleKeys)
|
|
257991
257988
|
throw new Error("With simple keys, single line scalar must not span more than 1024 characters");
|
|
@@ -258129,7 +258126,7 @@ var require_merge = __commonJS((exports) => {
|
|
|
258129
258126
|
}),
|
|
258130
258127
|
stringify: () => MERGE_KEY
|
|
258131
258128
|
};
|
|
258132
|
-
var isMergeKey = (ctx,
|
|
258129
|
+
var isMergeKey = (ctx, key3) => (merge3.identify(key3) || identity2.isScalar(key3) && (!key3.type || key3.type === Scalar.Scalar.PLAIN) && merge3.identify(key3.value)) && ctx?.doc.schema.tags.some((tag) => tag.tag === merge3.tag && tag.default);
|
|
258133
258130
|
function addMergeToJSMap(ctx, map3, value4) {
|
|
258134
258131
|
value4 = ctx && identity2.isAlias(value4) ? value4.resolve(ctx.doc) : value4;
|
|
258135
258132
|
if (identity2.isSeq(value4))
|
|
@@ -258146,14 +258143,14 @@ var require_merge = __commonJS((exports) => {
|
|
|
258146
258143
|
if (!identity2.isMap(source))
|
|
258147
258144
|
throw new Error("Merge sources must be maps or map aliases");
|
|
258148
258145
|
const srcMap = source.toJSON(null, ctx, Map);
|
|
258149
|
-
for (const [
|
|
258146
|
+
for (const [key3, value5] of srcMap) {
|
|
258150
258147
|
if (map3 instanceof Map) {
|
|
258151
|
-
if (!map3.has(
|
|
258152
|
-
map3.set(
|
|
258148
|
+
if (!map3.has(key3))
|
|
258149
|
+
map3.set(key3, value5);
|
|
258153
258150
|
} else if (map3 instanceof Set) {
|
|
258154
|
-
map3.add(
|
|
258155
|
-
} else if (!Object.prototype.hasOwnProperty.call(map3,
|
|
258156
|
-
Object.defineProperty(map3,
|
|
258151
|
+
map3.add(key3);
|
|
258152
|
+
} else if (!Object.prototype.hasOwnProperty.call(map3, key3)) {
|
|
258153
|
+
Object.defineProperty(map3, key3, {
|
|
258157
258154
|
value: value5,
|
|
258158
258155
|
writable: true,
|
|
258159
258156
|
enumerable: true,
|
|
@@ -258175,19 +258172,19 @@ var require_addPairToJSMap = __commonJS((exports) => {
|
|
|
258175
258172
|
var stringify3 = require_stringify();
|
|
258176
258173
|
var identity2 = require_identity();
|
|
258177
258174
|
var toJS = require_toJS();
|
|
258178
|
-
function addPairToJSMap(ctx, map3, { key:
|
|
258179
|
-
if (identity2.isNode(
|
|
258180
|
-
|
|
258181
|
-
else if (merge3.isMergeKey(ctx,
|
|
258175
|
+
function addPairToJSMap(ctx, map3, { key: key3, value: value4 }) {
|
|
258176
|
+
if (identity2.isNode(key3) && key3.addToJSMap)
|
|
258177
|
+
key3.addToJSMap(ctx, map3, value4);
|
|
258178
|
+
else if (merge3.isMergeKey(ctx, key3))
|
|
258182
258179
|
merge3.addMergeToJSMap(ctx, map3, value4);
|
|
258183
258180
|
else {
|
|
258184
|
-
const jsKey = toJS.toJS(
|
|
258181
|
+
const jsKey = toJS.toJS(key3, "", ctx);
|
|
258185
258182
|
if (map3 instanceof Map) {
|
|
258186
258183
|
map3.set(jsKey, toJS.toJS(value4, jsKey, ctx));
|
|
258187
258184
|
} else if (map3 instanceof Set) {
|
|
258188
258185
|
map3.add(jsKey);
|
|
258189
258186
|
} else {
|
|
258190
|
-
const stringKey = stringifyKey(
|
|
258187
|
+
const stringKey = stringifyKey(key3, jsKey, ctx);
|
|
258191
258188
|
const jsValue = toJS.toJS(value4, stringKey, ctx);
|
|
258192
258189
|
if (stringKey in map3)
|
|
258193
258190
|
Object.defineProperty(map3, stringKey, {
|
|
@@ -258202,19 +258199,19 @@ var require_addPairToJSMap = __commonJS((exports) => {
|
|
|
258202
258199
|
}
|
|
258203
258200
|
return map3;
|
|
258204
258201
|
}
|
|
258205
|
-
function stringifyKey(
|
|
258202
|
+
function stringifyKey(key3, jsKey, ctx) {
|
|
258206
258203
|
if (jsKey === null)
|
|
258207
258204
|
return "";
|
|
258208
258205
|
if (typeof jsKey !== "object")
|
|
258209
258206
|
return String(jsKey);
|
|
258210
|
-
if (identity2.isNode(
|
|
258207
|
+
if (identity2.isNode(key3) && ctx?.doc) {
|
|
258211
258208
|
const strCtx = stringify3.createStringifyContext(ctx.doc, {});
|
|
258212
258209
|
strCtx.anchors = new Set;
|
|
258213
258210
|
for (const node of ctx.anchors.keys())
|
|
258214
258211
|
strCtx.anchors.add(node.anchor);
|
|
258215
258212
|
strCtx.inFlow = true;
|
|
258216
258213
|
strCtx.inStringifyKey = true;
|
|
258217
|
-
const strKey =
|
|
258214
|
+
const strKey = key3.toString(strCtx);
|
|
258218
258215
|
if (!ctx.mapKeyWarned) {
|
|
258219
258216
|
let jsonStr = JSON.stringify(strKey);
|
|
258220
258217
|
if (jsonStr.length > 40)
|
|
@@ -258235,25 +258232,25 @@ var require_Pair = __commonJS((exports) => {
|
|
|
258235
258232
|
var stringifyPair2 = require_stringifyPair();
|
|
258236
258233
|
var addPairToJSMap = require_addPairToJSMap();
|
|
258237
258234
|
var identity2 = require_identity();
|
|
258238
|
-
function createPair(
|
|
258239
|
-
const k5 = createNode.createNode(
|
|
258235
|
+
function createPair(key3, value4, ctx) {
|
|
258236
|
+
const k5 = createNode.createNode(key3, undefined, ctx);
|
|
258240
258237
|
const v7 = createNode.createNode(value4, undefined, ctx);
|
|
258241
258238
|
return new Pair(k5, v7);
|
|
258242
258239
|
}
|
|
258243
258240
|
|
|
258244
258241
|
class Pair {
|
|
258245
|
-
constructor(
|
|
258242
|
+
constructor(key3, value4 = null) {
|
|
258246
258243
|
Object.defineProperty(this, identity2.NODE_TYPE, { value: identity2.PAIR });
|
|
258247
|
-
this.key =
|
|
258244
|
+
this.key = key3;
|
|
258248
258245
|
this.value = value4;
|
|
258249
258246
|
}
|
|
258250
258247
|
clone(schema) {
|
|
258251
|
-
let { key:
|
|
258252
|
-
if (identity2.isNode(
|
|
258253
|
-
|
|
258248
|
+
let { key: key3, value: value4 } = this;
|
|
258249
|
+
if (identity2.isNode(key3))
|
|
258250
|
+
key3 = key3.clone(schema);
|
|
258254
258251
|
if (identity2.isNode(value4))
|
|
258255
258252
|
value4 = value4.clone(schema);
|
|
258256
|
-
return new Pair(
|
|
258253
|
+
return new Pair(key3, value4);
|
|
258257
258254
|
}
|
|
258258
258255
|
toJSON(_5, ctx) {
|
|
258259
258256
|
const pair = ctx?.mapAsMap ? new Map : {};
|
|
@@ -258420,11 +258417,11 @@ var require_YAMLMap = __commonJS((exports) => {
|
|
|
258420
258417
|
var identity2 = require_identity();
|
|
258421
258418
|
var Pair = require_Pair();
|
|
258422
258419
|
var Scalar = require_Scalar();
|
|
258423
|
-
function findPair(items,
|
|
258424
|
-
const k5 = identity2.isScalar(
|
|
258420
|
+
function findPair(items, key3) {
|
|
258421
|
+
const k5 = identity2.isScalar(key3) ? key3.value : key3;
|
|
258425
258422
|
for (const it2 of items) {
|
|
258426
258423
|
if (identity2.isPair(it2)) {
|
|
258427
|
-
if (it2.key ===
|
|
258424
|
+
if (it2.key === key3 || it2.key === k5)
|
|
258428
258425
|
return it2;
|
|
258429
258426
|
if (identity2.isScalar(it2.key) && it2.key.value === k5)
|
|
258430
258427
|
return it2;
|
|
@@ -258444,20 +258441,20 @@ var require_YAMLMap = __commonJS((exports) => {
|
|
|
258444
258441
|
static from(schema, obj, ctx) {
|
|
258445
258442
|
const { keepUndefined, replacer } = ctx;
|
|
258446
258443
|
const map3 = new this(schema);
|
|
258447
|
-
const add = (
|
|
258444
|
+
const add = (key3, value4) => {
|
|
258448
258445
|
if (typeof replacer === "function")
|
|
258449
|
-
value4 = replacer.call(obj,
|
|
258450
|
-
else if (Array.isArray(replacer) && !replacer.includes(
|
|
258446
|
+
value4 = replacer.call(obj, key3, value4);
|
|
258447
|
+
else if (Array.isArray(replacer) && !replacer.includes(key3))
|
|
258451
258448
|
return;
|
|
258452
258449
|
if (value4 !== undefined || keepUndefined)
|
|
258453
|
-
map3.items.push(Pair.createPair(
|
|
258450
|
+
map3.items.push(Pair.createPair(key3, value4, ctx));
|
|
258454
258451
|
};
|
|
258455
258452
|
if (obj instanceof Map) {
|
|
258456
|
-
for (const [
|
|
258457
|
-
add(
|
|
258453
|
+
for (const [key3, value4] of obj)
|
|
258454
|
+
add(key3, value4);
|
|
258458
258455
|
} else if (obj && typeof obj === "object") {
|
|
258459
|
-
for (const
|
|
258460
|
-
add(
|
|
258456
|
+
for (const key3 of Object.keys(obj))
|
|
258457
|
+
add(key3, obj[key3]);
|
|
258461
258458
|
}
|
|
258462
258459
|
if (typeof schema.sortMapEntries === "function") {
|
|
258463
258460
|
map3.items.sort(schema.sortMapEntries);
|
|
@@ -258491,23 +258488,23 @@ var require_YAMLMap = __commonJS((exports) => {
|
|
|
258491
258488
|
this.items.push(_pair);
|
|
258492
258489
|
}
|
|
258493
258490
|
}
|
|
258494
|
-
delete(
|
|
258495
|
-
const it2 = findPair(this.items,
|
|
258491
|
+
delete(key3) {
|
|
258492
|
+
const it2 = findPair(this.items, key3);
|
|
258496
258493
|
if (!it2)
|
|
258497
258494
|
return false;
|
|
258498
258495
|
const del = this.items.splice(this.items.indexOf(it2), 1);
|
|
258499
258496
|
return del.length > 0;
|
|
258500
258497
|
}
|
|
258501
|
-
get(
|
|
258502
|
-
const it2 = findPair(this.items,
|
|
258498
|
+
get(key3, keepScalar) {
|
|
258499
|
+
const it2 = findPair(this.items, key3);
|
|
258503
258500
|
const node = it2?.value;
|
|
258504
258501
|
return (!keepScalar && identity2.isScalar(node) ? node.value : node) ?? undefined;
|
|
258505
258502
|
}
|
|
258506
|
-
has(
|
|
258507
|
-
return !!findPair(this.items,
|
|
258503
|
+
has(key3) {
|
|
258504
|
+
return !!findPair(this.items, key3);
|
|
258508
258505
|
}
|
|
258509
|
-
set(
|
|
258510
|
-
this.add(new Pair.Pair(
|
|
258506
|
+
set(key3, value4) {
|
|
258507
|
+
this.add(new Pair.Pair(key3, value4), true);
|
|
258511
258508
|
}
|
|
258512
258509
|
toJSON(_5, ctx, Type) {
|
|
258513
258510
|
const map3 = Type ? new Type : ctx?.mapAsMap ? new Map : {};
|
|
@@ -258578,28 +258575,28 @@ var require_YAMLSeq = __commonJS((exports) => {
|
|
|
258578
258575
|
add(value4) {
|
|
258579
258576
|
this.items.push(value4);
|
|
258580
258577
|
}
|
|
258581
|
-
delete(
|
|
258582
|
-
const idx = asItemIndex(
|
|
258578
|
+
delete(key3) {
|
|
258579
|
+
const idx = asItemIndex(key3);
|
|
258583
258580
|
if (typeof idx !== "number")
|
|
258584
258581
|
return false;
|
|
258585
258582
|
const del = this.items.splice(idx, 1);
|
|
258586
258583
|
return del.length > 0;
|
|
258587
258584
|
}
|
|
258588
|
-
get(
|
|
258589
|
-
const idx = asItemIndex(
|
|
258585
|
+
get(key3, keepScalar) {
|
|
258586
|
+
const idx = asItemIndex(key3);
|
|
258590
258587
|
if (typeof idx !== "number")
|
|
258591
258588
|
return;
|
|
258592
258589
|
const it2 = this.items[idx];
|
|
258593
258590
|
return !keepScalar && identity2.isScalar(it2) ? it2.value : it2;
|
|
258594
258591
|
}
|
|
258595
|
-
has(
|
|
258596
|
-
const idx = asItemIndex(
|
|
258592
|
+
has(key3) {
|
|
258593
|
+
const idx = asItemIndex(key3);
|
|
258597
258594
|
return typeof idx === "number" && idx < this.items.length;
|
|
258598
258595
|
}
|
|
258599
|
-
set(
|
|
258600
|
-
const idx = asItemIndex(
|
|
258596
|
+
set(key3, value4) {
|
|
258597
|
+
const idx = asItemIndex(key3);
|
|
258601
258598
|
if (typeof idx !== "number")
|
|
258602
|
-
throw new Error(`Expected a valid index, not ${
|
|
258599
|
+
throw new Error(`Expected a valid index, not ${key3}.`);
|
|
258603
258600
|
const prev = this.items[idx];
|
|
258604
258601
|
if (identity2.isScalar(prev) && Scalar.isScalarValue(value4))
|
|
258605
258602
|
prev.value = value4;
|
|
@@ -258633,8 +258630,8 @@ var require_YAMLSeq = __commonJS((exports) => {
|
|
|
258633
258630
|
let i6 = 0;
|
|
258634
258631
|
for (let it2 of obj) {
|
|
258635
258632
|
if (typeof replacer === "function") {
|
|
258636
|
-
const
|
|
258637
|
-
it2 = replacer.call(obj,
|
|
258633
|
+
const key3 = obj instanceof Set ? it2 : String(i6++);
|
|
258634
|
+
it2 = replacer.call(obj, key3, it2);
|
|
258638
258635
|
}
|
|
258639
258636
|
seq.items.push(createNode.createNode(it2, undefined, ctx));
|
|
258640
258637
|
}
|
|
@@ -258642,8 +258639,8 @@ var require_YAMLSeq = __commonJS((exports) => {
|
|
|
258642
258639
|
return seq;
|
|
258643
258640
|
}
|
|
258644
258641
|
}
|
|
258645
|
-
function asItemIndex(
|
|
258646
|
-
let idx = identity2.isScalar(
|
|
258642
|
+
function asItemIndex(key3) {
|
|
258643
|
+
let idx = identity2.isScalar(key3) ? key3.value : key3;
|
|
258647
258644
|
if (idx && typeof idx === "string")
|
|
258648
258645
|
idx = Number(idx);
|
|
258649
258646
|
return typeof idx === "number" && Number.isInteger(idx) && idx >= 0 ? idx : null;
|
|
@@ -259015,25 +259012,25 @@ ${cn.comment}` : item.comment;
|
|
|
259015
259012
|
for (let it2 of iterable) {
|
|
259016
259013
|
if (typeof replacer === "function")
|
|
259017
259014
|
it2 = replacer.call(iterable, String(i6++), it2);
|
|
259018
|
-
let
|
|
259015
|
+
let key3, value4;
|
|
259019
259016
|
if (Array.isArray(it2)) {
|
|
259020
259017
|
if (it2.length === 2) {
|
|
259021
|
-
|
|
259018
|
+
key3 = it2[0];
|
|
259022
259019
|
value4 = it2[1];
|
|
259023
259020
|
} else
|
|
259024
259021
|
throw new TypeError(`Expected [key, value] tuple: ${it2}`);
|
|
259025
259022
|
} else if (it2 && it2 instanceof Object) {
|
|
259026
259023
|
const keys = Object.keys(it2);
|
|
259027
259024
|
if (keys.length === 1) {
|
|
259028
|
-
|
|
259029
|
-
value4 = it2[
|
|
259025
|
+
key3 = keys[0];
|
|
259026
|
+
value4 = it2[key3];
|
|
259030
259027
|
} else {
|
|
259031
259028
|
throw new TypeError(`Expected tuple with one key, not ${keys.length} keys`);
|
|
259032
259029
|
}
|
|
259033
259030
|
} else {
|
|
259034
|
-
|
|
259031
|
+
key3 = it2;
|
|
259035
259032
|
}
|
|
259036
|
-
pairs2.items.push(Pair.createPair(
|
|
259033
|
+
pairs2.items.push(Pair.createPair(key3, value4, ctx));
|
|
259037
259034
|
}
|
|
259038
259035
|
return pairs2;
|
|
259039
259036
|
}
|
|
@@ -259074,16 +259071,16 @@ var require_omap = __commonJS((exports) => {
|
|
|
259074
259071
|
if (ctx?.onCreate)
|
|
259075
259072
|
ctx.onCreate(map3);
|
|
259076
259073
|
for (const pair of this.items) {
|
|
259077
|
-
let
|
|
259074
|
+
let key3, value4;
|
|
259078
259075
|
if (identity2.isPair(pair)) {
|
|
259079
|
-
|
|
259080
|
-
value4 = toJS.toJS(pair.value,
|
|
259076
|
+
key3 = toJS.toJS(pair.key, "", ctx);
|
|
259077
|
+
value4 = toJS.toJS(pair.value, key3, ctx);
|
|
259081
259078
|
} else {
|
|
259082
|
-
|
|
259079
|
+
key3 = toJS.toJS(pair, "", ctx);
|
|
259083
259080
|
}
|
|
259084
|
-
if (map3.has(
|
|
259081
|
+
if (map3.has(key3))
|
|
259085
259082
|
throw new Error("Ordered maps must not include duplicate keys");
|
|
259086
|
-
map3.set(
|
|
259083
|
+
map3.set(key3, value4);
|
|
259087
259084
|
}
|
|
259088
259085
|
return map3;
|
|
259089
259086
|
}
|
|
@@ -259104,12 +259101,12 @@ var require_omap = __commonJS((exports) => {
|
|
|
259104
259101
|
resolve(seq, onError) {
|
|
259105
259102
|
const pairs$1 = pairs.resolvePairs(seq, onError);
|
|
259106
259103
|
const seenKeys = [];
|
|
259107
|
-
for (const { key:
|
|
259108
|
-
if (identity2.isScalar(
|
|
259109
|
-
if (seenKeys.includes(
|
|
259110
|
-
onError(`Ordered maps must not include duplicate keys: ${
|
|
259104
|
+
for (const { key: key3 } of pairs$1.items) {
|
|
259105
|
+
if (identity2.isScalar(key3)) {
|
|
259106
|
+
if (seenKeys.includes(key3.value)) {
|
|
259107
|
+
onError(`Ordered maps must not include duplicate keys: ${key3.value}`);
|
|
259111
259108
|
} else {
|
|
259112
|
-
seenKeys.push(
|
|
259109
|
+
seenKeys.push(key3.value);
|
|
259113
259110
|
}
|
|
259114
259111
|
}
|
|
259115
259112
|
}
|
|
@@ -259283,30 +259280,30 @@ var require_set = __commonJS((exports) => {
|
|
|
259283
259280
|
super(schema);
|
|
259284
259281
|
this.tag = YAMLSet.tag;
|
|
259285
259282
|
}
|
|
259286
|
-
add(
|
|
259283
|
+
add(key3) {
|
|
259287
259284
|
let pair;
|
|
259288
|
-
if (identity2.isPair(
|
|
259289
|
-
pair =
|
|
259290
|
-
else if (
|
|
259291
|
-
pair = new Pair.Pair(
|
|
259285
|
+
if (identity2.isPair(key3))
|
|
259286
|
+
pair = key3;
|
|
259287
|
+
else if (key3 && typeof key3 === "object" && "key" in key3 && "value" in key3 && key3.value === null)
|
|
259288
|
+
pair = new Pair.Pair(key3.key, null);
|
|
259292
259289
|
else
|
|
259293
|
-
pair = new Pair.Pair(
|
|
259290
|
+
pair = new Pair.Pair(key3, null);
|
|
259294
259291
|
const prev = YAMLMap.findPair(this.items, pair.key);
|
|
259295
259292
|
if (!prev)
|
|
259296
259293
|
this.items.push(pair);
|
|
259297
259294
|
}
|
|
259298
|
-
get(
|
|
259299
|
-
const pair = YAMLMap.findPair(this.items,
|
|
259295
|
+
get(key3, keepPair) {
|
|
259296
|
+
const pair = YAMLMap.findPair(this.items, key3);
|
|
259300
259297
|
return !keepPair && identity2.isPair(pair) ? identity2.isScalar(pair.key) ? pair.key.value : pair.key : pair;
|
|
259301
259298
|
}
|
|
259302
|
-
set(
|
|
259299
|
+
set(key3, value4) {
|
|
259303
259300
|
if (typeof value4 !== "boolean")
|
|
259304
259301
|
throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof value4}`);
|
|
259305
|
-
const prev = YAMLMap.findPair(this.items,
|
|
259302
|
+
const prev = YAMLMap.findPair(this.items, key3);
|
|
259306
259303
|
if (prev && !value4) {
|
|
259307
259304
|
this.items.splice(this.items.indexOf(prev), 1);
|
|
259308
259305
|
} else if (!prev && value4) {
|
|
259309
|
-
this.items.push(new Pair.Pair(
|
|
259306
|
+
this.items.push(new Pair.Pair(key3));
|
|
259310
259307
|
}
|
|
259311
259308
|
}
|
|
259312
259309
|
toJSON(_5, ctx) {
|
|
@@ -259541,7 +259538,7 @@ var require_tags = __commonJS((exports) => {
|
|
|
259541
259538
|
if (Array.isArray(customTags))
|
|
259542
259539
|
tags = [];
|
|
259543
259540
|
else {
|
|
259544
|
-
const keys = Array.from(schemas.keys()).filter((
|
|
259541
|
+
const keys = Array.from(schemas.keys()).filter((key3) => key3 !== "yaml11").map((key3) => JSON.stringify(key3)).join(", ");
|
|
259545
259542
|
throw new Error(`Unknown schema "${schemaName}"; use one of ${keys} or define customTags array`);
|
|
259546
259543
|
}
|
|
259547
259544
|
}
|
|
@@ -259557,7 +259554,7 @@ var require_tags = __commonJS((exports) => {
|
|
|
259557
259554
|
const tagObj = typeof tag === "string" ? tagsByName[tag] : tag;
|
|
259558
259555
|
if (!tagObj) {
|
|
259559
259556
|
const tagName = JSON.stringify(tag);
|
|
259560
|
-
const keys = Object.keys(tagsByName).map((
|
|
259557
|
+
const keys = Object.keys(tagsByName).map((key3) => JSON.stringify(key3)).join(", ");
|
|
259561
259558
|
throw new Error(`Unknown custom tag ${tagName}; use one of ${keys}`);
|
|
259562
259559
|
}
|
|
259563
259560
|
if (!tags2.includes(tagObj))
|
|
@@ -259792,13 +259789,13 @@ var require_Document = __commonJS((exports) => {
|
|
|
259792
259789
|
setAnchors();
|
|
259793
259790
|
return node;
|
|
259794
259791
|
}
|
|
259795
|
-
createPair(
|
|
259796
|
-
const k5 = this.createNode(
|
|
259792
|
+
createPair(key3, value4, options = {}) {
|
|
259793
|
+
const k5 = this.createNode(key3, null, options);
|
|
259797
259794
|
const v7 = this.createNode(value4, null, options);
|
|
259798
259795
|
return new Pair.Pair(k5, v7);
|
|
259799
259796
|
}
|
|
259800
|
-
delete(
|
|
259801
|
-
return assertCollection(this.contents) ? this.contents.delete(
|
|
259797
|
+
delete(key3) {
|
|
259798
|
+
return assertCollection(this.contents) ? this.contents.delete(key3) : false;
|
|
259802
259799
|
}
|
|
259803
259800
|
deleteIn(path5) {
|
|
259804
259801
|
if (Collection.isEmptyPath(path5)) {
|
|
@@ -259809,27 +259806,27 @@ var require_Document = __commonJS((exports) => {
|
|
|
259809
259806
|
}
|
|
259810
259807
|
return assertCollection(this.contents) ? this.contents.deleteIn(path5) : false;
|
|
259811
259808
|
}
|
|
259812
|
-
get(
|
|
259813
|
-
return identity2.isCollection(this.contents) ? this.contents.get(
|
|
259809
|
+
get(key3, keepScalar) {
|
|
259810
|
+
return identity2.isCollection(this.contents) ? this.contents.get(key3, keepScalar) : undefined;
|
|
259814
259811
|
}
|
|
259815
259812
|
getIn(path5, keepScalar) {
|
|
259816
259813
|
if (Collection.isEmptyPath(path5))
|
|
259817
259814
|
return !keepScalar && identity2.isScalar(this.contents) ? this.contents.value : this.contents;
|
|
259818
259815
|
return identity2.isCollection(this.contents) ? this.contents.getIn(path5, keepScalar) : undefined;
|
|
259819
259816
|
}
|
|
259820
|
-
has(
|
|
259821
|
-
return identity2.isCollection(this.contents) ? this.contents.has(
|
|
259817
|
+
has(key3) {
|
|
259818
|
+
return identity2.isCollection(this.contents) ? this.contents.has(key3) : false;
|
|
259822
259819
|
}
|
|
259823
259820
|
hasIn(path5) {
|
|
259824
259821
|
if (Collection.isEmptyPath(path5))
|
|
259825
259822
|
return this.contents !== undefined;
|
|
259826
259823
|
return identity2.isCollection(this.contents) ? this.contents.hasIn(path5) : false;
|
|
259827
259824
|
}
|
|
259828
|
-
set(
|
|
259825
|
+
set(key3, value4) {
|
|
259829
259826
|
if (this.contents == null) {
|
|
259830
|
-
this.contents = Collection.collectionFromPath(this.schema, [
|
|
259827
|
+
this.contents = Collection.collectionFromPath(this.schema, [key3], value4);
|
|
259831
259828
|
} else if (assertCollection(this.contents)) {
|
|
259832
|
-
this.contents.set(
|
|
259829
|
+
this.contents.set(key3, value4);
|
|
259833
259830
|
}
|
|
259834
259831
|
}
|
|
259835
259832
|
setIn(path5, value4) {
|
|
@@ -260113,25 +260110,25 @@ var require_resolve_props = __commonJS((exports) => {
|
|
|
260113
260110
|
|
|
260114
260111
|
// ../../node_modules/yaml/dist/compose/util-contains-newline.js
|
|
260115
260112
|
var require_util_contains_newline = __commonJS((exports) => {
|
|
260116
|
-
function containsNewline(
|
|
260117
|
-
if (!
|
|
260113
|
+
function containsNewline(key3) {
|
|
260114
|
+
if (!key3)
|
|
260118
260115
|
return null;
|
|
260119
|
-
switch (
|
|
260116
|
+
switch (key3.type) {
|
|
260120
260117
|
case "alias":
|
|
260121
260118
|
case "scalar":
|
|
260122
260119
|
case "double-quoted-scalar":
|
|
260123
260120
|
case "single-quoted-scalar":
|
|
260124
|
-
if (
|
|
260121
|
+
if (key3.source.includes(`
|
|
260125
260122
|
`))
|
|
260126
260123
|
return true;
|
|
260127
|
-
if (
|
|
260128
|
-
for (const st2 of
|
|
260124
|
+
if (key3.end) {
|
|
260125
|
+
for (const st2 of key3.end)
|
|
260129
260126
|
if (st2.type === "newline")
|
|
260130
260127
|
return true;
|
|
260131
260128
|
}
|
|
260132
260129
|
return false;
|
|
260133
260130
|
case "flow-collection":
|
|
260134
|
-
for (const it2 of
|
|
260131
|
+
for (const it2 of key3.items) {
|
|
260135
260132
|
for (const st2 of it2.start)
|
|
260136
260133
|
if (st2.type === "newline")
|
|
260137
260134
|
return true;
|
|
@@ -260196,10 +260193,10 @@ var require_resolve_block_map = __commonJS((exports) => {
|
|
|
260196
260193
|
let offset = bm.offset;
|
|
260197
260194
|
let commentEnd = null;
|
|
260198
260195
|
for (const collItem of bm.items) {
|
|
260199
|
-
const { start: start3, key:
|
|
260196
|
+
const { start: start3, key: key3, sep: sep3, value: value4 } = collItem;
|
|
260200
260197
|
const keyProps = resolveProps.resolveProps(start3, {
|
|
260201
260198
|
indicator: "explicit-key-ind",
|
|
260202
|
-
next:
|
|
260199
|
+
next: key3 ?? sep3?.[0],
|
|
260203
260200
|
offset,
|
|
260204
260201
|
onError,
|
|
260205
260202
|
parentIndent: bm.indent,
|
|
@@ -260207,10 +260204,10 @@ var require_resolve_block_map = __commonJS((exports) => {
|
|
|
260207
260204
|
});
|
|
260208
260205
|
const implicitKey = !keyProps.found;
|
|
260209
260206
|
if (implicitKey) {
|
|
260210
|
-
if (
|
|
260211
|
-
if (
|
|
260207
|
+
if (key3) {
|
|
260208
|
+
if (key3.type === "block-seq")
|
|
260212
260209
|
onError(offset, "BLOCK_AS_IMPLICIT_KEY", "A block sequence may not be used as an implicit map key");
|
|
260213
|
-
else if ("indent" in
|
|
260210
|
+
else if ("indent" in key3 && key3.indent !== bm.indent)
|
|
260214
260211
|
onError(offset, "BAD_INDENT", startColMsg);
|
|
260215
260212
|
}
|
|
260216
260213
|
if (!keyProps.anchor && !keyProps.tag && !sep3) {
|
|
@@ -260224,17 +260221,17 @@ var require_resolve_block_map = __commonJS((exports) => {
|
|
|
260224
260221
|
}
|
|
260225
260222
|
continue;
|
|
260226
260223
|
}
|
|
260227
|
-
if (keyProps.newlineAfterProp || utilContainsNewline.containsNewline(
|
|
260228
|
-
onError(
|
|
260224
|
+
if (keyProps.newlineAfterProp || utilContainsNewline.containsNewline(key3)) {
|
|
260225
|
+
onError(key3 ?? start3[start3.length - 1], "MULTILINE_IMPLICIT_KEY", "Implicit keys need to be on a single line");
|
|
260229
260226
|
}
|
|
260230
260227
|
} else if (keyProps.found?.indent !== bm.indent) {
|
|
260231
260228
|
onError(offset, "BAD_INDENT", startColMsg);
|
|
260232
260229
|
}
|
|
260233
260230
|
ctx.atKey = true;
|
|
260234
260231
|
const keyStart = keyProps.end;
|
|
260235
|
-
const keyNode =
|
|
260232
|
+
const keyNode = key3 ? composeNode(ctx, key3, keyProps, onError) : composeEmptyNode(ctx, keyStart, start3, null, keyProps, onError);
|
|
260236
260233
|
if (ctx.schema.compat)
|
|
260237
|
-
utilFlowIndentCheck.flowIndentCheck(bm.indent,
|
|
260234
|
+
utilFlowIndentCheck.flowIndentCheck(bm.indent, key3, onError);
|
|
260238
260235
|
ctx.atKey = false;
|
|
260239
260236
|
if (utilMapIncludes.mapIncludes(ctx, map3.items, keyNode))
|
|
260240
260237
|
onError(keyStart, "DUPLICATE_KEY", "Map keys must be unique");
|
|
@@ -260244,7 +260241,7 @@ var require_resolve_block_map = __commonJS((exports) => {
|
|
|
260244
260241
|
offset: keyNode.range[2],
|
|
260245
260242
|
onError,
|
|
260246
260243
|
parentIndent: bm.indent,
|
|
260247
|
-
startOnNewline: !
|
|
260244
|
+
startOnNewline: !key3 || key3.type === "block-scalar"
|
|
260248
260245
|
});
|
|
260249
260246
|
offset = valueProps.end;
|
|
260250
260247
|
if (valueProps.found) {
|
|
@@ -260400,11 +260397,11 @@ var require_resolve_flow_collection = __commonJS((exports) => {
|
|
|
260400
260397
|
let offset = fc.offset + fc.start.source.length;
|
|
260401
260398
|
for (let i6 = 0;i6 < fc.items.length; ++i6) {
|
|
260402
260399
|
const collItem = fc.items[i6];
|
|
260403
|
-
const { start: start3, key:
|
|
260400
|
+
const { start: start3, key: key3, sep: sep3, value: value4 } = collItem;
|
|
260404
260401
|
const props = resolveProps.resolveProps(start3, {
|
|
260405
260402
|
flow: fcName,
|
|
260406
260403
|
indicator: "explicit-key-ind",
|
|
260407
|
-
next:
|
|
260404
|
+
next: key3 ?? sep3?.[0],
|
|
260408
260405
|
offset,
|
|
260409
260406
|
onError,
|
|
260410
260407
|
parentIndent: fc.indent,
|
|
@@ -260426,8 +260423,8 @@ var require_resolve_flow_collection = __commonJS((exports) => {
|
|
|
260426
260423
|
offset = props.end;
|
|
260427
260424
|
continue;
|
|
260428
260425
|
}
|
|
260429
|
-
if (!isMap && ctx.options.strict && utilContainsNewline.containsNewline(
|
|
260430
|
-
onError(
|
|
260426
|
+
if (!isMap && ctx.options.strict && utilContainsNewline.containsNewline(key3))
|
|
260427
|
+
onError(key3, "MULTILINE_IMPLICIT_KEY", "Implicit keys of flow sequence pairs need to be on a single line");
|
|
260431
260428
|
}
|
|
260432
260429
|
if (i6 === 0) {
|
|
260433
260430
|
if (props.comma)
|
|
@@ -260472,8 +260469,8 @@ var require_resolve_flow_collection = __commonJS((exports) => {
|
|
|
260472
260469
|
} else {
|
|
260473
260470
|
ctx.atKey = true;
|
|
260474
260471
|
const keyStart = props.end;
|
|
260475
|
-
const keyNode =
|
|
260476
|
-
if (isBlock(
|
|
260472
|
+
const keyNode = key3 ? composeNode(ctx, key3, props, onError) : composeEmptyNode(ctx, keyStart, start3, null, props, onError);
|
|
260473
|
+
if (isBlock(key3))
|
|
260477
260474
|
onError(keyNode.range, "BLOCK_IN_FLOW", blockMsg);
|
|
260478
260475
|
ctx.atKey = false;
|
|
260479
260476
|
const valueProps = resolveProps.resolveProps(sep3 ?? [], {
|
|
@@ -261285,7 +261282,7 @@ var require_composer = __commonJS((exports) => {
|
|
|
261285
261282
|
var node_process = __require("node:process");
|
|
261286
261283
|
var directives4 = require_directives2();
|
|
261287
261284
|
var Document = require_Document();
|
|
261288
|
-
var
|
|
261285
|
+
var errors3 = require_errors3();
|
|
261289
261286
|
var identity2 = require_identity();
|
|
261290
261287
|
var composeDoc = require_compose_doc();
|
|
261291
261288
|
var resolveEnd = require_resolve_end();
|
|
@@ -261336,9 +261333,9 @@ var require_composer = __commonJS((exports) => {
|
|
|
261336
261333
|
this.onError = (source, code2, message, warning) => {
|
|
261337
261334
|
const pos = getErrorPos(source);
|
|
261338
261335
|
if (warning)
|
|
261339
|
-
this.warnings.push(new
|
|
261336
|
+
this.warnings.push(new errors3.YAMLWarning(pos, code2, message));
|
|
261340
261337
|
else
|
|
261341
|
-
this.errors.push(new
|
|
261338
|
+
this.errors.push(new errors3.YAMLParseError(pos, code2, message));
|
|
261342
261339
|
};
|
|
261343
261340
|
this.directives = new directives4.Directives({ version: options.version || "1.2" });
|
|
261344
261341
|
this.options = options;
|
|
@@ -261422,7 +261419,7 @@ ${cb}` : comment;
|
|
|
261422
261419
|
break;
|
|
261423
261420
|
case "error": {
|
|
261424
261421
|
const msg = token.source ? `${token.message}: ${JSON.stringify(token.source)}` : token.message;
|
|
261425
|
-
const error5 = new
|
|
261422
|
+
const error5 = new errors3.YAMLParseError(getErrorPos(token), "UNEXPECTED_TOKEN", msg);
|
|
261426
261423
|
if (this.atDirectives || !this.doc)
|
|
261427
261424
|
this.errors.push(error5);
|
|
261428
261425
|
else
|
|
@@ -261432,7 +261429,7 @@ ${cb}` : comment;
|
|
|
261432
261429
|
case "doc-end": {
|
|
261433
261430
|
if (!this.doc) {
|
|
261434
261431
|
const msg = "Unexpected doc-end without preceding document";
|
|
261435
|
-
this.errors.push(new
|
|
261432
|
+
this.errors.push(new errors3.YAMLParseError(getErrorPos(token), "UNEXPECTED_TOKEN", msg));
|
|
261436
261433
|
break;
|
|
261437
261434
|
}
|
|
261438
261435
|
this.doc.directives.docEnd = true;
|
|
@@ -261447,7 +261444,7 @@ ${end.comment}` : end.comment;
|
|
|
261447
261444
|
break;
|
|
261448
261445
|
}
|
|
261449
261446
|
default:
|
|
261450
|
-
this.errors.push(new
|
|
261447
|
+
this.errors.push(new errors3.YAMLParseError(getErrorPos(token), "UNEXPECTED_TOKEN", `Unsupported token ${token.type}`));
|
|
261451
261448
|
}
|
|
261452
261449
|
}
|
|
261453
261450
|
*end(forceDoc = false, endOffset = -1) {
|
|
@@ -261473,7 +261470,7 @@ ${end.comment}` : end.comment;
|
|
|
261473
261470
|
var require_cst_scalar = __commonJS((exports) => {
|
|
261474
261471
|
var resolveBlockScalar = require_resolve_block_scalar();
|
|
261475
261472
|
var resolveFlowScalar = require_resolve_flow_scalar();
|
|
261476
|
-
var
|
|
261473
|
+
var errors3 = require_errors3();
|
|
261477
261474
|
var stringifyString = require_stringifyString();
|
|
261478
261475
|
function resolveAsScalar(token, strict = true, onError) {
|
|
261479
261476
|
if (token) {
|
|
@@ -261482,7 +261479,7 @@ var require_cst_scalar = __commonJS((exports) => {
|
|
|
261482
261479
|
if (onError)
|
|
261483
261480
|
onError(offset, code2, message);
|
|
261484
261481
|
else
|
|
261485
|
-
throw new
|
|
261482
|
+
throw new errors3.YAMLParseError([offset, offset + 1], code2, message);
|
|
261486
261483
|
};
|
|
261487
261484
|
switch (token.type) {
|
|
261488
261485
|
case "scalar":
|
|
@@ -261596,9 +261593,9 @@ var require_cst_scalar = __commonJS((exports) => {
|
|
|
261596
261593
|
if (!addEndtoBlockProps(props, "end" in token ? token.end : undefined))
|
|
261597
261594
|
props.push({ type: "newline", offset: -1, indent: indent2, source: `
|
|
261598
261595
|
` });
|
|
261599
|
-
for (const
|
|
261600
|
-
if (
|
|
261601
|
-
delete token[
|
|
261596
|
+
for (const key3 of Object.keys(token))
|
|
261597
|
+
if (key3 !== "type" && key3 !== "offset")
|
|
261598
|
+
delete token[key3];
|
|
261602
261599
|
Object.assign(token, { type: "block-scalar", indent: indent2, props, source: body });
|
|
261603
261600
|
}
|
|
261604
261601
|
}
|
|
@@ -261647,9 +261644,9 @@ var require_cst_scalar = __commonJS((exports) => {
|
|
|
261647
261644
|
default: {
|
|
261648
261645
|
const indent2 = "indent" in token ? token.indent : -1;
|
|
261649
261646
|
const end = "end" in token && Array.isArray(token.end) ? token.end.filter((st2) => st2.type === "space" || st2.type === "comment" || st2.type === "newline") : [];
|
|
261650
|
-
for (const
|
|
261651
|
-
if (
|
|
261652
|
-
delete token[
|
|
261647
|
+
for (const key3 of Object.keys(token))
|
|
261648
|
+
if (key3 !== "type" && key3 !== "offset")
|
|
261649
|
+
delete token[key3];
|
|
261653
261650
|
Object.assign(token, { type: type4, indent: indent2, source, end });
|
|
261654
261651
|
}
|
|
261655
261652
|
}
|
|
@@ -261701,12 +261698,12 @@ var require_cst_stringify = __commonJS((exports) => {
|
|
|
261701
261698
|
}
|
|
261702
261699
|
}
|
|
261703
261700
|
}
|
|
261704
|
-
function stringifyItem({ start: start3, key:
|
|
261701
|
+
function stringifyItem({ start: start3, key: key3, sep: sep3, value: value4 }) {
|
|
261705
261702
|
let res = "";
|
|
261706
261703
|
for (const st2 of start3)
|
|
261707
261704
|
res += st2.source;
|
|
261708
|
-
if (
|
|
261709
|
-
res += stringifyToken(
|
|
261705
|
+
if (key3)
|
|
261706
|
+
res += stringifyToken(key3);
|
|
261710
261707
|
if (sep3)
|
|
261711
261708
|
for (const st2 of sep3)
|
|
261712
261709
|
res += st2.source;
|
|
@@ -263003,7 +263000,7 @@ var require_parser2 = __commonJS((exports) => {
|
|
|
263003
263000
|
});
|
|
263004
263001
|
} else if (isFlowToken(it2.key) && !includesToken(it2.sep, "newline")) {
|
|
263005
263002
|
const start4 = getFirstKeyStartProps(it2.start);
|
|
263006
|
-
const
|
|
263003
|
+
const key3 = it2.key;
|
|
263007
263004
|
const sep3 = it2.sep;
|
|
263008
263005
|
sep3.push(this.sourceToken);
|
|
263009
263006
|
delete it2.key;
|
|
@@ -263012,7 +263009,7 @@ var require_parser2 = __commonJS((exports) => {
|
|
|
263012
263009
|
type: "block-map",
|
|
263013
263010
|
offset: this.offset,
|
|
263014
263011
|
indent: this.indent,
|
|
263015
|
-
items: [{ start: start4, key:
|
|
263012
|
+
items: [{ start: start4, key: key3, sep: sep3 }]
|
|
263016
263013
|
});
|
|
263017
263014
|
} else if (start3.length > 0) {
|
|
263018
263015
|
it2.sep = it2.sep.concat(start3, this.sourceToken);
|
|
@@ -263335,7 +263332,7 @@ var require_parser2 = __commonJS((exports) => {
|
|
|
263335
263332
|
var require_public_api = __commonJS((exports) => {
|
|
263336
263333
|
var composer = require_composer();
|
|
263337
263334
|
var Document = require_Document();
|
|
263338
|
-
var
|
|
263335
|
+
var errors3 = require_errors3();
|
|
263339
263336
|
var log = require_log();
|
|
263340
263337
|
var identity2 = require_identity();
|
|
263341
263338
|
var lineCounter = require_line_counter();
|
|
@@ -263352,8 +263349,8 @@ var require_public_api = __commonJS((exports) => {
|
|
|
263352
263349
|
const docs = Array.from(composer$1.compose(parser$1.parse(source)));
|
|
263353
263350
|
if (prettyErrors && lineCounter2)
|
|
263354
263351
|
for (const doc of docs) {
|
|
263355
|
-
doc.errors.forEach(
|
|
263356
|
-
doc.warnings.forEach(
|
|
263352
|
+
doc.errors.forEach(errors3.prettifyError(source, lineCounter2));
|
|
263353
|
+
doc.warnings.forEach(errors3.prettifyError(source, lineCounter2));
|
|
263357
263354
|
}
|
|
263358
263355
|
if (docs.length > 0)
|
|
263359
263356
|
return docs;
|
|
@@ -263368,13 +263365,13 @@ var require_public_api = __commonJS((exports) => {
|
|
|
263368
263365
|
if (!doc)
|
|
263369
263366
|
doc = _doc;
|
|
263370
263367
|
else if (doc.options.logLevel !== "silent") {
|
|
263371
|
-
doc.errors.push(new
|
|
263368
|
+
doc.errors.push(new errors3.YAMLParseError(_doc.range.slice(0, 2), "MULTIPLE_DOCS", "Source contains multiple documents; please use YAML.parseAllDocuments()"));
|
|
263372
263369
|
break;
|
|
263373
263370
|
}
|
|
263374
263371
|
}
|
|
263375
263372
|
if (prettyErrors && lineCounter2) {
|
|
263376
|
-
doc.errors.forEach(
|
|
263377
|
-
doc.warnings.forEach(
|
|
263373
|
+
doc.errors.forEach(errors3.prettifyError(source, lineCounter2));
|
|
263374
|
+
doc.warnings.forEach(errors3.prettifyError(source, lineCounter2));
|
|
263378
263375
|
}
|
|
263379
263376
|
return doc;
|
|
263380
263377
|
}
|
|
@@ -274462,7 +274459,7 @@ function pruneCurrentEnv(currentEnv, env2) {
|
|
|
274462
274459
|
var package_default = {
|
|
274463
274460
|
name: "@settlemint/sdk-cli",
|
|
274464
274461
|
description: "Command-line interface for SettleMint SDK, providing development tools and project management capabilities",
|
|
274465
|
-
version: "1.1.3-
|
|
274462
|
+
version: "1.1.3-pr72c20505",
|
|
274466
274463
|
type: "module",
|
|
274467
274464
|
private: false,
|
|
274468
274465
|
license: "FSL-1.1-MIT",
|
|
@@ -274508,17 +274505,17 @@ var package_default = {
|
|
|
274508
274505
|
"@commander-js/extra-typings": "13.1.0",
|
|
274509
274506
|
"@inquirer/confirm": "5.1.5",
|
|
274510
274507
|
"@inquirer/input": "4.1.5",
|
|
274511
|
-
"@inquirer/password": "4.0.
|
|
274508
|
+
"@inquirer/password": "4.0.7",
|
|
274512
274509
|
"@inquirer/select": "4.0.8",
|
|
274513
|
-
"@settlemint/sdk-js": "1.1.3-
|
|
274514
|
-
"@settlemint/sdk-utils": "1.1.3-
|
|
274515
|
-
"@types/node": "22.13.
|
|
274510
|
+
"@settlemint/sdk-js": "1.1.3-pr72c20505",
|
|
274511
|
+
"@settlemint/sdk-utils": "1.1.3-pr72c20505",
|
|
274512
|
+
"@types/node": "22.13.0",
|
|
274516
274513
|
"@types/semver": "7.5.8",
|
|
274517
274514
|
"@types/which": "3.0.4",
|
|
274518
274515
|
"get-tsconfig": "4.10.0",
|
|
274519
274516
|
giget: "1.2.4",
|
|
274520
274517
|
"is-in-ci": "1.0.0",
|
|
274521
|
-
semver: "7.7.
|
|
274518
|
+
semver: "7.7.0",
|
|
274522
274519
|
slugify: "1.6.6",
|
|
274523
274520
|
which: "5.0.0",
|
|
274524
274521
|
yaml: "2.7.0",
|
|
@@ -276470,9 +276467,6 @@ var parseRequestArgs = (documentOrOptions, variables, requestHeaders) => {
|
|
|
276470
276467
|
signal: undefined
|
|
276471
276468
|
};
|
|
276472
276469
|
};
|
|
276473
|
-
// ../js/dist/settlemint.mjs
|
|
276474
|
-
import { createHash } from "node:crypto";
|
|
276475
|
-
|
|
276476
276470
|
// ../../node_modules/gql.tada/dist/gql-tada.mjs
|
|
276477
276471
|
init_graphql_web();
|
|
276478
276472
|
var a2 = 0;
|
|
@@ -276554,47 +276548,6 @@ function initGraphQLTada() {
|
|
|
276554
276548
|
var t2 = initGraphQLTada();
|
|
276555
276549
|
|
|
276556
276550
|
// ../js/dist/settlemint.mjs
|
|
276557
|
-
function hashPincode(pincode, salt) {
|
|
276558
|
-
return createHash("sha256").update(`${salt}${pincode}`).digest("hex");
|
|
276559
|
-
}
|
|
276560
|
-
function generateChallengeResponse(pincode, salt, challenge) {
|
|
276561
|
-
const hashedPincode = hashPincode(pincode, salt);
|
|
276562
|
-
return createHash("sha256").update(`${hashedPincode}_${challenge}`).digest("hex");
|
|
276563
|
-
}
|
|
276564
|
-
async function handleChallenge({
|
|
276565
|
-
userWalletAddress,
|
|
276566
|
-
pincode,
|
|
276567
|
-
accessToken,
|
|
276568
|
-
instance,
|
|
276569
|
-
nodeId
|
|
276570
|
-
}) {
|
|
276571
|
-
const response = await fetch(`${instance}/cm/nodes/${nodeId}/${userWalletAddress}/verifications`, {
|
|
276572
|
-
method: "POST",
|
|
276573
|
-
headers: {
|
|
276574
|
-
"Content-Type": "application/json",
|
|
276575
|
-
"x-auth-token": accessToken
|
|
276576
|
-
},
|
|
276577
|
-
body: JSON.stringify({
|
|
276578
|
-
pincode,
|
|
276579
|
-
verificationType: "PINCODE",
|
|
276580
|
-
name: "pincode"
|
|
276581
|
-
})
|
|
276582
|
-
});
|
|
276583
|
-
if (!response.ok) {
|
|
276584
|
-
throw new Error("Failed to handle challenge");
|
|
276585
|
-
}
|
|
276586
|
-
const verificationChallenges = await response.json();
|
|
276587
|
-
if (!verificationChallenges.length) {
|
|
276588
|
-
throw new Error("No verification challenges received");
|
|
276589
|
-
}
|
|
276590
|
-
const firstChallenge = verificationChallenges[0];
|
|
276591
|
-
const challenge = firstChallenge?.challenge;
|
|
276592
|
-
if (!challenge?.secret || !challenge?.salt) {
|
|
276593
|
-
throw new Error("Could not authenticate pin code, invalid challenge format");
|
|
276594
|
-
}
|
|
276595
|
-
const { secret, salt } = challenge;
|
|
276596
|
-
return generateChallengeResponse(pincode, salt, secret);
|
|
276597
|
-
}
|
|
276598
276551
|
var graphql = initGraphQLTada();
|
|
276599
276552
|
var WorkspaceFragment = graphql(`
|
|
276600
276553
|
fragment Workspace on Workspace {
|
|
@@ -277992,13 +277945,6 @@ function createSettleMintClient(options) {
|
|
|
277992
277945
|
},
|
|
277993
277946
|
platform: {
|
|
277994
277947
|
config: getPlatformConfig(gqlClient)
|
|
277995
|
-
},
|
|
277996
|
-
wallet: {
|
|
277997
|
-
handleChallenge: (args) => handleChallenge({
|
|
277998
|
-
...args,
|
|
277999
|
-
instance: validatedOptions.instance,
|
|
278000
|
-
accessToken: validatedOptions.accessToken
|
|
278001
|
-
})
|
|
278002
277948
|
}
|
|
278003
277949
|
};
|
|
278004
277950
|
}
|
|
@@ -280300,20 +280246,474 @@ var esm_default4 = createPrompt((config3, done) => {
|
|
|
280300
280246
|
];
|
|
280301
280247
|
});
|
|
280302
280248
|
|
|
280303
|
-
// ../../node_modules/@inquirer/password/dist/esm/
|
|
280249
|
+
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/key.js
|
|
280250
|
+
var isEnterKey2 = (key2) => key2.name === "enter" || key2.name === "return";
|
|
280251
|
+
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/errors.js
|
|
280252
|
+
class AbortPromptError2 extends Error {
|
|
280253
|
+
name = "AbortPromptError";
|
|
280254
|
+
message = "Prompt was aborted";
|
|
280255
|
+
constructor(options) {
|
|
280256
|
+
super();
|
|
280257
|
+
this.cause = options?.cause;
|
|
280258
|
+
}
|
|
280259
|
+
}
|
|
280260
|
+
|
|
280261
|
+
class CancelPromptError2 extends Error {
|
|
280262
|
+
name = "CancelPromptError";
|
|
280263
|
+
message = "Prompt was canceled";
|
|
280264
|
+
}
|
|
280265
|
+
|
|
280266
|
+
class ExitPromptError2 extends Error {
|
|
280267
|
+
name = "ExitPromptError";
|
|
280268
|
+
}
|
|
280269
|
+
|
|
280270
|
+
class HookError2 extends Error {
|
|
280271
|
+
name = "HookError";
|
|
280272
|
+
}
|
|
280273
|
+
|
|
280274
|
+
class ValidationError2 extends Error {
|
|
280275
|
+
name = "ValidationError";
|
|
280276
|
+
}
|
|
280277
|
+
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/use-prefix.js
|
|
280278
|
+
import { AsyncResource as AsyncResource5 } from "node:async_hooks";
|
|
280279
|
+
|
|
280280
|
+
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/hook-engine.js
|
|
280281
|
+
import { AsyncLocalStorage as AsyncLocalStorage2, AsyncResource as AsyncResource4 } from "node:async_hooks";
|
|
280282
|
+
var hookStorage2 = new AsyncLocalStorage2;
|
|
280283
|
+
function createStore2(rl) {
|
|
280284
|
+
const store = {
|
|
280285
|
+
rl,
|
|
280286
|
+
hooks: [],
|
|
280287
|
+
hooksCleanup: [],
|
|
280288
|
+
hooksEffect: [],
|
|
280289
|
+
index: 0,
|
|
280290
|
+
handleChange() {
|
|
280291
|
+
}
|
|
280292
|
+
};
|
|
280293
|
+
return store;
|
|
280294
|
+
}
|
|
280295
|
+
function withHooks2(rl, cb) {
|
|
280296
|
+
const store = createStore2(rl);
|
|
280297
|
+
return hookStorage2.run(store, () => {
|
|
280298
|
+
function cycle(render) {
|
|
280299
|
+
store.handleChange = () => {
|
|
280300
|
+
store.index = 0;
|
|
280301
|
+
render();
|
|
280302
|
+
};
|
|
280303
|
+
store.handleChange();
|
|
280304
|
+
}
|
|
280305
|
+
return cb(cycle);
|
|
280306
|
+
});
|
|
280307
|
+
}
|
|
280308
|
+
function getStore2() {
|
|
280309
|
+
const store = hookStorage2.getStore();
|
|
280310
|
+
if (!store) {
|
|
280311
|
+
throw new HookError2("[Inquirer] Hook functions can only be called from within a prompt");
|
|
280312
|
+
}
|
|
280313
|
+
return store;
|
|
280314
|
+
}
|
|
280315
|
+
function readline3() {
|
|
280316
|
+
return getStore2().rl;
|
|
280317
|
+
}
|
|
280318
|
+
function withUpdates2(fn) {
|
|
280319
|
+
const wrapped = (...args) => {
|
|
280320
|
+
const store = getStore2();
|
|
280321
|
+
let shouldUpdate = false;
|
|
280322
|
+
const oldHandleChange = store.handleChange;
|
|
280323
|
+
store.handleChange = () => {
|
|
280324
|
+
shouldUpdate = true;
|
|
280325
|
+
};
|
|
280326
|
+
const returnValue = fn(...args);
|
|
280327
|
+
if (shouldUpdate) {
|
|
280328
|
+
oldHandleChange();
|
|
280329
|
+
}
|
|
280330
|
+
store.handleChange = oldHandleChange;
|
|
280331
|
+
return returnValue;
|
|
280332
|
+
};
|
|
280333
|
+
return AsyncResource4.bind(wrapped);
|
|
280334
|
+
}
|
|
280335
|
+
function withPointer2(cb) {
|
|
280336
|
+
const store = getStore2();
|
|
280337
|
+
const { index } = store;
|
|
280338
|
+
const pointer = {
|
|
280339
|
+
get() {
|
|
280340
|
+
return store.hooks[index];
|
|
280341
|
+
},
|
|
280342
|
+
set(value4) {
|
|
280343
|
+
store.hooks[index] = value4;
|
|
280344
|
+
},
|
|
280345
|
+
initialized: index in store.hooks
|
|
280346
|
+
};
|
|
280347
|
+
const returnValue = cb(pointer);
|
|
280348
|
+
store.index++;
|
|
280349
|
+
return returnValue;
|
|
280350
|
+
}
|
|
280351
|
+
function handleChange2() {
|
|
280352
|
+
getStore2().handleChange();
|
|
280353
|
+
}
|
|
280354
|
+
var effectScheduler2 = {
|
|
280355
|
+
queue(cb) {
|
|
280356
|
+
const store = getStore2();
|
|
280357
|
+
const { index } = store;
|
|
280358
|
+
store.hooksEffect.push(() => {
|
|
280359
|
+
store.hooksCleanup[index]?.();
|
|
280360
|
+
const cleanFn = cb(readline3());
|
|
280361
|
+
if (cleanFn != null && typeof cleanFn !== "function") {
|
|
280362
|
+
throw new ValidationError2("useEffect return value must be a cleanup function or nothing.");
|
|
280363
|
+
}
|
|
280364
|
+
store.hooksCleanup[index] = cleanFn;
|
|
280365
|
+
});
|
|
280366
|
+
},
|
|
280367
|
+
run() {
|
|
280368
|
+
const store = getStore2();
|
|
280369
|
+
withUpdates2(() => {
|
|
280370
|
+
store.hooksEffect.forEach((effect) => {
|
|
280371
|
+
effect();
|
|
280372
|
+
});
|
|
280373
|
+
store.hooksEffect.length = 0;
|
|
280374
|
+
})();
|
|
280375
|
+
},
|
|
280376
|
+
clearAll() {
|
|
280377
|
+
const store = getStore2();
|
|
280378
|
+
store.hooksCleanup.forEach((cleanFn) => {
|
|
280379
|
+
cleanFn?.();
|
|
280380
|
+
});
|
|
280381
|
+
store.hooksEffect.length = 0;
|
|
280382
|
+
store.hooksCleanup.length = 0;
|
|
280383
|
+
}
|
|
280384
|
+
};
|
|
280385
|
+
|
|
280386
|
+
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/use-state.js
|
|
280387
|
+
function useState2(defaultValue) {
|
|
280388
|
+
return withPointer2((pointer) => {
|
|
280389
|
+
const setFn = (newValue) => {
|
|
280390
|
+
if (pointer.get() !== newValue) {
|
|
280391
|
+
pointer.set(newValue);
|
|
280392
|
+
handleChange2();
|
|
280393
|
+
}
|
|
280394
|
+
};
|
|
280395
|
+
if (pointer.initialized) {
|
|
280396
|
+
return [pointer.get(), setFn];
|
|
280397
|
+
}
|
|
280398
|
+
const value4 = typeof defaultValue === "function" ? defaultValue() : defaultValue;
|
|
280399
|
+
pointer.set(value4);
|
|
280400
|
+
return [value4, setFn];
|
|
280401
|
+
});
|
|
280402
|
+
}
|
|
280403
|
+
|
|
280404
|
+
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/use-effect.js
|
|
280405
|
+
function useEffect2(cb, depArray) {
|
|
280406
|
+
withPointer2((pointer) => {
|
|
280407
|
+
const oldDeps = pointer.get();
|
|
280408
|
+
const hasChanged = !Array.isArray(oldDeps) || depArray.some((dep, i6) => !Object.is(dep, oldDeps[i6]));
|
|
280409
|
+
if (hasChanged) {
|
|
280410
|
+
effectScheduler2.queue(cb);
|
|
280411
|
+
}
|
|
280412
|
+
pointer.set(depArray);
|
|
280413
|
+
});
|
|
280414
|
+
}
|
|
280415
|
+
|
|
280416
|
+
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/theme.js
|
|
280417
|
+
var import_yoctocolors_cjs4 = __toESM(require_yoctocolors_cjs(), 1);
|
|
280418
|
+
var defaultTheme2 = {
|
|
280419
|
+
prefix: {
|
|
280420
|
+
idle: import_yoctocolors_cjs4.default.blue("?"),
|
|
280421
|
+
done: import_yoctocolors_cjs4.default.green(esm_default.tick)
|
|
280422
|
+
},
|
|
280423
|
+
spinner: {
|
|
280424
|
+
interval: 80,
|
|
280425
|
+
frames: ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"].map((frame) => import_yoctocolors_cjs4.default.yellow(frame))
|
|
280426
|
+
},
|
|
280427
|
+
style: {
|
|
280428
|
+
answer: import_yoctocolors_cjs4.default.cyan,
|
|
280429
|
+
message: import_yoctocolors_cjs4.default.bold,
|
|
280430
|
+
error: (text2) => import_yoctocolors_cjs4.default.red(`> ${text2}`),
|
|
280431
|
+
defaultAnswer: (text2) => import_yoctocolors_cjs4.default.dim(`(${text2})`),
|
|
280432
|
+
help: import_yoctocolors_cjs4.default.dim,
|
|
280433
|
+
highlight: import_yoctocolors_cjs4.default.cyan,
|
|
280434
|
+
key: (text2) => import_yoctocolors_cjs4.default.cyan(import_yoctocolors_cjs4.default.bold(`<${text2}>`))
|
|
280435
|
+
}
|
|
280436
|
+
};
|
|
280437
|
+
|
|
280438
|
+
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/make-theme.js
|
|
280439
|
+
function isPlainObject3(value4) {
|
|
280440
|
+
if (typeof value4 !== "object" || value4 === null)
|
|
280441
|
+
return false;
|
|
280442
|
+
let proto = value4;
|
|
280443
|
+
while (Object.getPrototypeOf(proto) !== null) {
|
|
280444
|
+
proto = Object.getPrototypeOf(proto);
|
|
280445
|
+
}
|
|
280446
|
+
return Object.getPrototypeOf(value4) === proto;
|
|
280447
|
+
}
|
|
280448
|
+
function deepMerge3(...objects) {
|
|
280449
|
+
const output = {};
|
|
280450
|
+
for (const obj of objects) {
|
|
280451
|
+
for (const [key2, value4] of Object.entries(obj)) {
|
|
280452
|
+
const prevValue = output[key2];
|
|
280453
|
+
output[key2] = isPlainObject3(prevValue) && isPlainObject3(value4) ? deepMerge3(prevValue, value4) : value4;
|
|
280454
|
+
}
|
|
280455
|
+
}
|
|
280456
|
+
return output;
|
|
280457
|
+
}
|
|
280458
|
+
function makeTheme2(...themes) {
|
|
280459
|
+
const themesToMerge = [
|
|
280460
|
+
defaultTheme2,
|
|
280461
|
+
...themes.filter((theme) => theme != null)
|
|
280462
|
+
];
|
|
280463
|
+
return deepMerge3(...themesToMerge);
|
|
280464
|
+
}
|
|
280465
|
+
|
|
280466
|
+
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/use-prefix.js
|
|
280467
|
+
function usePrefix2({ status = "idle", theme }) {
|
|
280468
|
+
const [showLoader, setShowLoader] = useState2(false);
|
|
280469
|
+
const [tick, setTick] = useState2(0);
|
|
280470
|
+
const { prefix, spinner: spinner2 } = makeTheme2(theme);
|
|
280471
|
+
useEffect2(() => {
|
|
280472
|
+
if (status === "loading") {
|
|
280473
|
+
let tickInterval;
|
|
280474
|
+
let inc = -1;
|
|
280475
|
+
const delayTimeout = setTimeout(AsyncResource5.bind(() => {
|
|
280476
|
+
setShowLoader(true);
|
|
280477
|
+
tickInterval = setInterval(AsyncResource5.bind(() => {
|
|
280478
|
+
inc = inc + 1;
|
|
280479
|
+
setTick(inc % spinner2.frames.length);
|
|
280480
|
+
}), spinner2.interval);
|
|
280481
|
+
}), 300);
|
|
280482
|
+
return () => {
|
|
280483
|
+
clearTimeout(delayTimeout);
|
|
280484
|
+
clearInterval(tickInterval);
|
|
280485
|
+
};
|
|
280486
|
+
} else {
|
|
280487
|
+
setShowLoader(false);
|
|
280488
|
+
}
|
|
280489
|
+
}, [status]);
|
|
280490
|
+
if (showLoader) {
|
|
280491
|
+
return spinner2.frames[tick];
|
|
280492
|
+
}
|
|
280493
|
+
const iconName = status === "loading" ? "idle" : status;
|
|
280494
|
+
return typeof prefix === "string" ? prefix : prefix[iconName] ?? prefix["idle"];
|
|
280495
|
+
}
|
|
280496
|
+
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/use-ref.js
|
|
280497
|
+
function useRef2(val) {
|
|
280498
|
+
return useState2({ current: val })[0];
|
|
280499
|
+
}
|
|
280500
|
+
|
|
280501
|
+
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/use-keypress.js
|
|
280502
|
+
function useKeypress2(userHandler) {
|
|
280503
|
+
const signal = useRef2(userHandler);
|
|
280504
|
+
signal.current = userHandler;
|
|
280505
|
+
useEffect2((rl) => {
|
|
280506
|
+
let ignore = false;
|
|
280507
|
+
const handler = withUpdates2((_input, event) => {
|
|
280508
|
+
if (ignore)
|
|
280509
|
+
return;
|
|
280510
|
+
signal.current(event, rl);
|
|
280511
|
+
});
|
|
280512
|
+
rl.input.on("keypress", handler);
|
|
280513
|
+
return () => {
|
|
280514
|
+
ignore = true;
|
|
280515
|
+
rl.input.removeListener("keypress", handler);
|
|
280516
|
+
};
|
|
280517
|
+
}, []);
|
|
280518
|
+
}
|
|
280519
|
+
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/utils.js
|
|
280520
|
+
var import_cli_width2 = __toESM(require_cli_width(), 1);
|
|
280521
|
+
var import_wrap_ansi2 = __toESM(require_wrap_ansi(), 1);
|
|
280522
|
+
function breakLines2(content, width) {
|
|
280523
|
+
return content.split(`
|
|
280524
|
+
`).flatMap((line) => import_wrap_ansi2.default(line, width, { trim: false, hard: true }).split(`
|
|
280525
|
+
`).map((str) => str.trimEnd())).join(`
|
|
280526
|
+
`);
|
|
280527
|
+
}
|
|
280528
|
+
function readlineWidth2() {
|
|
280529
|
+
return import_cli_width2.default({ defaultWidth: 80, output: readline3().output });
|
|
280530
|
+
}
|
|
280531
|
+
|
|
280532
|
+
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
|
|
280533
|
+
var import_mute_stream2 = __toESM(require_lib(), 1);
|
|
280534
|
+
import * as readline4 from "node:readline";
|
|
280535
|
+
import { AsyncResource as AsyncResource6 } from "node:async_hooks";
|
|
280536
|
+
|
|
280537
|
+
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/screen-manager.js
|
|
280304
280538
|
var import_ansi_escapes3 = __toESM(require_ansi_escapes(), 1);
|
|
280305
|
-
|
|
280539
|
+
import { stripVTControlCharacters as stripVTControlCharacters3 } from "node:util";
|
|
280540
|
+
var height2 = (content) => content.split(`
|
|
280541
|
+
`).length;
|
|
280542
|
+
var lastLine2 = (content) => content.split(`
|
|
280543
|
+
`).pop() ?? "";
|
|
280544
|
+
function cursorDown2(n6) {
|
|
280545
|
+
return n6 > 0 ? import_ansi_escapes3.default.cursorDown(n6) : "";
|
|
280546
|
+
}
|
|
280547
|
+
|
|
280548
|
+
class ScreenManager2 {
|
|
280549
|
+
rl;
|
|
280550
|
+
height = 0;
|
|
280551
|
+
extraLinesUnderPrompt = 0;
|
|
280552
|
+
cursorPos;
|
|
280553
|
+
constructor(rl) {
|
|
280554
|
+
this.rl = rl;
|
|
280555
|
+
this.rl = rl;
|
|
280556
|
+
this.cursorPos = rl.getCursorPos();
|
|
280557
|
+
}
|
|
280558
|
+
write(content) {
|
|
280559
|
+
this.rl.output.unmute();
|
|
280560
|
+
this.rl.output.write(content);
|
|
280561
|
+
this.rl.output.mute();
|
|
280562
|
+
}
|
|
280563
|
+
render(content, bottomContent = "") {
|
|
280564
|
+
const promptLine = lastLine2(content);
|
|
280565
|
+
const rawPromptLine = stripVTControlCharacters3(promptLine);
|
|
280566
|
+
let prompt = rawPromptLine;
|
|
280567
|
+
if (this.rl.line.length > 0) {
|
|
280568
|
+
prompt = prompt.slice(0, -this.rl.line.length);
|
|
280569
|
+
}
|
|
280570
|
+
this.rl.setPrompt(prompt);
|
|
280571
|
+
this.cursorPos = this.rl.getCursorPos();
|
|
280572
|
+
const width = readlineWidth2();
|
|
280573
|
+
content = breakLines2(content, width);
|
|
280574
|
+
bottomContent = breakLines2(bottomContent, width);
|
|
280575
|
+
if (rawPromptLine.length % width === 0) {
|
|
280576
|
+
content += `
|
|
280577
|
+
`;
|
|
280578
|
+
}
|
|
280579
|
+
let output = content + (bottomContent ? `
|
|
280580
|
+
` + bottomContent : "");
|
|
280581
|
+
const promptLineUpDiff = Math.floor(rawPromptLine.length / width) - this.cursorPos.rows;
|
|
280582
|
+
const bottomContentHeight = promptLineUpDiff + (bottomContent ? height2(bottomContent) : 0);
|
|
280583
|
+
if (bottomContentHeight > 0)
|
|
280584
|
+
output += import_ansi_escapes3.default.cursorUp(bottomContentHeight);
|
|
280585
|
+
output += import_ansi_escapes3.default.cursorTo(this.cursorPos.cols);
|
|
280586
|
+
this.write(cursorDown2(this.extraLinesUnderPrompt) + import_ansi_escapes3.default.eraseLines(this.height) + output);
|
|
280587
|
+
this.extraLinesUnderPrompt = bottomContentHeight;
|
|
280588
|
+
this.height = height2(output);
|
|
280589
|
+
}
|
|
280590
|
+
checkCursorPos() {
|
|
280591
|
+
const cursorPos = this.rl.getCursorPos();
|
|
280592
|
+
if (cursorPos.cols !== this.cursorPos.cols) {
|
|
280593
|
+
this.write(import_ansi_escapes3.default.cursorTo(cursorPos.cols));
|
|
280594
|
+
this.cursorPos = cursorPos;
|
|
280595
|
+
}
|
|
280596
|
+
}
|
|
280597
|
+
done({ clearContent }) {
|
|
280598
|
+
this.rl.setPrompt("");
|
|
280599
|
+
let output = cursorDown2(this.extraLinesUnderPrompt);
|
|
280600
|
+
output += clearContent ? import_ansi_escapes3.default.eraseLines(this.height) : `
|
|
280601
|
+
`;
|
|
280602
|
+
output += import_ansi_escapes3.default.cursorShow;
|
|
280603
|
+
this.write(output);
|
|
280604
|
+
this.rl.close();
|
|
280605
|
+
}
|
|
280606
|
+
}
|
|
280607
|
+
|
|
280608
|
+
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/promise-polyfill.js
|
|
280609
|
+
class PromisePolyfill2 extends Promise {
|
|
280610
|
+
static withResolver() {
|
|
280611
|
+
let resolve6;
|
|
280612
|
+
let reject;
|
|
280613
|
+
const promise = new Promise((res, rej) => {
|
|
280614
|
+
resolve6 = res;
|
|
280615
|
+
reject = rej;
|
|
280616
|
+
});
|
|
280617
|
+
return { promise, resolve: resolve6, reject };
|
|
280618
|
+
}
|
|
280619
|
+
}
|
|
280620
|
+
|
|
280621
|
+
// ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
|
|
280622
|
+
function getCallSites2() {
|
|
280623
|
+
const _prepareStackTrace = Error.prepareStackTrace;
|
|
280624
|
+
try {
|
|
280625
|
+
let result = [];
|
|
280626
|
+
Error.prepareStackTrace = (_5, callSites) => {
|
|
280627
|
+
const callSitesWithoutCurrent = callSites.slice(1);
|
|
280628
|
+
result = callSitesWithoutCurrent;
|
|
280629
|
+
return callSitesWithoutCurrent;
|
|
280630
|
+
};
|
|
280631
|
+
new Error().stack;
|
|
280632
|
+
return result;
|
|
280633
|
+
} finally {
|
|
280634
|
+
Error.prepareStackTrace = _prepareStackTrace;
|
|
280635
|
+
}
|
|
280636
|
+
}
|
|
280637
|
+
function createPrompt2(view) {
|
|
280638
|
+
const callSites = getCallSites2();
|
|
280639
|
+
const callerFilename = callSites[1]?.getFileName?.();
|
|
280640
|
+
const prompt = (config3, context = {}) => {
|
|
280641
|
+
const { input = process.stdin, signal } = context;
|
|
280642
|
+
const cleanups = new Set;
|
|
280643
|
+
const output = new import_mute_stream2.default;
|
|
280644
|
+
output.pipe(context.output ?? process.stdout);
|
|
280645
|
+
const rl = readline4.createInterface({
|
|
280646
|
+
terminal: true,
|
|
280647
|
+
input,
|
|
280648
|
+
output
|
|
280649
|
+
});
|
|
280650
|
+
const screen = new ScreenManager2(rl);
|
|
280651
|
+
const { promise, resolve: resolve6, reject } = PromisePolyfill2.withResolver();
|
|
280652
|
+
const cancel3 = () => reject(new CancelPromptError2);
|
|
280653
|
+
if (signal) {
|
|
280654
|
+
const abort = () => reject(new AbortPromptError2({ cause: signal.reason }));
|
|
280655
|
+
if (signal.aborted) {
|
|
280656
|
+
abort();
|
|
280657
|
+
return Object.assign(promise, { cancel: cancel3 });
|
|
280658
|
+
}
|
|
280659
|
+
signal.addEventListener("abort", abort);
|
|
280660
|
+
cleanups.add(() => signal.removeEventListener("abort", abort));
|
|
280661
|
+
}
|
|
280662
|
+
cleanups.add(onExit((code2, signal2) => {
|
|
280663
|
+
reject(new ExitPromptError2(`User force closed the prompt with ${code2} ${signal2}`));
|
|
280664
|
+
}));
|
|
280665
|
+
const checkCursorPos = () => screen.checkCursorPos();
|
|
280666
|
+
rl.input.on("keypress", checkCursorPos);
|
|
280667
|
+
cleanups.add(() => rl.input.removeListener("keypress", checkCursorPos));
|
|
280668
|
+
return withHooks2(rl, (cycle) => {
|
|
280669
|
+
const hooksCleanup = AsyncResource6.bind(() => effectScheduler2.clearAll());
|
|
280670
|
+
rl.on("close", hooksCleanup);
|
|
280671
|
+
cleanups.add(() => rl.removeListener("close", hooksCleanup));
|
|
280672
|
+
cycle(() => {
|
|
280673
|
+
try {
|
|
280674
|
+
const nextView = view(config3, (value4) => {
|
|
280675
|
+
setImmediate(() => resolve6(value4));
|
|
280676
|
+
});
|
|
280677
|
+
if (nextView === undefined) {
|
|
280678
|
+
throw new Error(`Prompt functions must return a string.
|
|
280679
|
+
at ${callerFilename}`);
|
|
280680
|
+
}
|
|
280681
|
+
const [content, bottomContent] = typeof nextView === "string" ? [nextView] : nextView;
|
|
280682
|
+
screen.render(content, bottomContent);
|
|
280683
|
+
effectScheduler2.run();
|
|
280684
|
+
} catch (error5) {
|
|
280685
|
+
reject(error5);
|
|
280686
|
+
}
|
|
280687
|
+
});
|
|
280688
|
+
return Object.assign(promise.then((answer) => {
|
|
280689
|
+
effectScheduler2.clearAll();
|
|
280690
|
+
return answer;
|
|
280691
|
+
}, (error5) => {
|
|
280692
|
+
effectScheduler2.clearAll();
|
|
280693
|
+
throw error5;
|
|
280694
|
+
}).finally(() => {
|
|
280695
|
+
cleanups.forEach((cleanup) => cleanup());
|
|
280696
|
+
screen.done({ clearContent: Boolean(context.clearPromptOnDone) });
|
|
280697
|
+
output.end();
|
|
280698
|
+
}).then(() => promise), { cancel: cancel3 });
|
|
280699
|
+
});
|
|
280700
|
+
};
|
|
280701
|
+
return prompt;
|
|
280702
|
+
}
|
|
280703
|
+
// ../../node_modules/@inquirer/password/dist/esm/index.js
|
|
280704
|
+
var import_ansi_escapes4 = __toESM(require_ansi_escapes(), 1);
|
|
280705
|
+
var esm_default5 = createPrompt2((config3, done) => {
|
|
280306
280706
|
const { validate: validate3 = () => true } = config3;
|
|
280307
|
-
const theme =
|
|
280308
|
-
const [status, setStatus] =
|
|
280309
|
-
const [errorMsg, setError] =
|
|
280310
|
-
const [value4, setValue] =
|
|
280311
|
-
const prefix =
|
|
280312
|
-
|
|
280707
|
+
const theme = makeTheme2(config3.theme);
|
|
280708
|
+
const [status, setStatus] = useState2("idle");
|
|
280709
|
+
const [errorMsg, setError] = useState2();
|
|
280710
|
+
const [value4, setValue] = useState2("");
|
|
280711
|
+
const prefix = usePrefix2({ status, theme });
|
|
280712
|
+
useKeypress2(async (key3, rl) => {
|
|
280313
280713
|
if (status !== "idle") {
|
|
280314
280714
|
return;
|
|
280315
280715
|
}
|
|
280316
|
-
if (
|
|
280716
|
+
if (isEnterKey2(key3)) {
|
|
280317
280717
|
const answer = value4;
|
|
280318
280718
|
setStatus("loading");
|
|
280319
280719
|
const isValid2 = await validate3(answer);
|
|
@@ -280338,7 +280738,7 @@ var esm_default5 = createPrompt((config3, done) => {
|
|
|
280338
280738
|
const maskChar = typeof config3.mask === "string" ? config3.mask : "*";
|
|
280339
280739
|
formattedValue = maskChar.repeat(value4.length);
|
|
280340
280740
|
} else if (status !== "done") {
|
|
280341
|
-
helpTip = `${theme.style.help("[input is masked]")}${
|
|
280741
|
+
helpTip = `${theme.style.help("[input is masked]")}${import_ansi_escapes4.default.cursorHide}`;
|
|
280342
280742
|
}
|
|
280343
280743
|
if (status === "done") {
|
|
280344
280744
|
formattedValue = theme.style.answer(formattedValue);
|
|
@@ -281410,7 +281810,7 @@ var basename2 = function(p6, extension) {
|
|
|
281410
281810
|
return extension && lastSegment.endsWith(extension) ? lastSegment.slice(0, -extension.length) : lastSegment;
|
|
281411
281811
|
};
|
|
281412
281812
|
// ../../node_modules/defu/dist/defu.mjs
|
|
281413
|
-
function
|
|
281813
|
+
function isPlainObject4(value4) {
|
|
281414
281814
|
if (value4 === null || typeof value4 !== "object") {
|
|
281415
281815
|
return false;
|
|
281416
281816
|
}
|
|
@@ -281427,27 +281827,27 @@ function isPlainObject3(value4) {
|
|
|
281427
281827
|
return true;
|
|
281428
281828
|
}
|
|
281429
281829
|
function _defu(baseObject, defaults2, namespace = ".", merger) {
|
|
281430
|
-
if (!
|
|
281830
|
+
if (!isPlainObject4(defaults2)) {
|
|
281431
281831
|
return _defu(baseObject, {}, namespace, merger);
|
|
281432
281832
|
}
|
|
281433
281833
|
const object = Object.assign({}, defaults2);
|
|
281434
|
-
for (const
|
|
281435
|
-
if (
|
|
281834
|
+
for (const key3 in baseObject) {
|
|
281835
|
+
if (key3 === "__proto__" || key3 === "constructor") {
|
|
281436
281836
|
continue;
|
|
281437
281837
|
}
|
|
281438
|
-
const value4 = baseObject[
|
|
281838
|
+
const value4 = baseObject[key3];
|
|
281439
281839
|
if (value4 === null || value4 === undefined) {
|
|
281440
281840
|
continue;
|
|
281441
281841
|
}
|
|
281442
|
-
if (merger && merger(object,
|
|
281842
|
+
if (merger && merger(object, key3, value4, namespace)) {
|
|
281443
281843
|
continue;
|
|
281444
281844
|
}
|
|
281445
|
-
if (Array.isArray(value4) && Array.isArray(object[
|
|
281446
|
-
object[
|
|
281447
|
-
} else if (
|
|
281448
|
-
object[
|
|
281845
|
+
if (Array.isArray(value4) && Array.isArray(object[key3])) {
|
|
281846
|
+
object[key3] = [...value4, ...object[key3]];
|
|
281847
|
+
} else if (isPlainObject4(value4) && isPlainObject4(object[key3])) {
|
|
281848
|
+
object[key3] = _defu(value4, object[key3], (namespace ? `${namespace}.` : "") + key3.toString(), merger);
|
|
281449
281849
|
} else {
|
|
281450
|
-
object[
|
|
281850
|
+
object[key3] = value4;
|
|
281451
281851
|
}
|
|
281452
281852
|
}
|
|
281453
281853
|
return object;
|
|
@@ -281456,15 +281856,15 @@ function createDefu(merger) {
|
|
|
281456
281856
|
return (...arguments_4) => arguments_4.reduce((p6, c3) => _defu(p6, c3, "", merger), {});
|
|
281457
281857
|
}
|
|
281458
281858
|
var defu = createDefu();
|
|
281459
|
-
var defuFn = createDefu((object,
|
|
281460
|
-
if (object[
|
|
281461
|
-
object[
|
|
281859
|
+
var defuFn = createDefu((object, key3, currentValue) => {
|
|
281860
|
+
if (object[key3] !== undefined && typeof currentValue === "function") {
|
|
281861
|
+
object[key3] = currentValue(object[key3]);
|
|
281462
281862
|
return true;
|
|
281463
281863
|
}
|
|
281464
281864
|
});
|
|
281465
|
-
var defuArrayFn = createDefu((object,
|
|
281466
|
-
if (Array.isArray(object[
|
|
281467
|
-
object[
|
|
281865
|
+
var defuArrayFn = createDefu((object, key3, currentValue) => {
|
|
281866
|
+
if (Array.isArray(object[key3]) && typeof currentValue === "function") {
|
|
281867
|
+
object[key3] = currentValue(object[key3]);
|
|
281468
281868
|
return true;
|
|
281469
281869
|
}
|
|
281470
281870
|
});
|
|
@@ -281726,11 +282126,11 @@ function cacheDirectory() {
|
|
|
281726
282126
|
}
|
|
281727
282127
|
function normalizeHeaders(headers = {}) {
|
|
281728
282128
|
const normalized = {};
|
|
281729
|
-
for (const [
|
|
282129
|
+
for (const [key3, value4] of Object.entries(headers)) {
|
|
281730
282130
|
if (!value4) {
|
|
281731
282131
|
continue;
|
|
281732
282132
|
}
|
|
281733
|
-
normalized[
|
|
282133
|
+
normalized[key3.toLowerCase()] = value4;
|
|
281734
282134
|
}
|
|
281735
282135
|
return normalized;
|
|
281736
282136
|
}
|
|
@@ -282210,7 +282610,7 @@ async function waitForCompletion({
|
|
|
282210
282610
|
restartIfTimeout = false
|
|
282211
282611
|
}) {
|
|
282212
282612
|
const serviceType = SETTLEMINT_CLIENT_MAP[type4];
|
|
282213
|
-
if (serviceType === "workspace" || serviceType === "application" || serviceType === "foundry" || serviceType === "applicationAccessToken" || serviceType === "platform"
|
|
282613
|
+
if (serviceType === "workspace" || serviceType === "application" || serviceType === "foundry" || serviceType === "applicationAccessToken" || serviceType === "platform") {
|
|
282214
282614
|
return true;
|
|
282215
282615
|
}
|
|
282216
282616
|
const service = settlemint[serviceType];
|
|
@@ -283912,7 +284312,7 @@ function jsonOutput(data) {
|
|
|
283912
284312
|
var composer = require_composer();
|
|
283913
284313
|
var Document = require_Document();
|
|
283914
284314
|
var Schema = require_Schema();
|
|
283915
|
-
var
|
|
284315
|
+
var errors3 = require_errors3();
|
|
283916
284316
|
var Alias = require_Alias();
|
|
283917
284317
|
var identity2 = require_identity();
|
|
283918
284318
|
var Pair = require_Pair();
|
|
@@ -283928,9 +284328,9 @@ var visit2 = require_visit();
|
|
|
283928
284328
|
var $Composer = composer.Composer;
|
|
283929
284329
|
var $Document = Document.Document;
|
|
283930
284330
|
var $Schema = Schema.Schema;
|
|
283931
|
-
var $YAMLError =
|
|
283932
|
-
var $YAMLParseError =
|
|
283933
|
-
var $YAMLWarning =
|
|
284331
|
+
var $YAMLError = errors3.YAMLError;
|
|
284332
|
+
var $YAMLParseError = errors3.YAMLParseError;
|
|
284333
|
+
var $YAMLWarning = errors3.YAMLWarning;
|
|
283934
284334
|
var $Alias = Alias.Alias;
|
|
283935
284335
|
var $isAlias = identity2.isAlias;
|
|
283936
284336
|
var $isCollection = identity2.isCollection;
|
|
@@ -284276,7 +284676,7 @@ async function getServicesAndMapResults({
|
|
|
284276
284676
|
const application = await settlemint.application.read(applicationUniqueName);
|
|
284277
284677
|
const services = await servicesSpinner(settlemint, applicationUniqueName, types2);
|
|
284278
284678
|
const results = (types2 ?? SERVICE_TYPES).filter((serviceType) => !types2 || types2.includes(serviceType)).map((serviceType) => {
|
|
284279
|
-
const [_5, labels] = Object.entries(LABELS_MAP).find(([
|
|
284679
|
+
const [_5, labels] = Object.entries(LABELS_MAP).find(([key3, value4]) => value4.command === serviceType) ?? [
|
|
284280
284680
|
null,
|
|
284281
284681
|
{ plural: serviceType }
|
|
284282
284682
|
];
|
|
@@ -284504,11 +284904,11 @@ function createCommand4() {
|
|
|
284504
284904
|
|
|
284505
284905
|
// src/utils/commands/passthrough-options.ts
|
|
284506
284906
|
function mapPassthroughOptions(options, command) {
|
|
284507
|
-
const optionArgs = Object.entries(options).map(([
|
|
284907
|
+
const optionArgs = Object.entries(options).map(([key3, value4]) => {
|
|
284508
284908
|
if (value4 === true) {
|
|
284509
|
-
return `--${
|
|
284909
|
+
return `--${key3}`;
|
|
284510
284910
|
}
|
|
284511
|
-
return `--${
|
|
284911
|
+
return `--${key3}=${value4}`;
|
|
284512
284912
|
});
|
|
284513
284913
|
return [...optionArgs, ...command.args];
|
|
284514
284914
|
}
|
|
@@ -285325,56 +285725,6 @@ function smartContractSetCommand() {
|
|
|
285325
285725
|
return new Command("smart-contract-set").alias("scs").description("Manage smart contract sets and subgraphs").addCommand(createCommand4()).addCommand(foundry).addCommand(hardhat).addCommand(subgraph);
|
|
285326
285726
|
}
|
|
285327
285727
|
|
|
285328
|
-
// src/commands/verification-challenge.ts
|
|
285329
|
-
function verificationChallengeCommand() {
|
|
285330
|
-
return new Command("verification-challenge").alias("vch").description("Get verification challenges for a blockchain node").requiredOption("--wallet-address <walletAddress>", "The wallet address to get verification challenges for").option("-i, --instance <instance>", "The instance to connect to (defaults to the instance in the .env file)").option("--blockchain-node <blockchainNode>", "Blockchain Node unique name to get verification challenges for").action(async ({ instance, blockchainNode, walletAddress }) => {
|
|
285331
|
-
intro("Generating verification challenge for wallet address");
|
|
285332
|
-
const env2 = await loadEnv(false, false);
|
|
285333
|
-
const applicationUniqueName = env2.SETTLEMINT_APPLICATION;
|
|
285334
|
-
if (!applicationUniqueName) {
|
|
285335
|
-
return missingApplication();
|
|
285336
|
-
}
|
|
285337
|
-
const selectedInstance = instance ? sanitizeAndValidateInstanceUrl(instance) : await instancePrompt(env2, true);
|
|
285338
|
-
const personalAccessToken = await getInstanceCredentials(selectedInstance);
|
|
285339
|
-
if (!personalAccessToken) {
|
|
285340
|
-
return missingPersonalAccessTokenError();
|
|
285341
|
-
}
|
|
285342
|
-
const settlemint = createSettleMintClient({
|
|
285343
|
-
accessToken: personalAccessToken.personalAccessToken,
|
|
285344
|
-
instance: selectedInstance
|
|
285345
|
-
});
|
|
285346
|
-
const blockchainNodes = await serviceSpinner("blockchain node", () => settlemint.blockchainNode.list(applicationUniqueName));
|
|
285347
|
-
let selectedBlockchainNode = blockchainNode ? blockchainNodes.find((node) => node.uniqueName === blockchainNode) : undefined;
|
|
285348
|
-
if (!selectedBlockchainNode) {
|
|
285349
|
-
selectedBlockchainNode = await blockchainNodePrompt({
|
|
285350
|
-
env: env2,
|
|
285351
|
-
nodes: blockchainNodes,
|
|
285352
|
-
accept: true,
|
|
285353
|
-
isRequired: true
|
|
285354
|
-
});
|
|
285355
|
-
if (!selectedBlockchainNode) {
|
|
285356
|
-
return nothingSelectedError("blockchain node");
|
|
285357
|
-
}
|
|
285358
|
-
}
|
|
285359
|
-
const pincode = await esm_default5({
|
|
285360
|
-
message: "Enter your pincode",
|
|
285361
|
-
validate(value4) {
|
|
285362
|
-
if (value4.length !== 6) {
|
|
285363
|
-
return "Pincode must be 6 digits";
|
|
285364
|
-
}
|
|
285365
|
-
return true;
|
|
285366
|
-
}
|
|
285367
|
-
});
|
|
285368
|
-
const challengeResponse = await settlemint.wallet.handleChallenge({
|
|
285369
|
-
userWalletAddress: walletAddress,
|
|
285370
|
-
pincode,
|
|
285371
|
-
nodeId: selectedBlockchainNode.id
|
|
285372
|
-
});
|
|
285373
|
-
note(`Challenge response: ${challengeResponse}`);
|
|
285374
|
-
outro("Verification challenge generated");
|
|
285375
|
-
});
|
|
285376
|
-
}
|
|
285377
|
-
|
|
285378
285728
|
// src/commands/index.ts
|
|
285379
285729
|
function getCommandPath(command) {
|
|
285380
285730
|
const parts = [];
|
|
@@ -285463,7 +285813,6 @@ function registerCommands() {
|
|
|
285463
285813
|
sdkcli.addCommand(createCommand2());
|
|
285464
285814
|
sdkcli.addCommand(loginCommand());
|
|
285465
285815
|
sdkcli.addCommand(logoutCommand());
|
|
285466
|
-
sdkcli.addCommand(verificationChallengeCommand());
|
|
285467
285816
|
return sdkcli;
|
|
285468
285817
|
}
|
|
285469
285818
|
async function sdkCliCommand(argv = process.argv) {
|
|
@@ -285483,4 +285832,4 @@ async function sdkCliCommand(argv = process.argv) {
|
|
|
285483
285832
|
// src/cli.ts
|
|
285484
285833
|
sdkCliCommand();
|
|
285485
285834
|
|
|
285486
|
-
//# debugId=
|
|
285835
|
+
//# debugId=DFBAC6685A31774364756E2164756E21
|