vite-plus 1.2.0 → 1.4.0

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 (94) hide show
  1. package/AGENTS.md +4 -0
  2. package/LICENSE +1 -849
  3. package/README.md +1 -1
  4. package/bin/vpx +9 -0
  5. package/binding/index.cjs +59 -54
  6. package/binding/index.d.cts +132 -2
  7. package/dist/{agent-KeDc6vmg.js → agent-D8oxxhVR.js} +7 -9
  8. package/dist/bin.js +27 -34
  9. package/dist/{cli-parse-DHE8NrBU.js → cli-parse-aeUeFDlC.js} +2 -3
  10. package/dist/command-TjS_6y9O.js +1 -0
  11. package/dist/{command-CguLh2KL.js → command-rY79K5NI.js} +40 -42
  12. package/dist/{comparison-CmVirWIW-DUGaiYqF.js → comparison-CmVirWIW-UlEf2maz.js} +1 -2
  13. package/dist/config/bin.js +8 -10
  14. package/dist/{constants-BW3g7VnD.js → constants-DRUnJ_Dz.js} +4 -6
  15. package/dist/create/bin.d.ts +4 -8
  16. package/dist/create/bin.js +64 -68
  17. package/dist/{define-config-CIlk9scU.js → define-config-ChwJcu5e.js} +6 -9
  18. package/dist/{define-config-Dq_23Eyr.cjs → define-config-Cv2P6NT2.cjs} +8 -13
  19. package/dist/{define-config-Bexdd6RZ.d.ts → define-config-rPhYIFSn.d.ts} +1 -11
  20. package/dist/define-config.cjs +1 -1
  21. package/dist/define-config.d.ts +1 -1
  22. package/dist/define-config.js +1 -1
  23. package/dist/{dist-Bi7ZEK3c.js → dist-Bs0SObNC.js} +77 -149
  24. package/dist/{dist-Cqz8OtiO.js → dist-CdkMvIiQ.js} +11 -5
  25. package/dist/dist-zDZV5eEc.js +3 -0
  26. package/dist/{documentation-DqcZSthV.js → documentation-cv_y0Auv.js} +1 -2
  27. package/dist/{editor-b1XUwt9v.js → editor-ClL78D8u.js} +1492 -4211
  28. package/dist/{help-BmKpeOP9.js → help-B03t_iQ4.js} +1 -2
  29. package/dist/hooks/bin.js +4 -5
  30. package/dist/{hooks-DhwsWb46.js → hooks-xRcJPc-O.js} +5 -4
  31. package/dist/index.cjs +2 -3
  32. package/dist/index.d.ts +1 -1
  33. package/dist/index.js +1 -1
  34. package/dist/{json-JP24qHUF.js → json-kl84kDyH.js} +9 -18
  35. package/dist/lint-plugins.cjs +1 -1
  36. package/dist/migration/bin.js +719 -184
  37. package/dist/migration/compat/worker.js +4 -6
  38. package/dist/{oxlint-plugin-config-Dx-ZY2MN.js → oxlint-plugin-config-BVpqYdcC.js} +3 -4
  39. package/dist/oxlint-plugin.d.ts +0 -2
  40. package/dist/oxlint-plugin.js +6 -7
  41. package/dist/{pack-BK38MLVZ.d.ts → pack-ARPFMefW.d.ts} +0 -2
  42. package/dist/pack-bin.d.ts +1 -3
  43. package/dist/pack-bin.js +3 -4
  44. package/dist/pack.d.ts +1 -1
  45. package/dist/{package-BP16iQby.js → package-DzsomcUD.js} +10 -95
  46. package/dist/{package-overrides-D1RcXSFl.js → package-overrides-Ci8GXouY.js} +5 -8
  47. package/dist/picomatch-DEUoj81q.js +1916 -0
  48. package/dist/{prompts-BGpQtC5z.js → prompts-GL1vj0wk.js} +113 -239
  49. package/dist/{protocol-D99W10Qi.js → protocol-CkNmY-Mr.js} +1 -2
  50. package/dist/{report-NhQk8VHb.js → report-DLHO30yZ.js} +2 -2
  51. package/dist/{resolve-vite-config-x47JetlI.js → resolve-vite-config-Dn5896A4.js} +9 -25
  52. package/dist/resolve-vite-config-QO6cC0SP.js +1 -0
  53. package/dist/{rolldown-runtime-CMFfr-1z.js → rolldown-runtime-DegdyBIC.js} +2 -3
  54. package/dist/script-esm-hooks.d.ts +8 -0
  55. package/dist/script-esm-hooks.js +24 -0
  56. package/dist/script-hooks-9Fof5UMY.js +176 -0
  57. package/dist/script-preload.cjs +468 -0
  58. package/dist/script-register.d.ts +1 -0
  59. package/dist/script-register.js +22 -0
  60. package/dist/script-watch.d.ts +1 -0
  61. package/dist/script-watch.js +1908 -0
  62. package/dist/staged/bin.js +81 -2011
  63. package/dist/sync-versions/bin.js +29 -50
  64. package/dist/sync-versions/bin.mjs +117 -224
  65. package/dist/{terminal-MKGAuy-p.js → terminal-BcuPUy-j.js} +1 -2
  66. package/dist/toolchain.js +36 -10
  67. package/dist/toolchain.json +36 -10
  68. package/dist/{tsconfig-C5PnJfW4.js → tsconfig-Do6MAG_f.js} +1 -1
  69. package/dist/{tsconfig-D2DzAQ_D.js → tsconfig-LE_mAwe_.js} +8 -10
  70. package/dist/version.d.ts +1 -3
  71. package/dist/version.js +5 -6
  72. package/dist/versions.js +5 -5
  73. package/dist/{vitest-ecosystem-BU0AqZq-.js → vitest-ecosystem-BeEYz-qF.js} +1 -2
  74. package/dist/{vitest-v5-entry-points-DthU1e_O.js → vitest-v5-entry-points-NyJsFeux.js} +1 -2
  75. package/dist/vpx-bin.d.ts +1 -0
  76. package/dist/vpx-bin.js +232 -0
  77. package/dist/vpx-script-EXgV5QOf.js +434 -0
  78. package/docs/config/run.md +4 -0
  79. package/docs/guide/check.md +1 -0
  80. package/docs/guide/ci.md +13 -3
  81. package/docs/guide/create.md +34 -0
  82. package/docs/guide/env.md +27 -13
  83. package/docs/guide/global-cli.md +52 -0
  84. package/docs/guide/local-cli.md +4 -4
  85. package/docs/guide/migrate-rules.md +48 -5
  86. package/docs/guide/migrate.md +6 -6
  87. package/docs/guide/package-management.md +19 -2
  88. package/docs/guide/test.md +1 -1
  89. package/docs/guide/vitest-v5.md +2 -2
  90. package/docs/guide/vpx.md +170 -9
  91. package/package.json +32 -29
  92. package/dist/command-DaRqSNpP.js +0 -1
  93. package/dist/dist-CBWGibx8.js +0 -3
  94. package/dist/resolve-vite-config-CGzlyhGr.js +0 -1
