@settlemint/sdk-cli 1.1.8-pr3c5700f1 → 1.1.8-pr7d8b1c8b

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.
Files changed (3) hide show
  1. package/dist/cli.js +692 -693
  2. package/dist/cli.js.map +17 -17
  3. package/package.json +5 -5
package/dist/cli.js CHANGED
@@ -14374,8 +14374,8 @@ var require_printLocation = __commonJS((exports) => {
14374
14374
  const columnNum = sourceLocation.column + columnOffset;
14375
14375
  const locationStr = `${source.name}:${lineNum}:${columnNum}
14376
14376
  `;
14377
- const lines = body.split(/\r\n|[\n\r]/g);
14378
- const locationLine = lines[lineIndex];
14377
+ const lines2 = body.split(/\r\n|[\n\r]/g);
14378
+ const locationLine = lines2[lineIndex];
14379
14379
  if (locationLine.length > 120) {
14380
14380
  const subLineIndex = Math.floor(columnNum / 80);
14381
14381
  const subLineColumnNum = columnNum % 80;
@@ -14391,14 +14391,14 @@ var require_printLocation = __commonJS((exports) => {
14391
14391
  ]);
14392
14392
  }
14393
14393
  return locationStr + printPrefixedLines([
14394
- [`${lineNum - 1} |`, lines[lineIndex - 1]],
14394
+ [`${lineNum - 1} |`, lines2[lineIndex - 1]],
14395
14395
  [`${lineNum} |`, locationLine],
14396
14396
  ["|", "^".padStart(columnNum)],
14397
- [`${lineNum + 1} |`, lines[lineIndex + 1]]
14397
+ [`${lineNum + 1} |`, lines2[lineIndex + 1]]
14398
14398
  ]);
14399
14399
  }
14400
- function printPrefixedLines(lines) {
14401
- const existingLines = lines.filter(([_, line]) => line !== undefined);
14400
+ function printPrefixedLines(lines2) {
14401
+ const existingLines = lines2.filter(([_, line]) => line !== undefined);
14402
14402
  const padLen = Math.max(...existingLines.map(([prefix]) => prefix.length));
14403
14403
  return existingLines.map(([prefix, line]) => prefix.padStart(padLen) + (line ? " " + line : "")).join(`
14404
14404
  `);
@@ -14811,14 +14811,14 @@ var require_blockString = __commonJS((exports) => {
14811
14811
  exports.isPrintableAsBlockString = isPrintableAsBlockString;
14812
14812
  exports.printBlockString = printBlockString;
14813
14813
  var _characterClasses = require_characterClasses();
14814
- function dedentBlockStringLines(lines) {
14814
+ function dedentBlockStringLines(lines2) {
14815
14815
  var _firstNonEmptyLine2;
14816
14816
  let commonIndent = Number.MAX_SAFE_INTEGER;
14817
14817
  let firstNonEmptyLine = null;
14818
14818
  let lastNonEmptyLine = -1;
14819
- for (let i = 0;i < lines.length; ++i) {
14819
+ for (let i = 0;i < lines2.length; ++i) {
14820
14820
  var _firstNonEmptyLine;
14821
- const line = lines[i];
14821
+ const line = lines2[i];
14822
14822
  const indent = leadingWhitespace(line);
14823
14823
  if (indent === line.length) {
14824
14824
  continue;
@@ -14829,7 +14829,7 @@ var require_blockString = __commonJS((exports) => {
14829
14829
  commonIndent = indent;
14830
14830
  }
14831
14831
  }
14832
- return lines.map((line, i) => i === 0 ? line : line.slice(commonIndent)).slice((_firstNonEmptyLine2 = firstNonEmptyLine) !== null && _firstNonEmptyLine2 !== undefined ? _firstNonEmptyLine2 : 0, lastNonEmptyLine + 1);
14832
+ return lines2.map((line, i) => i === 0 ? line : line.slice(commonIndent)).slice((_firstNonEmptyLine2 = firstNonEmptyLine) !== null && _firstNonEmptyLine2 !== undefined ? _firstNonEmptyLine2 : 0, lastNonEmptyLine + 1);
14833
14833
  }
14834
14834
  function leadingWhitespace(str) {
14835
14835
  let i = 0;
@@ -14891,9 +14891,9 @@ var require_blockString = __commonJS((exports) => {
14891
14891
  }
14892
14892
  function printBlockString(value, options) {
14893
14893
  const escapedValue = value.replace(/"""/g, '\\"""');
14894
- const lines = escapedValue.split(/\r\n|[\n\r]/g);
14895
- const isSingleLine = lines.length === 1;
14896
- const forceLeadingNewLine = lines.length > 1 && lines.slice(1).every((line) => line.length === 0 || (0, _characterClasses.isWhiteSpace)(line.charCodeAt(0)));
14894
+ const lines2 = escapedValue.split(/\r\n|[\n\r]/g);
14895
+ const isSingleLine = lines2.length === 1;
14896
+ const forceLeadingNewLine = lines2.length > 1 && lines2.slice(1).every((line) => line.length === 0 || (0, _characterClasses.isWhiteSpace)(line.charCodeAt(0)));
14897
14897
  const hasTrailingTripleQuotes = escapedValue.endsWith('\\"""');
14898
14898
  const hasTrailingQuote = value.endsWith('"') && !hasTrailingTripleQuotes;
14899
14899
  const hasTrailingSlash = value.endsWith("\\");
@@ -34006,9 +34006,9 @@ var require_commonjs4 = __commonJS((exports) => {
34006
34006
  this.#resolveCache = new ResolveCache2;
34007
34007
  this.#resolvePosixCache = new ResolveCache2;
34008
34008
  this.#children = new ChildrenCache2(childrenCacheSize);
34009
- const split = cwdPath.substring(this.rootPath.length).split(sep2);
34010
- if (split.length === 1 && !split[0]) {
34011
- split.pop();
34009
+ const split2 = cwdPath.substring(this.rootPath.length).split(sep2);
34010
+ if (split2.length === 1 && !split2[0]) {
34011
+ split2.pop();
34012
34012
  }
34013
34013
  if (nocase === undefined) {
34014
34014
  throw new TypeError("must provide nocase setting to PathScurryBase ctor");
@@ -34017,11 +34017,11 @@ var require_commonjs4 = __commonJS((exports) => {
34017
34017
  this.root = this.newRoot(this.#fs);
34018
34018
  this.roots[this.rootPath] = this.root;
34019
34019
  let prev = this.root;
34020
- let len = split.length - 1;
34020
+ let len = split2.length - 1;
34021
34021
  const joinSep = pathImpl.sep;
34022
34022
  let abs = this.rootPath;
34023
34023
  let sawFirst = false;
34024
- for (const part of split) {
34024
+ for (const part of split2) {
34025
34025
  const l2 = len--;
34026
34026
  prev = prev.child(part, {
34027
34027
  relative: new Array(l2).fill("..").join(joinSep),
@@ -37186,9 +37186,9 @@ var require_ini = __commonJS((exports, module) => {
37186
37186
  let p = out;
37187
37187
  let section = null;
37188
37188
  const re = /^\[([^\]]*)\]\s*$|^([^=]+)(=(.*))?$/i;
37189
- const lines = str.split(/[\r\n]+/g);
37189
+ const lines2 = str.split(/[\r\n]+/g);
37190
37190
  const duplicates = {};
37191
- for (const line of lines) {
37191
+ for (const line of lines2) {
37192
37192
  if (!line || line.match(/^\s*[;#]/) || line.match(/^\s*$/)) {
37193
37193
  continue;
37194
37194
  }
@@ -39173,7 +39173,7 @@ var require_semver3 = __commonJS((exports, module) => {
39173
39173
  // ../../node_modules/@npmcli/git/lib/lines-to-revs.js
39174
39174
  var require_lines_to_revs = __commonJS((exports, module) => {
39175
39175
  var semver = require_semver3();
39176
- module.exports = (lines) => finish(lines.reduce(linesToRevsReducer, {
39176
+ module.exports = (lines2) => finish(lines2.reduce(linesToRevsReducer, {
39177
39177
  versions: {},
39178
39178
  "dist-tags": {},
39179
39179
  refs: {},
@@ -39234,12 +39234,12 @@ var require_lines_to_revs = __commonJS((exports, module) => {
39234
39234
  return "other";
39235
39235
  };
39236
39236
  var lineToRevDoc = (line) => {
39237
- const split = line.trim().split(/\s+/, 2);
39238
- if (split.length < 2) {
39237
+ const split2 = line.trim().split(/\s+/, 2);
39238
+ if (split2.length < 2) {
39239
39239
  return null;
39240
39240
  }
39241
- const sha = split[0].trim();
39242
- const rawRef = split[1].trim();
39241
+ const sha = split2[0].trim();
39242
+ const rawRef = split2[1].trim();
39243
39243
  const type2 = refType(rawRef);
39244
39244
  if (type2 === "tag") {
39245
39245
  const ref = rawRef.slice("refs/tags/".length);
@@ -46994,17 +46994,17 @@ var require_normalize_data = __commonJS((exports, module) => {
46994
46994
  };
46995
46995
  var isEmail = (str) => str.includes("@") && str.indexOf("@") < str.lastIndexOf(".");
46996
46996
  function extractDescription(description) {
46997
- const lines = description.trim().split(`
46997
+ const lines2 = description.trim().split(`
46998
46998
  `);
46999
46999
  let start = 0;
47000
- while (lines[start]?.trim().match(/^(#|$)/)) {
47000
+ while (lines2[start]?.trim().match(/^(#|$)/)) {
47001
47001
  start++;
47002
47002
  }
47003
47003
  let end = start + 1;
47004
- while (end < lines.length && lines[end].trim()) {
47004
+ while (end < lines2.length && lines2[end].trim()) {
47005
47005
  end++;
47006
47006
  }
47007
- return lines.slice(start, end).join(" ").trim();
47007
+ return lines2.slice(start, end).join(" ").trim();
47008
47008
  }
47009
47009
  function stringifyPerson(person) {
47010
47010
  if (typeof person !== "string") {
@@ -67383,9 +67383,9 @@ ${lanes.join(`
67383
67383
  return node.kind === 183 || node.kind === 233;
67384
67384
  }
67385
67385
  var MAX_SMI_X86 = 1073741823;
67386
- function guessIndentation(lines) {
67386
+ function guessIndentation(lines2) {
67387
67387
  let indentation = MAX_SMI_X86;
67388
- for (const line of lines) {
67388
+ for (const line of lines2) {
67389
67389
  if (!line.length) {
67390
67390
  continue;
67391
67391
  }
@@ -155723,8 +155723,8 @@ ${lanes.join(`
155723
155723
  if (node.comment) {
155724
155724
  const text = getTextOfJSDocComment(node.comment);
155725
155725
  if (text) {
155726
- const lines = text.split(/\r\n?|\n/);
155727
- for (const line of lines) {
155726
+ const lines2 = text.split(/\r\n?|\n/);
155727
+ for (const line of lines2) {
155728
155728
  writeLine();
155729
155729
  writeSpace();
155730
155730
  writePunctuation("*");
@@ -156368,9 +156368,9 @@ ${lanes.join(`
156368
156368
  if (getEmitFlags(parentNode) & 1) {
156369
156369
  writeSpace();
156370
156370
  } else if (preserveSourceNewlines) {
156371
- const lines = getLinesBetweenNodes(parentNode, prevChildNode, nextChildNode);
156372
- if (lines) {
156373
- writeLine(lines);
156371
+ const lines2 = getLinesBetweenNodes(parentNode, prevChildNode, nextChildNode);
156372
+ if (lines2) {
156373
+ writeLine(lines2);
156374
156374
  } else {
156375
156375
  writeSpace();
156376
156376
  }
@@ -156379,9 +156379,9 @@ ${lanes.join(`
156379
156379
  }
156380
156380
  }
156381
156381
  function writeLines(text) {
156382
- const lines = text.split(/\r\n?|\n/);
156383
- const indentation = guessIndentation(lines);
156384
- for (const lineText of lines) {
156382
+ const lines2 = text.split(/\r\n?|\n/);
156383
+ const indentation = guessIndentation(lines2);
156384
+ for (const lineText of lines2) {
156385
156385
  const line = indentation ? lineText.slice(indentation) : lineText;
156386
156386
  if (line.length) {
156387
156387
  writeLine();
@@ -156479,11 +156479,11 @@ ${lanes.join(`
156479
156479
  }
156480
156480
  function getEffectiveLines(getLineDifference) {
156481
156481
  Debug.assert(!!preserveSourceNewlines);
156482
- const lines = getLineDifference(true);
156483
- if (lines === 0) {
156482
+ const lines2 = getLineDifference(true);
156483
+ if (lines2 === 0) {
156484
156484
  return getLineDifference(false);
156485
156485
  }
156486
- return lines;
156486
+ return lines2;
156487
156487
  }
156488
156488
  function writeLineSeparatorsAndIndentBefore(node, parent2) {
156489
156489
  const leadingNewlines = preserveSourceNewlines && getLeadingLineTerminatorCount(parent2, node, 0);
@@ -166741,7 +166741,7 @@ ${lanes.join(`
166741
166741
  function generateOptionOutput(sys2, option, rightAlignOfLeft, leftAlignOfRight) {
166742
166742
  var _a;
166743
166743
  const text = [];
166744
- const colors2 = createColors(sys2);
166744
+ const colors3 = createColors(sys2);
166745
166745
  const name = getDisplayNameTextOfOption(option);
166746
166746
  const valueCandidates = getValueCandidate(option);
166747
166747
  const defaultValueDescription = typeof option.defaultValueDescription === "object" ? getDiagnosticText(option.defaultValueDescription) : formatDefaultValue(option.defaultValueDescription, option.type === "list" || option.type === "listOrElement" ? option.element.type : option.type);
@@ -166762,7 +166762,7 @@ ${lanes.join(`
166762
166762
  }
166763
166763
  text.push(sys2.newLine);
166764
166764
  } else {
166765
- text.push(colors2.blue(name), sys2.newLine);
166765
+ text.push(colors3.blue(name), sys2.newLine);
166766
166766
  if (option.description) {
166767
166767
  const description3 = getDiagnosticText(option.description);
166768
166768
  text.push(description3);
@@ -166807,7 +166807,7 @@ ${lanes.join(`
166807
166807
  if (isFirstLine) {
166808
166808
  curLeft = left.padStart(rightAlignOfLeft2);
166809
166809
  curLeft = curLeft.padEnd(leftAlignOfRight2);
166810
- curLeft = colorLeft ? colors2.blue(curLeft) : curLeft;
166810
+ curLeft = colorLeft ? colors3.blue(curLeft) : curLeft;
166811
166811
  } else {
166812
166812
  curLeft = "".padStart(leftAlignOfRight2);
166813
166813
  }
@@ -166876,15 +166876,15 @@ ${lanes.join(`
166876
166876
  }
166877
166877
  const rightAlignOfLeftPart = maxLength2 + 2;
166878
166878
  const leftAlignOfRightPart = rightAlignOfLeftPart + 2;
166879
- let lines = [];
166879
+ let lines2 = [];
166880
166880
  for (const option of optionsList) {
166881
166881
  const tmp = generateOptionOutput(sys2, option, rightAlignOfLeftPart, leftAlignOfRightPart);
166882
- lines = [...lines, ...tmp];
166882
+ lines2 = [...lines2, ...tmp];
166883
166883
  }
166884
- if (lines[lines.length - 2] !== sys2.newLine) {
166885
- lines.push(sys2.newLine);
166884
+ if (lines2[lines2.length - 2] !== sys2.newLine) {
166885
+ lines2.push(sys2.newLine);
166886
166886
  }
166887
- return lines;
166887
+ return lines2;
166888
166888
  }
166889
166889
  function generateSectionOptionsOutput(sys2, sectionName, options, subCategory, beforeOptionsDescription, afterOptionsDescription) {
166890
166890
  let res = [];
@@ -166919,9 +166919,9 @@ ${lanes.join(`
166919
166919
  return res;
166920
166920
  }
166921
166921
  function printEasyHelp(sys2, simpleOptions) {
166922
- const colors2 = createColors(sys2);
166922
+ const colors3 = createColors(sys2);
166923
166923
  let output = [...getHeader(sys2, `${getDiagnosticText(Diagnostics.tsc_Colon_The_TypeScript_Compiler)} - ${getDiagnosticText(Diagnostics.Version_0, version)}`)];
166924
- output.push(colors2.bold(getDiagnosticText(Diagnostics.COMMON_COMMANDS)) + sys2.newLine + sys2.newLine);
166924
+ output.push(colors3.bold(getDiagnosticText(Diagnostics.COMMON_COMMANDS)) + sys2.newLine + sys2.newLine);
166925
166925
  example("tsc", Diagnostics.Compiles_the_current_project_tsconfig_json_in_the_working_directory);
166926
166926
  example("tsc app.ts util.ts", Diagnostics.Ignoring_tsconfig_json_compiles_the_specified_files_with_default_compiler_options);
166927
166927
  example("tsc -b", Diagnostics.Build_a_composite_project_in_the_working_directory);
@@ -166942,7 +166942,7 @@ ${lanes.join(`
166942
166942
  function example(ex, desc) {
166943
166943
  const examples = typeof ex === "string" ? [ex] : ex;
166944
166944
  for (const example2 of examples) {
166945
- output.push(" " + colors2.blue(example2) + sys2.newLine);
166945
+ output.push(" " + colors3.blue(example2) + sys2.newLine);
166946
166946
  }
166947
166947
  output.push(" " + getDiagnosticText(desc) + sys2.newLine + sys2.newLine);
166948
166948
  }
@@ -166965,12 +166965,12 @@ ${lanes.join(`
166965
166965
  }
166966
166966
  function getHeader(sys2, message) {
166967
166967
  var _a;
166968
- const colors2 = createColors(sys2);
166968
+ const colors3 = createColors(sys2);
166969
166969
  const header = [];
166970
166970
  const terminalWidth = ((_a = sys2.getWidthOfTerminal) == null ? undefined : _a.call(sys2)) ?? 0;
166971
166971
  const tsIconLength = 5;
166972
- const tsIconFirstLine = colors2.blueBackground("".padStart(tsIconLength));
166973
- const tsIconSecondLine = colors2.blueBackground(colors2.brightWhite("TS ".padStart(tsIconLength)));
166972
+ const tsIconFirstLine = colors3.blueBackground("".padStart(tsIconLength));
166973
+ const tsIconSecondLine = colors3.blueBackground(colors3.brightWhite("TS ".padStart(tsIconLength)));
166974
166974
  if (terminalWidth >= message.length + tsIconLength) {
166975
166975
  const rightAlign = terminalWidth > 120 ? 120 : terminalWidth;
166976
166976
  const leftAlign = rightAlign - tsIconLength;
@@ -218660,9 +218660,9 @@ ${e3.message}`;
218660
218660
  insertedText = this.initialText + this.trailingText;
218661
218661
  }
218662
218662
  const lm = LineIndex.linesFromText(insertedText);
218663
- const lines = lm.lines;
218664
- if (lines.length > 1 && lines[lines.length - 1] === "") {
218665
- lines.pop();
218663
+ const lines2 = lm.lines;
218664
+ if (lines2.length > 1 && lines2[lines2.length - 1] === "") {
218665
+ lines2.pop();
218666
218666
  }
218667
218667
  let branchParent;
218668
218668
  let lastZeroCount;
@@ -218681,13 +218681,13 @@ ${e3.message}`;
218681
218681
  branchParent.remove(lastZeroCount);
218682
218682
  }
218683
218683
  const leafNode = this.startPath[this.startPath.length - 1];
218684
- if (lines.length > 0) {
218685
- leafNode.text = lines[0];
218686
- if (lines.length > 1) {
218687
- let insertedNodes = new Array(lines.length - 1);
218684
+ if (lines2.length > 0) {
218685
+ leafNode.text = lines2[0];
218686
+ if (lines2.length > 1) {
218687
+ let insertedNodes = new Array(lines2.length - 1);
218688
218688
  let startNode2 = leafNode;
218689
- for (let i2 = 1;i2 < lines.length; i2++) {
218690
- insertedNodes[i2 - 1] = new LineLeaf(lines[i2]);
218689
+ for (let i2 = 1;i2 < lines2.length; i2++) {
218690
+ insertedNodes[i2 - 1] = new LineLeaf(lines2[i2]);
218691
218691
  }
218692
218692
  let pathIndex = this.startPath.length - 2;
218693
218693
  while (pathIndex >= 0) {
@@ -218957,11 +218957,11 @@ ${e3.message}`;
218957
218957
  return { absolutePosition: this.root.charCount(), lineText: undefined };
218958
218958
  }
218959
218959
  }
218960
- load(lines) {
218961
- if (lines.length > 0) {
218960
+ load(lines2) {
218961
+ if (lines2.length > 0) {
218962
218962
  const leaves = [];
218963
- for (let i2 = 0;i2 < lines.length; i2++) {
218964
- leaves[i2] = new LineLeaf(lines[i2]);
218963
+ for (let i2 = 0;i2 < lines2.length; i2++) {
218964
+ leaves[i2] = new LineLeaf(lines2[i2]);
218965
218965
  }
218966
218966
  this.root = _LineIndex.buildTreeFromBottom(leaves);
218967
218967
  } else {
@@ -219064,18 +219064,18 @@ ${e3.message}`;
219064
219064
  if (lineMap.length === 0) {
219065
219065
  return { lines: [], lineMap };
219066
219066
  }
219067
- const lines = new Array(lineMap.length);
219067
+ const lines2 = new Array(lineMap.length);
219068
219068
  const lc = lineMap.length - 1;
219069
219069
  for (let lmi = 0;lmi < lc; lmi++) {
219070
- lines[lmi] = text.substring(lineMap[lmi], lineMap[lmi + 1]);
219070
+ lines2[lmi] = text.substring(lineMap[lmi], lineMap[lmi + 1]);
219071
219071
  }
219072
219072
  const endText = text.substring(lineMap[lc]);
219073
219073
  if (endText.length > 0) {
219074
- lines[lc] = endText;
219074
+ lines2[lc] = endText;
219075
219075
  } else {
219076
- lines.pop();
219076
+ lines2.pop();
219077
219077
  }
219078
- return { lines, lineMap };
219078
+ return { lines: lines2, lineMap };
219079
219079
  }
219080
219080
  };
219081
219081
  var LineNode = class _LineNode {
@@ -220155,7 +220155,7 @@ async function* streamBody(e4) {
220155
220155
  }
220156
220156
  }
220157
220157
  }
220158
- async function* split(e4, r3) {
220158
+ async function* split2(e4, r3) {
220159
220159
  var a4 = "";
220160
220160
  var n3;
220161
220161
  for await (var t4 of e4) {
@@ -220189,7 +220189,7 @@ function makeFetchSource(e4, r3, a4) {
220189
220189
  var n5 = "--" + (a6 ? a6[1] : "-");
220190
220190
  var t5 = true;
220191
220191
  var i4;
220192
- for await (var o4 of split(streamBody(r5), `\r
220192
+ for await (var o4 of split2(streamBody(r5), `\r
220193
220193
  ` + n5)) {
220194
220194
  if (t5) {
220195
220195
  t5 = false;
@@ -220222,7 +220222,7 @@ function makeFetchSource(e4, r3, a4) {
220222
220222
  } else if (/text\/event-stream/i.test(o3)) {
220223
220223
  s3 = async function* parseEventStream(e6) {
220224
220224
  var r5;
220225
- for await (var a6 of split(streamBody(e6), `
220225
+ for await (var a6 of split2(streamBody(e6), `
220226
220226
 
220227
220227
  `)) {
220228
220228
  var n5 = a6.match(S);
@@ -274462,7 +274462,7 @@ function pruneCurrentEnv(currentEnv, env2) {
274462
274462
  var package_default = {
274463
274463
  name: "@settlemint/sdk-cli",
274464
274464
  description: "Command-line interface for SettleMint SDK, providing development tools and project management capabilities",
274465
- version: "1.1.8-pr3c5700f1",
274465
+ version: "1.1.8-pr7d8b1c8b",
274466
274466
  type: "module",
274467
274467
  private: false,
274468
274468
  license: "FSL-1.1-MIT",
@@ -274506,12 +274506,12 @@ var package_default = {
274506
274506
  },
274507
274507
  devDependencies: {
274508
274508
  "@commander-js/extra-typings": "13.1.0",
274509
- "@inquirer/confirm": "5.1.6",
274510
- "@inquirer/input": "4.1.6",
274509
+ "@inquirer/confirm": "5.1.5",
274510
+ "@inquirer/input": "4.1.5",
274511
274511
  "@inquirer/password": "4.0.9",
274512
274512
  "@inquirer/select": "4.0.8",
274513
- "@settlemint/sdk-js": "1.1.8-pr3c5700f1",
274514
- "@settlemint/sdk-utils": "1.1.8-pr3c5700f1",
274513
+ "@settlemint/sdk-js": "1.1.8-pr7d8b1c8b",
274514
+ "@settlemint/sdk-utils": "1.1.8-pr7d8b1c8b",
274515
274515
  "@types/node": "22.13.4",
274516
274516
  "@types/semver": "7.5.8",
274517
274517
  "@types/which": "3.0.4",
@@ -274601,7 +274601,10 @@ var {
274601
274601
  } = import__.default;
274602
274602
 
274603
274603
  // ../../node_modules/@inquirer/core/dist/esm/lib/key.js
274604
+ var isUpKey = (key) => key.name === "up" || key.name === "k" || key.ctrl && key.name === "p";
274605
+ var isDownKey = (key) => key.name === "down" || key.name === "j" || key.ctrl && key.name === "n";
274604
274606
  var isBackspaceKey = (key) => key.name === "backspace";
274607
+ var isNumberKey = (key) => "123456789".includes(key.name);
274605
274608
  var isEnterKey = (key) => key.name === "enter" || key.name === "return";
274606
274609
  // ../../node_modules/@inquirer/core/dist/esm/lib/errors.js
274607
274610
  class AbortPromptError extends Error {
@@ -275136,11 +275139,22 @@ function usePrefix({ status = "idle", theme }) {
275136
275139
  const iconName = status === "loading" ? "idle" : status;
275137
275140
  return typeof prefix === "string" ? prefix : prefix[iconName] ?? prefix["idle"];
275138
275141
  }
275142
+ // ../../node_modules/@inquirer/core/dist/esm/lib/use-memo.js
275143
+ function useMemo(fn, dependencies) {
275144
+ return withPointer((pointer) => {
275145
+ const prev = pointer.get();
275146
+ if (!prev || prev.dependencies.length !== dependencies.length || prev.dependencies.some((dep, i) => dep !== dependencies[i])) {
275147
+ const value = fn();
275148
+ pointer.set({ value, dependencies });
275149
+ return value;
275150
+ }
275151
+ return prev.value;
275152
+ });
275153
+ }
275139
275154
  // ../../node_modules/@inquirer/core/dist/esm/lib/use-ref.js
275140
275155
  function useRef(val) {
275141
275156
  return useState({ current: val })[0];
275142
275157
  }
275143
-
275144
275158
  // ../../node_modules/@inquirer/core/dist/esm/lib/use-keypress.js
275145
275159
  function useKeypress(userHandler) {
275146
275160
  const signal = useRef(userHandler);
@@ -275172,6 +275186,95 @@ function readlineWidth() {
275172
275186
  return import_cli_width.default({ defaultWidth: 80, output: readline().output });
275173
275187
  }
275174
275188
 
275189
+ // ../../node_modules/@inquirer/core/dist/esm/lib/pagination/lines.js
275190
+ function split(content, width) {
275191
+ return breakLines(content, width).split(`
275192
+ `);
275193
+ }
275194
+ function rotate(count, items) {
275195
+ const max = items.length;
275196
+ const offset = (count % max + max) % max;
275197
+ return [...items.slice(offset), ...items.slice(0, offset)];
275198
+ }
275199
+ function lines({ items, width, renderItem, active, position: requested, pageSize }) {
275200
+ const layouts = items.map((item, index) => ({
275201
+ item,
275202
+ index,
275203
+ isActive: index === active
275204
+ }));
275205
+ const layoutsInPage = rotate(active - requested, layouts).slice(0, pageSize);
275206
+ const renderItemAt = (index) => layoutsInPage[index] == null ? [] : split(renderItem(layoutsInPage[index]), width);
275207
+ const pageBuffer = Array.from({ length: pageSize });
275208
+ const activeItem = renderItemAt(requested).slice(0, pageSize);
275209
+ const position = requested + activeItem.length <= pageSize ? requested : pageSize - activeItem.length;
275210
+ pageBuffer.splice(position, activeItem.length, ...activeItem);
275211
+ let bufferPointer = position + activeItem.length;
275212
+ let layoutPointer = requested + 1;
275213
+ while (bufferPointer < pageSize && layoutPointer < layoutsInPage.length) {
275214
+ for (const line of renderItemAt(layoutPointer)) {
275215
+ pageBuffer[bufferPointer++] = line;
275216
+ if (bufferPointer >= pageSize)
275217
+ break;
275218
+ }
275219
+ layoutPointer++;
275220
+ }
275221
+ bufferPointer = position - 1;
275222
+ layoutPointer = requested - 1;
275223
+ while (bufferPointer >= 0 && layoutPointer >= 0) {
275224
+ for (const line of renderItemAt(layoutPointer).reverse()) {
275225
+ pageBuffer[bufferPointer--] = line;
275226
+ if (bufferPointer < 0)
275227
+ break;
275228
+ }
275229
+ layoutPointer--;
275230
+ }
275231
+ return pageBuffer.filter((line) => typeof line === "string");
275232
+ }
275233
+
275234
+ // ../../node_modules/@inquirer/core/dist/esm/lib/pagination/position.js
275235
+ function finite({ active, pageSize, total }) {
275236
+ const middle = Math.floor(pageSize / 2);
275237
+ if (total <= pageSize || active < middle)
275238
+ return active;
275239
+ if (active >= total - middle)
275240
+ return active + pageSize - total;
275241
+ return middle;
275242
+ }
275243
+ function infinite({ active, lastActive, total, pageSize, pointer }) {
275244
+ if (total <= pageSize)
275245
+ return active;
275246
+ if (lastActive < active && active - lastActive < pageSize) {
275247
+ return Math.min(Math.floor(pageSize / 2), pointer + active - lastActive);
275248
+ }
275249
+ return pointer;
275250
+ }
275251
+
275252
+ // ../../node_modules/@inquirer/core/dist/esm/lib/pagination/use-pagination.js
275253
+ function usePagination({ items, active, renderItem, pageSize, loop = true }) {
275254
+ const state = useRef({ position: 0, lastActive: 0 });
275255
+ const position = loop ? infinite({
275256
+ active,
275257
+ lastActive: state.current.lastActive,
275258
+ total: items.length,
275259
+ pageSize,
275260
+ pointer: state.current.position
275261
+ }) : finite({
275262
+ active,
275263
+ total: items.length,
275264
+ pageSize
275265
+ });
275266
+ state.current.position = position;
275267
+ state.current.lastActive = active;
275268
+ return lines({
275269
+ items,
275270
+ width: readlineWidth(),
275271
+ renderItem,
275272
+ active,
275273
+ position,
275274
+ pageSize
275275
+ }).join(`
275276
+ `);
275277
+ }
275175
275278
  // ../../node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
275176
275279
  var import_mute_stream = __toESM(require_lib(), 1);
275177
275280
  import * as readline2 from "node:readline";
@@ -275557,6 +275660,20 @@ function createPrompt(view) {
275557
275660
  };
275558
275661
  return prompt;
275559
275662
  }
275663
+ // ../../node_modules/@inquirer/core/dist/esm/lib/Separator.js
275664
+ var import_yoctocolors_cjs2 = __toESM(require_yoctocolors_cjs(), 1);
275665
+ class Separator {
275666
+ separator = import_yoctocolors_cjs2.default.dim(Array.from({ length: 15 }).join(esm_default.line));
275667
+ type = "separator";
275668
+ constructor(separator) {
275669
+ if (separator) {
275670
+ this.separator = separator;
275671
+ }
275672
+ }
275673
+ static isSeparator(choice) {
275674
+ return Boolean(choice && typeof choice === "object" && "type" in choice && choice.type === "separator");
275675
+ }
275676
+ }
275560
275677
  // ../utils/dist/terminal.mjs
275561
275678
  import { spawn } from "node:child_process";
275562
275679
  var import_console_table_printer2 = __toESM(require_dist2(), 1);
@@ -279717,586 +279834,14 @@ async function codegenTsconfig(env2, thegraphSubgraphNames) {
279717
279834
  };
279718
279835
  }
279719
279836
 
279720
- // ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/key.js
279721
- var isUpKey = (key2) => key2.name === "up" || key2.name === "k" || key2.ctrl && key2.name === "p";
279722
- var isDownKey = (key2) => key2.name === "down" || key2.name === "j" || key2.ctrl && key2.name === "n";
279723
- var isBackspaceKey2 = (key2) => key2.name === "backspace";
279724
- var isNumberKey = (key2) => "123456789".includes(key2.name);
279725
- var isEnterKey2 = (key2) => key2.name === "enter" || key2.name === "return";
279726
- // ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/errors.js
279727
- class AbortPromptError2 extends Error {
279728
- name = "AbortPromptError";
279729
- message = "Prompt was aborted";
279730
- constructor(options) {
279731
- super();
279732
- this.cause = options?.cause;
279733
- }
279734
- }
279735
-
279736
- class CancelPromptError2 extends Error {
279737
- name = "CancelPromptError";
279738
- message = "Prompt was canceled";
279739
- }
279740
-
279741
- class ExitPromptError2 extends Error {
279742
- name = "ExitPromptError";
279743
- }
279744
-
279745
- class HookError2 extends Error {
279746
- name = "HookError";
279747
- }
279748
-
279749
- class ValidationError2 extends Error {
279750
- name = "ValidationError";
279751
- }
279752
- // ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/use-prefix.js
279753
- import { AsyncResource as AsyncResource5 } from "node:async_hooks";
279754
-
279755
- // ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/hook-engine.js
279756
- import { AsyncLocalStorage as AsyncLocalStorage2, AsyncResource as AsyncResource4 } from "node:async_hooks";
279757
- var hookStorage2 = new AsyncLocalStorage2;
279758
- function createStore2(rl) {
279759
- const store = {
279760
- rl,
279761
- hooks: [],
279762
- hooksCleanup: [],
279763
- hooksEffect: [],
279764
- index: 0,
279765
- handleChange() {
279766
- }
279767
- };
279768
- return store;
279769
- }
279770
- function withHooks2(rl, cb) {
279771
- const store = createStore2(rl);
279772
- return hookStorage2.run(store, () => {
279773
- function cycle(render) {
279774
- store.handleChange = () => {
279775
- store.index = 0;
279776
- render();
279777
- };
279778
- store.handleChange();
279779
- }
279780
- return cb(cycle);
279781
- });
279782
- }
279783
- function getStore2() {
279784
- const store = hookStorage2.getStore();
279785
- if (!store) {
279786
- throw new HookError2("[Inquirer] Hook functions can only be called from within a prompt");
279787
- }
279788
- return store;
279789
- }
279790
- function readline3() {
279791
- return getStore2().rl;
279792
- }
279793
- function withUpdates2(fn) {
279794
- const wrapped = (...args) => {
279795
- const store = getStore2();
279796
- let shouldUpdate = false;
279797
- const oldHandleChange = store.handleChange;
279798
- store.handleChange = () => {
279799
- shouldUpdate = true;
279800
- };
279801
- const returnValue = fn(...args);
279802
- if (shouldUpdate) {
279803
- oldHandleChange();
279804
- }
279805
- store.handleChange = oldHandleChange;
279806
- return returnValue;
279807
- };
279808
- return AsyncResource4.bind(wrapped);
279809
- }
279810
- function withPointer2(cb) {
279811
- const store = getStore2();
279812
- const { index } = store;
279813
- const pointer = {
279814
- get() {
279815
- return store.hooks[index];
279816
- },
279817
- set(value4) {
279818
- store.hooks[index] = value4;
279819
- },
279820
- initialized: index in store.hooks
279821
- };
279822
- const returnValue = cb(pointer);
279823
- store.index++;
279824
- return returnValue;
279825
- }
279826
- function handleChange2() {
279827
- getStore2().handleChange();
279828
- }
279829
- var effectScheduler2 = {
279830
- queue(cb) {
279831
- const store = getStore2();
279832
- const { index } = store;
279833
- store.hooksEffect.push(() => {
279834
- store.hooksCleanup[index]?.();
279835
- const cleanFn = cb(readline3());
279836
- if (cleanFn != null && typeof cleanFn !== "function") {
279837
- throw new ValidationError2("useEffect return value must be a cleanup function or nothing.");
279838
- }
279839
- store.hooksCleanup[index] = cleanFn;
279840
- });
279841
- },
279842
- run() {
279843
- const store = getStore2();
279844
- withUpdates2(() => {
279845
- store.hooksEffect.forEach((effect) => {
279846
- effect();
279847
- });
279848
- store.hooksEffect.length = 0;
279849
- })();
279850
- },
279851
- clearAll() {
279852
- const store = getStore2();
279853
- store.hooksCleanup.forEach((cleanFn) => {
279854
- cleanFn?.();
279855
- });
279856
- store.hooksEffect.length = 0;
279857
- store.hooksCleanup.length = 0;
279858
- }
279859
- };
279860
-
279861
- // ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/use-state.js
279862
- function useState2(defaultValue) {
279863
- return withPointer2((pointer) => {
279864
- const setFn = (newValue) => {
279865
- if (pointer.get() !== newValue) {
279866
- pointer.set(newValue);
279867
- handleChange2();
279868
- }
279869
- };
279870
- if (pointer.initialized) {
279871
- return [pointer.get(), setFn];
279872
- }
279873
- const value4 = typeof defaultValue === "function" ? defaultValue() : defaultValue;
279874
- pointer.set(value4);
279875
- return [value4, setFn];
279876
- });
279877
- }
279878
-
279879
- // ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/use-effect.js
279880
- function useEffect2(cb, depArray) {
279881
- withPointer2((pointer) => {
279882
- const oldDeps = pointer.get();
279883
- const hasChanged = !Array.isArray(oldDeps) || depArray.some((dep, i6) => !Object.is(dep, oldDeps[i6]));
279884
- if (hasChanged) {
279885
- effectScheduler2.queue(cb);
279886
- }
279887
- pointer.set(depArray);
279888
- });
279889
- }
279890
-
279891
- // ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/theme.js
279892
- var import_yoctocolors_cjs2 = __toESM(require_yoctocolors_cjs(), 1);
279893
- var defaultTheme2 = {
279894
- prefix: {
279895
- idle: import_yoctocolors_cjs2.default.blue("?"),
279896
- done: import_yoctocolors_cjs2.default.green(esm_default.tick)
279897
- },
279898
- spinner: {
279899
- interval: 80,
279900
- frames: ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"].map((frame) => import_yoctocolors_cjs2.default.yellow(frame))
279901
- },
279902
- style: {
279903
- answer: import_yoctocolors_cjs2.default.cyan,
279904
- message: import_yoctocolors_cjs2.default.bold,
279905
- error: (text2) => import_yoctocolors_cjs2.default.red(`> ${text2}`),
279906
- defaultAnswer: (text2) => import_yoctocolors_cjs2.default.dim(`(${text2})`),
279907
- help: import_yoctocolors_cjs2.default.dim,
279908
- highlight: import_yoctocolors_cjs2.default.cyan,
279909
- key: (text2) => import_yoctocolors_cjs2.default.cyan(import_yoctocolors_cjs2.default.bold(`<${text2}>`))
279910
- }
279911
- };
279912
-
279913
- // ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/make-theme.js
279914
- function isPlainObject3(value4) {
279915
- if (typeof value4 !== "object" || value4 === null)
279916
- return false;
279917
- let proto = value4;
279918
- while (Object.getPrototypeOf(proto) !== null) {
279919
- proto = Object.getPrototypeOf(proto);
279920
- }
279921
- return Object.getPrototypeOf(value4) === proto;
279922
- }
279923
- function deepMerge3(...objects) {
279924
- const output = {};
279925
- for (const obj of objects) {
279926
- for (const [key2, value4] of Object.entries(obj)) {
279927
- const prevValue = output[key2];
279928
- output[key2] = isPlainObject3(prevValue) && isPlainObject3(value4) ? deepMerge3(prevValue, value4) : value4;
279929
- }
279930
- }
279931
- return output;
279932
- }
279933
- function makeTheme2(...themes) {
279934
- const themesToMerge = [
279935
- defaultTheme2,
279936
- ...themes.filter((theme) => theme != null)
279937
- ];
279938
- return deepMerge3(...themesToMerge);
279939
- }
279940
-
279941
- // ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/use-prefix.js
279942
- function usePrefix2({ status = "idle", theme }) {
279943
- const [showLoader, setShowLoader] = useState2(false);
279944
- const [tick, setTick] = useState2(0);
279945
- const { prefix, spinner: spinner2 } = makeTheme2(theme);
279946
- useEffect2(() => {
279947
- if (status === "loading") {
279948
- let tickInterval;
279949
- let inc = -1;
279950
- const delayTimeout = setTimeout(AsyncResource5.bind(() => {
279951
- setShowLoader(true);
279952
- tickInterval = setInterval(AsyncResource5.bind(() => {
279953
- inc = inc + 1;
279954
- setTick(inc % spinner2.frames.length);
279955
- }), spinner2.interval);
279956
- }), 300);
279957
- return () => {
279958
- clearTimeout(delayTimeout);
279959
- clearInterval(tickInterval);
279960
- };
279961
- } else {
279962
- setShowLoader(false);
279963
- }
279964
- }, [status]);
279965
- if (showLoader) {
279966
- return spinner2.frames[tick];
279967
- }
279968
- const iconName = status === "loading" ? "idle" : status;
279969
- return typeof prefix === "string" ? prefix : prefix[iconName] ?? prefix["idle"];
279970
- }
279971
- // ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/use-memo.js
279972
- function useMemo(fn, dependencies) {
279973
- return withPointer2((pointer) => {
279974
- const prev = pointer.get();
279975
- if (!prev || prev.dependencies.length !== dependencies.length || prev.dependencies.some((dep, i6) => dep !== dependencies[i6])) {
279976
- const value4 = fn();
279977
- pointer.set({ value: value4, dependencies });
279978
- return value4;
279979
- }
279980
- return prev.value;
279981
- });
279982
- }
279983
- // ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/use-ref.js
279984
- function useRef2(val) {
279985
- return useState2({ current: val })[0];
279986
- }
279987
- // ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/use-keypress.js
279988
- function useKeypress2(userHandler) {
279989
- const signal = useRef2(userHandler);
279990
- signal.current = userHandler;
279991
- useEffect2((rl) => {
279992
- let ignore = false;
279993
- const handler = withUpdates2((_input, event) => {
279994
- if (ignore)
279995
- return;
279996
- signal.current(event, rl);
279997
- });
279998
- rl.input.on("keypress", handler);
279999
- return () => {
280000
- ignore = true;
280001
- rl.input.removeListener("keypress", handler);
280002
- };
280003
- }, []);
280004
- }
280005
- // ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/utils.js
280006
- var import_cli_width2 = __toESM(require_cli_width(), 1);
280007
- var import_wrap_ansi2 = __toESM(require_wrap_ansi(), 1);
280008
- function breakLines2(content, width) {
280009
- return content.split(`
280010
- `).flatMap((line) => import_wrap_ansi2.default(line, width, { trim: false, hard: true }).split(`
280011
- `).map((str) => str.trimEnd())).join(`
280012
- `);
280013
- }
280014
- function readlineWidth2() {
280015
- return import_cli_width2.default({ defaultWidth: 80, output: readline3().output });
280016
- }
280017
-
280018
- // ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/pagination/lines.js
280019
- function split2(content, width) {
280020
- return breakLines2(content, width).split(`
280021
- `);
280022
- }
280023
- function rotate(count, items) {
280024
- const max = items.length;
280025
- const offset = (count % max + max) % max;
280026
- return [...items.slice(offset), ...items.slice(0, offset)];
280027
- }
280028
- function lines({ items, width, renderItem, active, position: requested, pageSize }) {
280029
- const layouts = items.map((item, index) => ({
280030
- item,
280031
- index,
280032
- isActive: index === active
280033
- }));
280034
- const layoutsInPage = rotate(active - requested, layouts).slice(0, pageSize);
280035
- const renderItemAt = (index) => layoutsInPage[index] == null ? [] : split2(renderItem(layoutsInPage[index]), width);
280036
- const pageBuffer = Array.from({ length: pageSize });
280037
- const activeItem = renderItemAt(requested).slice(0, pageSize);
280038
- const position = requested + activeItem.length <= pageSize ? requested : pageSize - activeItem.length;
280039
- pageBuffer.splice(position, activeItem.length, ...activeItem);
280040
- let bufferPointer = position + activeItem.length;
280041
- let layoutPointer = requested + 1;
280042
- while (bufferPointer < pageSize && layoutPointer < layoutsInPage.length) {
280043
- for (const line of renderItemAt(layoutPointer)) {
280044
- pageBuffer[bufferPointer++] = line;
280045
- if (bufferPointer >= pageSize)
280046
- break;
280047
- }
280048
- layoutPointer++;
280049
- }
280050
- bufferPointer = position - 1;
280051
- layoutPointer = requested - 1;
280052
- while (bufferPointer >= 0 && layoutPointer >= 0) {
280053
- for (const line of renderItemAt(layoutPointer).reverse()) {
280054
- pageBuffer[bufferPointer--] = line;
280055
- if (bufferPointer < 0)
280056
- break;
280057
- }
280058
- layoutPointer--;
280059
- }
280060
- return pageBuffer.filter((line) => typeof line === "string");
280061
- }
280062
-
280063
- // ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/pagination/position.js
280064
- function finite({ active, pageSize, total }) {
280065
- const middle = Math.floor(pageSize / 2);
280066
- if (total <= pageSize || active < middle)
280067
- return active;
280068
- if (active >= total - middle)
280069
- return active + pageSize - total;
280070
- return middle;
280071
- }
280072
- function infinite({ active, lastActive, total, pageSize, pointer }) {
280073
- if (total <= pageSize)
280074
- return active;
280075
- if (lastActive < active && active - lastActive < pageSize) {
280076
- return Math.min(Math.floor(pageSize / 2), pointer + active - lastActive);
280077
- }
280078
- return pointer;
280079
- }
280080
-
280081
- // ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/pagination/use-pagination.js
280082
- function usePagination({ items, active, renderItem, pageSize, loop = true }) {
280083
- const state = useRef2({ position: 0, lastActive: 0 });
280084
- const position = loop ? infinite({
280085
- active,
280086
- lastActive: state.current.lastActive,
280087
- total: items.length,
280088
- pageSize,
280089
- pointer: state.current.position
280090
- }) : finite({
280091
- active,
280092
- total: items.length,
280093
- pageSize
280094
- });
280095
- state.current.position = position;
280096
- state.current.lastActive = active;
280097
- return lines({
280098
- items,
280099
- width: readlineWidth2(),
280100
- renderItem,
280101
- active,
280102
- position,
280103
- pageSize
280104
- }).join(`
280105
- `);
280106
- }
280107
- // ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
280108
- var import_mute_stream2 = __toESM(require_lib(), 1);
280109
- import * as readline4 from "node:readline";
280110
- import { AsyncResource as AsyncResource6 } from "node:async_hooks";
280111
-
280112
- // ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/screen-manager.js
280113
- var import_ansi_escapes2 = __toESM(require_ansi_escapes(), 1);
280114
- import { stripVTControlCharacters as stripVTControlCharacters3 } from "node:util";
280115
- var height2 = (content) => content.split(`
280116
- `).length;
280117
- var lastLine2 = (content) => content.split(`
280118
- `).pop() ?? "";
280119
- function cursorDown2(n6) {
280120
- return n6 > 0 ? import_ansi_escapes2.default.cursorDown(n6) : "";
280121
- }
280122
-
280123
- class ScreenManager2 {
280124
- rl;
280125
- height = 0;
280126
- extraLinesUnderPrompt = 0;
280127
- cursorPos;
280128
- constructor(rl) {
280129
- this.rl = rl;
280130
- this.rl = rl;
280131
- this.cursorPos = rl.getCursorPos();
280132
- }
280133
- write(content) {
280134
- this.rl.output.unmute();
280135
- this.rl.output.write(content);
280136
- this.rl.output.mute();
280137
- }
280138
- render(content, bottomContent = "") {
280139
- const promptLine = lastLine2(content);
280140
- const rawPromptLine = stripVTControlCharacters3(promptLine);
280141
- let prompt = rawPromptLine;
280142
- if (this.rl.line.length > 0) {
280143
- prompt = prompt.slice(0, -this.rl.line.length);
280144
- }
280145
- this.rl.setPrompt(prompt);
280146
- this.cursorPos = this.rl.getCursorPos();
280147
- const width = readlineWidth2();
280148
- content = breakLines2(content, width);
280149
- bottomContent = breakLines2(bottomContent, width);
280150
- if (rawPromptLine.length % width === 0) {
280151
- content += `
280152
- `;
280153
- }
280154
- let output = content + (bottomContent ? `
280155
- ` + bottomContent : "");
280156
- const promptLineUpDiff = Math.floor(rawPromptLine.length / width) - this.cursorPos.rows;
280157
- const bottomContentHeight = promptLineUpDiff + (bottomContent ? height2(bottomContent) : 0);
280158
- if (bottomContentHeight > 0)
280159
- output += import_ansi_escapes2.default.cursorUp(bottomContentHeight);
280160
- output += import_ansi_escapes2.default.cursorTo(this.cursorPos.cols);
280161
- this.write(cursorDown2(this.extraLinesUnderPrompt) + import_ansi_escapes2.default.eraseLines(this.height) + output);
280162
- this.extraLinesUnderPrompt = bottomContentHeight;
280163
- this.height = height2(output);
280164
- }
280165
- checkCursorPos() {
280166
- const cursorPos = this.rl.getCursorPos();
280167
- if (cursorPos.cols !== this.cursorPos.cols) {
280168
- this.write(import_ansi_escapes2.default.cursorTo(cursorPos.cols));
280169
- this.cursorPos = cursorPos;
280170
- }
280171
- }
280172
- done({ clearContent }) {
280173
- this.rl.setPrompt("");
280174
- let output = cursorDown2(this.extraLinesUnderPrompt);
280175
- output += clearContent ? import_ansi_escapes2.default.eraseLines(this.height) : `
280176
- `;
280177
- output += import_ansi_escapes2.default.cursorShow;
280178
- this.write(output);
280179
- this.rl.close();
280180
- }
280181
- }
280182
-
280183
- // ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/promise-polyfill.js
280184
- class PromisePolyfill2 extends Promise {
280185
- static withResolver() {
280186
- let resolve5;
280187
- let reject;
280188
- const promise = new Promise((res, rej) => {
280189
- resolve5 = res;
280190
- reject = rej;
280191
- });
280192
- return { promise, resolve: resolve5, reject };
280193
- }
280194
- }
280195
-
280196
- // ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
280197
- function getCallSites2() {
280198
- const _prepareStackTrace = Error.prepareStackTrace;
280199
- try {
280200
- let result = [];
280201
- Error.prepareStackTrace = (_5, callSites) => {
280202
- const callSitesWithoutCurrent = callSites.slice(1);
280203
- result = callSitesWithoutCurrent;
280204
- return callSitesWithoutCurrent;
280205
- };
280206
- new Error().stack;
280207
- return result;
280208
- } finally {
280209
- Error.prepareStackTrace = _prepareStackTrace;
280210
- }
280211
- }
280212
- function createPrompt2(view) {
280213
- const callSites = getCallSites2();
280214
- const callerFilename = callSites[1]?.getFileName?.();
280215
- const prompt = (config3, context = {}) => {
280216
- const { input = process.stdin, signal } = context;
280217
- const cleanups = new Set;
280218
- const output = new import_mute_stream2.default;
280219
- output.pipe(context.output ?? process.stdout);
280220
- const rl = readline4.createInterface({
280221
- terminal: true,
280222
- input,
280223
- output
280224
- });
280225
- const screen = new ScreenManager2(rl);
280226
- const { promise, resolve: resolve5, reject } = PromisePolyfill2.withResolver();
280227
- const cancel3 = () => reject(new CancelPromptError2);
280228
- if (signal) {
280229
- const abort = () => reject(new AbortPromptError2({ cause: signal.reason }));
280230
- if (signal.aborted) {
280231
- abort();
280232
- return Object.assign(promise, { cancel: cancel3 });
280233
- }
280234
- signal.addEventListener("abort", abort);
280235
- cleanups.add(() => signal.removeEventListener("abort", abort));
280236
- }
280237
- cleanups.add(onExit((code2, signal2) => {
280238
- reject(new ExitPromptError2(`User force closed the prompt with ${code2} ${signal2}`));
280239
- }));
280240
- const checkCursorPos = () => screen.checkCursorPos();
280241
- rl.input.on("keypress", checkCursorPos);
280242
- cleanups.add(() => rl.input.removeListener("keypress", checkCursorPos));
280243
- return withHooks2(rl, (cycle) => {
280244
- const hooksCleanup = AsyncResource6.bind(() => effectScheduler2.clearAll());
280245
- rl.on("close", hooksCleanup);
280246
- cleanups.add(() => rl.removeListener("close", hooksCleanup));
280247
- cycle(() => {
280248
- try {
280249
- const nextView = view(config3, (value4) => {
280250
- setImmediate(() => resolve5(value4));
280251
- });
280252
- if (nextView === undefined) {
280253
- throw new Error(`Prompt functions must return a string.
280254
- at ${callerFilename}`);
280255
- }
280256
- const [content, bottomContent] = typeof nextView === "string" ? [nextView] : nextView;
280257
- screen.render(content, bottomContent);
280258
- effectScheduler2.run();
280259
- } catch (error5) {
280260
- reject(error5);
280261
- }
280262
- });
280263
- return Object.assign(promise.then((answer) => {
280264
- effectScheduler2.clearAll();
280265
- return answer;
280266
- }, (error5) => {
280267
- effectScheduler2.clearAll();
280268
- throw error5;
280269
- }).finally(() => {
280270
- cleanups.forEach((cleanup) => cleanup());
280271
- screen.done({ clearContent: Boolean(context.clearPromptOnDone) });
280272
- output.end();
280273
- }).then(() => promise), { cancel: cancel3 });
280274
- });
280275
- };
280276
- return prompt;
280277
- }
280278
- // ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/Separator.js
280279
- var import_yoctocolors_cjs3 = __toESM(require_yoctocolors_cjs(), 1);
280280
- class Separator {
280281
- separator = import_yoctocolors_cjs3.default.dim(Array.from({ length: 15 }).join(esm_default.line));
280282
- type = "separator";
280283
- constructor(separator) {
280284
- if (separator) {
280285
- this.separator = separator;
280286
- }
280287
- }
280288
- static isSeparator(choice) {
280289
- return Boolean(choice && typeof choice === "object" && "type" in choice && choice.type === "separator");
280290
- }
280291
- }
280292
279837
  // ../../node_modules/@inquirer/select/dist/esm/index.js
280293
- var import_yoctocolors_cjs4 = __toESM(require_yoctocolors_cjs(), 1);
280294
- var import_ansi_escapes3 = __toESM(require_ansi_escapes(), 1);
279838
+ var import_yoctocolors_cjs3 = __toESM(require_yoctocolors_cjs(), 1);
279839
+ var import_ansi_escapes2 = __toESM(require_ansi_escapes(), 1);
280295
279840
  var selectTheme = {
280296
279841
  icon: { cursor: esm_default.pointer },
280297
279842
  style: {
280298
- disabled: (text2) => import_yoctocolors_cjs4.default.dim(`- ${text2}`),
280299
- description: (text2) => import_yoctocolors_cjs4.default.cyan(text2)
279843
+ disabled: (text2) => import_yoctocolors_cjs3.default.dim(`- ${text2}`),
279844
+ description: (text2) => import_yoctocolors_cjs3.default.cyan(text2)
280300
279845
  },
280301
279846
  helpMode: "auto"
280302
279847
  };
@@ -280325,19 +279870,19 @@ function normalizeChoices(choices) {
280325
279870
  };
280326
279871
  });
280327
279872
  }
280328
- var esm_default2 = createPrompt2((config3, done) => {
279873
+ var esm_default2 = createPrompt((config3, done) => {
280329
279874
  const { loop = true, pageSize = 7 } = config3;
280330
- const firstRender = useRef2(true);
280331
- const theme = makeTheme2(selectTheme, config3.theme);
280332
- const [status, setStatus] = useState2("idle");
280333
- const prefix = usePrefix2({ status, theme });
280334
- const searchTimeoutRef = useRef2();
279875
+ const firstRender = useRef(true);
279876
+ const theme = makeTheme(selectTheme, config3.theme);
279877
+ const [status, setStatus] = useState("idle");
279878
+ const prefix = usePrefix({ status, theme });
279879
+ const searchTimeoutRef = useRef();
280335
279880
  const items = useMemo(() => normalizeChoices(config3.choices), [config3.choices]);
280336
279881
  const bounds = useMemo(() => {
280337
279882
  const first = items.findIndex(isSelectable);
280338
279883
  const last = items.findLastIndex(isSelectable);
280339
279884
  if (first === -1) {
280340
- throw new ValidationError2("[select prompt] No selectable choices. All choices are disabled.");
279885
+ throw new ValidationError("[select prompt] No selectable choices. All choices are disabled.");
280341
279886
  }
280342
279887
  return { first, last };
280343
279888
  }, [items]);
@@ -280346,31 +279891,31 @@ var esm_default2 = createPrompt2((config3, done) => {
280346
279891
  return -1;
280347
279892
  return items.findIndex((item) => isSelectable(item) && item.value === config3.default);
280348
279893
  }, [config3.default, items]);
280349
- const [active, setActive] = useState2(defaultItemIndex === -1 ? bounds.first : defaultItemIndex);
279894
+ const [active, setActive] = useState(defaultItemIndex === -1 ? bounds.first : defaultItemIndex);
280350
279895
  const selectedChoice = items[active];
280351
- useKeypress2((key3, rl) => {
279896
+ useKeypress((key2, rl) => {
280352
279897
  clearTimeout(searchTimeoutRef.current);
280353
- if (isEnterKey2(key3)) {
279898
+ if (isEnterKey(key2)) {
280354
279899
  setStatus("done");
280355
279900
  done(selectedChoice.value);
280356
- } else if (isUpKey(key3) || isDownKey(key3)) {
279901
+ } else if (isUpKey(key2) || isDownKey(key2)) {
280357
279902
  rl.clearLine(0);
280358
- if (loop || isUpKey(key3) && active !== bounds.first || isDownKey(key3) && active !== bounds.last) {
280359
- const offset = isUpKey(key3) ? -1 : 1;
279903
+ if (loop || isUpKey(key2) && active !== bounds.first || isDownKey(key2) && active !== bounds.last) {
279904
+ const offset = isUpKey(key2) ? -1 : 1;
280360
279905
  let next = active;
280361
279906
  do {
280362
279907
  next = (next + offset + items.length) % items.length;
280363
279908
  } while (!isSelectable(items[next]));
280364
279909
  setActive(next);
280365
279910
  }
280366
- } else if (isNumberKey(key3)) {
279911
+ } else if (isNumberKey(key2)) {
280367
279912
  rl.clearLine(0);
280368
- const position = Number(key3.name) - 1;
279913
+ const position = Number(key2.name) - 1;
280369
279914
  const item = items[position];
280370
279915
  if (item != null && isSelectable(item)) {
280371
279916
  setActive(position);
280372
279917
  }
280373
- } else if (isBackspaceKey2(key3)) {
279918
+ } else if (isBackspaceKey(key2)) {
280374
279919
  rl.clearLine(0);
280375
279920
  } else {
280376
279921
  const searchTerm = rl.line.toLowerCase();
@@ -280387,7 +279932,7 @@ var esm_default2 = createPrompt2((config3, done) => {
280387
279932
  }, 700);
280388
279933
  }
280389
279934
  });
280390
- useEffect2(() => () => {
279935
+ useEffect(() => () => {
280391
279936
  clearTimeout(searchTimeoutRef.current);
280392
279937
  }, []);
280393
279938
  const message = theme.style.message(config3.message, status);
@@ -280426,7 +279971,7 @@ ${theme.style.help("(Use arrow keys to reveal more choices)")}`;
280426
279971
  const choiceDescription = selectedChoice.description ? `
280427
279972
  ${theme.style.description(selectedChoice.description)}` : ``;
280428
279973
  return `${[prefix, message, helpTipTop].filter(Boolean).join(" ")}
280429
- ${page}${helpTipBottom}${choiceDescription}${import_ansi_escapes3.default.cursorHide}`;
279974
+ ${page}${helpTipBottom}${choiceDescription}${import_ansi_escapes2.default.cursorHide}`;
280430
279975
  });
280431
279976
 
280432
279977
  // src/prompts/smart-contract-set/subgraph.prompt.ts
@@ -280766,13 +280311,13 @@ var esm_default3 = createPrompt((config3, done) => {
280766
280311
  const [value4, setValue] = useState("");
280767
280312
  const theme = makeTheme(config3.theme);
280768
280313
  const prefix = usePrefix({ status, theme });
280769
- useKeypress((key3, rl) => {
280770
- if (isEnterKey(key3)) {
280314
+ useKeypress((key2, rl) => {
280315
+ if (isEnterKey(key2)) {
280771
280316
  const answer = getBooleanValue(value4, config3.default);
280772
280317
  setValue(transformer(answer));
280773
280318
  setStatus("done");
280774
280319
  done(answer);
280775
- } else if (key3.name === "tab") {
280320
+ } else if (key2.name === "tab") {
280776
280321
  const answer = boolToString(!getBooleanValue(value4, config3.default));
280777
280322
  rl.clearLine(0);
280778
280323
  rl.write(answer);
@@ -280804,11 +280349,11 @@ var esm_default4 = createPrompt((config3, done) => {
280804
280349
  const [errorMsg, setError] = useState();
280805
280350
  const [value4, setValue] = useState("");
280806
280351
  const prefix = usePrefix({ status, theme });
280807
- useKeypress(async (key3, rl) => {
280352
+ useKeypress(async (key2, rl) => {
280808
280353
  if (status !== "idle") {
280809
280354
  return;
280810
280355
  }
280811
- if (isEnterKey(key3)) {
280356
+ if (isEnterKey(key2)) {
280812
280357
  const answer = value4 || defaultValue;
280813
280358
  setStatus("loading");
280814
280359
  const isValid2 = required && !answer ? "You must provide a value" : await validate3(answer);
@@ -280825,9 +280370,9 @@ var esm_default4 = createPrompt((config3, done) => {
280825
280370
  setError(isValid2 || "You must provide a valid value");
280826
280371
  setStatus("idle");
280827
280372
  }
280828
- } else if (isBackspaceKey(key3) && !value4) {
280373
+ } else if (isBackspaceKey(key2) && !value4) {
280829
280374
  setDefaultValue(undefined);
280830
- } else if (key3.name === "tab" && !value4) {
280375
+ } else if (key2.name === "tab" && !value4) {
280831
280376
  setDefaultValue(undefined);
280832
280377
  rl.clearLine(0);
280833
280378
  rl.write(defaultValue);
@@ -280858,20 +280403,474 @@ var esm_default4 = createPrompt((config3, done) => {
280858
280403
  ];
280859
280404
  });
280860
280405
 
280406
+ // ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/key.js
280407
+ var isEnterKey2 = (key2) => key2.name === "enter" || key2.name === "return";
280408
+ // ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/errors.js
280409
+ class AbortPromptError2 extends Error {
280410
+ name = "AbortPromptError";
280411
+ message = "Prompt was aborted";
280412
+ constructor(options) {
280413
+ super();
280414
+ this.cause = options?.cause;
280415
+ }
280416
+ }
280417
+
280418
+ class CancelPromptError2 extends Error {
280419
+ name = "CancelPromptError";
280420
+ message = "Prompt was canceled";
280421
+ }
280422
+
280423
+ class ExitPromptError2 extends Error {
280424
+ name = "ExitPromptError";
280425
+ }
280426
+
280427
+ class HookError2 extends Error {
280428
+ name = "HookError";
280429
+ }
280430
+
280431
+ class ValidationError2 extends Error {
280432
+ name = "ValidationError";
280433
+ }
280434
+ // ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/use-prefix.js
280435
+ import { AsyncResource as AsyncResource5 } from "node:async_hooks";
280436
+
280437
+ // ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/hook-engine.js
280438
+ import { AsyncLocalStorage as AsyncLocalStorage2, AsyncResource as AsyncResource4 } from "node:async_hooks";
280439
+ var hookStorage2 = new AsyncLocalStorage2;
280440
+ function createStore2(rl) {
280441
+ const store = {
280442
+ rl,
280443
+ hooks: [],
280444
+ hooksCleanup: [],
280445
+ hooksEffect: [],
280446
+ index: 0,
280447
+ handleChange() {
280448
+ }
280449
+ };
280450
+ return store;
280451
+ }
280452
+ function withHooks2(rl, cb) {
280453
+ const store = createStore2(rl);
280454
+ return hookStorage2.run(store, () => {
280455
+ function cycle(render) {
280456
+ store.handleChange = () => {
280457
+ store.index = 0;
280458
+ render();
280459
+ };
280460
+ store.handleChange();
280461
+ }
280462
+ return cb(cycle);
280463
+ });
280464
+ }
280465
+ function getStore2() {
280466
+ const store = hookStorage2.getStore();
280467
+ if (!store) {
280468
+ throw new HookError2("[Inquirer] Hook functions can only be called from within a prompt");
280469
+ }
280470
+ return store;
280471
+ }
280472
+ function readline3() {
280473
+ return getStore2().rl;
280474
+ }
280475
+ function withUpdates2(fn) {
280476
+ const wrapped = (...args) => {
280477
+ const store = getStore2();
280478
+ let shouldUpdate = false;
280479
+ const oldHandleChange = store.handleChange;
280480
+ store.handleChange = () => {
280481
+ shouldUpdate = true;
280482
+ };
280483
+ const returnValue = fn(...args);
280484
+ if (shouldUpdate) {
280485
+ oldHandleChange();
280486
+ }
280487
+ store.handleChange = oldHandleChange;
280488
+ return returnValue;
280489
+ };
280490
+ return AsyncResource4.bind(wrapped);
280491
+ }
280492
+ function withPointer2(cb) {
280493
+ const store = getStore2();
280494
+ const { index } = store;
280495
+ const pointer = {
280496
+ get() {
280497
+ return store.hooks[index];
280498
+ },
280499
+ set(value4) {
280500
+ store.hooks[index] = value4;
280501
+ },
280502
+ initialized: index in store.hooks
280503
+ };
280504
+ const returnValue = cb(pointer);
280505
+ store.index++;
280506
+ return returnValue;
280507
+ }
280508
+ function handleChange2() {
280509
+ getStore2().handleChange();
280510
+ }
280511
+ var effectScheduler2 = {
280512
+ queue(cb) {
280513
+ const store = getStore2();
280514
+ const { index } = store;
280515
+ store.hooksEffect.push(() => {
280516
+ store.hooksCleanup[index]?.();
280517
+ const cleanFn = cb(readline3());
280518
+ if (cleanFn != null && typeof cleanFn !== "function") {
280519
+ throw new ValidationError2("useEffect return value must be a cleanup function or nothing.");
280520
+ }
280521
+ store.hooksCleanup[index] = cleanFn;
280522
+ });
280523
+ },
280524
+ run() {
280525
+ const store = getStore2();
280526
+ withUpdates2(() => {
280527
+ store.hooksEffect.forEach((effect) => {
280528
+ effect();
280529
+ });
280530
+ store.hooksEffect.length = 0;
280531
+ })();
280532
+ },
280533
+ clearAll() {
280534
+ const store = getStore2();
280535
+ store.hooksCleanup.forEach((cleanFn) => {
280536
+ cleanFn?.();
280537
+ });
280538
+ store.hooksEffect.length = 0;
280539
+ store.hooksCleanup.length = 0;
280540
+ }
280541
+ };
280542
+
280543
+ // ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/use-state.js
280544
+ function useState2(defaultValue) {
280545
+ return withPointer2((pointer) => {
280546
+ const setFn = (newValue) => {
280547
+ if (pointer.get() !== newValue) {
280548
+ pointer.set(newValue);
280549
+ handleChange2();
280550
+ }
280551
+ };
280552
+ if (pointer.initialized) {
280553
+ return [pointer.get(), setFn];
280554
+ }
280555
+ const value4 = typeof defaultValue === "function" ? defaultValue() : defaultValue;
280556
+ pointer.set(value4);
280557
+ return [value4, setFn];
280558
+ });
280559
+ }
280560
+
280561
+ // ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/use-effect.js
280562
+ function useEffect2(cb, depArray) {
280563
+ withPointer2((pointer) => {
280564
+ const oldDeps = pointer.get();
280565
+ const hasChanged = !Array.isArray(oldDeps) || depArray.some((dep, i6) => !Object.is(dep, oldDeps[i6]));
280566
+ if (hasChanged) {
280567
+ effectScheduler2.queue(cb);
280568
+ }
280569
+ pointer.set(depArray);
280570
+ });
280571
+ }
280572
+
280573
+ // ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/theme.js
280574
+ var import_yoctocolors_cjs4 = __toESM(require_yoctocolors_cjs(), 1);
280575
+ var defaultTheme2 = {
280576
+ prefix: {
280577
+ idle: import_yoctocolors_cjs4.default.blue("?"),
280578
+ done: import_yoctocolors_cjs4.default.green(esm_default.tick)
280579
+ },
280580
+ spinner: {
280581
+ interval: 80,
280582
+ frames: ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"].map((frame) => import_yoctocolors_cjs4.default.yellow(frame))
280583
+ },
280584
+ style: {
280585
+ answer: import_yoctocolors_cjs4.default.cyan,
280586
+ message: import_yoctocolors_cjs4.default.bold,
280587
+ error: (text2) => import_yoctocolors_cjs4.default.red(`> ${text2}`),
280588
+ defaultAnswer: (text2) => import_yoctocolors_cjs4.default.dim(`(${text2})`),
280589
+ help: import_yoctocolors_cjs4.default.dim,
280590
+ highlight: import_yoctocolors_cjs4.default.cyan,
280591
+ key: (text2) => import_yoctocolors_cjs4.default.cyan(import_yoctocolors_cjs4.default.bold(`<${text2}>`))
280592
+ }
280593
+ };
280594
+
280595
+ // ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/make-theme.js
280596
+ function isPlainObject3(value4) {
280597
+ if (typeof value4 !== "object" || value4 === null)
280598
+ return false;
280599
+ let proto = value4;
280600
+ while (Object.getPrototypeOf(proto) !== null) {
280601
+ proto = Object.getPrototypeOf(proto);
280602
+ }
280603
+ return Object.getPrototypeOf(value4) === proto;
280604
+ }
280605
+ function deepMerge3(...objects) {
280606
+ const output = {};
280607
+ for (const obj of objects) {
280608
+ for (const [key2, value4] of Object.entries(obj)) {
280609
+ const prevValue = output[key2];
280610
+ output[key2] = isPlainObject3(prevValue) && isPlainObject3(value4) ? deepMerge3(prevValue, value4) : value4;
280611
+ }
280612
+ }
280613
+ return output;
280614
+ }
280615
+ function makeTheme2(...themes) {
280616
+ const themesToMerge = [
280617
+ defaultTheme2,
280618
+ ...themes.filter((theme) => theme != null)
280619
+ ];
280620
+ return deepMerge3(...themesToMerge);
280621
+ }
280622
+
280623
+ // ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/use-prefix.js
280624
+ function usePrefix2({ status = "idle", theme }) {
280625
+ const [showLoader, setShowLoader] = useState2(false);
280626
+ const [tick, setTick] = useState2(0);
280627
+ const { prefix, spinner: spinner2 } = makeTheme2(theme);
280628
+ useEffect2(() => {
280629
+ if (status === "loading") {
280630
+ let tickInterval;
280631
+ let inc = -1;
280632
+ const delayTimeout = setTimeout(AsyncResource5.bind(() => {
280633
+ setShowLoader(true);
280634
+ tickInterval = setInterval(AsyncResource5.bind(() => {
280635
+ inc = inc + 1;
280636
+ setTick(inc % spinner2.frames.length);
280637
+ }), spinner2.interval);
280638
+ }), 300);
280639
+ return () => {
280640
+ clearTimeout(delayTimeout);
280641
+ clearInterval(tickInterval);
280642
+ };
280643
+ } else {
280644
+ setShowLoader(false);
280645
+ }
280646
+ }, [status]);
280647
+ if (showLoader) {
280648
+ return spinner2.frames[tick];
280649
+ }
280650
+ const iconName = status === "loading" ? "idle" : status;
280651
+ return typeof prefix === "string" ? prefix : prefix[iconName] ?? prefix["idle"];
280652
+ }
280653
+ // ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/use-ref.js
280654
+ function useRef2(val) {
280655
+ return useState2({ current: val })[0];
280656
+ }
280657
+
280658
+ // ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/use-keypress.js
280659
+ function useKeypress2(userHandler) {
280660
+ const signal = useRef2(userHandler);
280661
+ signal.current = userHandler;
280662
+ useEffect2((rl) => {
280663
+ let ignore = false;
280664
+ const handler = withUpdates2((_input, event) => {
280665
+ if (ignore)
280666
+ return;
280667
+ signal.current(event, rl);
280668
+ });
280669
+ rl.input.on("keypress", handler);
280670
+ return () => {
280671
+ ignore = true;
280672
+ rl.input.removeListener("keypress", handler);
280673
+ };
280674
+ }, []);
280675
+ }
280676
+ // ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/utils.js
280677
+ var import_cli_width2 = __toESM(require_cli_width(), 1);
280678
+ var import_wrap_ansi2 = __toESM(require_wrap_ansi(), 1);
280679
+ function breakLines2(content, width) {
280680
+ return content.split(`
280681
+ `).flatMap((line) => import_wrap_ansi2.default(line, width, { trim: false, hard: true }).split(`
280682
+ `).map((str) => str.trimEnd())).join(`
280683
+ `);
280684
+ }
280685
+ function readlineWidth2() {
280686
+ return import_cli_width2.default({ defaultWidth: 80, output: readline3().output });
280687
+ }
280688
+
280689
+ // ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
280690
+ var import_mute_stream2 = __toESM(require_lib(), 1);
280691
+ import * as readline4 from "node:readline";
280692
+ import { AsyncResource as AsyncResource6 } from "node:async_hooks";
280693
+
280694
+ // ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/screen-manager.js
280695
+ var import_ansi_escapes3 = __toESM(require_ansi_escapes(), 1);
280696
+ import { stripVTControlCharacters as stripVTControlCharacters3 } from "node:util";
280697
+ var height2 = (content) => content.split(`
280698
+ `).length;
280699
+ var lastLine2 = (content) => content.split(`
280700
+ `).pop() ?? "";
280701
+ function cursorDown2(n6) {
280702
+ return n6 > 0 ? import_ansi_escapes3.default.cursorDown(n6) : "";
280703
+ }
280704
+
280705
+ class ScreenManager2 {
280706
+ rl;
280707
+ height = 0;
280708
+ extraLinesUnderPrompt = 0;
280709
+ cursorPos;
280710
+ constructor(rl) {
280711
+ this.rl = rl;
280712
+ this.rl = rl;
280713
+ this.cursorPos = rl.getCursorPos();
280714
+ }
280715
+ write(content) {
280716
+ this.rl.output.unmute();
280717
+ this.rl.output.write(content);
280718
+ this.rl.output.mute();
280719
+ }
280720
+ render(content, bottomContent = "") {
280721
+ const promptLine = lastLine2(content);
280722
+ const rawPromptLine = stripVTControlCharacters3(promptLine);
280723
+ let prompt = rawPromptLine;
280724
+ if (this.rl.line.length > 0) {
280725
+ prompt = prompt.slice(0, -this.rl.line.length);
280726
+ }
280727
+ this.rl.setPrompt(prompt);
280728
+ this.cursorPos = this.rl.getCursorPos();
280729
+ const width = readlineWidth2();
280730
+ content = breakLines2(content, width);
280731
+ bottomContent = breakLines2(bottomContent, width);
280732
+ if (rawPromptLine.length % width === 0) {
280733
+ content += `
280734
+ `;
280735
+ }
280736
+ let output = content + (bottomContent ? `
280737
+ ` + bottomContent : "");
280738
+ const promptLineUpDiff = Math.floor(rawPromptLine.length / width) - this.cursorPos.rows;
280739
+ const bottomContentHeight = promptLineUpDiff + (bottomContent ? height2(bottomContent) : 0);
280740
+ if (bottomContentHeight > 0)
280741
+ output += import_ansi_escapes3.default.cursorUp(bottomContentHeight);
280742
+ output += import_ansi_escapes3.default.cursorTo(this.cursorPos.cols);
280743
+ this.write(cursorDown2(this.extraLinesUnderPrompt) + import_ansi_escapes3.default.eraseLines(this.height) + output);
280744
+ this.extraLinesUnderPrompt = bottomContentHeight;
280745
+ this.height = height2(output);
280746
+ }
280747
+ checkCursorPos() {
280748
+ const cursorPos = this.rl.getCursorPos();
280749
+ if (cursorPos.cols !== this.cursorPos.cols) {
280750
+ this.write(import_ansi_escapes3.default.cursorTo(cursorPos.cols));
280751
+ this.cursorPos = cursorPos;
280752
+ }
280753
+ }
280754
+ done({ clearContent }) {
280755
+ this.rl.setPrompt("");
280756
+ let output = cursorDown2(this.extraLinesUnderPrompt);
280757
+ output += clearContent ? import_ansi_escapes3.default.eraseLines(this.height) : `
280758
+ `;
280759
+ output += import_ansi_escapes3.default.cursorShow;
280760
+ this.write(output);
280761
+ this.rl.close();
280762
+ }
280763
+ }
280764
+
280765
+ // ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/promise-polyfill.js
280766
+ class PromisePolyfill2 extends Promise {
280767
+ static withResolver() {
280768
+ let resolve6;
280769
+ let reject;
280770
+ const promise = new Promise((res, rej) => {
280771
+ resolve6 = res;
280772
+ reject = rej;
280773
+ });
280774
+ return { promise, resolve: resolve6, reject };
280775
+ }
280776
+ }
280777
+
280778
+ // ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
280779
+ function getCallSites2() {
280780
+ const _prepareStackTrace = Error.prepareStackTrace;
280781
+ try {
280782
+ let result = [];
280783
+ Error.prepareStackTrace = (_5, callSites) => {
280784
+ const callSitesWithoutCurrent = callSites.slice(1);
280785
+ result = callSitesWithoutCurrent;
280786
+ return callSitesWithoutCurrent;
280787
+ };
280788
+ new Error().stack;
280789
+ return result;
280790
+ } finally {
280791
+ Error.prepareStackTrace = _prepareStackTrace;
280792
+ }
280793
+ }
280794
+ function createPrompt2(view) {
280795
+ const callSites = getCallSites2();
280796
+ const callerFilename = callSites[1]?.getFileName?.();
280797
+ const prompt = (config3, context = {}) => {
280798
+ const { input = process.stdin, signal } = context;
280799
+ const cleanups = new Set;
280800
+ const output = new import_mute_stream2.default;
280801
+ output.pipe(context.output ?? process.stdout);
280802
+ const rl = readline4.createInterface({
280803
+ terminal: true,
280804
+ input,
280805
+ output
280806
+ });
280807
+ const screen = new ScreenManager2(rl);
280808
+ const { promise, resolve: resolve6, reject } = PromisePolyfill2.withResolver();
280809
+ const cancel3 = () => reject(new CancelPromptError2);
280810
+ if (signal) {
280811
+ const abort = () => reject(new AbortPromptError2({ cause: signal.reason }));
280812
+ if (signal.aborted) {
280813
+ abort();
280814
+ return Object.assign(promise, { cancel: cancel3 });
280815
+ }
280816
+ signal.addEventListener("abort", abort);
280817
+ cleanups.add(() => signal.removeEventListener("abort", abort));
280818
+ }
280819
+ cleanups.add(onExit((code2, signal2) => {
280820
+ reject(new ExitPromptError2(`User force closed the prompt with ${code2} ${signal2}`));
280821
+ }));
280822
+ const checkCursorPos = () => screen.checkCursorPos();
280823
+ rl.input.on("keypress", checkCursorPos);
280824
+ cleanups.add(() => rl.input.removeListener("keypress", checkCursorPos));
280825
+ return withHooks2(rl, (cycle) => {
280826
+ const hooksCleanup = AsyncResource6.bind(() => effectScheduler2.clearAll());
280827
+ rl.on("close", hooksCleanup);
280828
+ cleanups.add(() => rl.removeListener("close", hooksCleanup));
280829
+ cycle(() => {
280830
+ try {
280831
+ const nextView = view(config3, (value4) => {
280832
+ setImmediate(() => resolve6(value4));
280833
+ });
280834
+ if (nextView === undefined) {
280835
+ throw new Error(`Prompt functions must return a string.
280836
+ at ${callerFilename}`);
280837
+ }
280838
+ const [content, bottomContent] = typeof nextView === "string" ? [nextView] : nextView;
280839
+ screen.render(content, bottomContent);
280840
+ effectScheduler2.run();
280841
+ } catch (error5) {
280842
+ reject(error5);
280843
+ }
280844
+ });
280845
+ return Object.assign(promise.then((answer) => {
280846
+ effectScheduler2.clearAll();
280847
+ return answer;
280848
+ }, (error5) => {
280849
+ effectScheduler2.clearAll();
280850
+ throw error5;
280851
+ }).finally(() => {
280852
+ cleanups.forEach((cleanup) => cleanup());
280853
+ screen.done({ clearContent: Boolean(context.clearPromptOnDone) });
280854
+ output.end();
280855
+ }).then(() => promise), { cancel: cancel3 });
280856
+ });
280857
+ };
280858
+ return prompt;
280859
+ }
280861
280860
  // ../../node_modules/@inquirer/password/dist/esm/index.js
280862
280861
  var import_ansi_escapes4 = __toESM(require_ansi_escapes(), 1);
280863
- var esm_default5 = createPrompt((config3, done) => {
280862
+ var esm_default5 = createPrompt2((config3, done) => {
280864
280863
  const { validate: validate3 = () => true } = config3;
280865
- const theme = makeTheme(config3.theme);
280866
- const [status, setStatus] = useState("idle");
280867
- const [errorMsg, setError] = useState();
280868
- const [value4, setValue] = useState("");
280869
- const prefix = usePrefix({ status, theme });
280870
- useKeypress(async (key3, rl) => {
280864
+ const theme = makeTheme2(config3.theme);
280865
+ const [status, setStatus] = useState2("idle");
280866
+ const [errorMsg, setError] = useState2();
280867
+ const [value4, setValue] = useState2("");
280868
+ const prefix = usePrefix2({ status, theme });
280869
+ useKeypress2(async (key3, rl) => {
280871
280870
  if (status !== "idle") {
280872
280871
  return;
280873
280872
  }
280874
- if (isEnterKey(key3)) {
280873
+ if (isEnterKey2(key3)) {
280875
280874
  const answer = value4;
280876
280875
  setStatus("loading");
280877
280876
  const isValid2 = await validate3(answer);
@@ -286128,4 +286127,4 @@ async function sdkCliCommand(argv = process.argv) {
286128
286127
  // src/cli.ts
286129
286128
  sdkCliCommand();
286130
286129
 
286131
- //# debugId=AB4F601201279F4164756E2164756E21
286130
+ //# debugId=AC97D011878A6A4664756E2164756E21