@settlemint/sdk-cli 2.6.3 → 2.6.4-main400d9402

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 CHANGED
@@ -254827,6 +254827,126 @@ var init_call = __esm(() => {
254827
254827
  init_assertRequest();
254828
254828
  });
254829
254829
 
254830
+ // ../../node_modules/.bun/mute-stream@3.0.0/node_modules/mute-stream/lib/index.js
254831
+ var require_lib13 = __commonJS((exports, module) => {
254832
+ var Stream2 = __require("stream");
254833
+
254834
+ class MuteStream2 extends Stream2 {
254835
+ #isTTY = null;
254836
+ constructor(opts = {}) {
254837
+ super(opts);
254838
+ this.writable = this.readable = true;
254839
+ this.muted = false;
254840
+ this.on("pipe", this._onpipe);
254841
+ this.replace = opts.replace;
254842
+ this._prompt = opts.prompt || null;
254843
+ this._hadControl = false;
254844
+ }
254845
+ #destSrc(key, def) {
254846
+ if (this._dest) {
254847
+ return this._dest[key];
254848
+ }
254849
+ if (this._src) {
254850
+ return this._src[key];
254851
+ }
254852
+ return def;
254853
+ }
254854
+ #proxy(method, ...args) {
254855
+ if (typeof this._dest?.[method] === "function") {
254856
+ this._dest[method](...args);
254857
+ }
254858
+ if (typeof this._src?.[method] === "function") {
254859
+ this._src[method](...args);
254860
+ }
254861
+ }
254862
+ get isTTY() {
254863
+ if (this.#isTTY !== null) {
254864
+ return this.#isTTY;
254865
+ }
254866
+ return this.#destSrc("isTTY", false);
254867
+ }
254868
+ set isTTY(val) {
254869
+ this.#isTTY = val;
254870
+ }
254871
+ get rows() {
254872
+ return this.#destSrc("rows");
254873
+ }
254874
+ get columns() {
254875
+ return this.#destSrc("columns");
254876
+ }
254877
+ mute() {
254878
+ this.muted = true;
254879
+ }
254880
+ unmute() {
254881
+ this.muted = false;
254882
+ }
254883
+ _onpipe(src) {
254884
+ this._src = src;
254885
+ }
254886
+ pipe(dest, options) {
254887
+ this._dest = dest;
254888
+ return super.pipe(dest, options);
254889
+ }
254890
+ pause() {
254891
+ if (this._src) {
254892
+ return this._src.pause();
254893
+ }
254894
+ }
254895
+ resume() {
254896
+ if (this._src) {
254897
+ return this._src.resume();
254898
+ }
254899
+ }
254900
+ write(c3) {
254901
+ if (this.muted) {
254902
+ if (!this.replace) {
254903
+ return true;
254904
+ }
254905
+ if (c3.match(/^\u001b/)) {
254906
+ if (c3.indexOf(this._prompt) === 0) {
254907
+ c3 = c3.slice(this._prompt.length);
254908
+ c3 = c3.replace(/./g, this.replace);
254909
+ c3 = this._prompt + c3;
254910
+ }
254911
+ this._hadControl = true;
254912
+ return this.emit("data", c3);
254913
+ } else {
254914
+ if (this._prompt && this._hadControl && c3.indexOf(this._prompt) === 0) {
254915
+ this._hadControl = false;
254916
+ this.emit("data", this._prompt);
254917
+ c3 = c3.slice(this._prompt.length);
254918
+ }
254919
+ c3 = c3.toString().replace(/./g, this.replace);
254920
+ }
254921
+ }
254922
+ this.emit("data", c3);
254923
+ }
254924
+ end(c3) {
254925
+ if (this.muted) {
254926
+ if (c3 && this.replace) {
254927
+ c3 = c3.toString().replace(/./g, this.replace);
254928
+ } else {
254929
+ c3 = null;
254930
+ }
254931
+ }
254932
+ if (c3) {
254933
+ this.emit("data", c3);
254934
+ }
254935
+ this.emit("end");
254936
+ }
254937
+ destroy(...args) {
254938
+ return this.#proxy("destroy", ...args);
254939
+ }
254940
+ destroySoon(...args) {
254941
+ return this.#proxy("destroySoon", ...args);
254942
+ }
254943
+ close(...args) {
254944
+ return this.#proxy("close", ...args);
254945
+ }
254946
+ }
254947
+ module.exports = MuteStream2;
254948
+ });
254949
+
254830
254950
  // ../../node_modules/.bun/yaml@2.8.1/node_modules/yaml/dist/nodes/identity.js
