@settlemint/sdk-cli 2.6.2-pr9d6d228c → 2.6.2-pra246e133

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.js CHANGED
@@ -161500,7 +161500,7 @@ ${lanes.join(`
161500
161500
  function generateOptionOutput(sys2, option, rightAlignOfLeft, leftAlignOfRight) {
161501
161501
  var _a;
161502
161502
  const text = [];
161503
- const colors3 = createColors(sys2);
161503
+ const colors2 = createColors(sys2);
161504
161504
  const name2 = getDisplayNameTextOfOption(option);
161505
161505
  const valueCandidates = getValueCandidate(option);
161506
161506
  const defaultValueDescription = typeof option.defaultValueDescription === "object" ? getDiagnosticText(option.defaultValueDescription) : formatDefaultValue(option.defaultValueDescription, option.type === "list" || option.type === "listOrElement" ? option.element.type : option.type);
@@ -161521,7 +161521,7 @@ ${lanes.join(`
161521
161521
  }
161522
161522
  text.push(sys2.newLine);
161523
161523
  } else {
161524
- text.push(colors3.blue(name2), sys2.newLine);
161524
+ text.push(colors2.blue(name2), sys2.newLine);
161525
161525
  if (option.description) {
161526
161526
  const description3 = getDiagnosticText(option.description);
161527
161527
  text.push(description3);
@@ -161566,7 +161566,7 @@ ${lanes.join(`
161566
161566
  if (isFirstLine) {
161567
161567
  curLeft = left.padStart(rightAlignOfLeft2);
161568
161568
  curLeft = curLeft.padEnd(leftAlignOfRight2);
161569
- curLeft = colorLeft ? colors3.blue(curLeft) : curLeft;
161569
+ curLeft = colorLeft ? colors2.blue(curLeft) : curLeft;
161570
161570
  } else {
161571
161571
  curLeft = "".padStart(leftAlignOfRight2);
161572
161572
  }
@@ -161678,9 +161678,9 @@ ${lanes.join(`
161678
161678
  return res;
161679
161679
  }
161680
161680
  function printEasyHelp(sys2, simpleOptions) {
161681
- const colors3 = createColors(sys2);
161681
+ const colors2 = createColors(sys2);
161682
161682
  let output = [...getHeader(sys2, `${getDiagnosticText(Diagnostics.tsc_Colon_The_TypeScript_Compiler)} - ${getDiagnosticText(Diagnostics.Version_0, version2)}`)];
161683
- output.push(colors3.bold(getDiagnosticText(Diagnostics.COMMON_COMMANDS)) + sys2.newLine + sys2.newLine);
161683
+ output.push(colors2.bold(getDiagnosticText(Diagnostics.COMMON_COMMANDS)) + sys2.newLine + sys2.newLine);
161684
161684
  example("tsc", Diagnostics.Compiles_the_current_project_tsconfig_json_in_the_working_directory);
161685
161685
  example("tsc app.ts util.ts", Diagnostics.Ignoring_tsconfig_json_compiles_the_specified_files_with_default_compiler_options);
161686
161686
  example("tsc -b", Diagnostics.Build_a_composite_project_in_the_working_directory);
@@ -161701,7 +161701,7 @@ ${lanes.join(`
161701
161701
  function example(ex, desc) {
161702
161702
  const examples = typeof ex === "string" ? [ex] : ex;
161703
161703
  for (const example2 of examples) {
161704
- output.push(" " + colors3.blue(example2) + sys2.newLine);
161704
+ output.push(" " + colors2.blue(example2) + sys2.newLine);
161705
161705
  }
161706
161706
  output.push(" " + getDiagnosticText(desc) + sys2.newLine + sys2.newLine);
161707
161707
  }
@@ -161724,12 +161724,12 @@ ${lanes.join(`
161724
161724
  }
161725
161725
  function getHeader(sys2, message) {
161726
161726
  var _a;
161727
- const colors3 = createColors(sys2);
161727
+ const colors2 = createColors(sys2);
161728
161728
  const header = [];
161729
161729
  const terminalWidth = ((_a = sys2.getWidthOfTerminal) == null ? undefined : _a.call(sys2)) ?? 0;
161730
161730
  const tsIconLength = 5;
161731
- const tsIconFirstLine = colors3.blueBackground("".padStart(tsIconLength));
161732
- const tsIconSecondLine = colors3.blueBackground(colors3.brightWhite("TS ".padStart(tsIconLength)));
161731
+ const tsIconFirstLine = colors2.blueBackground("".padStart(tsIconLength));
161732
+ const tsIconSecondLine = colors2.blueBackground(colors2.brightWhite("TS ".padStart(tsIconLength)));
161733
161733
  if (terminalWidth >= message.length + tsIconLength) {
161734
161734
  const rightAlign = terminalWidth > 120 ? 120 : terminalWidth;
161735
161735
  const leftAlign = rightAlign - tsIconLength;
@@ -247441,10 +247441,6 @@ var {
247441
247441
  } = import__.default;
247442
247442
 
247443
247443
  // ../../node_modules/.bun/@inquirer+core@10.2.2+bbb8dd451823580b/node_modules/@inquirer/core/dist/esm/lib/key.js
247444
- var isUpKey = (key) => key.name === "up";
247445
- var isDownKey = (key) => key.name === "down";
247446
- var isBackspaceKey = (key) => key.name === "backspace";
247447
- var isNumberKey = (key) => "1234567890".includes(key.name);
247448
247444
  var isEnterKey = (key) => key.name === "enter" || key.name === "return";
247449
247445
  // ../../node_modules/.bun/@inquirer+core@10.2.2+bbb8dd451823580b/node_modules/@inquirer/core/dist/esm/lib/errors.js
247450
247446
  class AbortPromptError extends Error {
@@ -247978,22 +247974,11 @@ function usePrefix({ status = "idle", theme }) {
247978
247974
  const iconName = status === "loading" ? "idle" : status;
247979
247975
  return typeof prefix === "string" ? prefix : prefix[iconName] ?? prefix["idle"];
247980
247976
  }
247981
- // ../../node_modules/.bun/@inquirer+core@10.2.2+bbb8dd451823580b/node_modules/@inquirer/core/dist/esm/lib/use-memo.js
247982
- function useMemo(fn, dependencies) {
247983
- return withPointer((pointer) => {
247984
- const prev = pointer.get();
247985
- if (!prev || prev.dependencies.length !== dependencies.length || prev.dependencies.some((dep, i) => dep !== dependencies[i])) {
247986
- const value = fn();
247987
- pointer.set({ value, dependencies });
247988
- return value;
247989
- }
247990
- return prev.value;
247991
- });
247992
- }
247993
247977
  // ../../node_modules/.bun/@inquirer+core@10.2.2+bbb8dd451823580b/node_modules/@inquirer/core/dist/esm/lib/use-ref.js
247994
247978
  function useRef(val) {
247995
247979
  return useState({ current: val })[0];
247996
247980
  }
247981
+
247997
247982
  // ../../node_modules/.bun/@inquirer+core@10.2.2+bbb8dd451823580b/node_modules/@inquirer/core/dist/esm/lib/use-keypress.js
247998
247983
  function useKeypress(userHandler) {
247999
247984
  const signal = useRef(userHandler);
@@ -248025,72 +248010,6 @@ function readlineWidth() {
248025
248010
  return import_cli_width.default({ defaultWidth: 80, output: readline().output });
248026
248011
  }
248027
248012
 
248028
- // ../../node_modules/.bun/@inquirer+core@10.2.2+bbb8dd451823580b/node_modules/@inquirer/core/dist/esm/lib/pagination/use-pagination.js
248029
- function usePointerPosition({ active, renderedItems, pageSize, loop }) {
248030
- const state = useRef({
248031
- lastPointer: active,
248032
- lastActive: undefined
248033
- });
248034
- const { lastPointer, lastActive } = state.current;
248035
- const middle = Math.floor(pageSize / 2);
248036
- const renderedLength = renderedItems.reduce((acc, item) => acc + item.length, 0);
248037
- const defaultPointerPosition = renderedItems.slice(0, active).reduce((acc, item) => acc + item.length, 0);
248038
- let pointer = defaultPointerPosition;
248039
- if (renderedLength > pageSize) {
248040
- if (loop) {
248041
- pointer = lastPointer;
248042
- if (lastActive != null && lastActive < active && active - lastActive < pageSize) {
248043
- pointer = Math.min(middle, Math.abs(active - lastActive) === 1 ? Math.min(lastPointer + (renderedItems[lastActive]?.length ?? 0), Math.max(defaultPointerPosition, lastPointer)) : lastPointer + active - lastActive);
248044
- }
248045
- } else {
248046
- const spaceUnderActive = renderedItems.slice(active).reduce((acc, item) => acc + item.length, 0);
248047
- pointer = spaceUnderActive < pageSize - middle ? pageSize - spaceUnderActive : Math.min(defaultPointerPosition, middle);
248048
- }
248049
- }
248050
- state.current.lastPointer = pointer;
248051
- state.current.lastActive = active;
248052
- return pointer;
248053
- }
248054
- function usePagination({ items, active, renderItem, pageSize, loop = true }) {
248055
- const width = readlineWidth();
248056
- const bound = (num) => (num % items.length + items.length) % items.length;
248057
- const renderedItems = items.map((item, index) => {
248058
- if (item == null)
248059
- return [];
248060
- return breakLines(renderItem({ item, index, isActive: index === active }), width).split(`
248061
- `);
248062
- });
248063
- const renderedLength = renderedItems.reduce((acc, item) => acc + item.length, 0);
248064
- const renderItemAtIndex = (index) => renderedItems[index] ?? [];
248065
- const pointer = usePointerPosition({ active, renderedItems, pageSize, loop });
248066
- const activeItem = renderItemAtIndex(active).slice(0, pageSize);
248067
- const activeItemPosition = pointer + activeItem.length <= pageSize ? pointer : pageSize - activeItem.length;
248068
- const pageBuffer = Array.from({ length: pageSize });
248069
- pageBuffer.splice(activeItemPosition, activeItem.length, ...activeItem);
248070
- const itemVisited = new Set([active]);
248071
- let bufferPointer = activeItemPosition + activeItem.length;
248072
- let itemPointer = bound(active + 1);
248073
- while (bufferPointer < pageSize && !itemVisited.has(itemPointer) && (loop && renderedLength > pageSize ? itemPointer !== active : itemPointer > active)) {
248074
- const lines = renderItemAtIndex(itemPointer);
248075
- const linesToAdd = lines.slice(0, pageSize - bufferPointer);
248076
- pageBuffer.splice(bufferPointer, linesToAdd.length, ...linesToAdd);
248077
- itemVisited.add(itemPointer);
248078
- bufferPointer += linesToAdd.length;
248079
- itemPointer = bound(itemPointer + 1);
248080
- }
248081
- bufferPointer = activeItemPosition - 1;
248082
- itemPointer = bound(active - 1);
248083
- while (bufferPointer >= 0 && !itemVisited.has(itemPointer) && (loop && renderedLength > pageSize ? itemPointer !== active : itemPointer < active)) {
248084
- const lines = renderItemAtIndex(itemPointer);
248085
- const linesToAdd = lines.slice(Math.max(0, lines.length - bufferPointer - 1));
248086
- pageBuffer.splice(bufferPointer - linesToAdd.length + 1, linesToAdd.length, ...linesToAdd);
248087
- itemVisited.add(itemPointer);
248088
- bufferPointer -= linesToAdd.length;
248089
- itemPointer = bound(itemPointer - 1);
248090
- }
248091
- return pageBuffer.filter((line) => typeof line === "string").join(`
248092
- `);
248093
- }
248094
248013
  // ../../node_modules/.bun/@inquirer+core@10.2.2+bbb8dd451823580b/node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
248095
248014
  var import_mute_stream = __toESM(require_lib(), 1);
248096
248015
  import * as readline2 from "node:readline";
@@ -248487,20 +248406,6 @@ function createPrompt(view) {
248487
248406
  };
248488
248407
  return prompt;
248489
248408
  }
248490
- // ../../node_modules/.bun/@inquirer+core@10.2.2+bbb8dd451823580b/node_modules/@inquirer/core/dist/esm/lib/Separator.js
248491
- var import_yoctocolors_cjs2 = __toESM(require_yoctocolors_cjs(), 1);
248492
- class Separator {
248493
- separator = import_yoctocolors_cjs2.default.dim(Array.from({ length: 15 }).join(esm_default.line));
248494
- type = "separator";
248495
- constructor(separator) {
248496
- if (separator) {
248497
- this.separator = separator;
248498
- }
248499
- }
248500
- static isSeparator(choice) {
248501
- return Boolean(choice && typeof choice === "object" && "type" in choice && choice.type === "separator");
248502
- }
248503
- }
248504
248409
  // ../../node_modules/.bun/yoctocolors@2.1.2/node_modules/yoctocolors/base.js
248505
248410
  var exports_base = {};
248506
248411
  __export(exports_base, {
@@ -267700,7 +267605,7 @@ function pruneCurrentEnv(currentEnv, env2) {
267700
267605
  var package_default = {
267701
267606
  name: "@settlemint/sdk-cli",
267702
267607
  description: "Command-line interface for SettleMint SDK, providing development tools and project management capabilities",
267703
- version: "2.6.2-pr9d6d228c",
267608
+ version: "2.6.2-pra246e133",
267704
267609
  type: "module",
267705
267610
  private: false,
267706
267611
  license: "FSL-1.1-MIT",
@@ -267753,11 +267658,11 @@ var package_default = {
267753
267658
  "@inquirer/confirm": "5.1.19",
267754
267659
  "@inquirer/input": "4.2.5",
267755
267660
  "@inquirer/password": "4.0.20",
267756
- "@inquirer/select": "4.3.4",
267757
- "@settlemint/sdk-hasura": "2.6.2-pr9d6d228c",
267758
- "@settlemint/sdk-js": "2.6.2-pr9d6d228c",
267759
- "@settlemint/sdk-utils": "2.6.2-pr9d6d228c",
267760
- "@settlemint/sdk-viem": "2.6.2-pr9d6d228c",
267661
+ "@inquirer/select": "4.4.0",
267662
+ "@settlemint/sdk-hasura": "2.6.2-pra246e133",
267663
+ "@settlemint/sdk-js": "2.6.2-pra246e133",
267664
+ "@settlemint/sdk-utils": "2.6.2-pra246e133",
267665
+ "@settlemint/sdk-viem": "2.6.2-pra246e133",
267761
267666
  "@types/node": "24.7.2",
267762
267667
  "@types/semver": "7.7.1",
267763
267668
  "@types/which": "3.0.4",
@@ -267774,7 +267679,7 @@ var package_default = {
267774
267679
  },
267775
267680
  peerDependencies: {
267776
267681
  hardhat: "<= 4",
267777
- "@settlemint/sdk-js": "2.6.2-pr9d6d228c"
267682
+ "@settlemint/sdk-js": "2.6.2-pra246e133"
267778
267683
  },
267779
267684
  peerDependenciesMeta: {
267780
267685
  hardhat: {
@@ -273632,8 +273537,11 @@ function sanitizeName(value5, length = 35) {
273632
273537
  }
273633
273538
 
273634
273539
  // ../../node_modules/.bun/@inquirer+core@10.3.0+bbb8dd451823580b/node_modules/@inquirer/core/dist/esm/lib/key.js
273635
- var isBackspaceKey2 = (key2) => key2.name === "backspace";
273540
+ var isUpKey = (key2, keybindings = []) => key2.name === "up" || keybindings.includes("vim") && key2.name === "k" || keybindings.includes("emacs") && key2.ctrl && key2.name === "p";
273541
+ var isDownKey = (key2, keybindings = []) => key2.name === "down" || keybindings.includes("vim") && key2.name === "j" || keybindings.includes("emacs") && key2.ctrl && key2.name === "n";
273542
+ var isBackspaceKey = (key2) => key2.name === "backspace";
273636
273543
  var isTabKey = (key2) => key2.name === "tab";
273544
+ var isNumberKey = (key2) => "1234567890".includes(key2.name);
273637
273545
  var isEnterKey2 = (key2) => key2.name === "enter" || key2.name === "return";
273638
273546
  // ../../node_modules/.bun/@inquirer+core@10.3.0+bbb8dd451823580b/node_modules/@inquirer/core/dist/esm/lib/errors.js
273639
273547
  class AbortPromptError2 extends Error {
@@ -273800,7 +273708,7 @@ function useEffect2(cb, depArray) {
273800
273708
  }
273801
273709
 
273802
273710
  // ../../node_modules/.bun/@inquirer+core@10.3.0+bbb8dd451823580b/node_modules/@inquirer/core/dist/esm/lib/theme.js
273803
- var import_yoctocolors_cjs3 = __toESM(require_yoctocolors_cjs(), 1);
273711
+ var import_yoctocolors_cjs2 = __toESM(require_yoctocolors_cjs(), 1);
273804
273712
 
273805
273713
  // ../../node_modules/.bun/@inquirer+figures@1.0.14/node_modules/@inquirer/figures/dist/esm/index.js
273806
273714
  import process8 from "node:process";
@@ -274091,21 +273999,21 @@ var replacements2 = Object.entries(specialMainSymbols2);
274091
273999
  // ../../node_modules/.bun/@inquirer+core@10.3.0+bbb8dd451823580b/node_modules/@inquirer/core/dist/esm/lib/theme.js
274092
274000
  var defaultTheme2 = {
274093
274001
  prefix: {
274094
- idle: import_yoctocolors_cjs3.default.blue("?"),
274095
- done: import_yoctocolors_cjs3.default.green(esm_default2.tick)
274002
+ idle: import_yoctocolors_cjs2.default.blue("?"),
274003
+ done: import_yoctocolors_cjs2.default.green(esm_default2.tick)
274096
274004
  },
274097
274005
  spinner: {
274098
274006
  interval: 80,
274099
- frames: ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"].map((frame) => import_yoctocolors_cjs3.default.yellow(frame))
274007
+ frames: ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"].map((frame) => import_yoctocolors_cjs2.default.yellow(frame))
274100
274008
  },
274101
274009
  style: {
274102
- answer: import_yoctocolors_cjs3.default.cyan,
274103
- message: import_yoctocolors_cjs3.default.bold,
274104
- error: (text2) => import_yoctocolors_cjs3.default.red(`> ${text2}`),
274105
- defaultAnswer: (text2) => import_yoctocolors_cjs3.default.dim(`(${text2})`),
274106
- help: import_yoctocolors_cjs3.default.dim,
274107
- highlight: import_yoctocolors_cjs3.default.cyan,
274108
- key: (text2) => import_yoctocolors_cjs3.default.cyan(import_yoctocolors_cjs3.default.bold(`<${text2}>`))
274010
+ answer: import_yoctocolors_cjs2.default.cyan,
274011
+ message: import_yoctocolors_cjs2.default.bold,
274012
+ error: (text2) => import_yoctocolors_cjs2.default.red(`> ${text2}`),
274013
+ defaultAnswer: (text2) => import_yoctocolors_cjs2.default.dim(`(${text2})`),
274014
+ help: import_yoctocolors_cjs2.default.dim,
274015
+ highlight: import_yoctocolors_cjs2.default.cyan,
274016
+ key: (text2) => import_yoctocolors_cjs2.default.cyan(import_yoctocolors_cjs2.default.bold(`<${text2}>`))
274109
274017
  }
274110
274018
  };
274111
274019
 
@@ -274167,11 +274075,22 @@ function usePrefix2({ status = "idle", theme }) {
274167
274075
  const iconName = status === "loading" ? "idle" : status;
274168
274076
  return typeof prefix === "string" ? prefix : prefix[iconName] ?? prefix["idle"];
274169
274077
  }
274078
+ // ../../node_modules/.bun/@inquirer+core@10.3.0+bbb8dd451823580b/node_modules/@inquirer/core/dist/esm/lib/use-memo.js
274079
+ function useMemo(fn, dependencies) {
274080
+ return withPointer2((pointer) => {
274081
+ const prev = pointer.get();
274082
+ if (!prev || prev.dependencies.length !== dependencies.length || prev.dependencies.some((dep, i7) => dep !== dependencies[i7])) {
274083
+ const value5 = fn();
274084
+ pointer.set({ value: value5, dependencies });
274085
+ return value5;
274086
+ }
274087
+ return prev.value;
274088
+ });
274089
+ }
274170
274090
  // ../../node_modules/.bun/@inquirer+core@10.3.0+bbb8dd451823580b/node_modules/@inquirer/core/dist/esm/lib/use-ref.js
274171
274091
  function useRef2(val) {
274172
274092
  return useState2({ current: val })[0];
274173
274093
  }
274174
-
274175
274094
  // ../../node_modules/.bun/@inquirer+core@10.3.0+bbb8dd451823580b/node_modules/@inquirer/core/dist/esm/lib/use-keypress.js
274176
274095
  function useKeypress2(userHandler) {
274177
274096
  const signal = useRef2(userHandler);
@@ -274203,6 +274122,72 @@ function readlineWidth2() {
274203
274122
  return import_cli_width2.default({ defaultWidth: 80, output: readline3().output });
274204
274123
  }
274205
274124
 
274125
+ // ../../node_modules/.bun/@inquirer+core@10.3.0+bbb8dd451823580b/node_modules/@inquirer/core/dist/esm/lib/pagination/use-pagination.js
274126
+ function usePointerPosition({ active, renderedItems, pageSize, loop }) {
274127
+ const state = useRef2({
274128
+ lastPointer: active,
274129
+ lastActive: undefined
274130
+ });
274131
+ const { lastPointer, lastActive } = state.current;
274132
+ const middle = Math.floor(pageSize / 2);
274133
+ const renderedLength = renderedItems.reduce((acc, item) => acc + item.length, 0);
274134
+ const defaultPointerPosition = renderedItems.slice(0, active).reduce((acc, item) => acc + item.length, 0);
274135
+ let pointer = defaultPointerPosition;
274136
+ if (renderedLength > pageSize) {
274137
+ if (loop) {
274138
+ pointer = lastPointer;
274139
+ if (lastActive != null && lastActive < active && active - lastActive < pageSize) {
274140
+ pointer = Math.min(middle, Math.abs(active - lastActive) === 1 ? Math.min(lastPointer + (renderedItems[lastActive]?.length ?? 0), Math.max(defaultPointerPosition, lastPointer)) : lastPointer + active - lastActive);
274141
+ }
274142
+ } else {
274143
+ const spaceUnderActive = renderedItems.slice(active).reduce((acc, item) => acc + item.length, 0);
274144
+ pointer = spaceUnderActive < pageSize - middle ? pageSize - spaceUnderActive : Math.min(defaultPointerPosition, middle);
274145
+ }
274146
+ }
274147
+ state.current.lastPointer = pointer;
274148
+ state.current.lastActive = active;
274149
+ return pointer;
274150
+ }
274151
+ function usePagination({ items, active, renderItem, pageSize, loop = true }) {
274152
+ const width = readlineWidth2();
274153
+ const bound = (num) => (num % items.length + items.length) % items.length;
274154
+ const renderedItems = items.map((item, index) => {
274155
+ if (item == null)
274156
+ return [];
274157
+ return breakLines2(renderItem({ item, index, isActive: index === active }), width).split(`
274158
+ `);
274159
+ });
274160
+ const renderedLength = renderedItems.reduce((acc, item) => acc + item.length, 0);
274161
+ const renderItemAtIndex = (index) => renderedItems[index] ?? [];
274162
+ const pointer = usePointerPosition({ active, renderedItems, pageSize, loop });
274163
+ const activeItem = renderItemAtIndex(active).slice(0, pageSize);
274164
+ const activeItemPosition = pointer + activeItem.length <= pageSize ? pointer : pageSize - activeItem.length;
274165
+ const pageBuffer = Array.from({ length: pageSize });
274166
+ pageBuffer.splice(activeItemPosition, activeItem.length, ...activeItem);
274167
+ const itemVisited = new Set([active]);
274168
+ let bufferPointer = activeItemPosition + activeItem.length;
274169
+ let itemPointer = bound(active + 1);
274170
+ while (bufferPointer < pageSize && !itemVisited.has(itemPointer) && (loop && renderedLength > pageSize ? itemPointer !== active : itemPointer > active)) {
274171
+ const lines = renderItemAtIndex(itemPointer);
274172
+ const linesToAdd = lines.slice(0, pageSize - bufferPointer);
274173
+ pageBuffer.splice(bufferPointer, linesToAdd.length, ...linesToAdd);
274174
+ itemVisited.add(itemPointer);
274175
+ bufferPointer += linesToAdd.length;
274176
+ itemPointer = bound(itemPointer + 1);
274177
+ }
274178
+ bufferPointer = activeItemPosition - 1;
274179
+ itemPointer = bound(active - 1);
274180
+ while (bufferPointer >= 0 && !itemVisited.has(itemPointer) && (loop && renderedLength > pageSize ? itemPointer !== active : itemPointer < active)) {
274181
+ const lines = renderItemAtIndex(itemPointer);
274182
+ const linesToAdd = lines.slice(Math.max(0, lines.length - bufferPointer - 1));
274183
+ pageBuffer.splice(bufferPointer - linesToAdd.length + 1, linesToAdd.length, ...linesToAdd);
274184
+ itemVisited.add(itemPointer);
274185
+ bufferPointer -= linesToAdd.length;
274186
+ itemPointer = bound(itemPointer - 1);
274187
+ }
274188
+ return pageBuffer.filter((line) => typeof line === "string").join(`
274189
+ `);
274190
+ }
274206
274191
  // ../../node_modules/.bun/@inquirer+core@10.3.0+bbb8dd451823580b/node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
274207
274192
  var import_mute_stream2 = __toESM(require_lib(), 1);
274208
274193
  import * as readline4 from "node:readline";
@@ -274391,6 +274376,20 @@ function createPrompt2(view) {
274391
274376
  };
274392
274377
  return prompt;
274393
274378
  }
274379
+ // ../../node_modules/.bun/@inquirer+core@10.3.0+bbb8dd451823580b/node_modules/@inquirer/core/dist/esm/lib/Separator.js
274380
+ var import_yoctocolors_cjs3 = __toESM(require_yoctocolors_cjs(), 1);
274381
+ class Separator {
274382
+ separator = import_yoctocolors_cjs3.default.dim(Array.from({ length: 15 }).join(esm_default2.line));
274383
+ type = "separator";
274384
+ constructor(separator) {
274385
+ if (separator) {
274386
+ this.separator = separator;
274387
+ }
274388
+ }
274389
+ static isSeparator(choice) {
274390
+ return Boolean(choice && typeof choice === "object" && "type" in choice && choice.type === "separator");
274391
+ }
274392
+ }
274394
274393
  // ../../node_modules/.bun/@inquirer+input@4.2.5+bbb8dd451823580b/node_modules/@inquirer/input/dist/esm/index.js
274395
274394
  var inputTheme = {
274396
274395
  validationFailureMode: "keep"
@@ -274424,7 +274423,7 @@ var esm_default3 = createPrompt2((config3, done) => {
274424
274423
  setError(isValid || "You must provide a valid value");
274425
274424
  setStatus("idle");
274426
274425
  }
274427
- } else if (isBackspaceKey2(key2) && !value5) {
274426
+ } else if (isBackspaceKey(key2) && !value5) {
274428
274427
  setDefaultValue(undefined);
274429
274428
  } else if (isTabKey(key2) && !value5) {
274430
274429
  setDefaultValue(undefined);
@@ -274481,16 +274480,18 @@ async function subgraphNamePrompt({
274481
274480
  return sanitizeName(subgraphName);
274482
274481
  }
274483
274482
 
274484
- // ../../node_modules/.bun/@inquirer+select@4.3.4+bbb8dd451823580b/node_modules/@inquirer/select/dist/esm/index.js
274483
+ // ../../node_modules/.bun/@inquirer+select@4.4.0+bbb8dd451823580b/node_modules/@inquirer/select/dist/esm/index.js
274485
274484
  var import_yoctocolors_cjs4 = __toESM(require_yoctocolors_cjs(), 1);
274486
274485
  var selectTheme = {
274487
- icon: { cursor: esm_default.pointer },
274486
+ icon: { cursor: esm_default2.pointer },
274488
274487
  style: {
274489
274488
  disabled: (text2) => import_yoctocolors_cjs4.default.dim(`- ${text2}`),
274490
- description: (text2) => import_yoctocolors_cjs4.default.cyan(text2)
274489
+ description: (text2) => import_yoctocolors_cjs4.default.cyan(text2),
274490
+ keysHelpTip: (keys) => keys.map(([key2, action]) => `${import_yoctocolors_cjs4.default.bold(key2)} ${import_yoctocolors_cjs4.default.dim(action)}`).join(import_yoctocolors_cjs4.default.dim(" • "))
274491
274491
  },
274492
- helpMode: "auto",
274493
- indexMode: "hidden"
274492
+ helpMode: "always",
274493
+ indexMode: "hidden",
274494
+ keybindings: []
274494
274495
  };
274495
274496
  function isSelectable(item) {
274496
274497
  return !Separator.isSeparator(item) && !item.disabled;
@@ -274520,19 +274521,20 @@ function normalizeChoices(choices) {
274520
274521
  return normalizedChoice;
274521
274522
  });
274522
274523
  }
274523
- var esm_default4 = createPrompt((config3, done) => {
274524
+ var esm_default4 = createPrompt2((config3, done) => {
274524
274525
  const { loop = true, pageSize = 7 } = config3;
274525
- const firstRender = useRef(true);
274526
- const theme = makeTheme(selectTheme, config3.theme);
274527
- const [status, setStatus] = useState("idle");
274528
- const prefix = usePrefix({ status, theme });
274529
- const searchTimeoutRef = useRef();
274526
+ const theme = makeTheme2(selectTheme, config3.theme);
274527
+ const { keybindings } = theme;
274528
+ const [status, setStatus] = useState2("idle");
274529
+ const prefix = usePrefix2({ status, theme });
274530
+ const searchTimeoutRef = useRef2();
274531
+ const searchEnabled = !keybindings.includes("vim");
274530
274532
  const items = useMemo(() => normalizeChoices(config3.choices), [config3.choices]);
274531
274533
  const bounds = useMemo(() => {
274532
274534
  const first = items.findIndex(isSelectable);
274533
274535
  const last = items.findLastIndex(isSelectable);
274534
274536
  if (first === -1) {
274535
- throw new ValidationError("[select prompt] No selectable choices. All choices are disabled.");
274537
+ throw new ValidationError2("[select prompt] No selectable choices. All choices are disabled.");
274536
274538
  }
274537
274539
  return { first, last };
274538
274540
  }, [items]);
@@ -274541,17 +274543,17 @@ var esm_default4 = createPrompt((config3, done) => {
274541
274543
  return -1;
274542
274544
  return items.findIndex((item) => isSelectable(item) && item.value === config3.default);
274543
274545
  }, [config3.default, items]);
274544
- const [active, setActive] = useState(defaultItemIndex === -1 ? bounds.first : defaultItemIndex);
274546
+ const [active, setActive] = useState2(defaultItemIndex === -1 ? bounds.first : defaultItemIndex);
274545
274547
  const selectedChoice = items[active];
274546
- useKeypress((key2, rl) => {
274548
+ useKeypress2((key2, rl) => {
274547
274549
  clearTimeout(searchTimeoutRef.current);
274548
- if (isEnterKey(key2)) {
274550
+ if (isEnterKey2(key2)) {
274549
274551
  setStatus("done");
274550
274552
  done(selectedChoice.value);
274551
- } else if (isUpKey(key2) || isDownKey(key2)) {
274553
+ } else if (isUpKey(key2, keybindings) || isDownKey(key2, keybindings)) {
274552
274554
  rl.clearLine(0);
274553
- if (loop || isUpKey(key2) && active !== bounds.first || isDownKey(key2) && active !== bounds.last) {
274554
- const offset = isUpKey(key2) ? -1 : 1;
274555
+ if (loop || isUpKey(key2, keybindings) && active !== bounds.first || isDownKey(key2, keybindings) && active !== bounds.last) {
274556
+ const offset = isUpKey(key2, keybindings) ? -1 : 1;
274555
274557
  let next = active;
274556
274558
  do {
274557
274559
  next = (next + offset + items.length) % items.length;
@@ -274576,7 +274578,7 @@ var esm_default4 = createPrompt((config3, done) => {
274576
274578
  }, 700);
274577
274579
  } else if (isBackspaceKey(key2)) {
274578
274580
  rl.clearLine(0);
274579
- } else {
274581
+ } else if (searchEnabled) {
274580
274582
  const searchTerm = rl.line.toLowerCase();
274581
274583
  const matchIndex = items.findIndex((item) => {
274582
274584
  if (Separator.isSeparator(item) || !isSelectable(item))
@@ -274591,19 +274593,20 @@ var esm_default4 = createPrompt((config3, done) => {
274591
274593
  }, 700);
274592
274594
  }
274593
274595
  });
274594
- useEffect(() => () => {
274596
+ useEffect2(() => () => {
274595
274597
  clearTimeout(searchTimeoutRef.current);
274596
274598
  }, []);
274597
274599
  const message = theme.style.message(config3.message, status);
274598
- let helpTipTop = "";
274599
- let helpTipBottom = "";
274600
- if (theme.helpMode === "always" || theme.helpMode === "auto" && firstRender.current) {
274601
- firstRender.current = false;
274602
- if (items.length > pageSize) {
274603
- helpTipBottom = `
274604
- ${theme.style.help(`(${config3.instructions?.pager ?? "Use arrow keys to reveal more choices"})`)}`;
274600
+ let helpLine;
274601
+ if (theme.helpMode !== "never") {
274602
+ if (config3.instructions) {
274603
+ const { pager, navigation } = config3.instructions;
274604
+ helpLine = theme.style.help(items.length > pageSize ? pager : navigation);
274605
274605
  } else {
274606
- helpTipTop = theme.style.help(`(${config3.instructions?.navigation ?? "Use arrow keys"})`);
274606
+ helpLine = theme.style.keysHelpTip([
274607
+ ["↑↓", "navigate"],
274608
+ ["⏎", "select"]
274609
+ ]);
274607
274610
  }
274608
274611
  }
274609
274612
  let separatorCount = 0;
@@ -274628,12 +274631,18 @@ ${theme.style.help(`(${config3.instructions?.pager ?? "Use arrow keys to reveal
274628
274631
  loop
274629
274632
  });
274630
274633
  if (status === "done") {
274631
- return `${prefix} ${message} ${theme.style.answer(selectedChoice.short)}`;
274634
+ return [prefix, message, theme.style.answer(selectedChoice.short)].filter(Boolean).join(" ");
274632
274635
  }
274633
- const choiceDescription = selectedChoice.description ? `
274634
- ${theme.style.description(selectedChoice.description)}` : ``;
274635
- return `${[prefix, message, helpTipTop].filter(Boolean).join(" ")}
274636
- ${page}${helpTipBottom}${choiceDescription}${cursorHide}`;
274636
+ const { description } = selectedChoice;
274637
+ const lines = [
274638
+ [prefix, message].filter(Boolean).join(" "),
274639
+ page,
274640
+ " ",
274641
+ description ? theme.style.description(description) : "",
274642
+ helpLine
274643
+ ].filter(Boolean).join(`
274644
+ `).trimEnd();
274645
+ return `${lines}${cursorHide2}`;
274637
274646
  });
274638
274647
 
274639
274648
  // src/prompts/smart-contract-set/subgraph.prompt.ts
@@ -309539,4 +309548,4 @@ async function sdkCliCommand(argv = process.argv) {
309539
309548
  // src/cli.ts
309540
309549
  sdkCliCommand();
309541
309550
 
309542
- //# debugId=0D47826C907D608864756E2164756E21
309551
+ //# debugId=7D0020CC3A01E58E64756E2164756E21