vite-plus 0.2.9 → 0.3.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/README.md +4 -3
- package/binding/index.cjs +57 -54
- package/binding/index.d.cts +93 -0
- package/dist/{agent-DQU8uS6P.js → agent-Wqx0MPk0.js} +1 -1
- package/dist/bin.js +16 -6
- package/dist/command-CLJK5jGW.js +2 -0
- package/dist/command-CguLh2KL.js +471 -0
- package/dist/config/bin.js +7 -5
- package/dist/{constants-CG513DRa.js → constants-Bn-U8o4v.js} +5 -3
- package/dist/create/bin.js +28 -52
- package/dist/{define-config-CV4bQG_8.js → define-config-GXUdVT-0.js} +2 -2
- package/dist/{define-config-DyNLA_f0.cjs → define-config-WiVlryJ2.cjs} +2 -2
- package/dist/define-config.cjs +1 -1
- package/dist/define-config.js +1 -1
- package/dist/{editor-g4PosU99.js → editor-CC4DqODz.js} +562 -59
- package/dist/{terminal-Bz-ps6rJ.js → help-BmKpeOP9.js} +1 -38
- package/dist/hooks/bin.js +3 -2
- package/dist/{hooks-pNCBWtFT.js → hooks-DFqViZqZ.js} +5 -2
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/migration/bin.js +60 -11
- package/dist/migration/compat/worker.js +1 -1
- package/dist/{oxlint-plugin-config-BEZ9IUf7.js → oxlint-plugin-config-DX5ezKbB.js} +1 -1
- package/dist/oxlint-plugin.js +1 -1
- package/dist/pack-bin.js +5 -4
- package/dist/{package-B4T8RGMG.js → package-CBe9EWPY.js} +2 -2
- package/dist/{prompts-CHz_98bJ.js → prompts-DF3yU-eU.js} +6 -474
- package/dist/{report-BS7ULx7A.js → report-ZNR1Mk6h.js} +1 -0
- package/dist/{resolve-vite-config-Dmeyeyj-.js → resolve-vite-config-ipGb39Jo.js} +2 -2
- package/dist/staged/bin.js +77 -47
- package/dist/terminal-MKGAuy-p.js +39 -0
- package/dist/toolchain.js +9 -9
- package/dist/toolchain.json +9 -9
- package/dist/tsconfig-BVHG3DpR.js +2 -0
- package/dist/{tsconfig-7v_BHagU.js → tsconfig-LD2QhQ0O.js} +5 -4
- package/dist/version.js +4 -3
- package/dist/versions.js +5 -5
- package/docs/guide/env.md +20 -6
- package/docs/guide/install.md +2 -1
- package/docs/guide/installer-env-vars.md +41 -5
- package/docs/guide/migrate-rules.md +9 -0
- package/docs/guide/migrate.md +5 -5
- package/docs/guide/test.md +8 -0
- package/docs/guide/upgrade.md +48 -1
- package/package.json +32 -33
- package/docs/_data/team.ts +0 -131
- package/docs/package.json +0 -30
- package/docs/pnpm-lock.yaml +0 -4003
- package/docs/pnpm-workspace.yaml +0 -13
- package/docs/public/checkmark.svg +0 -1
- package/docs/public/cta-background.jpg +0 -0
- package/docs/public/favicon.svg +0 -1
- package/docs/public/icon.svg +0 -1
- package/docs/public/logo.svg +0 -1
- package/docs/public/og.jpg +0 -0
- package/docs/vite.config.ts +0 -20
- package/dist/{json-qlK6UH0r.js → json-cULBl7Pi.js} +107 -107
- package/dist/{log-update-CoW8Z4Dl.js → log-update-DHZRyJ2m.js} +1 -1
package/README.md
CHANGED
|
@@ -96,6 +96,7 @@ Use `vp migrate` to migrate to Vite+. It merges tool-specific config files such
|
|
|
96
96
|
- **create** - Create a new project from a template
|
|
97
97
|
- **migrate** - Migrate an existing project to Vite+
|
|
98
98
|
- **config** - Configure hooks and agent integration
|
|
99
|
+
- **hooks** - Manage the Git hook dispatcher
|
|
99
100
|
- **staged** - Run linters on staged files
|
|
100
101
|
- **install** (`i`) - Install dependencies
|
|
101
102
|
- **env** - Manage Node.js versions
|
|
@@ -200,7 +201,7 @@ Add package-manager overrides so that other packages use the Vite+ versions. Ali
|
|
|
200
201
|
```json
|
|
201
202
|
"overrides": {
|
|
202
203
|
"vite": "npm:@voidzero-dev/vite-plus-core@latest",
|
|
203
|
-
"vitest": "4.1.
|
|
204
|
+
"vitest": "4.1.11"
|
|
204
205
|
}
|
|
205
206
|
```
|
|
206
207
|
|
|
@@ -209,7 +210,7 @@ If you are using `pnpm`, add this to your `pnpm-workspace.yaml`:
|
|
|
209
210
|
```yaml
|
|
210
211
|
overrides:
|
|
211
212
|
vite: npm:@voidzero-dev/vite-plus-core@latest
|
|
212
|
-
vitest: 4.1.
|
|
213
|
+
vitest: 4.1.11
|
|
213
214
|
```
|
|
214
215
|
|
|
215
216
|
Or, if you are using Yarn:
|
|
@@ -217,7 +218,7 @@ Or, if you are using Yarn:
|
|
|
217
218
|
```json
|
|
218
219
|
"resolutions": {
|
|
219
220
|
"vite": "npm:@voidzero-dev/vite-plus-core@latest",
|
|
220
|
-
"vitest": "4.1.
|
|
221
|
+
"vitest": "4.1.11"
|
|
221
222
|
}
|
|
222
223
|
```
|
|
223
224
|
|
package/binding/index.cjs
CHANGED
|
@@ -81,12 +81,12 @@ function requireNative() {
|
|
|
81
81
|
const bindingPackageVersion =
|
|
82
82
|
require('@voidzero-dev/vite-plus-android-arm64/package.json').version;
|
|
83
83
|
if (
|
|
84
|
-
bindingPackageVersion !== '0.
|
|
84
|
+
bindingPackageVersion !== '0.3.0' &&
|
|
85
85
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
86
86
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0'
|
|
87
87
|
) {
|
|
88
88
|
throw new Error(
|
|
89
|
-
`Native binding package version mismatch, expected 0.
|
|
89
|
+
`Native binding package version mismatch, expected 0.3.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
90
90
|
);
|
|
91
91
|
}
|
|
92
92
|
return binding;
|
|
@@ -104,12 +104,12 @@ function requireNative() {
|
|
|
104
104
|
const bindingPackageVersion =
|
|
105
105
|
require('@voidzero-dev/vite-plus-android-arm-eabi/package.json').version;
|
|
106
106
|
if (
|
|
107
|
-
bindingPackageVersion !== '0.
|
|
107
|
+
bindingPackageVersion !== '0.3.0' &&
|
|
108
108
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
109
109
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0'
|
|
110
110
|
) {
|
|
111
111
|
throw new Error(
|
|
112
|
-
`Native binding package version mismatch, expected 0.
|
|
112
|
+
`Native binding package version mismatch, expected 0.3.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
113
113
|
);
|
|
114
114
|
}
|
|
115
115
|
return binding;
|
|
@@ -139,12 +139,12 @@ function requireNative() {
|
|
|
139
139
|
const bindingPackageVersion =
|
|
140
140
|
require('@voidzero-dev/vite-plus-win32-x64-gnu/package.json').version;
|
|
141
141
|
if (
|
|
142
|
-
bindingPackageVersion !== '0.
|
|
142
|
+
bindingPackageVersion !== '0.3.0' &&
|
|
143
143
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
144
144
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0'
|
|
145
145
|
) {
|
|
146
146
|
throw new Error(
|
|
147
|
-
`Native binding package version mismatch, expected 0.
|
|
147
|
+
`Native binding package version mismatch, expected 0.3.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
148
148
|
);
|
|
149
149
|
}
|
|
150
150
|
return binding;
|
|
@@ -162,12 +162,12 @@ function requireNative() {
|
|
|
162
162
|
const bindingPackageVersion =
|
|
163
163
|
require('@voidzero-dev/vite-plus-win32-x64-msvc/package.json').version;
|
|
164
164
|
if (
|
|
165
|
-
bindingPackageVersion !== '0.
|
|
165
|
+
bindingPackageVersion !== '0.3.0' &&
|
|
166
166
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
167
167
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0'
|
|
168
168
|
) {
|
|
169
169
|
throw new Error(
|
|
170
|
-
`Native binding package version mismatch, expected 0.
|
|
170
|
+
`Native binding package version mismatch, expected 0.3.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
171
171
|
);
|
|
172
172
|
}
|
|
173
173
|
return binding;
|
|
@@ -186,12 +186,12 @@ function requireNative() {
|
|
|
186
186
|
const bindingPackageVersion =
|
|
187
187
|
require('@voidzero-dev/vite-plus-win32-ia32-msvc/package.json').version;
|
|
188
188
|
if (
|
|
189
|
-
bindingPackageVersion !== '0.
|
|
189
|
+
bindingPackageVersion !== '0.3.0' &&
|
|
190
190
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
191
191
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0'
|
|
192
192
|
) {
|
|
193
193
|
throw new Error(
|
|
194
|
-
`Native binding package version mismatch, expected 0.
|
|
194
|
+
`Native binding package version mismatch, expected 0.3.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
195
195
|
);
|
|
196
196
|
}
|
|
197
197
|
return binding;
|
|
@@ -209,12 +209,12 @@ function requireNative() {
|
|
|
209
209
|
const bindingPackageVersion =
|
|
210
210
|
require('@voidzero-dev/vite-plus-win32-arm64-msvc/package.json').version;
|
|
211
211
|
if (
|
|
212
|
-
bindingPackageVersion !== '0.
|
|
212
|
+
bindingPackageVersion !== '0.3.0' &&
|
|
213
213
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
214
214
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0'
|
|
215
215
|
) {
|
|
216
216
|
throw new Error(
|
|
217
|
-
`Native binding package version mismatch, expected 0.
|
|
217
|
+
`Native binding package version mismatch, expected 0.3.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
218
218
|
);
|
|
219
219
|
}
|
|
220
220
|
return binding;
|
|
@@ -235,12 +235,12 @@ function requireNative() {
|
|
|
235
235
|
const bindingPackageVersion =
|
|
236
236
|
require('@voidzero-dev/vite-plus-darwin-universal/package.json').version;
|
|
237
237
|
if (
|
|
238
|
-
bindingPackageVersion !== '0.
|
|
238
|
+
bindingPackageVersion !== '0.3.0' &&
|
|
239
239
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
240
240
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0'
|
|
241
241
|
) {
|
|
242
242
|
throw new Error(
|
|
243
|
-
`Native binding package version mismatch, expected 0.
|
|
243
|
+
`Native binding package version mismatch, expected 0.3.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
244
244
|
);
|
|
245
245
|
}
|
|
246
246
|
return binding;
|
|
@@ -258,12 +258,12 @@ function requireNative() {
|
|
|
258
258
|
const bindingPackageVersion =
|
|
259
259
|
require('@voidzero-dev/vite-plus-darwin-x64/package.json').version;
|
|
260
260
|
if (
|
|
261
|
-
bindingPackageVersion !== '0.
|
|
261
|
+
bindingPackageVersion !== '0.3.0' &&
|
|
262
262
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
263
263
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0'
|
|
264
264
|
) {
|
|
265
265
|
throw new Error(
|
|
266
|
-
`Native binding package version mismatch, expected 0.
|
|
266
|
+
`Native binding package version mismatch, expected 0.3.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
267
267
|
);
|
|
268
268
|
}
|
|
269
269
|
return binding;
|
|
@@ -281,12 +281,12 @@ function requireNative() {
|
|
|
281
281
|
const bindingPackageVersion =
|
|
282
282
|
require('@voidzero-dev/vite-plus-darwin-arm64/package.json').version;
|
|
283
283
|
if (
|
|
284
|
-
bindingPackageVersion !== '0.
|
|
284
|
+
bindingPackageVersion !== '0.3.0' &&
|
|
285
285
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
286
286
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0'
|
|
287
287
|
) {
|
|
288
288
|
throw new Error(
|
|
289
|
-
`Native binding package version mismatch, expected 0.
|
|
289
|
+
`Native binding package version mismatch, expected 0.3.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
290
290
|
);
|
|
291
291
|
}
|
|
292
292
|
return binding;
|
|
@@ -308,12 +308,12 @@ function requireNative() {
|
|
|
308
308
|
const bindingPackageVersion =
|
|
309
309
|
require('@voidzero-dev/vite-plus-freebsd-x64/package.json').version;
|
|
310
310
|
if (
|
|
311
|
-
bindingPackageVersion !== '0.
|
|
311
|
+
bindingPackageVersion !== '0.3.0' &&
|
|
312
312
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
313
313
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0'
|
|
314
314
|
) {
|
|
315
315
|
throw new Error(
|
|
316
|
-
`Native binding package version mismatch, expected 0.
|
|
316
|
+
`Native binding package version mismatch, expected 0.3.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
317
317
|
);
|
|
318
318
|
}
|
|
319
319
|
return binding;
|
|
@@ -331,12 +331,12 @@ function requireNative() {
|
|
|
331
331
|
const bindingPackageVersion =
|
|
332
332
|
require('@voidzero-dev/vite-plus-freebsd-arm64/package.json').version;
|
|
333
333
|
if (
|
|
334
|
-
bindingPackageVersion !== '0.
|
|
334
|
+
bindingPackageVersion !== '0.3.0' &&
|
|
335
335
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
336
336
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0'
|
|
337
337
|
) {
|
|
338
338
|
throw new Error(
|
|
339
|
-
`Native binding package version mismatch, expected 0.
|
|
339
|
+
`Native binding package version mismatch, expected 0.3.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
340
340
|
);
|
|
341
341
|
}
|
|
342
342
|
return binding;
|
|
@@ -359,12 +359,12 @@ function requireNative() {
|
|
|
359
359
|
const bindingPackageVersion =
|
|
360
360
|
require('@voidzero-dev/vite-plus-linux-x64-musl/package.json').version;
|
|
361
361
|
if (
|
|
362
|
-
bindingPackageVersion !== '0.
|
|
362
|
+
bindingPackageVersion !== '0.3.0' &&
|
|
363
363
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
364
364
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0'
|
|
365
365
|
) {
|
|
366
366
|
throw new Error(
|
|
367
|
-
`Native binding package version mismatch, expected 0.
|
|
367
|
+
`Native binding package version mismatch, expected 0.3.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
368
368
|
);
|
|
369
369
|
}
|
|
370
370
|
return binding;
|
|
@@ -382,12 +382,12 @@ function requireNative() {
|
|
|
382
382
|
const bindingPackageVersion =
|
|
383
383
|
require('@voidzero-dev/vite-plus-linux-x64-gnu/package.json').version;
|
|
384
384
|
if (
|
|
385
|
-
bindingPackageVersion !== '0.
|
|
385
|
+
bindingPackageVersion !== '0.3.0' &&
|
|
386
386
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
387
387
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0'
|
|
388
388
|
) {
|
|
389
389
|
throw new Error(
|
|
390
|
-
`Native binding package version mismatch, expected 0.
|
|
390
|
+
`Native binding package version mismatch, expected 0.3.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
391
391
|
);
|
|
392
392
|
}
|
|
393
393
|
return binding;
|
|
@@ -407,12 +407,12 @@ function requireNative() {
|
|
|
407
407
|
const bindingPackageVersion =
|
|
408
408
|
require('@voidzero-dev/vite-plus-linux-arm64-musl/package.json').version;
|
|
409
409
|
if (
|
|
410
|
-
bindingPackageVersion !== '0.
|
|
410
|
+
bindingPackageVersion !== '0.3.0' &&
|
|
411
411
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
412
412
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0'
|
|
413
413
|
) {
|
|
414
414
|
throw new Error(
|
|
415
|
-
`Native binding package version mismatch, expected 0.
|
|
415
|
+
`Native binding package version mismatch, expected 0.3.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
416
416
|
);
|
|
417
417
|
}
|
|
418
418
|
return binding;
|
|
@@ -430,12 +430,12 @@ function requireNative() {
|
|
|
430
430
|
const bindingPackageVersion =
|
|
431
431
|
require('@voidzero-dev/vite-plus-linux-arm64-gnu/package.json').version;
|
|
432
432
|
if (
|
|
433
|
-
bindingPackageVersion !== '0.
|
|
433
|
+
bindingPackageVersion !== '0.3.0' &&
|
|
434
434
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
435
435
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0'
|
|
436
436
|
) {
|
|
437
437
|
throw new Error(
|
|
438
|
-
`Native binding package version mismatch, expected 0.
|
|
438
|
+
`Native binding package version mismatch, expected 0.3.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
439
439
|
);
|
|
440
440
|
}
|
|
441
441
|
return binding;
|
|
@@ -455,12 +455,12 @@ function requireNative() {
|
|
|
455
455
|
const bindingPackageVersion =
|
|
456
456
|
require('@voidzero-dev/vite-plus-linux-arm-musleabihf/package.json').version;
|
|
457
457
|
if (
|
|
458
|
-
bindingPackageVersion !== '0.
|
|
458
|
+
bindingPackageVersion !== '0.3.0' &&
|
|
459
459
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
460
460
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0'
|
|
461
461
|
) {
|
|
462
462
|
throw new Error(
|
|
463
|
-
`Native binding package version mismatch, expected 0.
|
|
463
|
+
`Native binding package version mismatch, expected 0.3.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
464
464
|
);
|
|
465
465
|
}
|
|
466
466
|
return binding;
|
|
@@ -478,12 +478,12 @@ function requireNative() {
|
|
|
478
478
|
const bindingPackageVersion =
|
|
479
479
|
require('@voidzero-dev/vite-plus-linux-arm-gnueabihf/package.json').version;
|
|
480
480
|
if (
|
|
481
|
-
bindingPackageVersion !== '0.
|
|
481
|
+
bindingPackageVersion !== '0.3.0' &&
|
|
482
482
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
483
483
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0'
|
|
484
484
|
) {
|
|
485
485
|
throw new Error(
|
|
486
|
-
`Native binding package version mismatch, expected 0.
|
|
486
|
+
`Native binding package version mismatch, expected 0.3.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
487
487
|
);
|
|
488
488
|
}
|
|
489
489
|
return binding;
|
|
@@ -503,12 +503,12 @@ function requireNative() {
|
|
|
503
503
|
const bindingPackageVersion =
|
|
504
504
|
require('@voidzero-dev/vite-plus-linux-loong64-musl/package.json').version;
|
|
505
505
|
if (
|
|
506
|
-
bindingPackageVersion !== '0.
|
|
506
|
+
bindingPackageVersion !== '0.3.0' &&
|
|
507
507
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
508
508
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0'
|
|
509
509
|
) {
|
|
510
510
|
throw new Error(
|
|
511
|
-
`Native binding package version mismatch, expected 0.
|
|
511
|
+
`Native binding package version mismatch, expected 0.3.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
512
512
|
);
|
|
513
513
|
}
|
|
514
514
|
return binding;
|
|
@@ -526,12 +526,12 @@ function requireNative() {
|
|
|
526
526
|
const bindingPackageVersion =
|
|
527
527
|
require('@voidzero-dev/vite-plus-linux-loong64-gnu/package.json').version;
|
|
528
528
|
if (
|
|
529
|
-
bindingPackageVersion !== '0.
|
|
529
|
+
bindingPackageVersion !== '0.3.0' &&
|
|
530
530
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
531
531
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0'
|
|
532
532
|
) {
|
|
533
533
|
throw new Error(
|
|
534
|
-
`Native binding package version mismatch, expected 0.
|
|
534
|
+
`Native binding package version mismatch, expected 0.3.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
535
535
|
);
|
|
536
536
|
}
|
|
537
537
|
return binding;
|
|
@@ -551,12 +551,12 @@ function requireNative() {
|
|
|
551
551
|
const bindingPackageVersion =
|
|
552
552
|
require('@voidzero-dev/vite-plus-linux-riscv64-musl/package.json').version;
|
|
553
553
|
if (
|
|
554
|
-
bindingPackageVersion !== '0.
|
|
554
|
+
bindingPackageVersion !== '0.3.0' &&
|
|
555
555
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
556
556
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0'
|
|
557
557
|
) {
|
|
558
558
|
throw new Error(
|
|
559
|
-
`Native binding package version mismatch, expected 0.
|
|
559
|
+
`Native binding package version mismatch, expected 0.3.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
560
560
|
);
|
|
561
561
|
}
|
|
562
562
|
return binding;
|
|
@@ -574,12 +574,12 @@ function requireNative() {
|
|
|
574
574
|
const bindingPackageVersion =
|
|
575
575
|
require('@voidzero-dev/vite-plus-linux-riscv64-gnu/package.json').version;
|
|
576
576
|
if (
|
|
577
|
-
bindingPackageVersion !== '0.
|
|
577
|
+
bindingPackageVersion !== '0.3.0' &&
|
|
578
578
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
579
579
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0'
|
|
580
580
|
) {
|
|
581
581
|
throw new Error(
|
|
582
|
-
`Native binding package version mismatch, expected 0.
|
|
582
|
+
`Native binding package version mismatch, expected 0.3.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
583
583
|
);
|
|
584
584
|
}
|
|
585
585
|
return binding;
|
|
@@ -598,12 +598,12 @@ function requireNative() {
|
|
|
598
598
|
const bindingPackageVersion =
|
|
599
599
|
require('@voidzero-dev/vite-plus-linux-ppc64-gnu/package.json').version;
|
|
600
600
|
if (
|
|
601
|
-
bindingPackageVersion !== '0.
|
|
601
|
+
bindingPackageVersion !== '0.3.0' &&
|
|
602
602
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
603
603
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0'
|
|
604
604
|
) {
|
|
605
605
|
throw new Error(
|
|
606
|
-
`Native binding package version mismatch, expected 0.
|
|
606
|
+
`Native binding package version mismatch, expected 0.3.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
607
607
|
);
|
|
608
608
|
}
|
|
609
609
|
return binding;
|
|
@@ -621,12 +621,12 @@ function requireNative() {
|
|
|
621
621
|
const bindingPackageVersion =
|
|
622
622
|
require('@voidzero-dev/vite-plus-linux-s390x-gnu/package.json').version;
|
|
623
623
|
if (
|
|
624
|
-
bindingPackageVersion !== '0.
|
|
624
|
+
bindingPackageVersion !== '0.3.0' &&
|
|
625
625
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
626
626
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0'
|
|
627
627
|
) {
|
|
628
628
|
throw new Error(
|
|
629
|
-
`Native binding package version mismatch, expected 0.
|
|
629
|
+
`Native binding package version mismatch, expected 0.3.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
630
630
|
);
|
|
631
631
|
}
|
|
632
632
|
return binding;
|
|
@@ -648,12 +648,12 @@ function requireNative() {
|
|
|
648
648
|
const bindingPackageVersion =
|
|
649
649
|
require('@voidzero-dev/vite-plus-openharmony-arm64/package.json').version;
|
|
650
650
|
if (
|
|
651
|
-
bindingPackageVersion !== '0.
|
|
651
|
+
bindingPackageVersion !== '0.3.0' &&
|
|
652
652
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
653
653
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0'
|
|
654
654
|
) {
|
|
655
655
|
throw new Error(
|
|
656
|
-
`Native binding package version mismatch, expected 0.
|
|
656
|
+
`Native binding package version mismatch, expected 0.3.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
657
657
|
);
|
|
658
658
|
}
|
|
659
659
|
return binding;
|
|
@@ -671,12 +671,12 @@ function requireNative() {
|
|
|
671
671
|
const bindingPackageVersion =
|
|
672
672
|
require('@voidzero-dev/vite-plus-openharmony-x64/package.json').version;
|
|
673
673
|
if (
|
|
674
|
-
bindingPackageVersion !== '0.
|
|
674
|
+
bindingPackageVersion !== '0.3.0' &&
|
|
675
675
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
676
676
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0'
|
|
677
677
|
) {
|
|
678
678
|
throw new Error(
|
|
679
|
-
`Native binding package version mismatch, expected 0.
|
|
679
|
+
`Native binding package version mismatch, expected 0.3.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
680
680
|
);
|
|
681
681
|
}
|
|
682
682
|
return binding;
|
|
@@ -694,12 +694,12 @@ function requireNative() {
|
|
|
694
694
|
const bindingPackageVersion =
|
|
695
695
|
require('@voidzero-dev/vite-plus-openharmony-arm/package.json').version;
|
|
696
696
|
if (
|
|
697
|
-
bindingPackageVersion !== '0.
|
|
697
|
+
bindingPackageVersion !== '0.3.0' &&
|
|
698
698
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
699
699
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0'
|
|
700
700
|
) {
|
|
701
701
|
throw new Error(
|
|
702
|
-
`Native binding package version mismatch, expected 0.
|
|
702
|
+
`Native binding package version mismatch, expected 0.3.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
703
703
|
);
|
|
704
704
|
}
|
|
705
705
|
return binding;
|
|
@@ -844,9 +844,9 @@ if (!nativeBinding || forceWasi) {
|
|
|
844
844
|
) {
|
|
845
845
|
const bindingPackageVersion =
|
|
846
846
|
require('@voidzero-dev/vite-plus-wasm32-wasi/package.json').version;
|
|
847
|
-
if (bindingPackageVersion !== '0.
|
|
847
|
+
if (bindingPackageVersion !== '0.3.0') {
|
|
848
848
|
throw new Error(
|
|
849
|
-
`WASI binding package version mismatch, expected 0.
|
|
849
|
+
`WASI binding package version mismatch, expected 0.3.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
850
850
|
);
|
|
851
851
|
}
|
|
852
852
|
}
|
|
@@ -955,14 +955,17 @@ module.exports.collapseSourcemaps = nativeBinding.collapseSourcemaps;
|
|
|
955
955
|
module.exports.enhancedTransform = nativeBinding.enhancedTransform;
|
|
956
956
|
module.exports.enhancedTransformSync = nativeBinding.enhancedTransformSync;
|
|
957
957
|
module.exports.FilterTokenKind = nativeBinding.FilterTokenKind;
|
|
958
|
+
module.exports.getNativeMemoryStats = nativeBinding.getNativeMemoryStats;
|
|
958
959
|
module.exports.initTraceSubscriber = nativeBinding.initTraceSubscriber;
|
|
959
960
|
module.exports.registerPlugins = nativeBinding.registerPlugins;
|
|
961
|
+
module.exports.resetNativeMemoryStats = nativeBinding.resetNativeMemoryStats;
|
|
960
962
|
module.exports.resolveTsconfig = nativeBinding.resolveTsconfig;
|
|
961
963
|
module.exports.shutdownAsyncRuntime = nativeBinding.shutdownAsyncRuntime;
|
|
962
964
|
module.exports.startAsyncRuntime = nativeBinding.startAsyncRuntime;
|
|
963
965
|
module.exports.detectWorkspace = nativeBinding.detectWorkspace;
|
|
964
966
|
module.exports.downloadPackageManager = nativeBinding.downloadPackageManager;
|
|
965
967
|
module.exports.ensureBlockingStdio = nativeBinding.ensureBlockingStdio;
|
|
968
|
+
module.exports.getVpDirs = nativeBinding.getVpDirs;
|
|
966
969
|
module.exports.hasConfigKey = nativeBinding.hasConfigKey;
|
|
967
970
|
module.exports.mergeJsonConfig = nativeBinding.mergeJsonConfig;
|
|
968
971
|
module.exports.mergeTsdownConfig = nativeBinding.mergeTsdownConfig;
|
package/binding/index.d.cts
CHANGED
|
@@ -174,6 +174,38 @@ export interface MangleOptionsKeepNames {
|
|
|
174
174
|
class: boolean;
|
|
175
175
|
}
|
|
176
176
|
|
|
177
|
+
export interface ManglePropertiesOptions {
|
|
178
|
+
/**
|
|
179
|
+
* JavaScript `RegExp` selecting property names to mangle. The source and flags are compiled
|
|
180
|
+
* with Rust's regex engine. Flags `i`, `m`, `s`, and `u` are supported.
|
|
181
|
+
*/
|
|
182
|
+
include: RegExp;
|
|
183
|
+
/** JavaScript `RegExp` excluding property names selected by `include`. */
|
|
184
|
+
exclude?: RegExp;
|
|
185
|
+
/** Exact names that are neither mangled nor emitted as automatic output names. */
|
|
186
|
+
reserved?: Array<string>;
|
|
187
|
+
/**
|
|
188
|
+
* Mangle quoted property occurrences in addition to unquoted occurrences.
|
|
189
|
+
*
|
|
190
|
+
* @default false
|
|
191
|
+
*/
|
|
192
|
+
quoted?: boolean;
|
|
193
|
+
/**
|
|
194
|
+
* Generate readable `_$name$_`-style output names.
|
|
195
|
+
*
|
|
196
|
+
* @default false
|
|
197
|
+
*/
|
|
198
|
+
debug?: boolean;
|
|
199
|
+
/**
|
|
200
|
+
* Stable mappings from original names to output names. `false` reserves an original name.
|
|
201
|
+
* Entries that do not match `include`, or that match `exclude`, remain inert but are
|
|
202
|
+
* preserved in the returned `mangleCache`. String targets must be `IdentifierName` values
|
|
203
|
+
* other than `__proto__`, `constructor`, or `prototype`. The original name `__proto__` is
|
|
204
|
+
* always reserved and cannot be used as a cache key.
|
|
205
|
+
*/
|
|
206
|
+
cache?: Record<string, string | false>;
|
|
207
|
+
}
|
|
208
|
+
|
|
177
209
|
/**
|
|
178
210
|
* Minify asynchronously.
|
|
179
211
|
*
|
|
@@ -190,6 +222,12 @@ export interface MinifyOptions {
|
|
|
190
222
|
module?: boolean;
|
|
191
223
|
compress?: boolean | CompressOptions;
|
|
192
224
|
mangle?: boolean | MangleOptions;
|
|
225
|
+
/**
|
|
226
|
+
* Mangle matching property names independently of identifier mangling. Properties owned by
|
|
227
|
+
* unminified code, imported module namespaces, globals, or host APIs must be excluded or
|
|
228
|
+
* reserved.
|
|
229
|
+
*/
|
|
230
|
+
mangleProps?: ManglePropertiesOptions;
|
|
193
231
|
codegen?: boolean | CodegenOptions;
|
|
194
232
|
sourcemap?: boolean;
|
|
195
233
|
}
|
|
@@ -203,6 +241,11 @@ export interface MinifyResult {
|
|
|
203
241
|
* Only populated when `codegen.legalComments` is `"linked"` or `"external"`.
|
|
204
242
|
*/
|
|
205
243
|
legalComments: Array<string>;
|
|
244
|
+
/**
|
|
245
|
+
* Updated property-name cache sorted by original name. Present when `mangleProps` ran on a
|
|
246
|
+
* parse without errors.
|
|
247
|
+
*/
|
|
248
|
+
mangleCache?: Record<string, string | false>;
|
|
206
249
|
}
|
|
207
250
|
|
|
208
251
|
/** Minify synchronously. */
|
|
@@ -2063,6 +2106,7 @@ export interface BindingChecksOptions {
|
|
|
2063
2106
|
ineffectiveDynamicImport?: boolean;
|
|
2064
2107
|
largeBarrelModules?: boolean;
|
|
2065
2108
|
sourcemapBroken?: boolean;
|
|
2109
|
+
namespaceConflict?: boolean;
|
|
2066
2110
|
}
|
|
2067
2111
|
|
|
2068
2112
|
export interface BindingChunkImportMap {
|
|
@@ -2682,6 +2726,22 @@ export interface BindingModuleSideEffectsRule {
|
|
|
2682
2726
|
external?: boolean;
|
|
2683
2727
|
}
|
|
2684
2728
|
|
|
2729
|
+
/**
|
|
2730
|
+
* Counters of the Rust-side tracking allocator. V8 never allocates through
|
|
2731
|
+
* the Rust global allocator, so these numbers exclude the JS heap and GC
|
|
2732
|
+
* noise completely, unlike `process.memoryUsage()`.
|
|
2733
|
+
*/
|
|
2734
|
+
export interface BindingNativeMemoryStats {
|
|
2735
|
+
/** Bytes currently allocated and not yet freed, since process start. */
|
|
2736
|
+
liveBytes: number;
|
|
2737
|
+
/** Highest `live_bytes` seen since process start or the last reset. */
|
|
2738
|
+
peakBytes: number;
|
|
2739
|
+
/** Successful `alloc` calls since the last reset. */
|
|
2740
|
+
allocCount: number;
|
|
2741
|
+
/** Successful `realloc` calls since the last reset. */
|
|
2742
|
+
reallocCount: number;
|
|
2743
|
+
}
|
|
2744
|
+
|
|
2685
2745
|
export interface BindingOptimization {
|
|
2686
2746
|
inlineConst?: boolean | BindingInlineConstConfig;
|
|
2687
2747
|
pifeForModuleWrappers?: boolean;
|
|
@@ -3268,6 +3328,13 @@ export declare const enum FilterTokenKind {
|
|
|
3268
3328
|
QueryValue = 'QueryValue',
|
|
3269
3329
|
}
|
|
3270
3330
|
|
|
3331
|
+
/**
|
|
3332
|
+
* Returns the Rust-side allocator counters, or `None` when this binding was
|
|
3333
|
+
* built without the `tracking_allocator` cargo feature (the default —
|
|
3334
|
+
* tracking costs a few atomic operations per allocation).
|
|
3335
|
+
*/
|
|
3336
|
+
export declare function getNativeMemoryStats(): BindingNativeMemoryStats | null;
|
|
3337
|
+
|
|
3271
3338
|
export declare function initTraceSubscriber(): TraceSubscriberGuard | null;
|
|
3272
3339
|
|
|
3273
3340
|
export interface JsChangedOutputs {
|
|
@@ -3330,6 +3397,13 @@ export interface PreRenderedChunk {
|
|
|
3330
3397
|
|
|
3331
3398
|
export declare function registerPlugins(id: number, plugins: Array<BindingPluginWithIndex>): void;
|
|
3332
3399
|
|
|
3400
|
+
/**
|
|
3401
|
+
* Starts a new measuring window: the peak restarts from the current live
|
|
3402
|
+
* bytes and the counts restart from zero. No-op when the binding was built
|
|
3403
|
+
* without the `tracking_allocator` cargo feature.
|
|
3404
|
+
*/
|
|
3405
|
+
export declare function resetNativeMemoryStats(): void;
|
|
3406
|
+
|
|
3333
3407
|
export declare function resolveTsconfig(
|
|
3334
3408
|
filename: string,
|
|
3335
3409
|
cache: TsconfigCache | undefined | null,
|
|
@@ -3377,6 +3451,8 @@ export interface CliOptions {
|
|
|
3377
3451
|
pack: (err: Error | null) => Promise<JsCommandResolvedResult>;
|
|
3378
3452
|
doc: (err: Error | null) => Promise<JsCommandResolvedResult>;
|
|
3379
3453
|
cwd?: string;
|
|
3454
|
+
/** Whether the user supplied the global `-C` option. */
|
|
3455
|
+
explicitChdir?: boolean;
|
|
3380
3456
|
/** CLI arguments (should be process.argv.slice(2) from JavaScript) */
|
|
3381
3457
|
args?: Array<string>;
|
|
3382
3458
|
/** Generated toolchain manifest shipped with this vite-plus package. */
|
|
@@ -3475,6 +3551,14 @@ export interface DownloadPackageManagerResult {
|
|
|
3475
3551
|
/** Re-enable blocking stdio after Node.js has initialized its lazy standard streams. */
|
|
3476
3552
|
export declare function ensureBlockingStdio(): void;
|
|
3477
3553
|
|
|
3554
|
+
/**
|
|
3555
|
+
* Resolved on-disk category roots from [`vp_shared::EnvConfig`].
|
|
3556
|
+
*
|
|
3557
|
+
* JavaScript must not read `VP_HOME` / `VP_*_DIR` / `XDG_*` itself;
|
|
3558
|
+
* this is the JS surface of the same `EnvConfig::get().dirs` Rust uses.
|
|
3559
|
+
*/
|
|
3560
|
+
export declare function getVpDirs(): VpDirsJs;
|
|
3561
|
+
|
|
3478
3562
|
/**
|
|
3479
3563
|
* Whether `config_key` is already declared as a top-level property in the
|
|
3480
3564
|
* vite config's `defineConfig({...})` (or equivalent) object literal.
|
|
@@ -3793,6 +3877,15 @@ export declare function upsertJsonConfig(
|
|
|
3793
3877
|
/** Render the Vite+ header using the Rust implementation. */
|
|
3794
3878
|
export declare function vitePlusHeader(): string;
|
|
3795
3879
|
|
|
3880
|
+
/** Resolved on-disk category roots from [`vp_shared::EnvConfig`]. */
|
|
3881
|
+
export interface VpDirsJs {
|
|
3882
|
+
bin: string;
|
|
3883
|
+
data: string;
|
|
3884
|
+
cache: string;
|
|
3885
|
+
config: string;
|
|
3886
|
+
state: string;
|
|
3887
|
+
}
|
|
3888
|
+
|
|
3796
3889
|
/**
|
|
3797
3890
|
* Wrap safe inline `plugins: [...]` arrays in recognized Vite config objects
|
|
3798
3891
|
* with `lazyPlugins(() => [...])` and add a `lazyPlugins` import from
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as isCancel, C as log, E as select, w as multiselect } from "./prompts-
|
|
1
|
+
import { A as isCancel, C as log, E as select, w as multiselect } from "./prompts-DF3yU-eU.js";
|
|
2
2
|
import path from "node:path";
|
|
3
3
|
import { styleText } from "node:util";
|
|
4
4
|
import fs from "node:fs";
|