vite-plus 1.2.0 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +4 -0
- package/LICENSE +1 -849
- package/README.md +1 -1
- package/bin/vpx +9 -0
- package/binding/index.cjs +59 -54
- package/binding/index.d.cts +132 -2
- package/dist/{agent-KeDc6vmg.js → agent-D8oxxhVR.js} +7 -9
- package/dist/bin.js +27 -34
- package/dist/{cli-parse-DHE8NrBU.js → cli-parse-aeUeFDlC.js} +2 -3
- package/dist/command-TjS_6y9O.js +1 -0
- package/dist/{command-CguLh2KL.js → command-rY79K5NI.js} +40 -42
- package/dist/{comparison-CmVirWIW-DUGaiYqF.js → comparison-CmVirWIW-UlEf2maz.js} +1 -2
- package/dist/config/bin.js +8 -10
- package/dist/{constants-BW3g7VnD.js → constants-DRUnJ_Dz.js} +4 -6
- package/dist/create/bin.d.ts +4 -8
- package/dist/create/bin.js +64 -68
- package/dist/{define-config-CIlk9scU.js → define-config-ChwJcu5e.js} +6 -9
- package/dist/{define-config-Dq_23Eyr.cjs → define-config-Cv2P6NT2.cjs} +8 -13
- package/dist/{define-config-Bexdd6RZ.d.ts → define-config-rPhYIFSn.d.ts} +1 -11
- package/dist/define-config.cjs +1 -1
- package/dist/define-config.d.ts +1 -1
- package/dist/define-config.js +1 -1
- package/dist/{dist-Bi7ZEK3c.js → dist-Bs0SObNC.js} +77 -149
- package/dist/{dist-Cqz8OtiO.js → dist-CdkMvIiQ.js} +11 -5
- package/dist/dist-zDZV5eEc.js +3 -0
- package/dist/{documentation-DqcZSthV.js → documentation-cv_y0Auv.js} +1 -2
- package/dist/{editor-b1XUwt9v.js → editor-ClL78D8u.js} +1492 -4211
- package/dist/{help-BmKpeOP9.js → help-B03t_iQ4.js} +1 -2
- package/dist/hooks/bin.js +4 -5
- package/dist/{hooks-DhwsWb46.js → hooks-xRcJPc-O.js} +5 -4
- package/dist/index.cjs +2 -3
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/{json-JP24qHUF.js → json-kl84kDyH.js} +9 -18
- package/dist/lint-plugins.cjs +1 -1
- package/dist/migration/bin.js +719 -184
- package/dist/migration/compat/worker.js +4 -6
- package/dist/{oxlint-plugin-config-Dx-ZY2MN.js → oxlint-plugin-config-BVpqYdcC.js} +3 -4
- package/dist/oxlint-plugin.d.ts +0 -2
- package/dist/oxlint-plugin.js +6 -7
- package/dist/{pack-BK38MLVZ.d.ts → pack-ARPFMefW.d.ts} +0 -2
- package/dist/pack-bin.d.ts +1 -3
- package/dist/pack-bin.js +3 -4
- package/dist/pack.d.ts +1 -1
- package/dist/{package-BP16iQby.js → package-DzsomcUD.js} +10 -95
- package/dist/{package-overrides-D1RcXSFl.js → package-overrides-Ci8GXouY.js} +5 -8
- package/dist/picomatch-DEUoj81q.js +1916 -0
- package/dist/{prompts-BGpQtC5z.js → prompts-GL1vj0wk.js} +113 -239
- package/dist/{protocol-D99W10Qi.js → protocol-CkNmY-Mr.js} +1 -2
- package/dist/{report-NhQk8VHb.js → report-DLHO30yZ.js} +2 -2
- package/dist/{resolve-vite-config-x47JetlI.js → resolve-vite-config-Dn5896A4.js} +9 -25
- package/dist/resolve-vite-config-QO6cC0SP.js +1 -0
- package/dist/{rolldown-runtime-CMFfr-1z.js → rolldown-runtime-DegdyBIC.js} +2 -3
- package/dist/script-esm-hooks.d.ts +8 -0
- package/dist/script-esm-hooks.js +24 -0
- package/dist/script-hooks-9Fof5UMY.js +176 -0
- package/dist/script-preload.cjs +468 -0
- package/dist/script-register.d.ts +1 -0
- package/dist/script-register.js +22 -0
- package/dist/script-watch.d.ts +1 -0
- package/dist/script-watch.js +1908 -0
- package/dist/staged/bin.js +81 -2011
- package/dist/sync-versions/bin.js +29 -50
- package/dist/sync-versions/bin.mjs +117 -224
- package/dist/{terminal-MKGAuy-p.js → terminal-BcuPUy-j.js} +1 -2
- package/dist/toolchain.js +36 -10
- package/dist/toolchain.json +36 -10
- package/dist/{tsconfig-C5PnJfW4.js → tsconfig-Do6MAG_f.js} +1 -1
- package/dist/{tsconfig-D2DzAQ_D.js → tsconfig-LE_mAwe_.js} +8 -10
- package/dist/version.d.ts +1 -3
- package/dist/version.js +5 -6
- package/dist/versions.js +5 -5
- package/dist/{vitest-ecosystem-BU0AqZq-.js → vitest-ecosystem-BeEYz-qF.js} +1 -2
- package/dist/{vitest-v5-entry-points-DthU1e_O.js → vitest-v5-entry-points-NyJsFeux.js} +1 -2
- package/dist/vpx-bin.d.ts +1 -0
- package/dist/vpx-bin.js +232 -0
- package/dist/vpx-script-EXgV5QOf.js +434 -0
- package/docs/config/run.md +4 -0
- package/docs/guide/check.md +1 -0
- package/docs/guide/ci.md +13 -3
- package/docs/guide/create.md +34 -0
- package/docs/guide/env.md +27 -13
- package/docs/guide/global-cli.md +52 -0
- package/docs/guide/local-cli.md +4 -4
- package/docs/guide/migrate-rules.md +48 -5
- package/docs/guide/migrate.md +6 -6
- package/docs/guide/package-management.md +19 -2
- package/docs/guide/test.md +1 -1
- package/docs/guide/vitest-v5.md +2 -2
- package/docs/guide/vpx.md +170 -9
- package/package.json +32 -29
- package/dist/command-DaRqSNpP.js +0 -1
- package/dist/dist-CBWGibx8.js +0 -3
- package/dist/resolve-vite-config-CGzlyhGr.js +0 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { r as __toESM, t as __commonJSMin } from "./rolldown-runtime-
|
|
2
|
-
import { t as accent } from "./terminal-
|
|
3
|
-
import { f as VITE_PLUS_VERSION } from "./constants-
|
|
4
|
-
import { a as writeJsonFile, i as readJsonFile } from "./json-
|
|
5
|
-
import { _ as isGreaterThanOrEqual, b as safeRegex, g as formatComparableVersion, l as PRERELEASE, n as COERCE, r as COERCE_FULL, u as PRERELEASE_LOOSE, x as tryParse, y as parse } from "./comparison-CmVirWIW-
|
|
6
|
-
import {
|
|
7
|
-
import { t as require_dist } from "./dist-
|
|
1
|
+
import { r as __toESM, t as __commonJSMin } from "./rolldown-runtime-DegdyBIC.js";
|
|
2
|
+
import { t as accent } from "./terminal-BcuPUy-j.js";
|
|
3
|
+
import { f as VITE_PLUS_VERSION } from "./constants-DRUnJ_Dz.js";
|
|
4
|
+
import { a as writeJsonFile, i as readJsonFile } from "./json-kl84kDyH.js";
|
|
5
|
+
import { _ as isGreaterThanOrEqual, b as safeRegex, g as formatComparableVersion, l as PRERELEASE, n as COERCE, r as COERCE_FULL, u as PRERELEASE_LOOSE, x as tryParse, y as parse } from "./comparison-CmVirWIW-UlEf2maz.js";
|
|
6
|
+
import { i as runCommandSilently, n as getVpCommand } from "./command-rY79K5NI.js";
|
|
7
|
+
import { t as require_dist } from "./dist-Bs0SObNC.js";
|
|
8
8
|
import path from "node:path";
|
|
9
9
|
import { downloadPackageManager } from "../binding/index.js";
|
|
10
10
|
import { stripVTControlCharacters, styleText } from "node:util";
|
|
@@ -13,7 +13,7 @@ import process$1, { stdin, stdout } from "node:process";
|
|
|
13
13
|
import l__default, * as l from "node:readline";
|
|
14
14
|
import { ReadStream } from "node:tty";
|
|
15
15
|
import { randomBytes } from "node:crypto";
|
|
16
|
-
|
|
16
|
+
// ../../node_modules/.pnpm/fast-string-truncated-width@3.0.3/node_modules/fast-string-truncated-width/dist/utils.js
|
|
17
17
|
const getCodePointsLength$1 = (() => {
|
|
18
18
|
const SURROGATE_PAIR_RE = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g;
|
|
19
19
|
return (input) => {
|
|
@@ -23,29 +23,28 @@ const getCodePointsLength$1 = (() => {
|
|
|
23
23
|
return input.length - surrogatePairsNr;
|
|
24
24
|
};
|
|
25
25
|
})();
|
|
26
|
-
const isFullWidth$
|
|
26
|
+
const isFullWidth$1 = (x) => {
|
|
27
27
|
return x === 12288 || x >= 65281 && x <= 65376 || x >= 65504 && x <= 65510;
|
|
28
28
|
};
|
|
29
29
|
const isWideNotCJKTNotEmoji$1 = (x) => {
|
|
30
30
|
return x === 8987 || x === 9001 || x >= 12272 && x <= 12287 || x >= 12289 && x <= 12350 || x >= 12441 && x <= 12543 || x >= 12549 && x <= 12591 || x >= 12593 && x <= 12686 || x >= 12688 && x <= 12771 || x >= 12783 && x <= 12830 || x >= 12832 && x <= 12871 || x >= 12880 && x <= 19903 || x >= 65040 && x <= 65049 || x >= 65072 && x <= 65106 || x >= 65108 && x <= 65126 || x >= 65128 && x <= 65131 || x >= 127488 && x <= 127490 || x >= 127504 && x <= 127547 || x >= 127552 && x <= 127560 || x >= 131072 && x <= 196605 || x >= 196608 && x <= 262141;
|
|
31
31
|
};
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
const
|
|
35
|
-
const CONTROL_RE$2 = /[\x00-\x08\x0A-\x1F\x7F-\x9F]{1,1000}/y;
|
|
32
|
+
// ../../node_modules/.pnpm/fast-string-truncated-width@3.0.3/node_modules/fast-string-truncated-width/dist/index.js
|
|
33
|
+
const ANSI_RE$1 = /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]|\u001b\]8;[^;]*;.*?(?:\u0007|\u001b\u005c)/y;
|
|
34
|
+
const CONTROL_RE$1 = /[\x00-\x08\x0A-\x1F\x7F-\x9F]{1,1000}/y;
|
|
36
35
|
const CJKT_WIDE_RE$1 = /(?:(?![\uFF61-\uFF9F\uFF00-\uFFEF])[\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Hangul}\p{Script=Tangut}]){1,1000}/uy;
|
|
37
|
-
const TAB_RE$
|
|
38
|
-
const EMOJI_RE$
|
|
39
|
-
const LATIN_RE$
|
|
40
|
-
const MODIFIER_RE$
|
|
41
|
-
const NO_TRUNCATION$
|
|
36
|
+
const TAB_RE$1 = /\t{1,1000}/y;
|
|
37
|
+
const EMOJI_RE$1 = /[\u{1F1E6}-\u{1F1FF}]{2}|\u{1F3F4}[\u{E0061}-\u{E007A}]{2}[\u{E0030}-\u{E0039}\u{E0061}-\u{E007A}]{1,3}\u{E007F}|(?:\p{Emoji}\uFE0F\u20E3?|\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation})(?:\u200D(?:\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation}|\p{Emoji}\uFE0F\u20E3?))*/uy;
|
|
38
|
+
const LATIN_RE$1 = /(?:[\x20-\x7E\xA0-\xFF](?!\uFE0F)){1,1000}/y;
|
|
39
|
+
const MODIFIER_RE$1 = /\p{M}+/gu;
|
|
40
|
+
const NO_TRUNCATION$3 = {
|
|
42
41
|
limit: Infinity,
|
|
43
42
|
ellipsis: ""
|
|
44
43
|
};
|
|
45
|
-
const getStringTruncatedWidth$
|
|
44
|
+
const getStringTruncatedWidth$1 = (input, truncationOptions = {}, widthOptions = {}) => {
|
|
46
45
|
const LIMIT = truncationOptions.limit ?? Infinity;
|
|
47
46
|
const ELLIPSIS = truncationOptions.ellipsis ?? "";
|
|
48
|
-
const ELLIPSIS_WIDTH = truncationOptions?.ellipsisWidth ?? (ELLIPSIS ? getStringTruncatedWidth$
|
|
47
|
+
const ELLIPSIS_WIDTH = truncationOptions?.ellipsisWidth ?? (ELLIPSIS ? getStringTruncatedWidth$1(ELLIPSIS, NO_TRUNCATION$3, widthOptions).width : 0);
|
|
49
48
|
const ANSI_WIDTH = 0;
|
|
50
49
|
const CONTROL_WIDTH = widthOptions.controlWidth ?? 0;
|
|
51
50
|
const TAB_WIDTH = widthOptions.tabWidth ?? 8;
|
|
@@ -54,11 +53,11 @@ const getStringTruncatedWidth$2 = (input, truncationOptions = {}, widthOptions =
|
|
|
54
53
|
const REGULAR_WIDTH = widthOptions.regularWidth ?? 1;
|
|
55
54
|
const WIDE_WIDTH = widthOptions.wideWidth ?? FULL_WIDTH_WIDTH;
|
|
56
55
|
const PARSE_BLOCKS = [
|
|
57
|
-
[LATIN_RE$
|
|
58
|
-
[ANSI_RE$
|
|
59
|
-
[CONTROL_RE$
|
|
60
|
-
[TAB_RE$
|
|
61
|
-
[EMOJI_RE$
|
|
56
|
+
[LATIN_RE$1, REGULAR_WIDTH],
|
|
57
|
+
[ANSI_RE$1, ANSI_WIDTH],
|
|
58
|
+
[CONTROL_RE$1, CONTROL_WIDTH],
|
|
59
|
+
[TAB_RE$1, TAB_WIDTH],
|
|
60
|
+
[EMOJI_RE$1, EMOJI_WIDTH],
|
|
62
61
|
[CJKT_WIDE_RE$1, WIDE_WIDTH]
|
|
63
62
|
];
|
|
64
63
|
let indexPrev = 0;
|
|
@@ -76,9 +75,9 @@ const getStringTruncatedWidth$2 = (input, truncationOptions = {}, widthOptions =
|
|
|
76
75
|
if (unmatchedEnd > unmatchedStart || index >= length && index > indexPrev) {
|
|
77
76
|
const unmatched = input.slice(unmatchedStart, unmatchedEnd) || input.slice(indexPrev, index);
|
|
78
77
|
lengthExtra = 0;
|
|
79
|
-
for (const char of unmatched.replaceAll(MODIFIER_RE$
|
|
78
|
+
for (const char of unmatched.replaceAll(MODIFIER_RE$1, "")) {
|
|
80
79
|
const codePoint = char.codePointAt(0) || 0;
|
|
81
|
-
if (isFullWidth$
|
|
80
|
+
if (isFullWidth$1(codePoint)) widthExtra = FULL_WIDTH_WIDTH;
|
|
82
81
|
else if (isWideNotCJKTNotEmoji$1(codePoint)) widthExtra = WIDE_WIDTH;
|
|
83
82
|
else widthExtra = REGULAR_WIDTH;
|
|
84
83
|
if (width + widthExtra > truncationLimit) truncationIndex = Math.min(truncationIndex, Math.max(unmatchedStart, indexPrev) + lengthExtra);
|
|
@@ -96,7 +95,7 @@ const getStringTruncatedWidth$2 = (input, truncationOptions = {}, widthOptions =
|
|
|
96
95
|
const [BLOCK_RE, BLOCK_WIDTH] = PARSE_BLOCKS[i];
|
|
97
96
|
BLOCK_RE.lastIndex = index;
|
|
98
97
|
if (BLOCK_RE.test(input)) {
|
|
99
|
-
lengthExtra = BLOCK_RE === CJKT_WIDE_RE$1 ? getCodePointsLength$1(input.slice(index, BLOCK_RE.lastIndex)) : BLOCK_RE === EMOJI_RE$
|
|
98
|
+
lengthExtra = BLOCK_RE === CJKT_WIDE_RE$1 ? getCodePointsLength$1(input.slice(index, BLOCK_RE.lastIndex)) : BLOCK_RE === EMOJI_RE$1 ? 1 : BLOCK_RE.lastIndex - index;
|
|
100
99
|
widthExtra = lengthExtra * BLOCK_WIDTH;
|
|
101
100
|
if (width + widthExtra > truncationLimit) truncationIndex = Math.min(truncationIndex, index + Math.floor((truncationLimit - width) / BLOCK_WIDTH));
|
|
102
101
|
if (width + widthExtra > LIMIT) {
|
|
@@ -119,20 +118,18 @@ const getStringTruncatedWidth$2 = (input, truncationOptions = {}, widthOptions =
|
|
|
119
118
|
ellipsed: truncationEnabled && LIMIT >= ELLIPSIS_WIDTH
|
|
120
119
|
};
|
|
121
120
|
};
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
const NO_TRUNCATION$4 = {
|
|
121
|
+
// ../../node_modules/.pnpm/fast-string-width@3.0.2/node_modules/fast-string-width/dist/index.js
|
|
122
|
+
const NO_TRUNCATION$2 = {
|
|
125
123
|
limit: Infinity,
|
|
126
124
|
ellipsis: "",
|
|
127
125
|
ellipsisWidth: 0
|
|
128
126
|
};
|
|
129
|
-
const fastStringWidth$
|
|
130
|
-
return getStringTruncatedWidth$
|
|
127
|
+
const fastStringWidth$1 = (input, options = {}) => {
|
|
128
|
+
return getStringTruncatedWidth$1(input, NO_TRUNCATION$2, options).width;
|
|
131
129
|
};
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
const
|
|
135
|
-
const CSI$1 = "";
|
|
130
|
+
// ../../node_modules/.pnpm/fast-wrap-ansi@0.2.0/node_modules/fast-wrap-ansi/lib/main.js
|
|
131
|
+
const ESC$2 = "\x1B";
|
|
132
|
+
const CSI$2 = "";
|
|
136
133
|
const END_CODE$1 = 39;
|
|
137
134
|
const ANSI_ESCAPE_BELL$1 = "\x07";
|
|
138
135
|
const ANSI_CSI$1 = "[";
|
|
@@ -153,26 +150,26 @@ const getClosingCode$1 = (openingCode) => {
|
|
|
153
150
|
if (openingCode === 9) return 29;
|
|
154
151
|
if (openingCode === 0) return 0;
|
|
155
152
|
};
|
|
156
|
-
const wrapAnsiCode$1 = (code) => `${ESC$
|
|
157
|
-
const wrapAnsiHyperlink$1 = (url) => `${ESC$
|
|
153
|
+
const wrapAnsiCode$1 = (code) => `${ESC$2}${ANSI_CSI$1}${code}${ANSI_SGR_TERMINATOR$1}`;
|
|
154
|
+
const wrapAnsiHyperlink$1 = (url) => `${ESC$2}${ANSI_ESCAPE_LINK$1}${url}${ANSI_ESCAPE_BELL$1}`;
|
|
158
155
|
const wrapWord$1 = (rows, word, columns) => {
|
|
159
156
|
const characters = word[Symbol.iterator]();
|
|
160
157
|
let isInsideEscape = false;
|
|
161
158
|
let isInsideLinkEscape = false;
|
|
162
159
|
let lastRow = rows.at(-1);
|
|
163
|
-
let visible = lastRow === void 0 ? 0 : fastStringWidth$
|
|
160
|
+
let visible = lastRow === void 0 ? 0 : fastStringWidth$1(lastRow);
|
|
164
161
|
let currentCharacter = characters.next();
|
|
165
162
|
let nextCharacter = characters.next();
|
|
166
163
|
let rawCharacterIndex = 0;
|
|
167
164
|
while (!currentCharacter.done) {
|
|
168
165
|
const character = currentCharacter.value;
|
|
169
|
-
const characterLength = fastStringWidth$
|
|
166
|
+
const characterLength = fastStringWidth$1(character);
|
|
170
167
|
if (visible + characterLength <= columns) rows[rows.length - 1] += character;
|
|
171
168
|
else {
|
|
172
169
|
rows.push(character);
|
|
173
170
|
visible = 0;
|
|
174
171
|
}
|
|
175
|
-
if (character === ESC$
|
|
172
|
+
if (character === ESC$2 || character === CSI$2) {
|
|
176
173
|
isInsideEscape = true;
|
|
177
174
|
isInsideLinkEscape = word.startsWith(ANSI_ESCAPE_LINK$1, rawCharacterIndex + 1);
|
|
178
175
|
}
|
|
@@ -201,7 +198,7 @@ const stringVisibleTrimSpacesRight$1 = (string) => {
|
|
|
201
198
|
const words = string.split(" ");
|
|
202
199
|
let last = words.length;
|
|
203
200
|
while (last) {
|
|
204
|
-
if (fastStringWidth$
|
|
201
|
+
if (fastStringWidth$1(words[last - 1])) break;
|
|
205
202
|
last--;
|
|
206
203
|
}
|
|
207
204
|
if (last === words.length) return string;
|
|
@@ -222,7 +219,7 @@ const exec$1 = (string, columns, options = {}) => {
|
|
|
222
219
|
const trimmed = row.trimStart();
|
|
223
220
|
if (row.length !== trimmed.length) {
|
|
224
221
|
rows[rows.length - 1] = trimmed;
|
|
225
|
-
rowLength = fastStringWidth$
|
|
222
|
+
rowLength = fastStringWidth$1(trimmed);
|
|
226
223
|
}
|
|
227
224
|
}
|
|
228
225
|
if (index !== 0) {
|
|
@@ -235,19 +232,19 @@ const exec$1 = (string, columns, options = {}) => {
|
|
|
235
232
|
rowLength++;
|
|
236
233
|
}
|
|
237
234
|
}
|
|
238
|
-
const wordLength = fastStringWidth$
|
|
235
|
+
const wordLength = fastStringWidth$1(word);
|
|
239
236
|
if (options.hard && wordLength > columns) {
|
|
240
237
|
const remainingColumns = columns - rowLength;
|
|
241
238
|
const breaksStartingThisLine = 1 + Math.floor((wordLength - remainingColumns - 1) / columns);
|
|
242
239
|
if (Math.floor((wordLength - 1) / columns) < breaksStartingThisLine) rows.push("");
|
|
243
240
|
wrapWord$1(rows, word, columns);
|
|
244
|
-
rowLength = fastStringWidth$
|
|
241
|
+
rowLength = fastStringWidth$1(rows.at(-1) ?? "");
|
|
245
242
|
continue;
|
|
246
243
|
}
|
|
247
244
|
if (rowLength + wordLength > columns && rowLength && wordLength) {
|
|
248
245
|
if (options.wordWrap === false && rowLength < columns) {
|
|
249
246
|
wrapWord$1(rows, word, columns);
|
|
250
|
-
rowLength = fastStringWidth$
|
|
247
|
+
rowLength = fastStringWidth$1(rows.at(-1) ?? "");
|
|
251
248
|
continue;
|
|
252
249
|
}
|
|
253
250
|
rows.push("");
|
|
@@ -255,7 +252,7 @@ const exec$1 = (string, columns, options = {}) => {
|
|
|
255
252
|
}
|
|
256
253
|
if (rowLength + wordLength > columns && options.wordWrap === false) {
|
|
257
254
|
wrapWord$1(rows, word, columns);
|
|
258
|
-
rowLength = fastStringWidth$
|
|
255
|
+
rowLength = fastStringWidth$1(rows.at(-1) ?? "");
|
|
259
256
|
continue;
|
|
260
257
|
}
|
|
261
258
|
rows[rows.length - 1] += word;
|
|
@@ -271,7 +268,7 @@ const exec$1 = (string, columns, options = {}) => {
|
|
|
271
268
|
inSurrogate = character >= "\ud800" && character <= "\udbff";
|
|
272
269
|
if (inSurrogate) continue;
|
|
273
270
|
} else inSurrogate = false;
|
|
274
|
-
if (character === ESC$
|
|
271
|
+
if (character === ESC$2 || character === CSI$2) {
|
|
275
272
|
GROUP_REGEX$1.lastIndex = i + 1;
|
|
276
273
|
const groups = GROUP_REGEX$1.exec(preString)?.groups;
|
|
277
274
|
if (groups?.code !== void 0) {
|
|
@@ -294,8 +291,7 @@ const CRLF_OR_LF$1 = /\r?\n/;
|
|
|
294
291
|
function wrapAnsi$1(string, columns, options) {
|
|
295
292
|
return String(string).normalize().split(CRLF_OR_LF$1).map((line) => exec$1(line, columns, options)).join("\n");
|
|
296
293
|
}
|
|
297
|
-
|
|
298
|
-
//#region ../../node_modules/.pnpm/@clack+core@1.5.1/node_modules/@clack/core/dist/index.mjs
|
|
294
|
+
// ../../node_modules/.pnpm/@clack+core@1.5.1/node_modules/@clack/core/dist/index.mjs
|
|
299
295
|
var import_src = (/* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
300
296
|
const ESC = "\x1B";
|
|
301
297
|
const CSI = `${ESC}[`;
|
|
@@ -782,8 +778,7 @@ var n = class extends y {
|
|
|
782
778
|
});
|
|
783
779
|
}
|
|
784
780
|
};
|
|
785
|
-
|
|
786
|
-
//#region ../../node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js
|
|
781
|
+
// ../../node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js
|
|
787
782
|
var require_picocolors = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
788
783
|
let p = process || {};
|
|
789
784
|
let argv = p.argv || [];
|
|
@@ -852,160 +847,50 @@ var require_picocolors = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
852
847
|
module.exports = createColors();
|
|
853
848
|
module.exports.createColors = createColors;
|
|
854
849
|
}));
|
|
855
|
-
|
|
856
|
-
//#region ../prompts/dist/index.mjs
|
|
850
|
+
// ../../node_modules/.pnpm/sisteransi@2.0.0/node_modules/sisteransi/dist/index.js
|
|
857
851
|
var import_picocolors = /* @__PURE__ */ __toESM(require_picocolors(), 1);
|
|
858
|
-
const
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
}
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
852
|
+
const ESC$1 = "\x1B";
|
|
853
|
+
const CSI$1 = `${ESC$1}[`;
|
|
854
|
+
const cursor = {
|
|
855
|
+
to(x, y) {
|
|
856
|
+
if (!y) return `${CSI$1}${x + 1}G`;
|
|
857
|
+
return `${CSI$1}${y + 1};${x + 1}H`;
|
|
858
|
+
},
|
|
859
|
+
move(x, y) {
|
|
860
|
+
let ret = "";
|
|
861
|
+
if (x < 0) ret += `${CSI$1}${-x}D`;
|
|
862
|
+
else if (x > 0) ret += `${CSI$1}${x}C`;
|
|
863
|
+
if (y < 0) ret += `${CSI$1}${-y}A`;
|
|
864
|
+
else if (y > 0) ret += `${CSI$1}${y}B`;
|
|
865
|
+
return ret;
|
|
866
|
+
},
|
|
867
|
+
up: (count = 1) => `${CSI$1}${count}A`,
|
|
868
|
+
down: (count = 1) => `${CSI$1}${count}B`,
|
|
869
|
+
forward: (count = 1) => `${CSI$1}${count}C`,
|
|
870
|
+
backward: (count = 1) => `${CSI$1}${count}D`,
|
|
871
|
+
nextLine: (count = 1) => `${CSI$1}E`.repeat(count),
|
|
872
|
+
prevLine: (count = 1) => `${CSI$1}F`.repeat(count),
|
|
873
|
+
left: `${CSI$1}G`,
|
|
874
|
+
hide: `${CSI$1}?25l`,
|
|
875
|
+
show: `${CSI$1}?25h`,
|
|
876
|
+
save: `${ESC$1}7`,
|
|
877
|
+
restore: `${ESC$1}8`
|
|
876
878
|
};
|
|
877
|
-
const
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
let indexPrev = 0;
|
|
890
|
-
let index = 0;
|
|
891
|
-
let length = input.length;
|
|
892
|
-
let lengthExtra = 0;
|
|
893
|
-
let truncationEnabled = false;
|
|
894
|
-
let truncationIndex = length;
|
|
895
|
-
let truncationLimit = Math.max(0, LIMIT - ELLIPSIS_WIDTH);
|
|
896
|
-
let unmatchedStart = 0;
|
|
897
|
-
let unmatchedEnd = 0;
|
|
898
|
-
let width = 0;
|
|
899
|
-
let widthExtra = 0;
|
|
900
|
-
outer: while (true) {
|
|
901
|
-
if (unmatchedEnd > unmatchedStart || index >= length && index > indexPrev) {
|
|
902
|
-
const unmatched = input.slice(unmatchedStart, unmatchedEnd) || input.slice(indexPrev, index);
|
|
903
|
-
lengthExtra = 0;
|
|
904
|
-
for (const char of unmatched.replaceAll(MODIFIER_RE$1, "")) {
|
|
905
|
-
const codePoint = char.codePointAt(0) || 0;
|
|
906
|
-
if (isFullWidth$1(codePoint)) widthExtra = FULL_WIDTH_WIDTH;
|
|
907
|
-
else if (isWide(codePoint)) widthExtra = WIDE_WIDTH;
|
|
908
|
-
else if (AMBIGUOUS_WIDTH !== REGULAR_WIDTH && isAmbiguous(codePoint)) widthExtra = AMBIGUOUS_WIDTH;
|
|
909
|
-
else widthExtra = REGULAR_WIDTH;
|
|
910
|
-
if (width + widthExtra > truncationLimit) truncationIndex = Math.min(truncationIndex, Math.max(unmatchedStart, indexPrev) + lengthExtra);
|
|
911
|
-
if (width + widthExtra > LIMIT) {
|
|
912
|
-
truncationEnabled = true;
|
|
913
|
-
break outer;
|
|
914
|
-
}
|
|
915
|
-
lengthExtra += char.length;
|
|
916
|
-
width += widthExtra;
|
|
917
|
-
}
|
|
918
|
-
unmatchedStart = unmatchedEnd = 0;
|
|
919
|
-
}
|
|
920
|
-
if (index >= length) break;
|
|
921
|
-
LATIN_RE$1.lastIndex = index;
|
|
922
|
-
if (LATIN_RE$1.test(input)) {
|
|
923
|
-
lengthExtra = LATIN_RE$1.lastIndex - index;
|
|
924
|
-
widthExtra = lengthExtra * REGULAR_WIDTH;
|
|
925
|
-
if (width + widthExtra > truncationLimit) truncationIndex = Math.min(truncationIndex, index + Math.floor((truncationLimit - width) / REGULAR_WIDTH));
|
|
926
|
-
if (width + widthExtra > LIMIT) {
|
|
927
|
-
truncationEnabled = true;
|
|
928
|
-
break;
|
|
929
|
-
}
|
|
930
|
-
width += widthExtra;
|
|
931
|
-
unmatchedStart = indexPrev;
|
|
932
|
-
unmatchedEnd = index;
|
|
933
|
-
index = indexPrev = LATIN_RE$1.lastIndex;
|
|
934
|
-
continue;
|
|
935
|
-
}
|
|
936
|
-
ANSI_RE$1.lastIndex = index;
|
|
937
|
-
if (ANSI_RE$1.test(input)) {
|
|
938
|
-
if (width + ANSI_WIDTH > truncationLimit) truncationIndex = Math.min(truncationIndex, index);
|
|
939
|
-
if (width + ANSI_WIDTH > LIMIT) {
|
|
940
|
-
truncationEnabled = true;
|
|
941
|
-
break;
|
|
942
|
-
}
|
|
943
|
-
width += ANSI_WIDTH;
|
|
944
|
-
unmatchedStart = indexPrev;
|
|
945
|
-
unmatchedEnd = index;
|
|
946
|
-
index = indexPrev = ANSI_RE$1.lastIndex;
|
|
947
|
-
continue;
|
|
948
|
-
}
|
|
949
|
-
CONTROL_RE$1.lastIndex = index;
|
|
950
|
-
if (CONTROL_RE$1.test(input)) {
|
|
951
|
-
lengthExtra = CONTROL_RE$1.lastIndex - index;
|
|
952
|
-
widthExtra = lengthExtra * CONTROL_WIDTH;
|
|
953
|
-
if (width + widthExtra > truncationLimit) truncationIndex = Math.min(truncationIndex, index + Math.floor((truncationLimit - width) / CONTROL_WIDTH));
|
|
954
|
-
if (width + widthExtra > LIMIT) {
|
|
955
|
-
truncationEnabled = true;
|
|
956
|
-
break;
|
|
957
|
-
}
|
|
958
|
-
width += widthExtra;
|
|
959
|
-
unmatchedStart = indexPrev;
|
|
960
|
-
unmatchedEnd = index;
|
|
961
|
-
index = indexPrev = CONTROL_RE$1.lastIndex;
|
|
962
|
-
continue;
|
|
963
|
-
}
|
|
964
|
-
TAB_RE$1.lastIndex = index;
|
|
965
|
-
if (TAB_RE$1.test(input)) {
|
|
966
|
-
lengthExtra = TAB_RE$1.lastIndex - index;
|
|
967
|
-
widthExtra = lengthExtra * TAB_WIDTH;
|
|
968
|
-
if (width + widthExtra > truncationLimit) truncationIndex = Math.min(truncationIndex, index + Math.floor((truncationLimit - width) / TAB_WIDTH));
|
|
969
|
-
if (width + widthExtra > LIMIT) {
|
|
970
|
-
truncationEnabled = true;
|
|
971
|
-
break;
|
|
972
|
-
}
|
|
973
|
-
width += widthExtra;
|
|
974
|
-
unmatchedStart = indexPrev;
|
|
975
|
-
unmatchedEnd = index;
|
|
976
|
-
index = indexPrev = TAB_RE$1.lastIndex;
|
|
977
|
-
continue;
|
|
978
|
-
}
|
|
979
|
-
EMOJI_RE$1.lastIndex = index;
|
|
980
|
-
if (EMOJI_RE$1.test(input)) {
|
|
981
|
-
if (width + EMOJI_WIDTH > truncationLimit) truncationIndex = Math.min(truncationIndex, index);
|
|
982
|
-
if (width + EMOJI_WIDTH > LIMIT) {
|
|
983
|
-
truncationEnabled = true;
|
|
984
|
-
break;
|
|
985
|
-
}
|
|
986
|
-
width += EMOJI_WIDTH;
|
|
987
|
-
unmatchedStart = indexPrev;
|
|
988
|
-
unmatchedEnd = index;
|
|
989
|
-
index = indexPrev = EMOJI_RE$1.lastIndex;
|
|
990
|
-
continue;
|
|
991
|
-
}
|
|
992
|
-
index += 1;
|
|
879
|
+
const erase = {
|
|
880
|
+
screen: `${CSI$1}2J`,
|
|
881
|
+
up: (count = 1) => `${CSI$1}1J`.repeat(count),
|
|
882
|
+
down: (count = 1) => `${CSI$1}J`.repeat(count),
|
|
883
|
+
line: `${CSI$1}2K`,
|
|
884
|
+
lineEnd: `${CSI$1}K`,
|
|
885
|
+
lineStart: `${CSI$1}1K`,
|
|
886
|
+
lines(count) {
|
|
887
|
+
let clear = "";
|
|
888
|
+
for (let i = 0; i < count; i++) clear += this.line + (i < count - 1 ? cursor.up() : "");
|
|
889
|
+
if (count) clear += cursor.left;
|
|
890
|
+
return clear;
|
|
993
891
|
}
|
|
994
|
-
return {
|
|
995
|
-
width: truncationEnabled ? truncationLimit : width,
|
|
996
|
-
index: truncationEnabled ? truncationIndex : length,
|
|
997
|
-
truncated: truncationEnabled,
|
|
998
|
-
ellipsed: truncationEnabled && LIMIT >= ELLIPSIS_WIDTH
|
|
999
|
-
};
|
|
1000
|
-
};
|
|
1001
|
-
const NO_TRUNCATION$2 = {
|
|
1002
|
-
limit: Infinity,
|
|
1003
|
-
ellipsis: "",
|
|
1004
|
-
ellipsisWidth: 0
|
|
1005
|
-
};
|
|
1006
|
-
const fastStringWidth$1 = (input, options = {}) => {
|
|
1007
|
-
return getStringTruncatedWidth$1(input, NO_TRUNCATION$2, options).width;
|
|
1008
892
|
};
|
|
893
|
+
// ../prompts/dist/index.mjs
|
|
1009
894
|
const getCodePointsLength = (() => {
|
|
1010
895
|
const SURROGATE_PAIR_RE = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g;
|
|
1011
896
|
return (input) => {
|
|
@@ -1281,13 +1166,15 @@ function wrapAnsi(string, columns, options) {
|
|
|
1281
1166
|
return String(string).normalize().split(CRLF_OR_LF).map((line) => exec(line, columns, options)).join("\n");
|
|
1282
1167
|
}
|
|
1283
1168
|
function isUnicodeSupported() {
|
|
1284
|
-
|
|
1285
|
-
|
|
1169
|
+
const { env } = process$1;
|
|
1170
|
+
const { TERM, TERM_PROGRAM } = env;
|
|
1171
|
+
if (process$1.platform !== "win32") return TERM !== "linux";
|
|
1172
|
+
return Boolean(env.WT_SESSION) || Boolean(env.TERMINUS_SUBLIME) || env.ConEmuTask === "{cmd::Cmder}" || TERM_PROGRAM === "Terminus-Sublime" || TERM_PROGRAM === "vscode" || TERM === "xterm-256color" || TERM === "alacritty" || TERM === "rxvt-unicode" || TERM === "rxvt-unicode-256color" || env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
|
|
1286
1173
|
}
|
|
1287
1174
|
updateSettings({ withGuide: false });
|
|
1288
1175
|
/** Wrap using visible columns rather than the length of ANSI escape sequences. */
|
|
1289
1176
|
const wrapTextWithPrefix = (output, text, prefix, startPrefix = prefix) => {
|
|
1290
|
-
return wrapAnsi(text, Math.max(1, getColumns(output ?? process.stdout) - Math.max(fastStringWidth
|
|
1177
|
+
return wrapAnsi(text, Math.max(1, getColumns(output ?? process.stdout) - Math.max(fastStringWidth(prefix), fastStringWidth(startPrefix))), {
|
|
1291
1178
|
hard: true,
|
|
1292
1179
|
trim: false
|
|
1293
1180
|
}).split("\n").map((line, index) => `${index === 0 ? startPrefix : prefix}${line}`).join("\n");
|
|
@@ -1299,8 +1186,8 @@ const promptTitle = (message, state, opts) => {
|
|
|
1299
1186
|
return `${hasGuide ? `${import_picocolors.default.gray(S_BAR)}\n` : ""}${wrapTextWithPrefix(opts.output, message, hasGuide ? `${symbolBar(state)} ` : " ", `${symbol(state)} `)}\n`;
|
|
1300
1187
|
};
|
|
1301
1188
|
const optionText = (output, marker, label, format, suffix = "") => {
|
|
1302
|
-
const continuation = " ".repeat(fastStringWidth
|
|
1303
|
-
const width = Math.max(1, getColumns(output ?? process.stdout) - 2 - fastStringWidth
|
|
1189
|
+
const continuation = " ".repeat(fastStringWidth(marker));
|
|
1190
|
+
const width = Math.max(1, getColumns(output ?? process.stdout) - 2 - fastStringWidth(marker));
|
|
1304
1191
|
const [first, ...rest] = label.split("\n");
|
|
1305
1192
|
return wrapAnsi([format(first) + suffix, ...rest.map(format)].join("\n"), width, {
|
|
1306
1193
|
hard: true,
|
|
@@ -1759,9 +1646,9 @@ const spinner = ({ indicator = "dots", onCancel, output = process.stdout, cancel
|
|
|
1759
1646
|
hard: true,
|
|
1760
1647
|
trim: false
|
|
1761
1648
|
}).split("\n");
|
|
1762
|
-
if (prevLines.length > 1) output.write(
|
|
1763
|
-
output.write(
|
|
1764
|
-
output.write(
|
|
1649
|
+
if (prevLines.length > 1) output.write(cursor.up(prevLines.length - 1));
|
|
1650
|
+
output.write(cursor.to(0));
|
|
1651
|
+
output.write(erase.down());
|
|
1765
1652
|
};
|
|
1766
1653
|
const hasGuide = getGuide(opts);
|
|
1767
1654
|
const startLoop = () => {
|
|
@@ -1957,8 +1844,7 @@ const text = (opts) => {
|
|
|
1957
1844
|
}
|
|
1958
1845
|
}).prompt();
|
|
1959
1846
|
};
|
|
1960
|
-
|
|
1961
|
-
//#region ../../node_modules/.pnpm/verkit@0.5.0/node_modules/verkit/dist/version-Co1j9Tpq.js
|
|
1847
|
+
// ../../node_modules/.pnpm/verkit@0.5.0/node_modules/verkit/dist/version-Co1j9Tpq.js
|
|
1962
1848
|
const COERCE_EXACT = safeRegex(COERCE);
|
|
1963
1849
|
const COERCE_FULL_EXACT = safeRegex(COERCE_FULL);
|
|
1964
1850
|
safeRegex(`^${PRERELEASE}$`);
|
|
@@ -1991,8 +1877,7 @@ function coerce(value, options = {}) {
|
|
|
1991
1877
|
function getMajor(version, options = {}) {
|
|
1992
1878
|
return parse(version, options).major;
|
|
1993
1879
|
}
|
|
1994
|
-
|
|
1995
|
-
//#region src/types/package.ts
|
|
1880
|
+
// src/types/package.ts
|
|
1996
1881
|
const PackageManager = {
|
|
1997
1882
|
pnpm: "pnpm",
|
|
1998
1883
|
npm: "npm",
|
|
@@ -2005,8 +1890,7 @@ const DependencyType = {
|
|
|
2005
1890
|
peerDependencies: "peerDependencies",
|
|
2006
1891
|
optionalDependencies: "optionalDependencies"
|
|
2007
1892
|
};
|
|
2008
|
-
|
|
2009
|
-
//#region src/utils/spinner.ts
|
|
1893
|
+
// src/utils/spinner.ts
|
|
2010
1894
|
function getSpinner(interactive) {
|
|
2011
1895
|
if (interactive) return spinner();
|
|
2012
1896
|
return {
|
|
@@ -2028,8 +1912,7 @@ function getSilentSpinner() {
|
|
|
2028
1912
|
message: () => {}
|
|
2029
1913
|
};
|
|
2030
1914
|
}
|
|
2031
|
-
|
|
2032
|
-
//#region src/utils/approve-builds.ts
|
|
1915
|
+
// src/utils/approve-builds.ts
|
|
2033
1916
|
/**
|
|
2034
1917
|
* pnpm prints this prefix whenever it gates a dependency's build (install /
|
|
2035
1918
|
* postinstall) script behind explicit approval. It appears both in the pnpm
|
|
@@ -2267,13 +2150,12 @@ async function detectGatedBuilds(installCwd, packageManager, pendingBuildsFromIn
|
|
|
2267
2150
|
if (packageManager === PackageManager.pnpm || packageManager === PackageManager.yarn || packageManager === PackageManager.npm) return pendingBuildsFromInstall ?? [];
|
|
2268
2151
|
if (packageManager === PackageManager.bun) {
|
|
2269
2152
|
const { exitCode, stdout, stderr } = await runCommandSilently({
|
|
2270
|
-
|
|
2271
|
-
args: [
|
|
2153
|
+
...getVpCommand([
|
|
2272
2154
|
"exec",
|
|
2273
2155
|
"bun",
|
|
2274
2156
|
"pm",
|
|
2275
2157
|
"untrusted"
|
|
2276
|
-
],
|
|
2158
|
+
]),
|
|
2277
2159
|
cwd: installCwd,
|
|
2278
2160
|
envs: process.env
|
|
2279
2161
|
});
|
|
@@ -2305,8 +2187,7 @@ async function runBuildAndReport(args, cwd, packages, interactive, silent, extra
|
|
|
2305
2187
|
const spinner = silent ? getSilentSpinner() : getSpinner(interactive);
|
|
2306
2188
|
spinner.start(`Building ${packages.join(", ")}...`);
|
|
2307
2189
|
const { exitCode, stdout, stderr } = await runCommandSilently({
|
|
2308
|
-
|
|
2309
|
-
args,
|
|
2190
|
+
...getVpCommand(args),
|
|
2310
2191
|
cwd,
|
|
2311
2192
|
envs: extraEnv ? {
|
|
2312
2193
|
...process.env,
|
|
@@ -2334,12 +2215,11 @@ async function runBuildAndReport(args, cwd, packages, interactive, silent, extra
|
|
|
2334
2215
|
async function approveNpmScripts(installCwd, packages, interactive, silent) {
|
|
2335
2216
|
const approveCommand = `vp pm approve-builds ${packages.join(" ")}`;
|
|
2336
2217
|
const { exitCode, stdout, stderr } = await runCommandSilently({
|
|
2337
|
-
|
|
2338
|
-
args: [
|
|
2218
|
+
...getVpCommand([
|
|
2339
2219
|
"pm",
|
|
2340
2220
|
"approve-builds",
|
|
2341
2221
|
...packages
|
|
2342
|
-
],
|
|
2222
|
+
]),
|
|
2343
2223
|
cwd: installCwd,
|
|
2344
2224
|
envs: process.env
|
|
2345
2225
|
});
|
|
@@ -2441,8 +2321,7 @@ async function approveBuilds(options) {
|
|
|
2441
2321
|
...selected
|
|
2442
2322
|
], cwd, selected, interactive, silent);
|
|
2443
2323
|
}
|
|
2444
|
-
|
|
2445
|
-
//#region src/utils/yaml.ts
|
|
2324
|
+
// src/utils/yaml.ts
|
|
2446
2325
|
var import_dist = require_dist();
|
|
2447
2326
|
function readYamlFile(file) {
|
|
2448
2327
|
const content = fs.readFileSync(file, "utf-8");
|
|
@@ -2457,8 +2336,7 @@ function editYamlFile(file, callback) {
|
|
|
2457
2336
|
function scalarString(value) {
|
|
2458
2337
|
return new import_dist.Scalar(value);
|
|
2459
2338
|
}
|
|
2460
|
-
|
|
2461
|
-
//#region src/utils/preview-registry.ts
|
|
2339
|
+
// src/utils/preview-registry.ts
|
|
2462
2340
|
const DEFAULT_BRIDGE_REGISTRY = "https://registry-bridge.viteplus.dev/";
|
|
2463
2341
|
const REGISTRY_MARKER = "# vite-plus preview build registry bridge (auto-added by vp)";
|
|
2464
2342
|
const BRIDGE_HOST = "registry-bridge.viteplus.dev";
|
|
@@ -2585,8 +2463,7 @@ function reconcilePreviewBridgeRegistry(projectRoot, version = process.env.VP_VE
|
|
|
2585
2463
|
const clearedYarnrc = clearYarnBerryRegistry(projectRoot);
|
|
2586
2464
|
return clearedNpmrc || clearedYarnrc;
|
|
2587
2465
|
}
|
|
2588
|
-
|
|
2589
|
-
//#region src/utils/prompts.ts
|
|
2466
|
+
// src/utils/prompts.ts
|
|
2590
2467
|
/**
|
|
2591
2468
|
* pnpm v11 promoted `ERR_PNPM_IGNORED_BUILDS` from a warning to a hard
|
|
2592
2469
|
* exit-1. Auto-installs run by `vp migrate` / `vp create` happen before the
|
|
@@ -2651,8 +2528,7 @@ async function runViteInstall(cwd, interactive, extraArgs, options) {
|
|
|
2651
2528
|
const startTime = Date.now();
|
|
2652
2529
|
spinner.start(`Installing dependencies...`);
|
|
2653
2530
|
const { exitCode, stderr, stdout } = await runCommandSilently({
|
|
2654
|
-
|
|
2655
|
-
args: ["install", ...installArgs],
|
|
2531
|
+
...getVpCommand(["install", ...installArgs]),
|
|
2656
2532
|
cwd,
|
|
2657
2533
|
envs: process.env
|
|
2658
2534
|
});
|
|
@@ -2684,12 +2560,11 @@ async function runViteFmt(cwd, interactive, paths, options) {
|
|
|
2684
2560
|
const startTime = Date.now();
|
|
2685
2561
|
spinner.start(`Formatting code...`);
|
|
2686
2562
|
const { exitCode, stderr, stdout } = await runCommandSilently({
|
|
2687
|
-
|
|
2688
|
-
args: [
|
|
2563
|
+
...getVpCommand([
|
|
2689
2564
|
...options?.commandArgs ?? [],
|
|
2690
2565
|
"fmt",
|
|
2691
2566
|
...paths ?? []
|
|
2692
|
-
],
|
|
2567
|
+
], options?.command),
|
|
2693
2568
|
cwd,
|
|
2694
2569
|
envs: process.env
|
|
2695
2570
|
});
|
|
@@ -2773,5 +2648,4 @@ async function resolveGitInit(options, isMonorepo) {
|
|
|
2773
2648
|
function defaultInteractive() {
|
|
2774
2649
|
return !process.env.CI && process.stdin.isTTY;
|
|
2775
2650
|
}
|
|
2776
|
-
//#endregion
|
|
2777
2651
|
export { text as A, confirm as C, outro as D, multiselect as E, isCancel as M, select as O, normalize$1 as S, log as T, getSpinner as _, resolveGitInit as a, coerce as b, selectPackageManager as c, readYamlFile as d, scalarString as f, getSilentSpinner as g, resolveApproveBuildTargets as h, promptGitHooks as i, require_picocolors as j, spinner as k, upgradeYarn as l, detectGatedBuilds as m, defaultInteractive as n, runViteFmt as o, approveBuilds as p, downloadPackageManager$1 as r, runViteInstall as s, cancelAndExit as t, editYamlFile as u, DependencyType as v, intro as w, getMajor as x, PackageManager as y };
|