@@ -1,10 +1,10 @@
1
- import { r as __toESM, t as __commonJSMin } from "./rolldown-runtime-CMFfr-1z.js";
2
- import { t as accent } from "./terminal-MKGAuy-p.js";
3
- import { f as VITE_PLUS_VERSION } from "./constants-BW3g7VnD.js";
4
- import { a as writeJsonFile, i as readJsonFile } from "./json-JP24qHUF.js";
5
- import { _ as isGreaterThanOrEqual, b as safeRegex, g as formatComparableVersion, l as PRERELEASE, n as COERCE, r as COERCE_FULL, u as PRERELEASE_LOOSE, x as tryParse, y as parse } from "./comparison-CmVirWIW-DUGaiYqF.js";
6
- import { n as runCommandSilently } from "./command-CguLh2KL.js";
7
- import { t as require_dist } from "./dist-Bi7ZEK3c.js";
1
+ import { r as __toESM, t as __commonJSMin } from "./rolldown-runtime-DegdyBIC.js";
2
+ import { t as accent } from "./terminal-BcuPUy-j.js";
3
+ import { f as VITE_PLUS_VERSION } from "./constants-DRUnJ_Dz.js";
4
+ import { a as writeJsonFile, i as readJsonFile } from "./json-kl84kDyH.js";
5
+ import { _ as isGreaterThanOrEqual, b as safeRegex, g as formatComparableVersion, l as PRERELEASE, n as COERCE, r as COERCE_FULL, u as PRERELEASE_LOOSE, x as tryParse, y as parse } from "./comparison-CmVirWIW-UlEf2maz.js";
6
+ import { i as runCommandSilently, n as getVpCommand } from "./command-rY79K5NI.js";
7
+ import { t as require_dist } from "./dist-Bs0SObNC.js";
8
8
  import path from "node:path";
9
9
  import { downloadPackageManager } from "../binding/index.js";
10
10
  import { stripVTControlCharacters, styleText } from "node:util";
@@ -13,7 +13,7 @@ import process$1, { stdin, stdout } from "node:process";
13
13
  import l__default, * as l from "node:readline";
14
14
  import { ReadStream } from "node:tty";
15
15
  import { randomBytes } from "node:crypto";
16
- //#region ../../node_modules/.pnpm/fast-string-truncated-width@3.0.3/node_modules/fast-string-truncated-width/dist/utils.js
16
+ // ../../node_modules/.pnpm/fast-string-truncated-width@3.0.3/node_modules/fast-string-truncated-width/dist/utils.js
17
17
  const getCodePointsLength$1 = (() => {
18
18
  const SURROGATE_PAIR_RE = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g;
19
19
  return (input) => {
@@ -23,29 +23,28 @@ const getCodePointsLength$1 = (() => {
23
23
  return input.length - surrogatePairsNr;
24
24
  };
25
25
  })();
26
- const isFullWidth$2 = (x) => {
26
+ const isFullWidth$1 = (x) => {
27
27
  return x === 12288 || x >= 65281 && x <= 65376 || x >= 65504 && x <= 65510;
28
28
  };
29
29
  const isWideNotCJKTNotEmoji$1 = (x) => {
30
30
  return x === 8987 || x === 9001 || x >= 12272 && x <= 12287 || x >= 12289 && x <= 12350 || x >= 12441 && x <= 12543 || x >= 12549 && x <= 12591 || x >= 12593 && x <= 12686 || x >= 12688 && x <= 12771 || x >= 12783 && x <= 12830 || x >= 12832 && x <= 12871 || x >= 12880 && x <= 19903 || x >= 65040 && x <= 65049 || x >= 65072 && x <= 65106 || x >= 65108 && x <= 65126 || x >= 65128 && x <= 65131 || x >= 127488 && x <= 127490 || x >= 127504 && x <= 127547 || x >= 127552 && x <= 127560 || x >= 131072 && x <= 196605 || x >= 196608 && x <= 262141;
31
31
  };
32
- //#endregion
33
- //#region ../../node_modules/.pnpm/fast-string-truncated-width@3.0.3/node_modules/fast-string-truncated-width/dist/index.js
34
- const ANSI_RE$2 = /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]|\u001b\]8;[^;]*;.*?(?:\u0007|\u001b\u005c)/y;
35
- const CONTROL_RE$2 = /[\x00-\x08\x0A-\x1F\x7F-\x9F]{1,1000}/y;
32
+ // ../../node_modules/.pnpm/fast-string-truncated-width@3.0.3/node_modules/fast-string-truncated-width/dist/index.js
33
+ const ANSI_RE$1 = /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]|\u001b\]8;[^;]*;.*?(?:\u0007|\u001b\u005c)/y;
34
+ const CONTROL_RE$1 = /[\x00-\x08\x0A-\x1F\x7F-\x9F]{1,1000}/y;
36
35
  const CJKT_WIDE_RE$1 = /(?:(?![\uFF61-\uFF9F\uFF00-\uFFEF])[\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Hangul}\p{Script=Tangut}]){1,1000}/uy;
37
- const TAB_RE$2 = /\t{1,1000}/y;
38
- const EMOJI_RE$2 = /[\u{1F1E6}-\u{1F1FF}]{2}|\u{1F3F4}[\u{E0061}-\u{E007A}]{2}[\u{E0030}-\u{E0039}\u{E0061}-\u{E007A}]{1,3}\u{E007F}|(?:\p{Emoji}\uFE0F\u20E3?|\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation})(?:\u200D(?:\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation}|\p{Emoji}\uFE0F\u20E3?))*/uy;
39
- const LATIN_RE$2 = /(?:[\x20-\x7E\xA0-\xFF](?!\uFE0F)){1,1000}/y;
40
- const MODIFIER_RE$2 = /\p{M}+/gu;
41
- const NO_TRUNCATION$5 = {
36
+ const TAB_RE$1 = /\t{1,1000}/y;
37
+ const EMOJI_RE$1 = /[\u{1F1E6}-\u{1F1FF}]{2}|\u{1F3F4}[\u{E0061}-\u{E007A}]{2}[\u{E0030}-\u{E0039}\u{E0061}-\u{E007A}]{1,3}\u{E007F}|(?:\p{Emoji}\uFE0F\u20E3?|\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation})(?:\u200D(?:\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation}|\p{Emoji}\uFE0F\u20E3?))*/uy;
38
+ const LATIN_RE$1 = /(?:[\x20-\x7E\xA0-\xFF](?!\uFE0F)){1,1000}/y;
39
+ const MODIFIER_RE$1 = /\p{M}+/gu;
40
+ const NO_TRUNCATION$3 = {
42
41
  limit: Infinity,
43
42
  ellipsis: ""
44
43
  };
