vite-plus 0.1.21-alpha.3 → 0.1.21-alpha.4

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.
@@ -10,24 +10,31 @@ import { downloadPackageManager, mergeJsonConfig, mergeTsdownConfig, rewriteEsli
10
10
  import fs from "node:fs";
11
11
  import { styleText } from "node:util";
12
12
  import process$1, { stdin, stdout } from "node:process";
13
- import * as _ from "node:readline";
14
- import P from "node:readline";
13
+ import * as b from "node:readline";
14
+ import l from "node:readline";
15
15
  import { ReadStream } from "node:tty";
16
16
  import fsPromises from "node:fs/promises";
17
- //#region ../../node_modules/.pnpm/fast-string-truncated-width@1.2.1/node_modules/fast-string-truncated-width/dist/utils.js
18
- const isAmbiguous$1 = (x) => {
19
- 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;
20
- };
17
+ //#region ../../node_modules/.pnpm/fast-string-truncated-width@3.0.3/node_modules/fast-string-truncated-width/dist/utils.js
18
+ const getCodePointsLength = (() => {
19
+ const SURROGATE_PAIR_RE = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g;
20
+ return (input) => {
21
+ let surrogatePairsNr = 0;
22
+ SURROGATE_PAIR_RE.lastIndex = 0;
23
+ while (SURROGATE_PAIR_RE.test(input)) surrogatePairsNr += 1;
24
+ return input.length - surrogatePairsNr;
25
+ };
26
+ })();
21
27
  const isFullWidth$1 = (x) => {
22
28
  return x === 12288 || x >= 65281 && x <= 65376 || x >= 65504 && x <= 65510;
23
29
  };
24
- const isWide$1 = (x) => {
25
- 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;
30
+ const isWideNotCJKTNotEmoji = (x) => {
31
+ 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;
26
32
  };
27
33
  //#endregion
28
- //#region ../../node_modules/.pnpm/fast-string-truncated-width@1.2.1/node_modules/fast-string-truncated-width/dist/index.js
29
- const ANSI_RE$1 = /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/y;
34
+ //#region ../../node_modules/.pnpm/fast-string-truncated-width@3.0.3/node_modules/fast-string-truncated-width/dist/index.js
35
+ const ANSI_RE$1 = /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]|\u001b\]8;[^;]*;.*?(?:\u0007|\u001b\u005c)/y;
30
36
  const CONTROL_RE$1 = /[\x00-\x08\x0A-\x1F\x7F-\x9F]{1,1000}/y;
37
+ const CJKT_WIDE_RE = /(?:(?![\uFF61-\uFF9F\uFF00-\uFFEF])[\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Hangul}\p{Script=Tangut}]){1,1000}/uy;
31
38
  const TAB_RE$1 = /\t{1,1000}/y;
32
39
  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;
33
40
  const LATIN_RE$1 = /(?:[\x20-\x7E\xA0-\xFF](?!\uFE0F)){1,1000}/y;