254831
254951
  var require_identity = __commonJS((exports) => {
254832
254952
  var ALIAS = Symbol.for("yaml.alias");
@@ -259580,7 +259700,7 @@ var require_composer = __commonJS((exports) => {
259580
259700
  var node_process = __require("process");
259581
259701
  var directives5 = require_directives3();
259582
259702
  var Document = require_Document();
259583
- var errors4 = require_errors3();
259703
+ var errors5 = require_errors3();
259584
259704
  var identity2 = require_identity();
259585
259705
  var composeDoc = require_compose_doc();
259586
259706
  var resolveEnd = require_resolve_end();
@@ -259631,9 +259751,9 @@ var require_composer = __commonJS((exports) => {
259631
259751
  this.onError = (source, code2, message, warning) => {
259632
259752
  const pos = getErrorPos(source);
259633
259753
  if (warning)
259634
- this.warnings.push(new errors4.YAMLWarning(pos, code2, message));
259754
+ this.warnings.push(new errors5.YAMLWarning(pos, code2, message));
259635
259755
  else
259636
- this.errors.push(new errors4.YAMLParseError(pos, code2, message));
259756
+ this.errors.push(new errors5.YAMLParseError(pos, code2, message));
259637
259757
  };
259638
259758
  this.directives = new directives5.Directives({ version: options.version || "1.2" });
259639
259759
  this.options = options;
@@ -259717,7 +259837,7 @@ ${cb}` : comment;
259717
259837
  break;
259718
259838
  case "error": {
259719
259839
  const msg = token.source ? `${token.message}: ${JSON.stringify(token.source)}` : token.message;
259720
- const error51 = new errors4.YAMLParseError(getErrorPos(token), "UNEXPECTED_TOKEN", msg);
259840
+ const error51 = new errors5.YAMLParseError(getErrorPos(token), "UNEXPECTED_TOKEN", msg);
259721
259841
  if (this.atDirectives || !this.doc)
259722
259842
  this.errors.push(error51);
259723
259843
  else
@@ -259727,7 +259847,7 @@ ${cb}` : comment;
259727
259847
  case "doc-end": {
259728
259848
  if (!this.doc) {
259729
259849
  const msg = "Unexpected doc-end without preceding document";
259730
- this.errors.push(new errors4.YAMLParseError(getErrorPos(token), "UNEXPECTED_TOKEN", msg));
259850
+ this.errors.push(new errors5.YAMLParseError(getErrorPos(token), "UNEXPECTED_TOKEN", msg));
259731
259851
  break;
259732
259852
  }
259733
259853
  this.doc.directives.docEnd = true;
@@ -259742,7 +259862,7 @@ ${end.comment}` : end.comment;
259742
259862
  break;
259743
259863
  }
259744
259864
  default:
259745
- this.errors.push(new errors4.YAMLParseError(getErrorPos(token), "UNEXPECTED_TOKEN", `Unsupported token ${token.type}`));
259865
+ this.errors.push(new errors5.YAMLParseError(getErrorPos(token), "UNEXPECTED_TOKEN", `Unsupported token ${token.type}`));
259746
259866
  }
259747
259867
  }
259748
259868
  *end(forceDoc = false, endOffset = -1) {
@@ -259768,7 +259888,7 @@ ${end.comment}` : end.comment;
259768
259888
  var require_cst_scalar = __commonJS((exports) => {
259769
259889
  var resolveBlockScalar = require_resolve_block_scalar();
259770
259890
  var resolveFlowScalar = require_resolve_flow_scalar();
259771
- var errors4 = require_errors3();
259891
+ var errors5 = require_errors3();
259772
259892
  var stringifyString = require_stringifyString();
259773
259893
  function resolveAsScalar(token, strict = true, onError) {
259774
259894
  if (token) {
@@ -259777,7 +259897,7 @@ var require_cst_scalar = __commonJS((exports) => {
259777
259897
  if (onError)
259778
259898
  onError(offset, code2, message);
259779
259899
  else
259780
- throw new errors4.YAMLParseError([offset, offset + 1], code2, message);
259900
+ throw new errors5.YAMLParseError([offset, offset + 1], code2, message);
259781
259901
  };
259782
259902
  switch (token.type) {
259783
259903
  case "scalar":
@@ -261639,7 +261759,7 @@ var require_parser3 = __commonJS((exports) => {
261639
261759
  var require_public_api = __commonJS((exports) => {
261640
261760
  var composer = require_composer();
261641
261761
  var Document = require_Document();
261642
- var errors4 = require_errors3();
261762
+ var errors5 = require_errors3();
261643
261763
  var log = require_log();
261644
261764
  var identity2 = require_identity();
261645
261765
  var lineCounter = require_line_counter();
@@ -261656,8 +261776,8 @@ var require_public_api = __commonJS((exports) => {
261656
261776
  const docs = Array.from(composer$1.compose(parser$1.parse(source)));
261657
261777
  if (prettyErrors && lineCounter2)
261658
261778
  for (const doc2 of docs) {
261659
- doc2.errors.forEach(errors4.prettifyError(source, lineCounter2));
261660
- doc2.warnings.forEach(errors4.prettifyError(source, lineCounter2));
261779
+ doc2.errors.forEach(errors5.prettifyError(source, lineCounter2));
261780
+ doc2.warnings.forEach(errors5.prettifyError(source, lineCounter2));
261661
261781
  }
261662
261782
  if (docs.length > 0)
261663
261783
  return docs;
@@ -261672,13 +261792,13 @@ var require_public_api = __commonJS((exports) => {
261672
261792
  if (!doc2)
261673
261793
  doc2 = _doc;
261674
261794
  else if (doc2.options.logLevel !== "silent") {
261675
- doc2.errors.push(new errors4.YAMLParseError(_doc.range.slice(0, 2), "MULTIPLE_DOCS", "Source contains multiple documents; please use YAML.parseAllDocuments()"));
261795
+ doc2.errors.push(new errors5.YAMLParseError(_doc.range.slice(0, 2), "MULTIPLE_DOCS", "Source contains multiple documents; please use YAML.parseAllDocuments()"));
261676
261796
  break;
261677
261797
  }
261678
261798
  }
261679
261799
  if (prettyErrors && lineCounter2) {
261680
- doc2.errors.forEach(errors4.prettifyError(source, lineCounter2));
261681
- doc2.warnings.forEach(errors4.prettifyError(source, lineCounter2));
261800
+ doc2.errors.forEach(errors5.prettifyError(source, lineCounter2));
261801
+ doc2.warnings.forEach(errors5.prettifyError(source, lineCounter2));
261682
261802
  }
261683
261803
  return doc2;
261684
261804
  }
@@ -263129,7 +263249,13 @@ function yoctoSpinner(options) {
263129
263249
  // ../utils/dist/terminal.js
263130
263250
  var import_console_table_printer = __toESM(require_dist2(), 1);
263131
263251
  function shouldPrint() {
263132
- return process.env.SETTLEMINT_DISABLE_TERMINAL !== "true";
263252
+ if (process.env.SETTLEMINT_DISABLE_TERMINAL === "true") {
263253
+ return false;
263254
+ }
263255
+ if (process.env.CLAUDECODE || process.env.REPL_ID || process.env.AGENT) {
263256
+ return false;
263257
+ }
263258
+ return true;
263133
263259
  }
263134
263260
  var ascii = () => {
263135
263261
  if (!shouldPrint()) {
@@ -263161,8 +263287,13 @@ var CommandError = class extends Error {
263161
263287
  this.output = output;
263162
263288
  }
263163
263289
  };
263290
+ function isQuietMode() {
263291
+ return !!(process.env.CLAUDECODE || process.env.REPL_ID || process.env.AGENT);
263292
+ }
263164
263293
  async function executeCommand(command, args, options) {
263165
263294
  const { silent, ...spawnOptions } = options ?? {};
263295
+ const quietMode = isQuietMode();
263296
+ const shouldSuppressOutput = quietMode ? silent !== false : !!silent;
263166
263297
  const child = spawn(command, args, {
263167
263298
  ...spawnOptions,
263168
263299
  env: {
@@ -263172,23 +263303,38 @@ async function executeCommand(command, args, options) {
263172
263303
  });
263173
263304
  process.stdin.pipe(child.stdin);
263174
263305
  const output = [];
263306
+ const stdoutOutput = [];
263307
+ const stderrOutput = [];
263175
263308
  return new Promise((resolve, reject) => {
263176
263309
  child.stdout.on("data", (data) => {
263177
263310
  const maskedData = maskTokens(data.toString());
263178
- if (!silent) {
263311
+ if (!shouldSuppressOutput) {
263179
263312
  process.stdout.write(maskedData);
263180
263313
  }
263181
263314
  output.push(maskedData);
263315
+ stdoutOutput.push(maskedData);
263182
263316
  });
263183
263317
  child.stderr.on("data", (data) => {
263184
263318
  const maskedData = maskTokens(data.toString());
263185
- if (!silent) {
263319
+ if (!shouldSuppressOutput) {
263186
263320
  process.stderr.write(maskedData);
263187
263321
  }
263188
263322
  output.push(maskedData);
263323
+ stderrOutput.push(maskedData);
263189
263324
  });
263325
+ const showErrorOutput = () => {
263326
+ if (quietMode && shouldSuppressOutput && output.length > 0) {
263327
+ if (stdoutOutput.length > 0) {
263328
+ process.stdout.write(stdoutOutput.join(""));
263329
+ }
263330
+ if (stderrOutput.length > 0) {
263331
+ process.stderr.write(stderrOutput.join(""));
263332
+ }
263333
+ }
263334
+ };
263190
263335
  child.on("error", (err) => {
263191
263336
  process.stdin.unpipe(child.stdin);
263337
+ showErrorOutput();
263192
263338
  reject(new CommandError(err.message, "code" in err && typeof err.code === "number" ? err.code : 1, output));
263193
263339
  });
263194
263340
  child.on("close", (code) => {
@@ -263197,6 +263343,7 @@ async function executeCommand(command, args, options) {
263197
263343
  resolve(output);
263198
263344
  return;
263199
263345
  }
263346
+ showErrorOutput();
263200
263347
  reject(new CommandError(`Command "${command}" exited with code ${code}`, code, output));
263201
263348
  });
263202
263349
  });
@@ -263209,17 +263356,51 @@ var intro = (msg) => {
263209
263356
  console.log(magentaBright(maskTokens(msg)));
263210
263357
  console.log("");
263211
263358
  };
263359
+ function colorize(msg, level) {
263360
+ if (msg.includes("\x1B[")) {
263361
+ return msg;
263362
+ }
263363
+ if (level === "warn") {
263364
+ return yellowBright(msg);
263365
+ }
263366
+ if (level === "error") {
263367
+ return redBright(msg);
263368
+ }
263369
+ return msg;
263370
+ }
263371
+ function canPrint(level) {
263372
+ if (level !== "info") {
263373
+ return true;
263374
+ }
263375
+ return shouldPrint();
263376
+ }
263377
+ function prepareMessage(value, level) {
263378
+ let text;
263379
+ if (value instanceof Error) {
263380
+ text = value.message;
263381
+ if (level === "error" && value.stack) {
263382
+ text = `${text}
263383
+
263384
+ ${value.stack}`;
263385
+ }
263386
+ } else {
263387
+ text = value;
263388
+ }
263389
+ return maskTokens(text);
263390
+ }
263212
263391
  var note = (message, level = "info") => {
263213
- if (!shouldPrint()) {
263392
+ if (!canPrint(level)) {
263214
263393
  return;
263215
263394
  }
263216
- const maskedMessage = maskTokens(message);
263395
+ const msg = prepareMessage(message, level);
263217
263396
  console.log("");
263218
263397
  if (level === "warn") {
263219
- console.warn(yellowBright(maskedMessage));
263220
- return;
263398
+ console.warn(colorize(msg, level));
263399
+ } else if (level === "error") {
263400
+ console.error(colorize(msg, level));
263401
+ } else {
263402
+ console.log(msg);
263221
263403
  }
263222
- console.log(maskedMessage);
263223
263404
  };
263224
263405
  function list(title, items) {
263225
263406
  const formatItems = (items$1) => {
@@ -263253,11 +263434,8 @@ var SpinnerError = class extends Error {
263253
263434
  };
263254
263435
  var spinner = async (options) => {
263255
263436
  const handleError = (error) => {
263256
- const errorMessage = maskTokens(error.message);
263257
- note(redBright(`${errorMessage}
263258
-
263259
- ${error.stack}`));
263260
- throw new SpinnerError(errorMessage, error);
263437
+ note(error, "error");
263438
+ throw new SpinnerError(error.message, error);
263261
263439
  };
263262
263440
  if (is_in_ci_default || !shouldPrint()) {
263263
263441
  try {
@@ -282006,7 +282184,7 @@ function pruneCurrentEnv(currentEnv, env2) {
282006
282184
  var package_default = {
282007
282185
  name: "@settlemint/sdk-cli",
282008
282186
  description: "Command-line interface for SettleMint SDK, providing development tools and project management capabilities",
282009
- version: "2.6.3",
282187
+ version: "2.6.4-main400d9402",
282010
282188
  type: "module",
282011
282189
  private: false,
282012
282190
  license: "FSL-1.1-MIT",
@@ -282056,14 +282234,14 @@ var package_default = {
282056
282234
  devDependencies: {
282057
282235
  "@commander-js/extra-typings": "14.0.0",
282058
282236
  commander: "14.0.2",
282059
- "@inquirer/confirm": "5.1.19",
282237
+ "@inquirer/confirm": "5.1.20",
282060
282238
  "@inquirer/input": "4.2.5",
282061
282239
  "@inquirer/password": "4.0.21",
282062
282240
  "@inquirer/select": "4.4.0",
282063
- "@settlemint/sdk-hasura": "2.6.3",
282064
- "@settlemint/sdk-js": "2.6.3",
282065
- "@settlemint/sdk-utils": "2.6.3",
282066
- "@settlemint/sdk-viem": "2.6.3",
282241
+ "@settlemint/sdk-hasura": "2.6.4-main400d9402",
282242
+ "@settlemint/sdk-js": "2.6.4-main400d9402",
282243
+ "@settlemint/sdk-utils": "2.6.4-main400d9402",
282244
+ "@settlemint/sdk-viem": "2.6.4-main400d9402",
282067
282245
  "@types/node": "24.10.0",
282068
282246
  "@types/semver": "7.7.1",
282069
282247
  "@types/which": "3.0.4",
@@ -282080,7 +282258,7 @@ var package_default = {
282080
282258
  },
282081
282259
  peerDependencies: {
282082
282260
  hardhat: "<= 4",
282083
- "@settlemint/sdk-js": "2.6.3"
282261
+ "@settlemint/sdk-js": "2.6.4-main400d9402"
282084
282262
  },
282085
282263
  peerDependenciesMeta: {
282086
282264
  hardhat: {
@@ -282880,7 +283058,7 @@ var parseRequestArgs = (documentOrOptions, variables, requestHeaders) => {
282880
283058
  signal: undefined
282881
283059
  };
282882
283060
  };
282883
- // ../../node_modules/.bun/@0no-co+graphql.web@1.2.0/node_modules/@0no-co/graphql.web/dist/graphql.web.mjs
283061
+ // ../../node_modules/.bun/@0no-co+graphql.web@1.2.0+2e36366335d68c76/node_modules/@0no-co/graphql.web/dist/graphql.web.mjs
282884
283062
  var e = {
282885
283063
  NAME: "Name",
282886
283064
  DOCUMENT: "Document",
@@ -286066,22 +286244,62 @@ async function getPackageManagerExecutable(targetDir) {
286066
286244
  };
286067
286245
  }
286068
286246
  function shouldPrint2() {
286069
- return process.env.SETTLEMINT_DISABLE_TERMINAL !== "true";
286247
+ if (process.env.SETTLEMINT_DISABLE_TERMINAL === "true") {
286248
+ return false;
286249
+ }
286250
+ if (process.env.CLAUDECODE || process.env.REPL_ID || process.env.AGENT) {
286251
+ return false;
286252
+ }
286253
+ return true;
286070
286254
  }
286071
286255
  var maskTokens4 = (output) => {
286072
286256
  return output.replace(/sm_(pat|aat|sat)_[0-9a-zA-Z]+/g, "***");
286073
286257
  };
286258
+ function colorize2(msg, level) {
286259
+ if (msg.includes("\x1B[")) {
286260
+ return msg;
286261
+ }
286262
+ if (level === "warn") {
286263
+ return yellowBright(msg);
286264
+ }
286265
+ if (level === "error") {
286266
+ return redBright(msg);
286267
+ }
286268
+ return msg;
286269
+ }
286270
+ function canPrint2(level) {
286271
+ if (level !== "info") {
286272
+ return true;
286273
+ }
286274
+ return shouldPrint2();
286275
+ }
286276
+ function prepareMessage2(value2, level) {
286277
+ let text;
286278
+ if (value2 instanceof Error) {
286279
+ text = value2.message;
286280
+ if (level === "error" && value2.stack) {
286281
+ text = `${text}
286282
+
286283
+ ${value2.stack}`;
286284
+ }
286285
+ } else {
286286
+ text = value2;
286287
+ }
286288
+ return maskTokens4(text);
286289
+ }
286074
286290
  var note2 = (message, level = "info") => {
286075
- if (!shouldPrint2()) {
286291
+ if (!canPrint2(level)) {
286076
286292
  return;
286077
286293
  }
286078
- const maskedMessage = maskTokens4(message);
286294
+ const msg = prepareMessage2(message, level);
286079
286295
  console.log("");
286080
286296
  if (level === "warn") {
286081
- console.warn(yellowBright(maskedMessage));
286082
- return;
286297
+ console.warn(colorize2(msg, level));
286298
+ } else if (level === "error") {
286299
+ console.error(colorize2(msg, level));
286300
+ } else {
286301
+ console.log(msg);
286083
286302
  }
286084
- console.log(maskedMessage);
286085
286303
  };
286086
286304
  async function installDependencies(pkgs, cwd) {
286087
286305
  try {
@@ -313706,7 +313924,769 @@ function extractInfoFromBody(body) {
313706
313924
  }
313707
313925
  }
313708
313926
 
313709
- // ../../node_modules/.bun/@inquirer+confirm@5.1.19+c30ff3a63f0500d5/node_modules/@inquirer/confirm/dist/esm/index.js
313927
+ // ../../node_modules/.bun/@inquirer+core@10.3.1+c30ff3a63f0500d5/node_modules/@inquirer/core/dist/esm/lib/key.js
313928
+ var isTabKey2 = (key) => key.name === "tab";
313929
+ var isEnterKey2 = (key) => key.name === "enter" || key.name === "return";
313930
+ // ../../node_modules/.bun/@inquirer+core@10.3.1+c30ff3a63f0500d5/node_modules/@inquirer/core/dist/esm/lib/errors.js
313931
+ class AbortPromptError2 extends Error {
313932
+ name = "AbortPromptError";
313933
+ message = "Prompt was aborted";
313934
+ constructor(options) {
313935
+ super();
313936
+ this.cause = options?.cause;
313937
+ }
313938
+ }
313939
+
313940
+ class CancelPromptError2 extends Error {
313941
+ name = "CancelPromptError";
313942
+ message = "Prompt was canceled";
313943
+ }
313944
+
313945
+ class ExitPromptError2 extends Error {
313946
+ name = "ExitPromptError";
313947
+ }
313948
+
313949
+ class HookError2 extends Error {
313950
+ name = "HookError";
313951
+ }
313952
+
313953
+ class ValidationError2 extends Error {
313954
+ name = "ValidationError";
313955
+ }
313956
+ // ../../node_modules/.bun/@inquirer+core@10.3.1+c30ff3a63f0500d5/node_modules/@inquirer/core/dist/esm/lib/use-state.js
313957
+ import { AsyncResource as AsyncResource5 } from "node:async_hooks";
313958
+
313959
+ // ../../node_modules/.bun/@inquirer+core@10.3.1+c30ff3a63f0500d5/node_modules/@inquirer/core/dist/esm/lib/hook-engine.js
313960
+ import { AsyncLocalStorage as AsyncLocalStorage2, AsyncResource as AsyncResource4 } from "node:async_hooks";
313961
+ var hookStorage2 = new AsyncLocalStorage2;
313962
+ function createStore2(rl) {
313963
+ const store = {
313964
+ rl,
313965
+ hooks: [],
313966
+ hooksCleanup: [],
313967
+ hooksEffect: [],
313968
+ index: 0,
313969
+ handleChange() {}
313970
+ };
313971
+ return store;
313972
+ }
313973
+ function withHooks2(rl, cb) {
313974
+ const store = createStore2(rl);
313975
+ return hookStorage2.run(store, () => {
313976
+ function cycle(render) {
313977
+ store.handleChange = () => {
313978
+ store.index = 0;
313979
+ render();
313980
+ };
313981
+ store.handleChange();
313982
+ }
313983
+ return cb(cycle);
313984
+ });
313985
+ }
313986
+ function getStore2() {
313987
+ const store = hookStorage2.getStore();
313988
+ if (!store) {
313989
+ throw new HookError2("[Inquirer] Hook functions can only be called from within a prompt");
313990
+ }
313991
+ return store;
313992
+ }
313993
+ function readline3() {
313994
+ return getStore2().rl;
313995
+ }
313996
+ function withUpdates2(fn) {
313997
+ const wrapped = (...args) => {
313998
+ const store = getStore2();
313999
+ let shouldUpdate = false;
314000
+ const oldHandleChange = store.handleChange;
314001
+ store.handleChange = () => {
314002
+ shouldUpdate = true;
314003
+ };
314004
+ const returnValue = fn(...args);
314005
+ if (shouldUpdate) {
314006
+ oldHandleChange();
314007
+ }
314008
+ store.handleChange = oldHandleChange;
314009
+ return returnValue;
314010
+ };
314011
+ return AsyncResource4.bind(wrapped);
314012
+ }
314013
+ function withPointer2(cb) {
314014
+ const store = getStore2();
314015
+ const { index: index2 } = store;
314016
+ const pointer = {
314017
+ get() {
314018
+ return store.hooks[index2];
314019
+ },
314020
+ set(value5) {
314021
+ store.hooks[index2] = value5;
314022
+ },
314023
+ initialized: index2 in store.hooks
314024
+ };
314025
+ const returnValue = cb(pointer);
314026
+ store.index++;
314027
+ return returnValue;
314028
+ }
314029
+ function handleChange2() {
314030
+ getStore2().handleChange();
314031
+ }
314032
+ var effectScheduler2 = {
314033
+ queue(cb) {
314034
+ const store = getStore2();
314035
+ const { index: index2 } = store;
314036
+ store.hooksEffect.push(() => {
314037
+ store.hooksCleanup[index2]?.();
314038
+ const cleanFn = cb(readline3());
314039
+ if (cleanFn != null && typeof cleanFn !== "function") {
314040
+ throw new ValidationError2("useEffect return value must be a cleanup function or nothing.");
314041
+ }
314042
+ store.hooksCleanup[index2] = cleanFn;
314043
+ });
314044
+ },
314045
+ run() {
314046
+ const store = getStore2();
314047
+ withUpdates2(() => {
314048
+ store.hooksEffect.forEach((effect) => {
314049
+ effect();
314050
+ });
314051
+ store.hooksEffect.length = 0;
314052
+ })();
314053
+ },
314054
+ clearAll() {
314055
+ const store = getStore2();
314056
+ store.hooksCleanup.forEach((cleanFn) => {
314057
+ cleanFn?.();
314058
+ });
314059
+ store.hooksEffect.length = 0;
314060
+ store.hooksCleanup.length = 0;
314061
+ }
314062
+ };
314063
+
314064
+ // ../../node_modules/.bun/@inquirer+core@10.3.1+c30ff3a63f0500d5/node_modules/@inquirer/core/dist/esm/lib/use-state.js
314065
+ function useState2(defaultValue) {
314066
+ return withPointer2((pointer) => {
314067
+ const setState = AsyncResource5.bind(function setState(newValue) {
314068
+ if (pointer.get() !== newValue) {
314069
+ pointer.set(newValue);
314070
+ handleChange2();
314071
+ }
314072
+ });
314073
+ if (pointer.initialized) {
314074
+ return [pointer.get(), setState];
314075
+ }
314076
+ const value5 = typeof defaultValue === "function" ? defaultValue() : defaultValue;
314077
+ pointer.set(value5);
314078
+ return [value5, setState];
314079
+ });
314080
+ }
314081
+
314082
+ // ../../node_modules/.bun/@inquirer+core@10.3.1+c30ff3a63f0500d5/node_modules/@inquirer/core/dist/esm/lib/use-effect.js
314083
+ function useEffect2(cb, depArray) {
314084
+ withPointer2((pointer) => {
314085
+ const oldDeps = pointer.get();
314086
+ const hasChanged = !Array.isArray(oldDeps) || depArray.some((dep, i7) => !Object.is(dep, oldDeps[i7]));
314087
+ if (hasChanged) {
314088
+ effectScheduler2.queue(cb);
314089
+ }
314090
+ pointer.set(depArray);
314091
+ });
314092
+ }
314093
+
314094
+ // ../../node_modules/.bun/@inquirer+core@10.3.1+c30ff3a63f0500d5/node_modules/@inquirer/core/dist/esm/lib/theme.js
314095
+ var import_yoctocolors_cjs4 = __toESM(require_yoctocolors_cjs(), 1);
314096
+
314097
+ // ../../node_modules/.bun/@inquirer+figures@1.0.15/node_modules/@inquirer/figures/dist/esm/index.js
314098
+ import process8 from "node:process";
314099
+ function isUnicodeSupported3() {
314100
+ if (process8.platform !== "win32") {
314101
+ return process8.env["TERM"] !== "linux";
314102
+ }
314103
+ return Boolean(process8.env["WT_SESSION"]) || Boolean(process8.env["TERMINUS_SUBLIME"]) || process8.env["ConEmuTask"] === "{cmd::Cmder}" || process8.env["TERM_PROGRAM"] === "Terminus-Sublime" || process8.env["TERM_PROGRAM"] === "vscode" || process8.env["TERM"] === "xterm-256color" || process8.env["TERM"] === "alacritty" || process8.env["TERMINAL_EMULATOR"] === "JetBrains-JediTerm";
314104
+ }
314105
+ var common2 = {
314106
+ circleQuestionMark: "(?)",
314107
+ questionMarkPrefix: "(?)",
314108
+ square: "█",
314109
+ squareDarkShade: "▓",
314110
+ squareMediumShade: "▒",
314111
+ squareLightShade: "░",
314112
+ squareTop: "▀",
314113
+ squareBottom: "▄",
314114
+ squareLeft: "▌",
314115
+ squareRight: "▐",
314116
+ squareCenter: "■",
314117
+ bullet: "●",
314118
+ dot: "․",
314119
+ ellipsis: "…",
314120
+ pointerSmall: "›",
314121
+ triangleUp: "▲",
314122
+ triangleUpSmall: "▴",
314123
+ triangleDown: "▼",
314124
+ triangleDownSmall: "▾",
314125
+ triangleLeftSmall: "◂",
314126
+ triangleRightSmall: "▸",
314127
+ home: "⌂",
314128
+ heart: "♥",
314129
+ musicNote: "♪",
314130
+ musicNoteBeamed: "♫",
314131
+ arrowUp: "↑",
314132
+ arrowDown: "↓",
314133
+ arrowLeft: "←",
314134
+ arrowRight: "→",
314135
+ arrowLeftRight: "↔",
314136
+ arrowUpDown: "↕",
314137
+ almostEqual: "≈",
314138
+ notEqual: "≠",
314139
+ lessOrEqual: "≤",
314140
+ greaterOrEqual: "≥",
314141
+ identical: "≡",
314142
+ infinity: "∞",
314143
+ subscriptZero: "₀",
314144
+ subscriptOne: "₁",
314145
+ subscriptTwo: "₂",
314146
+ subscriptThree: "₃",
314147
+ subscriptFour: "₄",
314148
+ subscriptFive: "₅",
314149
+ subscriptSix: "₆",
314150
+ subscriptSeven: "₇",
314151
+ subscriptEight: "₈",
314152
+ subscriptNine: "₉",
314153
+ oneHalf: "½",
314154
+ oneThird: "⅓",
314155
+ oneQuarter: "¼",
314156
+ oneFifth: "⅕",
314157
+ oneSixth: "⅙",
314158
+ oneEighth: "⅛",
314159
+ twoThirds: "⅔",
314160
+ twoFifths: "⅖",
314161
+ threeQuarters: "¾",
314162
+ threeFifths: "⅗",
314163
+ threeEighths: "⅜",
314164
+ fourFifths: "⅘",
314165
+ fiveSixths: "⅚",
314166
+ fiveEighths: "⅝",
314167
+ sevenEighths: "⅞",
314168
+ line: "─",
314169
+ lineBold: "━",
314170
+ lineDouble: "═",
314171
+ lineDashed0: "┄",
314172
+ lineDashed1: "┅",
314173
+ lineDashed2: "┈",
314174
+ lineDashed3: "┉",
314175
+ lineDashed4: "╌",
314176
+ lineDashed5: "╍",
314177
+ lineDashed6: "╴",
314178
+ lineDashed7: "╶",
314179
+ lineDashed8: "╸",
314180
+ lineDashed9: "╺",
314181
+ lineDashed10: "╼",
314182
+ lineDashed11: "╾",
314183
+ lineDashed12: "−",
314184
+ lineDashed13: "–",
314185
+ lineDashed14: "‐",
314186
+ lineDashed15: "⁃",
314187
+ lineVertical: "│",
314188
+ lineVerticalBold: "┃",
314189
+ lineVerticalDouble: "║",
314190
+ lineVerticalDashed0: "┆",
314191
+ lineVerticalDashed1: "┇",
314192
+ lineVerticalDashed2: "┊",
314193
+ lineVerticalDashed3: "┋",
314194
+ lineVerticalDashed4: "╎",
314195
+ lineVerticalDashed5: "╏",
314196
+ lineVerticalDashed6: "╵",
314197
+ lineVerticalDashed7: "╷",
314198
+ lineVerticalDashed8: "╹",
314199
+ lineVerticalDashed9: "╻",
314200
+ lineVerticalDashed10: "╽",
314201
+ lineVerticalDashed11: "╿",
314202
+ lineDownLeft: "┐",
314203
+ lineDownLeftArc: "╮",
314204
+ lineDownBoldLeftBold: "┓",
314205
+ lineDownBoldLeft: "┒",
314206
+ lineDownLeftBold: "┑",
314207
+ lineDownDoubleLeftDouble: "╗",
314208
+ lineDownDoubleLeft: "╖",
314209
+ lineDownLeftDouble: "╕",
314210
+ lineDownRight: "┌",
314211
+ lineDownRightArc: "╭",
314212
+ lineDownBoldRightBold: "┏",
314213
+ lineDownBoldRight: "┎",
314214
+ lineDownRightBold: "┍",
314215
+ lineDownDoubleRightDouble: "╔",
314216
+ lineDownDoubleRight: "╓",
314217
+ lineDownRightDouble: "╒",
314218
+ lineUpLeft: "┘",
314219
+ lineUpLeftArc: "╯",
314220
+ lineUpBoldLeftBold: "┛",
314221
+ lineUpBoldLeft: "┚",
314222
+ lineUpLeftBold: "┙",
314223
+ lineUpDoubleLeftDouble: "╝",
314224
+ lineUpDoubleLeft: "╜",
314225
+ lineUpLeftDouble: "╛",
314226
+ lineUpRight: "└",
314227
+ lineUpRightArc: "╰",
314228
+ lineUpBoldRightBold: "┗",
314229
+ lineUpBoldRight: "┖",
314230
+ lineUpRightBold: "┕",
314231
+ lineUpDoubleRightDouble: "╚",
314232
+ lineUpDoubleRight: "╙",
314233
+ lineUpRightDouble: "╘",
314234
+ lineUpDownLeft: "┤",
314235
+ lineUpBoldDownBoldLeftBold: "┫",
314236
+ lineUpBoldDownBoldLeft: "┨",
314237
+ lineUpDownLeftBold: "┥",
314238
+ lineUpBoldDownLeftBold: "┩",
314239
+ lineUpDownBoldLeftBold: "┪",
314240
+ lineUpDownBoldLeft: "┧",
314241
+ lineUpBoldDownLeft: "┦",
314242
+ lineUpDoubleDownDoubleLeftDouble: "╣",
314243
+ lineUpDoubleDownDoubleLeft: "╢",
314244
+ lineUpDownLeftDouble: "╡",
314245
+ lineUpDownRight: "├",
314246
+ lineUpBoldDownBoldRightBold: "┣",
314247
+ lineUpBoldDownBoldRight: "┠",
314248
+ lineUpDownRightBold: "┝",
314249
+ lineUpBoldDownRightBold: "┡",
314250
+ lineUpDownBoldRightBold: "┢",
314251
+ lineUpDownBoldRight: "┟",
314252
+ lineUpBoldDownRight: "┞",
314253
+ lineUpDoubleDownDoubleRightDouble: "╠",
314254
+ lineUpDoubleDownDoubleRight: "╟",
314255
+ lineUpDownRightDouble: "╞",
314256
+ lineDownLeftRight: "┬",
314257
+ lineDownBoldLeftBoldRightBold: "┳",
314258
+ lineDownLeftBoldRightBold: "┯",
314259
+ lineDownBoldLeftRight: "┰",
314260
+ lineDownBoldLeftBoldRight: "┱",
314261
+ lineDownBoldLeftRightBold: "┲",
314262
+ lineDownLeftRightBold: "┮",
314263
+ lineDownLeftBoldRight: "┭",
314264
+ lineDownDoubleLeftDoubleRightDouble: "╦",
314265
+ lineDownDoubleLeftRight: "╥",
314266
+ lineDownLeftDoubleRightDouble: "╤",
314267
+ lineUpLeftRight: "┴",
314268
+ lineUpBoldLeftBoldRightBold: "┻",
314269
+ lineUpLeftBoldRightBold: "┷",
314270
+ lineUpBoldLeftRight: "┸",
314271
+ lineUpBoldLeftBoldRight: "┹",
314272
+ lineUpBoldLeftRightBold: "┺",
314273
+ lineUpLeftRightBold: "┶",
314274
+ lineUpLeftBoldRight: "┵",
314275
+ lineUpDoubleLeftDoubleRightDouble: "╩",
314276
+ lineUpDoubleLeftRight: "╨",
314277
+ lineUpLeftDoubleRightDouble: "╧",
314278
+ lineUpDownLeftRight: "┼",
314279
+ lineUpBoldDownBoldLeftBoldRightBold: "╋",
314280
+ lineUpDownBoldLeftBoldRightBold: "╈",
314281
+ lineUpBoldDownLeftBoldRightBold: "╇",
314282
+ lineUpBoldDownBoldLeftRightBold: "╊",
314283
+ lineUpBoldDownBoldLeftBoldRight: "╉",
314284
+ lineUpBoldDownLeftRight: "╀",
314285
+ lineUpDownBoldLeftRight: "╁",
314286
+ lineUpDownLeftBoldRight: "┽",
314287
+ lineUpDownLeftRightBold: "┾",
314288
+ lineUpBoldDownBoldLeftRight: "╂",
314289
+ lineUpDownLeftBoldRightBold: "┿",
314290
+ lineUpBoldDownLeftBoldRight: "╃",
314291
+ lineUpBoldDownLeftRightBold: "╄",
314292
+ lineUpDownBoldLeftBoldRight: "╅",
314293
+ lineUpDownBoldLeftRightBold: "╆",
314294
+ lineUpDoubleDownDoubleLeftDoubleRightDouble: "╬",
314295
+ lineUpDoubleDownDoubleLeftRight: "╫",
314296
+ lineUpDownLeftDoubleRightDouble: "╪",
314297
+ lineCross: "╳",
314298
+ lineBackslash: "╲",
314299
+ lineSlash: "╱"
314300
+ };
314301
+ var specialMainSymbols2 = {
314302
+ tick: "✔",
314303
+ info: "ℹ",
314304
+ warning: "⚠",
314305
+ cross: "✘",
314306
+ squareSmall: "◻",
314307
+ squareSmallFilled: "◼",
314308
+ circle: "◯",
314309
+ circleFilled: "◉",
314310
+ circleDotted: "◌",
314311
+ circleDouble: "◎",
314312
+ circleCircle: "ⓞ",
314313
+ circleCross: "ⓧ",
314314
+ circlePipe: "Ⓘ",
314315
+ radioOn: "◉",
314316
+ radioOff: "◯",
314317
+ checkboxOn: "☒",
314318
+ checkboxOff: "☐",
314319
+ checkboxCircleOn: "ⓧ",
314320
+ checkboxCircleOff: "Ⓘ",
314321
+ pointer: "❯",
314322
+ triangleUpOutline: "△",
314323
+ triangleLeft: "◀",
314324
+ triangleRight: "▶",
314325
+ lozenge: "◆",
314326
+ lozengeOutline: "◇",
314327
+ hamburger: "☰",
314328
+ smiley: "㋡",
314329
+ mustache: "෴",
314330
+ star: "★",
314331
+ play: "▶",
314332
+ nodejs: "⬢",
314333
+ oneSeventh: "⅐",
314334
+ oneNinth: "⅑",
314335
+ oneTenth: "⅒"
314336
+ };
314337
+ var specialFallbackSymbols2 = {
314338
+ tick: "√",
314339
+ info: "i",
314340
+ warning: "‼",
314341
+ cross: "×",
314342
+ squareSmall: "□",
314343
+ squareSmallFilled: "■",
314344
+ circle: "( )",
314345
+ circleFilled: "(*)",
314346
+ circleDotted: "( )",
314347
+ circleDouble: "( )",
314348
+ circleCircle: "(○)",
314349
+ circleCross: "(×)",
314350
+ circlePipe: "(│)",
314351
+ radioOn: "(*)",
314352
+ radioOff: "( )",
314353
+ checkboxOn: "[×]",
314354
+ checkboxOff: "[ ]",
314355
+ checkboxCircleOn: "(×)",
314356
+ checkboxCircleOff: "( )",
314357
+ pointer: ">",
314358
+ triangleUpOutline: "∆",
314359
+ triangleLeft: "◄",
314360
+ triangleRight: "►",
314361
+ lozenge: "♦",
314362
+ lozengeOutline: "◊",
314363
+ hamburger: "≡",
314364
+ smiley: "☺",
314365
+ mustache: "┌─┐",
314366
+ star: "✶",
314367
+ play: "►",
314368
+ nodejs: "♦",
314369
+ oneSeventh: "1/7",
314370
+ oneNinth: "1/9",
314371
+ oneTenth: "1/10"
314372
+ };
314373
+ var mainSymbols2 = {
314374
+ ...common2,
314375
+ ...specialMainSymbols2
314376
+ };
314377
+ var fallbackSymbols2 = {
314378
+ ...common2,
314379
+ ...specialFallbackSymbols2
314380
+ };
314381
+ var shouldUseMain2 = isUnicodeSupported3();
314382
+ var figures2 = shouldUseMain2 ? mainSymbols2 : fallbackSymbols2;
314383
+ var esm_default4 = figures2;
314384
+ var replacements2 = Object.entries(specialMainSymbols2);
314385
+
314386
+ // ../../node_modules/.bun/@inquirer+core@10.3.1+c30ff3a63f0500d5/node_modules/@inquirer/core/dist/esm/lib/theme.js
314387
+ var defaultTheme2 = {
314388
+ prefix: {
314389
+ idle: import_yoctocolors_cjs4.default.blue("?"),
314390
+ done: import_yoctocolors_cjs4.default.green(esm_default4.tick)
314391
+ },
314392
+ spinner: {
314393
+ interval: 80,
314394
+ frames: ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"].map((frame) => import_yoctocolors_cjs4.default.yellow(frame))
314395
+ },
314396
+ style: {
314397
+ answer: import_yoctocolors_cjs4.default.cyan,
314398
+ message: import_yoctocolors_cjs4.default.bold,
314399
+ error: (text2) => import_yoctocolors_cjs4.default.red(`> ${text2}`),
314400
+ defaultAnswer: (text2) => import_yoctocolors_cjs4.default.dim(`(${text2})`),
314401
+ help: import_yoctocolors_cjs4.default.dim,
314402
+ highlight: import_yoctocolors_cjs4.default.cyan,
314403
+ key: (text2) => import_yoctocolors_cjs4.default.cyan(import_yoctocolors_cjs4.default.bold(`<${text2}>`))
314404
+ }
314405
+ };
314406
+
314407
+ // ../../node_modules/.bun/@inquirer+core@10.3.1+c30ff3a63f0500d5/node_modules/@inquirer/core/dist/esm/lib/make-theme.js
314408
+ function isPlainObject4(value5) {
314409
+ if (typeof value5 !== "object" || value5 === null)
314410
+ return false;
314411
+ let proto = value5;
314412
+ while (Object.getPrototypeOf(proto) !== null) {
314413
+ proto = Object.getPrototypeOf(proto);
314414
+ }
314415
+ return Object.getPrototypeOf(value5) === proto;
314416
+ }
314417
+ function deepMerge3(...objects) {
314418
+ const output = {};
314419
+ for (const obj of objects) {
314420
+ for (const [key, value5] of Object.entries(obj)) {
314421
+ const prevValue = output[key];
314422
+ output[key] = isPlainObject4(prevValue) && isPlainObject4(value5) ? deepMerge3(prevValue, value5) : value5;
314423
+ }
314424
+ }
314425
+ return output;
314426
+ }
314427
+ function makeTheme2(...themes) {
314428
+ const themesToMerge = [
314429
+ defaultTheme2,
314430
+ ...themes.filter((theme) => theme != null)
314431
+ ];
314432
+ return deepMerge3(...themesToMerge);
314433
+ }
314434
+
314435
+ // ../../node_modules/.bun/@inquirer+core@10.3.1+c30ff3a63f0500d5/node_modules/@inquirer/core/dist/esm/lib/use-prefix.js
314436
+ function usePrefix2({ status = "idle", theme }) {
314437
+ const [showLoader, setShowLoader] = useState2(false);
314438
+ const [tick, setTick] = useState2(0);
314439
+ const { prefix, spinner: spinner2 } = makeTheme2(theme);
314440
+ useEffect2(() => {
314441
+ if (status === "loading") {
314442
+ let tickInterval;
314443
+ let inc = -1;
314444
+ const delayTimeout = setTimeout(() => {
314445
+ setShowLoader(true);
314446
+ tickInterval = setInterval(() => {
314447
+ inc = inc + 1;
314448
+ setTick(inc % spinner2.frames.length);
314449
+ }, spinner2.interval);
314450
+ }, 300);
314451
+ return () => {
314452
+ clearTimeout(delayTimeout);
314453
+ clearInterval(tickInterval);
314454
+ };
314455
+ } else {
314456
+ setShowLoader(false);
314457
+ }
314458
+ }, [status]);
314459
+ if (showLoader) {
314460
+ return spinner2.frames[tick];
314461
+ }
314462
+ const iconName = status === "loading" ? "idle" : status;
314463
+ return typeof prefix === "string" ? prefix : prefix[iconName] ?? prefix["idle"];
314464
+ }
314465
+ // ../../node_modules/.bun/@inquirer+core@10.3.1+c30ff3a63f0500d5/node_modules/@inquirer/core/dist/esm/lib/use-ref.js
314466
+ function useRef2(val) {
314467
+ return useState2({ current: val })[0];
314468
+ }
314469
+
314470
+ // ../../node_modules/.bun/@inquirer+core@10.3.1+c30ff3a63f0500d5/node_modules/@inquirer/core/dist/esm/lib/use-keypress.js
314471
+ function useKeypress2(userHandler) {
314472
+ const signal = useRef2(userHandler);
314473
+ signal.current = userHandler;
314474
+ useEffect2((rl) => {
314475
+ let ignore = false;
314476
+ const handler = withUpdates2((_input, event) => {
314477
+ if (ignore)
314478
+ return;
314479
+ signal.current(event, rl);
314480
+ });
314481
+ rl.input.on("keypress", handler);
314482
+ return () => {
314483
+ ignore = true;
314484
+ rl.input.removeListener("keypress", handler);
314485
+ };
314486
+ }, []);
314487
+ }
314488
+ // ../../node_modules/.bun/@inquirer+core@10.3.1+c30ff3a63f0500d5/node_modules/@inquirer/core/dist/esm/lib/utils.js
314489
+ var import_cli_width2 = __toESM(require_cli_width(), 1);
314490
+ var import_wrap_ansi2 = __toESM(require_wrap_ansi(), 1);
314491
+ function breakLines2(content, width) {
314492
+ return content.split(`
314493
+ `).flatMap((line) => import_wrap_ansi2.default(line, width, { trim: false, hard: true }).split(`
314494
+ `).map((str) => str.trimEnd())).join(`
314495
+ `);
314496
+ }
314497
+ function readlineWidth2() {
314498
+ return import_cli_width2.default({ defaultWidth: 80, output: readline3().output });
314499
+ }
314500
+
314501
+ // ../../node_modules/.bun/@inquirer+core@10.3.1+c30ff3a63f0500d5/node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
314502
+ var import_mute_stream2 = __toESM(require_lib13(), 1);
314503
+ import * as readline4 from "node:readline";
314504
+ import { AsyncResource as AsyncResource6 } from "node:async_hooks";
314505
+
314506
+ // ../../node_modules/.bun/@inquirer+core@10.3.1+c30ff3a63f0500d5/node_modules/@inquirer/core/dist/esm/lib/screen-manager.js
314507
+ import { stripVTControlCharacters as stripVTControlCharacters3 } from "node:util";
314508
+
314509
+ // ../../node_modules/.bun/@inquirer+ansi@1.0.2/node_modules/@inquirer/ansi/dist/esm/index.js
314510
+ var ESC2 = "\x1B[";
314511
+ var cursorLeft2 = ESC2 + "G";
314512
+ var cursorHide2 = ESC2 + "?25l";
314513
+ var cursorShow2 = ESC2 + "?25h";
314514
+ var cursorUp2 = (rows = 1) => rows > 0 ? `${ESC2}${rows}A` : "";
314515
+ var cursorDown2 = (rows = 1) => rows > 0 ? `${ESC2}${rows}B` : "";
314516
+ var cursorTo2 = (x6, y4) => {
314517
+ if (typeof y4 === "number" && !Number.isNaN(y4)) {
314518
+ return `${ESC2}${y4 + 1};${x6 + 1}H`;
314519
+ }
314520
+ return `${ESC2}${x6 + 1}G`;
314521
+ };
314522
+ var eraseLine2 = ESC2 + "2K";
314523
+ var eraseLines2 = (lines) => lines > 0 ? (eraseLine2 + cursorUp2(1)).repeat(lines - 1) + eraseLine2 + cursorLeft2 : "";
314524
+
314525
+ // ../../node_modules/.bun/@inquirer+core@10.3.1+c30ff3a63f0500d5/node_modules/@inquirer/core/dist/esm/lib/screen-manager.js
314526
+ var height2 = (content) => content.split(`
314527
+ `).length;
314528
+ var lastLine2 = (content) => content.split(`
314529
+ `).pop() ?? "";
314530
+
314531
+ class ScreenManager2 {
314532
+ height = 0;
314533
+ extraLinesUnderPrompt = 0;
314534
+ cursorPos;
314535
+ rl;
314536
+ constructor(rl) {
314537
+ this.rl = rl;
314538
+ this.cursorPos = rl.getCursorPos();
314539
+ }
314540
+ write(content) {
314541
+ this.rl.output.unmute();
314542
+ this.rl.output.write(content);
314543
+ this.rl.output.mute();
314544
+ }
314545
+ render(content, bottomContent = "") {
314546
+ const promptLine = lastLine2(content);
314547
+ const rawPromptLine = stripVTControlCharacters3(promptLine);
314548
+ let prompt = rawPromptLine;
314549
+ if (this.rl.line.length > 0) {
314550
+ prompt = prompt.slice(0, -this.rl.line.length);
314551
+ }
314552
+ this.rl.setPrompt(prompt);
314553
+ this.cursorPos = this.rl.getCursorPos();
314554
+ const width = readlineWidth2();
314555
+ content = breakLines2(content, width);
314556
+ bottomContent = breakLines2(bottomContent, width);
314557
+ if (rawPromptLine.length % width === 0) {
314558
+ content += `
314559
+ `;
314560
+ }
314561
+ let output = content + (bottomContent ? `
314562
+ ` + bottomContent : "");
314563
+ const promptLineUpDiff = Math.floor(rawPromptLine.length / width) - this.cursorPos.rows;
314564
+ const bottomContentHeight = promptLineUpDiff + (bottomContent ? height2(bottomContent) : 0);
314565
+ if (bottomContentHeight > 0)
314566
+ output += cursorUp2(bottomContentHeight);
314567
+ output += cursorTo2(this.cursorPos.cols);
314568
+ this.write(cursorDown2(this.extraLinesUnderPrompt) + eraseLines2(this.height) + output);
314569
+ this.extraLinesUnderPrompt = bottomContentHeight;
314570
+ this.height = height2(output);
314571
+ }
314572
+ checkCursorPos() {
314573
+ const cursorPos = this.rl.getCursorPos();
314574
+ if (cursorPos.cols !== this.cursorPos.cols) {
314575
+ this.write(cursorTo2(cursorPos.cols));
314576
+ this.cursorPos = cursorPos;
314577
+ }
314578
+ }
314579
+ done({ clearContent }) {
314580
+ this.rl.setPrompt("");
314581
+ let output = cursorDown2(this.extraLinesUnderPrompt);
314582
+ output += clearContent ? eraseLines2(this.height) : `
314583
+ `;
314584
+ output += cursorShow2;
314585
+ this.write(output);
314586
+ this.rl.close();
314587
+ }
314588
+ }
314589
+
314590
+ // ../../node_modules/.bun/@inquirer+core@10.3.1+c30ff3a63f0500d5/node_modules/@inquirer/core/dist/esm/lib/promise-polyfill.js
314591
+ class PromisePolyfill2 extends Promise {
314592
+ static withResolver() {
314593
+ let resolve7;
314594
+ let reject;
314595
+ const promise2 = new Promise((res, rej) => {
314596
+ resolve7 = res;
314597
+ reject = rej;
314598
+ });
314599
+ return { promise: promise2, resolve: resolve7, reject };
314600
+ }
314601
+ }
314602
+
314603
+ // ../../node_modules/.bun/@inquirer+core@10.3.1+c30ff3a63f0500d5/node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
314604
+ function getCallSites2() {
314605
+ const _prepareStackTrace = Error.prepareStackTrace;
314606
+ let result = [];
314607
+ try {
314608
+ Error.prepareStackTrace = (_5, callSites) => {
314609
+ const callSitesWithoutCurrent = callSites.slice(1);
314610
+ result = callSitesWithoutCurrent;
314611
+ return callSitesWithoutCurrent;
314612
+ };
314613
+ new Error().stack;
314614
+ } catch {
314615
+ return result;
314616
+ }
314617
+ Error.prepareStackTrace = _prepareStackTrace;
314618
+ return result;
314619
+ }
314620
+ function createPrompt2(view) {
314621
+ const callSites = getCallSites2();
314622
+ const prompt = (config3, context = {}) => {
314623
+ const { input = process.stdin, signal } = context;
314624
+ const cleanups = new Set;
314625
+ const output = new import_mute_stream2.default;
314626
+ output.pipe(context.output ?? process.stdout);
314627
+ const rl = readline4.createInterface({
314628
+ terminal: true,
314629
+ input,
314630
+ output
314631
+ });
314632
+ const screen = new ScreenManager2(rl);
314633
+ const { promise: promise2, resolve: resolve7, reject } = PromisePolyfill2.withResolver();
314634
+ const cancel3 = () => reject(new CancelPromptError2);
314635
+ if (signal) {
314636
+ const abort = () => reject(new AbortPromptError2({ cause: signal.reason }));
314637
+ if (signal.aborted) {
314638
+ abort();
314639
+ return Object.assign(promise2, { cancel: cancel3 });
314640
+ }
314641
+ signal.addEventListener("abort", abort);
314642
+ cleanups.add(() => signal.removeEventListener("abort", abort));
314643
+ }
314644
+ cleanups.add(onExit((code2, signal2) => {
314645
+ reject(new ExitPromptError2(`User force closed the prompt with ${code2} ${signal2}`));
314646
+ }));
314647
+ const sigint = () => reject(new ExitPromptError2(`User force closed the prompt with SIGINT`));
314648
+ rl.on("SIGINT", sigint);
314649
+ cleanups.add(() => rl.removeListener("SIGINT", sigint));
314650
+ const checkCursorPos = () => screen.checkCursorPos();
314651
+ rl.input.on("keypress", checkCursorPos);
314652
+ cleanups.add(() => rl.input.removeListener("keypress", checkCursorPos));
314653
+ return withHooks2(rl, (cycle) => {
314654
+ const hooksCleanup = AsyncResource6.bind(() => effectScheduler2.clearAll());
314655
+ rl.on("close", hooksCleanup);
314656
+ cleanups.add(() => rl.removeListener("close", hooksCleanup));
314657
+ cycle(() => {
314658
+ try {
314659
+ const nextView = view(config3, (value5) => {
314660
+ setImmediate(() => resolve7(value5));
314661
+ });
314662
+ if (nextView === undefined) {
314663
+ const callerFilename = callSites[1]?.getFileName();
314664
+ throw new Error(`Prompt functions must return a string.
314665
+ at ${callerFilename}`);
314666
+ }
314667
+ const [content, bottomContent] = typeof nextView === "string" ? [nextView] : nextView;
314668
+ screen.render(content, bottomContent);
314669
+ effectScheduler2.run();
314670
+ } catch (error51) {
314671
+ reject(error51);
314672
+ }
314673
+ });
314674
+ return Object.assign(promise2.then((answer) => {
314675
+ effectScheduler2.clearAll();
314676
+ return answer;
314677
+ }, (error51) => {
314678
+ effectScheduler2.clearAll();
314679
+ throw error51;
314680
+ }).finally(() => {
314681
+ cleanups.forEach((cleanup) => cleanup());
314682
+ screen.done({ clearContent: Boolean(context.clearPromptOnDone) });
314683
+ output.end();
314684
+ }).then(() => promise2), { cancel: cancel3 });
314685
+ });
314686
+ };
314687
+ return prompt;
314688
+ }
314689
+ // ../../node_modules/.bun/@inquirer+confirm@5.1.20+c30ff3a63f0500d5/node_modules/@inquirer/confirm/dist/esm/index.js
313710
314690
  function getBooleanValue(value5, defaultValue) {
313711
314691
  let answer = defaultValue !== false;
313712
314692
  if (/^(y|yes)/i.test(value5))
@@ -313718,21 +314698,21 @@ function getBooleanValue(value5, defaultValue) {
313718
314698
  function boolToString(value5) {
313719
314699
  return value5 ? "Yes" : "No";
313720
314700
  }
313721
- var esm_default4 = createPrompt((config3, done) => {
314701
+ var esm_default5 = createPrompt2((config3, done) => {
313722
314702
  const { transformer = boolToString } = config3;
313723
- const [status, setStatus] = useState("idle");
313724
- const [value5, setValue] = useState("");
313725
- const theme = makeTheme(config3.theme);
313726
- const prefix = usePrefix({ status, theme });
313727
- useKeypress((key, rl) => {
314703
+ const [status, setStatus] = useState2("idle");
314704
+ const [value5, setValue] = useState2("");
314705
+ const theme = makeTheme2(config3.theme);
314706
+ const prefix = usePrefix2({ status, theme });
314707
+ useKeypress2((key, rl) => {
313728
314708
  if (status !== "idle")
313729
314709
  return;
313730
- if (isEnterKey(key)) {
314710
+ if (isEnterKey2(key)) {
313731
314711
  const answer = getBooleanValue(value5, config3.default);
313732
314712
  setValue(transformer(answer));
313733
314713
  setStatus("done");
313734
314714
  done(answer);
313735
- } else if (isTabKey(key)) {
314715
+ } else if (isTabKey2(key)) {
313736
314716
  const answer = boolToString(!getBooleanValue(value5, config3.default));
313737
314717
  rl.clearLine(0);
313738
314718
  rl.write(answer);
@@ -313753,7 +314733,7 @@ var esm_default4 = createPrompt((config3, done) => {
313753
314733
  });
313754
314734
 
313755
314735
  // ../../node_modules/.bun/@inquirer+password@4.0.21+c30ff3a63f0500d5/node_modules/@inquirer/password/dist/esm/index.js
313756
- var esm_default5 = createPrompt((config3, done) => {
314736
+ var esm_default6 = createPrompt((config3, done) => {
313757
314737
  const { validate: validate8 = () => true } = config3;
313758
314738
  const theme = makeTheme(config3.theme);
313759
314739
  const [status, setStatus] = useState("idle");
@@ -313811,7 +314791,7 @@ async function applicationAccessTokenPrompt(env2, application, settlemint, accep
313811
314791
  return defaultAccessToken;
313812
314792
  }
313813
314793
  if (defaultAccessToken) {
313814
- const keep = await esm_default4({
314794
+ const keep = await esm_default5({
313815
314795
  message: "Do you want to use the existing application access token?",
313816
314796
  default: true
313817
314797
  });
@@ -313819,7 +314799,7 @@ async function applicationAccessTokenPrompt(env2, application, settlemint, accep
313819
314799
  return defaultAccessToken;
313820
314800
  }
313821
314801
  }
313822
- const create3 = await esm_default4({
314802
+ const create3 = await esm_default5({
313823
314803
  message: "Do you want to create a new application access token?",
313824
314804
  default: false
313825
314805
  });
@@ -313887,7 +314867,7 @@ async function applicationAccessTokenPrompt(env2, application, settlemint, accep
313887
314867
  return aat;
313888
314868
  } catch (_error) {}
313889
314869
  }
313890
- return esm_default5({
314870
+ return esm_default6({
313891
314871
  message: "What is the application access token for your application in SettleMint? (format: sm_aat_...)",
313892
314872
  validate(value5) {
313893
314873
  try {
@@ -314345,7 +315325,7 @@ async function serviceSecretPrompt({
314345
315325
  return defaultSecret;
314346
315326
  }
314347
315327
  if (defaultSecret) {
314348
- const keep = await esm_default4({
315328
+ const keep = await esm_default5({
314349
315329
  message: `Do you want to use the existing ${name4} secret?`,
314350
315330
  default: true
314351
315331
  });
@@ -314353,7 +315333,7 @@ async function serviceSecretPrompt({
314353
315333
  return defaultSecret;
314354
315334
  }
314355
315335
  }
314356
- const serviceSecret = await esm_default5({
315336
+ const serviceSecret = await esm_default6({
314357
315337
  message
314358
315338
  });
314359
315339
  return serviceSecret || undefined;
@@ -315467,7 +316447,7 @@ var basename2 = function(p5, extension) {
315467
316447
  return extension && lastSegment.endsWith(extension) ? lastSegment.slice(0, -extension.length) : lastSegment;
315468
316448
  };
315469
316449
  // ../../node_modules/.bun/defu@6.1.4/node_modules/defu/dist/defu.mjs
315470
- function isPlainObject4(value5) {
316450
+ function isPlainObject5(value5) {
315471
316451
  if (value5 === null || typeof value5 !== "object") {
315472
316452
  return false;
315473
316453
  }
@@ -315484,7 +316464,7 @@ function isPlainObject4(value5) {
315484
316464
  return true;
315485
316465
  }
315486
316466
  function _defu(baseObject, defaults2, namespace = ".", merger) {
315487
- if (!isPlainObject4(defaults2)) {
316467
+ if (!isPlainObject5(defaults2)) {
315488
316468
  return _defu(baseObject, {}, namespace, merger);
315489
316469
  }
315490
316470
  const object2 = Object.assign({}, defaults2);
@@ -315501,7 +316481,7 @@ function _defu(baseObject, defaults2, namespace = ".", merger) {
315501
316481
  }
315502
316482
  if (Array.isArray(value5) && Array.isArray(object2[key])) {
315503
316483
  object2[key] = [...value5, ...object2[key]];
315504
- } else if (isPlainObject4(value5) && isPlainObject4(object2[key])) {
316484
+ } else if (isPlainObject5(value5) && isPlainObject5(object2[key])) {
315505
316485
  object2[key] = _defu(value5, object2[key], (namespace ? `${namespace}.` : "") + key.toString(), merger);
315506
316486
  } else {
315507
316487
  object2[key] = value5;
@@ -318532,7 +319512,7 @@ function createCommand2() {
318532
319512
  await mkdir6(projectDir, { recursive: true });
318533
319513
  }
318534
319514
  if (!await isEmpty(projectDir)) {
318535
- const confirmEmpty = await esm_default4({
319515
+ const confirmEmpty = await esm_default5({
318536
319516
  message: `The folder ${projectDir} already exists. Do you want to empty it?`,
318537
319517
  default: false
318538
319518
  });
@@ -318785,7 +319765,7 @@ async function personalAccessTokenPrompt(env2, instance, accept) {
318785
319765
  return defaultPersonalAccessToken;
318786
319766
  }
318787
319767
  if (existingConfig && defaultPersonalAccessToken) {
318788
- const useExisting = await esm_default4({
319768
+ const useExisting = await esm_default5({
318789
319769
  message: `Do you want to use your existing personal access token for ${instance}?`,
318790
319770
  default: true
318791
319771
  });
@@ -318793,7 +319773,7 @@ async function personalAccessTokenPrompt(env2, instance, accept) {
318793
319773
  return defaultPersonalAccessToken;
318794
319774
  }
318795
319775
  }
318796
- return esm_default5({
319776
+ return esm_default6({
318797
319777
  message: "What is your personal access token in SettleMint? (format: sm_pat_...)",
318798
319778
  validate(value5) {
318799
319779
  try {
@@ -319004,7 +319984,7 @@ function pincodeVerificationResponseCommand() {
319004
319984
  nodeId: selectedBlockchainNode.id
319005
319985
  });
319006
319986
  const verificationChallenge = await pincodeVerificationPrompt(pincodeVerificationChallenges);
319007
- const pincode = await esm_default5({
319987
+ const pincode = await esm_default6({
319008
319988
  message: "Enter your pincode",
319009
319989
  validate(value5) {
319010
319990
  if (!value5.trim()) {
@@ -321483,7 +322463,7 @@ function jsonOutput(data) {
321483
322463
  var composer = require_composer();
321484
322464
  var Document = require_Document();
321485
322465
  var Schema = require_Schema();
321486
- var errors4 = require_errors3();
322466
+ var errors5 = require_errors3();
321487
322467
  var Alias = require_Alias();
321488
322468
  var identity2 = require_identity();
321489
322469
  var Pair = require_Pair();
@@ -321499,9 +322479,9 @@ var visit2 = require_visit();
321499
322479
  var $Composer = composer.Composer;
321500
322480
  var $Document = Document.Document;
321501
322481
  var $Schema = Schema.Schema;
321502
- var $YAMLError = errors4.YAMLError;
321503
- var $YAMLParseError = errors4.YAMLParseError;
321504
- var $YAMLWarning = errors4.YAMLWarning;
322482
+ var $YAMLError = errors5.YAMLError;
322483
+ var $YAMLParseError = errors5.YAMLParseError;
322484
+ var $YAMLWarning = errors5.YAMLWarning;
321505
322485
  var $Alias = Alias.Alias;
321506
322486
  var $isAlias = identity2.isAlias;
321507
322487
  var $isCollection = identity2.isCollection;
@@ -322078,7 +323058,7 @@ function createCommand4() {
322078
323058
  const targetDir = formatTargetDir(name4);
322079
323059
  const projectDir = join10(process.cwd(), targetDir);
322080
323060
  if (await exists3(projectDir) && !await isEmpty(projectDir)) {
322081
- const confirmEmpty = await esm_default4({
323061
+ const confirmEmpty = await esm_default5({
322082
323062
  message: `The folder ${projectDir} already exists. Do you want to delete it?`,
322083
323063
  default: false
322084
323064
  });
@@ -323319,10 +324299,7 @@ async function onError(sdkcli, argv, error51) {
323319
324299
  process.exit(error51.exitCode);
323320
324300
  }
323321
324301
  if (!(error51 instanceof CancelError || error51 instanceof SpinnerError)) {
323322
- const errorMessage2 = maskTokens(error51.message);
323323
- note(redBright(`Unknown error: ${errorMessage2}
323324
-
323325
- ${error51.stack}`));
324302
+ note(error51, "error");
323326
324303
  }
323327
324304
  const commandPath = sdkcli._lastCommand?._commandPath ?? getCommandPathFromArgv(argv);
323328
324305
  if (commandPath) {
@@ -323365,4 +324342,4 @@ async function sdkCliCommand(argv = process.argv) {
323365
324342
  // src/cli.ts
323366
324343
  sdkCliCommand();
323367
324344
 
323368
- //# debugId=20CB2ECE690394A664756E2164756E21
324345
+ //# debugId=FDAE62AF58E79E4464756E2164756E21