iubcli 4.2.17 → 4.2.18

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/index.js CHANGED
@@ -2662,10 +2662,14 @@ async function interactiveSelect(config) {
2662
2662
  if (parsed === null) {
2663
2663
  escBuffer = rest;
2664
2664
  escTimeout = setTimeout(() => {
2665
- escBuffer = "";
2666
2665
  escTimeout = null;
2667
- cancel();
2668
- }, 60);
2666
+ if (escBuffer === "\x1B" || escBuffer === "\x1BO") {
2667
+ escBuffer = "";
2668
+ cancel();
2669
+ } else {
2670
+ escBuffer = "";
2671
+ }
2672
+ }, 250);
2669
2673
  break;
2670
2674
  }
2671
2675
  if (parsed.type === "ctrl_c") {
@@ -2948,6 +2952,9 @@ async function interactiveInput(config) {
2948
2952
  }
2949
2953
  return;
2950
2954
  }
2955
+ if (str === "\x1B[A" || str === "\x1BOA" || str === "\x1B[B" || str === "\x1BOB") {
2956
+ return;
2957
+ }
2951
2958
  if (str.startsWith("\x1B[")) return;
2952
2959
  const printable = str.replace(/[\x00-\x1f\x7f]/g, "");
2953
2960
  if (printable.length > 0) {
@@ -3376,10 +3383,14 @@ async function readInlinePrompt(options) {
3376
3383
  if (parsed === null) {
3377
3384
  escBuffer = rest;
3378
3385
  escTimeout = setTimeout(() => {
3379
- escBuffer = "";
3380
3386
  escTimeout = null;
3381
- cancel();
3382
- }, 60);
3387
+ if (escBuffer === "\x1B" || escBuffer === "\x1BO") {
3388
+ escBuffer = "";
3389
+ cancel();
3390
+ } else {
3391
+ escBuffer = "";
3392
+ }
3393
+ }, 250);
3383
3394
  return;
3384
3395
  }
3385
3396
  if (parsed.type === "ctrl_c") {