@@ -40,14 +47,21 @@ const getStringTruncatedWidth$1 = (input, truncationOptions = {}, widthOptions =
40
47
  const LIMIT = truncationOptions.limit ?? Infinity;
41
48
  const ELLIPSIS = truncationOptions.ellipsis ?? "";
42
49
  const ELLIPSIS_WIDTH = truncationOptions?.ellipsisWidth ?? (ELLIPSIS ? getStringTruncatedWidth$1(ELLIPSIS, NO_TRUNCATION$3, widthOptions).width : 0);
43
- const ANSI_WIDTH = widthOptions.ansiWidth ?? 0;
50
+ const ANSI_WIDTH = 0;
44
51
  const CONTROL_WIDTH = widthOptions.controlWidth ?? 0;
45
52
  const TAB_WIDTH = widthOptions.tabWidth ?? 8;
46
- const AMBIGUOUS_WIDTH = widthOptions.ambiguousWidth ?? 1;
47
53
  const EMOJI_WIDTH = widthOptions.emojiWidth ?? 2;
48
- const FULL_WIDTH_WIDTH = widthOptions.fullWidthWidth ?? 2;
54
+ const FULL_WIDTH_WIDTH = 2;
49
55
  const REGULAR_WIDTH = widthOptions.regularWidth ?? 1;
50
- const WIDE_WIDTH = widthOptions.wideWidth ?? 2;
56
+ const WIDE_WIDTH = widthOptions.wideWidth ?? FULL_WIDTH_WIDTH;
57
+ const PARSE_BLOCKS = [
58
+ [LATIN_RE$1, REGULAR_WIDTH],
59
+ [ANSI_RE$1, ANSI_WIDTH],
60
+ [CONTROL_RE$1, CONTROL_WIDTH],
61
+ [TAB_RE$1, TAB_WIDTH],
62
+ [EMOJI_RE$1, EMOJI_WIDTH],
63
+ [CJKT_WIDE_RE, WIDE_WIDTH]
64
+ ];
51
65
  let indexPrev = 0;
52
66
  let index = 0;
53
67
  let length = input.length;
@@ -66,8 +80,7 @@ const getStringTruncatedWidth$1 = (input, truncationOptions = {}, widthOptions =
66
80
  for (const char of unmatched.replaceAll(MODIFIER_RE$1, "")) {
67
81
  const codePoint = char.codePointAt(0) || 0;
68
82
  if (isFullWidth$1(codePoint)) widthExtra = FULL_WIDTH_WIDTH;
69
- else if (isWide$1(codePoint)) widthExtra = WIDE_WIDTH;
70
- else if (AMBIGUOUS_WIDTH !== REGULAR_WIDTH && isAmbiguous$1(codePoint)) widthExtra = AMBIGUOUS_WIDTH;
83
+ else if (isWideNotCJKTNotEmoji(codePoint)) widthExtra = WIDE_WIDTH;
71
84
  else widthExtra = REGULAR_WIDTH;
72
85
  if (width + widthExtra > truncationLimit) truncationIndex = Math.min(truncationIndex, Math.max(unmatchedStart, indexPrev) + lengthExtra);
73
86
  if (width + widthExtra > LIMIT) {
@@ -79,77 +92,24 @@ const getStringTruncatedWidth$1 = (input, truncationOptions = {}, widthOptions =
79
92
  }
80
93
  unmatchedStart = unmatchedEnd = 0;
81
94
  }
82
- if (index >= length) break;
83
- LATIN_RE$1.lastIndex = index;
84
- if (LATIN_RE$1.test(input)) {
85
- lengthExtra = LATIN_RE$1.lastIndex - index;
86
- widthExtra = lengthExtra * REGULAR_WIDTH;
87
- if (width + widthExtra > truncationLimit) truncationIndex = Math.min(truncationIndex, index + Math.floor((truncationLimit - width) / REGULAR_WIDTH));
88
- if (width + widthExtra > LIMIT) {
89
- truncationEnabled = true;
90
- break;
91
- }
92
- width += widthExtra;
93
- unmatchedStart = indexPrev;
94
- unmatchedEnd = index;
95
- index = indexPrev = LATIN_RE$1.lastIndex;
96
- continue;
97
- }
98
- ANSI_RE$1.lastIndex = index;
99
- if (ANSI_RE$1.test(input)) {
100
- if (width + ANSI_WIDTH > truncationLimit) truncationIndex = Math.min(truncationIndex, index);
101
- if (width + ANSI_WIDTH > LIMIT) {
102
- truncationEnabled = true;
103
- break;
104
- }
105
- width += ANSI_WIDTH;
106
- unmatchedStart = indexPrev;
107
- unmatchedEnd = index;
108
- index = indexPrev = ANSI_RE$1.lastIndex;
109
- continue;
110
- }
111
- CONTROL_RE$1.lastIndex = index;
112
- if (CONTROL_RE$1.test(input)) {
113
- lengthExtra = CONTROL_RE$1.lastIndex - index;
114
- widthExtra = lengthExtra * CONTROL_WIDTH;
115
- if (width + widthExtra > truncationLimit) truncationIndex = Math.min(truncationIndex, index + Math.floor((truncationLimit - width) / CONTROL_WIDTH));
116
- if (width + widthExtra > LIMIT) {
117
- truncationEnabled = true;
118
- break;
119
- }
120
- width += widthExtra;
121
- unmatchedStart = indexPrev;
122
- unmatchedEnd = index;
123
- index = indexPrev = CONTROL_RE$1.lastIndex;
124
- continue;
125
- }
126
- TAB_RE$1.lastIndex = index;
127
- if (TAB_RE$1.test(input)) {
128
- lengthExtra = TAB_RE$1.lastIndex - index;
129
- widthExtra = lengthExtra * TAB_WIDTH;
130
- if (width + widthExtra > truncationLimit) truncationIndex = Math.min(truncationIndex, index + Math.floor((truncationLimit - width) / TAB_WIDTH));
131
- if (width + widthExtra > LIMIT) {
132
- truncationEnabled = true;
133
- break;
134
- }
135
- width += widthExtra;
136
- unmatchedStart = indexPrev;
137
- unmatchedEnd = index;
138
- index = indexPrev = TAB_RE$1.lastIndex;
139
- continue;
140
- }
141
- EMOJI_RE$1.lastIndex = index;
142
- if (EMOJI_RE$1.test(input)) {
143
- if (width + EMOJI_WIDTH > truncationLimit) truncationIndex = Math.min(truncationIndex, index);
144
- if (width + EMOJI_WIDTH > LIMIT) {
145
- truncationEnabled = true;
146
- break;
95
+ if (index >= length) break outer;
96
+ for (let i = 0, l = PARSE_BLOCKS.length; i < l; i++) {
97
+ const [BLOCK_RE, BLOCK_WIDTH] = PARSE_BLOCKS[i];
98
+ BLOCK_RE.lastIndex = index;
99
+ if (BLOCK_RE.test(input)) {
100
+ lengthExtra = BLOCK_RE === CJKT_WIDE_RE ? getCodePointsLength(input.slice(index, BLOCK_RE.lastIndex)) : BLOCK_RE === EMOJI_RE$1 ? 1 : BLOCK_RE.lastIndex - index;
101
+ widthExtra = lengthExtra * BLOCK_WIDTH;
102
+ if (width + widthExtra > truncationLimit) truncationIndex = Math.min(truncationIndex, index + Math.floor((truncationLimit - width) / BLOCK_WIDTH));
103
+ if (width + widthExtra > LIMIT) {
104
+ truncationEnabled = true;
105
+ break outer;
106
+ }
107
+ width += widthExtra;
108
+ unmatchedStart = indexPrev;
109
+ unmatchedEnd = index;
110
+ index = indexPrev = BLOCK_RE.lastIndex;
111
+ continue outer;
147
112
  }
148
- width += EMOJI_WIDTH;
149
- unmatchedStart = indexPrev;
150
- unmatchedEnd = index;
151
- index = indexPrev = EMOJI_RE$1.lastIndex;
152
- continue;
153
113
  }
154
114
  index += 1;
155
115
  }
@@ -161,7 +121,7 @@ const getStringTruncatedWidth$1 = (input, truncationOptions = {}, widthOptions =
161
121
  };
162
122
  };
163
123
  //#endregion
164
- //#region ../../node_modules/.pnpm/fast-string-width@1.1.0/node_modules/fast-string-width/dist/index.js
124
+ //#region ../../node_modules/.pnpm/fast-string-width@3.0.2/node_modules/fast-string-width/dist/index.js
165
125
  const NO_TRUNCATION$2 = {
166
126
  limit: Infinity,
167
127
  ellipsis: "",
@@ -171,7 +131,7 @@ const fastStringWidth$1 = (input, options = {}) => {
171
131
  return getStringTruncatedWidth$1(input, NO_TRUNCATION$2, options).width;
172
132
  };
173
133
  //#endregion
174
- //#region ../../node_modules/.pnpm/fast-wrap-ansi@0.1.6/node_modules/fast-wrap-ansi/lib/main.js
134
+ //#region ../../node_modules/.pnpm/fast-wrap-ansi@0.2.0/node_modules/fast-wrap-ansi/lib/main.js
175
135
  const ESC$1 = "\x1B";
176
136
  const CSI$1 = "›";
177
137
  const END_CODE$1 = 39;
@@ -308,8 +268,10 @@ const exec$1 = (string, columns, options = {}) => {
308
268
  for (let i = 0; i < preString.length; i++) {
309
269
  const character = preString[i];
310
270
  returnValue += character;
311
- if (!inSurrogate) inSurrogate = character >= "\ud800" && character <= "\udbff";
312
- else continue;
271
+ if (!inSurrogate) {
272
+ inSurrogate = character >= "\ud800" && character <= "\udbff";
273
+ if (inSurrogate) continue;
274
+ } else inSurrogate = false;
313
275
  if (character === ESC$1 || character === CSI$1) {
314
276
  GROUP_REGEX$1.lastIndex = i + 1;
315
277
  const groups = GROUP_REGEX$1.exec(preString)?.groups;
@@ -334,7 +296,7 @@ function wrapAnsi$1(string, columns, options) {
334
296
  return String(string).normalize().split(CRLF_OR_LF$1).map((line) => exec$1(line, columns, options)).join("\n");
335
297
  }
336
298
  //#endregion
337
- //#region ../../node_modules/.pnpm/@clack+core@1.2.0/node_modules/@clack/core/dist/index.mjs
299
+ //#region ../../node_modules/.pnpm/@clack+core@1.3.0/node_modules/@clack/core/dist/index.mjs
338
300
  var import_src = (/* @__PURE__ */ __commonJSMin(((exports, module) => {
339
301
  const ESC = "\x1B";
340
302
  const CSI = `${ESC}[`;
@@ -387,12 +349,12 @@ var import_src = (/* @__PURE__ */ __commonJSMin(((exports, module) => {
387
349
  beep
388
350
  };
389
351
  })))();
390
- function d(r, t, e) {
391
- if (!e.some((o) => !o.disabled)) return r;
392
- const s = r + t, i = Math.max(e.length - 1, 0), n = s < 0 ? i : s > i ? 0 : s;
393
- return e[n].disabled ? d(n, t < 0 ? -1 : 1, e) : n;
352
+ function d(r, t, s) {
353
+ if (!s.some((o) => !o.disabled)) return r;
354
+ const e = r + t, i = Math.max(s.length - 1, 0), n = e < 0 ? i : e > i ? 0 : e;
355
+ return s[n].disabled ? d(n, t < 0 ? -1 : 1, s) : n;
394
356
  }
395
- const u = {
357
+ const h = {
396
358
  actions: new Set([
397
359
  "up",
398
360
  "down",
@@ -439,68 +401,71 @@ const u = {
439
401
  }
440
402
  }
441
403
  };
442
- function V(r, t) {
443
- if (typeof r == "string") return u.aliases.get(r) === t;
444
- for (const e of r) if (e !== void 0 && V(e, t)) return !0;
404
+ function C(r, t) {
405
+ if (typeof r == "string") return h.aliases.get(r) === t;
406
+ for (const s of r) if (s !== void 0 && C(s, t)) return !0;
445
407
  return !1;
446
408
  }
447
- function j(r, t) {
409
+ function z(r, t) {
448
410
  if (r === t) return;
449
- const e = r.split(`
450
- `), s = t.split(`
451
- `), i = Math.max(e.length, s.length), n = [];
452
- for (let o = 0; o < i; o++) e[o] !== s[o] && n.push(o);
411
+ const s = r.split(`
412
+ `), e = t.split(`
413
+ `), i = Math.max(s.length, e.length), n = [];
414
+ for (let o = 0; o < i; o++) s[o] !== e[o] && n.push(o);
453
415
  return {
454
416
  lines: n,
455
- numLinesBefore: e.length,
456
- numLinesAfter: s.length,
417
+ numLinesBefore: s.length,
418
+ numLinesAfter: e.length,
457
419
  numLines: i
458
420
  };
459
421
  }
460
- const Y = globalThis.process.platform.startsWith("win"), C = Symbol("clack:cancel");
422
+ const Y = globalThis.process.platform.startsWith("win"), k = Symbol("clack:cancel");
461
423
  function q(r) {
462
- return r === C;
424
+ return r === k;
463
425
  }
464
426
  function w(r, t) {
465
- const e = r;
466
- e.isTTY && e.setRawMode(t);
427
+ const s = r;
428
+ s.isTTY && s.setRawMode(t);
467
429
  }
468
- function z({ input: r = stdin, output: t = stdout, overwrite: e = !0, hideCursor: s = !0 } = {}) {
469
- const i = _.createInterface({
430
+ function R({ input: r = stdin, output: t = stdout, overwrite: s = !0, hideCursor: e = !0 } = {}) {
431
+ const i = b.createInterface({
470
432
  input: r,
471
433
  output: t,
472
434
  prompt: "",
473
435
  tabSize: 1
474
436
  });
475
- _.emitKeypressEvents(r, i), r instanceof ReadStream && r.isTTY && r.setRawMode(!0);
476
- const n = (o, { name: a, sequence: h }) => {
477
- if (V([
437
+ b.emitKeypressEvents(r, i), r instanceof ReadStream && r.isTTY && r.setRawMode(!0);
438
+ const n = (o, { name: u, sequence: a }) => {
439
+ if (C([
478
440
  String(o),
479
- a,
480
- h
441
+ u,
442
+ a
481
443
  ], "cancel")) {
482
- s && t.write(import_src.cursor.show), process.exit(0);
444
+ e && t.write(import_src.cursor.show), process.exit(0);
483
445
  return;
484
446
  }
485
- if (!e) return;
486
- const f = a === "return" ? 0 : -1, v = a === "return" ? -1 : 0;
487
- _.moveCursor(t, f, v, () => {
488
- _.clearLine(t, 1, () => {
447
+ if (!s) return;
448
+ const f = u === "return" ? 0 : -1, y = u === "return" ? -1 : 0;
449
+ b.moveCursor(t, f, y, () => {
450
+ b.clearLine(t, 1, () => {
489
451
  r.once("keypress", n);
490
452
  });
491
453
  });
492
454
  };
493
- return s && t.write(import_src.cursor.hide), r.once("keypress", n), () => {
494
- r.off("keypress", n), s && t.write(import_src.cursor.show), r instanceof ReadStream && r.isTTY && !Y && r.setRawMode(!1), i.terminal = !1, i.close();
455
+ return e && t.write(import_src.cursor.hide), r.once("keypress", n), () => {
456
+ r.off("keypress", n), e && t.write(import_src.cursor.show), r instanceof ReadStream && r.isTTY && !Y && r.setRawMode(!1), i.terminal = !1, i.close();
495
457
  };
496
458
  }
497
- const O = (r) => "columns" in r && typeof r.columns == "number" ? r.columns : 80, A = (r) => "rows" in r && typeof r.rows == "number" ? r.rows : 20;
498
- function R(r, t, e, s = e) {
499
- return wrapAnsi$1(t, O(r ?? stdout) - e.length, {
459
+ const A = (r) => "columns" in r && typeof r.columns == "number" ? r.columns : 80, L = (r) => "rows" in r && typeof r.rows == "number" ? r.rows : 20;
460
+ function W(r, t, s, e = s, i) {
461
+ return wrapAnsi$1(t, A(r ?? stdout) - s.length, {
500
462
  hard: !0,
501
463
  trim: !1
502
464
  }).split(`
503
- `).map((n, o) => `${o === 0 ? s : e}${n}`).join(`
465
+ `).map((o, u) => {
466
+ const a = i ? i(o, u) : o;
467
+ return `${u === 0 ? e : s}${a}`;
468
+ }).join(`
504
469
  `);
505
470
  }
506
471
  let p = class {
@@ -518,40 +483,40 @@ let p = class {
518
483
  error = "";
519
484
  value;
520
485
  userInput = "";
521
- constructor(t, e = !0) {
522
- const { input: s = stdin, output: i = stdout, render: n, signal: o, ...a } = t;
523
- this.opts = a, this.onKeypress = this.onKeypress.bind(this), this.close = this.close.bind(this), this.render = this.render.bind(this), this._render = n.bind(this), this._track = e, this._abortSignal = o, this.input = s, this.output = i;
486
+ constructor(t, s = !0) {
487
+ const { input: e = stdin, output: i = stdout, render: n, signal: o, ...u } = t;
488
+ this.opts = u, this.onKeypress = this.onKeypress.bind(this), this.close = this.close.bind(this), this.render = this.render.bind(this), this._render = n.bind(this), this._track = s, this._abortSignal = o, this.input = e, this.output = i;
524
489
  }
525
490
  unsubscribe() {
526
491
  this._subscribers.clear();
527
492
  }
528
- setSubscriber(t, e) {
529
- const s = this._subscribers.get(t) ?? [];
530
- s.push(e), this._subscribers.set(t, s);
493
+ setSubscriber(t, s) {
494
+ const e = this._subscribers.get(t) ?? [];
495
+ e.push(s), this._subscribers.set(t, e);
531
496
  }
532
- on(t, e) {
533
- this.setSubscriber(t, { cb: e });
497
+ on(t, s) {
498
+ this.setSubscriber(t, { cb: s });
534
499
  }
535
- once(t, e) {
500
+ once(t, s) {
536
501
  this.setSubscriber(t, {
537
- cb: e,
502
+ cb: s,
538
503
  once: !0
539
504
  });
540
505
  }
541
- emit(t, ...e) {
542
- const s = this._subscribers.get(t) ?? [], i = [];
543
- for (const n of s) n.cb(...e), n.once && i.push(() => s.splice(s.indexOf(n), 1));
506
+ emit(t, ...s) {
507
+ const e = this._subscribers.get(t) ?? [], i = [];
508
+ for (const n of e) n.cb(...s), n.once && i.push(() => e.splice(e.indexOf(n), 1));
544
509
  for (const n of i) n();
545
510
  }
546
511
  prompt() {
547
512
  return new Promise((t) => {
548
513
  if (this._abortSignal) {
549
- if (this._abortSignal.aborted) return this.state = "cancel", this.close(), t(C);
514
+ if (this._abortSignal.aborted) return this.state = "cancel", this.close(), t(k);
550
515
  this._abortSignal.addEventListener("abort", () => {
551
516
  this.state = "cancel", this.close();
552
517
  }, { once: !0 });
553
518
  }
554
- this.rl = P.createInterface({
519
+ this.rl = l.createInterface({
555
520
  input: this.input,
556
521
  tabSize: 2,
557
522
  prompt: "",
@@ -560,18 +525,21 @@ let p = class {
560
525
  }), this.rl.prompt(), this.opts.initialUserInput !== void 0 && this._setUserInput(this.opts.initialUserInput, !0), this.input.on("keypress", this.onKeypress), w(this.input, !0), this.output.on("resize", this.render), this.render(), this.once("submit", () => {
561
526
  this.output.write(import_src.cursor.show), this.output.off("resize", this.render), w(this.input, !1), t(this.value);
562
527
  }), this.once("cancel", () => {
563
- this.output.write(import_src.cursor.show), this.output.off("resize", this.render), w(this.input, !1), t(C);
528
+ this.output.write(import_src.cursor.show), this.output.off("resize", this.render), w(this.input, !1), t(k);
564
529
  });
565
530
  });
566
531
  }
567
- _isActionKey(t, e) {
532
+ _isActionKey(t, s) {
568
533
  return t === " ";
569
534
  }
535
+ _shouldSubmit(t, s) {
536
+ return !0;
537
+ }
570
538
  _setValue(t) {
571
539
  this.value = t, this.emit("value", this.value);
572
540
  }
573
- _setUserInput(t, e) {
574
- this.userInput = t ?? "", this.emit("userInput", this.userInput), e && this._track && this.rl && (this.rl.write(this.userInput), this._cursor = this.rl.cursor);
541
+ _setUserInput(t, s) {
542
+ this.userInput = t ?? "", this.emit("userInput", this.userInput), s && this._track && this.rl && (this.rl.write(this.userInput), this._cursor = this.rl.cursor);
575
543
  }
576
544
  _clearUserInput() {
577
545
  this.rl?.write(null, {
@@ -579,21 +547,21 @@ let p = class {
579
547
  name: "u"
580
548
  }), this._setUserInput("");
581
549
  }
582
- onKeypress(t, e) {
583
- if (this._track && e.name !== "return" && (e.name && this._isActionKey(t, e) && this.rl?.write(null, {
550
+ onKeypress(t, s) {
551
+ if (this._track && s.name !== "return" && (s.name && this._isActionKey(t, s) && this.rl?.write(null, {
584
552
  ctrl: !0,
585
553
  name: "h"
586
- }), this._cursor = this.rl?.cursor ?? 0, this._setUserInput(this.rl?.line)), this.state === "error" && (this.state = "active"), e?.name && (!this._track && u.aliases.has(e.name) && this.emit("cursor", u.aliases.get(e.name)), u.actions.has(e.name) && this.emit("cursor", e.name)), t && (t.toLowerCase() === "y" || t.toLowerCase() === "n") && this.emit("confirm", t.toLowerCase() === "y"), this.emit("key", t?.toLowerCase(), e), e?.name === "return") {
554
+ }), this._cursor = this.rl?.cursor ?? 0, this._setUserInput(this.rl?.line)), this.state === "error" && (this.state = "active"), s?.name && (!this._track && h.aliases.has(s.name) && this.emit("cursor", h.aliases.get(s.name)), h.actions.has(s.name) && this.emit("cursor", s.name)), t && (t.toLowerCase() === "y" || t.toLowerCase() === "n") && this.emit("confirm", t.toLowerCase() === "y"), this.emit("key", t?.toLowerCase(), s), s?.name === "return" && this._shouldSubmit(t, s)) {
587
555
  if (this.opts.validate) {
588
- const s = this.opts.validate(this.value);
589
- s && (this.error = s instanceof Error ? s.message : s, this.state = "error", this.rl?.write(this.userInput));
556
+ const e = this.opts.validate(this.value);
557
+ e && (this.error = e instanceof Error ? e.message : e, this.state = "error", this.rl?.write(this.userInput));
590
558
  }
591
559
  this.state !== "error" && (this.state = "submit");
592
560
  }
593
- V([
561
+ C([
594
562
  t,
595
- e?.name,
596
- e?.sequence
563
+ s?.name,
564
+ s?.sequence
597
565
  ], "cancel") && (this.state = "cancel"), (this.state === "submit" || this.state === "cancel") && this.emit("finalize"), this.render(), (this.state === "submit" || this.state === "cancel") && this.close();
598
566
  }
599
567
  close() {
@@ -616,30 +584,30 @@ let p = class {
616
584
  if (t !== this._prevFrame) {
617
585
  if (this.state === "initial") this.output.write(import_src.cursor.hide);
618
586
  else {
619
- const e = j(this._prevFrame, t), s = A(this.output);
620
- if (this.restoreCursor(), e) {
621
- const i = Math.max(0, e.numLinesAfter - s), n = Math.max(0, e.numLinesBefore - s);
622
- let o = e.lines.find((a) => a >= i);
587
+ const s = z(this._prevFrame, t), e = L(this.output);
588
+ if (this.restoreCursor(), s) {
589
+ const i = Math.max(0, s.numLinesAfter - e), n = Math.max(0, s.numLinesBefore - e);
590
+ let o = s.lines.find((u) => u >= i);
623
591
  if (o === void 0) {
624
592
  this._prevFrame = t;
625
593
  return;
626
594
  }
627
- if (e.lines.length === 1) {
595
+ if (s.lines.length === 1) {
628
596
  this.output.write(import_src.cursor.move(0, o - n)), this.output.write(import_src.erase.lines(1));
629
- const a = t.split(`
597
+ const u = t.split(`
630
598
  `);
631
- this.output.write(a[o]), this._prevFrame = t, this.output.write(import_src.cursor.move(0, a.length - o - 1));
599
+ this.output.write(u[o]), this._prevFrame = t, this.output.write(import_src.cursor.move(0, u.length - o - 1));
632
600
  return;
633
- } else if (e.lines.length > 1) {
601
+ } else if (s.lines.length > 1) {
634
602
  if (i < n) o = i;
635
603
  else {
636
- const h = o - n;
637
- h > 0 && this.output.write(import_src.cursor.move(0, h));
604
+ const a = o - n;
605
+ a > 0 && this.output.write(import_src.cursor.move(0, a));
638
606
  }
639
607
  this.output.write(import_src.erase.down());
640
- const a = t.split(`
608
+ const u = t.split(`
641
609
  `).slice(o);
642
- this.output.write(a.join(`
610
+ this.output.write(u.join(`
643
611
  `)), this._prevFrame = t;
644
612
  return;
645
613
  }
@@ -650,7 +618,7 @@ let p = class {
650
618
  }
651
619
  }
652
620
  };
653
- var Q = class extends p {
621
+ var X = class extends p {
654
622
  get cursor() {
655
623
  return this.value ? 0 : 1;
656
624
  }
@@ -660,14 +628,14 @@ var Q = class extends p {
660
628
  constructor(t) {
661
629
  super(t, !1), this.value = !!t.initialValue, this.on("userInput", () => {
662
630
  this.value = this._value;
663
- }), this.on("confirm", (e) => {
664
- this.output.write(import_src.cursor.move(0, -1)), this.value = e, this.state = "submit", this.close();
631
+ }), this.on("confirm", (s) => {
632
+ this.output.write(import_src.cursor.move(0, -1)), this.value = s, this.state = "submit", this.close();
665
633
  }), this.on("cursor", () => {
666
634
  this.value = !this.value;
667
635
  });
668
636
  }
669
637
  };
670
- let it = class extends p {
638
+ let nt = class extends p {
671
639
  options;
672
640
  cursor = 0;
673
641
  get _value() {
@@ -677,27 +645,27 @@ let it = class extends p {
677
645
  return this.options.filter((t) => t.disabled !== !0);
678
646
  }
679
647
  toggleAll() {
680
- const t = this._enabledOptions, e = this.value !== void 0 && this.value.length === t.length;
681
- this.value = e ? [] : t.map((s) => s.value);
648
+ const t = this._enabledOptions, s = this.value !== void 0 && this.value.length === t.length;
649
+ this.value = s ? [] : t.map((e) => e.value);
682
650
  }
683
651
  toggleInvert() {
684
652
  const t = this.value;
685
653
  if (!t) return;
686
- const e = this._enabledOptions.filter((s) => !t.includes(s.value));
687
- this.value = e.map((s) => s.value);
654
+ const s = this._enabledOptions.filter((e) => !t.includes(e.value));
655
+ this.value = s.map((e) => e.value);
688
656
  }
689
657
  toggleValue() {
690
658
  this.value === void 0 && (this.value = []);
691
659
  const t = this.value.includes(this._value);
692
- this.value = t ? this.value.filter((e) => e !== this._value) : [...this.value, this._value];
660
+ this.value = t ? this.value.filter((s) => s !== this._value) : [...this.value, this._value];
693
661
  }
694
662
  constructor(t) {
695
663
  super(t, !1), this.options = t.options, this.value = [...t.initialValues ?? []];
696
- const e = Math.max(this.options.findIndex(({ value: s }) => s === t.cursorAt), 0);
697
- this.cursor = this.options[e].disabled ? d(e, 1, this.options) : e, this.on("key", (s) => {
698
- s === "a" && this.toggleAll(), s === "i" && this.toggleInvert();
699
- }), this.on("cursor", (s) => {
700
- switch (s) {
664
+ const s = Math.max(this.options.findIndex(({ value: e }) => e === t.cursorAt), 0);
665
+ this.cursor = this.options[s].disabled ? d(s, 1, this.options) : s, this.on("key", (e) => {
666
+ e === "a" && this.toggleAll(), e === "i" && this.toggleInvert();
667
+ }), this.on("cursor", (e) => {
668
+ switch (e) {
701
669
  case "left":
702
670
  case "up":
703
671
  this.cursor = d(this.cursor, -1, this.options);
@@ -713,7 +681,7 @@ let it = class extends p {
713
681
  });
714
682
  }
715
683
  };
716
- var nt = class extends p {
684
+ var ut = class extends p {
717
685
  options;
718
686
  cursor = 0;
719
687
  get _selectedValue() {
@@ -724,8 +692,8 @@ var nt = class extends p {
724
692
  }
725
693
  constructor(t) {
726
694
  super(t, !1), this.options = t.options;
727
- const e = this.options.findIndex(({ value: i }) => i === t.initialValue), s = e === -1 ? 0 : e;
728
- this.cursor = this.options[s].disabled ? d(s, 1, this.options) : s, this.changeValue(), this.on("cursor", (i) => {
695
+ const s = this.options.findIndex(({ value: i }) => i === t.initialValue), e = s === -1 ? 0 : s;
696
+ this.cursor = this.options[e].disabled ? d(e, 1, this.options) : e, this.changeValue(), this.on("cursor", (i) => {
729
697
  switch (i) {
730
698
  case "left":
731
699
  case "up":
@@ -740,13 +708,13 @@ var nt = class extends p {
740
708
  });
741
709
  }
742
710
  };
743
- var at = class extends p {
711
+ var ht = class extends p {
744
712
  get userInputWithCursor() {
745
713
  if (this.state === "submit") return this.userInput;
746
714
  const t = this.userInput;
747
715
  if (this.cursor >= t.length) return `${this.userInput}\u2588`;
748
- const e = t.slice(0, this.cursor), [s, ...i] = t.slice(this.cursor);
749
- return `${e}${styleText("inverse", s)}${i.join("")}`;
716
+ const s = t.slice(0, this.cursor), [e, ...i] = t.slice(this.cursor);
717
+ return `${s}${styleText("inverse", e)}${i.join("")}`;
750
718
  }
751
719
  get cursor() {
752
720
  return this._cursor;
@@ -755,8 +723,8 @@ var at = class extends p {
755
723
  super({
756
724
  ...t,
757
725
  initialUserInput: t.initialUserInput ?? t.initialValue
758
- }), this.on("userInput", (e) => {
759
- this._setValue(e);
726
+ }), this.on("userInput", (s) => {
727
+ this._setValue(s);
760
728
  }), this.on("finalize", () => {
761
729
  this.value || (this.value = t.defaultValue), this.value === void 0 && (this.value = "");
762
730
  });
@@ -1204,11 +1172,11 @@ const trimLines = (groups, initialLineCount, startIndex, endIndex, maxLines) =>
1204
1172
  const limitOptions = (params) => {
1205
1173
  const { cursor, options, style } = params;
1206
1174
  const output = params.output ?? process.stdout;
1207
- const columns = O(output);
1175
+ const columns = A(output);
1208
1176
  const columnPadding = params.columnPadding ?? 0;
1209
1177
  const rowPadding = params.rowPadding ?? 4;
1210
1178
  const maxWidth = columns - columnPadding;
1211
- const rows = A(output);
1179
+ const rows = L(output);
1212
1180
  const overflowFormat = import_picocolors.default.dim("...");
1213
1181
  const paramMaxItems = params.maxItems ?? Number.POSITIVE_INFINITY;
1214
1182
  const outputMaxItems = Math.max(rows - rowPadding, 0);
@@ -1263,7 +1231,7 @@ const limitOptions = (params) => {
1263
1231
  const confirm = (opts) => {
1264
1232
  const active = opts.active ?? "Yes";
1265
1233
  const inactive = opts.inactive ?? "No";
1266
- return new Q({
1234
+ return new X({
1267
1235
  active,
1268
1236
  inactive,
1269
1237
  signal: opts.signal,
@@ -1373,7 +1341,7 @@ const multiselect = (opts) => {
1373
1341
  };
1374
1342
  const required = opts.required ?? true;
1375
1343
  const hint = " " + import_picocolors.default.reset(import_picocolors.default.dim(`Press ${import_picocolors.default.gray(import_picocolors.default.bgWhite(import_picocolors.default.inverse(" space ")))} to select, ${import_picocolors.default.gray(import_picocolors.default.bgWhite(import_picocolors.default.inverse(" enter ")))} to submit`));
1376
- return new it({
1344
+ return new nt({
1377
1345
  options: opts.options,
1378
1346
  signal: opts.signal,
1379
1347
  input: opts.input,
@@ -1390,7 +1358,7 @@ const multiselect = (opts) => {
1390
1358
  const formatMessageLines = (message) => {
1391
1359
  return message.split("\n").map((line, index) => `${index === 0 ? `${symbol(this.state)} ` : nestedPrefix}${line}`).join("\n");
1392
1360
  };
1393
- const wrappedMessage = hasGuide ? R(opts.output, opts.message, `${symbolBar(this.state)} `, `${symbol(this.state)} `) : formatMessageLines(opts.message);
1361
+ const wrappedMessage = hasGuide ? W(opts.output, opts.message, `${symbolBar(this.state)} `, `${symbol(this.state)} `) : formatMessageLines(opts.message);
1394
1362
  const title = `${hasGuide ? `${import_picocolors.default.gray(S_BAR)}\n` : ""}${wrappedMessage}\n`;
1395
1363
  const value = this.value ?? [];
1396
1364
  const styleOption = (option, active) => {
@@ -1404,13 +1372,13 @@ const multiselect = (opts) => {
1404
1372
  case "submit": {
1405
1373
  const submitText = this.options.filter(({ value: optionValue }) => value.includes(optionValue)).map((option) => opt(option, "submitted")).join(import_picocolors.default.dim(", ")) || import_picocolors.default.dim("none");
1406
1374
  const submitPrefix = hasGuide ? `${import_picocolors.default.gray(S_BAR)} ` : nestedPrefix;
1407
- return `${title}${R(opts.output, submitText, submitPrefix)}\n`;
1375
+ return `${title}${W(opts.output, submitText, submitPrefix)}\n`;
1408
1376
  }
1409
1377
  case "cancel": {
1410
1378
  const label = this.options.filter(({ value: optionValue }) => value.includes(optionValue)).map((option) => opt(option, "cancelled")).join(import_picocolors.default.dim(", "));
1411
1379
  if (label.trim() === "") return hasGuide ? `${title}${import_picocolors.default.gray(S_BAR)}\n` : `${title.trimEnd()}\n`;
1412
1380
  const cancelPrefix = hasGuide ? `${import_picocolors.default.gray(S_BAR)} ` : nestedPrefix;
1413
- const wrappedLabel = R(opts.output, label, cancelPrefix);
1381
+ const wrappedLabel = W(opts.output, label, cancelPrefix);
1414
1382
  return hasGuide ? `${title}${wrappedLabel}\n${import_picocolors.default.gray(S_BAR)}\n` : `${title}${wrappedLabel}\n`;
1415
1383
  }
1416
1384
  case "error": {
@@ -1476,14 +1444,14 @@ const spinner = ({ indicator = "dots", onCancel, output = process.stdout, cancel
1476
1444
  let _prevMessage;
1477
1445
  let _origin = performance.now();
1478
1446
  let _elapsedMs = 0;
1479
- const columns = O(output);
1447
+ const columns = A(output);
1480
1448
  const styleFn = opts?.styleFrame ?? defaultStyleFn;
1481
1449
  const getElapsedMs = () => {
1482
1450
  if (!isSpinnerActive) return _elapsedMs;
1483
1451
  return _elapsedMs + (performance.now() - _origin);
1484
1452
  };
1485
1453
  const handleExit = (code) => {
1486
- const msg = code > 1 ? errorMessage ?? u.messages.error : cancelMessage ?? u.messages.cancel;
1454
+ const msg = code > 1 ? errorMessage ?? h.messages.error : cancelMessage ?? h.messages.cancel;
1487
1455
  isCancelled = code === 1;
1488
1456
  if (isSpinnerActive) {
1489
1457
  _stop(msg, code);
@@ -1522,7 +1490,7 @@ const spinner = ({ indicator = "dots", onCancel, output = process.stdout, cancel
1522
1490
  const hasGuide = opts.withGuide ?? false;
1523
1491
  const startLoop = () => {
1524
1492
  isSpinnerActive = true;
1525
- unblock = z({ output });
1493
+ unblock = R({ output });
1526
1494
  _origin = performance.now();
1527
1495
  _prevMessage = void 0;
1528
1496
  if (hasGuide) output.write(`${import_picocolors.default.gray(S_BAR)}\n`);
@@ -1623,7 +1591,7 @@ const select = (opts) => {
1623
1591
  default: return withMarker(import_picocolors.default.dim(" "), label, (text) => text, hint);
1624
1592
  }
1625
1593
  };
1626
- return new nt({
1594
+ return new ut({
1627
1595
  options: opts.options,
1628
1596
  signal: opts.signal,
1629
1597
  input: opts.input,
@@ -1636,16 +1604,16 @@ const select = (opts) => {
1636
1604
  return message.split("\n").map((line, index) => `${index === 0 ? `${symbol(this.state)} ` : nestedPrefix}${line}`).join("\n");
1637
1605
  };
1638
1606
  const hasMessage = opts.message.trim().length > 0;
1639
- const messageLines = !hasMessage ? "" : hasGuide ? R(opts.output, opts.message, `${symbolBar(this.state)} `, `${symbol(this.state)} `) : formatMessageLines(opts.message);
1607
+ const messageLines = !hasMessage ? "" : hasGuide ? W(opts.output, opts.message, `${symbolBar(this.state)} `, `${symbol(this.state)} `) : formatMessageLines(opts.message);
1640
1608
  const title = hasMessage ? `${hasGuide ? `${import_picocolors.default.gray(S_BAR)}\n` : ""}${messageLines}\n` : "";
1641
1609
  switch (this.state) {
1642
1610
  case "submit": {
1643
1611
  const submitPrefix = hasGuide ? `${import_picocolors.default.gray(S_BAR)} ` : nestedPrefix;
1644
- return `${title}${R(opts.output, opt(this.options[this.cursor], "selected"), submitPrefix)}\n`;
1612
+ return `${title}${W(opts.output, opt(this.options[this.cursor], "selected"), submitPrefix)}\n`;
1645
1613
  }
1646
1614
  case "cancel": {
1647
1615
  const cancelPrefix = hasGuide ? `${import_picocolors.default.gray(S_BAR)} ` : nestedPrefix;
1648
- return `${title}${R(opts.output, opt(this.options[this.cursor], "cancelled"), cancelPrefix)}${hasGuide ? `\n${import_picocolors.default.gray(S_BAR)}` : ""}\n`;
1616
+ return `${title}${W(opts.output, opt(this.options[this.cursor], "cancelled"), cancelPrefix)}${hasGuide ? `\n${import_picocolors.default.gray(S_BAR)}` : ""}\n`;
1649
1617
  }
1650
1618
  default: {
1651
1619
  const prefix = hasGuide ? `${import_picocolors.default.blue(S_BAR)} ` : nestedPrefix;
@@ -1667,7 +1635,7 @@ const select = (opts) => {
1667
1635
  }).prompt();
1668
1636
  };
1669
1637
  const text = (opts) => {
1670
- return new at({
1638
+ return new ht({
1671
1639
  validate: opts.validate,
1672
1640
  placeholder: opts.placeholder,
1673
1641
  defaultValue: opts.defaultValue,
@@ -3076,6 +3044,20 @@ function displayRelative(to, from = process.cwd()) {
3076
3044
  }
3077
3045
  //#endregion
3078
3046
  //#region src/utils/prompts.ts
3047
+ /**
3048
+ * pnpm v11 promoted `ERR_PNPM_IGNORED_BUILDS` from a warning to a hard
3049
+ * exit-1. Auto-installs run by `vp migrate` / `vp create` happen before the
3050
+ * user has a chance to approve build scripts via `pnpm.onlyBuiltDependencies`,
3051
+ * so transitive deps like `esbuild` would fail the install. Pass
3052
+ * `--ignore-scripts` in that window so the orchestration succeeds; the user's
3053
+ * own subsequent `vp install` keeps default pnpm behavior.
3054
+ */
3055
+ function shouldIgnoreScriptsForAutoInstall(packageManager, packageManagerVersion) {
3056
+ if (packageManager !== PackageManager.pnpm) return false;
3057
+ const coerced = packageManagerVersion ? import_semver.default.coerce(packageManagerVersion)?.version : void 0;
3058
+ if (!coerced) return false;
3059
+ return import_semver.default.gte(coerced, "11.0.0");
3060
+ }
3079
3061
  function cancelAndExit(message = "Operation cancelled", exitCode = 0) {
3080
3062
  cancel(message);
3081
3063
  process.exit(exitCode);
@@ -3117,12 +3099,14 @@ async function runViteInstall(cwd, interactive, extraArgs, options) {
3117
3099
  durationMs: 0,
3118
3100
  status: "skipped"
3119
3101
  };
3102
+ const installArgs = [...extraArgs ?? []];
3103
+ if (shouldIgnoreScriptsForAutoInstall(options?.packageManager, options?.packageManagerVersion) && !installArgs.includes("--ignore-scripts")) installArgs.push("--ignore-scripts");
3120
3104
  const spinner = options?.silent ? getSilentSpinner() : getSpinner(interactive);
3121
3105
  const startTime = Date.now();
3122
3106
  spinner.start(`Installing dependencies...`);
3123
3107
  const { exitCode, stderr, stdout } = await runCommandSilently({
3124
3108
  command: process.env.VP_CLI_BIN ?? "vp",
3125
- args: ["install", ...extraArgs ?? []],
3109
+ args: ["install", ...installArgs],
3126
3110
  cwd,
3127
3111
  envs: process.env
3128
3112
  });
@@ -1,5 +1,5 @@
1
1
  import { a as printHeader, r as log } from "../terminal-CxTMfsxZ.js";
2
- import { L as defaultInteractive, _ as hasStagedConfigInViteConfig, h as ensurePreCommitHook, i as updateExistingAgentInstructions, z as promptGitHooks } from "../agent-Ch4JIuSB.js";
2
+ import { L as defaultInteractive, _ as hasStagedConfigInViteConfig, h as ensurePreCommitHook, i as updateExistingAgentInstructions, z as promptGitHooks } from "../agent-DiG-2b1c.js";
3
3
  import { t as lib_default } from "../lib-BamM40b7.js";
4
4
  import { t as renderCliDoc } from "../help-BtkjXtRM.js";
5
5
  import { join } from "node:path";
@@ -2,10 +2,10 @@ import { r as __toESM, t as __commonJSMin } from "../chunk-q7NCDQ7-.js";
2
2
  import { a as runCommandSilently, i as runCommand$1, o as require_cross_spawn } from "../tsconfig-BQeK6Jxp.js";
3
3
  import { a as printHeader, i as muted, o as success, r as log, t as accent } from "../terminal-CxTMfsxZ.js";
4
4
  import { i as resolveViteConfig, n as hasViteConfig, t as findWorkspaceRoot } from "../resolve-vite-config-C1KX9CZU.js";
5
- import { $ as multiselect, A as setPackageManager, B as runViteFmt, D as rewriteMonorepo, E as promptPrettierMigration, G as templatesDir, H as selectPackageManager, K as DependencyType, L as defaultInteractive, O as rewriteMonorepoProject, Q as log$1, R as downloadPackageManager$1, T as promptEslintMigration, V as runViteInstall, W as displayRelative, X as confirm, Y as cancel, Z as intro, a as writeAgentInstructions, at as q, d as detectEslintProject, f as detectFramework, g as hasFrameworkShim, it as require_picocolors, k as rewriteStandaloneProject, m as detectPrettierProject, n as detectExistingAgentTargetPaths, nt as spinner, o as addFrameworkShim, q as PackageManager, r as selectAgentTargetPaths, rt as text, tt as select, v as injectCreateDefaultTemplate, y as installGitHooks, z as promptGitHooks } from "../agent-Ch4JIuSB.js";
5
+ import { $ as multiselect, A as setPackageManager, B as runViteFmt, D as rewriteMonorepo, E as promptPrettierMigration, G as templatesDir, H as selectPackageManager, K as DependencyType, L as defaultInteractive, O as rewriteMonorepoProject, Q as log$1, R as downloadPackageManager$1, T as promptEslintMigration, V as runViteInstall, W as displayRelative, X as confirm, Y as cancel, Z as intro, a as writeAgentInstructions, at as q, d as detectEslintProject, f as detectFramework, g as hasFrameworkShim, it as require_picocolors, k as rewriteStandaloneProject, m as detectPrettierProject, n as detectExistingAgentTargetPaths, nt as spinner, o as addFrameworkShim, q as PackageManager, r as selectAgentTargetPaths, rt as text, tt as select, v as injectCreateDefaultTemplate, y as installGitHooks, z as promptGitHooks } from "../agent-DiG-2b1c.js";
6
6
  import { t as lib_default } from "../lib-BamM40b7.js";
7
7
  import { c as editJsonFile, o as fetchNpmResource, s as getNpmRegistry, t as checkNpmPackageExists, u as readJsonFile } from "../package-CrKanQYM.js";
8
- import { a as detectExistingEditors, c as writeEditorConfigs, n as updatePackageJsonWithDeps, r as updateWorkspaceConfig, s as selectEditors, t as detectWorkspace$1 } from "../workspace-DxqnDgi4.js";
8
+ import { a as detectExistingEditors, c as writeEditorConfigs, n as updatePackageJsonWithDeps, r as updateWorkspaceConfig, s as selectEditors, t as detectWorkspace$1 } from "../workspace-BPbxWCNF.js";
9
9
  import { t as renderCliDoc } from "../help-BtkjXtRM.js";
10
10
  import path from "node:path";
11
11
  import { runCommand, vitePlusHeader } from "../../binding/index.js";
@@ -308,6 +308,7 @@ function parseOrgScopedSpec(spec) {
308
308
  * shipped an invalid manifest should see the offending field.
309
309
  */
310
310
  var OrgManifestSchemaError = class extends Error {
311
+ packageName;
311
312
  constructor(message, packageName) {
312
313
  super(`${packageName}: ${message}`);
313
314
  this.packageName = packageName;
@@ -4907,7 +4908,11 @@ Use \`vp create --list\` to list all available templates, or run \`vp create --h
4907
4908
  if (bundled?.monorepo) injectCreateDefaultTemplate(fullPath, bundled.scope, compactOutput);
4908
4909
  if (shouldSetupHooks) installGitHooks(fullPath, compactOutput);
4909
4910
  updateCreateProgress("Installing dependencies");
4910
- const installSummary = await runViteInstall(fullPath, options.interactive, installArgs, { silent: compactOutput });
4911
+ const installSummary = await runViteInstall(fullPath, options.interactive, installArgs, {
4912
+ silent: compactOutput,
4913
+ packageManager: workspaceInfo.packageManager,
4914
+ packageManagerVersion: workspaceInfo.downloadPackageManager.version
4915
+ });
4911
4916
  updateCreateProgress("Formatting code");
4912
4917
  await runViteFmt(fullPath, options.interactive, void 0, { silent: compactOutput });
4913
4918
  clearCreateProgress();
@@ -4993,7 +4998,11 @@ Use \`vp create --list\` to list all available templates, or run \`vp create --h
4993
4998
  if (!fs.existsSync(yarnrcPath)) fs.writeFileSync(yarnrcPath, "nodeLinker: node-modules\n");
4994
4999
  }
4995
5000
  updateCreateProgress("Installing dependencies");
4996
- installSummary = await runViteInstall(installCwd, options.interactive, installArgs, { silent: compactOutput });
5001
+ installSummary = await runViteInstall(installCwd, options.interactive, installArgs, {
5002
+ silent: compactOutput,
5003
+ packageManager: workspaceInfo.packageManager,
5004
+ packageManagerVersion: workspaceInfo.downloadPackageManager.version
5005
+ });
4997
5006
  if (installSummary.status !== "installed") return;
4998
5007
  updateCreateProgress("Migrating lint and format tools");
4999
5008
  pauseCreateProgress();
@@ -5040,7 +5049,11 @@ Use \`vp create --list\` to list all available templates, or run \`vp create --h
5040
5049
  rewriteMonorepoProject(fullPath, workspaceInfo.packageManager, void 0, compactOutput);
5041
5050
  for (const framework of detectFramework(fullPath)) if (!hasFrameworkShim(fullPath, framework)) addFrameworkShim(fullPath, framework);
5042
5051
  updateCreateProgress("Installing dependencies");
5043
- installSummary = await runViteInstall(workspaceInfo.rootDir, options.interactive, installArgs, { silent: compactOutput });
5052
+ installSummary = await runViteInstall(workspaceInfo.rootDir, options.interactive, installArgs, {
5053
+ silent: compactOutput,
5054
+ packageManager: workspaceInfo.packageManager,
5055
+ packageManagerVersion: workspaceInfo.downloadPackageManager.version
5056
+ });
5044
5057
  updateCreateProgress("Formatting code");
5045
5058
  await runViteFmt(workspaceInfo.rootDir, options.interactive, [projectDir], { silent: compactOutput });
5046
5059
  } else {
@@ -5050,7 +5063,11 @@ Use \`vp create --list\` to list all available templates, or run \`vp create --h
5050
5063
  for (const framework of detectFramework(fullPath)) if (!hasFrameworkShim(fullPath, framework)) addFrameworkShim(fullPath, framework);
5051
5064
  if (shouldSetupHooks) installGitHooks(fullPath, compactOutput);
5052
5065
  updateCreateProgress("Installing dependencies");
5053
- installSummary = await runViteInstall(fullPath, options.interactive, installArgs, { silent: compactOutput });
5066
+ installSummary = await runViteInstall(fullPath, options.interactive, installArgs, {
5067
+ silent: compactOutput,
5068
+ packageManager: workspaceInfo.packageManager,
5069
+ packageManagerVersion: workspaceInfo.downloadPackageManager.version
5070
+ });
5054
5071
  updateCreateProgress("Formatting code");
5055
5072
  await runViteFmt(fullPath, options.interactive, void 0, { silent: compactOutput });
5056
5073
  }
@@ -1,11 +1,11 @@
1
1
  import { r as __toESM } from "../chunk-q7NCDQ7-.js";
2
2
  import { l as isForceOverrideMode } from "../main-A6UrSTYb.js";
3
3
  import { a as printHeader, i as muted, r as log, t as accent } from "../terminal-CxTMfsxZ.js";
4
- import { C as migratePrettierToOxfmt, D as rewriteMonorepo, E as promptPrettierMigration, H as selectPackageManager, I as cancelAndExit, J as require_semver, L as defaultInteractive, M as warnPackageLevelEslint, N as warnPackageLevelPrettier, Q as log$1, R as downloadPackageManager, S as migrateNodeVersionManagerFile, T as promptEslintMigration, U as upgradeYarn, V as runViteInstall, W as displayRelative, X as confirm, a as writeAgentInstructions, at as q, b as mergeViteConfigFiles, c as checkVitestVersion, d as detectEslintProject, et as outro, f as detectFramework, g as hasFrameworkShim, j as warnLegacyEslintConfig, k as rewriteStandaloneProject, l as confirmEslintMigration, m as detectPrettierProject, n as detectExistingAgentTargetPaths, nt as spinner, o as addFrameworkShim, p as detectNodeVersionManagerFile, q as PackageManager, r as selectAgentTargetPaths, s as checkViteVersion, t as detectAgentConflicts, tt as select, u as confirmPrettierMigration, w as preflightGitHooksSetup, x as migrateEslintToOxlint, y as installGitHooks, z as promptGitHooks } from "../agent-Ch4JIuSB.js";
4
+ import { C as migratePrettierToOxfmt, D as rewriteMonorepo, E as promptPrettierMigration, H as selectPackageManager, I as cancelAndExit, J as require_semver, L as defaultInteractive, M as warnPackageLevelEslint, N as warnPackageLevelPrettier, Q as log$1, R as downloadPackageManager, S as migrateNodeVersionManagerFile, T as promptEslintMigration, U as upgradeYarn, V as runViteInstall, W as displayRelative, X as confirm, a as writeAgentInstructions, at as q, b as mergeViteConfigFiles, c as checkVitestVersion, d as detectEslintProject, et as outro, f as detectFramework, g as hasFrameworkShim, j as warnLegacyEslintConfig, k as rewriteStandaloneProject, l as confirmEslintMigration, m as detectPrettierProject, n as detectExistingAgentTargetPaths, nt as spinner, o as addFrameworkShim, p as detectNodeVersionManagerFile, q as PackageManager, r as selectAgentTargetPaths, s as checkViteVersion, t as detectAgentConflicts, tt as select, u as confirmPrettierMigration, w as preflightGitHooksSetup, x as migrateEslintToOxlint, y as installGitHooks, z as promptGitHooks } from "../agent-DiG-2b1c.js";
5
5
  import { t as lib_default } from "../lib-BamM40b7.js";
6
6
  import { a as readNearestPackageJson, i as hasVitePlusDependency } from "../package-CrKanQYM.js";
7
7
  import { r as createMigrationReport } from "../report-DbrfjWiP.js";
8
- import { c as writeEditorConfigs, i as detectEditorConflicts, o as selectEditor, t as detectWorkspace } from "../workspace-DxqnDgi4.js";
8
+ import { c as writeEditorConfigs, i as detectEditorConflicts, o as selectEditor, t as detectWorkspace } from "../workspace-BPbxWCNF.js";
9
9
  import { t as renderCliDoc } from "../help-BtkjXtRM.js";
10
10
  import path from "node:path";
11
11
  import { styleText } from "node:util";
@@ -365,7 +365,11 @@ async function executeMigrationPlan(workspaceInfoOptional, plan, interactive) {
365
365
  migrateNodeVersionManagerFile(workspaceInfo.rootDir, plan.nodeVersionDetection, report);
366
366
  }
367
367
  updateMigrationProgress("Installing dependencies");
368
- const initialInstallSummary = await runViteInstall(workspaceInfo.rootDir, interactive, void 0, { silent: true });
368
+ const initialInstallSummary = await runViteInstall(workspaceInfo.rootDir, interactive, void 0, {
369
+ silent: true,
370
+ packageManager: workspaceInfo.packageManager,
371
+ packageManagerVersion: workspaceInfo.downloadPackageManager.version
372
+ });
369
373
  updateMigrationProgress("Validating toolchain");
370
374
  const isViteSupported = checkViteVersion(workspaceInfo.rootDir);
371
375
  const isVitestSupported = checkVitestVersion(workspaceInfo.rootDir);
@@ -432,7 +436,11 @@ async function executeMigrationPlan(workspaceInfoOptional, plan, interactive) {
432
436
  }
433
437
  const installArgs = plan.packageManager === PackageManager.npm || plan.packageManager === PackageManager.bun ? ["--force"] : void 0;
434
438
  updateMigrationProgress("Installing dependencies");
435
- const finalInstallSummary = await runViteInstall(workspaceInfo.rootDir, interactive, installArgs, { silent: true });
439
+ const finalInstallSummary = await runViteInstall(workspaceInfo.rootDir, interactive, installArgs, {
440
+ silent: true,
441
+ packageManager: workspaceInfo.packageManager,
442
+ packageManagerVersion: workspaceInfo.downloadPackageManager.version
443
+ });
436
444
  clearMigrationProgress();
437
445
  return {
438
446
  installDurationMs: initialInstallSummary.durationMs + finalInstallSummary.durationMs,
@@ -482,7 +490,13 @@ async function main() {
482
490
  updateMigrationProgress("Rewriting configs");
483
491
  mergeViteConfigFiles(workspaceInfoOptional.rootDir, true, report);
484
492
  updateMigrationProgress("Installing dependencies");
485
- const installSummary = await runViteInstall(workspaceInfoOptional.rootDir, options.interactive, void 0, { silent: true });
493
+ let resolvedVersion = workspaceInfoOptional.packageManagerVersion;
494
+ if (workspaceInfoOptional.packageManager && !import_semver.default.valid(import_semver.default.coerce(resolvedVersion) ?? "")) resolvedVersion = (await downloadPackageManager(workspaceInfoOptional.packageManager, resolvedVersion, options.interactive, true)).version;
495
+ const installSummary = await runViteInstall(workspaceInfoOptional.rootDir, options.interactive, void 0, {
496
+ silent: true,
497
+ packageManager: workspaceInfoOptional.packageManager,
498
+ packageManagerVersion: resolvedVersion
499
+ });
486
500
  installDurationMs += installSummary.durationMs;
487
501
  didMigrate = true;
488
502
  report.eslintMigrated = eslintMigrated;
package/dist/pack-bin.js CHANGED
@@ -651,7 +651,7 @@ const DEFAULT_ENV_PREFIXES = ["VITE_PACK_", "TSDOWN_"];
651
651
  cli.command("[...files]", "Bundle files", {
652
652
  ignoreOptionDefaultValue: true,
653
653
  allowUnknownOptions: true
654
- }).option("--config-loader <loader>", "Config loader to use: auto, native, unrun", { default: "auto" }).option("--no-config", "Disable config file").option("-f, --format <format>", "Bundle format: esm, cjs, iife, umd", { default: "esm" }).option("--clean", "Clean output directory, --no-clean to disable").option("--deps.never-bundle <module>", "Mark dependencies as external").option("--minify", "Minify output").option("--devtools", "Enable devtools integration").option("--debug [feat]", "Show debug logs").option("--target <target>", "Bundle target, e.g \"es2015\", \"esnext\"").option("-l, --logLevel <level>", "Set log level: info, warn, error, silent").option("--fail-on-warn", "Fail on warnings", { default: true }).option("--no-write", "Disable writing files to disk, incompatible with watch mode").option("-d, --out-dir <dir>", "Output directory", { default: "dist" }).option("--treeshake", "Tree-shake bundle", { default: true }).option("--sourcemap", "Generate source map", { default: false }).option("--shims", "Enable cjs and esm shims", { default: false }).option("--platform <platform>", "Target platform", { default: "node" }).option("--dts", "Generate dts files").option("--publint", "Enable publint", { default: false }).option("--attw", "Enable Are the types wrong integration", { default: false }).option("--unused", "Enable unused dependencies check", { default: false }).option("-w, --watch [path]", "Watch mode").option("--ignore-watch <path>", "Ignore custom paths in watch mode").option("--from-vite [vitest]", "Reuse config from Vite or Vitest").option("--report", "Size report", { default: true }).option("--env.* <value>", "Define compile-time env variables").option("--env-file <file>", "Load environment variables from a file, when used together with --env, variables in --env take precedence").option("--env-prefix <prefix>", "Prefix for env variables to inject into the bundle", { default: DEFAULT_ENV_PREFIXES }).option("--on-success <command>", "Command to run on success").option("--copy <dir>", "Copy files to output dir").option("--public-dir <dir>", "Alias for --copy, deprecated").option("--tsconfig <tsconfig>", "Set tsconfig path").option("--unbundle", "Unbundle mode").option("--root <dir>", "Root directory of input files").option("--exe", "Bundle as executable").option("-W, --workspace [dir]", "Enable workspace mode").option("-F, --filter <pattern>", "Filter configs (cwd or name), e.g. /pkg-name$/ or pkg-name").option("--exports", "Generate export-related metadata for package.json (experimental)").action(async (input, flags) => {
654
+ }).option("--config-loader <loader>", "Config loader to use: auto, native, tsx, unrun", { default: "auto" }).option("--no-config", "Disable config file").option("-f, --format <format>", "Bundle format: esm, cjs, iife, umd", { default: "esm" }).option("--clean", "Clean output directory, --no-clean to disable").option("--deps.never-bundle <module>", "Mark dependencies as external").option("--minify", "Minify output").option("--devtools", "Enable devtools integration").option("--debug [feat]", "Show debug logs").option("--target <target>", "Bundle target, e.g \"es2015\", \"esnext\"").option("-l, --logLevel <level>", "Set log level: info, warn, error, silent").option("--fail-on-warn", "Fail on warnings", { default: true }).option("--no-write", "Disable writing files to disk, incompatible with watch mode").option("-d, --out-dir <dir>", "Output directory", { default: "dist" }).option("--treeshake", "Tree-shake bundle", { default: true }).option("--sourcemap", "Generate source map", { default: false }).option("--shims", "Enable cjs and esm shims", { default: false }).option("--platform <platform>", "Target platform", { default: "node" }).option("--dts", "Generate dts files").option("--publint", "Enable publint", { default: false }).option("--attw", "Enable Are the types wrong integration", { default: false }).option("--unused", "Enable unused dependencies check", { default: false }).option("-w, --watch [path]", "Watch mode").option("--ignore-watch <path>", "Ignore custom paths in watch mode").option("--from-vite [vitest]", "Reuse config from Vite or Vitest").option("--report", "Size report", { default: true }).option("--env.* <value>", "Define compile-time env variables").option("--env-file <file>", "Load environment variables from a file, when used together with --env, variables in --env take precedence").option("--env-prefix <prefix>", "Prefix for env variables to inject into the bundle", { default: DEFAULT_ENV_PREFIXES }).option("--on-success <command>", "Command to run on success").option("--copy <dir>", "Copy files to output dir").option("--public-dir <dir>", "Alias for --copy, deprecated").option("--tsconfig <tsconfig>", "Set tsconfig path").option("--unbundle", "Unbundle mode").option("--root <dir>", "Root directory of input files").option("--exe", "Bundle as executable").option("-W, --workspace [dir]", "Enable workspace mode").option("-F, --filter <pattern>", "Filter configs (cwd or name), e.g. /pkg-name$/ or pkg-name").option("--exports", "Generate export-related metadata for package.json (experimental)").action(async (input, flags) => {
655
655
  if (input.length > 0) flags.entry = input;
656
656
  if (flags.envPrefix === void 0) flags.envPrefix = DEFAULT_ENV_PREFIXES;
657
657
  async function runBuild() {
@@ -9,7 +9,7 @@ import { constants } from "node:fs";
9
9
  import { formatWithOptions, inspect, promisify } from "node:util";
10
10
  import { pathToFileURL } from "node:url";
11
11
  import { cwd } from "node:process";
12
- import P from "node:readline";
12
+ import l from "node:readline";
13
13
  import nodeTty from "node:tty";
14
14
  import { EOL } from "node:os";
15
15
  import fsPromises, { constants as constants$1 } from "node:fs/promises";
@@ -553,7 +553,7 @@ var M = class extends Error {
553
553
  this.output = t;
554
554
  }
555
555
  };
556
- const P$1 = {
556
+ const P = {
557
557
  timeout: void 0,
558
558
  persist: false
559
559
  };
@@ -599,7 +599,7 @@ var z = class {
599
599
  }
600
600
  constructor(e, t, n) {
601
601
  this._options = {
602
- ...P$1,
602
+ ...P,
603
603
  ...n
604
604
  };
605
605
  this._command = e;
@@ -630,7 +630,7 @@ var z = class {
630
630
  if (this._streamErr) t.push(this._streamErr);
631
631
  if (this._streamOut) t.push(this._streamOut);
632
632
  const n = _(t);
633
- const r = P.createInterface({ input: n });
633
+ const r = l.createInterface({ input: n });
634
634
  for await (const e of r) yield e.toString();
635
635
  await this._processClosed;
636
636
  e.removeAllListeners();
package/dist/versions.js CHANGED
@@ -1,7 +1,7 @@
1
1
  export const versions = {
2
- "vite": "8.0.10",
3
- "rolldown": "1.0.0-rc.18",
4
- "tsdown": "0.21.10",
2
+ "vite": "8.0.11",
3
+ "rolldown": "1.0.0",
4
+ "tsdown": "0.22.0",
5
5
  "vitest": "4.1.5",
6
6
  "oxlint": "1.63.0",
7
7
  "oxfmt": "0.48.0",
@@ -1,4 +1,4 @@
1
- import { $ as multiselect, F as readYamlFile, P as editYamlFile, Q as log, at as q, q as PackageManager, tt as select } from "./agent-Ch4JIuSB.js";
1
+ import { $ as multiselect, F as readYamlFile, P as editYamlFile, Q as log, at as q, q as PackageManager, tt as select } from "./agent-DiG-2b1c.js";
2
2
  import { t as require_dist } from "./dist-DjG9AYbK.js";
3
3
  import { c as editJsonFile, d as writeJsonFile, r as getScopeFromPackageName, u as readJsonFile } from "./package-CrKanQYM.js";
4
4
  import path, { posix, win32 } from "node:path";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vite-plus",
3
- "version": "0.1.21-alpha.3",
3
+ "version": "0.1.21-alpha.4",
4
4
  "description": "The Unified Toolchain for the Web",
5
5
  "homepage": "https://viteplus.dev/guide",
6
6
  "bugs": {
@@ -322,8 +322,8 @@
322
322
  "oxfmt": "=0.48.0",
323
323
  "oxlint": "=1.63.0",
324
324
  "oxlint-tsgolint": "=0.22.1",
325
- "@voidzero-dev/vite-plus-test": "0.1.21-alpha.3",
326
- "@voidzero-dev/vite-plus-core": "0.1.21-alpha.3"
325
+ "@voidzero-dev/vite-plus-test": "0.1.21-alpha.4",
326
+ "@voidzero-dev/vite-plus-core": "0.1.21-alpha.4"
327
327
  },
328
328
  "devDependencies": {
329
329
  "@napi-rs/cli": "^3.6.1",
@@ -345,12 +345,12 @@
345
345
  "picocolors": "^1.1.1",
346
346
  "rolldown-plugin-dts": "^0.23.0",
347
347
  "semver": "^7.7.3",
348
- "tsdown": "^0.21.10",
348
+ "tsdown": "^0.22.0",
349
349
  "validate-npm-package-name": "^7.0.2",
350
350
  "yaml": "^2.8.1",
351
- "@voidzero-dev/vite-plus-tools": "0.0.0",
352
- "vite": "npm:@voidzero-dev/vite-plus-core@0.1.21-alpha.3",
353
- "@voidzero-dev/vite-plus-prompts": "0.0.0"
351
+ "@voidzero-dev/vite-plus-prompts": "0.0.0",
352
+ "vite": "npm:@voidzero-dev/vite-plus-core@0.1.21-alpha.4",
353
+ "@voidzero-dev/vite-plus-tools": "0.0.0"
354
354
  },
355
355
  "napi": {
356
356
  "binaryName": "vite-plus",
@@ -370,14 +370,14 @@
370
370
  "node": "^20.19.0 || >=22.12.0"
371
371
  },
372
372
  "optionalDependencies": {
373
- "@voidzero-dev/vite-plus-darwin-arm64": "0.1.21-alpha.3",
374
- "@voidzero-dev/vite-plus-darwin-x64": "0.1.21-alpha.3",
375
- "@voidzero-dev/vite-plus-linux-arm64-gnu": "0.1.21-alpha.3",
376
- "@voidzero-dev/vite-plus-linux-arm64-musl": "0.1.21-alpha.3",
377
- "@voidzero-dev/vite-plus-linux-x64-gnu": "0.1.21-alpha.3",
378
- "@voidzero-dev/vite-plus-linux-x64-musl": "0.1.21-alpha.3",
379
- "@voidzero-dev/vite-plus-win32-x64-msvc": "0.1.21-alpha.3",
380
- "@voidzero-dev/vite-plus-win32-arm64-msvc": "0.1.21-alpha.3"
373
+ "@voidzero-dev/vite-plus-darwin-arm64": "0.1.21-alpha.4",
374
+ "@voidzero-dev/vite-plus-darwin-x64": "0.1.21-alpha.4",
375
+ "@voidzero-dev/vite-plus-linux-arm64-gnu": "0.1.21-alpha.4",
376
+ "@voidzero-dev/vite-plus-linux-arm64-musl": "0.1.21-alpha.4",
377
+ "@voidzero-dev/vite-plus-linux-x64-gnu": "0.1.21-alpha.4",
378
+ "@voidzero-dev/vite-plus-linux-x64-musl": "0.1.21-alpha.4",
379
+ "@voidzero-dev/vite-plus-win32-x64-msvc": "0.1.21-alpha.4",
380
+ "@voidzero-dev/vite-plus-win32-arm64-msvc": "0.1.21-alpha.4"
381
381
  },
382
382
  "scripts": {
383
383
  "build": "oxnode -C dev ./build.ts",