@voidzero-dev/vite-plus-core 0.3.0 → 0.3.2
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/LICENSE +0 -29
- package/dist/rolldown/cli.mjs +6 -6
- package/dist/rolldown/config.d.mts +1 -1
- package/dist/rolldown/config.mjs +2 -2
- package/dist/rolldown/experimental-index.d.mts +38 -4
- package/dist/rolldown/experimental-index.mjs +35 -9
- package/dist/rolldown/experimental-runtime-types.d.ts +2 -2
- package/dist/rolldown/experimental-runtime.d.ts +2 -2
- package/dist/rolldown/experimental-runtime.mjs +2 -2
- package/dist/rolldown/filter-index.d.mts +1 -1
- package/dist/rolldown/filter-index.mjs +1 -3
- package/dist/rolldown/index.d.mts +3 -3
- package/dist/rolldown/index.mjs +4 -4
- package/dist/rolldown/parallel-plugin-worker.mjs +2 -2
- package/dist/rolldown/parallel-plugin.d.mts +1 -1
- package/dist/rolldown/parse-ast-index.d.mts +1 -1
- package/dist/rolldown/parse-ast-index.mjs +1 -1
- package/dist/rolldown/plugins-index.d.mts +3 -3
- package/dist/rolldown/plugins-index.mjs +2 -2
- package/dist/rolldown/shared/{binding-C__LJDBG.mjs → binding-DH95uVkp.mjs} +27 -27
- package/dist/rolldown/shared/{binding-Bvw14S3g.d.mts → binding-DZuNHVw4.d.mts} +19 -5
- package/dist/rolldown/shared/{bindingify-input-options-V9YvAjrr.mjs → bindingify-input-options-BL4xrXys.mjs} +11 -9
- package/dist/rolldown/shared/{constructors-CRumnw21.d.mts → constructors-BnIg8feC.d.mts} +2 -2
- package/dist/rolldown/shared/{constructors-DklcHr18.mjs → constructors-CrhQ-yy_.mjs} +1 -1
- package/dist/rolldown/shared/{create-bundler-option-DbV2ud0B.mjs → create-bundler-option-Dk9AZBn_.mjs} +72 -6
- package/dist/rolldown/shared/{define-config-DwTNhgWB.d.mts → define-config-DjHYbH6S.d.mts} +40 -3
- package/dist/rolldown/shared/{error-NcRuXAVN.mjs → error-CRNyaqoL.mjs} +1 -1
- package/dist/rolldown/shared/{load-config-Dd7jKGUy.mjs → load-config-CKqTUKwB.mjs} +1 -1
- package/dist/rolldown/shared/{normalize-string-or-regex-CFtim40S.mjs → normalize-string-or-regex-BgP6W4eD.mjs} +1 -1
- package/dist/rolldown/shared/{parse-rvxTD36n.mjs → parse-DYyNe0IU.mjs} +2 -2
- package/dist/rolldown/shared/{resolve-tsconfig-D2vSIIkR.mjs → resolve-tsconfig-jh43hFM_.mjs} +10 -6
- package/dist/rolldown/shared/{rolldown-Bblizyw1.mjs → rolldown-BpXK1q5_.mjs} +5 -4
- package/dist/rolldown/shared/{transform--WSMLt1x.d.mts → transform-CVse9_mH.d.mts} +8 -4
- package/dist/rolldown/shared/{watch-DPvOlccK.mjs → watch-Due6uYkS.mjs} +4 -4
- package/dist/rolldown/utils-index.d.mts +3 -3
- package/dist/rolldown/utils-index.mjs +5 -5
- package/dist/tsdown/{build-D_enfyvD-tOzhITac.js → build-JVmLFaZt-BN9yuB6k.js} +683 -682
- package/dist/tsdown/{debug-CKcBYQLP-By_AQqN8.js → debug-CpC4hV25-BeCITV83.js} +18 -14
- package/dist/tsdown/{detect-DGhJGEqb-LL52mV6u.js → detect-Bg-d8iUV-Cr_BRLVW.js} +10 -12
- package/dist/tsdown/{dist-BsS7BOcb.js → dist-ByW_jJfv.js} +1226 -893
- package/dist/tsdown/index-types.d.ts +239 -317
- package/dist/tsdown/index.js +4 -4
- package/dist/tsdown/internal-DTYQdXId.js +3 -0
- package/dist/tsdown/{main-Bcv7jU2b.js → main-bgV9NlwM.js} +24 -145
- package/dist/tsdown/{resolver-cwLsPb2o-Bb9SDBm6.js → resolver-DE0_sy8o-UMsN-SXx.js} +4 -4
- package/dist/tsdown/rolldown-runtime-B4iAMlE-.js +35 -0
- package/dist/tsdown/run.js +44 -8
- package/dist/tsdown/{src-JVSpR8xt.js → src-D5xv98Iu.js} +5 -5
- package/dist/tsdown/{target-Bab3CUeB-8PBzMh3p.js → target-DgdLrXba-DaJJ11xX.js} +78 -74
- package/dist/tsdown/{tsc-B8FD48Oc.js → tsc-BFDF_Im9.js} +26 -20
- package/dist/tsdown/tsdown-css.js +19 -11
- package/dist/tsdown/tsdown-exe.js +4 -4
- package/dist/vite/client/bundledDevClient.mjs +77 -42
- package/dist/vite/client/client.mjs +288 -260
- package/dist/vite/node/chunks/build.js +21 -21
- package/dist/vite/node/chunks/lib.js +2 -2
- package/dist/vite/node/chunks/node.js +32781 -32305
- package/dist/vite/node/chunks/postcss-import.js +10 -10
- package/dist/vite/node/cli.js +12 -8
- package/dist/vite/node/index.d.ts +1568 -1577
- package/dist/vite/node/index.js +1 -1
- package/dist/vite/node/module-runner.d.ts +1 -1
- package/dist/vite/node/module-runner.js +201 -202
- package/dist/vite/types/customEvent.d.ts +2 -0
- package/dist/vite/types/hmrPayload.d.ts +2 -0
- package/dist/vite/types/internal/cssPreprocessorOptions.d.ts +2 -2
- package/dist/vite/types/internal/devtoolsOptions.d.ts +9 -0
- package/package.json +28 -31
- package/dist/tsdown/internal-DSmmwu4u.js +0 -3
|
@@ -104,7 +104,7 @@ var require_binding = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
104
104
|
try {
|
|
105
105
|
const binding = __require("@rolldown/binding-android-arm64");
|
|
106
106
|
const bindingPackageVersion = __require("@rolldown/binding-android-arm64/package.json").version;
|
|
107
|
-
if (bindingPackageVersion !== "1.2.
|
|
107
|
+
if (bindingPackageVersion !== "1.2.8" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 1.2.8 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
108
108
|
return binding;
|
|
109
109
|
} catch (e) {
|
|
110
110
|
loadErrors.push(e);
|
|
@@ -118,7 +118,7 @@ var require_binding = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
118
118
|
try {
|
|
119
119
|
const binding = __require("@rolldown/binding-android-arm-eabi");
|
|
120
120
|
const bindingPackageVersion = __require("@rolldown/binding-android-arm-eabi/package.json").version;
|
|
121
|
-
if (bindingPackageVersion !== "1.2.
|
|
121
|
+
if (bindingPackageVersion !== "1.2.8" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 1.2.8 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
122
122
|
return binding;
|
|
123
123
|
} catch (e) {
|
|
124
124
|
loadErrors.push(e);
|
|
@@ -135,7 +135,7 @@ var require_binding = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
135
135
|
try {
|
|
136
136
|
const binding = __require("@rolldown/binding-win32-x64-gnu");
|
|
137
137
|
const bindingPackageVersion = __require("@rolldown/binding-win32-x64-gnu/package.json").version;
|
|
138
|
-
if (bindingPackageVersion !== "1.2.
|
|
138
|
+
if (bindingPackageVersion !== "1.2.8" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 1.2.8 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
139
139
|
return binding;
|
|
140
140
|
} catch (e) {
|
|
141
141
|
loadErrors.push(e);
|
|
@@ -149,7 +149,7 @@ var require_binding = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
149
149
|
try {
|
|
150
150
|
const binding = __require("@voidzero-dev/vite-plus-win32-x64-msvc");
|
|
151
151
|
const bindingPackageVersion = __require("@voidzero-dev/vite-plus-win32-x64-msvc/package.json").version;
|
|
152
|
-
if (bindingPackageVersion !== "0.3.
|
|
152
|
+
if (bindingPackageVersion !== "0.3.2" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 0.3.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
153
153
|
return binding;
|
|
154
154
|
} catch (e) {
|
|
155
155
|
loadErrors.push(e);
|
|
@@ -164,7 +164,7 @@ var require_binding = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
164
164
|
try {
|
|
165
165
|
const binding = __require("@rolldown/binding-win32-ia32-msvc");
|
|
166
166
|
const bindingPackageVersion = __require("@rolldown/binding-win32-ia32-msvc/package.json").version;
|
|
167
|
-
if (bindingPackageVersion !== "1.2.
|
|
167
|
+
if (bindingPackageVersion !== "1.2.8" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 1.2.8 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
168
168
|
return binding;
|
|
169
169
|
} catch (e) {
|
|
170
170
|
loadErrors.push(e);
|
|
@@ -178,7 +178,7 @@ var require_binding = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
178
178
|
try {
|
|
179
179
|
const binding = __require("@voidzero-dev/vite-plus-win32-arm64-msvc");
|
|
180
180
|
const bindingPackageVersion = __require("@voidzero-dev/vite-plus-win32-arm64-msvc/package.json").version;
|
|
181
|
-
if (bindingPackageVersion !== "0.3.
|
|
181
|
+
if (bindingPackageVersion !== "0.3.2" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 0.3.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
182
182
|
return binding;
|
|
183
183
|
} catch (e) {
|
|
184
184
|
loadErrors.push(e);
|
|
@@ -193,7 +193,7 @@ var require_binding = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
193
193
|
try {
|
|
194
194
|
const binding = __require("@rolldown/binding-darwin-universal");
|
|
195
195
|
const bindingPackageVersion = __require("@rolldown/binding-darwin-universal/package.json").version;
|
|
196
|
-
if (bindingPackageVersion !== "1.2.
|
|
196
|
+
if (bindingPackageVersion !== "1.2.8" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 1.2.8 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
197
197
|
return binding;
|
|
198
198
|
} catch (e) {
|
|
199
199
|
loadErrors.push(e);
|
|
@@ -207,7 +207,7 @@ var require_binding = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
207
207
|
try {
|
|
208
208
|
const binding = __require("@voidzero-dev/vite-plus-darwin-x64");
|
|
209
209
|
const bindingPackageVersion = __require("@voidzero-dev/vite-plus-darwin-x64/package.json").version;
|
|
210
|
-
if (bindingPackageVersion !== "0.3.
|
|
210
|
+
if (bindingPackageVersion !== "0.3.2" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 0.3.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
211
211
|
return binding;
|
|
212
212
|
} catch (e) {
|
|
213
213
|
loadErrors.push(e);
|
|
@@ -221,7 +221,7 @@ var require_binding = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
221
221
|
try {
|
|
222
222
|
const binding = __require("@voidzero-dev/vite-plus-darwin-arm64");
|
|
223
223
|
const bindingPackageVersion = __require("@voidzero-dev/vite-plus-darwin-arm64/package.json").version;
|
|
224
|
-
if (bindingPackageVersion !== "0.3.
|
|
224
|
+
if (bindingPackageVersion !== "0.3.2" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 0.3.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
225
225
|
return binding;
|
|
226
226
|
} catch (e) {
|
|
227
227
|
loadErrors.push(e);
|
|
@@ -237,7 +237,7 @@ var require_binding = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
237
237
|
try {
|
|
238
238
|
const binding = __require("@rolldown/binding-freebsd-x64");
|
|
239
239
|
const bindingPackageVersion = __require("@rolldown/binding-freebsd-x64/package.json").version;
|
|
240
|
-
if (bindingPackageVersion !== "1.2.
|
|
240
|
+
if (bindingPackageVersion !== "1.2.8" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 1.2.8 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
241
241
|
return binding;
|
|
242
242
|
} catch (e) {
|
|
243
243
|
loadErrors.push(e);
|
|
@@ -251,7 +251,7 @@ var require_binding = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
251
251
|
try {
|
|
252
252
|
const binding = __require("@rolldown/binding-freebsd-arm64");
|
|
253
253
|
const bindingPackageVersion = __require("@rolldown/binding-freebsd-arm64/package.json").version;
|
|
254
|
-
if (bindingPackageVersion !== "1.2.
|
|
254
|
+
if (bindingPackageVersion !== "1.2.8" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 1.2.8 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
255
255
|
return binding;
|
|
256
256
|
} catch (e) {
|
|
257
257
|
loadErrors.push(e);
|
|
@@ -268,7 +268,7 @@ var require_binding = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
268
268
|
try {
|
|
269
269
|
const binding = __require("@voidzero-dev/vite-plus-linux-x64-musl");
|
|
270
270
|
const bindingPackageVersion = __require("@voidzero-dev/vite-plus-linux-x64-musl/package.json").version;
|
|
271
|
-
if (bindingPackageVersion !== "0.3.
|
|
271
|
+
if (bindingPackageVersion !== "0.3.2" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 0.3.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
272
272
|
return binding;
|
|
273
273
|
} catch (e) {
|
|
274
274
|
loadErrors.push(e);
|
|
@@ -282,7 +282,7 @@ var require_binding = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
282
282
|
try {
|
|
283
283
|
const binding = __require("@voidzero-dev/vite-plus-linux-x64-gnu");
|
|
284
284
|
const bindingPackageVersion = __require("@voidzero-dev/vite-plus-linux-x64-gnu/package.json").version;
|
|
285
|
-
if (bindingPackageVersion !== "0.3.
|
|
285
|
+
if (bindingPackageVersion !== "0.3.2" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 0.3.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
286
286
|
return binding;
|
|
287
287
|
} catch (e) {
|
|
288
288
|
loadErrors.push(e);
|
|
@@ -298,7 +298,7 @@ var require_binding = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
298
298
|
try {
|
|
299
299
|
const binding = __require("@voidzero-dev/vite-plus-linux-arm64-musl");
|
|
300
300
|
const bindingPackageVersion = __require("@voidzero-dev/vite-plus-linux-arm64-musl/package.json").version;
|
|
301
|
-
if (bindingPackageVersion !== "0.3.
|
|
301
|
+
if (bindingPackageVersion !== "0.3.2" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 0.3.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
302
302
|
return binding;
|
|
303
303
|
} catch (e) {
|
|
304
304
|
loadErrors.push(e);
|
|
@@ -312,7 +312,7 @@ var require_binding = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
312
312
|
try {
|
|
313
313
|
const binding = __require("@voidzero-dev/vite-plus-linux-arm64-gnu");
|
|
314
314
|
const bindingPackageVersion = __require("@voidzero-dev/vite-plus-linux-arm64-gnu/package.json").version;
|
|
315
|
-
if (bindingPackageVersion !== "0.3.
|
|
315
|
+
if (bindingPackageVersion !== "0.3.2" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 0.3.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
316
316
|
return binding;
|
|
317
317
|
} catch (e) {
|
|
318
318
|
loadErrors.push(e);
|
|
@@ -328,7 +328,7 @@ var require_binding = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
328
328
|
try {
|
|
329
329
|
const binding = __require("@rolldown/binding-linux-arm-musleabihf");
|
|
330
330
|
const bindingPackageVersion = __require("@rolldown/binding-linux-arm-musleabihf/package.json").version;
|
|
331
|
-
if (bindingPackageVersion !== "1.2.
|
|
331
|
+
if (bindingPackageVersion !== "1.2.8" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 1.2.8 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
332
332
|
return binding;
|
|
333
333
|
} catch (e) {
|
|
334
334
|
loadErrors.push(e);
|
|
@@ -342,7 +342,7 @@ var require_binding = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
342
342
|
try {
|
|
343
343
|
const binding = __require("@rolldown/binding-linux-arm-gnueabihf");
|
|
344
344
|
const bindingPackageVersion = __require("@rolldown/binding-linux-arm-gnueabihf/package.json").version;
|
|
345
|
-
if (bindingPackageVersion !== "1.2.
|
|
345
|
+
if (bindingPackageVersion !== "1.2.8" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 1.2.8 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
346
346
|
return binding;
|
|
347
347
|
} catch (e) {
|
|
348
348
|
loadErrors.push(e);
|
|
@@ -358,7 +358,7 @@ var require_binding = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
358
358
|
try {
|
|
359
359
|
const binding = __require("@rolldown/binding-linux-loong64-musl");
|
|
360
360
|
const bindingPackageVersion = __require("@rolldown/binding-linux-loong64-musl/package.json").version;
|
|
361
|
-
if (bindingPackageVersion !== "1.2.
|
|
361
|
+
if (bindingPackageVersion !== "1.2.8" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 1.2.8 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
362
362
|
return binding;
|
|
363
363
|
} catch (e) {
|
|
364
364
|
loadErrors.push(e);
|
|
@@ -372,7 +372,7 @@ var require_binding = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
372
372
|
try {
|
|
373
373
|
const binding = __require("@rolldown/binding-linux-loong64-gnu");
|
|
374
374
|
const bindingPackageVersion = __require("@rolldown/binding-linux-loong64-gnu/package.json").version;
|
|
375
|
-
if (bindingPackageVersion !== "1.2.
|
|
375
|
+
if (bindingPackageVersion !== "1.2.8" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 1.2.8 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
376
376
|
return binding;
|
|
377
377
|
} catch (e) {
|
|
378
378
|
loadErrors.push(e);
|
|
@@ -388,7 +388,7 @@ var require_binding = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
388
388
|
try {
|
|
389
389
|
const binding = __require("@rolldown/binding-linux-riscv64-musl");
|
|
390
390
|
const bindingPackageVersion = __require("@rolldown/binding-linux-riscv64-musl/package.json").version;
|
|
391
|
-
if (bindingPackageVersion !== "1.2.
|
|
391
|
+
if (bindingPackageVersion !== "1.2.8" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 1.2.8 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
392
392
|
return binding;
|
|
393
393
|
} catch (e) {
|
|
394
394
|
loadErrors.push(e);
|
|
@@ -402,7 +402,7 @@ var require_binding = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
402
402
|
try {
|
|
403
403
|
const binding = __require("@rolldown/binding-linux-riscv64-gnu");
|
|
404
404
|
const bindingPackageVersion = __require("@rolldown/binding-linux-riscv64-gnu/package.json").version;
|
|
405
|
-
if (bindingPackageVersion !== "1.2.
|
|
405
|
+
if (bindingPackageVersion !== "1.2.8" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 1.2.8 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
406
406
|
return binding;
|
|
407
407
|
} catch (e) {
|
|
408
408
|
loadErrors.push(e);
|
|
@@ -417,7 +417,7 @@ var require_binding = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
417
417
|
try {
|
|
418
418
|
const binding = __require("@rolldown/binding-linux-ppc64-gnu");
|
|
419
419
|
const bindingPackageVersion = __require("@rolldown/binding-linux-ppc64-gnu/package.json").version;
|
|
420
|
-
if (bindingPackageVersion !== "1.2.
|
|
420
|
+
if (bindingPackageVersion !== "1.2.8" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 1.2.8 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
421
421
|
return binding;
|
|
422
422
|
} catch (e) {
|
|
423
423
|
loadErrors.push(e);
|
|
@@ -431,7 +431,7 @@ var require_binding = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
431
431
|
try {
|
|
432
432
|
const binding = __require("@rolldown/binding-linux-s390x-gnu");
|
|
433
433
|
const bindingPackageVersion = __require("@rolldown/binding-linux-s390x-gnu/package.json").version;
|
|
434
|
-
if (bindingPackageVersion !== "1.2.
|
|
434
|
+
if (bindingPackageVersion !== "1.2.8" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 1.2.8 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
435
435
|
return binding;
|
|
436
436
|
} catch (e) {
|
|
437
437
|
loadErrors.push(e);
|
|
@@ -447,7 +447,7 @@ var require_binding = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
447
447
|
try {
|
|
448
448
|
const binding = __require("@rolldown/binding-openharmony-arm64");
|
|
449
449
|
const bindingPackageVersion = __require("@rolldown/binding-openharmony-arm64/package.json").version;
|
|
450
|
-
if (bindingPackageVersion !== "1.2.
|
|
450
|
+
if (bindingPackageVersion !== "1.2.8" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 1.2.8 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
451
451
|
return binding;
|
|
452
452
|
} catch (e) {
|
|
453
453
|
loadErrors.push(e);
|
|
@@ -461,7 +461,7 @@ var require_binding = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
461
461
|
try {
|
|
462
462
|
const binding = __require("@rolldown/binding-openharmony-x64");
|
|
463
463
|
const bindingPackageVersion = __require("@rolldown/binding-openharmony-x64/package.json").version;
|
|
464
|
-
if (bindingPackageVersion !== "1.2.
|
|
464
|
+
if (bindingPackageVersion !== "1.2.8" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 1.2.8 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
465
465
|
return binding;
|
|
466
466
|
} catch (e) {
|
|
467
467
|
loadErrors.push(e);
|
|
@@ -475,7 +475,7 @@ var require_binding = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
475
475
|
try {
|
|
476
476
|
const binding = __require("@rolldown/binding-openharmony-arm");
|
|
477
477
|
const bindingPackageVersion = __require("@rolldown/binding-openharmony-arm/package.json").version;
|
|
478
|
-
if (bindingPackageVersion !== "1.2.
|
|
478
|
+
if (bindingPackageVersion !== "1.2.8" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 1.2.8 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
479
479
|
return binding;
|
|
480
480
|
} catch (e) {
|
|
481
481
|
loadErrors.push(e);
|
|
@@ -565,7 +565,7 @@ var require_binding = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
565
565
|
if (!candidateFailed) {
|
|
566
566
|
if (process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
|
|
567
567
|
const bindingPackageVersion = __require("@rolldown/binding-wasm32-wasi/package.json").version;
|
|
568
|
-
if (bindingPackageVersion !== "1.2.
|
|
568
|
+
if (bindingPackageVersion !== "1.2.8") throw new Error(`WASI binding package version mismatch, expected 1.2.8 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
569
569
|
}
|
|
570
570
|
wasiBinding = __require("@rolldown/binding-wasm32-wasi");
|
|
571
571
|
nativeBinding = wasiBinding;
|
|
@@ -1419,6 +1419,17 @@ declare class BindingMagicString {
|
|
|
1419
1419
|
*/
|
|
1420
1420
|
generateDecodedMap(options?: BindingSourceMapOptions | undefined | null): BindingDecodedMap;
|
|
1421
1421
|
}
|
|
1422
|
+
declare class BindingModuleInfo {
|
|
1423
|
+
id: string;
|
|
1424
|
+
importers: Array<string>;
|
|
1425
|
+
dynamicImporters: Array<string>;
|
|
1426
|
+
importedIds: Array<string>;
|
|
1427
|
+
dynamicallyImportedIds: Array<string>;
|
|
1428
|
+
exports: Array<string>;
|
|
1429
|
+
isEntry: boolean;
|
|
1430
|
+
inputFormat: 'es' | 'cjs' | 'unknown';
|
|
1431
|
+
get code(): string | null;
|
|
1432
|
+
}
|
|
1422
1433
|
declare class BindingNormalizedOptions {
|
|
1423
1434
|
get input(): Array<string> | Record<string, string>;
|
|
1424
1435
|
get cwd(): string;
|
|
@@ -1506,8 +1517,8 @@ declare class BindingWatcherBundler {
|
|
|
1506
1517
|
close(): Promise<void>;
|
|
1507
1518
|
}
|
|
1508
1519
|
declare class TsconfigCache {
|
|
1509
|
-
/** Create a new transform cache with auto tsconfig discovery enabled. */
|
|
1510
|
-
constructor(yarnPnp: boolean);
|
|
1520
|
+
/** Create a new transform cache with auto or manual tsconfig discovery enabled. */
|
|
1521
|
+
constructor(yarnPnp: boolean, pathToTsconfig?: string | undefined | null);
|
|
1511
1522
|
/**
|
|
1512
1523
|
* Clear the cache.
|
|
1513
1524
|
*
|
|
@@ -1633,9 +1644,10 @@ interface BindingEnhancedTransformOptions {
|
|
|
1633
1644
|
/**
|
|
1634
1645
|
* Configure tsconfig handling.
|
|
1635
1646
|
* - true: Auto-discover and load the nearest tsconfig.json
|
|
1647
|
+
* - string: Use the tsconfig at the provided path
|
|
1636
1648
|
* - TsconfigRawOptions: Use the provided inline tsconfig options
|
|
1637
1649
|
*/
|
|
1638
|
-
tsconfig?: boolean | BindingTsconfigRawOptions;
|
|
1650
|
+
tsconfig?: boolean | string | BindingTsconfigRawOptions;
|
|
1639
1651
|
/** An input source map to collapse with the output source map. */
|
|
1640
1652
|
inputMap?: SourceMap;
|
|
1641
1653
|
}
|
|
@@ -1958,6 +1970,7 @@ interface BindingViteReporterPluginConfig {
|
|
|
1958
1970
|
}
|
|
1959
1971
|
interface BindingViteResolvePluginConfig {
|
|
1960
1972
|
resolveOptions: BindingViteResolvePluginResolveOptions;
|
|
1973
|
+
tsconfig?: string;
|
|
1961
1974
|
environmentConsumer: string;
|
|
1962
1975
|
environmentName: string;
|
|
1963
1976
|
builtins: Array<BindingStringOrRegex>;
|
|
@@ -1992,6 +2005,7 @@ interface BindingViteResolvePluginResolveOptions {
|
|
|
1992
2005
|
}
|
|
1993
2006
|
interface BindingViteTransformPluginConfig {
|
|
1994
2007
|
root: string;
|
|
2008
|
+
tsconfig?: string;
|
|
1995
2009
|
include?: Array<BindingStringOrRegex>;
|
|
1996
2010
|
exclude?: Array<BindingStringOrRegex>;
|
|
1997
2011
|
jsxRefreshInclude?: Array<BindingStringOrRegex>;
|
|
@@ -2032,7 +2046,7 @@ interface PreRenderedChunk {
|
|
|
2032
2046
|
/** Whether this chunk is a dynamic entry point. */
|
|
2033
2047
|
isDynamicEntry: boolean;
|
|
2034
2048
|
/** The id of a module that this chunk corresponds to. */
|
|
2035
|
-
facadeModuleId
|
|
2049
|
+
facadeModuleId: string | null;
|
|
2036
2050
|
/** The list of ids of modules included in this chunk. */
|
|
2037
2051
|
moduleIds: Array<string>;
|
|
2038
2052
|
/** Exported variable names from this chunk. */
|
|
@@ -2048,4 +2062,4 @@ interface ViteImportGlobMeta {
|
|
|
2048
2062
|
isSubImportsPattern?: boolean;
|
|
2049
2063
|
}
|
|
2050
2064
|
//#endregion
|
|
2051
|
-
export {
|
|
2065
|
+
export { resetNativeMemoryStats as $, BindingViteResolvePluginConfig as A, NapiResolveOptions as B, BindingViteDynamicImportVarsPluginConfig as C, BindingViteModulePreloadPolyfillPluginConfig as D, BindingViteManifestPluginConfig as E, IsolatedDeclarationsResult as F, ResolverFactory as G, ParserOptions as H, JsxOptions as I, TsconfigCache as J, SourceMap as K, ManglePropertiesOptions as L, BindingWatcherBundler as M, ExternalMemoryStatus as N, BindingViteReactRefreshWrapperPluginConfig as O, IsolatedDeclarationsOptions as P, moduleRunnerTransform as Q, MinifyOptions as R, BindingViteBuildImportAnalysisPluginConfig as S, BindingViteJsonPluginConfig as T, PreRenderedChunk as U, ParseResult as V, ResolveResult as W, isolatedDeclaration as X, getNativeMemoryStats as Y, isolatedDeclarationSync as Z, BindingReplacePluginConfig as _, BindingEnhancedTransformOptions as a, BindingTsconfigRawOptions as b, BindingHookResolveIdExtraArgs as c, BindingMagicString as d, BindingModuleInfo as f, BindingRenderedChunk as g, BindingRebuildStrategy as h, BindingClientHmrUpdate as i, BindingViteTransformPluginConfig as j, BindingViteReporterPluginConfig as k, BindingIsolatedDeclarationPluginConfig as l, BindingPluginContextResolveOptions as m, BindingBundleAnalyzerPluginConfig as n, BindingEnhancedTransformResult as o, BindingNativeMemoryStats as p, TransformOptions as q, BindingBundleState as r, BindingEsmExternalRequirePluginConfig as s, BindingBuiltinPluginName as t, BindingLazyChunkOutput as u, BindingTransformHookExtraArgs as v, BindingViteImportGlobPluginConfig as w, BindingTsconfigResult as x, BindingTsconfigCompilerOptions as y, MinifyResult as z };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { n as __toESM, t as require_binding } from "./binding-
|
|
1
|
+
import { n as __toESM, t as require_binding } from "./binding-DH95uVkp.mjs";
|
|
2
2
|
import { i as logFailedValidation, l as logPluginError, n as error, o as logInvalidLogPosition, r as logCycleLoading, t as augmentCodeLocation } from "./logs-DmYCAKcW.mjs";
|
|
3
|
-
import { i as bindingifyManifestPlugin, n as BuiltinPlugin, r as bindingifyBuiltInPlugin, t as normalizedStringOrRegex } from "./normalize-string-or-regex-
|
|
3
|
+
import { i as bindingifyManifestPlugin, n as BuiltinPlugin, r as bindingifyBuiltInPlugin, t as normalizedStringOrRegex } from "./normalize-string-or-regex-BgP6W4eD.mjs";
|
|
4
4
|
import { i as noop, n as isPathFragment, o as unreachable, s as unsupported, t as arraify } from "./misc-DOSKtd97.mjs";
|
|
5
|
-
import { a as bindingifySourcemap, i as unwrapBindingResult, t as aggregateBindingErrorsIntoJsError } from "./error-
|
|
5
|
+
import { a as bindingifySourcemap, i as unwrapBindingResult, t as aggregateBindingErrorsIntoJsError } from "./error-CRNyaqoL.mjs";
|
|
6
6
|
import { parseAst } from "../parse-ast-index.mjs";
|
|
7
7
|
import fs from "node:fs";
|
|
8
8
|
import path from "node:path";
|
|
@@ -10,7 +10,7 @@ import * as filter from "@voidzero-dev/vite-plus-core/rolldown/pluginutils";
|
|
|
10
10
|
import fsp from "node:fs/promises";
|
|
11
11
|
import { fileURLToPath } from "node:url";
|
|
12
12
|
//#region package.json
|
|
13
|
-
var version = "1.2.
|
|
13
|
+
var version = "1.2.8";
|
|
14
14
|
var description = "Fast JavaScript/TypeScript bundler in Rust with Rollup-compatible API.";
|
|
15
15
|
//#endregion
|
|
16
16
|
//#region src/constants/version.ts
|
|
@@ -236,7 +236,7 @@ function bindingAssetSource(source) {
|
|
|
236
236
|
return { inner: source };
|
|
237
237
|
}
|
|
238
238
|
//#endregion
|
|
239
|
-
//#region \0@oxc-project+runtime@0.
|
|
239
|
+
//#region \0@oxc-project+runtime@0.149.0/helpers/esm/decorate.js
|
|
240
240
|
function __decorate(decorators, target, key, desc) {
|
|
241
241
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
242
242
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -520,7 +520,9 @@ function transformToMutableRollupOutputAsset(bindingAsset, changed) {
|
|
|
520
520
|
}
|
|
521
521
|
function transformToRollupOutput(output) {
|
|
522
522
|
const { chunks, assets } = output;
|
|
523
|
-
|
|
523
|
+
const transformed = { output: [...chunks.map((chunk) => transformToRollupOutputChunk(chunk)), ...assets.map((asset) => transformToRollupOutputAsset(asset))] };
|
|
524
|
+
if (output.mangleCache !== void 0) transformed.mangleCache = output.mangleCache;
|
|
525
|
+
return transformed;
|
|
524
526
|
}
|
|
525
527
|
function transformToMutableRollupOutput(output, changed) {
|
|
526
528
|
const { chunks, assets } = output;
|
|
@@ -1022,7 +1024,7 @@ function normalizeTransformHookSourcemap(id, originalCode, rawMap) {
|
|
|
1022
1024
|
return map;
|
|
1023
1025
|
}
|
|
1024
1026
|
//#endregion
|
|
1025
|
-
//#region ../../../node_modules/.pnpm/remeda@2.
|
|
1027
|
+
//#region ../../../node_modules/.pnpm/remeda@2.45.0/node_modules/remeda/dist/lazyDataLastImpl--3B10z3s.js
|
|
1026
1028
|
function e(e, t, n) {
|
|
1027
1029
|
let r = (n) => e(n, ...t);
|
|
1028
1030
|
return n === void 0 ? r : Object.assign(r, {
|
|
@@ -1031,7 +1033,7 @@ function e(e, t, n) {
|
|
|
1031
1033
|
});
|
|
1032
1034
|
}
|
|
1033
1035
|
//#endregion
|
|
1034
|
-
//#region ../../../node_modules/.pnpm/remeda@2.
|
|
1036
|
+
//#region ../../../node_modules/.pnpm/remeda@2.45.0/node_modules/remeda/dist/purry.js
|
|
1035
1037
|
function t$1(t, n, r) {
|
|
1036
1038
|
let i = t.length - n.length;
|
|
1037
1039
|
if (i === 0) return t(...n);
|
|
@@ -1039,7 +1041,7 @@ function t$1(t, n, r) {
|
|
|
1039
1041
|
throw Error(`Wrong number of arguments`);
|
|
1040
1042
|
}
|
|
1041
1043
|
//#endregion
|
|
1042
|
-
//#region ../../../node_modules/.pnpm/remeda@2.
|
|
1044
|
+
//#region ../../../node_modules/.pnpm/remeda@2.45.0/node_modules/remeda/dist/partition.js
|
|
1043
1045
|
function t(...t) {
|
|
1044
1046
|
return t$1(n, t);
|
|
1045
1047
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { A as BindingViteResolvePluginConfig, C as BindingViteDynamicImportVarsPluginConfig, D as BindingViteModulePreloadPolyfillPluginConfig, O as BindingViteReactRefreshWrapperPluginConfig, S as BindingViteBuildImportAnalysisPluginConfig, T as BindingViteJsonPluginConfig, k as BindingViteReporterPluginConfig, l as BindingIsolatedDeclarationPluginConfig, s as BindingEsmExternalRequirePluginConfig, w as BindingViteImportGlobPluginConfig } from "./binding-DZuNHVw4.mjs";
|
|
2
|
+
import { I as BuiltinPlugin, Kt as StringOrRegExp } from "./define-config-DjHYbH6S.mjs";
|
|
3
3
|
//#region src/builtin-plugin/constructors.d.ts
|
|
4
4
|
declare function viteModulePreloadPolyfillPlugin(config?: BindingViteModulePreloadPolyfillPluginConfig): BuiltinPlugin;
|
|
5
5
|
type DynamicImportVarsPluginConfig = Omit<BindingViteDynamicImportVarsPluginConfig, "include" | "exclude"> & {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as makeBuiltinPluginCallable, n as BuiltinPlugin, t as normalizedStringOrRegex } from "./normalize-string-or-regex-
|
|
1
|
+
import { a as makeBuiltinPluginCallable, n as BuiltinPlugin, t as normalizedStringOrRegex } from "./normalize-string-or-regex-BgP6W4eD.mjs";
|
|
2
2
|
//#region src/builtin-plugin/constructors.ts
|
|
3
3
|
function viteModulePreloadPolyfillPlugin(config) {
|
|
4
4
|
return new BuiltinPlugin("builtin:vite-module-preload-polyfill", config);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { n as __toESM, t as require_binding } from "./binding-
|
|
1
|
+
import { n as __toESM, t as require_binding } from "./binding-DH95uVkp.mjs";
|
|
2
2
|
import { a as logInputHookInOutputPlugin, n as error } from "./logs-DmYCAKcW.mjs";
|
|
3
|
-
import { n as BuiltinPlugin } from "./normalize-string-or-regex-
|
|
4
|
-
import { C as LOG_LEVEL_WARN, T as VERSION, _ as getParallelPluginInfo, a as measureIfFunction, b as LOG_LEVEL_DEBUG, c as PluginContextData, d as transformRenderedChunk, g as MinimalPluginContextImpl, i as measureHookCost, l as transformModuleInfo, o as pluginTimingsRecorderFor, p as transformAssetSource, r as OUTPUT_OPTIONS_OWNER, t as bindingifyInputOptions, v as normalizeHook, w as logLevelPriority, y as normalizeLog } from "./bindingify-input-options-
|
|
3
|
+
import { n as BuiltinPlugin } from "./normalize-string-or-regex-BgP6W4eD.mjs";
|
|
4
|
+
import { C as LOG_LEVEL_WARN, T as VERSION, _ as getParallelPluginInfo, a as measureIfFunction, b as LOG_LEVEL_DEBUG, c as PluginContextData, d as transformRenderedChunk, g as MinimalPluginContextImpl, i as measureHookCost, l as transformModuleInfo, o as pluginTimingsRecorderFor, p as transformAssetSource, r as OUTPUT_OPTIONS_OWNER, t as bindingifyInputOptions, v as normalizeHook, w as logLevelPriority, y as normalizeLog } from "./bindingify-input-options-BL4xrXys.mjs";
|
|
5
5
|
import { a as unimplemented } from "./misc-DOSKtd97.mjs";
|
|
6
6
|
import { Worker } from "node:worker_threads";
|
|
7
7
|
import path, { sep } from "node:path";
|
|
@@ -1557,6 +1557,14 @@ const MinifyOptionsSchema = /* @__PURE__ */ strictObject({
|
|
|
1557
1557
|
reserved: /* @__PURE__ */ optional(/* @__PURE__ */ array(/* @__PURE__ */ string())),
|
|
1558
1558
|
debug: /* @__PURE__ */ optional(/* @__PURE__ */ boolean())
|
|
1559
1559
|
})])),
|
|
1560
|
+
mangleProps: /* @__PURE__ */ optional(/* @__PURE__ */ strictObject({
|
|
1561
|
+
include: /* @__PURE__ */ instance(RegExp),
|
|
1562
|
+
exclude: /* @__PURE__ */ optional(/* @__PURE__ */ instance(RegExp)),
|
|
1563
|
+
reserved: /* @__PURE__ */ optional(/* @__PURE__ */ array(/* @__PURE__ */ string())),
|
|
1564
|
+
quoted: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
|
|
1565
|
+
debug: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
|
|
1566
|
+
cache: /* @__PURE__ */ optional(/* @__PURE__ */ record(/* @__PURE__ */ string(), /* @__PURE__ */ union([/* @__PURE__ */ string(), /* @__PURE__ */ literal(false)])))
|
|
1567
|
+
})),
|
|
1560
1568
|
codegen: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ boolean(), /* @__PURE__ */ strictObject({
|
|
1561
1569
|
removeWhitespace: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
|
|
1562
1570
|
legalComments: /* @__PURE__ */ optional(/* @__PURE__ */ union([
|
|
@@ -1911,13 +1919,31 @@ function getCliSchemaInfo() {
|
|
|
1911
1919
|
var ChunkingContextImpl = class {
|
|
1912
1920
|
context;
|
|
1913
1921
|
pluginContextData;
|
|
1922
|
+
moduleInfoCache = /* @__PURE__ */ new Map();
|
|
1914
1923
|
constructor(context, pluginContextData) {
|
|
1915
1924
|
this.context = context;
|
|
1916
1925
|
this.pluginContextData = pluginContextData;
|
|
1917
1926
|
}
|
|
1927
|
+
clearModuleInfoCache() {
|
|
1928
|
+
this.moduleInfoCache = void 0;
|
|
1929
|
+
}
|
|
1918
1930
|
getModuleInfo(moduleId) {
|
|
1931
|
+
const cached = this.moduleInfoCache?.get(moduleId);
|
|
1932
|
+
if (cached) return cached;
|
|
1919
1933
|
const bindingInfo = this.context.getModuleInfo(moduleId);
|
|
1920
|
-
if (bindingInfo)
|
|
1934
|
+
if (bindingInfo) {
|
|
1935
|
+
const option = this.pluginContextData.getModuleOption(moduleId);
|
|
1936
|
+
const info = transformModuleInfo(bindingInfo, option);
|
|
1937
|
+
Object.defineProperty(info, "moduleSideEffects", {
|
|
1938
|
+
get: () => option.moduleSideEffects,
|
|
1939
|
+
set: (moduleSideEffects) => {
|
|
1940
|
+
option.moduleSideEffects = moduleSideEffects;
|
|
1941
|
+
option.invalidate = true;
|
|
1942
|
+
}
|
|
1943
|
+
});
|
|
1944
|
+
this.moduleInfoCache?.set(moduleId, info);
|
|
1945
|
+
return info;
|
|
1946
|
+
}
|
|
1921
1947
|
return null;
|
|
1922
1948
|
}
|
|
1923
1949
|
};
|
|
@@ -3055,14 +3081,20 @@ function bindingifyCodeSplitting(codeSplitting, inlineDynamicImportsOption, adva
|
|
|
3055
3081
|
let advancedChunksResult;
|
|
3056
3082
|
if (effectiveChunksOption != null) {
|
|
3057
3083
|
const { groups, ...restOptions } = effectiveChunksOption;
|
|
3084
|
+
let chunkingContext;
|
|
3085
|
+
const getChunkingContext = (bindingContext) => chunkingContext ??= new ChunkingContextImpl(bindingContext, pluginContextData);
|
|
3058
3086
|
advancedChunksResult = {
|
|
3059
3087
|
...restOptions,
|
|
3088
|
+
internalInvalidateModuleInfoCache: () => {
|
|
3089
|
+
chunkingContext?.clearModuleInfoCache();
|
|
3090
|
+
chunkingContext = void 0;
|
|
3091
|
+
},
|
|
3060
3092
|
groups: groups?.map((group) => {
|
|
3061
3093
|
const { name, test, ...restGroup } = group;
|
|
3062
3094
|
return {
|
|
3063
3095
|
...restGroup,
|
|
3064
|
-
test: typeof test === "function" ? measureHookCost(timings, OUTPUT_OPTIONS_OWNER, "codeSplitting groups[].test", test) : test,
|
|
3065
|
-
name: typeof name === "function" ? measureHookCost(timings, OUTPUT_OPTIONS_OWNER, "codeSplitting groups[].name",
|
|
3096
|
+
test: typeof test === "function" ? batchTest(measureHookCost(timings, OUTPUT_OPTIONS_OWNER, "codeSplitting groups[].test", test)) : test,
|
|
3097
|
+
name: typeof name === "function" ? batchName(measureHookCost(timings, OUTPUT_OPTIONS_OWNER, "codeSplitting groups[].name", name), getChunkingContext) : name
|
|
3066
3098
|
};
|
|
3067
3099
|
})
|
|
3068
3100
|
};
|
|
@@ -3072,6 +3104,40 @@ function bindingifyCodeSplitting(codeSplitting, inlineDynamicImportsOption, adva
|
|
|
3072
3104
|
advancedChunks: advancedChunksResult
|
|
3073
3105
|
};
|
|
3074
3106
|
}
|
|
3107
|
+
/**
|
|
3108
|
+
* Wraps a per-id `test` in the batched shim that the binding expects.
|
|
3109
|
+
*
|
|
3110
|
+
* The loop runs in JS so that a group makes one napi crossing, not one per module.
|
|
3111
|
+
*
|
|
3112
|
+
* The result is a `Uint8Array`, which crosses as a buffer instead of one tagged value per id.
|
|
3113
|
+
*/
|
|
3114
|
+
function batchTest(test) {
|
|
3115
|
+
return (ids) => {
|
|
3116
|
+
const results = new Uint8Array(ids.length);
|
|
3117
|
+
for (let index = 0; index < ids.length; index++) {
|
|
3118
|
+
const result = test(ids[index]);
|
|
3119
|
+
if (result != null && typeof result !== "boolean") throw new TypeError(`\`output.codeSplitting.groups[].test\` returned ${typeof result} for module "${ids[index]}", but expected a boolean, null or undefined.`);
|
|
3120
|
+
results[index] = result === true ? 1 : 0;
|
|
3121
|
+
}
|
|
3122
|
+
return results;
|
|
3123
|
+
};
|
|
3124
|
+
}
|
|
3125
|
+
/**
|
|
3126
|
+
* This is the `name` equivalent of {@linkcode batchTest}. All groups in a chunking pass share
|
|
3127
|
+
* a context so repeated module queries reuse their JavaScript values.
|
|
3128
|
+
*/
|
|
3129
|
+
function batchName(name, getChunkingContext) {
|
|
3130
|
+
return (ids, bindingContext) => {
|
|
3131
|
+
const context = getChunkingContext(bindingContext);
|
|
3132
|
+
const results = [];
|
|
3133
|
+
for (let index = 0; index < ids.length; index++) {
|
|
3134
|
+
const result = name(ids[index], context);
|
|
3135
|
+
if (result != null && typeof result !== "string") throw new TypeError(`\`output.codeSplitting.groups[].name\` returned ${typeof result} for module "${ids[index]}", but expected a string, null or undefined.`);
|
|
3136
|
+
results.push(result);
|
|
3137
|
+
}
|
|
3138
|
+
return results;
|
|
3139
|
+
};
|
|
3140
|
+
}
|
|
3075
3141
|
//#endregion
|
|
3076
3142
|
//#region src/utils/initialize-parallel-plugins.ts
|
|
3077
3143
|
var import_binding = /* @__PURE__ */ __toESM(require_binding(), 1);
|