45
- const getStringTruncatedWidth$2 = (input, truncationOptions = {}, widthOptions = {}) => {
44
+ const getStringTruncatedWidth$1 = (input, truncationOptions = {}, widthOptions = {}) => {
46
45
  const LIMIT = truncationOptions.limit ?? Infinity;
47
46
  const ELLIPSIS = truncationOptions.ellipsis ?? "";
48
- const ELLIPSIS_WIDTH = truncationOptions?.ellipsisWidth ?? (ELLIPSIS ? getStringTruncatedWidth$2(ELLIPSIS, NO_TRUNCATION$5, widthOptions).width : 0);
47
+ const ELLIPSIS_WIDTH = truncationOptions?.ellipsisWidth ?? (ELLIPSIS ? getStringTruncatedWidth$1(ELLIPSIS, NO_TRUNCATION$3, widthOptions).width : 0);
49
48
  const ANSI_WIDTH = 0;
50
49
  const CONTROL_WIDTH = widthOptions.controlWidth ?? 0;
51
50
  const TAB_WIDTH = widthOptions.tabWidth ?? 8;
@@ -54,11 +53,11 @@ const getStringTruncatedWidth$2 = (input, truncationOptions = {}, widthOptions =
54
53
  const REGULAR_WIDTH = widthOptions.regularWidth ?? 1;
55
54
  const WIDE_WIDTH = widthOptions.wideWidth ?? FULL_WIDTH_WIDTH;
56
55
  const PARSE_BLOCKS = [
57
- [LATIN_RE$2, REGULAR_WIDTH],
58
- [ANSI_RE$2, ANSI_WIDTH],
59
- [CONTROL_RE$2, CONTROL_WIDTH],
60
- [TAB_RE$2, TAB_WIDTH],
61
- [EMOJI_RE$2, EMOJI_WIDTH],
56
+ [LATIN_RE$1, REGULAR_WIDTH],
57
+ [ANSI_RE$1, ANSI_WIDTH],
58
+ [CONTROL_RE$1, CONTROL_WIDTH],
59
+ [TAB_RE$1, TAB_WIDTH],
60
+ [EMOJI_RE$1, EMOJI_WIDTH],
62
61
  [CJKT_WIDE_RE$1, WIDE_WIDTH]
63
62
  ];
64
63
  let indexPrev = 0;
@@ -76,9 +75,9 @@ const getStringTruncatedWidth$2 = (input, truncationOptions = {}, widthOptions =
76
75
  if (unmatchedEnd > unmatchedStart || index >= length && index > indexPrev) {
77
76
  const unmatched = input.slice(unmatchedStart, unmatchedEnd) || input.slice(indexPrev, index);
78
77
  lengthExtra = 0;
79
- for (const char of unmatched.replaceAll(MODIFIER_RE$2, "")) {
78
+ for (const char of unmatched.replaceAll(MODIFIER_RE$1, "")) {
80
79
  const codePoint = char.codePointAt(0) || 0;
81
- if (isFullWidth$2(codePoint)) widthExtra = FULL_WIDTH_WIDTH;
80
+ if (isFullWidth$1(codePoint)) widthExtra = FULL_WIDTH_WIDTH;
82
81
  else if (isWideNotCJKTNotEmoji$1(codePoint)) widthExtra = WIDE_WIDTH;
83
82
  else widthExtra = REGULAR_WIDTH;
84
83
  if (width + widthExtra > truncationLimit) truncationIndex = Math.min(truncationIndex, Math.max(unmatchedStart, indexPrev) + lengthExtra);
@@ -96,7 +95,7 @@ const getStringTruncatedWidth$2 = (input, truncationOptions = {}, widthOptions =
96
95
  const [BLOCK_RE, BLOCK_WIDTH] = PARSE_BLOCKS[i];
97
96
  BLOCK_RE.lastIndex = index;
98
97
  if (BLOCK_RE.test(input)) {
99
- lengthExtra = BLOCK_RE === CJKT_WIDE_RE$1 ? getCodePointsLength$1(input.slice(index, BLOCK_RE.lastIndex)) : BLOCK_RE === EMOJI_RE$2 ? 1 : BLOCK_RE.lastIndex - index;
98
+ lengthExtra = BLOCK_RE === CJKT_WIDE_RE$1 ? getCodePointsLength$1(input.slice(index, BLOCK_RE.lastIndex)) : BLOCK_RE === EMOJI_RE$1 ? 1 : BLOCK_RE.lastIndex - index;
100
99
  widthExtra = lengthExtra * BLOCK_WIDTH;
101
100
  if (width + widthExtra > truncationLimit) truncationIndex = Math.min(truncationIndex, index + Math.floor((truncationLimit - width) / BLOCK_WIDTH));
102
101
  if (width + widthExtra > LIMIT) {
@@ -119,20 +118,18 @@ const getStringTruncatedWidth$2 = (input, truncationOptions = {}, widthOptions =
119
118
  ellipsed: truncationEnabled && LIMIT >= ELLIPSIS_WIDTH
120
119
  };
121
120
  };
122
- //#endregion
123
- //#region ../../node_modules/.pnpm/fast-string-width@3.0.2/node_modules/fast-string-width/dist/index.js
124
- const NO_TRUNCATION$4 = {
121
+ // ../../node_modules/.pnpm/fast-string-width@3.0.2/node_modules/fast-string-width/dist/index.js
122
+ const NO_TRUNCATION$2 = {
125
123
  limit: Infinity,
126
124
  ellipsis: "",
127
125
  ellipsisWidth: 0
128
126
  };
129
- const fastStringWidth$2 = (input, options = {}) => {
130
- return getStringTruncatedWidth$2(input, NO_TRUNCATION$4, options).width;
127
+ const fastStringWidth$1 = (input, options = {}) => {
128
+ return getStringTruncatedWidth$1(input, NO_TRUNCATION$2, options).width;
131
129
  };
132
- //#endregion
133
- //#region ../../node_modules/.pnpm/fast-wrap-ansi@0.2.0/node_modules/fast-wrap-ansi/lib/main.js
134
- const ESC$1 = "\x1B";
135
- const CSI$1 = "›";
130
+ // ../../node_modules/.pnpm/fast-wrap-ansi@0.2.0/node_modules/fast-wrap-ansi/lib/main.js
131
+ const ESC$2 = "\x1B";
132
+ const CSI$2 = "›";
136
133
  const END_CODE$1 = 39;
137
134
  const ANSI_ESCAPE_BELL$1 = "\x07";
138
135
  const ANSI_CSI$1 = "[";
@@ -153,26 +150,26 @@ const getClosingCode$1 = (openingCode) => {
153
150
  if (openingCode === 9) return 29;
154
151
  if (openingCode === 0) return 0;
155
152
  };
156
- const wrapAnsiCode$1 = (code) => `${ESC$1}${ANSI_CSI$1}${code}${ANSI_SGR_TERMINATOR$1}`;
157
- const wrapAnsiHyperlink$1 = (url) => `${ESC$1}${ANSI_ESCAPE_LINK$1}${url}${ANSI_ESCAPE_BELL$1}`;
153
+ const wrapAnsiCode$1 = (code) => `${ESC$2}${ANSI_CSI$1}${code}${ANSI_SGR_TERMINATOR$1}`;
154
+ const wrapAnsiHyperlink$1 = (url) => `${ESC$2}${ANSI_ESCAPE_LINK$1}${url}${ANSI_ESCAPE_BELL$1}`;
158
155
  const wrapWord$1 = (rows, word, columns) => {
159
156
  const characters = word[Symbol.iterator]();
160
157
  let isInsideEscape = false;
161
158
  let isInsideLinkEscape = false;
162
159
  let lastRow = rows.at(-1);
163
- let visible = lastRow === void 0 ? 0 : fastStringWidth$2(lastRow);
160
+ let visible = lastRow === void 0 ? 0 : fastStringWidth$1(lastRow);
164
161
  let currentCharacter = characters.next();
165
162
  let nextCharacter = characters.next();
166
163
  let rawCharacterIndex = 0;
167
164
  while (!currentCharacter.done) {
168
165
  const character = currentCharacter.value;
169
- const characterLength = fastStringWidth$2(character);
166
+ const characterLength = fastStringWidth$1(character);
170
167
  if (visible + characterLength <= columns) rows[rows.length - 1] += character;
171
168
  else {
172
169
  rows.push(character);
173
170
  visible = 0;
174
171
  }
175
- if (character === ESC$1 || character === CSI$1) {
172
+ if (character === ESC$2 || character === CSI$2) {
176
173
  isInsideEscape = true;
177
174
  isInsideLinkEscape = word.startsWith(ANSI_ESCAPE_LINK$1, rawCharacterIndex + 1);
178
175
  }
@@ -201,7 +198,7 @@ const stringVisibleTrimSpacesRight$1 = (string) => {
201
198
  const words = string.split(" ");
202
199
  let last = words.length;
203
200
  while (last) {
204
- if (fastStringWidth$2(words[last - 1])) break;
201
+ if (fastStringWidth$1(words[last - 1])) break;
205
202
  last--;
206
203
  }
207
204
  if (last === words.length) return string;
@@ -222,7 +219,7 @@ const exec$1 = (string, columns, options = {}) => {
222
219
  const trimmed = row.trimStart();
223
220
  if (row.length !== trimmed.length) {
224
221
  rows[rows.length - 1] = trimmed;
225
- rowLength = fastStringWidth$2(trimmed);
222
+ rowLength = fastStringWidth$1(trimmed);
226
223
  }
227
224
  }
228
225
  if (index !== 0) {
@@ -235,19 +232,19 @@ const exec$1 = (string, columns, options = {}) => {
235
232
  rowLength++;
236
233
  }
237
234
  }
238
- const wordLength = fastStringWidth$2(word);
235
+ const wordLength = fastStringWidth$1(word);
239
236
  if (options.hard && wordLength > columns) {
240
237
  const remainingColumns = columns - rowLength;
241
238
  const breaksStartingThisLine = 1 + Math.floor((wordLength - remainingColumns - 1) / columns);
242
239
  if (Math.floor((wordLength - 1) / columns) < breaksStartingThisLine) rows.push("");
243
240
  wrapWord$1(rows, word, columns);
244
- rowLength = fastStringWidth$2(rows.at(-1) ?? "");
241
+ rowLength = fastStringWidth$1(rows.at(-1) ?? "");
245
242
  continue;
246
243
  }
247
244
  if (rowLength + wordLength > columns && rowLength && wordLength) {
248
245
  if (options.wordWrap === false && rowLength < columns) {
249
246
  wrapWord$1(rows, word, columns);
250
- rowLength = fastStringWidth$2(rows.at(-1) ?? "");
247
+ rowLength = fastStringWidth$1(rows.at(-1) ?? "");
251
248
  continue;
252
249
  }
253
250
  rows.push("");
@@ -255,7 +252,7 @@ const exec$1 = (string, columns, options = {}) => {
255
252
  }
256
253
  if (rowLength + wordLength > columns && options.wordWrap === false) {
257
254
  wrapWord$1(rows, word, columns);
258
- rowLength = fastStringWidth$2(rows.at(-1) ?? "");
255
+ rowLength = fastStringWidth$1(rows.at(-1) ?? "");
259
256
  continue;
260
257
  }
261
258
  rows[rows.length - 1] += word;
@@ -271,7 +268,7 @@ const exec$1 = (string, columns, options = {}) => {
271
268
  inSurrogate = character >= "\ud800" && character <= "\udbff";
272
269
  if (inSurrogate) continue;
273
270
  } else inSurrogate = false;
274
- if (character === ESC$1 || character === CSI$1) {
271
+ if (character === ESC$2 || character === CSI$2) {
275
272
  GROUP_REGEX$1.lastIndex = i + 1;
276
273
  const groups = GROUP_REGEX$1.exec(preString)?.groups;
277
274
  if (groups?.code !== void 0) {
@@ -294,8 +291,7 @@ const CRLF_OR_LF$1 = /\r?\n/;
294
291
  function wrapAnsi$1(string, columns, options) {
295
292
  return String(string).normalize().split(CRLF_OR_LF$1).map((line) => exec$1(line, columns, options)).join("\n");
296
293
  }
297
- //#endregion
298
- //#region ../../node_modules/.pnpm/@clack+core@1.5.1/node_modules/@clack/core/dist/index.mjs
294
+ // ../../node_modules/.pnpm/@clack+core@1.5.1/node_modules/@clack/core/dist/index.mjs
299
295
  var import_src = (/* @__PURE__ */ __commonJSMin(((exports, module) => {
300
296
  const ESC = "\x1B";
301
297
  const CSI = `${ESC}[`;
@@ -782,8 +778,7 @@ var n = class extends y {
782
778
  });
783
779
  }
784
780
  };
785
- //#endregion
786
- //#region ../../node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js
781
+ // ../../node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js
787
782
  var require_picocolors = /* @__PURE__ */ __commonJSMin(((exports, module) => {
788
783
  let p = process || {};
789
784
  let argv = p.argv || [];
@@ -852,160 +847,50 @@ var require_picocolors = /* @__PURE__ */ __commonJSMin(((exports, module) => {
852
847
  module.exports = createColors();
853
848
  module.exports.createColors = createColors;
854
849
  }));
855
- //#endregion
856
- //#region ../prompts/dist/index.mjs
850
+ // ../../node_modules/.pnpm/sisteransi@2.0.0/node_modules/sisteransi/dist/index.js
857
851
  var import_picocolors = /* @__PURE__ */ __toESM(require_picocolors(), 1);
858
- const isAmbiguous = (x) => {
859
- return x === 161 || x === 164 || x === 167 || x === 168 || x === 170 || x === 173 || x === 174 || x >= 176 && x <= 180 || x >= 182 && x <= 186 || x >= 188 && x <= 191 || x === 198 || x === 208 || x === 215 || x === 216 || x >= 222 && x <= 225 || x === 230 || x >= 232 && x <= 234 || x === 236 || x === 237 || x === 240 || x === 242 || x === 243 || x >= 247 && x <= 250 || x === 252 || x === 254 || x === 257 || x === 273 || x === 275 || x === 283 || x === 294 || x === 295 || x === 299 || x >= 305 && x <= 307 || x === 312 || x >= 319 && x <= 322 || x === 324 || x >= 328 && x <= 331 || x === 333 || x === 338 || x === 339 || x === 358 || x === 359 || x === 363 || x === 462 || x === 464 || x === 466 || x === 468 || x === 470 || x === 472 || x === 474 || x === 476 || x === 593 || x === 609 || x === 708 || x === 711 || x >= 713 && x <= 715 || x === 717 || x === 720 || x >= 728 && x <= 731 || x === 733 || x === 735 || x >= 768 && x <= 879 || x >= 913 && x <= 929 || x >= 931 && x <= 937 || x >= 945 && x <= 961 || x >= 963 && x <= 969 || x === 1025 || x >= 1040 && x <= 1103 || x === 1105 || x === 8208 || x >= 8211 && x <= 8214 || x === 8216 || x === 8217 || x === 8220 || x === 8221 || x >= 8224 && x <= 8226 || x >= 8228 && x <= 8231 || x === 8240 || x === 8242 || x === 8243 || x === 8245 || x === 8251 || x === 8254 || x === 8308 || x === 8319 || x >= 8321 && x <= 8324 || x === 8364 || x === 8451 || x === 8453 || x === 8457 || x === 8467 || x === 8470 || x === 8481 || x === 8482 || x === 8486 || x === 8491 || x === 8531 || x === 8532 || x >= 8539 && x <= 8542 || x >= 8544 && x <= 8555 || x >= 8560 && x <= 8569 || x === 8585 || x >= 8592 && x <= 8601 || x === 8632 || x === 8633 || x === 8658 || x === 8660 || x === 8679 || x === 8704 || x === 8706 || x === 8707 || x === 8711 || x === 8712 || x === 8715 || x === 8719 || x === 8721 || x === 8725 || x === 8730 || x >= 8733 && x <= 8736 || x === 8739 || x === 8741 || x >= 8743 && x <= 8748 || x === 8750 || x >= 8756 && x <= 8759 || x === 8764 || x === 8765 || x === 8776 || x === 8780 || x === 8786 || x === 8800 || x === 8801 || x >= 8804 && x <= 8807 || x === 8810 || x === 8811 || x === 8814 || x === 8815 || x === 8834 || x === 8835 || x === 8838 || x === 8839 || x === 8853 || x === 8857 || x === 8869 || x === 8895 || x === 8978 || x >= 9312 && x <= 9449 || x >= 9451 && x <= 9547 || x >= 9552 && x <= 9587 || x >= 9600 && x <= 9615 || x >= 9618 && x <= 9621 || x === 9632 || x === 9633 || x >= 9635 && x <= 9641 || x === 9650 || x === 9651 || x === 9654 || x === 9655 || x === 9660 || x === 9661 || x === 9664 || x === 9665 || x >= 9670 && x <= 9672 || x === 9675 || x >= 9678 && x <= 9681 || x >= 9698 && x <= 9701 || x === 9711 || x === 9733 || x === 9734 || x === 9737 || x === 9742 || x === 9743 || x === 9756 || x === 9758 || x === 9792 || x === 9794 || x === 9824 || x === 9825 || x >= 9827 && x <= 9829 || x >= 9831 && x <= 9834 || x === 9836 || x === 9837 || x === 9839 || x === 9886 || x === 9887 || x === 9919 || x >= 9926 && x <= 9933 || x >= 9935 && x <= 9939 || x >= 9941 && x <= 9953 || x === 9955 || x === 9960 || x === 9961 || x >= 9963 && x <= 9969 || x === 9972 || x >= 9974 && x <= 9977 || x === 9979 || x === 9980 || x === 9982 || x === 9983 || x === 10045 || x >= 10102 && x <= 10111 || x >= 11094 && x <= 11097 || x >= 12872 && x <= 12879 || x >= 57344 && x <= 63743 || x >= 65024 && x <= 65039 || x === 65533 || x >= 127232 && x <= 127242 || x >= 127248 && x <= 127277 || x >= 127280 && x <= 127337 || x >= 127344 && x <= 127373 || x === 127375 || x === 127376 || x >= 127387 && x <= 127404 || x >= 917760 && x <= 917999 || x >= 983040 && x <= 1048573 || x >= 1048576 && x <= 1114109;
860
- };
861
- const isFullWidth$1 = (x) => {
862
- return x === 12288 || x >= 65281 && x <= 65376 || x >= 65504 && x <= 65510;
863
- };
864
- const isWide = (x) => {
865
- return x >= 4352 && x <= 4447 || x === 8986 || x === 8987 || x === 9001 || x === 9002 || x >= 9193 && x <= 9196 || x === 9200 || x === 9203 || x === 9725 || x === 9726 || x === 9748 || x === 9749 || x >= 9800 && x <= 9811 || x === 9855 || x === 9875 || x === 9889 || x === 9898 || x === 9899 || x === 9917 || x === 9918 || x === 9924 || x === 9925 || x === 9934 || x === 9940 || x === 9962 || x === 9970 || x === 9971 || x === 9973 || x === 9978 || x === 9981 || x === 9989 || x === 9994 || x === 9995 || x === 10024 || x === 10060 || x === 10062 || x >= 10067 && x <= 10069 || x === 10071 || x >= 10133 && x <= 10135 || x === 10160 || x === 10175 || x === 11035 || x === 11036 || x === 11088 || x === 11093 || x >= 11904 && x <= 11929 || x >= 11931 && x <= 12019 || x >= 12032 && x <= 12245 || x >= 12272 && x <= 12287 || x >= 12289 && x <= 12350 || x >= 12353 && x <= 12438 || x >= 12441 && x <= 12543 || x >= 12549 && x <= 12591 || x >= 12593 && x <= 12686 || x >= 12688 && x <= 12771 || x >= 12783 && x <= 12830 || x >= 12832 && x <= 12871 || x >= 12880 && x <= 19903 || x >= 19968 && x <= 42124 || x >= 42128 && x <= 42182 || x >= 43360 && x <= 43388 || x >= 44032 && x <= 55203 || x >= 63744 && x <= 64255 || x >= 65040 && x <= 65049 || x >= 65072 && x <= 65106 || x >= 65108 && x <= 65126 || x >= 65128 && x <= 65131 || x >= 94176 && x <= 94180 || x === 94192 || x === 94193 || x >= 94208 && x <= 100343 || x >= 100352 && x <= 101589 || x >= 101632 && x <= 101640 || x >= 110576 && x <= 110579 || x >= 110581 && x <= 110587 || x === 110589 || x === 110590 || x >= 110592 && x <= 110882 || x === 110898 || x >= 110928 && x <= 110930 || x === 110933 || x >= 110948 && x <= 110951 || x >= 110960 && x <= 111355 || x === 126980 || x === 127183 || x === 127374 || x >= 127377 && x <= 127386 || x >= 127488 && x <= 127490 || x >= 127504 && x <= 127547 || x >= 127552 && x <= 127560 || x === 127568 || x === 127569 || x >= 127584 && x <= 127589 || x >= 127744 && x <= 127776 || x >= 127789 && x <= 127797 || x >= 127799 && x <= 127868 || x >= 127870 && x <= 127891 || x >= 127904 && x <= 127946 || x >= 127951 && x <= 127955 || x >= 127968 && x <= 127984 || x === 127988 || x >= 127992 && x <= 128062 || x === 128064 || x >= 128066 && x <= 128252 || x >= 128255 && x <= 128317 || x >= 128331 && x <= 128334 || x >= 128336 && x <= 128359 || x === 128378 || x === 128405 || x === 128406 || x === 128420 || x >= 128507 && x <= 128591 || x >= 128640 && x <= 128709 || x === 128716 || x >= 128720 && x <= 128722 || x >= 128725 && x <= 128727 || x >= 128732 && x <= 128735 || x === 128747 || x === 128748 || x >= 128756 && x <= 128764 || x >= 128992 && x <= 129003 || x === 129008 || x >= 129292 && x <= 129338 || x >= 129340 && x <= 129349 || x >= 129351 && x <= 129535 || x >= 129648 && x <= 129660 || x >= 129664 && x <= 129672 || x >= 129680 && x <= 129725 || x >= 129727 && x <= 129733 || x >= 129742 && x <= 129755 || x >= 129760 && x <= 129768 || x >= 129776 && x <= 129784 || x >= 131072 && x <= 196605 || x >= 196608 && x <= 262141;
866
- };
867
- const ANSI_RE$1 = /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/y;
868
- const CONTROL_RE$1 = /[\x00-\x08\x0A-\x1F\x7F-\x9F]{1,1000}/y;
869
- const TAB_RE$1 = /\t{1,1000}/y;
870
- const EMOJI_RE$1 = /[\u{1F1E6}-\u{1F1FF}]{2}|\u{1F3F4}[\u{E0061}-\u{E007A}]{2}[\u{E0030}-\u{E0039}\u{E0061}-\u{E007A}]{1,3}\u{E007F}|(?:\p{Emoji}\uFE0F\u20E3?|\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation})(?:\u200D(?:\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation}|\p{Emoji}\uFE0F\u20E3?))*/uy;
871
- const LATIN_RE$1 = /(?:[\x20-\x7E\xA0-\xFF](?!\uFE0F)){1,1000}/y;
872
- const MODIFIER_RE$1 = /\p{M}+/gu;
873
- const NO_TRUNCATION$3 = {
874
- limit: Infinity,
875
- ellipsis: ""
852
+ const ESC$1 = "\x1B";
853
+ const CSI$1 = `${ESC$1}[`;
854
+ const cursor = {
855
+ to(x, y) {
856
+ if (!y) return `${CSI$1}${x + 1}G`;
857
+ return `${CSI$1}${y + 1};${x + 1}H`;
858
+ },
859
+ move(x, y) {
860
+ let ret = "";
861
+ if (x < 0) ret += `${CSI$1}${-x}D`;
862
+ else if (x > 0) ret += `${CSI$1}${x}C`;
863
+ if (y < 0) ret += `${CSI$1}${-y}A`;
864
+ else if (y > 0) ret += `${CSI$1}${y}B`;
865
+ return ret;
866
+ },
867
+ up: (count = 1) => `${CSI$1}${count}A`,
868
+ down: (count = 1) => `${CSI$1}${count}B`,
869
+ forward: (count = 1) => `${CSI$1}${count}C`,
870
+ backward: (count = 1) => `${CSI$1}${count}D`,
871
+ nextLine: (count = 1) => `${CSI$1}E`.repeat(count),
872
+ prevLine: (count = 1) => `${CSI$1}F`.repeat(count),
873
+ left: `${CSI$1}G`,
874
+ hide: `${CSI$1}?25l`,
875
+ show: `${CSI$1}?25h`,
876
+ save: `${ESC$1}7`,
877
+ restore: `${ESC$1}8`
876
878
  };
877
- const getStringTruncatedWidth$1 = (input, truncationOptions = {}, widthOptions = {}) => {
878
- const LIMIT = truncationOptions.limit ?? Infinity;
879
- const ELLIPSIS = truncationOptions.ellipsis ?? "";
880
- const ELLIPSIS_WIDTH = truncationOptions?.ellipsisWidth ?? (ELLIPSIS ? getStringTruncatedWidth$1(ELLIPSIS, NO_TRUNCATION$3, widthOptions).width : 0);
881
- const ANSI_WIDTH = widthOptions.ansiWidth ?? 0;
882
- const CONTROL_WIDTH = widthOptions.controlWidth ?? 0;
883
- const TAB_WIDTH = widthOptions.tabWidth ?? 8;
884
- const AMBIGUOUS_WIDTH = widthOptions.ambiguousWidth ?? 1;
885
- const EMOJI_WIDTH = widthOptions.emojiWidth ?? 2;
886
- const FULL_WIDTH_WIDTH = widthOptions.fullWidthWidth ?? 2;
887
- const REGULAR_WIDTH = widthOptions.regularWidth ?? 1;
888
- const WIDE_WIDTH = widthOptions.wideWidth ?? 2;
889
- let indexPrev = 0;
890
- let index = 0;
891
- let length = input.length;
892
- let lengthExtra = 0;
893
- let truncationEnabled = false;
894
- let truncationIndex = length;
895
- let truncationLimit = Math.max(0, LIMIT - ELLIPSIS_WIDTH);
896
- let unmatchedStart = 0;
897
- let unmatchedEnd = 0;
898
- let width = 0;
899
- let widthExtra = 0;
900
- outer: while (true) {
901
- if (unmatchedEnd > unmatchedStart || index >= length && index > indexPrev) {
902
- const unmatched = input.slice(unmatchedStart, unmatchedEnd) || input.slice(indexPrev, index);
903
- lengthExtra = 0;
904
- for (const char of unmatched.replaceAll(MODIFIER_RE$1, "")) {
905
- const codePoint = char.codePointAt(0) || 0;
906
- if (isFullWidth$1(codePoint)) widthExtra = FULL_WIDTH_WIDTH;
907
- else if (isWide(codePoint)) widthExtra = WIDE_WIDTH;
908
- else if (AMBIGUOUS_WIDTH !== REGULAR_WIDTH && isAmbiguous(codePoint)) widthExtra = AMBIGUOUS_WIDTH;
909
- else widthExtra = REGULAR_WIDTH;
910
- if (width + widthExtra > truncationLimit) truncationIndex = Math.min(truncationIndex, Math.max(unmatchedStart, indexPrev) + lengthExtra);
911
- if (width + widthExtra > LIMIT) {
912
- truncationEnabled = true;
913
- break outer;
914
- }
915
- lengthExtra += char.length;
916
- width += widthExtra;
917
- }
918
- unmatchedStart = unmatchedEnd = 0;
919
- }
920
- if (index >= length) break;
921
- LATIN_RE$1.lastIndex = index;
922
- if (LATIN_RE$1.test(input)) {
923
- lengthExtra = LATIN_RE$1.lastIndex - index;
924
- widthExtra = lengthExtra * REGULAR_WIDTH;
925
- if (width + widthExtra > truncationLimit) truncationIndex = Math.min(truncationIndex, index + Math.floor((truncationLimit - width) / REGULAR_WIDTH));
926
- if (width + widthExtra > LIMIT) {
927
- truncationEnabled = true;
928
- break;
929
- }
930
- width += widthExtra;
931
- unmatchedStart = indexPrev;
932
- unmatchedEnd = index;
933
- index = indexPrev = LATIN_RE$1.lastIndex;
934
- continue;
935
- }
936
- ANSI_RE$1.lastIndex = index;
937
- if (ANSI_RE$1.test(input)) {
938
- if (width + ANSI_WIDTH > truncationLimit) truncationIndex = Math.min(truncationIndex, index);
939
- if (width + ANSI_WIDTH > LIMIT) {
940
- truncationEnabled = true;
941
- break;
942
- }
943
- width += ANSI_WIDTH;
944
- unmatchedStart = indexPrev;
945
- unmatchedEnd = index;
946
- index = indexPrev = ANSI_RE$1.lastIndex;
947
- continue;
948
- }
949
- CONTROL_RE$1.lastIndex = index;
950
- if (CONTROL_RE$1.test(input)) {
951
- lengthExtra = CONTROL_RE$1.lastIndex - index;
952
- widthExtra = lengthExtra * CONTROL_WIDTH;
953
- if (width + widthExtra > truncationLimit) truncationIndex = Math.min(truncationIndex, index + Math.floor((truncationLimit - width) / CONTROL_WIDTH));
954
- if (width + widthExtra > LIMIT) {
955
- truncationEnabled = true;
956
- break;
957
- }
958
- width += widthExtra;
959
- unmatchedStart = indexPrev;
960
- unmatchedEnd = index;
961
- index = indexPrev = CONTROL_RE$1.lastIndex;
962
- continue;
963
- }
964
- TAB_RE$1.lastIndex = index;
965
- if (TAB_RE$1.test(input)) {
966
- lengthExtra = TAB_RE$1.lastIndex - index;
967
- widthExtra = lengthExtra * TAB_WIDTH;
968
- if (width + widthExtra > truncationLimit) truncationIndex = Math.min(truncationIndex, index + Math.floor((truncationLimit - width) / TAB_WIDTH));
969
- if (width + widthExtra > LIMIT) {
970
- truncationEnabled = true;
971
- break;
972
- }
973
- width += widthExtra;
974
- unmatchedStart = indexPrev;
975
- unmatchedEnd = index;
976
- index = indexPrev = TAB_RE$1.lastIndex;
977
- continue;
978
- }
979
- EMOJI_RE$1.lastIndex = index;
980
- if (EMOJI_RE$1.test(input)) {
981
- if (width + EMOJI_WIDTH > truncationLimit) truncationIndex = Math.min(truncationIndex, index);
982
- if (width + EMOJI_WIDTH > LIMIT) {
983
- truncationEnabled = true;
984
- break;
985
- }
986
- width += EMOJI_WIDTH;
987
- unmatchedStart = indexPrev;
988
- unmatchedEnd = index;
989
- index = indexPrev = EMOJI_RE$1.lastIndex;
990
- continue;
991
- }
992
- index += 1;
879
+ const erase = {
880
+ screen: `${CSI$1}2J`,
881
+ up: (count = 1) => `${CSI$1}1J`.repeat(count),
882
+ down: (count = 1) => `${CSI$1}J`.repeat(count),
883
+ line: `${CSI$1}2K`,
884
+ lineEnd: `${CSI$1}K`,
885
+ lineStart: `${CSI$1}1K`,
886
+ lines(count) {
887
+ let clear = "";
888
+ for (let i = 0; i < count; i++) clear += this.line + (i < count - 1 ? cursor.up() : "");
889
+ if (count) clear += cursor.left;
890
+ return clear;
993
891
  }
994
- return {
995
- width: truncationEnabled ? truncationLimit : width,
996
- index: truncationEnabled ? truncationIndex : length,
997
- truncated: truncationEnabled,
998
- ellipsed: truncationEnabled && LIMIT >= ELLIPSIS_WIDTH
999
- };
1000
- };
1001
- const NO_TRUNCATION$2 = {
1002
- limit: Infinity,
1003
- ellipsis: "",
1004
- ellipsisWidth: 0
1005
- };
1006
- const fastStringWidth$1 = (input, options = {}) => {
1007
- return getStringTruncatedWidth$1(input, NO_TRUNCATION$2, options).width;
1008
892
  };
893
+ // ../prompts/dist/index.mjs
1009
894
  const getCodePointsLength = (() => {
1010
895
  const SURROGATE_PAIR_RE = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g;
1011
896
  return (input) => {
@@ -1281,13 +1166,15 @@ function wrapAnsi(string, columns, options) {
1281
1166
  return String(string).normalize().split(CRLF_OR_LF).map((line) => exec(line, columns, options)).join("\n");
1282
1167
  }
1283
1168
  function isUnicodeSupported() {
1284
- if (process$1.platform !== "win32") return process$1.env.TERM !== "linux";
1285
- return Boolean(process$1.env.CI) || Boolean(process$1.env.WT_SESSION) || Boolean(process$1.env.TERMINUS_SUBLIME) || process$1.env.ConEmuTask === "{cmd::Cmder}" || process$1.env.TERM_PROGRAM === "Terminus-Sublime" || process$1.env.TERM_PROGRAM === "vscode" || process$1.env.TERM === "xterm-256color" || process$1.env.TERM === "alacritty" || process$1.env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
1169
+ const { env } = process$1;
1170
+ const { TERM, TERM_PROGRAM } = env;
1171
+ if (process$1.platform !== "win32") return TERM !== "linux";
1172
+ return Boolean(env.WT_SESSION) || Boolean(env.TERMINUS_SUBLIME) || env.ConEmuTask === "{cmd::Cmder}" || TERM_PROGRAM === "Terminus-Sublime" || TERM_PROGRAM === "vscode" || TERM === "xterm-256color" || TERM === "alacritty" || TERM === "rxvt-unicode" || TERM === "rxvt-unicode-256color" || env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
1286
1173
  }
1287
1174
  updateSettings({ withGuide: false });
1288
1175
  /** Wrap using visible columns rather than the length of ANSI escape sequences. */
1289
1176
  const wrapTextWithPrefix = (output, text, prefix, startPrefix = prefix) => {
1290
- return wrapAnsi(text, Math.max(1, getColumns(output ?? process.stdout) - Math.max(fastStringWidth$1(prefix), fastStringWidth$1(startPrefix))), {
1177
+ return wrapAnsi(text, Math.max(1, getColumns(output ?? process.stdout) - Math.max(fastStringWidth(prefix), fastStringWidth(startPrefix))), {
1291
1178
  hard: true,
1292
1179
  trim: false
1293
1180
  }).split("\n").map((line, index) => `${index === 0 ? startPrefix : prefix}${line}`).join("\n");
@@ -1299,8 +1186,8 @@ const promptTitle = (message, state, opts) => {
1299
1186
  return `${hasGuide ? `${import_picocolors.default.gray(S_BAR)}\n` : ""}${wrapTextWithPrefix(opts.output, message, hasGuide ? `${symbolBar(state)} ` : " ", `${symbol(state)} `)}\n`;
1300
1187
  };
1301
1188
  const optionText = (output, marker, label, format, suffix = "") => {
1302
- const continuation = " ".repeat(fastStringWidth$1(marker));
1303
- const width = Math.max(1, getColumns(output ?? process.stdout) - 2 - fastStringWidth$1(marker));
1189
+ const continuation = " ".repeat(fastStringWidth(marker));
1190
+ const width = Math.max(1, getColumns(output ?? process.stdout) - 2 - fastStringWidth(marker));
1304
1191
  const [first, ...rest] = label.split("\n");
1305
1192
  return wrapAnsi([format(first) + suffix, ...rest.map(format)].join("\n"), width, {
1306
1193
  hard: true,
@@ -1759,9 +1646,9 @@ const spinner = ({ indicator = "dots", onCancel, output = process.stdout, cancel
1759
1646
  hard: true,
1760
1647
  trim: false
1761
1648
  }).split("\n");
1762
- if (prevLines.length > 1) output.write(import_src.cursor.up(prevLines.length - 1));
1763
- output.write(import_src.cursor.to(0));
1764
- output.write(import_src.erase.down());
1649
+ if (prevLines.length > 1) output.write(cursor.up(prevLines.length - 1));
1650
+ output.write(cursor.to(0));
1651
+ output.write(erase.down());
1765
1652
  };
1766
1653
  const hasGuide = getGuide(opts);
1767
1654
  const startLoop = () => {
@@ -1957,8 +1844,7 @@ const text = (opts) => {
1957
1844
  }
1958
1845
  }).prompt();
1959
1846
  };
1960
- //#endregion
1961
- //#region ../../node_modules/.pnpm/verkit@0.5.0/node_modules/verkit/dist/version-Co1j9Tpq.js
1847
+ // ../../node_modules/.pnpm/verkit@0.5.0/node_modules/verkit/dist/version-Co1j9Tpq.js
1962
1848
  const COERCE_EXACT = safeRegex(COERCE);
1963
1849
  const COERCE_FULL_EXACT = safeRegex(COERCE_FULL);
1964
1850
  safeRegex(`^${PRERELEASE}$`);
@@ -1991,8 +1877,7 @@ function coerce(value, options = {}) {
1991
1877
  function getMajor(version, options = {}) {
1992
1878
  return parse(version, options).major;
1993
1879
  }
1994
- //#endregion
1995
- //#region src/types/package.ts
1880
+ // src/types/package.ts
1996
1881
  const PackageManager = {
1997
1882
  pnpm: "pnpm",
1998
1883
  npm: "npm",
@@ -2005,8 +1890,7 @@ const DependencyType = {
2005
1890
  peerDependencies: "peerDependencies",
2006
1891
  optionalDependencies: "optionalDependencies"
2007
1892
  };
2008
- //#endregion
2009
- //#region src/utils/spinner.ts
1893
+ // src/utils/spinner.ts
2010
1894
  function getSpinner(interactive) {
2011
1895
  if (interactive) return spinner();
2012
1896
  return {
@@ -2028,8 +1912,7 @@ function getSilentSpinner() {
2028
1912
  message: () => {}
2029
1913
  };
2030
1914
  }
2031
- //#endregion
2032
- //#region src/utils/approve-builds.ts
1915
+ // src/utils/approve-builds.ts
2033
1916
  /**
2034
1917
  * pnpm prints this prefix whenever it gates a dependency's build (install /
2035
1918
  * postinstall) script behind explicit approval. It appears both in the pnpm
@@ -2267,13 +2150,12 @@ async function detectGatedBuilds(installCwd, packageManager, pendingBuildsFromIn
2267
2150
  if (packageManager === PackageManager.pnpm || packageManager === PackageManager.yarn || packageManager === PackageManager.npm) return pendingBuildsFromInstall ?? [];
2268
2151
  if (packageManager === PackageManager.bun) {
2269
2152
  const { exitCode, stdout, stderr } = await runCommandSilently({
2270
- command: process.env.VP_CLI_BIN ?? "vp",
2271
- args: [
2153
+ ...getVpCommand([
2272
2154
  "exec",
2273
2155
  "bun",
2274
2156
  "pm",
2275
2157
  "untrusted"
2276
- ],
2158
+ ]),
2277
2159
  cwd: installCwd,
2278
2160
  envs: process.env
2279
2161
  });
@@ -2305,8 +2187,7 @@ async function runBuildAndReport(args, cwd, packages, interactive, silent, extra
2305
2187
  const spinner = silent ? getSilentSpinner() : getSpinner(interactive);
2306
2188
  spinner.start(`Building ${packages.join(", ")}...`);
2307
2189
  const { exitCode, stdout, stderr } = await runCommandSilently({
2308
- command: process.env.VP_CLI_BIN ?? "vp",
2309
- args,
2190
+ ...getVpCommand(args),
2310
2191
  cwd,
2311
2192
  envs: extraEnv ? {
2312
2193
  ...process.env,
@@ -2334,12 +2215,11 @@ async function runBuildAndReport(args, cwd, packages, interactive, silent, extra
2334
2215
  async function approveNpmScripts(installCwd, packages, interactive, silent) {
2335
2216
  const approveCommand = `vp pm approve-builds ${packages.join(" ")}`;
2336
2217
  const { exitCode, stdout, stderr } = await runCommandSilently({
2337
- command: process.env.VP_CLI_BIN ?? "vp",
2338
- args: [
2218
+ ...getVpCommand([
2339
2219
  "pm",
2340
2220
  "approve-builds",
2341
2221
  ...packages
2342
- ],
2222
+ ]),
2343
2223
  cwd: installCwd,
2344
2224
  envs: process.env
2345
2225
  });
@@ -2441,8 +2321,7 @@ async function approveBuilds(options) {
2441
2321
  ...selected
2442
2322
  ], cwd, selected, interactive, silent);
2443
2323
  }
2444
- //#endregion
2445
- //#region src/utils/yaml.ts
2324
+ // src/utils/yaml.ts
2446
2325
  var import_dist = require_dist();
2447
2326
  function readYamlFile(file) {
2448
2327
  const content = fs.readFileSync(file, "utf-8");
@@ -2457,8 +2336,7 @@ function editYamlFile(file, callback) {
2457
2336
  function scalarString(value) {
2458
2337
  return new import_dist.Scalar(value);
2459
2338
  }
2460
- //#endregion
2461
- //#region src/utils/preview-registry.ts
2339
+ // src/utils/preview-registry.ts
2462
2340
  const DEFAULT_BRIDGE_REGISTRY = "https://registry-bridge.viteplus.dev/";
2463
2341
  const REGISTRY_MARKER = "# vite-plus preview build registry bridge (auto-added by vp)";
2464
2342
  const BRIDGE_HOST = "registry-bridge.viteplus.dev";
@@ -2585,8 +2463,7 @@ function reconcilePreviewBridgeRegistry(projectRoot, version = process.env.VP_VE
2585
2463
  const clearedYarnrc = clearYarnBerryRegistry(projectRoot);
2586
2464
  return clearedNpmrc || clearedYarnrc;
2587
2465
  }
2588
- //#endregion
2589
- //#region src/utils/prompts.ts
2466
+ // src/utils/prompts.ts
2590
2467
  /**
2591
2468
  * pnpm v11 promoted `ERR_PNPM_IGNORED_BUILDS` from a warning to a hard
2592
2469
  * exit-1. Auto-installs run by `vp migrate` / `vp create` happen before the
@@ -2651,8 +2528,7 @@ async function runViteInstall(cwd, interactive, extraArgs, options) {
2651
2528
  const startTime = Date.now();
2652
2529
  spinner.start(`Installing dependencies...`);
2653
2530
  const { exitCode, stderr, stdout } = await runCommandSilently({
2654
- command: process.env.VP_CLI_BIN ?? "vp",
2655
- args: ["install", ...installArgs],
2531
+ ...getVpCommand(["install", ...installArgs]),
2656
2532
  cwd,
2657
2533
  envs: process.env
2658
2534
  });
@@ -2684,12 +2560,11 @@ async function runViteFmt(cwd, interactive, paths, options) {
2684
2560
  const startTime = Date.now();
2685
2561
  spinner.start(`Formatting code...`);
2686
2562
  const { exitCode, stderr, stdout } = await runCommandSilently({
2687
- command: options?.command ?? process.env.VP_CLI_BIN ?? "vp",
2688
- args: [
2563
+ ...getVpCommand([
2689
2564
  ...options?.commandArgs ?? [],
2690
2565
  "fmt",
2691
2566
  ...paths ?? []
2692
- ],
2567
+ ], options?.command),
2693
2568
  cwd,
2694
2569
  envs: process.env
2695
2570
  });
@@ -2773,5 +2648,4 @@ async function resolveGitInit(options, isMonorepo) {
2773
2648
  function defaultInteractive() {
2774
2649
  return !process.env.CI && process.stdin.isTTY;
2775
2650
  }
2776
- //#endregion
2777
2651
  export { text as A, confirm as C, outro as D, multiselect as E, isCancel as M, select as O, normalize$1 as S, log as T, getSpinner as _, resolveGitInit as a, coerce as b, selectPackageManager as c, readYamlFile as d, scalarString as f, getSilentSpinner as g, resolveApproveBuildTargets as h, promptGitHooks as i, require_picocolors as j, spinner as k, upgradeYarn as l, detectGatedBuilds as m, defaultInteractive as n, runViteFmt as o, approveBuilds as p, downloadPackageManager$1 as r, runViteInstall as s, cancelAndExit as t, editYamlFile as u, DependencyType as v, intro as w, getMajor as x, PackageManager as y };
@@ -1,4 +1,3 @@
1
- //#region src/migration/compat/protocol.ts
1
+ // src/migration/compat/protocol.ts
2
2
  const ROLLDOWN_COMPAT_RESULT_PREFIX = "VITE_PLUS_ROLLDOWN_COMPAT_RESULT=";
3
- //#endregion
4
3
  export { ROLLDOWN_COMPAT_RESULT_PREFIX as t };