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.
- package/dist/{agent-Ch4JIuSB.js → agent-DiG-2b1c.js} +189 -205
- package/dist/config/bin.js +1 -1
- package/dist/create/bin.js +23 -6
- package/dist/migration/bin.js +19 -5
- package/dist/pack-bin.js +1 -1
- package/dist/staged/bin.js +4 -4
- package/dist/versions.js +3 -3
- package/dist/{workspace-DxqnDgi4.js → workspace-BPbxWCNF.js} +1 -1
- package/package.json +15 -15
|
@@ -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
|
|
14
|
-
import
|
|
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@
|
|
18
|
-
const
|
|
19
|
-
|
|
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
|
|
25
|
-
return x
|
|
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@
|
|
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 =
|
|
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 =
|
|
54
|
+
const FULL_WIDTH_WIDTH = 2;
|
|
49
55
|
const REGULAR_WIDTH = widthOptions.regularWidth ?? 1;
|
|
50
|
-
const WIDE_WIDTH = widthOptions.wideWidth ??
|
|
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 (
|
|
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
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
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@
|
|
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.
|
|
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)
|
|
312
|
-
|
|
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.
|
|
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,
|
|
391
|
-
if (!
|
|
392
|
-
const
|
|
393
|
-
return
|
|
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
|
|
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
|
|
443
|
-
if (typeof r == "string") return
|
|
444
|
-
for (const
|
|
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
|
|
409
|
+
function z(r, t) {
|
|
448
410
|
if (r === t) return;
|
|
449
|
-
const
|
|
450
|
-
`),
|
|
451
|
-
`), i = Math.max(
|
|
452
|
-
for (let o = 0; o < i; 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:
|
|
456
|
-
numLinesAfter:
|
|
417
|
+
numLinesBefore: s.length,
|
|
418
|
+
numLinesAfter: e.length,
|
|
457
419
|
numLines: i
|
|
458
420
|
};
|
|
459
421
|
}
|
|
460
|
-
const Y = globalThis.process.platform.startsWith("win"),
|
|
422
|
+
const Y = globalThis.process.platform.startsWith("win"), k = Symbol("clack:cancel");
|
|
461
423
|
function q(r) {
|
|
462
|
-
return r ===
|
|
424
|
+
return r === k;
|
|
463
425
|
}
|
|
464
426
|
function w(r, t) {
|
|
465
|
-
const
|
|
466
|
-
|
|
427
|
+
const s = r;
|
|
428
|
+
s.isTTY && s.setRawMode(t);
|
|
467
429
|
}
|
|
468
|
-
function
|
|
469
|
-
const i =
|
|
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
|
-
|
|
476
|
-
const n = (o, { name:
|
|
477
|
-
if (
|
|
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
|
-
|
|
480
|
-
|
|
441
|
+
u,
|
|
442
|
+
a
|
|
481
443
|
], "cancel")) {
|
|
482
|
-
|
|
444
|
+
e && t.write(import_src.cursor.show), process.exit(0);
|
|
483
445
|
return;
|
|
484
446
|
}
|
|
485
|
-
if (!
|
|
486
|
-
const f =
|
|
487
|
-
|
|
488
|
-
|
|
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
|
|
494
|
-
r.off("keypress", n),
|
|
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
|
|
498
|
-
function
|
|
499
|
-
return wrapAnsi$1(t,
|
|
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((
|
|
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,
|
|
522
|
-
const { input:
|
|
523
|
-
this.opts =
|
|
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,
|
|
529
|
-
const
|
|
530
|
-
|
|
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,
|
|
533
|
-
this.setSubscriber(t, { cb:
|
|
497
|
+
on(t, s) {
|
|
498
|
+
this.setSubscriber(t, { cb: s });
|
|
534
499
|
}
|
|
535
|
-
once(t,
|
|
500
|
+
once(t, s) {
|
|
536
501
|
this.setSubscriber(t, {
|
|
537
|
-
cb:
|
|
502
|
+
cb: s,
|
|
538
503
|
once: !0
|
|
539
504
|
});
|
|
540
505
|
}
|
|
541
|
-
emit(t, ...
|
|
542
|
-
const
|
|
543
|
-
for (const n of
|
|
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(
|
|
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 =
|
|
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(
|
|
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,
|
|
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,
|
|
574
|
-
this.userInput = t ?? "", this.emit("userInput", this.userInput),
|
|
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,
|
|
583
|
-
if (this._track &&
|
|
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"),
|
|
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
|
|
589
|
-
|
|
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
|
-
|
|
561
|
+
C([
|
|
594
562
|
t,
|
|
595
|
-
|
|
596
|
-
|
|
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
|
|
620
|
-
if (this.restoreCursor(),
|
|
621
|
-
const i = Math.max(0,
|
|
622
|
-
let o =
|
|
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 (
|
|
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
|
|
597
|
+
const u = t.split(`
|
|
630
598
|
`);
|
|
631
|
-
this.output.write(
|
|
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 (
|
|
601
|
+
} else if (s.lines.length > 1) {
|
|
634
602
|
if (i < n) o = i;
|
|
635
603
|
else {
|
|
636
|
-
const
|
|
637
|
-
|
|
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
|
|
608
|
+
const u = t.split(`
|
|
641
609
|
`).slice(o);
|
|
642
|
-
this.output.write(
|
|
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
|
|
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", (
|
|
664
|
-
this.output.write(import_src.cursor.move(0, -1)), this.value =
|
|
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
|
|
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,
|
|
681
|
-
this.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
|
|
687
|
-
this.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((
|
|
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
|
|
697
|
-
this.cursor = this.options[
|
|
698
|
-
|
|
699
|
-
}), this.on("cursor", (
|
|
700
|
-
switch (
|
|
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
|
|
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
|
|
728
|
-
this.cursor = this.options[
|
|
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
|
|
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
|
|
749
|
-
return `${
|
|
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", (
|
|
759
|
-
this._setValue(
|
|
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 =
|
|
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 =
|
|
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
|
|
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
|
|
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 ?
|
|
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}${
|
|
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 =
|
|
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 =
|
|
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 ??
|
|
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 =
|
|
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
|
|
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 ?
|
|
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}${
|
|
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}${
|
|
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
|
|
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", ...
|
|
3109
|
+
args: ["install", ...installArgs],
|
|
3126
3110
|
cwd,
|
|
3127
3111
|
envs: process.env
|
|
3128
3112
|
});
|
package/dist/config/bin.js
CHANGED
|
@@ -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-
|
|
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";
|
package/dist/create/bin.js
CHANGED
|
@@ -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-
|
|
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-
|
|
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, {
|
|
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, {
|
|
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, {
|
|
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, {
|
|
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
|
}
|
package/dist/migration/bin.js
CHANGED
|
@@ -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-
|
|
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-
|
|
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, {
|
|
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, {
|
|
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
|
-
|
|
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() {
|
package/dist/staged/bin.js
CHANGED
|
@@ -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
|
|
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
|
|
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
|
|
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 =
|
|
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,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-
|
|
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
|
+
"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.
|
|
326
|
-
"@voidzero-dev/vite-plus-core": "0.1.21-alpha.
|
|
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.
|
|
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-
|
|
352
|
-
"vite": "npm:@voidzero-dev/vite-plus-core@0.1.21-alpha.
|
|
353
|
-
"@voidzero-dev/vite-plus-
|
|
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.
|
|
374
|
-
"@voidzero-dev/vite-plus-darwin-x64": "0.1.21-alpha.
|
|
375
|
-
"@voidzero-dev/vite-plus-linux-arm64-gnu": "0.1.21-alpha.
|
|
376
|
-
"@voidzero-dev/vite-plus-linux-arm64-musl": "0.1.21-alpha.
|
|
377
|
-
"@voidzero-dev/vite-plus-linux-x64-gnu": "0.1.21-alpha.
|
|
378
|
-
"@voidzero-dev/vite-plus-linux-x64-musl": "0.1.21-alpha.
|
|
379
|
-
"@voidzero-dev/vite-plus-win32-x64-msvc": "0.1.21-alpha.
|
|
380
|
-
"@voidzero-dev/vite-plus-win32-arm64-msvc": "0.1.21-alpha.
|
|
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",
|