@settlemint/sdk-cli 1.2.2-pr549e8ff1 → 1.2.2-pr66ec0d91

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 +688 -687
  2. package/dist/cli.js.map +18 -18
  3. package/package.json +5 -5
package/dist/cli.js CHANGED
@@ -14507,8 +14507,8 @@ var require_printLocation = __commonJS((exports) => {
14507
14507
  const columnNum = sourceLocation.column + columnOffset;
14508
14508
  const locationStr = `${source.name}:${lineNum}:${columnNum}
14509
14509
  `;
14510
- const lines2 = body.split(/\r\n|[\n\r]/g);
14511
- const locationLine = lines2[lineIndex];
14510
+ const lines = body.split(/\r\n|[\n\r]/g);
14511
+ const locationLine = lines[lineIndex];
14512
14512
  if (locationLine.length > 120) {
14513
14513
  const subLineIndex = Math.floor(columnNum / 80);
14514
14514
  const subLineColumnNum = columnNum % 80;
@@ -14524,14 +14524,14 @@ var require_printLocation = __commonJS((exports) => {
14524
14524
  ]);
14525
14525
  }
14526
14526
  return locationStr + printPrefixedLines([
14527
- [`${lineNum - 1} |`, lines2[lineIndex - 1]],
14527
+ [`${lineNum - 1} |`, lines[lineIndex - 1]],
14528
14528
  [`${lineNum} |`, locationLine],
14529
14529
  ["|", "^".padStart(columnNum)],
14530
- [`${lineNum + 1} |`, lines2[lineIndex + 1]]
14530
+ [`${lineNum + 1} |`, lines[lineIndex + 1]]
14531
14531
  ]);
14532
14532
  }
14533
- function printPrefixedLines(lines2) {
14534
- const existingLines = lines2.filter(([_, line]) => line !== undefined);
14533
+ function printPrefixedLines(lines) {
14534
+ const existingLines = lines.filter(([_, line]) => line !== undefined);
14535
14535
  const padLen = Math.max(...existingLines.map(([prefix]) => prefix.length));
14536
14536
  return existingLines.map(([prefix, line]) => prefix.padStart(padLen) + (line ? " " + line : "")).join(`
14537
14537
  `);
@@ -14944,14 +14944,14 @@ var require_blockString = __commonJS((exports) => {
14944
14944
  exports.isPrintableAsBlockString = isPrintableAsBlockString;
14945
14945
  exports.printBlockString = printBlockString;
14946
14946
  var _characterClasses = require_characterClasses();
14947
- function dedentBlockStringLines(lines2) {
14947
+ function dedentBlockStringLines(lines) {
14948
14948
  var _firstNonEmptyLine2;
14949
14949
  let commonIndent = Number.MAX_SAFE_INTEGER;
14950
14950
  let firstNonEmptyLine = null;
14951
14951
  let lastNonEmptyLine = -1;
14952
- for (let i = 0;i < lines2.length; ++i) {
14952
+ for (let i = 0;i < lines.length; ++i) {
14953
14953
  var _firstNonEmptyLine;
14954
- const line = lines2[i];
14954
+ const line = lines[i];
14955
14955
  const indent = leadingWhitespace(line);
14956
14956
  if (indent === line.length) {
14957
14957
  continue;
@@ -14962,7 +14962,7 @@ var require_blockString = __commonJS((exports) => {
14962
14962
  commonIndent = indent;
14963
14963
  }
14964
14964
  }
14965
- return lines2.map((line, i) => i === 0 ? line : line.slice(commonIndent)).slice((_firstNonEmptyLine2 = firstNonEmptyLine) !== null && _firstNonEmptyLine2 !== undefined ? _firstNonEmptyLine2 : 0, lastNonEmptyLine + 1);
14965
+ return lines.map((line, i) => i === 0 ? line : line.slice(commonIndent)).slice((_firstNonEmptyLine2 = firstNonEmptyLine) !== null && _firstNonEmptyLine2 !== undefined ? _firstNonEmptyLine2 : 0, lastNonEmptyLine + 1);
14966
14966
  }
14967
14967
  function leadingWhitespace(str) {
14968
14968
  let i = 0;
@@ -15024,9 +15024,9 @@ var require_blockString = __commonJS((exports) => {
15024
15024
  }
15025
15025
  function printBlockString(value, options) {
15026
15026
  const escapedValue = value.replace(/"""/g, '\\"""');
15027
- const lines2 = escapedValue.split(/\r\n|[\n\r]/g);
15028
- const isSingleLine = lines2.length === 1;
15029
- const forceLeadingNewLine = lines2.length > 1 && lines2.slice(1).every((line) => line.length === 0 || (0, _characterClasses.isWhiteSpace)(line.charCodeAt(0)));
15027
+ const lines = escapedValue.split(/\r\n|[\n\r]/g);
15028
+ const isSingleLine = lines.length === 1;
15029
+ const forceLeadingNewLine = lines.length > 1 && lines.slice(1).every((line) => line.length === 0 || (0, _characterClasses.isWhiteSpace)(line.charCodeAt(0)));
15030
15030
  const hasTrailingTripleQuotes = escapedValue.endsWith('\\"""');
15031
15031
  const hasTrailingQuote = value.endsWith('"') && !hasTrailingTripleQuotes;
15032
15032
  const hasTrailingSlash = value.endsWith("\\");
@@ -34067,9 +34067,9 @@ var require_commonjs4 = __commonJS((exports) => {
34067
34067
  this.#resolveCache = new ResolveCache2;
34068
34068
  this.#resolvePosixCache = new ResolveCache2;
34069
34069
  this.#children = new ChildrenCache2(childrenCacheSize);
34070
- const split2 = cwdPath.substring(this.rootPath.length).split(sep2);
34071
- if (split2.length === 1 && !split2[0]) {
34072
- split2.pop();
34070
+ const split = cwdPath.substring(this.rootPath.length).split(sep2);
34071
+ if (split.length === 1 && !split[0]) {
34072
+ split.pop();
34073
34073
  }
34074
34074
  if (nocase === undefined) {
34075
34075
  throw new TypeError("must provide nocase setting to PathScurryBase ctor");
@@ -34078,11 +34078,11 @@ var require_commonjs4 = __commonJS((exports) => {
34078
34078
  this.root = this.newRoot(this.#fs);
34079
34079
  this.roots[this.rootPath] = this.root;
34080
34080
  let prev = this.root;
34081
- let len = split2.length - 1;
34081
+ let len = split.length - 1;
34082
34082
  const joinSep = pathImpl.sep;
34083
34083
  let abs = this.rootPath;
34084
34084
  let sawFirst = false;
34085
- for (const part of split2) {
34085
+ for (const part of split) {
34086
34086
  const l = len--;
34087
34087
  prev = prev.child(part, {
34088
34088
  relative: new Array(l).fill("..").join(joinSep),
@@ -36533,9 +36533,9 @@ var require_ini = __commonJS((exports, module) => {
36533
36533
  let p = out;
36534
36534
  let section = null;
36535
36535
  const re = /^\[([^\]]*)\]\s*$|^([^=]+)(=(.*))?$/i;
36536
- const lines2 = str.split(/[\r\n]+/g);
36536
+ const lines = str.split(/[\r\n]+/g);
36537
36537
  const duplicates = {};
36538
- for (const line of lines2) {
36538
+ for (const line of lines) {
36539
36539
  if (!line || line.match(/^\s*[;#]/) || line.match(/^\s*$/)) {
36540
36540
  continue;
36541
36541
  }
@@ -38088,7 +38088,7 @@ var require_semver2 = __commonJS((exports, module) => {
38088
38088
  // ../../node_modules/@npmcli/git/lib/lines-to-revs.js
38089
38089
  var require_lines_to_revs = __commonJS((exports, module) => {
38090
38090
  var semver = require_semver2();
38091
- module.exports = (lines2) => finish(lines2.reduce(linesToRevsReducer, {
38091
+ module.exports = (lines) => finish(lines.reduce(linesToRevsReducer, {
38092
38092
  versions: {},
38093
38093
  "dist-tags": {},
38094
38094
  refs: {},
@@ -38149,12 +38149,12 @@ var require_lines_to_revs = __commonJS((exports, module) => {
38149
38149
  return "other";
38150
38150
  };
38151
38151
  var lineToRevDoc = (line) => {
38152
- const split2 = line.trim().split(/\s+/, 2);
38153
- if (split2.length < 2) {
38152
+ const split = line.trim().split(/\s+/, 2);
38153
+ if (split.length < 2) {
38154
38154
  return null;
38155
38155
  }
38156
- const sha = split2[0].trim();
38157
- const rawRef = split2[1].trim();
38156
+ const sha = split[0].trim();
38157
+ const rawRef = split[1].trim();
38158
38158
  const type2 = refType(rawRef);
38159
38159
  if (type2 === "tag") {
38160
38160
  const ref = rawRef.slice("refs/tags/".length);
@@ -40715,17 +40715,17 @@ var require_normalize_data = __commonJS((exports, module) => {
40715
40715
  };
40716
40716
  var isEmail = (str) => str.includes("@") && str.indexOf("@") < str.lastIndexOf(".");
40717
40717
  function extractDescription(description) {
40718
- const lines2 = description.trim().split(`
40718
+ const lines = description.trim().split(`
40719
40719
  `);
40720
40720
  let start = 0;
40721
- while (lines2[start]?.trim().match(/^(#|$)/)) {
40721
+ while (lines[start]?.trim().match(/^(#|$)/)) {
40722
40722
  start++;
40723
40723
  }
40724
40724
  let end = start + 1;
40725
- while (end < lines2.length && lines2[end].trim()) {
40725
+ while (end < lines.length && lines[end].trim()) {
40726
40726
  end++;
40727
40727
  }
40728
- return lines2.slice(start, end).join(" ").trim();
40728
+ return lines.slice(start, end).join(" ").trim();
40729
40729
  }
40730
40730
  function stringifyPerson(person) {
40731
40731
  if (typeof person !== "string") {
@@ -59422,9 +59422,9 @@ ${lanes.join(`
59422
59422
  return node.kind === 183 || node.kind === 233;
59423
59423
  }
59424
59424
  var MAX_SMI_X86 = 1073741823;
59425
- function guessIndentation(lines2) {
59425
+ function guessIndentation(lines) {
59426
59426
  let indentation = MAX_SMI_X86;
59427
- for (const line of lines2) {
59427
+ for (const line of lines) {
59428
59428
  if (!line.length) {
59429
59429
  continue;
59430
59430
  }
@@ -147975,8 +147975,8 @@ ${lanes.join(`
147975
147975
  if (node.comment) {
147976
147976
  const text = getTextOfJSDocComment(node.comment);
147977
147977
  if (text) {
147978
- const lines2 = text.split(/\r\n?|\n/);
147979
- for (const line of lines2) {
147978
+ const lines = text.split(/\r\n?|\n/);
147979
+ for (const line of lines) {
147980
147980
  writeLine();
147981
147981
  writeSpace();
147982
147982
  writePunctuation("*");
@@ -148620,9 +148620,9 @@ ${lanes.join(`
148620
148620
  if (getEmitFlags(parentNode) & 1) {
148621
148621
  writeSpace();
148622
148622
  } else if (preserveSourceNewlines) {
148623
- const lines2 = getLinesBetweenNodes(parentNode, prevChildNode, nextChildNode);
148624
- if (lines2) {
148625
- writeLine(lines2);
148623
+ const lines = getLinesBetweenNodes(parentNode, prevChildNode, nextChildNode);
148624
+ if (lines) {
148625
+ writeLine(lines);
148626
148626
  } else {
148627
148627
  writeSpace();
148628
148628
  }
@@ -148631,9 +148631,9 @@ ${lanes.join(`
148631
148631
  }
148632
148632
  }
148633
148633
  function writeLines(text) {
148634
- const lines2 = text.split(/\r\n?|\n/);
148635
- const indentation = guessIndentation(lines2);
148636
- for (const lineText of lines2) {
148634
+ const lines = text.split(/\r\n?|\n/);
148635
+ const indentation = guessIndentation(lines);
148636
+ for (const lineText of lines) {
148637
148637
  const line = indentation ? lineText.slice(indentation) : lineText;
148638
148638
  if (line.length) {
148639
148639
  writeLine();
@@ -148731,11 +148731,11 @@ ${lanes.join(`
148731
148731
  }
148732
148732
  function getEffectiveLines(getLineDifference) {
148733
148733
  Debug.assert(!!preserveSourceNewlines);
148734
- const lines2 = getLineDifference(true);
148735
- if (lines2 === 0) {
148734
+ const lines = getLineDifference(true);
148735
+ if (lines === 0) {
148736
148736
  return getLineDifference(false);
148737
148737
  }
148738
- return lines2;
148738
+ return lines;
148739
148739
  }
148740
148740
  function writeLineSeparatorsAndIndentBefore(node, parent2) {
148741
148741
  const leadingNewlines = preserveSourceNewlines && getLeadingLineTerminatorCount(parent2, node, 0);
@@ -159021,7 +159021,7 @@ ${lanes.join(`
159021
159021
  function generateOptionOutput(sys2, option, rightAlignOfLeft, leftAlignOfRight) {
159022
159022
  var _a;
159023
159023
  const text = [];
159024
- const colors3 = createColors(sys2);
159024
+ const colors2 = createColors(sys2);
159025
159025
  const name2 = getDisplayNameTextOfOption(option);
159026
159026
  const valueCandidates = getValueCandidate(option);
159027
159027
  const defaultValueDescription = typeof option.defaultValueDescription === "object" ? getDiagnosticText(option.defaultValueDescription) : formatDefaultValue(option.defaultValueDescription, option.type === "list" || option.type === "listOrElement" ? option.element.type : option.type);
@@ -159042,7 +159042,7 @@ ${lanes.join(`
159042
159042
  }
159043
159043
  text.push(sys2.newLine);
159044
159044
  } else {
159045
- text.push(colors3.blue(name2), sys2.newLine);
159045
+ text.push(colors2.blue(name2), sys2.newLine);
159046
159046
  if (option.description) {
159047
159047
  const description3 = getDiagnosticText(option.description);
159048
159048
  text.push(description3);
@@ -159087,7 +159087,7 @@ ${lanes.join(`
159087
159087
  if (isFirstLine) {
159088
159088
  curLeft = left.padStart(rightAlignOfLeft2);
159089
159089
  curLeft = curLeft.padEnd(leftAlignOfRight2);
159090
- curLeft = colorLeft ? colors3.blue(curLeft) : curLeft;
159090
+ curLeft = colorLeft ? colors2.blue(curLeft) : curLeft;
159091
159091
  } else {
159092
159092
  curLeft = "".padStart(leftAlignOfRight2);
159093
159093
  }
@@ -159156,15 +159156,15 @@ ${lanes.join(`
159156
159156
  }
159157
159157
  const rightAlignOfLeftPart = maxLength2 + 2;
159158
159158
  const leftAlignOfRightPart = rightAlignOfLeftPart + 2;
159159
- let lines2 = [];
159159
+ let lines = [];
159160
159160
  for (const option of optionsList) {
159161
159161
  const tmp = generateOptionOutput(sys2, option, rightAlignOfLeftPart, leftAlignOfRightPart);
159162
- lines2 = [...lines2, ...tmp];
159162
+ lines = [...lines, ...tmp];
159163
159163
  }
159164
- if (lines2[lines2.length - 2] !== sys2.newLine) {
159165
- lines2.push(sys2.newLine);
159164
+ if (lines[lines.length - 2] !== sys2.newLine) {
159165
+ lines.push(sys2.newLine);
159166
159166
  }
159167
- return lines2;
159167
+ return lines;
159168
159168
  }
159169
159169
  function generateSectionOptionsOutput(sys2, sectionName, options, subCategory, beforeOptionsDescription, afterOptionsDescription) {
159170
159170
  let res = [];
@@ -159199,9 +159199,9 @@ ${lanes.join(`
159199
159199
  return res;
159200
159200
  }
159201
159201
  function printEasyHelp(sys2, simpleOptions) {
159202
- const colors3 = createColors(sys2);
159202
+ const colors2 = createColors(sys2);
159203
159203
  let output = [...getHeader(sys2, `${getDiagnosticText(Diagnostics.tsc_Colon_The_TypeScript_Compiler)} - ${getDiagnosticText(Diagnostics.Version_0, version)}`)];
159204
- output.push(colors3.bold(getDiagnosticText(Diagnostics.COMMON_COMMANDS)) + sys2.newLine + sys2.newLine);
159204
+ output.push(colors2.bold(getDiagnosticText(Diagnostics.COMMON_COMMANDS)) + sys2.newLine + sys2.newLine);
159205
159205
  example("tsc", Diagnostics.Compiles_the_current_project_tsconfig_json_in_the_working_directory);
159206
159206
  example("tsc app.ts util.ts", Diagnostics.Ignoring_tsconfig_json_compiles_the_specified_files_with_default_compiler_options);
159207
159207
  example("tsc -b", Diagnostics.Build_a_composite_project_in_the_working_directory);
@@ -159222,7 +159222,7 @@ ${lanes.join(`
159222
159222
  function example(ex, desc) {
159223
159223
  const examples = typeof ex === "string" ? [ex] : ex;
159224
159224
  for (const example2 of examples) {
159225
- output.push(" " + colors3.blue(example2) + sys2.newLine);
159225
+ output.push(" " + colors2.blue(example2) + sys2.newLine);
159226
159226
  }
159227
159227
  output.push(" " + getDiagnosticText(desc) + sys2.newLine + sys2.newLine);
159228
159228
  }
@@ -159245,12 +159245,12 @@ ${lanes.join(`
159245
159245
  }
159246
159246
  function getHeader(sys2, message) {
159247
159247
  var _a;
159248
- const colors3 = createColors(sys2);
159248
+ const colors2 = createColors(sys2);
159249
159249
  const header = [];
159250
159250
  const terminalWidth = ((_a = sys2.getWidthOfTerminal) == null ? undefined : _a.call(sys2)) ?? 0;
159251
159251
  const tsIconLength = 5;
159252
- const tsIconFirstLine = colors3.blueBackground("".padStart(tsIconLength));
159253
- const tsIconSecondLine = colors3.blueBackground(colors3.brightWhite("TS ".padStart(tsIconLength)));
159252
+ const tsIconFirstLine = colors2.blueBackground("".padStart(tsIconLength));
159253
+ const tsIconSecondLine = colors2.blueBackground(colors2.brightWhite("TS ".padStart(tsIconLength)));
159254
159254
  if (terminalWidth >= message.length + tsIconLength) {
159255
159255
  const rightAlign = terminalWidth > 120 ? 120 : terminalWidth;
159256
159256
  const leftAlign = rightAlign - tsIconLength;
@@ -210956,9 +210956,9 @@ Additional information: BADCLIENT: Bad error code, ${badCode} not found in range
210956
210956
  insertedText = this.initialText + this.trailingText;
210957
210957
  }
210958
210958
  const lm = LineIndex.linesFromText(insertedText);
210959
- const lines2 = lm.lines;
210960
- if (lines2.length > 1 && lines2[lines2.length - 1] === "") {
210961
- lines2.pop();
210959
+ const lines = lm.lines;
210960
+ if (lines.length > 1 && lines[lines.length - 1] === "") {
210961
+ lines.pop();
210962
210962
  }
210963
210963
  let branchParent;
210964
210964
  let lastZeroCount;
@@ -210977,13 +210977,13 @@ Additional information: BADCLIENT: Bad error code, ${badCode} not found in range
210977
210977
  branchParent.remove(lastZeroCount);
210978
210978
  }
210979
210979
  const leafNode = this.startPath[this.startPath.length - 1];
210980
- if (lines2.length > 0) {
210981
- leafNode.text = lines2[0];
210982
- if (lines2.length > 1) {
210983
- let insertedNodes = new Array(lines2.length - 1);
210980
+ if (lines.length > 0) {
210981
+ leafNode.text = lines[0];
210982
+ if (lines.length > 1) {
210983
+ let insertedNodes = new Array(lines.length - 1);
210984
210984
  let startNode2 = leafNode;
210985
- for (let i2 = 1;i2 < lines2.length; i2++) {
210986
- insertedNodes[i2 - 1] = new LineLeaf(lines2[i2]);
210985
+ for (let i2 = 1;i2 < lines.length; i2++) {
210986
+ insertedNodes[i2 - 1] = new LineLeaf(lines[i2]);
210987
210987
  }
210988
210988
  let pathIndex = this.startPath.length - 2;
210989
210989
  while (pathIndex >= 0) {
@@ -211253,11 +211253,11 @@ Additional information: BADCLIENT: Bad error code, ${badCode} not found in range
211253
211253
  return { absolutePosition: this.root.charCount(), lineText: undefined };
211254
211254
  }
211255
211255
  }
211256
- load(lines2) {
211257
- if (lines2.length > 0) {
211256
+ load(lines) {
211257
+ if (lines.length > 0) {
211258
211258
  const leaves = [];
211259
- for (let i2 = 0;i2 < lines2.length; i2++) {
211260
- leaves[i2] = new LineLeaf(lines2[i2]);
211259
+ for (let i2 = 0;i2 < lines.length; i2++) {
211260
+ leaves[i2] = new LineLeaf(lines[i2]);
211261
211261
  }
211262
211262
  this.root = _LineIndex.buildTreeFromBottom(leaves);
211263
211263
  } else {
@@ -211360,18 +211360,18 @@ Additional information: BADCLIENT: Bad error code, ${badCode} not found in range
211360
211360
  if (lineMap.length === 0) {
211361
211361
  return { lines: [], lineMap };
211362
211362
  }
211363
- const lines2 = new Array(lineMap.length);
211363
+ const lines = new Array(lineMap.length);
211364
211364
  const lc = lineMap.length - 1;
211365
211365
  for (let lmi = 0;lmi < lc; lmi++) {
211366
- lines2[lmi] = text.substring(lineMap[lmi], lineMap[lmi + 1]);
211366
+ lines[lmi] = text.substring(lineMap[lmi], lineMap[lmi + 1]);
211367
211367
  }
211368
211368
  const endText = text.substring(lineMap[lc]);
211369
211369
  if (endText.length > 0) {
211370
- lines2[lc] = endText;
211370
+ lines[lc] = endText;
211371
211371
  } else {
211372
- lines2.pop();
211372
+ lines.pop();
211373
211373
  }
211374
- return { lines: lines2, lineMap };
211374
+ return { lines, lineMap };
211375
211375
  }
211376
211376
  };
211377
211377
  var LineNode = class _LineNode {
@@ -212442,7 +212442,7 @@ async function* streamBody(e4) {
212442
212442
  }
212443
212443
  }
212444
212444
  }
212445
- async function* split2(e4, r3) {
212445
+ async function* split(e4, r3) {
212446
212446
  var a4 = "";
212447
212447
  var n3;
212448
212448
  for await (var t4 of e4) {
@@ -212476,7 +212476,7 @@ function makeFetchSource(e4, r3, a4) {
212476
212476
  var n5 = "--" + (a6 ? a6[1] : "-");
212477
212477
  var t5 = true;
212478
212478
  var i4;
212479
- for await (var o4 of split2(streamBody(r5), `\r
212479
+ for await (var o4 of split(streamBody(r5), `\r
212480
212480
  ` + n5)) {
212481
212481
  if (t5) {
212482
212482
  t5 = false;
@@ -212509,7 +212509,7 @@ function makeFetchSource(e4, r3, a4) {
212509
212509
  } else if (/text\/event-stream/i.test(o3)) {
212510
212510
  s2 = async function* parseEventStream(e6) {
212511
212511
  var r5;
212512
- for await (var a6 of split2(streamBody(e6), `
212512
+ for await (var a6 of split(streamBody(e6), `
212513
212513
 
212514
212514
  `)) {
212515
212515
  var n5 = a6.match(S);
@@ -259517,7 +259517,7 @@ function pruneCurrentEnv(currentEnv, env2) {
259517
259517
  var package_default = {
259518
259518
  name: "@settlemint/sdk-cli",
259519
259519
  description: "Command-line interface for SettleMint SDK, providing development tools and project management capabilities",
259520
- version: "1.2.2-pr549e8ff1",
259520
+ version: "1.2.2-pr66ec0d91",
259521
259521
  type: "module",
259522
259522
  private: false,
259523
259523
  license: "FSL-1.1-MIT",
@@ -259562,12 +259562,12 @@ var package_default = {
259562
259562
  devDependencies: {
259563
259563
  "@commander-js/extra-typings": "11.1.0",
259564
259564
  commander: "11.1.0",
259565
- "@inquirer/confirm": "5.1.7",
259566
- "@inquirer/input": "4.1.7",
259565
+ "@inquirer/confirm": "5.1.8",
259566
+ "@inquirer/input": "4.1.8",
259567
259567
  "@inquirer/password": "4.0.11",
259568
259568
  "@inquirer/select": "4.0.10",
259569
- "@settlemint/sdk-js": "1.2.2-pr549e8ff1",
259570
- "@settlemint/sdk-utils": "1.2.2-pr549e8ff1",
259569
+ "@settlemint/sdk-js": "1.2.2-pr66ec0d91",
259570
+ "@settlemint/sdk-utils": "1.2.2-pr66ec0d91",
259571
259571
  "@types/node": "22.13.10",
259572
259572
  "@types/semver": "7.5.8",
259573
259573
  "@types/which": "3.0.4",
@@ -259656,10 +259656,7 @@ var {
259656
259656
  } = import__.default;
259657
259657
 
259658
259658
  // ../../node_modules/@inquirer/core/dist/esm/lib/key.js
259659
- var isUpKey = (key) => key.name === "up" || key.name === "k" || key.ctrl && key.name === "p";
259660
- var isDownKey = (key) => key.name === "down" || key.name === "j" || key.ctrl && key.name === "n";
259661
259659
  var isBackspaceKey = (key) => key.name === "backspace";
259662
- var isNumberKey = (key) => "123456789".includes(key.name);
259663
259660
  var isEnterKey = (key) => key.name === "enter" || key.name === "return";
259664
259661
  // ../../node_modules/@inquirer/core/dist/esm/lib/errors.js
259665
259662
  class AbortPromptError extends Error {
@@ -260193,22 +260190,11 @@ function usePrefix({ status = "idle", theme }) {
260193
260190
  const iconName = status === "loading" ? "idle" : status;
260194
260191
  return typeof prefix === "string" ? prefix : prefix[iconName] ?? prefix["idle"];
260195
260192
  }
260196
- // ../../node_modules/@inquirer/core/dist/esm/lib/use-memo.js
260197
- function useMemo(fn, dependencies) {
260198
- return withPointer((pointer) => {
260199
- const prev = pointer.get();
260200
- if (!prev || prev.dependencies.length !== dependencies.length || prev.dependencies.some((dep, i) => dep !== dependencies[i])) {
260201
- const value = fn();
260202
- pointer.set({ value, dependencies });
260203
- return value;
260204
- }
260205
- return prev.value;
260206
- });
260207
- }
260208
260193
  // ../../node_modules/@inquirer/core/dist/esm/lib/use-ref.js
260209
260194
  function useRef(val) {
260210
260195
  return useState({ current: val })[0];
260211
260196
  }
260197
+
260212
260198
  // ../../node_modules/@inquirer/core/dist/esm/lib/use-keypress.js
260213
260199
  function useKeypress(userHandler) {
260214
260200
  const signal = useRef(userHandler);
@@ -260240,95 +260226,6 @@ function readlineWidth() {
260240
260226
  return import_cli_width.default({ defaultWidth: 80, output: readline().output });
260241
260227
  }
260242
260228
 
260243
- // ../../node_modules/@inquirer/core/dist/esm/lib/pagination/lines.js
260244
- function split(content, width) {
260245
- return breakLines(content, width).split(`
260246
- `);
260247
- }
260248
- function rotate(count, items) {
260249
- const max = items.length;
260250
- const offset = (count % max + max) % max;
260251
- return [...items.slice(offset), ...items.slice(0, offset)];
260252
- }
260253
- function lines({ items, width, renderItem, active, position: requested, pageSize }) {
260254
- const layouts = items.map((item, index) => ({
260255
- item,
260256
- index,
260257
- isActive: index === active
260258
- }));
260259
- const layoutsInPage = rotate(active - requested, layouts).slice(0, pageSize);
260260
- const renderItemAt = (index) => layoutsInPage[index] == null ? [] : split(renderItem(layoutsInPage[index]), width);
260261
- const pageBuffer = Array.from({ length: pageSize });
260262
- const activeItem = renderItemAt(requested).slice(0, pageSize);
260263
- const position = requested + activeItem.length <= pageSize ? requested : pageSize - activeItem.length;
260264
- pageBuffer.splice(position, activeItem.length, ...activeItem);
260265
- let bufferPointer = position + activeItem.length;
260266
- let layoutPointer = requested + 1;
260267
- while (bufferPointer < pageSize && layoutPointer < layoutsInPage.length) {
260268
- for (const line of renderItemAt(layoutPointer)) {
260269
- pageBuffer[bufferPointer++] = line;
260270
- if (bufferPointer >= pageSize)
260271
- break;
260272
- }
260273
- layoutPointer++;
260274
- }
260275
- bufferPointer = position - 1;
260276
- layoutPointer = requested - 1;
260277
- while (bufferPointer >= 0 && layoutPointer >= 0) {
260278
- for (const line of renderItemAt(layoutPointer).reverse()) {
260279
- pageBuffer[bufferPointer--] = line;
260280
- if (bufferPointer < 0)
260281
- break;
260282
- }
260283
- layoutPointer--;
260284
- }
260285
- return pageBuffer.filter((line) => typeof line === "string");
260286
- }
260287
-
260288
- // ../../node_modules/@inquirer/core/dist/esm/lib/pagination/position.js
260289
- function finite({ active, pageSize, total }) {
260290
- const middle = Math.floor(pageSize / 2);
260291
- if (total <= pageSize || active < middle)
260292
- return active;
260293
- if (active >= total - middle)
260294
- return active + pageSize - total;
260295
- return middle;
260296
- }
260297
- function infinite({ active, lastActive, total, pageSize, pointer }) {
260298
- if (total <= pageSize)
260299
- return active;
260300
- if (lastActive < active && active - lastActive < pageSize) {
260301
- return Math.min(Math.floor(pageSize / 2), pointer + active - lastActive);
260302
- }
260303
- return pointer;
260304
- }
260305
-
260306
- // ../../node_modules/@inquirer/core/dist/esm/lib/pagination/use-pagination.js
260307
- function usePagination({ items, active, renderItem, pageSize, loop = true }) {
260308
- const state = useRef({ position: 0, lastActive: 0 });
260309
- const position = loop ? infinite({
260310
- active,
260311
- lastActive: state.current.lastActive,
260312
- total: items.length,
260313
- pageSize,
260314
- pointer: state.current.position
260315
- }) : finite({
260316
- active,
260317
- total: items.length,
260318
- pageSize
260319
- });
260320
- state.current.position = position;
260321
- state.current.lastActive = active;
260322
- return lines({
260323
- items,
260324
- width: readlineWidth(),
260325
- renderItem,
260326
- active,
260327
- position,
260328
- pageSize
260329
- }).join(`
260330
- `);
260331
- }
260332
260229
  // ../../node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
260333
260230
  var import_mute_stream = __toESM(require_lib(), 1);
260334
260231
  import * as readline2 from "node:readline";
@@ -260708,20 +260605,6 @@ function createPrompt(view) {
260708
260605
  };
260709
260606
  return prompt;
260710
260607
  }
260711
- // ../../node_modules/@inquirer/core/dist/esm/lib/Separator.js
260712
- var import_yoctocolors_cjs2 = __toESM(require_yoctocolors_cjs(), 1);
260713
- class Separator {
260714
- separator = import_yoctocolors_cjs2.default.dim(Array.from({ length: 15 }).join(esm_default.line));
260715
- type = "separator";
260716
- constructor(separator) {
260717
- if (separator) {
260718
- this.separator = separator;
260719
- }
260720
- }
260721
- static isSeparator(choice) {
260722
- return Boolean(choice && typeof choice === "object" && "type" in choice && choice.type === "separator");
260723
- }
260724
- }
260725
260608
  // ../utils/dist/terminal.mjs
260726
260609
  import { spawn } from "node:child_process";
260727
260610
  var import_console_table_printer2 = __toESM(require_dist2(), 1);
@@ -265126,14 +265009,585 @@ async function subgraphNamePrompt({
265126
265009
  return sanitizeName(subgraphName);
265127
265010
  }
265128
265011
 
265129
- // ../../node_modules/@inquirer/select/dist/esm/index.js
265130
- var import_yoctocolors_cjs3 = __toESM(require_yoctocolors_cjs(), 1);
265012
+ // ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/key.js
265013
+ var isUpKey = (key2) => key2.name === "up" || key2.name === "k" || key2.ctrl && key2.name === "p";
265014
+ var isDownKey = (key2) => key2.name === "down" || key2.name === "j" || key2.ctrl && key2.name === "n";
265015
+ var isBackspaceKey2 = (key2) => key2.name === "backspace";
265016
+ var isNumberKey = (key2) => "123456789".includes(key2.name);
265017
+ var isEnterKey2 = (key2) => key2.name === "enter" || key2.name === "return";
265018
+ // ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/errors.js
265019
+ class AbortPromptError2 extends Error {
265020
+ name = "AbortPromptError";
265021
+ message = "Prompt was aborted";
265022
+ constructor(options) {
265023
+ super();
265024
+ this.cause = options?.cause;
265025
+ }
265026
+ }
265027
+
265028
+ class CancelPromptError2 extends Error {
265029
+ name = "CancelPromptError";
265030
+ message = "Prompt was canceled";
265031
+ }
265032
+
265033
+ class ExitPromptError2 extends Error {
265034
+ name = "ExitPromptError";
265035
+ }
265036
+
265037
+ class HookError2 extends Error {
265038
+ name = "HookError";
265039
+ }
265040
+
265041
+ class ValidationError2 extends Error {
265042
+ name = "ValidationError";
265043
+ }
265044
+ // ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/use-prefix.js
265045
+ import { AsyncResource as AsyncResource5 } from "node:async_hooks";
265046
+
265047
+ // ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/hook-engine.js
265048
+ import { AsyncLocalStorage as AsyncLocalStorage2, AsyncResource as AsyncResource4 } from "node:async_hooks";
265049
+ var hookStorage2 = new AsyncLocalStorage2;
265050
+ function createStore2(rl) {
265051
+ const store = {
265052
+ rl,
265053
+ hooks: [],
265054
+ hooksCleanup: [],
265055
+ hooksEffect: [],
265056
+ index: 0,
265057
+ handleChange() {}
265058
+ };
265059
+ return store;
265060
+ }
265061
+ function withHooks2(rl, cb) {
265062
+ const store = createStore2(rl);
265063
+ return hookStorage2.run(store, () => {
265064
+ function cycle(render) {
265065
+ store.handleChange = () => {
265066
+ store.index = 0;
265067
+ render();
265068
+ };
265069
+ store.handleChange();
265070
+ }
265071
+ return cb(cycle);
265072
+ });
265073
+ }
265074
+ function getStore2() {
265075
+ const store = hookStorage2.getStore();
265076
+ if (!store) {
265077
+ throw new HookError2("[Inquirer] Hook functions can only be called from within a prompt");
265078
+ }
265079
+ return store;
265080
+ }
265081
+ function readline3() {
265082
+ return getStore2().rl;
265083
+ }
265084
+ function withUpdates2(fn) {
265085
+ const wrapped = (...args) => {
265086
+ const store = getStore2();
265087
+ let shouldUpdate = false;
265088
+ const oldHandleChange = store.handleChange;
265089
+ store.handleChange = () => {
265090
+ shouldUpdate = true;
265091
+ };
265092
+ const returnValue = fn(...args);
265093
+ if (shouldUpdate) {
265094
+ oldHandleChange();
265095
+ }
265096
+ store.handleChange = oldHandleChange;
265097
+ return returnValue;
265098
+ };
265099
+ return AsyncResource4.bind(wrapped);
265100
+ }
265101
+ function withPointer2(cb) {
265102
+ const store = getStore2();
265103
+ const { index } = store;
265104
+ const pointer = {
265105
+ get() {
265106
+ return store.hooks[index];
265107
+ },
265108
+ set(value4) {
265109
+ store.hooks[index] = value4;
265110
+ },
265111
+ initialized: index in store.hooks
265112
+ };
265113
+ const returnValue = cb(pointer);
265114
+ store.index++;
265115
+ return returnValue;
265116
+ }
265117
+ function handleChange2() {
265118
+ getStore2().handleChange();
265119
+ }
265120
+ var effectScheduler2 = {
265121
+ queue(cb) {
265122
+ const store = getStore2();
265123
+ const { index } = store;
265124
+ store.hooksEffect.push(() => {
265125
+ store.hooksCleanup[index]?.();
265126
+ const cleanFn = cb(readline3());
265127
+ if (cleanFn != null && typeof cleanFn !== "function") {
265128
+ throw new ValidationError2("useEffect return value must be a cleanup function or nothing.");
265129
+ }
265130
+ store.hooksCleanup[index] = cleanFn;
265131
+ });
265132
+ },
265133
+ run() {
265134
+ const store = getStore2();
265135
+ withUpdates2(() => {
265136
+ store.hooksEffect.forEach((effect) => {
265137
+ effect();
265138
+ });
265139
+ store.hooksEffect.length = 0;
265140
+ })();
265141
+ },
265142
+ clearAll() {
265143
+ const store = getStore2();
265144
+ store.hooksCleanup.forEach((cleanFn) => {
265145
+ cleanFn?.();
265146
+ });
265147
+ store.hooksEffect.length = 0;
265148
+ store.hooksCleanup.length = 0;
265149
+ }
265150
+ };
265151
+
265152
+ // ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/use-state.js
265153
+ function useState2(defaultValue) {
265154
+ return withPointer2((pointer) => {
265155
+ const setFn = (newValue) => {
265156
+ if (pointer.get() !== newValue) {
265157
+ pointer.set(newValue);
265158
+ handleChange2();
265159
+ }
265160
+ };
265161
+ if (pointer.initialized) {
265162
+ return [pointer.get(), setFn];
265163
+ }
265164
+ const value4 = typeof defaultValue === "function" ? defaultValue() : defaultValue;
265165
+ pointer.set(value4);
265166
+ return [value4, setFn];
265167
+ });
265168
+ }
265169
+
265170
+ // ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/use-effect.js
265171
+ function useEffect2(cb, depArray) {
265172
+ withPointer2((pointer) => {
265173
+ const oldDeps = pointer.get();
265174
+ const hasChanged = !Array.isArray(oldDeps) || depArray.some((dep, i6) => !Object.is(dep, oldDeps[i6]));
265175
+ if (hasChanged) {
265176
+ effectScheduler2.queue(cb);
265177
+ }
265178
+ pointer.set(depArray);
265179
+ });
265180
+ }
265181
+
265182
+ // ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/theme.js
265183
+ var import_yoctocolors_cjs2 = __toESM(require_yoctocolors_cjs(), 1);
265184
+ var defaultTheme2 = {
265185
+ prefix: {
265186
+ idle: import_yoctocolors_cjs2.default.blue("?"),
265187
+ done: import_yoctocolors_cjs2.default.green(esm_default.tick)
265188
+ },
265189
+ spinner: {
265190
+ interval: 80,
265191
+ frames: ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"].map((frame) => import_yoctocolors_cjs2.default.yellow(frame))
265192
+ },
265193
+ style: {
265194
+ answer: import_yoctocolors_cjs2.default.cyan,
265195
+ message: import_yoctocolors_cjs2.default.bold,
265196
+ error: (text2) => import_yoctocolors_cjs2.default.red(`> ${text2}`),
265197
+ defaultAnswer: (text2) => import_yoctocolors_cjs2.default.dim(`(${text2})`),
265198
+ help: import_yoctocolors_cjs2.default.dim,
265199
+ highlight: import_yoctocolors_cjs2.default.cyan,
265200
+ key: (text2) => import_yoctocolors_cjs2.default.cyan(import_yoctocolors_cjs2.default.bold(`<${text2}>`))
265201
+ }
265202
+ };
265203
+
265204
+ // ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/make-theme.js
265205
+ function isPlainObject3(value4) {
265206
+ if (typeof value4 !== "object" || value4 === null)
265207
+ return false;
265208
+ let proto = value4;
265209
+ while (Object.getPrototypeOf(proto) !== null) {
265210
+ proto = Object.getPrototypeOf(proto);
265211
+ }
265212
+ return Object.getPrototypeOf(value4) === proto;
265213
+ }
265214
+ function deepMerge3(...objects) {
265215
+ const output = {};
265216
+ for (const obj of objects) {
265217
+ for (const [key2, value4] of Object.entries(obj)) {
265218
+ const prevValue = output[key2];
265219
+ output[key2] = isPlainObject3(prevValue) && isPlainObject3(value4) ? deepMerge3(prevValue, value4) : value4;
265220
+ }
265221
+ }
265222
+ return output;
265223
+ }
265224
+ function makeTheme2(...themes) {
265225
+ const themesToMerge = [
265226
+ defaultTheme2,
265227
+ ...themes.filter((theme) => theme != null)
265228
+ ];
265229
+ return deepMerge3(...themesToMerge);
265230
+ }
265231
+
265232
+ // ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/use-prefix.js
265233
+ function usePrefix2({ status = "idle", theme }) {
265234
+ const [showLoader, setShowLoader] = useState2(false);
265235
+ const [tick, setTick] = useState2(0);
265236
+ const { prefix, spinner: spinner2 } = makeTheme2(theme);
265237
+ useEffect2(() => {
265238
+ if (status === "loading") {
265239
+ let tickInterval;
265240
+ let inc = -1;
265241
+ const delayTimeout = setTimeout(AsyncResource5.bind(() => {
265242
+ setShowLoader(true);
265243
+ tickInterval = setInterval(AsyncResource5.bind(() => {
265244
+ inc = inc + 1;
265245
+ setTick(inc % spinner2.frames.length);
265246
+ }), spinner2.interval);
265247
+ }), 300);
265248
+ return () => {
265249
+ clearTimeout(delayTimeout);
265250
+ clearInterval(tickInterval);
265251
+ };
265252
+ } else {
265253
+ setShowLoader(false);
265254
+ }
265255
+ }, [status]);
265256
+ if (showLoader) {
265257
+ return spinner2.frames[tick];
265258
+ }
265259
+ const iconName = status === "loading" ? "idle" : status;
265260
+ return typeof prefix === "string" ? prefix : prefix[iconName] ?? prefix["idle"];
265261
+ }
265262
+ // ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/use-memo.js
265263
+ function useMemo(fn, dependencies) {
265264
+ return withPointer2((pointer) => {
265265
+ const prev = pointer.get();
265266
+ if (!prev || prev.dependencies.length !== dependencies.length || prev.dependencies.some((dep, i6) => dep !== dependencies[i6])) {
265267
+ const value4 = fn();
265268
+ pointer.set({ value: value4, dependencies });
265269
+ return value4;
265270
+ }
265271
+ return prev.value;
265272
+ });
265273
+ }
265274
+ // ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/use-ref.js
265275
+ function useRef2(val) {
265276
+ return useState2({ current: val })[0];
265277
+ }
265278
+ // ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/use-keypress.js
265279
+ function useKeypress2(userHandler) {
265280
+ const signal = useRef2(userHandler);
265281
+ signal.current = userHandler;
265282
+ useEffect2((rl) => {
265283
+ let ignore = false;
265284
+ const handler = withUpdates2((_input, event) => {
265285
+ if (ignore)
265286
+ return;
265287
+ signal.current(event, rl);
265288
+ });
265289
+ rl.input.on("keypress", handler);
265290
+ return () => {
265291
+ ignore = true;
265292
+ rl.input.removeListener("keypress", handler);
265293
+ };
265294
+ }, []);
265295
+ }
265296
+ // ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/utils.js
265297
+ var import_cli_width2 = __toESM(require_cli_width(), 1);
265298
+ var import_wrap_ansi2 = __toESM(require_wrap_ansi(), 1);
265299
+ function breakLines2(content, width) {
265300
+ return content.split(`
265301
+ `).flatMap((line) => import_wrap_ansi2.default(line, width, { trim: false, hard: true }).split(`
265302
+ `).map((str) => str.trimEnd())).join(`
265303
+ `);
265304
+ }
265305
+ function readlineWidth2() {
265306
+ return import_cli_width2.default({ defaultWidth: 80, output: readline3().output });
265307
+ }
265308
+
265309
+ // ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/pagination/lines.js
265310
+ function split2(content, width) {
265311
+ return breakLines2(content, width).split(`
265312
+ `);
265313
+ }
265314
+ function rotate(count, items) {
265315
+ const max = items.length;
265316
+ const offset = (count % max + max) % max;
265317
+ return [...items.slice(offset), ...items.slice(0, offset)];
265318
+ }
265319
+ function lines({ items, width, renderItem, active, position: requested, pageSize }) {
265320
+ const layouts = items.map((item, index) => ({
265321
+ item,
265322
+ index,
265323
+ isActive: index === active
265324
+ }));
265325
+ const layoutsInPage = rotate(active - requested, layouts).slice(0, pageSize);
265326
+ const renderItemAt = (index) => layoutsInPage[index] == null ? [] : split2(renderItem(layoutsInPage[index]), width);
265327
+ const pageBuffer = Array.from({ length: pageSize });
265328
+ const activeItem = renderItemAt(requested).slice(0, pageSize);
265329
+ const position = requested + activeItem.length <= pageSize ? requested : pageSize - activeItem.length;
265330
+ pageBuffer.splice(position, activeItem.length, ...activeItem);
265331
+ let bufferPointer = position + activeItem.length;
265332
+ let layoutPointer = requested + 1;
265333
+ while (bufferPointer < pageSize && layoutPointer < layoutsInPage.length) {
265334
+ for (const line of renderItemAt(layoutPointer)) {
265335
+ pageBuffer[bufferPointer++] = line;
265336
+ if (bufferPointer >= pageSize)
265337
+ break;
265338
+ }
265339
+ layoutPointer++;
265340
+ }
265341
+ bufferPointer = position - 1;
265342
+ layoutPointer = requested - 1;
265343
+ while (bufferPointer >= 0 && layoutPointer >= 0) {
265344
+ for (const line of renderItemAt(layoutPointer).reverse()) {
265345
+ pageBuffer[bufferPointer--] = line;
265346
+ if (bufferPointer < 0)
265347
+ break;
265348
+ }
265349
+ layoutPointer--;
265350
+ }
265351
+ return pageBuffer.filter((line) => typeof line === "string");
265352
+ }
265353
+
265354
+ // ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/pagination/position.js
265355
+ function finite({ active, pageSize, total }) {
265356
+ const middle = Math.floor(pageSize / 2);
265357
+ if (total <= pageSize || active < middle)
265358
+ return active;
265359
+ if (active >= total - middle)
265360
+ return active + pageSize - total;
265361
+ return middle;
265362
+ }
265363
+ function infinite({ active, lastActive, total, pageSize, pointer }) {
265364
+ if (total <= pageSize)
265365
+ return active;
265366
+ if (lastActive < active && active - lastActive < pageSize) {
265367
+ return Math.min(Math.floor(pageSize / 2), pointer + active - lastActive);
265368
+ }
265369
+ return pointer;
265370
+ }
265371
+
265372
+ // ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/pagination/use-pagination.js
265373
+ function usePagination({ items, active, renderItem, pageSize, loop = true }) {
265374
+ const state = useRef2({ position: 0, lastActive: 0 });
265375
+ const position = loop ? infinite({
265376
+ active,
265377
+ lastActive: state.current.lastActive,
265378
+ total: items.length,
265379
+ pageSize,
265380
+ pointer: state.current.position
265381
+ }) : finite({
265382
+ active,
265383
+ total: items.length,
265384
+ pageSize
265385
+ });
265386
+ state.current.position = position;
265387
+ state.current.lastActive = active;
265388
+ return lines({
265389
+ items,
265390
+ width: readlineWidth2(),
265391
+ renderItem,
265392
+ active,
265393
+ position,
265394
+ pageSize
265395
+ }).join(`
265396
+ `);
265397
+ }
265398
+ // ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
265399
+ var import_mute_stream2 = __toESM(require_lib(), 1);
265400
+ import * as readline4 from "node:readline";
265401
+ import { AsyncResource as AsyncResource6 } from "node:async_hooks";
265402
+
265403
+ // ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/screen-manager.js
265131
265404
  var import_ansi_escapes2 = __toESM(require_ansi_escapes(), 1);
265405
+ import { stripVTControlCharacters as stripVTControlCharacters3 } from "node:util";
265406
+ var height2 = (content) => content.split(`
265407
+ `).length;
265408
+ var lastLine2 = (content) => content.split(`
265409
+ `).pop() ?? "";
265410
+ function cursorDown2(n6) {
265411
+ return n6 > 0 ? import_ansi_escapes2.default.cursorDown(n6) : "";
265412
+ }
265413
+
265414
+ class ScreenManager2 {
265415
+ height = 0;
265416
+ extraLinesUnderPrompt = 0;
265417
+ cursorPos;
265418
+ rl;
265419
+ constructor(rl) {
265420
+ this.rl = rl;
265421
+ this.cursorPos = rl.getCursorPos();
265422
+ }
265423
+ write(content) {
265424
+ this.rl.output.unmute();
265425
+ this.rl.output.write(content);
265426
+ this.rl.output.mute();
265427
+ }
265428
+ render(content, bottomContent = "") {
265429
+ const promptLine = lastLine2(content);
265430
+ const rawPromptLine = stripVTControlCharacters3(promptLine);
265431
+ let prompt = rawPromptLine;
265432
+ if (this.rl.line.length > 0) {
265433
+ prompt = prompt.slice(0, -this.rl.line.length);
265434
+ }
265435
+ this.rl.setPrompt(prompt);
265436
+ this.cursorPos = this.rl.getCursorPos();
265437
+ const width = readlineWidth2();
265438
+ content = breakLines2(content, width);
265439
+ bottomContent = breakLines2(bottomContent, width);
265440
+ if (rawPromptLine.length % width === 0) {
265441
+ content += `
265442
+ `;
265443
+ }
265444
+ let output = content + (bottomContent ? `
265445
+ ` + bottomContent : "");
265446
+ const promptLineUpDiff = Math.floor(rawPromptLine.length / width) - this.cursorPos.rows;
265447
+ const bottomContentHeight = promptLineUpDiff + (bottomContent ? height2(bottomContent) : 0);
265448
+ if (bottomContentHeight > 0)
265449
+ output += import_ansi_escapes2.default.cursorUp(bottomContentHeight);
265450
+ output += import_ansi_escapes2.default.cursorTo(this.cursorPos.cols);
265451
+ this.write(cursorDown2(this.extraLinesUnderPrompt) + import_ansi_escapes2.default.eraseLines(this.height) + output);
265452
+ this.extraLinesUnderPrompt = bottomContentHeight;
265453
+ this.height = height2(output);
265454
+ }
265455
+ checkCursorPos() {
265456
+ const cursorPos = this.rl.getCursorPos();
265457
+ if (cursorPos.cols !== this.cursorPos.cols) {
265458
+ this.write(import_ansi_escapes2.default.cursorTo(cursorPos.cols));
265459
+ this.cursorPos = cursorPos;
265460
+ }
265461
+ }
265462
+ done({ clearContent }) {
265463
+ this.rl.setPrompt("");
265464
+ let output = cursorDown2(this.extraLinesUnderPrompt);
265465
+ output += clearContent ? import_ansi_escapes2.default.eraseLines(this.height) : `
265466
+ `;
265467
+ output += import_ansi_escapes2.default.cursorShow;
265468
+ this.write(output);
265469
+ this.rl.close();
265470
+ }
265471
+ }
265472
+
265473
+ // ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/promise-polyfill.js
265474
+ class PromisePolyfill2 extends Promise {
265475
+ static withResolver() {
265476
+ let resolve5;
265477
+ let reject;
265478
+ const promise = new Promise((res, rej) => {
265479
+ resolve5 = res;
265480
+ reject = rej;
265481
+ });
265482
+ return { promise, resolve: resolve5, reject };
265483
+ }
265484
+ }
265485
+
265486
+ // ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
265487
+ function getCallSites2() {
265488
+ const _prepareStackTrace = Error.prepareStackTrace;
265489
+ let result = [];
265490
+ try {
265491
+ Error.prepareStackTrace = (_5, callSites) => {
265492
+ const callSitesWithoutCurrent = callSites.slice(1);
265493
+ result = callSitesWithoutCurrent;
265494
+ return callSitesWithoutCurrent;
265495
+ };
265496
+ new Error().stack;
265497
+ } catch {
265498
+ return result;
265499
+ }
265500
+ Error.prepareStackTrace = _prepareStackTrace;
265501
+ return result;
265502
+ }
265503
+ function createPrompt2(view) {
265504
+ const callSites = getCallSites2();
265505
+ const prompt = (config3, context = {}) => {
265506
+ const { input = process.stdin, signal } = context;
265507
+ const cleanups = new Set;
265508
+ const output = new import_mute_stream2.default;
265509
+ output.pipe(context.output ?? process.stdout);
265510
+ const rl = readline4.createInterface({
265511
+ terminal: true,
265512
+ input,
265513
+ output
265514
+ });
265515
+ const screen = new ScreenManager2(rl);
265516
+ const { promise, resolve: resolve5, reject } = PromisePolyfill2.withResolver();
265517
+ const cancel3 = () => reject(new CancelPromptError2);
265518
+ if (signal) {
265519
+ const abort = () => reject(new AbortPromptError2({ cause: signal.reason }));
265520
+ if (signal.aborted) {
265521
+ abort();
265522
+ return Object.assign(promise, { cancel: cancel3 });
265523
+ }
265524
+ signal.addEventListener("abort", abort);
265525
+ cleanups.add(() => signal.removeEventListener("abort", abort));
265526
+ }
265527
+ cleanups.add(onExit((code2, signal2) => {
265528
+ reject(new ExitPromptError2(`User force closed the prompt with ${code2} ${signal2}`));
265529
+ }));
265530
+ const checkCursorPos = () => screen.checkCursorPos();
265531
+ rl.input.on("keypress", checkCursorPos);
265532
+ cleanups.add(() => rl.input.removeListener("keypress", checkCursorPos));
265533
+ return withHooks2(rl, (cycle) => {
265534
+ const hooksCleanup = AsyncResource6.bind(() => effectScheduler2.clearAll());
265535
+ rl.on("close", hooksCleanup);
265536
+ cleanups.add(() => rl.removeListener("close", hooksCleanup));
265537
+ cycle(() => {
265538
+ try {
265539
+ const nextView = view(config3, (value4) => {
265540
+ setImmediate(() => resolve5(value4));
265541
+ });
265542
+ if (nextView === undefined) {
265543
+ const callerFilename = callSites[1]?.getFileName?.();
265544
+ throw new Error(`Prompt functions must return a string.
265545
+ at ${callerFilename}`);
265546
+ }
265547
+ const [content, bottomContent] = typeof nextView === "string" ? [nextView] : nextView;
265548
+ screen.render(content, bottomContent);
265549
+ effectScheduler2.run();
265550
+ } catch (error5) {
265551
+ reject(error5);
265552
+ }
265553
+ });
265554
+ return Object.assign(promise.then((answer) => {
265555
+ effectScheduler2.clearAll();
265556
+ return answer;
265557
+ }, (error5) => {
265558
+ effectScheduler2.clearAll();
265559
+ throw error5;
265560
+ }).finally(() => {
265561
+ cleanups.forEach((cleanup) => cleanup());
265562
+ screen.done({ clearContent: Boolean(context.clearPromptOnDone) });
265563
+ output.end();
265564
+ }).then(() => promise), { cancel: cancel3 });
265565
+ });
265566
+ };
265567
+ return prompt;
265568
+ }
265569
+ // ../../node_modules/@inquirer/select/node_modules/@inquirer/core/dist/esm/lib/Separator.js
265570
+ var import_yoctocolors_cjs3 = __toESM(require_yoctocolors_cjs(), 1);
265571
+ class Separator {
265572
+ separator = import_yoctocolors_cjs3.default.dim(Array.from({ length: 15 }).join(esm_default.line));
265573
+ type = "separator";
265574
+ constructor(separator) {
265575
+ if (separator) {
265576
+ this.separator = separator;
265577
+ }
265578
+ }
265579
+ static isSeparator(choice) {
265580
+ return Boolean(choice && typeof choice === "object" && "type" in choice && choice.type === "separator");
265581
+ }
265582
+ }
265583
+ // ../../node_modules/@inquirer/select/dist/esm/index.js
265584
+ var import_yoctocolors_cjs4 = __toESM(require_yoctocolors_cjs(), 1);
265585
+ var import_ansi_escapes3 = __toESM(require_ansi_escapes(), 1);
265132
265586
  var selectTheme = {
265133
265587
  icon: { cursor: esm_default.pointer },
265134
265588
  style: {
265135
- disabled: (text2) => import_yoctocolors_cjs3.default.dim(`- ${text2}`),
265136
- description: (text2) => import_yoctocolors_cjs3.default.cyan(text2)
265589
+ disabled: (text2) => import_yoctocolors_cjs4.default.dim(`- ${text2}`),
265590
+ description: (text2) => import_yoctocolors_cjs4.default.cyan(text2)
265137
265591
  },
265138
265592
  helpMode: "auto"
265139
265593
  };
@@ -265162,19 +265616,19 @@ function normalizeChoices(choices) {
265162
265616
  };
265163
265617
  });
265164
265618
  }
265165
- var esm_default3 = createPrompt((config3, done) => {
265619
+ var esm_default3 = createPrompt2((config3, done) => {
265166
265620
  const { loop = true, pageSize = 7 } = config3;
265167
- const firstRender = useRef(true);
265168
- const theme = makeTheme(selectTheme, config3.theme);
265169
- const [status, setStatus] = useState("idle");
265170
- const prefix = usePrefix({ status, theme });
265171
- const searchTimeoutRef = useRef();
265621
+ const firstRender = useRef2(true);
265622
+ const theme = makeTheme2(selectTheme, config3.theme);
265623
+ const [status, setStatus] = useState2("idle");
265624
+ const prefix = usePrefix2({ status, theme });
265625
+ const searchTimeoutRef = useRef2();
265172
265626
  const items = useMemo(() => normalizeChoices(config3.choices), [config3.choices]);
265173
265627
  const bounds = useMemo(() => {
265174
265628
  const first = items.findIndex(isSelectable);
265175
265629
  const last = items.findLastIndex(isSelectable);
265176
265630
  if (first === -1) {
265177
- throw new ValidationError("[select prompt] No selectable choices. All choices are disabled.");
265631
+ throw new ValidationError2("[select prompt] No selectable choices. All choices are disabled.");
265178
265632
  }
265179
265633
  return { first, last };
265180
265634
  }, [items]);
@@ -265183,31 +265637,31 @@ var esm_default3 = createPrompt((config3, done) => {
265183
265637
  return -1;
265184
265638
  return items.findIndex((item) => isSelectable(item) && item.value === config3.default);
265185
265639
  }, [config3.default, items]);
265186
- const [active, setActive] = useState(defaultItemIndex === -1 ? bounds.first : defaultItemIndex);
265640
+ const [active, setActive] = useState2(defaultItemIndex === -1 ? bounds.first : defaultItemIndex);
265187
265641
  const selectedChoice = items[active];
265188
- useKeypress((key2, rl) => {
265642
+ useKeypress2((key3, rl) => {
265189
265643
  clearTimeout(searchTimeoutRef.current);
265190
- if (isEnterKey(key2)) {
265644
+ if (isEnterKey2(key3)) {
265191
265645
  setStatus("done");
265192
265646
  done(selectedChoice.value);
265193
- } else if (isUpKey(key2) || isDownKey(key2)) {
265647
+ } else if (isUpKey(key3) || isDownKey(key3)) {
265194
265648
  rl.clearLine(0);
265195
- if (loop || isUpKey(key2) && active !== bounds.first || isDownKey(key2) && active !== bounds.last) {
265196
- const offset = isUpKey(key2) ? -1 : 1;
265649
+ if (loop || isUpKey(key3) && active !== bounds.first || isDownKey(key3) && active !== bounds.last) {
265650
+ const offset = isUpKey(key3) ? -1 : 1;
265197
265651
  let next = active;
265198
265652
  do {
265199
265653
  next = (next + offset + items.length) % items.length;
265200
265654
  } while (!isSelectable(items[next]));
265201
265655
  setActive(next);
265202
265656
  }
265203
- } else if (isNumberKey(key2)) {
265657
+ } else if (isNumberKey(key3)) {
265204
265658
  rl.clearLine(0);
265205
- const position = Number(key2.name) - 1;
265659
+ const position = Number(key3.name) - 1;
265206
265660
  const item = items[position];
265207
265661
  if (item != null && isSelectable(item)) {
265208
265662
  setActive(position);
265209
265663
  }
265210
- } else if (isBackspaceKey(key2)) {
265664
+ } else if (isBackspaceKey2(key3)) {
265211
265665
  rl.clearLine(0);
265212
265666
  } else {
265213
265667
  const searchTerm = rl.line.toLowerCase();
@@ -265224,7 +265678,7 @@ var esm_default3 = createPrompt((config3, done) => {
265224
265678
  }, 700);
265225
265679
  }
265226
265680
  });
265227
- useEffect(() => () => {
265681
+ useEffect2(() => () => {
265228
265682
  clearTimeout(searchTimeoutRef.current);
265229
265683
  }, []);
265230
265684
  const message = theme.style.message(config3.message, status);
@@ -265263,7 +265717,7 @@ ${theme.style.help("(Use arrow keys to reveal more choices)")}`;
265263
265717
  const choiceDescription = selectedChoice.description ? `
265264
265718
  ${theme.style.description(selectedChoice.description)}` : ``;
265265
265719
  return `${[prefix, message, helpTipTop].filter(Boolean).join(" ")}
265266
- ${page}${helpTipBottom}${choiceDescription}${import_ansi_escapes2.default.cursorHide}`;
265720
+ ${page}${helpTipBottom}${choiceDescription}${import_ansi_escapes3.default.cursorHide}`;
265267
265721
  });
265268
265722
 
265269
265723
  // src/prompts/smart-contract-set/subgraph.prompt.ts
@@ -265659,13 +266113,13 @@ var esm_default4 = createPrompt((config3, done) => {
265659
266113
  const [value4, setValue] = useState("");
265660
266114
  const theme = makeTheme(config3.theme);
265661
266115
  const prefix = usePrefix({ status, theme });
265662
- useKeypress((key2, rl) => {
265663
- if (isEnterKey(key2)) {
266116
+ useKeypress((key3, rl) => {
266117
+ if (isEnterKey(key3)) {
265664
266118
  const answer = getBooleanValue(value4, config3.default);
265665
266119
  setValue(transformer(answer));
265666
266120
  setStatus("done");
265667
266121
  done(answer);
265668
- } else if (key2.name === "tab") {
266122
+ } else if (key3.name === "tab") {
265669
266123
  const answer = boolToString(!getBooleanValue(value4, config3.default));
265670
266124
  rl.clearLine(0);
265671
266125
  rl.write(answer);
@@ -265685,473 +266139,20 @@ var esm_default4 = createPrompt((config3, done) => {
265685
266139
  return `${prefix} ${message}${defaultValue} ${formattedValue}`;
265686
266140
  });
265687
266141
 
265688
- // ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/key.js
265689
- var isEnterKey2 = (key2) => key2.name === "enter" || key2.name === "return";
265690
- // ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/errors.js
265691
- class AbortPromptError2 extends Error {
265692
- name = "AbortPromptError";
265693
- message = "Prompt was aborted";
265694
- constructor(options) {
265695
- super();
265696
- this.cause = options?.cause;
265697
- }
265698
- }
265699
-
265700
- class CancelPromptError2 extends Error {
265701
- name = "CancelPromptError";
265702
- message = "Prompt was canceled";
265703
- }
265704
-
265705
- class ExitPromptError2 extends Error {
265706
- name = "ExitPromptError";
265707
- }
265708
-
265709
- class HookError2 extends Error {
265710
- name = "HookError";
265711
- }
265712
-
265713
- class ValidationError2 extends Error {
265714
- name = "ValidationError";
265715
- }
265716
- // ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/use-prefix.js
265717
- import { AsyncResource as AsyncResource5 } from "node:async_hooks";
265718
-
265719
- // ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/hook-engine.js
265720
- import { AsyncLocalStorage as AsyncLocalStorage2, AsyncResource as AsyncResource4 } from "node:async_hooks";
265721
- var hookStorage2 = new AsyncLocalStorage2;
265722
- function createStore2(rl) {
265723
- const store = {
265724
- rl,
265725
- hooks: [],
265726
- hooksCleanup: [],
265727
- hooksEffect: [],
265728
- index: 0,
265729
- handleChange() {}
265730
- };
265731
- return store;
265732
- }
265733
- function withHooks2(rl, cb) {
265734
- const store = createStore2(rl);
265735
- return hookStorage2.run(store, () => {
265736
- function cycle(render) {
265737
- store.handleChange = () => {
265738
- store.index = 0;
265739
- render();
265740
- };
265741
- store.handleChange();
265742
- }
265743
- return cb(cycle);
265744
- });
265745
- }
265746
- function getStore2() {
265747
- const store = hookStorage2.getStore();
265748
- if (!store) {
265749
- throw new HookError2("[Inquirer] Hook functions can only be called from within a prompt");
265750
- }
265751
- return store;
265752
- }
265753
- function readline3() {
265754
- return getStore2().rl;
265755
- }
265756
- function withUpdates2(fn) {
265757
- const wrapped = (...args) => {
265758
- const store = getStore2();
265759
- let shouldUpdate = false;
265760
- const oldHandleChange = store.handleChange;
265761
- store.handleChange = () => {
265762
- shouldUpdate = true;
265763
- };
265764
- const returnValue = fn(...args);
265765
- if (shouldUpdate) {
265766
- oldHandleChange();
265767
- }
265768
- store.handleChange = oldHandleChange;
265769
- return returnValue;
265770
- };
265771
- return AsyncResource4.bind(wrapped);
265772
- }
265773
- function withPointer2(cb) {
265774
- const store = getStore2();
265775
- const { index } = store;
265776
- const pointer = {
265777
- get() {
265778
- return store.hooks[index];
265779
- },
265780
- set(value4) {
265781
- store.hooks[index] = value4;
265782
- },
265783
- initialized: index in store.hooks
265784
- };
265785
- const returnValue = cb(pointer);
265786
- store.index++;
265787
- return returnValue;
265788
- }
265789
- function handleChange2() {
265790
- getStore2().handleChange();
265791
- }
265792
- var effectScheduler2 = {
265793
- queue(cb) {
265794
- const store = getStore2();
265795
- const { index } = store;
265796
- store.hooksEffect.push(() => {
265797
- store.hooksCleanup[index]?.();
265798
- const cleanFn = cb(readline3());
265799
- if (cleanFn != null && typeof cleanFn !== "function") {
265800
- throw new ValidationError2("useEffect return value must be a cleanup function or nothing.");
265801
- }
265802
- store.hooksCleanup[index] = cleanFn;
265803
- });
265804
- },
265805
- run() {
265806
- const store = getStore2();
265807
- withUpdates2(() => {
265808
- store.hooksEffect.forEach((effect) => {
265809
- effect();
265810
- });
265811
- store.hooksEffect.length = 0;
265812
- })();
265813
- },
265814
- clearAll() {
265815
- const store = getStore2();
265816
- store.hooksCleanup.forEach((cleanFn) => {
265817
- cleanFn?.();
265818
- });
265819
- store.hooksEffect.length = 0;
265820
- store.hooksCleanup.length = 0;
265821
- }
265822
- };
265823
-
265824
- // ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/use-state.js
265825
- function useState2(defaultValue) {
265826
- return withPointer2((pointer) => {
265827
- const setFn = (newValue) => {
265828
- if (pointer.get() !== newValue) {
265829
- pointer.set(newValue);
265830
- handleChange2();
265831
- }
265832
- };
265833
- if (pointer.initialized) {
265834
- return [pointer.get(), setFn];
265835
- }
265836
- const value4 = typeof defaultValue === "function" ? defaultValue() : defaultValue;
265837
- pointer.set(value4);
265838
- return [value4, setFn];
265839
- });
265840
- }
265841
-
265842
- // ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/use-effect.js
265843
- function useEffect2(cb, depArray) {
265844
- withPointer2((pointer) => {
265845
- const oldDeps = pointer.get();
265846
- const hasChanged = !Array.isArray(oldDeps) || depArray.some((dep, i6) => !Object.is(dep, oldDeps[i6]));
265847
- if (hasChanged) {
265848
- effectScheduler2.queue(cb);
265849
- }
265850
- pointer.set(depArray);
265851
- });
265852
- }
265853
-
265854
- // ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/theme.js
265855
- var import_yoctocolors_cjs4 = __toESM(require_yoctocolors_cjs(), 1);
265856
- var defaultTheme2 = {
265857
- prefix: {
265858
- idle: import_yoctocolors_cjs4.default.blue("?"),
265859
- done: import_yoctocolors_cjs4.default.green(esm_default.tick)
265860
- },
265861
- spinner: {
265862
- interval: 80,
265863
- frames: ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"].map((frame) => import_yoctocolors_cjs4.default.yellow(frame))
265864
- },
265865
- style: {
265866
- answer: import_yoctocolors_cjs4.default.cyan,
265867
- message: import_yoctocolors_cjs4.default.bold,
265868
- error: (text2) => import_yoctocolors_cjs4.default.red(`> ${text2}`),
265869
- defaultAnswer: (text2) => import_yoctocolors_cjs4.default.dim(`(${text2})`),
265870
- help: import_yoctocolors_cjs4.default.dim,
265871
- highlight: import_yoctocolors_cjs4.default.cyan,
265872
- key: (text2) => import_yoctocolors_cjs4.default.cyan(import_yoctocolors_cjs4.default.bold(`<${text2}>`))
265873
- }
265874
- };
265875
-
265876
- // ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/make-theme.js
265877
- function isPlainObject3(value4) {
265878
- if (typeof value4 !== "object" || value4 === null)
265879
- return false;
265880
- let proto = value4;
265881
- while (Object.getPrototypeOf(proto) !== null) {
265882
- proto = Object.getPrototypeOf(proto);
265883
- }
265884
- return Object.getPrototypeOf(value4) === proto;
265885
- }
265886
- function deepMerge3(...objects) {
265887
- const output = {};
265888
- for (const obj of objects) {
265889
- for (const [key2, value4] of Object.entries(obj)) {
265890
- const prevValue = output[key2];
265891
- output[key2] = isPlainObject3(prevValue) && isPlainObject3(value4) ? deepMerge3(prevValue, value4) : value4;
265892
- }
265893
- }
265894
- return output;
265895
- }
265896
- function makeTheme2(...themes) {
265897
- const themesToMerge = [
265898
- defaultTheme2,
265899
- ...themes.filter((theme) => theme != null)
265900
- ];
265901
- return deepMerge3(...themesToMerge);
265902
- }
265903
-
265904
- // ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/use-prefix.js
265905
- function usePrefix2({ status = "idle", theme }) {
265906
- const [showLoader, setShowLoader] = useState2(false);
265907
- const [tick, setTick] = useState2(0);
265908
- const { prefix, spinner: spinner2 } = makeTheme2(theme);
265909
- useEffect2(() => {
265910
- if (status === "loading") {
265911
- let tickInterval;
265912
- let inc = -1;
265913
- const delayTimeout = setTimeout(AsyncResource5.bind(() => {
265914
- setShowLoader(true);
265915
- tickInterval = setInterval(AsyncResource5.bind(() => {
265916
- inc = inc + 1;
265917
- setTick(inc % spinner2.frames.length);
265918
- }), spinner2.interval);
265919
- }), 300);
265920
- return () => {
265921
- clearTimeout(delayTimeout);
265922
- clearInterval(tickInterval);
265923
- };
265924
- } else {
265925
- setShowLoader(false);
265926
- }
265927
- }, [status]);
265928
- if (showLoader) {
265929
- return spinner2.frames[tick];
265930
- }
265931
- const iconName = status === "loading" ? "idle" : status;
265932
- return typeof prefix === "string" ? prefix : prefix[iconName] ?? prefix["idle"];
265933
- }
265934
- // ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/use-ref.js
265935
- function useRef2(val) {
265936
- return useState2({ current: val })[0];
265937
- }
265938
-
265939
- // ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/use-keypress.js
265940
- function useKeypress2(userHandler) {
265941
- const signal = useRef2(userHandler);
265942
- signal.current = userHandler;
265943
- useEffect2((rl) => {
265944
- let ignore = false;
265945
- const handler = withUpdates2((_input, event) => {
265946
- if (ignore)
265947
- return;
265948
- signal.current(event, rl);
265949
- });
265950
- rl.input.on("keypress", handler);
265951
- return () => {
265952
- ignore = true;
265953
- rl.input.removeListener("keypress", handler);
265954
- };
265955
- }, []);
265956
- }
265957
- // ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/utils.js
265958
- var import_cli_width2 = __toESM(require_cli_width(), 1);
265959
- var import_wrap_ansi2 = __toESM(require_wrap_ansi(), 1);
265960
- function breakLines2(content, width) {
265961
- return content.split(`
265962
- `).flatMap((line) => import_wrap_ansi2.default(line, width, { trim: false, hard: true }).split(`
265963
- `).map((str) => str.trimEnd())).join(`
265964
- `);
265965
- }
265966
- function readlineWidth2() {
265967
- return import_cli_width2.default({ defaultWidth: 80, output: readline3().output });
265968
- }
265969
-
265970
- // ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
265971
- var import_mute_stream2 = __toESM(require_lib(), 1);
265972
- import * as readline4 from "node:readline";
265973
- import { AsyncResource as AsyncResource6 } from "node:async_hooks";
265974
-
265975
- // ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/screen-manager.js
265976
- var import_ansi_escapes3 = __toESM(require_ansi_escapes(), 1);
265977
- import { stripVTControlCharacters as stripVTControlCharacters3 } from "node:util";
265978
- var height2 = (content) => content.split(`
265979
- `).length;
265980
- var lastLine2 = (content) => content.split(`
265981
- `).pop() ?? "";
265982
- function cursorDown2(n6) {
265983
- return n6 > 0 ? import_ansi_escapes3.default.cursorDown(n6) : "";
265984
- }
265985
-
265986
- class ScreenManager2 {
265987
- height = 0;
265988
- extraLinesUnderPrompt = 0;
265989
- cursorPos;
265990
- rl;
265991
- constructor(rl) {
265992
- this.rl = rl;
265993
- this.cursorPos = rl.getCursorPos();
265994
- }
265995
- write(content) {
265996
- this.rl.output.unmute();
265997
- this.rl.output.write(content);
265998
- this.rl.output.mute();
265999
- }
266000
- render(content, bottomContent = "") {
266001
- const promptLine = lastLine2(content);
266002
- const rawPromptLine = stripVTControlCharacters3(promptLine);
266003
- let prompt = rawPromptLine;
266004
- if (this.rl.line.length > 0) {
266005
- prompt = prompt.slice(0, -this.rl.line.length);
266006
- }
266007
- this.rl.setPrompt(prompt);
266008
- this.cursorPos = this.rl.getCursorPos();
266009
- const width = readlineWidth2();
266010
- content = breakLines2(content, width);
266011
- bottomContent = breakLines2(bottomContent, width);
266012
- if (rawPromptLine.length % width === 0) {
266013
- content += `
266014
- `;
266015
- }
266016
- let output = content + (bottomContent ? `
266017
- ` + bottomContent : "");
266018
- const promptLineUpDiff = Math.floor(rawPromptLine.length / width) - this.cursorPos.rows;
266019
- const bottomContentHeight = promptLineUpDiff + (bottomContent ? height2(bottomContent) : 0);
266020
- if (bottomContentHeight > 0)
266021
- output += import_ansi_escapes3.default.cursorUp(bottomContentHeight);
266022
- output += import_ansi_escapes3.default.cursorTo(this.cursorPos.cols);
266023
- this.write(cursorDown2(this.extraLinesUnderPrompt) + import_ansi_escapes3.default.eraseLines(this.height) + output);
266024
- this.extraLinesUnderPrompt = bottomContentHeight;
266025
- this.height = height2(output);
266026
- }
266027
- checkCursorPos() {
266028
- const cursorPos = this.rl.getCursorPos();
266029
- if (cursorPos.cols !== this.cursorPos.cols) {
266030
- this.write(import_ansi_escapes3.default.cursorTo(cursorPos.cols));
266031
- this.cursorPos = cursorPos;
266032
- }
266033
- }
266034
- done({ clearContent }) {
266035
- this.rl.setPrompt("");
266036
- let output = cursorDown2(this.extraLinesUnderPrompt);
266037
- output += clearContent ? import_ansi_escapes3.default.eraseLines(this.height) : `
266038
- `;
266039
- output += import_ansi_escapes3.default.cursorShow;
266040
- this.write(output);
266041
- this.rl.close();
266042
- }
266043
- }
266044
-
266045
- // ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/promise-polyfill.js
266046
- class PromisePolyfill2 extends Promise {
266047
- static withResolver() {
266048
- let resolve6;
266049
- let reject;
266050
- const promise = new Promise((res, rej) => {
266051
- resolve6 = res;
266052
- reject = rej;
266053
- });
266054
- return { promise, resolve: resolve6, reject };
266055
- }
266056
- }
266057
-
266058
- // ../../node_modules/@inquirer/password/node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
266059
- function getCallSites2() {
266060
- const _prepareStackTrace = Error.prepareStackTrace;
266061
- let result = [];
266062
- try {
266063
- Error.prepareStackTrace = (_5, callSites) => {
266064
- const callSitesWithoutCurrent = callSites.slice(1);
266065
- result = callSitesWithoutCurrent;
266066
- return callSitesWithoutCurrent;
266067
- };
266068
- new Error().stack;
266069
- } catch {
266070
- return result;
266071
- }
266072
- Error.prepareStackTrace = _prepareStackTrace;
266073
- return result;
266074
- }
266075
- function createPrompt2(view) {
266076
- const callSites = getCallSites2();
266077
- const prompt = (config3, context = {}) => {
266078
- const { input = process.stdin, signal } = context;
266079
- const cleanups = new Set;
266080
- const output = new import_mute_stream2.default;
266081
- output.pipe(context.output ?? process.stdout);
266082
- const rl = readline4.createInterface({
266083
- terminal: true,
266084
- input,
266085
- output
266086
- });
266087
- const screen = new ScreenManager2(rl);
266088
- const { promise, resolve: resolve6, reject } = PromisePolyfill2.withResolver();
266089
- const cancel3 = () => reject(new CancelPromptError2);
266090
- if (signal) {
266091
- const abort = () => reject(new AbortPromptError2({ cause: signal.reason }));
266092
- if (signal.aborted) {
266093
- abort();
266094
- return Object.assign(promise, { cancel: cancel3 });
266095
- }
266096
- signal.addEventListener("abort", abort);
266097
- cleanups.add(() => signal.removeEventListener("abort", abort));
266098
- }
266099
- cleanups.add(onExit((code2, signal2) => {
266100
- reject(new ExitPromptError2(`User force closed the prompt with ${code2} ${signal2}`));
266101
- }));
266102
- const checkCursorPos = () => screen.checkCursorPos();
266103
- rl.input.on("keypress", checkCursorPos);
266104
- cleanups.add(() => rl.input.removeListener("keypress", checkCursorPos));
266105
- return withHooks2(rl, (cycle) => {
266106
- const hooksCleanup = AsyncResource6.bind(() => effectScheduler2.clearAll());
266107
- rl.on("close", hooksCleanup);
266108
- cleanups.add(() => rl.removeListener("close", hooksCleanup));
266109
- cycle(() => {
266110
- try {
266111
- const nextView = view(config3, (value4) => {
266112
- setImmediate(() => resolve6(value4));
266113
- });
266114
- if (nextView === undefined) {
266115
- const callerFilename = callSites[1]?.getFileName?.();
266116
- throw new Error(`Prompt functions must return a string.
266117
- at ${callerFilename}`);
266118
- }
266119
- const [content, bottomContent] = typeof nextView === "string" ? [nextView] : nextView;
266120
- screen.render(content, bottomContent);
266121
- effectScheduler2.run();
266122
- } catch (error5) {
266123
- reject(error5);
266124
- }
266125
- });
266126
- return Object.assign(promise.then((answer) => {
266127
- effectScheduler2.clearAll();
266128
- return answer;
266129
- }, (error5) => {
266130
- effectScheduler2.clearAll();
266131
- throw error5;
266132
- }).finally(() => {
266133
- cleanups.forEach((cleanup) => cleanup());
266134
- screen.done({ clearContent: Boolean(context.clearPromptOnDone) });
266135
- output.end();
266136
- }).then(() => promise), { cancel: cancel3 });
266137
- });
266138
- };
266139
- return prompt;
266140
- }
266141
266142
  // ../../node_modules/@inquirer/password/dist/esm/index.js
266142
266143
  var import_ansi_escapes4 = __toESM(require_ansi_escapes(), 1);
266143
- var esm_default5 = createPrompt2((config3, done) => {
266144
+ var esm_default5 = createPrompt((config3, done) => {
266144
266145
  const { validate: validate3 = () => true } = config3;
266145
- const theme = makeTheme2(config3.theme);
266146
- const [status, setStatus] = useState2("idle");
266147
- const [errorMsg, setError] = useState2();
266148
- const [value4, setValue] = useState2("");
266149
- const prefix = usePrefix2({ status, theme });
266150
- useKeypress2(async (key3, rl) => {
266146
+ const theme = makeTheme(config3.theme);
266147
+ const [status, setStatus] = useState("idle");
266148
+ const [errorMsg, setError] = useState();
266149
+ const [value4, setValue] = useState("");
266150
+ const prefix = usePrefix({ status, theme });
266151
+ useKeypress(async (key3, rl) => {
266151
266152
  if (status !== "idle") {
266152
266153
  return;
266153
266154
  }
266154
- if (isEnterKey2(key3)) {
266155
+ if (isEnterKey(key3)) {
266155
266156
  const answer = value4;
266156
266157
  setStatus("loading");
266157
266158
  const isValid2 = await validate3(answer);
@@ -273875,4 +273876,4 @@ async function sdkCliCommand(argv = process.argv) {
273875
273876
  // src/cli.ts
273876
273877
  sdkCliCommand();
273877
273878
 
273878
- //# debugId=841133EB0FF0E44E64756E2164756E21
273879
+ //# debugId=EDF103800A76066E64756E2164756E21