@rspack/core 1.1.0-beta.0 → 1.1.1
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/compiled/enhanced-resolve/CachedInputFileSystem.js +267 -80
- package/compiled/enhanced-resolve/index.d.ts +849 -236
- package/compiled/enhanced-resolve/package.json +1 -1
- package/compiled/graceful-fs/index.js +10 -10
- package/compiled/graceful-fs/package.json +1 -1
- package/compiled/zod/index.d.ts +2 -2
- package/dist/Compilation.d.ts +1 -1
- package/dist/DependenciesBlock.d.ts +6 -4
- package/dist/Module.d.ts +16 -15
- package/dist/builtin-plugin/DllEntryPlugin.d.ts +13 -0
- package/dist/builtin-plugin/DllReferenceAgencyPlugin.d.ts +11 -0
- package/dist/builtin-plugin/EntryPlugin.d.ts +14 -11
- package/dist/builtin-plugin/FlagAllModulesAsUsedPlugin.d.ts +10 -0
- package/dist/builtin-plugin/FlagDependencyUsagePlugin.d.ts +10 -10
- package/dist/builtin-plugin/LibManifestPlugin.d.ts +18 -0
- package/dist/builtin-plugin/MangleExportsPlugin.d.ts +10 -10
- package/dist/builtin-plugin/ModuleConcatenationPlugin.d.ts +8 -10
- package/dist/builtin-plugin/index.d.ts +3 -0
- package/dist/builtin-plugin/lazy-compilation/lazyCompilation.d.ts +3 -3
- package/dist/builtin-plugin/lazy-compilation/plugin.d.ts +3 -3
- package/dist/config/normalization.d.ts +3 -11
- package/dist/config/types.d.ts +37 -6
- package/dist/config/utils.d.ts +16 -0
- package/dist/config/zod.d.ts +94 -93
- package/dist/exports.d.ts +4 -2
- package/dist/index.js +2201 -1091
- package/dist/lib/DllPlugin.d.ts +42 -0
- package/dist/lib/DllReferencePlugin.d.ts +119 -0
- package/package.json +6 -6
- package/dist/lib/Dependency.d.ts +0 -23
- package/dist/lib/formatLocation.d.ts +0 -16
- package/dist/logging/runtime.d.ts +0 -16
- package/dist/util/IterableHelpers.d.ts +0 -12
- package/dist/util/scheme.d.ts +0 -6
- package/dist/util/webpack.d.ts +0 -4
package/dist/index.js
CHANGED
|
@@ -143,9 +143,9 @@ var require_lib = __commonJS({
|
|
|
143
143
|
}
|
|
144
144
|
});
|
|
145
145
|
|
|
146
|
-
// ../../node_modules/.pnpm/enhanced-resolve@5.
|
|
146
|
+
// ../../node_modules/.pnpm/enhanced-resolve@5.17.1/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js
|
|
147
147
|
var require_CachedInputFileSystem = __commonJS({
|
|
148
|
-
"../../node_modules/.pnpm/enhanced-resolve@5.
|
|
148
|
+
"../../node_modules/.pnpm/enhanced-resolve@5.17.1/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js"(exports2, module2) {
|
|
149
149
|
"use strict";
|
|
150
150
|
var nextTick = require("process").nextTick;
|
|
151
151
|
var dirname4 = (path10) => {
|
|
@@ -177,46 +177,81 @@ var require_CachedInputFileSystem = __commonJS({
|
|
|
177
177
|
};
|
|
178
178
|
var OperationMergerBackend = class {
|
|
179
179
|
/**
|
|
180
|
-
* @param {
|
|
181
|
-
* @param {
|
|
182
|
-
* @param {
|
|
180
|
+
* @param {Function | undefined} provider async method in filesystem
|
|
181
|
+
* @param {Function | undefined} syncProvider sync method in filesystem
|
|
182
|
+
* @param {BaseFileSystem} providerContext call context for the provider methods
|
|
183
183
|
*/
|
|
184
184
|
constructor(provider, syncProvider, providerContext) {
|
|
185
185
|
this._provider = provider;
|
|
186
186
|
this._syncProvider = syncProvider;
|
|
187
187
|
this._providerContext = providerContext;
|
|
188
188
|
this._activeAsyncOperations = /* @__PURE__ */ new Map();
|
|
189
|
-
this.provide = this._provider ? (
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
189
|
+
this.provide = this._provider ? (
|
|
190
|
+
/**
|
|
191
|
+
* @param {PathLike | PathOrFileDescriptor} path path
|
|
192
|
+
* @param {object | FileSystemCallback<any> | undefined} options options
|
|
193
|
+
* @param {FileSystemCallback<any>=} callback callback
|
|
194
|
+
* @returns {any} result
|
|
195
|
+
*/
|
|
196
|
+
(path10, options, callback) => {
|
|
197
|
+
if (typeof options === "function") {
|
|
198
|
+
callback = /** @type {FileSystemCallback<any>} */
|
|
199
|
+
options;
|
|
200
|
+
options = void 0;
|
|
201
|
+
}
|
|
202
|
+
if (typeof path10 !== "string" && !Buffer.isBuffer(path10) && !(path10 instanceof URL) && typeof path10 !== "number") {
|
|
203
|
+
callback(
|
|
204
|
+
new TypeError("path must be a string, Buffer, URL or number")
|
|
205
|
+
);
|
|
206
|
+
return;
|
|
207
|
+
}
|
|
208
|
+
if (options) {
|
|
209
|
+
return (
|
|
210
|
+
/** @type {Function} */
|
|
211
|
+
this._provider.call(
|
|
212
|
+
this._providerContext,
|
|
213
|
+
path10,
|
|
214
|
+
options,
|
|
215
|
+
callback
|
|
216
|
+
)
|
|
217
|
+
);
|
|
218
|
+
}
|
|
219
|
+
let callbacks = this._activeAsyncOperations.get(path10);
|
|
220
|
+
if (callbacks) {
|
|
221
|
+
callbacks.push(callback);
|
|
222
|
+
return;
|
|
223
|
+
}
|
|
224
|
+
this._activeAsyncOperations.set(path10, callbacks = [callback]);
|
|
225
|
+
provider(
|
|
197
226
|
path10,
|
|
198
|
-
|
|
199
|
-
|
|
227
|
+
/**
|
|
228
|
+
* @param {Error} err error
|
|
229
|
+
* @param {any} result result
|
|
230
|
+
*/
|
|
231
|
+
(err, result2) => {
|
|
232
|
+
this._activeAsyncOperations.delete(path10);
|
|
233
|
+
runCallbacks(callbacks, err, result2);
|
|
234
|
+
}
|
|
200
235
|
);
|
|
201
236
|
}
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
237
|
+
) : null;
|
|
238
|
+
this.provideSync = this._syncProvider ? (
|
|
239
|
+
/**
|
|
240
|
+
* @param {PathLike | PathOrFileDescriptor} path path
|
|
241
|
+
* @param {object=} options options
|
|
242
|
+
* @returns {any} result
|
|
243
|
+
*/
|
|
244
|
+
(path10, options) => {
|
|
245
|
+
return (
|
|
246
|
+
/** @type {Function} */
|
|
247
|
+
this._syncProvider.call(
|
|
248
|
+
this._providerContext,
|
|
249
|
+
path10,
|
|
250
|
+
options
|
|
251
|
+
)
|
|
252
|
+
);
|
|
210
253
|
}
|
|
211
|
-
|
|
212
|
-
provider(path10, (err, result2) => {
|
|
213
|
-
this._activeAsyncOperations.delete(path10);
|
|
214
|
-
runCallbacks(callbacks, err, result2);
|
|
215
|
-
});
|
|
216
|
-
} : null;
|
|
217
|
-
this.provideSync = this._syncProvider ? (path10, options) => {
|
|
218
|
-
return this._syncProvider.call(this._providerContext, path10, options);
|
|
219
|
-
} : null;
|
|
254
|
+
) : null;
|
|
220
255
|
}
|
|
221
256
|
purge() {
|
|
222
257
|
}
|
|
@@ -229,9 +264,9 @@ var require_CachedInputFileSystem = __commonJS({
|
|
|
229
264
|
var CacheBackend = class {
|
|
230
265
|
/**
|
|
231
266
|
* @param {number} duration max cache duration of items
|
|
232
|
-
* @param {
|
|
233
|
-
* @param {
|
|
234
|
-
* @param {
|
|
267
|
+
* @param {function | undefined} provider async method
|
|
268
|
+
* @param {function | undefined} syncProvider sync method
|
|
269
|
+
* @param {BaseFileSystem} providerContext call context for the provider methods
|
|
235
270
|
*/
|
|
236
271
|
constructor(duration, provider, syncProvider, providerContext) {
|
|
237
272
|
this._duration = duration;
|
|
@@ -251,75 +286,132 @@ var require_CachedInputFileSystem = __commonJS({
|
|
|
251
286
|
this.provide = provider ? this.provide.bind(this) : null;
|
|
252
287
|
this.provideSync = syncProvider ? this.provideSync.bind(this) : null;
|
|
253
288
|
}
|
|
289
|
+
/**
|
|
290
|
+
* @param {PathLike | PathOrFileDescriptor} path path
|
|
291
|
+
* @param {any} options options
|
|
292
|
+
* @param {FileSystemCallback<any>} callback callback
|
|
293
|
+
* @returns {void}
|
|
294
|
+
*/
|
|
254
295
|
provide(path10, options, callback) {
|
|
255
296
|
if (typeof options === "function") {
|
|
256
297
|
callback = options;
|
|
257
298
|
options = void 0;
|
|
258
299
|
}
|
|
259
|
-
if (typeof path10 !== "string") {
|
|
260
|
-
callback(new TypeError("path must be a string"));
|
|
300
|
+
if (typeof path10 !== "string" && !Buffer.isBuffer(path10) && !(path10 instanceof URL) && typeof path10 !== "number") {
|
|
301
|
+
callback(new TypeError("path must be a string, Buffer, URL or number"));
|
|
261
302
|
return;
|
|
262
303
|
}
|
|
304
|
+
const strPath = typeof path10 !== "string" ? path10.toString() : path10;
|
|
263
305
|
if (options) {
|
|
264
|
-
return
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
306
|
+
return (
|
|
307
|
+
/** @type {Function} */
|
|
308
|
+
this._provider.call(
|
|
309
|
+
this._providerContext,
|
|
310
|
+
path10,
|
|
311
|
+
options,
|
|
312
|
+
callback
|
|
313
|
+
)
|
|
269
314
|
);
|
|
270
315
|
}
|
|
271
316
|
if (this._mode === STORAGE_MODE_SYNC) {
|
|
272
317
|
this._enterAsyncMode();
|
|
273
318
|
}
|
|
274
|
-
let cacheEntry = this._data.get(
|
|
319
|
+
let cacheEntry = this._data.get(strPath);
|
|
275
320
|
if (cacheEntry !== void 0) {
|
|
276
321
|
if (cacheEntry.err) return nextTick(callback, cacheEntry.err);
|
|
277
322
|
return nextTick(callback, null, cacheEntry.result);
|
|
278
323
|
}
|
|
279
|
-
let callbacks = this._activeAsyncOperations.get(
|
|
324
|
+
let callbacks = this._activeAsyncOperations.get(strPath);
|
|
280
325
|
if (callbacks !== void 0) {
|
|
281
326
|
callbacks.push(callback);
|
|
282
327
|
return;
|
|
283
328
|
}
|
|
284
|
-
this._activeAsyncOperations.set(
|
|
285
|
-
this._provider.call(
|
|
286
|
-
this.
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
329
|
+
this._activeAsyncOperations.set(strPath, callbacks = [callback]);
|
|
330
|
+
this._provider.call(
|
|
331
|
+
this._providerContext,
|
|
332
|
+
path10,
|
|
333
|
+
/**
|
|
334
|
+
* @param {Error | null} err error
|
|
335
|
+
* @param {any} [result] result
|
|
336
|
+
*/
|
|
337
|
+
(err, result2) => {
|
|
338
|
+
this._activeAsyncOperations.delete(strPath);
|
|
339
|
+
this._storeResult(strPath, err, result2);
|
|
340
|
+
this._enterAsyncMode();
|
|
341
|
+
runCallbacks(
|
|
342
|
+
/** @type {FileSystemCallback<any>[]} */
|
|
343
|
+
callbacks,
|
|
344
|
+
err,
|
|
345
|
+
result2
|
|
346
|
+
);
|
|
347
|
+
}
|
|
348
|
+
);
|
|
291
349
|
}
|
|
350
|
+
/**
|
|
351
|
+
* @param {PathLike | PathOrFileDescriptor} path path
|
|
352
|
+
* @param {any} options options
|
|
353
|
+
* @returns {any} result
|
|
354
|
+
*/
|
|
292
355
|
provideSync(path10, options) {
|
|
293
|
-
if (typeof path10 !== "string") {
|
|
356
|
+
if (typeof path10 !== "string" && !Buffer.isBuffer(path10) && !(path10 instanceof URL) && typeof path10 !== "number") {
|
|
294
357
|
throw new TypeError("path must be a string");
|
|
295
358
|
}
|
|
359
|
+
const strPath = typeof path10 !== "string" ? path10.toString() : path10;
|
|
296
360
|
if (options) {
|
|
297
|
-
return
|
|
361
|
+
return (
|
|
362
|
+
/** @type {Function} */
|
|
363
|
+
this._syncProvider.call(
|
|
364
|
+
this._providerContext,
|
|
365
|
+
path10,
|
|
366
|
+
options
|
|
367
|
+
)
|
|
368
|
+
);
|
|
298
369
|
}
|
|
299
370
|
if (this._mode === STORAGE_MODE_SYNC) {
|
|
300
371
|
this._runDecays();
|
|
301
372
|
}
|
|
302
|
-
let cacheEntry = this._data.get(
|
|
373
|
+
let cacheEntry = this._data.get(strPath);
|
|
303
374
|
if (cacheEntry !== void 0) {
|
|
304
375
|
if (cacheEntry.err) throw cacheEntry.err;
|
|
305
376
|
return cacheEntry.result;
|
|
306
377
|
}
|
|
307
|
-
const callbacks = this._activeAsyncOperations.get(
|
|
308
|
-
this._activeAsyncOperations.delete(
|
|
378
|
+
const callbacks = this._activeAsyncOperations.get(strPath);
|
|
379
|
+
this._activeAsyncOperations.delete(strPath);
|
|
309
380
|
let result2;
|
|
310
381
|
try {
|
|
311
|
-
result2 =
|
|
382
|
+
result2 = /** @type {Function} */
|
|
383
|
+
this._syncProvider.call(
|
|
384
|
+
this._providerContext,
|
|
385
|
+
path10
|
|
386
|
+
);
|
|
312
387
|
} catch (err) {
|
|
313
|
-
this._storeResult(
|
|
388
|
+
this._storeResult(
|
|
389
|
+
strPath,
|
|
390
|
+
/** @type {Error} */
|
|
391
|
+
err,
|
|
392
|
+
void 0
|
|
393
|
+
);
|
|
314
394
|
this._enterSyncModeWhenIdle();
|
|
315
|
-
if (callbacks)
|
|
395
|
+
if (callbacks) {
|
|
396
|
+
runCallbacks(
|
|
397
|
+
callbacks,
|
|
398
|
+
/** @type {Error} */
|
|
399
|
+
err,
|
|
400
|
+
void 0
|
|
401
|
+
);
|
|
402
|
+
}
|
|
316
403
|
throw err;
|
|
317
404
|
}
|
|
318
|
-
this._storeResult(
|
|
405
|
+
this._storeResult(strPath, null, result2);
|
|
319
406
|
this._enterSyncModeWhenIdle();
|
|
320
|
-
if (callbacks)
|
|
407
|
+
if (callbacks) {
|
|
408
|
+
runCallbacks(callbacks, null, result2);
|
|
409
|
+
}
|
|
321
410
|
return result2;
|
|
322
411
|
}
|
|
412
|
+
/**
|
|
413
|
+
* @param {string | Buffer | URL | number | (string | URL | Buffer | number)[] | Set<string | URL | Buffer | number>} [what] what to purge
|
|
414
|
+
*/
|
|
323
415
|
purge(what) {
|
|
324
416
|
if (!what) {
|
|
325
417
|
if (this._mode !== STORAGE_MODE_IDLE) {
|
|
@@ -329,9 +421,10 @@ var require_CachedInputFileSystem = __commonJS({
|
|
|
329
421
|
}
|
|
330
422
|
this._enterIdleMode();
|
|
331
423
|
}
|
|
332
|
-
} else if (typeof what === "string") {
|
|
424
|
+
} else if (typeof what === "string" || Buffer.isBuffer(what) || what instanceof URL || typeof what === "number") {
|
|
425
|
+
const strWhat = typeof what !== "string" ? what.toString() : what;
|
|
333
426
|
for (let [key, data] of this._data) {
|
|
334
|
-
if (key.startsWith(
|
|
427
|
+
if (key.startsWith(strWhat)) {
|
|
335
428
|
this._data.delete(key);
|
|
336
429
|
data.level.delete(key);
|
|
337
430
|
}
|
|
@@ -342,7 +435,8 @@ var require_CachedInputFileSystem = __commonJS({
|
|
|
342
435
|
} else {
|
|
343
436
|
for (let [key, data] of this._data) {
|
|
344
437
|
for (const item of what) {
|
|
345
|
-
|
|
438
|
+
const strItem = typeof item !== "string" ? item.toString() : item;
|
|
439
|
+
if (key.startsWith(strItem)) {
|
|
346
440
|
this._data.delete(key);
|
|
347
441
|
data.level.delete(key);
|
|
348
442
|
break;
|
|
@@ -354,19 +448,29 @@ var require_CachedInputFileSystem = __commonJS({
|
|
|
354
448
|
}
|
|
355
449
|
}
|
|
356
450
|
}
|
|
451
|
+
/**
|
|
452
|
+
* @param {string | Buffer | URL | number | (string | URL | Buffer | number)[] | Set<string | URL | Buffer | number>} [what] what to purge
|
|
453
|
+
*/
|
|
357
454
|
purgeParent(what) {
|
|
358
455
|
if (!what) {
|
|
359
456
|
this.purge();
|
|
360
|
-
} else if (typeof what === "string") {
|
|
361
|
-
|
|
457
|
+
} else if (typeof what === "string" || Buffer.isBuffer(what) || what instanceof URL || typeof what === "number") {
|
|
458
|
+
const strWhat = typeof what !== "string" ? what.toString() : what;
|
|
459
|
+
this.purge(dirname4(strWhat));
|
|
362
460
|
} else {
|
|
363
461
|
const set = /* @__PURE__ */ new Set();
|
|
364
462
|
for (const item of what) {
|
|
365
|
-
|
|
463
|
+
const strItem = typeof item !== "string" ? item.toString() : item;
|
|
464
|
+
set.add(dirname4(strItem));
|
|
366
465
|
}
|
|
367
466
|
this.purge(set);
|
|
368
467
|
}
|
|
369
468
|
}
|
|
469
|
+
/**
|
|
470
|
+
* @param {string} path path
|
|
471
|
+
* @param {Error | null} err error
|
|
472
|
+
* @param {any} result result
|
|
473
|
+
*/
|
|
370
474
|
_storeResult(path10, err, result2) {
|
|
371
475
|
if (this._data.has(path10)) return;
|
|
372
476
|
const level = this._levels[this._currentLevel];
|
|
@@ -406,7 +510,11 @@ var require_CachedInputFileSystem = __commonJS({
|
|
|
406
510
|
break;
|
|
407
511
|
case STORAGE_MODE_SYNC:
|
|
408
512
|
this._runDecays();
|
|
409
|
-
if (
|
|
513
|
+
if (
|
|
514
|
+
/** @type {STORAGE_MODE_IDLE | STORAGE_MODE_SYNC | STORAGE_MODE_ASYNC}*/
|
|
515
|
+
this._mode === STORAGE_MODE_IDLE
|
|
516
|
+
)
|
|
517
|
+
return;
|
|
410
518
|
timeout = Math.max(
|
|
411
519
|
0,
|
|
412
520
|
/** @type {number} */
|
|
@@ -441,6 +549,10 @@ var require_CachedInputFileSystem = __commonJS({
|
|
|
441
549
|
return new OperationMergerBackend(provider, syncProvider, providerContext);
|
|
442
550
|
};
|
|
443
551
|
module2.exports = class CachedInputFileSystem {
|
|
552
|
+
/**
|
|
553
|
+
* @param {BaseFileSystem} fileSystem file system
|
|
554
|
+
* @param {number} duration duration in ms files are cached
|
|
555
|
+
*/
|
|
444
556
|
constructor(fileSystem, duration) {
|
|
445
557
|
this.fileSystem = fileSystem;
|
|
446
558
|
this._lstatBackend = createBackend(
|
|
@@ -493,7 +605,12 @@ var require_CachedInputFileSystem = __commonJS({
|
|
|
493
605
|
readFileSync2;
|
|
494
606
|
this._readJsonBackend = createBackend(
|
|
495
607
|
duration,
|
|
496
|
-
|
|
608
|
+
// prettier-ignore
|
|
609
|
+
this.fileSystem.readJson || this.readFile && /**
|
|
610
|
+
* @param {string} path path
|
|
611
|
+
* @param {FileSystemCallback<any>} callback
|
|
612
|
+
*/
|
|
613
|
+
((path10, callback) => {
|
|
497
614
|
this.readFile(path10, (err, buffer) => {
|
|
498
615
|
if (err) return callback(err);
|
|
499
616
|
if (!buffer || buffer.length === 0)
|
|
@@ -502,12 +619,20 @@ var require_CachedInputFileSystem = __commonJS({
|
|
|
502
619
|
try {
|
|
503
620
|
data = JSON.parse(buffer.toString("utf-8"));
|
|
504
621
|
} catch (e) {
|
|
505
|
-
return callback(
|
|
622
|
+
return callback(
|
|
623
|
+
/** @type {Error} */
|
|
624
|
+
e
|
|
625
|
+
);
|
|
506
626
|
}
|
|
507
627
|
callback(null, data);
|
|
508
628
|
});
|
|
509
629
|
}),
|
|
510
|
-
|
|
630
|
+
// prettier-ignore
|
|
631
|
+
this.fileSystem.readJsonSync || this.readFileSync && /**
|
|
632
|
+
* @param {string} path path
|
|
633
|
+
* @returns {any} result
|
|
634
|
+
*/
|
|
635
|
+
((path10) => {
|
|
511
636
|
const buffer = this.readFileSync(path10);
|
|
512
637
|
const data = JSON.parse(buffer.toString("utf-8"));
|
|
513
638
|
return data;
|
|
@@ -532,7 +657,22 @@ var require_CachedInputFileSystem = __commonJS({
|
|
|
532
657
|
const readlinkSync = this._readlinkBackend.provideSync;
|
|
533
658
|
this.readlinkSync = /** @type {SyncFileSystem["readlinkSync"]} */
|
|
534
659
|
readlinkSync;
|
|
660
|
+
this._realpathBackend = createBackend(
|
|
661
|
+
duration,
|
|
662
|
+
this.fileSystem.realpath,
|
|
663
|
+
this.fileSystem.realpathSync,
|
|
664
|
+
this.fileSystem
|
|
665
|
+
);
|
|
666
|
+
const realpath = this._realpathBackend.provide;
|
|
667
|
+
this.realpath = /** @type {FileSystem["realpath"]} */
|
|
668
|
+
realpath;
|
|
669
|
+
const realpathSync = this._realpathBackend.provideSync;
|
|
670
|
+
this.realpathSync = /** @type {SyncFileSystem["realpathSync"]} */
|
|
671
|
+
realpathSync;
|
|
535
672
|
}
|
|
673
|
+
/**
|
|
674
|
+
* @param {string | Buffer | URL | number | (string | URL | Buffer | number)[] | Set<string | URL | Buffer | number>} [what] what to purge
|
|
675
|
+
*/
|
|
536
676
|
purge(what) {
|
|
537
677
|
this._statBackend.purge(what);
|
|
538
678
|
this._lstatBackend.purge(what);
|
|
@@ -540,6 +680,7 @@ var require_CachedInputFileSystem = __commonJS({
|
|
|
540
680
|
this._readFileBackend.purge(what);
|
|
541
681
|
this._readlinkBackend.purge(what);
|
|
542
682
|
this._readJsonBackend.purge(what);
|
|
683
|
+
this._realpathBackend.purge(what);
|
|
543
684
|
}
|
|
544
685
|
};
|
|
545
686
|
}
|
|
@@ -555,6 +696,8 @@ __export(src_exports, {
|
|
|
555
696
|
CopyRspackPlugin: () => CopyRspackPlugin,
|
|
556
697
|
CssExtractRspackPlugin: () => CssExtractRspackPlugin,
|
|
557
698
|
DefinePlugin: () => DefinePlugin,
|
|
699
|
+
DllPlugin: () => DllPlugin,
|
|
700
|
+
DllReferencePlugin: () => DllReferencePlugin,
|
|
558
701
|
DynamicEntryPlugin: () => DynamicEntryPlugin,
|
|
559
702
|
EntryOptionPlugin: () => EntryOptionPlugin_default,
|
|
560
703
|
EntryPlugin: () => EntryPlugin,
|
|
@@ -617,6 +760,8 @@ __export(exports_exports, {
|
|
|
617
760
|
CopyRspackPlugin: () => CopyRspackPlugin,
|
|
618
761
|
CssExtractRspackPlugin: () => CssExtractRspackPlugin,
|
|
619
762
|
DefinePlugin: () => DefinePlugin,
|
|
763
|
+
DllPlugin: () => DllPlugin,
|
|
764
|
+
DllReferencePlugin: () => DllReferencePlugin,
|
|
620
765
|
DynamicEntryPlugin: () => DynamicEntryPlugin,
|
|
621
766
|
EntryOptionPlugin: () => EntryOptionPlugin_default,
|
|
622
767
|
EntryPlugin: () => EntryPlugin,
|
|
@@ -996,14 +1141,28 @@ var Dependency = class _Dependency {
|
|
|
996
1141
|
// src/DependenciesBlock.ts
|
|
997
1142
|
var DependenciesBlock = class _DependenciesBlock {
|
|
998
1143
|
#binding;
|
|
999
|
-
|
|
1000
|
-
|
|
1144
|
+
static __from_binding(binding3) {
|
|
1145
|
+
return new _DependenciesBlock(binding3);
|
|
1001
1146
|
}
|
|
1002
|
-
|
|
1003
|
-
return
|
|
1147
|
+
static __to_binding(block) {
|
|
1148
|
+
return block.#binding;
|
|
1004
1149
|
}
|
|
1005
|
-
|
|
1006
|
-
|
|
1150
|
+
constructor(binding3) {
|
|
1151
|
+
this.#binding = binding3;
|
|
1152
|
+
Object.defineProperties(this, {
|
|
1153
|
+
dependencies: {
|
|
1154
|
+
enumerable: true,
|
|
1155
|
+
get() {
|
|
1156
|
+
return binding3.dependencies.map((d) => Dependency.__from_binding(d));
|
|
1157
|
+
}
|
|
1158
|
+
},
|
|
1159
|
+
blocks: {
|
|
1160
|
+
enumerable: true,
|
|
1161
|
+
get() {
|
|
1162
|
+
return binding3.blocks.map((b) => _DependenciesBlock.__from_binding(b));
|
|
1163
|
+
}
|
|
1164
|
+
}
|
|
1165
|
+
});
|
|
1007
1166
|
}
|
|
1008
1167
|
};
|
|
1009
1168
|
|
|
@@ -1083,21 +1242,10 @@ var ContextModuleFactoryBeforeResolveData = class _ContextModuleFactoryBeforeRes
|
|
|
1083
1242
|
regExp: {
|
|
1084
1243
|
enumerable: true,
|
|
1085
1244
|
get() {
|
|
1086
|
-
|
|
1087
|
-
return void 0;
|
|
1088
|
-
}
|
|
1089
|
-
const { source, flags } = binding3.regExp;
|
|
1090
|
-
return new RegExp(source, flags);
|
|
1245
|
+
return binding3.regExp;
|
|
1091
1246
|
},
|
|
1092
1247
|
set(val) {
|
|
1093
|
-
|
|
1094
|
-
binding3.regExp = void 0;
|
|
1095
|
-
return;
|
|
1096
|
-
}
|
|
1097
|
-
binding3.regExp = {
|
|
1098
|
-
source: val.source,
|
|
1099
|
-
flags: val.flags
|
|
1100
|
-
};
|
|
1248
|
+
binding3.regExp = val;
|
|
1101
1249
|
}
|
|
1102
1250
|
},
|
|
1103
1251
|
recursive: {
|
|
@@ -1153,21 +1301,10 @@ var ContextModuleFactoryAfterResolveData = class _ContextModuleFactoryAfterResol
|
|
|
1153
1301
|
regExp: {
|
|
1154
1302
|
enumerable: true,
|
|
1155
1303
|
get() {
|
|
1156
|
-
|
|
1157
|
-
return void 0;
|
|
1158
|
-
}
|
|
1159
|
-
const { source, flags } = binding3.regExp;
|
|
1160
|
-
return new RegExp(source, flags);
|
|
1304
|
+
return binding3.regExp;
|
|
1161
1305
|
},
|
|
1162
1306
|
set(val) {
|
|
1163
|
-
|
|
1164
|
-
binding3.regExp = void 0;
|
|
1165
|
-
return;
|
|
1166
|
-
}
|
|
1167
|
-
binding3.regExp = {
|
|
1168
|
-
source: val.source,
|
|
1169
|
-
flags: val.flags
|
|
1170
|
-
};
|
|
1307
|
+
binding3.regExp = val;
|
|
1171
1308
|
}
|
|
1172
1309
|
},
|
|
1173
1310
|
recursive: {
|
|
@@ -1190,46 +1327,128 @@ var ContextModuleFactoryAfterResolveData = class _ContextModuleFactoryAfterResol
|
|
|
1190
1327
|
});
|
|
1191
1328
|
}
|
|
1192
1329
|
};
|
|
1330
|
+
var MODULE_MAPPINGS = /* @__PURE__ */ new WeakMap();
|
|
1193
1331
|
var Module = class _Module {
|
|
1194
1332
|
#inner;
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1333
|
+
static __from_binding(binding3, compilation) {
|
|
1334
|
+
let module2 = MODULE_MAPPINGS.get(binding3);
|
|
1335
|
+
if (module2) {
|
|
1336
|
+
return module2;
|
|
1337
|
+
}
|
|
1338
|
+
module2 = new _Module(binding3, compilation);
|
|
1339
|
+
MODULE_MAPPINGS.set(binding3, module2);
|
|
1340
|
+
return module2;
|
|
1198
1341
|
}
|
|
1199
1342
|
constructor(module2, compilation) {
|
|
1200
1343
|
this.#inner = module2;
|
|
1201
|
-
this.type = module2.type;
|
|
1202
|
-
this.layer = module2.layer ?? null;
|
|
1203
|
-
this.context = module2.context;
|
|
1204
|
-
this.resource = module2.resource;
|
|
1205
|
-
this.request = module2.request;
|
|
1206
|
-
this.userRequest = module2.userRequest;
|
|
1207
|
-
this.rawRequest = module2.rawRequest;
|
|
1208
|
-
this.factoryMeta = module2.factoryMeta;
|
|
1209
|
-
const customModule = compilation == null ? void 0 : compilation.__internal__getCustomModule(
|
|
1210
|
-
module2.moduleIdentifier
|
|
1211
|
-
);
|
|
1212
|
-
this.buildInfo = (customModule == null ? void 0 : customModule.buildInfo) || {};
|
|
1213
|
-
this.buildMeta = (customModule == null ? void 0 : customModule.buildMeta) || {};
|
|
1214
1344
|
Object.defineProperties(this, {
|
|
1345
|
+
type: {
|
|
1346
|
+
enumerable: true,
|
|
1347
|
+
get() {
|
|
1348
|
+
return module2.type || null;
|
|
1349
|
+
}
|
|
1350
|
+
},
|
|
1351
|
+
layer: {
|
|
1352
|
+
enumerable: true,
|
|
1353
|
+
get() {
|
|
1354
|
+
return module2.layer;
|
|
1355
|
+
}
|
|
1356
|
+
},
|
|
1357
|
+
context: {
|
|
1358
|
+
enumerable: true,
|
|
1359
|
+
get() {
|
|
1360
|
+
return module2.context;
|
|
1361
|
+
}
|
|
1362
|
+
},
|
|
1363
|
+
resource: {
|
|
1364
|
+
enumerable: true,
|
|
1365
|
+
get() {
|
|
1366
|
+
return module2.resource;
|
|
1367
|
+
}
|
|
1368
|
+
},
|
|
1369
|
+
request: {
|
|
1370
|
+
enumerable: true,
|
|
1371
|
+
get() {
|
|
1372
|
+
return module2.request;
|
|
1373
|
+
}
|
|
1374
|
+
},
|
|
1375
|
+
userRequest: {
|
|
1376
|
+
enumerable: true,
|
|
1377
|
+
get() {
|
|
1378
|
+
return module2.userRequest;
|
|
1379
|
+
},
|
|
1380
|
+
set(val) {
|
|
1381
|
+
module2.userRequest = val;
|
|
1382
|
+
}
|
|
1383
|
+
},
|
|
1384
|
+
rawRequest: {
|
|
1385
|
+
enumerable: true,
|
|
1386
|
+
get() {
|
|
1387
|
+
return module2.rawRequest;
|
|
1388
|
+
}
|
|
1389
|
+
},
|
|
1390
|
+
factoryMeta: {
|
|
1391
|
+
enumerable: true,
|
|
1392
|
+
get() {
|
|
1393
|
+
return module2.factoryMeta;
|
|
1394
|
+
}
|
|
1395
|
+
},
|
|
1215
1396
|
modules: {
|
|
1216
1397
|
enumerable: true,
|
|
1217
1398
|
get() {
|
|
1218
|
-
if (module2 instanceof import_binding4.
|
|
1399
|
+
if (module2 instanceof import_binding4.JsModule) {
|
|
1219
1400
|
return module2.modules ? module2.modules.map((m) => _Module.__from_binding(m)) : void 0;
|
|
1220
1401
|
}
|
|
1221
1402
|
return void 0;
|
|
1222
1403
|
}
|
|
1404
|
+
},
|
|
1405
|
+
buildInfo: {
|
|
1406
|
+
enumerable: true,
|
|
1407
|
+
get() {
|
|
1408
|
+
const customModule = compilation == null ? void 0 : compilation.__internal__getCustomModule(
|
|
1409
|
+
module2.moduleIdentifier
|
|
1410
|
+
);
|
|
1411
|
+
return (customModule == null ? void 0 : customModule.buildInfo) || {};
|
|
1412
|
+
}
|
|
1413
|
+
},
|
|
1414
|
+
buildMeta: {
|
|
1415
|
+
enumerable: true,
|
|
1416
|
+
get() {
|
|
1417
|
+
const customModule = compilation == null ? void 0 : compilation.__internal__getCustomModule(
|
|
1418
|
+
module2.moduleIdentifier
|
|
1419
|
+
);
|
|
1420
|
+
return (customModule == null ? void 0 : customModule.buildMeta) || {};
|
|
1421
|
+
}
|
|
1422
|
+
},
|
|
1423
|
+
blocks: {
|
|
1424
|
+
enumerable: true,
|
|
1425
|
+
get() {
|
|
1426
|
+
if ("blocks" in module2) {
|
|
1427
|
+
return module2.blocks.map((b) => DependenciesBlock.__from_binding(b));
|
|
1428
|
+
}
|
|
1429
|
+
return [];
|
|
1430
|
+
}
|
|
1431
|
+
},
|
|
1432
|
+
dependencies: {
|
|
1433
|
+
enumerable: true,
|
|
1434
|
+
get() {
|
|
1435
|
+
if ("dependencies" in module2) {
|
|
1436
|
+
return module2.dependencies.map((d) => Dependency.__from_binding(d));
|
|
1437
|
+
}
|
|
1438
|
+
return [];
|
|
1439
|
+
}
|
|
1440
|
+
},
|
|
1441
|
+
useSourceMap: {
|
|
1442
|
+
enumerable: true,
|
|
1443
|
+
get() {
|
|
1444
|
+
return module2.useSourceMap;
|
|
1445
|
+
}
|
|
1223
1446
|
}
|
|
1224
1447
|
});
|
|
1225
1448
|
}
|
|
1226
1449
|
originalSource() {
|
|
1227
|
-
if (this.#originalSource) return this.#originalSource;
|
|
1228
1450
|
if (this.#inner.originalSource) {
|
|
1229
|
-
|
|
1230
|
-
this.#inner.originalSource
|
|
1231
|
-
);
|
|
1232
|
-
return this.#originalSource;
|
|
1451
|
+
return JsSource.__from_binding(this.#inner.originalSource);
|
|
1233
1452
|
}
|
|
1234
1453
|
return null;
|
|
1235
1454
|
}
|
|
@@ -1242,12 +1461,6 @@ var Module = class _Module {
|
|
|
1242
1461
|
}
|
|
1243
1462
|
return null;
|
|
1244
1463
|
}
|
|
1245
|
-
get blocks() {
|
|
1246
|
-
if ("blocks" in this.#inner) {
|
|
1247
|
-
return this.#inner.blocks.map((b) => new DependenciesBlock(b));
|
|
1248
|
-
}
|
|
1249
|
-
return [];
|
|
1250
|
-
}
|
|
1251
1464
|
size(type) {
|
|
1252
1465
|
if ("size" in this.#inner) {
|
|
1253
1466
|
return this.#inner.size(type);
|
|
@@ -1448,7 +1661,8 @@ var RuntimeModule = class {
|
|
|
1448
1661
|
name: module2.name,
|
|
1449
1662
|
stage: module2.stage,
|
|
1450
1663
|
generator: module2.generate.bind(module2),
|
|
1451
|
-
|
|
1664
|
+
fullHash: module2.fullHash,
|
|
1665
|
+
dependentHash: module2.dependentHash,
|
|
1452
1666
|
isolate: module2.shouldIsolate()
|
|
1453
1667
|
};
|
|
1454
1668
|
}
|
|
@@ -5977,7 +6191,13 @@ async function runLoaders(compiler, context2) {
|
|
|
5977
6191
|
if (res.cacheable === false) {
|
|
5978
6192
|
this.cacheable(false);
|
|
5979
6193
|
}
|
|
5980
|
-
|
|
6194
|
+
if (res.error) {
|
|
6195
|
+
reject(new Error(err));
|
|
6196
|
+
} else {
|
|
6197
|
+
resolve2(
|
|
6198
|
+
compiler.__internal__getModuleExecutionResult(res.id)
|
|
6199
|
+
);
|
|
6200
|
+
}
|
|
5981
6201
|
}
|
|
5982
6202
|
}
|
|
5983
6203
|
);
|
|
@@ -6009,10 +6229,14 @@ async function runLoaders(compiler, context2) {
|
|
|
6009
6229
|
if (res.cacheable === false) {
|
|
6010
6230
|
this.cacheable(false);
|
|
6011
6231
|
}
|
|
6012
|
-
|
|
6013
|
-
void 0
|
|
6014
|
-
|
|
6015
|
-
|
|
6232
|
+
if (res.error) {
|
|
6233
|
+
callback(new Error(err), void 0);
|
|
6234
|
+
} else {
|
|
6235
|
+
callback(
|
|
6236
|
+
void 0,
|
|
6237
|
+
compiler.__internal__getModuleExecutionResult(res.id)
|
|
6238
|
+
);
|
|
6239
|
+
}
|
|
6016
6240
|
}
|
|
6017
6241
|
}
|
|
6018
6242
|
);
|
|
@@ -6272,65 +6496,78 @@ async function runLoaders(compiler, context2) {
|
|
|
6272
6496
|
enumerable: true,
|
|
6273
6497
|
get: () => context2.__internal__parseMeta
|
|
6274
6498
|
});
|
|
6275
|
-
|
|
6276
|
-
|
|
6277
|
-
|
|
6278
|
-
|
|
6279
|
-
|
|
6280
|
-
|
|
6281
|
-
|
|
6282
|
-
|
|
6283
|
-
|
|
6284
|
-
|
|
6285
|
-
|
|
6286
|
-
|
|
6287
|
-
|
|
6288
|
-
|
|
6289
|
-
loaderContext
|
|
6290
|
-
|
|
6291
|
-
|
|
6292
|
-
|
|
6293
|
-
|
|
6294
|
-
|
|
6295
|
-
|
|
6296
|
-
|
|
6297
|
-
|
|
6298
|
-
|
|
6299
|
-
|
|
6499
|
+
try {
|
|
6500
|
+
switch (loaderState) {
|
|
6501
|
+
case import_binding23.JsLoaderState.Pitching: {
|
|
6502
|
+
while (loaderContext.loaderIndex < loaderContext.loaders.length) {
|
|
6503
|
+
const currentLoaderObject = loaderContext.loaders[loaderContext.loaderIndex];
|
|
6504
|
+
if (currentLoaderObject.shouldYield()) break;
|
|
6505
|
+
if (currentLoaderObject.pitchExecuted) {
|
|
6506
|
+
loaderContext.loaderIndex += 1;
|
|
6507
|
+
continue;
|
|
6508
|
+
}
|
|
6509
|
+
await loadLoaderAsync(currentLoaderObject);
|
|
6510
|
+
const fn2 = currentLoaderObject.pitch;
|
|
6511
|
+
currentLoaderObject.pitchExecuted = true;
|
|
6512
|
+
if (!fn2) continue;
|
|
6513
|
+
const args = await runSyncOrAsync(fn2, loaderContext, [
|
|
6514
|
+
loaderContext.remainingRequest,
|
|
6515
|
+
loaderContext.previousRequest,
|
|
6516
|
+
currentLoaderObject.data
|
|
6517
|
+
]) || [];
|
|
6518
|
+
const hasArg = args.some((value) => value !== void 0);
|
|
6519
|
+
if (hasArg) {
|
|
6520
|
+
const [content, sourceMap, additionalData] = args;
|
|
6521
|
+
context2.content = isNil(content) ? null : toBuffer(content);
|
|
6522
|
+
context2.sourceMap = serializeObject(sourceMap);
|
|
6523
|
+
context2.additionalData = additionalData;
|
|
6524
|
+
break;
|
|
6525
|
+
}
|
|
6300
6526
|
}
|
|
6527
|
+
break;
|
|
6301
6528
|
}
|
|
6302
|
-
|
|
6303
|
-
|
|
6304
|
-
|
|
6305
|
-
|
|
6306
|
-
|
|
6307
|
-
|
|
6308
|
-
|
|
6309
|
-
|
|
6310
|
-
|
|
6311
|
-
|
|
6312
|
-
|
|
6313
|
-
|
|
6529
|
+
case import_binding23.JsLoaderState.Normal: {
|
|
6530
|
+
let content = context2.content;
|
|
6531
|
+
let sourceMap = JsSourceMap.__from_binding(context2.sourceMap);
|
|
6532
|
+
let additionalData = context2.additionalData;
|
|
6533
|
+
while (loaderContext.loaderIndex >= 0) {
|
|
6534
|
+
const currentLoaderObject = loaderContext.loaders[loaderContext.loaderIndex];
|
|
6535
|
+
if (currentLoaderObject.shouldYield()) break;
|
|
6536
|
+
if (currentLoaderObject.normalExecuted) {
|
|
6537
|
+
loaderContext.loaderIndex--;
|
|
6538
|
+
continue;
|
|
6539
|
+
}
|
|
6540
|
+
await loadLoaderAsync(currentLoaderObject);
|
|
6541
|
+
const fn2 = currentLoaderObject.normal;
|
|
6542
|
+
currentLoaderObject.normalExecuted = true;
|
|
6543
|
+
if (!fn2) continue;
|
|
6544
|
+
const args = [content, sourceMap, additionalData];
|
|
6545
|
+
convertArgs(args, !!currentLoaderObject.raw);
|
|
6546
|
+
[content, sourceMap, additionalData] = await runSyncOrAsync(fn2, loaderContext, args) || [];
|
|
6314
6547
|
}
|
|
6315
|
-
|
|
6316
|
-
|
|
6317
|
-
|
|
6318
|
-
|
|
6319
|
-
const args = [content, sourceMap, additionalData];
|
|
6320
|
-
convertArgs(args, !!currentLoaderObject.raw);
|
|
6321
|
-
[content, sourceMap, additionalData] = await runSyncOrAsync(fn2, loaderContext, args) || [];
|
|
6548
|
+
context2.content = isNil(content) ? null : toBuffer(content);
|
|
6549
|
+
context2.sourceMap = JsSourceMap.__to_binding(sourceMap);
|
|
6550
|
+
context2.additionalData = additionalData;
|
|
6551
|
+
break;
|
|
6322
6552
|
}
|
|
6323
|
-
|
|
6324
|
-
|
|
6325
|
-
context2.additionalData = additionalData;
|
|
6326
|
-
break;
|
|
6553
|
+
default:
|
|
6554
|
+
throw new Error(`Unexpected loader runner state: ${loaderState}`);
|
|
6327
6555
|
}
|
|
6328
|
-
|
|
6329
|
-
|
|
6556
|
+
context2.loaderItems = loaderContext.loaders.map(
|
|
6557
|
+
(item) => LoaderObject.__to_binding(item)
|
|
6558
|
+
);
|
|
6559
|
+
} catch (e) {
|
|
6560
|
+
const error = e;
|
|
6561
|
+
context2.__internal__error = typeof e === "string" ? {
|
|
6562
|
+
name: "ModuleBuildError",
|
|
6563
|
+
message: e
|
|
6564
|
+
} : {
|
|
6565
|
+
name: "ModuleBuildError",
|
|
6566
|
+
message: error.message,
|
|
6567
|
+
stack: typeof error.stack === "string" ? error.stack : void 0,
|
|
6568
|
+
hideStack: "hideStack" in error ? error.hideStack === true || error.hideStack === "true" : void 0
|
|
6569
|
+
};
|
|
6330
6570
|
}
|
|
6331
|
-
context2.loaderItems = loaderContext.loaders.map(
|
|
6332
|
-
(item) => LoaderObject.__to_binding(item)
|
|
6333
|
-
);
|
|
6334
6571
|
return context2;
|
|
6335
6572
|
}
|
|
6336
6573
|
function utf8BufferToString(buf) {
|
|
@@ -6755,7 +6992,7 @@ var getRawModuleRule = (rule, path10, options, upperType) => {
|
|
|
6755
6992
|
parser: rule.parser ? getRawParserOptions(rule.parser, rule.type ?? upperType) : void 0,
|
|
6756
6993
|
generator: rule.generator ? getRawGeneratorOptions(rule.generator, rule.type ?? upperType) : void 0,
|
|
6757
6994
|
resolve: rule.resolve ? getRawResolve(rule.resolve) : void 0,
|
|
6758
|
-
oneOf: rule.oneOf ? rule.oneOf.map(
|
|
6995
|
+
oneOf: rule.oneOf ? rule.oneOf.filter(Boolean).map(
|
|
6759
6996
|
(rule2, index) => getRawModuleRule(
|
|
6760
6997
|
rule2,
|
|
6761
6998
|
`${path10}.oneOf[${index}]`,
|
|
@@ -6763,7 +7000,7 @@ var getRawModuleRule = (rule, path10, options, upperType) => {
|
|
|
6763
7000
|
rule2.type ?? upperType
|
|
6764
7001
|
)
|
|
6765
7002
|
) : void 0,
|
|
6766
|
-
rules: rule.rules ? rule.rules.map(
|
|
7003
|
+
rules: rule.rules ? rule.rules.filter(Boolean).map(
|
|
6767
7004
|
(rule2, index) => getRawModuleRule(
|
|
6768
7005
|
rule2,
|
|
6769
7006
|
`${path10}.rules[${index}]`,
|
|
@@ -6809,10 +7046,7 @@ function getRawRuleSetCondition(condition) {
|
|
|
6809
7046
|
if (condition instanceof RegExp) {
|
|
6810
7047
|
return {
|
|
6811
7048
|
type: import_binding24.RawRuleSetConditionType.regexp,
|
|
6812
|
-
regexp:
|
|
6813
|
-
source: condition.source,
|
|
6814
|
-
flags: condition.flags
|
|
6815
|
-
}
|
|
7049
|
+
regexp: condition
|
|
6816
7050
|
};
|
|
6817
7051
|
}
|
|
6818
7052
|
if (typeof condition === "function") {
|
|
@@ -8206,7 +8440,7 @@ var applyRspackOptionsDefaults = (options) => {
|
|
|
8206
8440
|
D(options, "profile", false);
|
|
8207
8441
|
D(options, "bail", false);
|
|
8208
8442
|
F(options, "cache", () => development);
|
|
8209
|
-
applyExperimentsDefaults(options.experiments);
|
|
8443
|
+
applyExperimentsDefaults(options.experiments, { production });
|
|
8210
8444
|
applySnapshotDefaults(options.snapshot, { production });
|
|
8211
8445
|
applyModuleDefaults(options.module, {
|
|
8212
8446
|
asyncWebAssembly: options.experiments.asyncWebAssembly,
|
|
@@ -8282,24 +8516,24 @@ var applyInfrastructureLoggingDefaults = (infrastructureLogging2) => {
|
|
|
8282
8516
|
D(infrastructureLogging2, "colors", tty);
|
|
8283
8517
|
D(infrastructureLogging2, "appendOnly", !tty);
|
|
8284
8518
|
};
|
|
8285
|
-
var applyExperimentsDefaults = (experiments3) => {
|
|
8519
|
+
var applyExperimentsDefaults = (experiments3, { production }) => {
|
|
8286
8520
|
D(experiments3, "futureDefaults", false);
|
|
8287
8521
|
D(experiments3, "lazyCompilation", false);
|
|
8288
8522
|
D(experiments3, "asyncWebAssembly", experiments3.futureDefaults);
|
|
8289
8523
|
D(experiments3, "css", experiments3.futureDefaults ? true : void 0);
|
|
8290
8524
|
D(experiments3, "layers", false);
|
|
8291
8525
|
D(experiments3, "topLevelAwait", true);
|
|
8292
|
-
D(experiments3, "incremental", {});
|
|
8526
|
+
D(experiments3, "incremental", !production ? {} : false);
|
|
8293
8527
|
if (typeof experiments3.incremental === "object") {
|
|
8294
8528
|
D(experiments3.incremental, "make", true);
|
|
8295
|
-
D(experiments3.incremental, "emitAssets", true);
|
|
8296
8529
|
D(experiments3.incremental, "inferAsyncModules", false);
|
|
8297
8530
|
D(experiments3.incremental, "providedExports", false);
|
|
8298
8531
|
D(experiments3.incremental, "dependenciesDiagnostics", false);
|
|
8532
|
+
D(experiments3.incremental, "buildChunkGraph", false);
|
|
8299
8533
|
D(experiments3.incremental, "modulesHashes", false);
|
|
8300
8534
|
D(experiments3.incremental, "modulesCodegen", false);
|
|
8301
8535
|
D(experiments3.incremental, "modulesRuntimeRequirements", false);
|
|
8302
|
-
D(experiments3.incremental, "
|
|
8536
|
+
D(experiments3.incremental, "emitAssets", true);
|
|
8303
8537
|
}
|
|
8304
8538
|
D(experiments3, "rspackFuture", {});
|
|
8305
8539
|
};
|
|
@@ -9360,55 +9594,204 @@ var keyedNestedConfig = (value, fn2, customKeys) => {
|
|
|
9360
9594
|
|
|
9361
9595
|
// src/config/zod.ts
|
|
9362
9596
|
var import_node_path7 = __toESM(require("path"));
|
|
9597
|
+
var import_zod2 = require("../compiled/zod/index.js");
|
|
9598
|
+
|
|
9599
|
+
// src/config/utils.ts
|
|
9363
9600
|
var import_zod = require("../compiled/zod/index.js");
|
|
9364
|
-
|
|
9601
|
+
function processCreateParams(params) {
|
|
9602
|
+
if (!params) return {};
|
|
9603
|
+
const { errorMap, invalid_type_error, required_error, description } = params;
|
|
9604
|
+
if (errorMap && (invalid_type_error || required_error)) {
|
|
9605
|
+
throw new Error(
|
|
9606
|
+
`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`
|
|
9607
|
+
);
|
|
9608
|
+
}
|
|
9609
|
+
if (errorMap) return { errorMap, description };
|
|
9610
|
+
const customMap = (iss, ctx) => {
|
|
9611
|
+
const { message } = params;
|
|
9612
|
+
if (iss.code === "invalid_enum_value") {
|
|
9613
|
+
return { message: message ?? ctx.defaultError };
|
|
9614
|
+
}
|
|
9615
|
+
if (typeof ctx.data === "undefined") {
|
|
9616
|
+
return { message: message ?? required_error ?? ctx.defaultError };
|
|
9617
|
+
}
|
|
9618
|
+
if (iss.code !== "invalid_type") return { message: ctx.defaultError };
|
|
9619
|
+
return { message: message ?? invalid_type_error ?? ctx.defaultError };
|
|
9620
|
+
};
|
|
9621
|
+
return { errorMap: customMap, description };
|
|
9622
|
+
}
|
|
9623
|
+
var _RspackZodUnion = class _RspackZodUnion extends import_zod.z.ZodUnion {
|
|
9624
|
+
_parse(input) {
|
|
9625
|
+
const { ctx } = this._processInputParams(input);
|
|
9626
|
+
const options = this._def.options;
|
|
9627
|
+
function handleResults(results) {
|
|
9628
|
+
for (const result2 of results) {
|
|
9629
|
+
if (result2.result.status === "valid") {
|
|
9630
|
+
return result2.result;
|
|
9631
|
+
}
|
|
9632
|
+
}
|
|
9633
|
+
for (const result2 of results) {
|
|
9634
|
+
if (result2.result.status === "dirty") {
|
|
9635
|
+
ctx.common.issues.push(...result2.ctx.common.issues);
|
|
9636
|
+
return result2.result;
|
|
9637
|
+
}
|
|
9638
|
+
}
|
|
9639
|
+
const unionErrors2 = results.map(
|
|
9640
|
+
(result2) => new import_zod.ZodError(result2.ctx.common.issues)
|
|
9641
|
+
);
|
|
9642
|
+
(0, import_zod.addIssueToContext)(ctx, {
|
|
9643
|
+
code: import_zod.ZodIssueCode.invalid_union,
|
|
9644
|
+
unionErrors: unionErrors2
|
|
9645
|
+
});
|
|
9646
|
+
return import_zod.INVALID;
|
|
9647
|
+
}
|
|
9648
|
+
if (ctx.common.async) {
|
|
9649
|
+
return Promise.all(
|
|
9650
|
+
options.map(async (option) => {
|
|
9651
|
+
const childCtx = {
|
|
9652
|
+
...ctx,
|
|
9653
|
+
common: {
|
|
9654
|
+
...ctx.common,
|
|
9655
|
+
issues: []
|
|
9656
|
+
},
|
|
9657
|
+
parent: ctx
|
|
9658
|
+
};
|
|
9659
|
+
return {
|
|
9660
|
+
result: await option._parseAsync({
|
|
9661
|
+
data: ctx.data,
|
|
9662
|
+
path: ctx.path,
|
|
9663
|
+
parent: childCtx
|
|
9664
|
+
}),
|
|
9665
|
+
ctx: childCtx
|
|
9666
|
+
};
|
|
9667
|
+
})
|
|
9668
|
+
).then(handleResults);
|
|
9669
|
+
}
|
|
9670
|
+
let dirty = void 0;
|
|
9671
|
+
const issues = [];
|
|
9672
|
+
for (const option of options) {
|
|
9673
|
+
const childCtx = {
|
|
9674
|
+
...ctx,
|
|
9675
|
+
common: {
|
|
9676
|
+
...ctx.common,
|
|
9677
|
+
issues: []
|
|
9678
|
+
},
|
|
9679
|
+
parent: ctx
|
|
9680
|
+
};
|
|
9681
|
+
const result2 = option._parseSync({
|
|
9682
|
+
data: ctx.data,
|
|
9683
|
+
path: ctx.path,
|
|
9684
|
+
parent: childCtx
|
|
9685
|
+
});
|
|
9686
|
+
if (result2.status === "valid") {
|
|
9687
|
+
return result2;
|
|
9688
|
+
}
|
|
9689
|
+
if (result2.status === "dirty" && !dirty) {
|
|
9690
|
+
dirty = { result: result2, ctx: childCtx };
|
|
9691
|
+
}
|
|
9692
|
+
if (childCtx.common.issues.length) {
|
|
9693
|
+
issues.push(childCtx.common.issues);
|
|
9694
|
+
}
|
|
9695
|
+
}
|
|
9696
|
+
if (dirty) {
|
|
9697
|
+
ctx.common.issues.push(...dirty.ctx.common.issues);
|
|
9698
|
+
return dirty.result;
|
|
9699
|
+
}
|
|
9700
|
+
const unionErrors = issues.map((issues2) => new import_zod.ZodError(issues2));
|
|
9701
|
+
(0, import_zod.addIssueToContext)(ctx, {
|
|
9702
|
+
code: import_zod.ZodIssueCode.invalid_union,
|
|
9703
|
+
unionErrors
|
|
9704
|
+
});
|
|
9705
|
+
return import_zod.INVALID;
|
|
9706
|
+
}
|
|
9707
|
+
};
|
|
9708
|
+
_RspackZodUnion.create = (types, params) => {
|
|
9709
|
+
return new _RspackZodUnion({
|
|
9710
|
+
options: types,
|
|
9711
|
+
typeName: import_zod.ZodFirstPartyTypeKind.ZodUnion,
|
|
9712
|
+
...processCreateParams(params)
|
|
9713
|
+
});
|
|
9714
|
+
};
|
|
9715
|
+
var RspackZodUnion = _RspackZodUnion;
|
|
9716
|
+
import_zod.ZodUnion.create = RspackZodUnion.create;
|
|
9717
|
+
var ZodRspackCrossChecker = class extends import_zod.ZodType {
|
|
9718
|
+
constructor(params) {
|
|
9719
|
+
super(params);
|
|
9720
|
+
this.params = params;
|
|
9721
|
+
}
|
|
9722
|
+
_parse(input) {
|
|
9723
|
+
const ctx = this._getOrReturnCtx(input);
|
|
9724
|
+
const root = this._getRootData(ctx);
|
|
9725
|
+
for (const pattern of this.params.patterns) {
|
|
9726
|
+
if (pattern.test(root)) {
|
|
9727
|
+
const res = pattern.type._parse(input);
|
|
9728
|
+
const issues = typeof pattern.issue === "function" ? pattern.issue(res) : [];
|
|
9729
|
+
for (const issue of issues) {
|
|
9730
|
+
(0, import_zod.addIssueToContext)(ctx, issue);
|
|
9731
|
+
}
|
|
9732
|
+
return res;
|
|
9733
|
+
}
|
|
9734
|
+
}
|
|
9735
|
+
return this.params.default._parse(input);
|
|
9736
|
+
}
|
|
9737
|
+
_getRootData(ctx) {
|
|
9738
|
+
let root = ctx;
|
|
9739
|
+
while (root.parent) {
|
|
9740
|
+
root = root.parent;
|
|
9741
|
+
}
|
|
9742
|
+
return root.data;
|
|
9743
|
+
}
|
|
9744
|
+
};
|
|
9745
|
+
|
|
9746
|
+
// src/config/zod.ts
|
|
9747
|
+
var filenameTemplate = import_zod2.z.string();
|
|
9365
9748
|
var filename = filenameTemplate.or(
|
|
9366
|
-
|
|
9749
|
+
import_zod2.z.function().args(import_zod2.z.custom(), import_zod2.z.custom().optional()).returns(import_zod2.z.string())
|
|
9367
9750
|
);
|
|
9368
|
-
var name =
|
|
9369
|
-
var dependencies =
|
|
9370
|
-
var context =
|
|
9751
|
+
var name = import_zod2.z.string();
|
|
9752
|
+
var dependencies = import_zod2.z.array(name);
|
|
9753
|
+
var context = import_zod2.z.string().refine(
|
|
9371
9754
|
(val) => import_node_path7.default.isAbsolute(val),
|
|
9372
9755
|
(val) => ({
|
|
9373
9756
|
message: `The provided value ${JSON.stringify(val)} must be an absolute path.`
|
|
9374
9757
|
})
|
|
9375
9758
|
);
|
|
9376
|
-
var mode =
|
|
9759
|
+
var mode = import_zod2.z.enum([
|
|
9377
9760
|
"development",
|
|
9378
9761
|
"production",
|
|
9379
9762
|
"none"
|
|
9380
9763
|
]);
|
|
9381
|
-
var falsy =
|
|
9382
|
-
|
|
9383
|
-
|
|
9384
|
-
|
|
9385
|
-
|
|
9386
|
-
|
|
9764
|
+
var falsy = import_zod2.z.union([
|
|
9765
|
+
import_zod2.z.literal(false),
|
|
9766
|
+
import_zod2.z.literal(0),
|
|
9767
|
+
import_zod2.z.literal(""),
|
|
9768
|
+
import_zod2.z.null(),
|
|
9769
|
+
import_zod2.z.undefined()
|
|
9387
9770
|
]);
|
|
9388
|
-
var publicPath =
|
|
9389
|
-
var baseUri =
|
|
9390
|
-
var chunkLoadingType =
|
|
9391
|
-
var chunkLoading =
|
|
9392
|
-
var asyncChunks =
|
|
9393
|
-
var wasmLoadingType =
|
|
9394
|
-
var wasmLoading =
|
|
9395
|
-
var scriptType =
|
|
9396
|
-
var libraryCustomUmdObject =
|
|
9397
|
-
amd:
|
|
9398
|
-
commonjs:
|
|
9399
|
-
root:
|
|
9771
|
+
var publicPath = import_zod2.z.literal("auto").or(filename);
|
|
9772
|
+
var baseUri = import_zod2.z.string();
|
|
9773
|
+
var chunkLoadingType = import_zod2.z.enum(["jsonp", "import-scripts", "require", "async-node", "import"]).or(import_zod2.z.string());
|
|
9774
|
+
var chunkLoading = import_zod2.z.literal(false).or(chunkLoadingType);
|
|
9775
|
+
var asyncChunks = import_zod2.z.boolean();
|
|
9776
|
+
var wasmLoadingType = import_zod2.z.enum(["fetch-streaming", "fetch", "async-node"]).or(import_zod2.z.string());
|
|
9777
|
+
var wasmLoading = import_zod2.z.literal(false).or(wasmLoadingType);
|
|
9778
|
+
var scriptType = import_zod2.z.enum(["text/javascript", "module"]).or(import_zod2.z.literal(false));
|
|
9779
|
+
var libraryCustomUmdObject = import_zod2.z.strictObject({
|
|
9780
|
+
amd: import_zod2.z.string().optional(),
|
|
9781
|
+
commonjs: import_zod2.z.string().optional(),
|
|
9782
|
+
root: import_zod2.z.string().or(import_zod2.z.array(import_zod2.z.string())).optional()
|
|
9400
9783
|
});
|
|
9401
|
-
var libraryName =
|
|
9402
|
-
var libraryCustomUmdCommentObject =
|
|
9403
|
-
amd:
|
|
9404
|
-
commonjs:
|
|
9405
|
-
commonjs2:
|
|
9406
|
-
root:
|
|
9784
|
+
var libraryName = import_zod2.z.string().or(import_zod2.z.array(import_zod2.z.string())).or(libraryCustomUmdObject);
|
|
9785
|
+
var libraryCustomUmdCommentObject = import_zod2.z.strictObject({
|
|
9786
|
+
amd: import_zod2.z.string().optional(),
|
|
9787
|
+
commonjs: import_zod2.z.string().optional(),
|
|
9788
|
+
commonjs2: import_zod2.z.string().optional(),
|
|
9789
|
+
root: import_zod2.z.string().optional()
|
|
9407
9790
|
});
|
|
9408
|
-
var amdContainer =
|
|
9409
|
-
var auxiliaryComment =
|
|
9410
|
-
var libraryExport =
|
|
9411
|
-
var libraryType =
|
|
9791
|
+
var amdContainer = import_zod2.z.string();
|
|
9792
|
+
var auxiliaryComment = import_zod2.z.string().or(libraryCustomUmdCommentObject);
|
|
9793
|
+
var libraryExport = import_zod2.z.string().or(import_zod2.z.array(import_zod2.z.string()));
|
|
9794
|
+
var libraryType = import_zod2.z.enum([
|
|
9412
9795
|
"var",
|
|
9413
9796
|
"module",
|
|
9414
9797
|
"assign",
|
|
@@ -9427,9 +9810,9 @@ var libraryType = import_zod.z.enum([
|
|
|
9427
9810
|
"umd2",
|
|
9428
9811
|
"jsonp",
|
|
9429
9812
|
"system"
|
|
9430
|
-
]).or(
|
|
9431
|
-
var umdNamedDefine =
|
|
9432
|
-
var libraryOptions =
|
|
9813
|
+
]).or(import_zod2.z.string());
|
|
9814
|
+
var umdNamedDefine = import_zod2.z.boolean();
|
|
9815
|
+
var libraryOptions = import_zod2.z.strictObject({
|
|
9433
9816
|
amdContainer: amdContainer.optional(),
|
|
9434
9817
|
auxiliaryComment: auxiliaryComment.optional(),
|
|
9435
9818
|
export: libraryExport.optional(),
|
|
@@ -9438,12 +9821,12 @@ var libraryOptions = import_zod.z.strictObject({
|
|
|
9438
9821
|
umdNamedDefine: umdNamedDefine.optional()
|
|
9439
9822
|
});
|
|
9440
9823
|
var library = libraryName.or(libraryOptions).optional();
|
|
9441
|
-
var layer =
|
|
9824
|
+
var layer = import_zod2.z.string().or(import_zod2.z.null());
|
|
9442
9825
|
var entryFilename = filename;
|
|
9443
|
-
var entryRuntime =
|
|
9444
|
-
var entryItem =
|
|
9445
|
-
var entryDependOn =
|
|
9446
|
-
var entryDescription =
|
|
9826
|
+
var entryRuntime = import_zod2.z.literal(false).or(import_zod2.z.string());
|
|
9827
|
+
var entryItem = import_zod2.z.string().or(import_zod2.z.array(import_zod2.z.string()));
|
|
9828
|
+
var entryDependOn = import_zod2.z.string().or(import_zod2.z.array(import_zod2.z.string()));
|
|
9829
|
+
var entryDescription = import_zod2.z.strictObject({
|
|
9447
9830
|
import: entryItem,
|
|
9448
9831
|
runtime: entryRuntime.optional(),
|
|
9449
9832
|
publicPath: publicPath.optional(),
|
|
@@ -9457,84 +9840,84 @@ var entryDescription = import_zod.z.strictObject({
|
|
|
9457
9840
|
layer: layer.optional()
|
|
9458
9841
|
});
|
|
9459
9842
|
var entryUnnamed = entryItem;
|
|
9460
|
-
var entryObject =
|
|
9843
|
+
var entryObject = import_zod2.z.record(
|
|
9461
9844
|
entryItem.or(entryDescription)
|
|
9462
9845
|
);
|
|
9463
9846
|
var entryStatic = entryObject.or(
|
|
9464
9847
|
entryUnnamed
|
|
9465
9848
|
);
|
|
9466
|
-
var entryDynamic =
|
|
9467
|
-
entryStatic.or(
|
|
9849
|
+
var entryDynamic = import_zod2.z.function().returns(
|
|
9850
|
+
entryStatic.or(import_zod2.z.promise(entryStatic))
|
|
9468
9851
|
);
|
|
9469
9852
|
var entry = entryStatic.or(entryDynamic);
|
|
9470
|
-
var path6 =
|
|
9471
|
-
var pathinfo =
|
|
9853
|
+
var path6 = import_zod2.z.string();
|
|
9854
|
+
var pathinfo = import_zod2.z.boolean().or(import_zod2.z.literal("verbose"));
|
|
9472
9855
|
var assetModuleFilename = filename;
|
|
9473
|
-
var webassemblyModuleFilename =
|
|
9856
|
+
var webassemblyModuleFilename = import_zod2.z.string();
|
|
9474
9857
|
var chunkFilename = filename;
|
|
9475
|
-
var crossOriginLoading =
|
|
9476
|
-
|
|
9858
|
+
var crossOriginLoading = import_zod2.z.literal(false).or(
|
|
9859
|
+
import_zod2.z.enum(["anonymous", "use-credentials"])
|
|
9477
9860
|
);
|
|
9478
9861
|
var cssFilename = filename;
|
|
9479
9862
|
var cssChunkFilename = filename;
|
|
9480
9863
|
var hotUpdateChunkFilename = filenameTemplate;
|
|
9481
9864
|
var hotUpdateMainFilename = filenameTemplate;
|
|
9482
|
-
var hotUpdateGlobal =
|
|
9483
|
-
var uniqueName =
|
|
9484
|
-
var chunkLoadingGlobal =
|
|
9485
|
-
var enabledLibraryTypes =
|
|
9865
|
+
var hotUpdateGlobal = import_zod2.z.string();
|
|
9866
|
+
var uniqueName = import_zod2.z.string();
|
|
9867
|
+
var chunkLoadingGlobal = import_zod2.z.string();
|
|
9868
|
+
var enabledLibraryTypes = import_zod2.z.array(
|
|
9486
9869
|
libraryType
|
|
9487
9870
|
);
|
|
9488
|
-
var clean =
|
|
9489
|
-
var outputModule =
|
|
9490
|
-
var strictModuleExceptionHandling =
|
|
9491
|
-
var strictModuleErrorHandling =
|
|
9492
|
-
var globalObject =
|
|
9493
|
-
var enabledWasmLoadingTypes =
|
|
9871
|
+
var clean = import_zod2.z.boolean();
|
|
9872
|
+
var outputModule = import_zod2.z.boolean();
|
|
9873
|
+
var strictModuleExceptionHandling = import_zod2.z.boolean();
|
|
9874
|
+
var strictModuleErrorHandling = import_zod2.z.boolean();
|
|
9875
|
+
var globalObject = import_zod2.z.string();
|
|
9876
|
+
var enabledWasmLoadingTypes = import_zod2.z.array(
|
|
9494
9877
|
wasmLoadingType
|
|
9495
9878
|
);
|
|
9496
|
-
var importFunctionName =
|
|
9497
|
-
var importMetaName =
|
|
9498
|
-
var iife =
|
|
9499
|
-
var enabledChunkLoadingTypes =
|
|
9879
|
+
var importFunctionName = import_zod2.z.string();
|
|
9880
|
+
var importMetaName = import_zod2.z.string();
|
|
9881
|
+
var iife = import_zod2.z.boolean();
|
|
9882
|
+
var enabledChunkLoadingTypes = import_zod2.z.array(
|
|
9500
9883
|
chunkLoadingType
|
|
9501
9884
|
);
|
|
9502
|
-
var chunkFormat =
|
|
9503
|
-
var workerPublicPath =
|
|
9504
|
-
var trustedTypes =
|
|
9505
|
-
policyName:
|
|
9885
|
+
var chunkFormat = import_zod2.z.literal(false).or(import_zod2.z.string());
|
|
9886
|
+
var workerPublicPath = import_zod2.z.string();
|
|
9887
|
+
var trustedTypes = import_zod2.z.strictObject({
|
|
9888
|
+
policyName: import_zod2.z.string().optional()
|
|
9506
9889
|
});
|
|
9507
|
-
var hashDigest =
|
|
9508
|
-
var hashDigestLength =
|
|
9509
|
-
var hashFunction =
|
|
9890
|
+
var hashDigest = import_zod2.z.string();
|
|
9891
|
+
var hashDigestLength = import_zod2.z.number();
|
|
9892
|
+
var hashFunction = import_zod2.z.enum([
|
|
9510
9893
|
"md4",
|
|
9511
9894
|
"xxhash64"
|
|
9512
9895
|
]);
|
|
9513
|
-
var hashSalt =
|
|
9514
|
-
var sourceMapFilename =
|
|
9515
|
-
var devtoolNamespace =
|
|
9516
|
-
var devtoolModuleFilenameTemplate =
|
|
9517
|
-
|
|
9518
|
-
|
|
9896
|
+
var hashSalt = import_zod2.z.string();
|
|
9897
|
+
var sourceMapFilename = import_zod2.z.string();
|
|
9898
|
+
var devtoolNamespace = import_zod2.z.string();
|
|
9899
|
+
var devtoolModuleFilenameTemplate = import_zod2.z.union([
|
|
9900
|
+
import_zod2.z.string(),
|
|
9901
|
+
import_zod2.z.function(import_zod2.z.tuple([import_zod2.z.any()]), import_zod2.z.any())
|
|
9519
9902
|
]);
|
|
9520
9903
|
var devtoolFallbackModuleFilenameTemplate = devtoolModuleFilenameTemplate;
|
|
9521
|
-
var environment =
|
|
9522
|
-
arrowFunction:
|
|
9523
|
-
asyncFunction:
|
|
9524
|
-
bigIntLiteral:
|
|
9525
|
-
const:
|
|
9526
|
-
destructuring:
|
|
9527
|
-
document:
|
|
9528
|
-
dynamicImport:
|
|
9529
|
-
dynamicImportInWorker:
|
|
9530
|
-
forOf:
|
|
9531
|
-
globalThis:
|
|
9532
|
-
module:
|
|
9533
|
-
nodePrefixForCoreModules:
|
|
9534
|
-
optionalChaining:
|
|
9535
|
-
templateLiteral:
|
|
9904
|
+
var environment = import_zod2.z.strictObject({
|
|
9905
|
+
arrowFunction: import_zod2.z.boolean().optional(),
|
|
9906
|
+
asyncFunction: import_zod2.z.boolean().optional(),
|
|
9907
|
+
bigIntLiteral: import_zod2.z.boolean().optional(),
|
|
9908
|
+
const: import_zod2.z.boolean().optional(),
|
|
9909
|
+
destructuring: import_zod2.z.boolean().optional(),
|
|
9910
|
+
document: import_zod2.z.boolean().optional(),
|
|
9911
|
+
dynamicImport: import_zod2.z.boolean().optional(),
|
|
9912
|
+
dynamicImportInWorker: import_zod2.z.boolean().optional(),
|
|
9913
|
+
forOf: import_zod2.z.boolean().optional(),
|
|
9914
|
+
globalThis: import_zod2.z.boolean().optional(),
|
|
9915
|
+
module: import_zod2.z.boolean().optional(),
|
|
9916
|
+
nodePrefixForCoreModules: import_zod2.z.boolean().optional(),
|
|
9917
|
+
optionalChaining: import_zod2.z.boolean().optional(),
|
|
9918
|
+
templateLiteral: import_zod2.z.boolean().optional()
|
|
9536
9919
|
});
|
|
9537
|
-
var output =
|
|
9920
|
+
var output = import_zod2.z.strictObject({
|
|
9538
9921
|
path: path6.optional(),
|
|
9539
9922
|
pathinfo: pathinfo.optional(),
|
|
9540
9923
|
clean: clean.optional(),
|
|
@@ -9543,7 +9926,7 @@ var output = import_zod.z.strictObject({
|
|
|
9543
9926
|
chunkFilename: chunkFilename.optional(),
|
|
9544
9927
|
crossOriginLoading: crossOriginLoading.optional(),
|
|
9545
9928
|
cssFilename: cssFilename.optional(),
|
|
9546
|
-
cssHeadDataCompression:
|
|
9929
|
+
cssHeadDataCompression: import_zod2.z.boolean().optional(),
|
|
9547
9930
|
cssChunkFilename: cssChunkFilename.optional(),
|
|
9548
9931
|
hotUpdateMainFilename: hotUpdateMainFilename.optional(),
|
|
9549
9932
|
hotUpdateChunkFilename: hotUpdateChunkFilename.optional(),
|
|
@@ -9570,7 +9953,7 @@ var output = import_zod.z.strictObject({
|
|
|
9570
9953
|
chunkFormat: chunkFormat.optional(),
|
|
9571
9954
|
chunkLoading: chunkLoading.optional(),
|
|
9572
9955
|
enabledChunkLoadingTypes: enabledChunkLoadingTypes.optional(),
|
|
9573
|
-
trustedTypes:
|
|
9956
|
+
trustedTypes: import_zod2.z.literal(true).or(import_zod2.z.string()).or(trustedTypes).optional(),
|
|
9574
9957
|
sourceMapFilename: sourceMapFilename.optional(),
|
|
9575
9958
|
hashDigest: hashDigest.optional(),
|
|
9576
9959
|
hashDigestLength: hashDigestLength.optional(),
|
|
@@ -9584,60 +9967,60 @@ var output = import_zod.z.strictObject({
|
|
|
9584
9967
|
devtoolNamespace: devtoolNamespace.optional(),
|
|
9585
9968
|
devtoolModuleFilenameTemplate: devtoolModuleFilenameTemplate.optional(),
|
|
9586
9969
|
devtoolFallbackModuleFilenameTemplate: devtoolFallbackModuleFilenameTemplate.optional(),
|
|
9587
|
-
chunkLoadTimeout:
|
|
9588
|
-
charset:
|
|
9970
|
+
chunkLoadTimeout: import_zod2.z.number().optional(),
|
|
9971
|
+
charset: import_zod2.z.boolean().optional(),
|
|
9589
9972
|
environment: environment.optional(),
|
|
9590
|
-
compareBeforeEmit:
|
|
9973
|
+
compareBeforeEmit: import_zod2.z.boolean().optional()
|
|
9591
9974
|
});
|
|
9592
|
-
var resolveAlias =
|
|
9593
|
-
|
|
9975
|
+
var resolveAlias = import_zod2.z.record(
|
|
9976
|
+
import_zod2.z.literal(false).or(import_zod2.z.string()).or(import_zod2.z.array(import_zod2.z.string().or(import_zod2.z.literal(false))))
|
|
9594
9977
|
);
|
|
9595
|
-
var resolveTsConfigFile =
|
|
9978
|
+
var resolveTsConfigFile = import_zod2.z.string();
|
|
9596
9979
|
var resolveTsConfig = resolveTsConfigFile.or(
|
|
9597
|
-
|
|
9980
|
+
import_zod2.z.strictObject({
|
|
9598
9981
|
configFile: resolveTsConfigFile,
|
|
9599
|
-
references:
|
|
9982
|
+
references: import_zod2.z.array(import_zod2.z.string()).or(import_zod2.z.literal("auto")).optional()
|
|
9600
9983
|
})
|
|
9601
9984
|
);
|
|
9602
|
-
var baseResolveOptions =
|
|
9985
|
+
var baseResolveOptions = import_zod2.z.strictObject({
|
|
9603
9986
|
alias: resolveAlias.optional(),
|
|
9604
|
-
conditionNames:
|
|
9605
|
-
extensions:
|
|
9987
|
+
conditionNames: import_zod2.z.array(import_zod2.z.string()).optional(),
|
|
9988
|
+
extensions: import_zod2.z.array(import_zod2.z.string()).optional(),
|
|
9606
9989
|
fallback: resolveAlias.optional(),
|
|
9607
|
-
mainFields:
|
|
9608
|
-
mainFiles:
|
|
9609
|
-
modules:
|
|
9610
|
-
preferRelative:
|
|
9611
|
-
preferAbsolute:
|
|
9612
|
-
symlinks:
|
|
9613
|
-
enforceExtension:
|
|
9614
|
-
importsFields:
|
|
9615
|
-
descriptionFiles:
|
|
9990
|
+
mainFields: import_zod2.z.array(import_zod2.z.string()).optional(),
|
|
9991
|
+
mainFiles: import_zod2.z.array(import_zod2.z.string()).optional(),
|
|
9992
|
+
modules: import_zod2.z.array(import_zod2.z.string()).optional(),
|
|
9993
|
+
preferRelative: import_zod2.z.boolean().optional(),
|
|
9994
|
+
preferAbsolute: import_zod2.z.boolean().optional(),
|
|
9995
|
+
symlinks: import_zod2.z.boolean().optional(),
|
|
9996
|
+
enforceExtension: import_zod2.z.boolean().optional(),
|
|
9997
|
+
importsFields: import_zod2.z.array(import_zod2.z.string()).optional(),
|
|
9998
|
+
descriptionFiles: import_zod2.z.array(import_zod2.z.string()).optional(),
|
|
9616
9999
|
tsConfig: resolveTsConfig.optional(),
|
|
9617
|
-
fullySpecified:
|
|
9618
|
-
exportsFields:
|
|
9619
|
-
extensionAlias:
|
|
9620
|
-
aliasFields:
|
|
9621
|
-
restrictions:
|
|
9622
|
-
roots:
|
|
10000
|
+
fullySpecified: import_zod2.z.boolean().optional(),
|
|
10001
|
+
exportsFields: import_zod2.z.array(import_zod2.z.string()).optional(),
|
|
10002
|
+
extensionAlias: import_zod2.z.record(import_zod2.z.string().or(import_zod2.z.array(import_zod2.z.string()))).optional(),
|
|
10003
|
+
aliasFields: import_zod2.z.array(import_zod2.z.string()).optional(),
|
|
10004
|
+
restrictions: import_zod2.z.array(import_zod2.z.string()).optional(),
|
|
10005
|
+
roots: import_zod2.z.array(import_zod2.z.string()).optional()
|
|
9623
10006
|
});
|
|
9624
10007
|
var resolveOptions = baseResolveOptions.extend({
|
|
9625
|
-
byDependency:
|
|
10008
|
+
byDependency: import_zod2.z.lazy(() => import_zod2.z.record(resolveOptions)).optional()
|
|
9626
10009
|
});
|
|
9627
|
-
var baseRuleSetCondition =
|
|
9628
|
-
var ruleSetCondition = baseRuleSetCondition.or(
|
|
9629
|
-
var ruleSetConditions =
|
|
9630
|
-
() =>
|
|
10010
|
+
var baseRuleSetCondition = import_zod2.z.instanceof(RegExp).or(import_zod2.z.string()).or(import_zod2.z.function().args(import_zod2.z.string()).returns(import_zod2.z.boolean()));
|
|
10011
|
+
var ruleSetCondition = baseRuleSetCondition.or(import_zod2.z.lazy(() => ruleSetConditions)).or(import_zod2.z.lazy(() => ruleSetLogicalConditions));
|
|
10012
|
+
var ruleSetConditions = import_zod2.z.lazy(
|
|
10013
|
+
() => import_zod2.z.array(ruleSetCondition)
|
|
9631
10014
|
);
|
|
9632
|
-
var ruleSetLogicalConditions =
|
|
10015
|
+
var ruleSetLogicalConditions = import_zod2.z.strictObject({
|
|
9633
10016
|
and: ruleSetConditions.optional(),
|
|
9634
10017
|
or: ruleSetConditions.optional(),
|
|
9635
10018
|
not: ruleSetCondition.optional()
|
|
9636
10019
|
});
|
|
9637
|
-
var ruleSetLoader =
|
|
9638
|
-
var ruleSetLoaderOptions =
|
|
9639
|
-
var ruleSetLoaderWithOptions =
|
|
9640
|
-
ident:
|
|
10020
|
+
var ruleSetLoader = import_zod2.z.string();
|
|
10021
|
+
var ruleSetLoaderOptions = import_zod2.z.string().or(import_zod2.z.record(import_zod2.z.any()));
|
|
10022
|
+
var ruleSetLoaderWithOptions = import_zod2.z.strictObject({
|
|
10023
|
+
ident: import_zod2.z.string().optional(),
|
|
9641
10024
|
loader: ruleSetLoader,
|
|
9642
10025
|
options: ruleSetLoaderOptions.optional()
|
|
9643
10026
|
});
|
|
@@ -9645,9 +10028,9 @@ var ruleSetUseItem = ruleSetLoader.or(
|
|
|
9645
10028
|
ruleSetLoaderWithOptions
|
|
9646
10029
|
);
|
|
9647
10030
|
var ruleSetUse = ruleSetUseItem.or(ruleSetUseItem.array()).or(
|
|
9648
|
-
|
|
10031
|
+
import_zod2.z.function().args(import_zod2.z.custom()).returns(ruleSetUseItem.array())
|
|
9649
10032
|
);
|
|
9650
|
-
var baseRuleSetRule =
|
|
10033
|
+
var baseRuleSetRule = import_zod2.z.strictObject({
|
|
9651
10034
|
test: ruleSetCondition.optional(),
|
|
9652
10035
|
exclude: ruleSetCondition.optional(),
|
|
9653
10036
|
include: ruleSetCondition.optional(),
|
|
@@ -9659,67 +10042,67 @@ var baseRuleSetRule = import_zod.z.strictObject({
|
|
|
9659
10042
|
resourceQuery: ruleSetCondition.optional(),
|
|
9660
10043
|
scheme: ruleSetCondition.optional(),
|
|
9661
10044
|
mimetype: ruleSetCondition.optional(),
|
|
9662
|
-
descriptionData:
|
|
9663
|
-
with:
|
|
9664
|
-
type:
|
|
9665
|
-
layer:
|
|
10045
|
+
descriptionData: import_zod2.z.record(ruleSetCondition).optional(),
|
|
10046
|
+
with: import_zod2.z.record(ruleSetCondition).optional(),
|
|
10047
|
+
type: import_zod2.z.string().optional(),
|
|
10048
|
+
layer: import_zod2.z.string().optional(),
|
|
9666
10049
|
loader: ruleSetLoader.optional(),
|
|
9667
10050
|
options: ruleSetLoaderOptions.optional(),
|
|
9668
10051
|
use: ruleSetUse.optional(),
|
|
9669
|
-
parser:
|
|
9670
|
-
generator:
|
|
10052
|
+
parser: import_zod2.z.record(import_zod2.z.any()).optional(),
|
|
10053
|
+
generator: import_zod2.z.record(import_zod2.z.any()).optional(),
|
|
9671
10054
|
resolve: resolveOptions.optional(),
|
|
9672
|
-
sideEffects:
|
|
9673
|
-
enforce:
|
|
10055
|
+
sideEffects: import_zod2.z.boolean().optional(),
|
|
10056
|
+
enforce: import_zod2.z.literal("pre").or(import_zod2.z.literal("post")).optional()
|
|
9674
10057
|
});
|
|
9675
10058
|
var ruleSetRule = baseRuleSetRule.extend({
|
|
9676
|
-
oneOf:
|
|
9677
|
-
rules:
|
|
10059
|
+
oneOf: import_zod2.z.lazy(() => ruleSetRule.or(falsy).array()).optional(),
|
|
10060
|
+
rules: import_zod2.z.lazy(() => ruleSetRule.or(falsy).array()).optional()
|
|
9678
10061
|
});
|
|
9679
|
-
var ruleSetRules =
|
|
9680
|
-
|
|
10062
|
+
var ruleSetRules = import_zod2.z.array(
|
|
10063
|
+
import_zod2.z.literal("...").or(ruleSetRule).or(falsy)
|
|
9681
10064
|
);
|
|
9682
|
-
var assetParserDataUrlOptions =
|
|
9683
|
-
maxSize:
|
|
10065
|
+
var assetParserDataUrlOptions = import_zod2.z.strictObject({
|
|
10066
|
+
maxSize: import_zod2.z.number().optional()
|
|
9684
10067
|
});
|
|
9685
10068
|
var assetParserDataUrl = assetParserDataUrlOptions;
|
|
9686
|
-
var assetParserOptions =
|
|
10069
|
+
var assetParserOptions = import_zod2.z.strictObject({
|
|
9687
10070
|
dataUrlCondition: assetParserDataUrl.optional()
|
|
9688
10071
|
});
|
|
9689
|
-
var cssParserNamedExports =
|
|
9690
|
-
var cssParserOptions =
|
|
10072
|
+
var cssParserNamedExports = import_zod2.z.boolean();
|
|
10073
|
+
var cssParserOptions = import_zod2.z.strictObject({
|
|
9691
10074
|
namedExports: cssParserNamedExports.optional()
|
|
9692
10075
|
});
|
|
9693
|
-
var cssAutoParserOptions =
|
|
10076
|
+
var cssAutoParserOptions = import_zod2.z.strictObject({
|
|
9694
10077
|
namedExports: cssParserNamedExports.optional()
|
|
9695
10078
|
});
|
|
9696
|
-
var cssModuleParserOptions =
|
|
10079
|
+
var cssModuleParserOptions = import_zod2.z.strictObject({
|
|
9697
10080
|
namedExports: cssParserNamedExports.optional()
|
|
9698
10081
|
});
|
|
9699
|
-
var dynamicImportMode =
|
|
9700
|
-
var dynamicImportPreload =
|
|
9701
|
-
var dynamicImportPrefetch =
|
|
9702
|
-
var dynamicImportFetchPriority =
|
|
9703
|
-
var javascriptParserUrl =
|
|
9704
|
-
var exprContextCritical =
|
|
9705
|
-
var wrappedContextCritical =
|
|
9706
|
-
var wrappedContextRegExp =
|
|
9707
|
-
var exportsPresence =
|
|
9708
|
-
var importExportsPresence =
|
|
9709
|
-
var reexportExportsPresence =
|
|
9710
|
-
var strictExportPresence =
|
|
9711
|
-
var worker =
|
|
9712
|
-
var overrideStrict =
|
|
9713
|
-
var requireAsExpression =
|
|
9714
|
-
var requireDynamic =
|
|
9715
|
-
var requireResolve =
|
|
9716
|
-
var importDynamic =
|
|
9717
|
-
var javascriptParserOptions =
|
|
10082
|
+
var dynamicImportMode = import_zod2.z.enum(["eager", "lazy", "weak", "lazy-once"]);
|
|
10083
|
+
var dynamicImportPreload = import_zod2.z.union([import_zod2.z.boolean(), import_zod2.z.number()]);
|
|
10084
|
+
var dynamicImportPrefetch = import_zod2.z.union([import_zod2.z.boolean(), import_zod2.z.number()]);
|
|
10085
|
+
var dynamicImportFetchPriority = import_zod2.z.enum(["low", "high", "auto"]);
|
|
10086
|
+
var javascriptParserUrl = import_zod2.z.union([import_zod2.z.literal("relative"), import_zod2.z.boolean()]);
|
|
10087
|
+
var exprContextCritical = import_zod2.z.boolean();
|
|
10088
|
+
var wrappedContextCritical = import_zod2.z.boolean();
|
|
10089
|
+
var wrappedContextRegExp = import_zod2.z.instanceof(RegExp);
|
|
10090
|
+
var exportsPresence = import_zod2.z.enum(["error", "warn", "auto"]).or(import_zod2.z.literal(false));
|
|
10091
|
+
var importExportsPresence = import_zod2.z.enum(["error", "warn", "auto"]).or(import_zod2.z.literal(false));
|
|
10092
|
+
var reexportExportsPresence = import_zod2.z.enum(["error", "warn", "auto"]).or(import_zod2.z.literal(false));
|
|
10093
|
+
var strictExportPresence = import_zod2.z.boolean();
|
|
10094
|
+
var worker = import_zod2.z.array(import_zod2.z.string()).or(import_zod2.z.boolean());
|
|
10095
|
+
var overrideStrict = import_zod2.z.enum(["strict", "non-strict"]);
|
|
10096
|
+
var requireAsExpression = import_zod2.z.boolean();
|
|
10097
|
+
var requireDynamic = import_zod2.z.boolean();
|
|
10098
|
+
var requireResolve = import_zod2.z.boolean();
|
|
10099
|
+
var importDynamic = import_zod2.z.boolean();
|
|
10100
|
+
var javascriptParserOptions = import_zod2.z.strictObject({
|
|
9718
10101
|
dynamicImportMode: dynamicImportMode.optional(),
|
|
9719
10102
|
dynamicImportPreload: dynamicImportPreload.optional(),
|
|
9720
10103
|
dynamicImportPrefetch: dynamicImportPrefetch.optional(),
|
|
9721
10104
|
dynamicImportFetchPriority: dynamicImportFetchPriority.optional(),
|
|
9722
|
-
importMeta:
|
|
10105
|
+
importMeta: import_zod2.z.boolean().optional(),
|
|
9723
10106
|
url: javascriptParserUrl.optional(),
|
|
9724
10107
|
exprContextCritical: exprContextCritical.optional(),
|
|
9725
10108
|
wrappedContextCritical: wrappedContextCritical.optional(),
|
|
@@ -9737,7 +10120,7 @@ var javascriptParserOptions = import_zod.z.strictObject({
|
|
|
9737
10120
|
importDynamic: importDynamic.optional()
|
|
9738
10121
|
// #endregion
|
|
9739
10122
|
});
|
|
9740
|
-
var parserOptionsByModuleTypeKnown =
|
|
10123
|
+
var parserOptionsByModuleTypeKnown = import_zod2.z.strictObject({
|
|
9741
10124
|
asset: assetParserOptions.optional(),
|
|
9742
10125
|
css: cssParserOptions.optional(),
|
|
9743
10126
|
"css/auto": cssAutoParserOptions.optional(),
|
|
@@ -9747,63 +10130,63 @@ var parserOptionsByModuleTypeKnown = import_zod.z.strictObject({
|
|
|
9747
10130
|
"javascript/dynamic": javascriptParserOptions.optional(),
|
|
9748
10131
|
"javascript/esm": javascriptParserOptions.optional()
|
|
9749
10132
|
});
|
|
9750
|
-
var parserOptionsByModuleTypeUnknown =
|
|
9751
|
-
|
|
10133
|
+
var parserOptionsByModuleTypeUnknown = import_zod2.z.record(
|
|
10134
|
+
import_zod2.z.record(import_zod2.z.any())
|
|
9752
10135
|
);
|
|
9753
10136
|
var parserOptionsByModuleType = parserOptionsByModuleTypeKnown.or(
|
|
9754
10137
|
parserOptionsByModuleTypeUnknown
|
|
9755
10138
|
);
|
|
9756
|
-
var assetGeneratorDataUrlOptions =
|
|
9757
|
-
encoding:
|
|
9758
|
-
mimetype:
|
|
10139
|
+
var assetGeneratorDataUrlOptions = import_zod2.z.strictObject({
|
|
10140
|
+
encoding: import_zod2.z.literal(false).or(import_zod2.z.literal("base64")).optional(),
|
|
10141
|
+
mimetype: import_zod2.z.string().optional()
|
|
9759
10142
|
});
|
|
9760
|
-
var assetGeneratorDataUrlFunction =
|
|
9761
|
-
|
|
9762
|
-
content:
|
|
9763
|
-
filename:
|
|
10143
|
+
var assetGeneratorDataUrlFunction = import_zod2.z.function().args(
|
|
10144
|
+
import_zod2.z.strictObject({
|
|
10145
|
+
content: import_zod2.z.string(),
|
|
10146
|
+
filename: import_zod2.z.string()
|
|
9764
10147
|
})
|
|
9765
|
-
).returns(
|
|
10148
|
+
).returns(import_zod2.z.string());
|
|
9766
10149
|
var assetGeneratorDataUrl = assetGeneratorDataUrlOptions.or(
|
|
9767
10150
|
assetGeneratorDataUrlFunction
|
|
9768
10151
|
);
|
|
9769
|
-
var assetInlineGeneratorOptions =
|
|
10152
|
+
var assetInlineGeneratorOptions = import_zod2.z.strictObject({
|
|
9770
10153
|
dataUrl: assetGeneratorDataUrl.optional()
|
|
9771
10154
|
});
|
|
9772
|
-
var assetResourceGeneratorOptions =
|
|
9773
|
-
emit:
|
|
10155
|
+
var assetResourceGeneratorOptions = import_zod2.z.strictObject({
|
|
10156
|
+
emit: import_zod2.z.boolean().optional(),
|
|
9774
10157
|
filename: filename.optional(),
|
|
9775
10158
|
publicPath: publicPath.optional()
|
|
9776
10159
|
});
|
|
9777
10160
|
var assetGeneratorOptions = assetInlineGeneratorOptions.merge(
|
|
9778
10161
|
assetResourceGeneratorOptions
|
|
9779
10162
|
);
|
|
9780
|
-
var cssGeneratorExportsConvention =
|
|
10163
|
+
var cssGeneratorExportsConvention = import_zod2.z.enum([
|
|
9781
10164
|
"as-is",
|
|
9782
10165
|
"camel-case",
|
|
9783
10166
|
"camel-case-only",
|
|
9784
10167
|
"dashes",
|
|
9785
10168
|
"dashes-only"
|
|
9786
10169
|
]);
|
|
9787
|
-
var cssGeneratorExportsOnly =
|
|
9788
|
-
var cssGeneratorLocalIdentName =
|
|
9789
|
-
var cssGeneratorEsModule =
|
|
9790
|
-
var cssGeneratorOptions =
|
|
10170
|
+
var cssGeneratorExportsOnly = import_zod2.z.boolean();
|
|
10171
|
+
var cssGeneratorLocalIdentName = import_zod2.z.string();
|
|
10172
|
+
var cssGeneratorEsModule = import_zod2.z.boolean();
|
|
10173
|
+
var cssGeneratorOptions = import_zod2.z.strictObject({
|
|
9791
10174
|
exportsOnly: cssGeneratorExportsOnly.optional(),
|
|
9792
10175
|
esModule: cssGeneratorEsModule.optional()
|
|
9793
10176
|
});
|
|
9794
|
-
var cssAutoGeneratorOptions =
|
|
10177
|
+
var cssAutoGeneratorOptions = import_zod2.z.strictObject({
|
|
9795
10178
|
exportsConvention: cssGeneratorExportsConvention.optional(),
|
|
9796
10179
|
exportsOnly: cssGeneratorExportsOnly.optional(),
|
|
9797
10180
|
localIdentName: cssGeneratorLocalIdentName.optional(),
|
|
9798
10181
|
esModule: cssGeneratorEsModule.optional()
|
|
9799
10182
|
});
|
|
9800
|
-
var cssModuleGeneratorOptions =
|
|
10183
|
+
var cssModuleGeneratorOptions = import_zod2.z.strictObject({
|
|
9801
10184
|
exportsConvention: cssGeneratorExportsConvention.optional(),
|
|
9802
10185
|
exportsOnly: cssGeneratorExportsOnly.optional(),
|
|
9803
10186
|
localIdentName: cssGeneratorLocalIdentName.optional(),
|
|
9804
10187
|
esModule: cssGeneratorEsModule.optional()
|
|
9805
10188
|
});
|
|
9806
|
-
var generatorOptionsByModuleTypeKnown =
|
|
10189
|
+
var generatorOptionsByModuleTypeKnown = import_zod2.z.strictObject({
|
|
9807
10190
|
asset: assetGeneratorOptions.optional(),
|
|
9808
10191
|
"asset/inline": assetInlineGeneratorOptions.optional(),
|
|
9809
10192
|
"asset/resource": assetResourceGeneratorOptions.optional(),
|
|
@@ -9811,25 +10194,25 @@ var generatorOptionsByModuleTypeKnown = import_zod.z.strictObject({
|
|
|
9811
10194
|
"css/auto": cssAutoGeneratorOptions.optional(),
|
|
9812
10195
|
"css/module": cssModuleGeneratorOptions.optional()
|
|
9813
10196
|
});
|
|
9814
|
-
var generatorOptionsByModuleTypeUnknown =
|
|
9815
|
-
|
|
10197
|
+
var generatorOptionsByModuleTypeUnknown = import_zod2.z.record(
|
|
10198
|
+
import_zod2.z.record(import_zod2.z.any())
|
|
9816
10199
|
);
|
|
9817
10200
|
var generatorOptionsByModuleType = generatorOptionsByModuleTypeKnown.or(
|
|
9818
10201
|
generatorOptionsByModuleTypeUnknown
|
|
9819
10202
|
);
|
|
9820
|
-
var noParseOptionSingle =
|
|
10203
|
+
var noParseOptionSingle = import_zod2.z.string().or(import_zod2.z.instanceof(RegExp)).or(import_zod2.z.function().args(import_zod2.z.string()).returns(import_zod2.z.boolean()));
|
|
9821
10204
|
var noParseOption = noParseOptionSingle.or(
|
|
9822
|
-
|
|
10205
|
+
import_zod2.z.array(noParseOptionSingle)
|
|
9823
10206
|
);
|
|
9824
|
-
var moduleOptions =
|
|
10207
|
+
var moduleOptions = import_zod2.z.strictObject({
|
|
9825
10208
|
defaultRules: ruleSetRules.optional(),
|
|
9826
10209
|
rules: ruleSetRules.optional(),
|
|
9827
10210
|
parser: parserOptionsByModuleType.optional(),
|
|
9828
10211
|
generator: generatorOptionsByModuleType.optional(),
|
|
9829
10212
|
noParse: noParseOption.optional()
|
|
9830
10213
|
});
|
|
9831
|
-
var allowTarget =
|
|
9832
|
-
|
|
10214
|
+
var allowTarget = import_zod2.z.union([
|
|
10215
|
+
import_zod2.z.enum([
|
|
9833
10216
|
"web",
|
|
9834
10217
|
"webworker",
|
|
9835
10218
|
"es3",
|
|
@@ -9843,66 +10226,66 @@ var allowTarget = import_zod.z.union([
|
|
|
9843
10226
|
"es2021",
|
|
9844
10227
|
"es2022"
|
|
9845
10228
|
]),
|
|
9846
|
-
|
|
9847
|
-
|
|
9848
|
-
|
|
10229
|
+
import_zod2.z.literal("node"),
|
|
10230
|
+
import_zod2.z.literal("async-node"),
|
|
10231
|
+
import_zod2.z.custom(
|
|
9849
10232
|
(value) => typeof value === "string" && /^node\d+$/.test(value)
|
|
9850
10233
|
),
|
|
9851
|
-
|
|
10234
|
+
import_zod2.z.custom(
|
|
9852
10235
|
(value) => typeof value === "string" && /^async-node\d+$/.test(value)
|
|
9853
10236
|
),
|
|
9854
|
-
|
|
10237
|
+
import_zod2.z.custom(
|
|
9855
10238
|
(value) => typeof value === "string" && /^node\d+\.\d+$/.test(value)
|
|
9856
10239
|
),
|
|
9857
|
-
|
|
10240
|
+
import_zod2.z.custom(
|
|
9858
10241
|
(value) => typeof value === "string" && /^async-node\d+\.\d+$/.test(value)
|
|
9859
10242
|
),
|
|
9860
|
-
|
|
9861
|
-
|
|
10243
|
+
import_zod2.z.literal("electron-main"),
|
|
10244
|
+
import_zod2.z.custom(
|
|
9862
10245
|
(value) => typeof value === "string" && /^electron\d+-main$/.test(value)
|
|
9863
10246
|
),
|
|
9864
|
-
|
|
10247
|
+
import_zod2.z.custom(
|
|
9865
10248
|
(value) => typeof value === "string" && /^electron\d+\.\d+-main$/.test(value)
|
|
9866
10249
|
),
|
|
9867
|
-
|
|
9868
|
-
|
|
10250
|
+
import_zod2.z.literal("electron-renderer"),
|
|
10251
|
+
import_zod2.z.custom(
|
|
9869
10252
|
(value) => typeof value === "string" && /^electron\d+-renderer$/.test(value)
|
|
9870
10253
|
),
|
|
9871
|
-
|
|
10254
|
+
import_zod2.z.custom(
|
|
9872
10255
|
(value) => typeof value === "string" && /^electron\d+\.\d+-renderer$/.test(value)
|
|
9873
10256
|
),
|
|
9874
|
-
|
|
9875
|
-
|
|
10257
|
+
import_zod2.z.literal("electron-preload"),
|
|
10258
|
+
import_zod2.z.custom(
|
|
9876
10259
|
(value) => typeof value === "string" && /^electron\d+-preload$/.test(value)
|
|
9877
10260
|
),
|
|
9878
|
-
|
|
10261
|
+
import_zod2.z.custom(
|
|
9879
10262
|
(value) => typeof value === "string" && /^electron\d+\.\d+-preload$/.test(value)
|
|
9880
10263
|
),
|
|
9881
|
-
|
|
9882
|
-
|
|
10264
|
+
import_zod2.z.literal("nwjs"),
|
|
10265
|
+
import_zod2.z.custom(
|
|
9883
10266
|
(value) => typeof value === "string" && /^nwjs\d+$/.test(value)
|
|
9884
10267
|
),
|
|
9885
|
-
|
|
10268
|
+
import_zod2.z.custom(
|
|
9886
10269
|
(value) => typeof value === "string" && /^nwjs\d+\.\d+$/.test(value)
|
|
9887
10270
|
),
|
|
9888
|
-
|
|
9889
|
-
|
|
10271
|
+
import_zod2.z.literal("node-webkit"),
|
|
10272
|
+
import_zod2.z.custom(
|
|
9890
10273
|
(value) => typeof value === "string" && /^node-webkit\d+$/.test(value)
|
|
9891
10274
|
),
|
|
9892
|
-
|
|
10275
|
+
import_zod2.z.custom(
|
|
9893
10276
|
(value) => typeof value === "string" && /^node-webkit\d+\.\d+$/.test(value)
|
|
9894
10277
|
),
|
|
9895
|
-
|
|
9896
|
-
|
|
10278
|
+
import_zod2.z.literal("browserslist"),
|
|
10279
|
+
import_zod2.z.custom(
|
|
9897
10280
|
(value) => typeof value === "string" && /^browserslist:(.+)$/.test(value)
|
|
9898
10281
|
)
|
|
9899
10282
|
]);
|
|
9900
|
-
var target =
|
|
9901
|
-
|
|
10283
|
+
var target = import_zod2.z.union([
|
|
10284
|
+
import_zod2.z.literal(false),
|
|
9902
10285
|
allowTarget,
|
|
9903
10286
|
allowTarget.array()
|
|
9904
10287
|
]);
|
|
9905
|
-
var externalsType =
|
|
10288
|
+
var externalsType = import_zod2.z.enum([
|
|
9906
10289
|
"var",
|
|
9907
10290
|
"module",
|
|
9908
10291
|
"assign",
|
|
@@ -9926,57 +10309,94 @@ var externalsType = import_zod.z.enum([
|
|
|
9926
10309
|
"script",
|
|
9927
10310
|
"node-commonjs"
|
|
9928
10311
|
]);
|
|
9929
|
-
var
|
|
9930
|
-
|
|
9931
|
-
|
|
9932
|
-
|
|
10312
|
+
var ZodExternalObjectValue = new ZodRspackCrossChecker({
|
|
10313
|
+
patterns: [
|
|
10314
|
+
{
|
|
10315
|
+
test: (config2) => {
|
|
10316
|
+
var _a, _b;
|
|
10317
|
+
let isLibraryUmd = false;
|
|
10318
|
+
const library3 = (_a = config2 == null ? void 0 : config2.output) == null ? void 0 : _a.library;
|
|
10319
|
+
if (typeof library3 === "object" && "type" in library3) {
|
|
10320
|
+
isLibraryUmd = library3.type === "umd";
|
|
10321
|
+
} else {
|
|
10322
|
+
isLibraryUmd = ((_b = config2 == null ? void 0 : config2.output) == null ? void 0 : _b.libraryTarget) === "umd";
|
|
10323
|
+
}
|
|
10324
|
+
if (isLibraryUmd) {
|
|
10325
|
+
return (config2 == null ? void 0 : config2.externalsType) === void 0 || (config2 == null ? void 0 : config2.externalsType) === "umd";
|
|
10326
|
+
}
|
|
10327
|
+
return false;
|
|
10328
|
+
},
|
|
10329
|
+
type: import_zod2.z.strictObject({
|
|
10330
|
+
root: import_zod2.z.string().or(import_zod2.z.string().array()),
|
|
10331
|
+
commonjs: import_zod2.z.string().or(import_zod2.z.string().array()),
|
|
10332
|
+
commonjs2: import_zod2.z.string().or(import_zod2.z.string().array()),
|
|
10333
|
+
amd: import_zod2.z.string().or(import_zod2.z.string().array())
|
|
10334
|
+
}),
|
|
10335
|
+
issue: (res) => {
|
|
10336
|
+
if (res.status === "aborted") {
|
|
10337
|
+
return [
|
|
10338
|
+
{
|
|
10339
|
+
fatal: true,
|
|
10340
|
+
code: import_zod2.ZodIssueCode.custom,
|
|
10341
|
+
message: `External object must have "root", "commonjs", "commonjs2", "amd" properties when "libraryType" or "externalsType" is "umd"`
|
|
10342
|
+
}
|
|
10343
|
+
];
|
|
10344
|
+
}
|
|
10345
|
+
return [];
|
|
10346
|
+
}
|
|
10347
|
+
}
|
|
10348
|
+
],
|
|
10349
|
+
default: import_zod2.z.record(import_zod2.z.string().or(import_zod2.z.string().array()))
|
|
10350
|
+
});
|
|
10351
|
+
var externalItemValue = import_zod2.z.string().or(import_zod2.z.boolean()).or(import_zod2.z.string().array().min(1)).or(ZodExternalObjectValue);
|
|
10352
|
+
var externalItemObjectUnknown = import_zod2.z.record(
|
|
9933
10353
|
externalItemValue
|
|
9934
10354
|
);
|
|
9935
|
-
var externalItemFunctionData =
|
|
9936
|
-
context:
|
|
9937
|
-
dependencyType:
|
|
9938
|
-
request:
|
|
9939
|
-
contextInfo:
|
|
9940
|
-
issuer:
|
|
10355
|
+
var externalItemFunctionData = import_zod2.z.strictObject({
|
|
10356
|
+
context: import_zod2.z.string().optional(),
|
|
10357
|
+
dependencyType: import_zod2.z.string().optional(),
|
|
10358
|
+
request: import_zod2.z.string().optional(),
|
|
10359
|
+
contextInfo: import_zod2.z.strictObject({
|
|
10360
|
+
issuer: import_zod2.z.string()
|
|
9941
10361
|
}).optional()
|
|
9942
10362
|
});
|
|
9943
|
-
var externalItem =
|
|
9944
|
-
|
|
10363
|
+
var externalItem = import_zod2.z.string().or(import_zod2.z.instanceof(RegExp)).or(externalItemObjectUnknown).or(
|
|
10364
|
+
import_zod2.z.function().args(
|
|
9945
10365
|
externalItemFunctionData,
|
|
9946
|
-
|
|
9947
|
-
|
|
10366
|
+
import_zod2.z.function().args(
|
|
10367
|
+
import_zod2.z.instanceof(Error).optional(),
|
|
9948
10368
|
externalItemValue.optional(),
|
|
9949
10369
|
externalsType.optional()
|
|
9950
|
-
).returns(
|
|
10370
|
+
).returns(import_zod2.z.void())
|
|
9951
10371
|
)
|
|
9952
10372
|
).or(
|
|
9953
|
-
|
|
10373
|
+
import_zod2.z.function().args(externalItemFunctionData).returns(import_zod2.z.promise(externalItemValue))
|
|
9954
10374
|
);
|
|
9955
10375
|
var externals = externalItem.array().or(externalItem);
|
|
9956
|
-
var externalsPresets =
|
|
9957
|
-
node:
|
|
9958
|
-
web:
|
|
9959
|
-
webAsync:
|
|
9960
|
-
electron:
|
|
9961
|
-
electronMain:
|
|
9962
|
-
electronPreload:
|
|
9963
|
-
electronRenderer:
|
|
9964
|
-
nwjs:
|
|
10376
|
+
var externalsPresets = import_zod2.z.strictObject({
|
|
10377
|
+
node: import_zod2.z.boolean().optional(),
|
|
10378
|
+
web: import_zod2.z.boolean().optional(),
|
|
10379
|
+
webAsync: import_zod2.z.boolean().optional(),
|
|
10380
|
+
electron: import_zod2.z.boolean().optional(),
|
|
10381
|
+
electronMain: import_zod2.z.boolean().optional(),
|
|
10382
|
+
electronPreload: import_zod2.z.boolean().optional(),
|
|
10383
|
+
electronRenderer: import_zod2.z.boolean().optional(),
|
|
10384
|
+
nwjs: import_zod2.z.boolean().optional()
|
|
9965
10385
|
});
|
|
9966
|
-
var filterItemTypes =
|
|
9967
|
-
|
|
10386
|
+
var filterItemTypes = import_zod2.z.instanceof(RegExp).or(import_zod2.z.string()).or(
|
|
10387
|
+
import_zod2.z.function().args(import_zod2.z.string()).returns(import_zod2.z.boolean())
|
|
9968
10388
|
);
|
|
9969
10389
|
var filterTypes = filterItemTypes.array().or(filterItemTypes);
|
|
9970
|
-
var infrastructureLogging =
|
|
9971
|
-
appendOnly:
|
|
9972
|
-
colors:
|
|
9973
|
-
console:
|
|
9974
|
-
debug:
|
|
9975
|
-
level:
|
|
9976
|
-
stream:
|
|
10390
|
+
var infrastructureLogging = import_zod2.z.strictObject({
|
|
10391
|
+
appendOnly: import_zod2.z.boolean().optional(),
|
|
10392
|
+
colors: import_zod2.z.boolean().optional(),
|
|
10393
|
+
console: import_zod2.z.custom().optional(),
|
|
10394
|
+
debug: import_zod2.z.boolean().or(filterTypes).optional(),
|
|
10395
|
+
level: import_zod2.z.enum(["none", "error", "warn", "info", "log", "verbose"]).optional(),
|
|
10396
|
+
stream: import_zod2.z.custom().optional()
|
|
9977
10397
|
});
|
|
9978
|
-
var devTool =
|
|
9979
|
-
|
|
10398
|
+
var devTool = import_zod2.z.literal(false).or(
|
|
10399
|
+
import_zod2.z.enum([
|
|
9980
10400
|
"eval",
|
|
9981
10401
|
"cheap-source-map",
|
|
9982
10402
|
"cheap-module-source-map",
|
|
@@ -10004,18 +10424,18 @@ var devTool = import_zod.z.literal(false).or(
|
|
|
10004
10424
|
"eval-nosources-source-map"
|
|
10005
10425
|
])
|
|
10006
10426
|
);
|
|
10007
|
-
var nodeOptions =
|
|
10008
|
-
__dirname:
|
|
10009
|
-
__filename:
|
|
10010
|
-
global:
|
|
10427
|
+
var nodeOptions = import_zod2.z.strictObject({
|
|
10428
|
+
__dirname: import_zod2.z.boolean().or(import_zod2.z.enum(["warn-mock", "mock", "eval-only", "node-module"])).optional(),
|
|
10429
|
+
__filename: import_zod2.z.boolean().or(import_zod2.z.enum(["warn-mock", "mock", "eval-only", "node-module"])).optional(),
|
|
10430
|
+
global: import_zod2.z.boolean().or(import_zod2.z.literal("warn")).optional()
|
|
10011
10431
|
});
|
|
10012
|
-
var node =
|
|
10013
|
-
var loader =
|
|
10014
|
-
var snapshotOptions =
|
|
10432
|
+
var node = import_zod2.z.literal(false).or(nodeOptions);
|
|
10433
|
+
var loader = import_zod2.z.record(import_zod2.z.string(), import_zod2.z.any());
|
|
10434
|
+
var snapshotOptions = import_zod2.z.strictObject(
|
|
10015
10435
|
{}
|
|
10016
10436
|
);
|
|
10017
|
-
var cacheOptions =
|
|
10018
|
-
var statsPresets =
|
|
10437
|
+
var cacheOptions = import_zod2.z.boolean();
|
|
10438
|
+
var statsPresets = import_zod2.z.enum([
|
|
10019
10439
|
"normal",
|
|
10020
10440
|
"none",
|
|
10021
10441
|
"verbose",
|
|
@@ -10025,244 +10445,244 @@ var statsPresets = import_zod.z.enum([
|
|
|
10025
10445
|
"detailed",
|
|
10026
10446
|
"summary"
|
|
10027
10447
|
]);
|
|
10028
|
-
var statsOptions =
|
|
10029
|
-
all:
|
|
10030
|
-
preset:
|
|
10031
|
-
assets:
|
|
10032
|
-
chunks:
|
|
10033
|
-
modules:
|
|
10034
|
-
entrypoints:
|
|
10035
|
-
chunkGroups:
|
|
10036
|
-
warnings:
|
|
10037
|
-
warningsCount:
|
|
10038
|
-
errors:
|
|
10039
|
-
errorsCount:
|
|
10040
|
-
colors:
|
|
10041
|
-
hash:
|
|
10042
|
-
version:
|
|
10043
|
-
reasons:
|
|
10044
|
-
publicPath:
|
|
10045
|
-
outputPath:
|
|
10046
|
-
chunkModules:
|
|
10047
|
-
chunkRelations:
|
|
10048
|
-
ids:
|
|
10049
|
-
timings:
|
|
10050
|
-
builtAt:
|
|
10051
|
-
moduleAssets:
|
|
10052
|
-
nestedModules:
|
|
10053
|
-
source:
|
|
10054
|
-
logging:
|
|
10055
|
-
loggingDebug:
|
|
10056
|
-
loggingTrace:
|
|
10057
|
-
runtimeModules:
|
|
10058
|
-
children:
|
|
10059
|
-
usedExports:
|
|
10060
|
-
providedExports:
|
|
10061
|
-
optimizationBailout:
|
|
10062
|
-
groupModulesByType:
|
|
10063
|
-
groupModulesByCacheStatus:
|
|
10064
|
-
groupModulesByLayer:
|
|
10065
|
-
groupModulesByAttributes:
|
|
10066
|
-
groupModulesByPath:
|
|
10067
|
-
groupModulesByExtension:
|
|
10068
|
-
modulesSpace:
|
|
10069
|
-
chunkModulesSpace:
|
|
10070
|
-
nestedModulesSpace:
|
|
10071
|
-
relatedAssets:
|
|
10072
|
-
groupAssetsByEmitStatus:
|
|
10073
|
-
groupAssetsByInfo:
|
|
10074
|
-
groupAssetsByPath:
|
|
10075
|
-
groupAssetsByExtension:
|
|
10076
|
-
groupAssetsByChunk:
|
|
10077
|
-
assetsSpace:
|
|
10078
|
-
orphanModules:
|
|
10079
|
-
excludeModules:
|
|
10080
|
-
|
|
10081
|
-
).or(
|
|
10082
|
-
excludeAssets:
|
|
10083
|
-
|
|
10084
|
-
).or(
|
|
10085
|
-
modulesSort:
|
|
10086
|
-
chunkModulesSort:
|
|
10087
|
-
nestedModulesSort:
|
|
10088
|
-
chunksSort:
|
|
10089
|
-
assetsSort:
|
|
10090
|
-
performance:
|
|
10091
|
-
env:
|
|
10092
|
-
chunkGroupAuxiliary:
|
|
10093
|
-
chunkGroupChildren:
|
|
10094
|
-
chunkGroupMaxAssets:
|
|
10095
|
-
dependentModules:
|
|
10096
|
-
chunkOrigins:
|
|
10097
|
-
runtime:
|
|
10098
|
-
depth:
|
|
10099
|
-
reasonsSpace:
|
|
10100
|
-
groupReasonsByOrigin:
|
|
10101
|
-
errorDetails:
|
|
10102
|
-
errorStack:
|
|
10103
|
-
moduleTrace:
|
|
10104
|
-
cachedModules:
|
|
10105
|
-
cachedAssets:
|
|
10106
|
-
cached:
|
|
10107
|
-
errorsSpace:
|
|
10108
|
-
warningsSpace:
|
|
10448
|
+
var statsOptions = import_zod2.z.strictObject({
|
|
10449
|
+
all: import_zod2.z.boolean().optional(),
|
|
10450
|
+
preset: import_zod2.z.boolean().or(statsPresets).optional(),
|
|
10451
|
+
assets: import_zod2.z.boolean().optional(),
|
|
10452
|
+
chunks: import_zod2.z.boolean().optional(),
|
|
10453
|
+
modules: import_zod2.z.boolean().optional(),
|
|
10454
|
+
entrypoints: import_zod2.z.boolean().or(import_zod2.z.literal("auto")).optional(),
|
|
10455
|
+
chunkGroups: import_zod2.z.boolean().optional(),
|
|
10456
|
+
warnings: import_zod2.z.boolean().optional(),
|
|
10457
|
+
warningsCount: import_zod2.z.boolean().optional(),
|
|
10458
|
+
errors: import_zod2.z.boolean().optional(),
|
|
10459
|
+
errorsCount: import_zod2.z.boolean().optional(),
|
|
10460
|
+
colors: import_zod2.z.boolean().optional(),
|
|
10461
|
+
hash: import_zod2.z.boolean().optional(),
|
|
10462
|
+
version: import_zod2.z.boolean().optional(),
|
|
10463
|
+
reasons: import_zod2.z.boolean().optional(),
|
|
10464
|
+
publicPath: import_zod2.z.boolean().optional(),
|
|
10465
|
+
outputPath: import_zod2.z.boolean().optional(),
|
|
10466
|
+
chunkModules: import_zod2.z.boolean().optional(),
|
|
10467
|
+
chunkRelations: import_zod2.z.boolean().optional(),
|
|
10468
|
+
ids: import_zod2.z.boolean().optional(),
|
|
10469
|
+
timings: import_zod2.z.boolean().optional(),
|
|
10470
|
+
builtAt: import_zod2.z.boolean().optional(),
|
|
10471
|
+
moduleAssets: import_zod2.z.boolean().optional(),
|
|
10472
|
+
nestedModules: import_zod2.z.boolean().optional(),
|
|
10473
|
+
source: import_zod2.z.boolean().optional(),
|
|
10474
|
+
logging: import_zod2.z.enum(["none", "error", "warn", "info", "log", "verbose"]).or(import_zod2.z.boolean()).optional(),
|
|
10475
|
+
loggingDebug: import_zod2.z.boolean().or(filterTypes).optional(),
|
|
10476
|
+
loggingTrace: import_zod2.z.boolean().optional(),
|
|
10477
|
+
runtimeModules: import_zod2.z.boolean().optional(),
|
|
10478
|
+
children: import_zod2.z.boolean().optional(),
|
|
10479
|
+
usedExports: import_zod2.z.boolean().optional(),
|
|
10480
|
+
providedExports: import_zod2.z.boolean().optional(),
|
|
10481
|
+
optimizationBailout: import_zod2.z.boolean().optional(),
|
|
10482
|
+
groupModulesByType: import_zod2.z.boolean().optional(),
|
|
10483
|
+
groupModulesByCacheStatus: import_zod2.z.boolean().optional(),
|
|
10484
|
+
groupModulesByLayer: import_zod2.z.boolean().optional(),
|
|
10485
|
+
groupModulesByAttributes: import_zod2.z.boolean().optional(),
|
|
10486
|
+
groupModulesByPath: import_zod2.z.boolean().optional(),
|
|
10487
|
+
groupModulesByExtension: import_zod2.z.boolean().optional(),
|
|
10488
|
+
modulesSpace: import_zod2.z.number().optional(),
|
|
10489
|
+
chunkModulesSpace: import_zod2.z.number().optional(),
|
|
10490
|
+
nestedModulesSpace: import_zod2.z.number().optional(),
|
|
10491
|
+
relatedAssets: import_zod2.z.boolean().optional(),
|
|
10492
|
+
groupAssetsByEmitStatus: import_zod2.z.boolean().optional(),
|
|
10493
|
+
groupAssetsByInfo: import_zod2.z.boolean().optional(),
|
|
10494
|
+
groupAssetsByPath: import_zod2.z.boolean().optional(),
|
|
10495
|
+
groupAssetsByExtension: import_zod2.z.boolean().optional(),
|
|
10496
|
+
groupAssetsByChunk: import_zod2.z.boolean().optional(),
|
|
10497
|
+
assetsSpace: import_zod2.z.number().optional(),
|
|
10498
|
+
orphanModules: import_zod2.z.boolean().optional(),
|
|
10499
|
+
excludeModules: import_zod2.z.array(
|
|
10500
|
+
import_zod2.z.string().or(import_zod2.z.instanceof(RegExp)).or(import_zod2.z.function(import_zod2.z.tuple([import_zod2.z.string(), import_zod2.z.any(), import_zod2.z.any()]), import_zod2.z.boolean()))
|
|
10501
|
+
).or(import_zod2.z.string()).or(import_zod2.z.instanceof(RegExp)).or(import_zod2.z.function(import_zod2.z.tuple([import_zod2.z.string(), import_zod2.z.any(), import_zod2.z.any()]), import_zod2.z.boolean())).or(import_zod2.z.boolean()).optional(),
|
|
10502
|
+
excludeAssets: import_zod2.z.array(
|
|
10503
|
+
import_zod2.z.string().or(import_zod2.z.instanceof(RegExp)).or(import_zod2.z.function(import_zod2.z.tuple([import_zod2.z.string(), import_zod2.z.any()]), import_zod2.z.boolean()))
|
|
10504
|
+
).or(import_zod2.z.string()).or(import_zod2.z.instanceof(RegExp)).or(import_zod2.z.function(import_zod2.z.tuple([import_zod2.z.string(), import_zod2.z.any()]), import_zod2.z.boolean())).optional(),
|
|
10505
|
+
modulesSort: import_zod2.z.string().optional(),
|
|
10506
|
+
chunkModulesSort: import_zod2.z.string().optional(),
|
|
10507
|
+
nestedModulesSort: import_zod2.z.string().optional(),
|
|
10508
|
+
chunksSort: import_zod2.z.string().optional(),
|
|
10509
|
+
assetsSort: import_zod2.z.string().optional(),
|
|
10510
|
+
performance: import_zod2.z.boolean().optional(),
|
|
10511
|
+
env: import_zod2.z.boolean().optional(),
|
|
10512
|
+
chunkGroupAuxiliary: import_zod2.z.boolean().optional(),
|
|
10513
|
+
chunkGroupChildren: import_zod2.z.boolean().optional(),
|
|
10514
|
+
chunkGroupMaxAssets: import_zod2.z.number().optional(),
|
|
10515
|
+
dependentModules: import_zod2.z.boolean().optional(),
|
|
10516
|
+
chunkOrigins: import_zod2.z.boolean().optional(),
|
|
10517
|
+
runtime: import_zod2.z.boolean().optional(),
|
|
10518
|
+
depth: import_zod2.z.boolean().optional(),
|
|
10519
|
+
reasonsSpace: import_zod2.z.number().optional(),
|
|
10520
|
+
groupReasonsByOrigin: import_zod2.z.boolean().optional(),
|
|
10521
|
+
errorDetails: import_zod2.z.boolean().optional(),
|
|
10522
|
+
errorStack: import_zod2.z.boolean().optional(),
|
|
10523
|
+
moduleTrace: import_zod2.z.boolean().optional(),
|
|
10524
|
+
cachedModules: import_zod2.z.boolean().optional(),
|
|
10525
|
+
cachedAssets: import_zod2.z.boolean().optional(),
|
|
10526
|
+
cached: import_zod2.z.boolean().optional(),
|
|
10527
|
+
errorsSpace: import_zod2.z.number().optional(),
|
|
10528
|
+
warningsSpace: import_zod2.z.number().optional()
|
|
10109
10529
|
});
|
|
10110
|
-
var statsValue =
|
|
10111
|
-
var plugin =
|
|
10112
|
-
|
|
10530
|
+
var statsValue = import_zod2.z.boolean().or(statsPresets).or(statsOptions);
|
|
10531
|
+
var plugin = import_zod2.z.union([
|
|
10532
|
+
import_zod2.z.custom(),
|
|
10113
10533
|
falsy
|
|
10114
10534
|
]);
|
|
10115
10535
|
var plugins = plugin.array();
|
|
10116
|
-
var optimizationRuntimeChunk =
|
|
10117
|
-
|
|
10118
|
-
name:
|
|
10119
|
-
|
|
10536
|
+
var optimizationRuntimeChunk = import_zod2.z.enum(["single", "multiple"]).or(import_zod2.z.boolean()).or(
|
|
10537
|
+
import_zod2.z.strictObject({
|
|
10538
|
+
name: import_zod2.z.string().or(
|
|
10539
|
+
import_zod2.z.function().args(import_zod2.z.strictObject({ name: import_zod2.z.string() })).returns(import_zod2.z.string())
|
|
10120
10540
|
).optional()
|
|
10121
10541
|
})
|
|
10122
10542
|
);
|
|
10123
|
-
var optimizationSplitChunksNameFunction =
|
|
10124
|
-
|
|
10543
|
+
var optimizationSplitChunksNameFunction = import_zod2.z.function().args(
|
|
10544
|
+
import_zod2.z.instanceof(Module).optional()
|
|
10125
10545
|
// FIXME: z.array(z.instanceof(Chunk)).optional(), z.string()
|
|
10126
10546
|
// FIXME: Chunk[], cacheChunkKey
|
|
10127
10547
|
);
|
|
10128
|
-
var optimizationSplitChunksName =
|
|
10129
|
-
var optimizationSplitChunksChunks =
|
|
10130
|
-
|
|
10548
|
+
var optimizationSplitChunksName = import_zod2.z.string().or(import_zod2.z.literal(false)).or(optimizationSplitChunksNameFunction);
|
|
10549
|
+
var optimizationSplitChunksChunks = import_zod2.z.enum(["initial", "async", "all"]).or(import_zod2.z.instanceof(RegExp)).or(
|
|
10550
|
+
import_zod2.z.function().args(import_zod2.z.instanceof(Chunk, { message: "Input not instance of Chunk" })).returns(import_zod2.z.boolean())
|
|
10131
10551
|
);
|
|
10132
|
-
var optimizationSplitChunksSizes =
|
|
10133
|
-
var optimizationSplitChunksDefaultSizeTypes =
|
|
10552
|
+
var optimizationSplitChunksSizes = import_zod2.z.number().or(import_zod2.z.record(import_zod2.z.number()));
|
|
10553
|
+
var optimizationSplitChunksDefaultSizeTypes = import_zod2.z.array(import_zod2.z.string());
|
|
10134
10554
|
var sharedOptimizationSplitChunksCacheGroup = {
|
|
10135
10555
|
chunks: optimizationSplitChunksChunks.optional(),
|
|
10136
10556
|
defaultSizeTypes: optimizationSplitChunksDefaultSizeTypes.optional(),
|
|
10137
|
-
minChunks:
|
|
10138
|
-
usedExports:
|
|
10557
|
+
minChunks: import_zod2.z.number().min(1).optional(),
|
|
10558
|
+
usedExports: import_zod2.z.boolean().optional(),
|
|
10139
10559
|
name: optimizationSplitChunksName.optional(),
|
|
10140
10560
|
minSize: optimizationSplitChunksSizes.optional(),
|
|
10141
10561
|
maxSize: optimizationSplitChunksSizes.optional(),
|
|
10142
10562
|
maxAsyncSize: optimizationSplitChunksSizes.optional(),
|
|
10143
10563
|
maxInitialSize: optimizationSplitChunksSizes.optional(),
|
|
10144
|
-
maxAsyncRequests:
|
|
10145
|
-
maxInitialRequests:
|
|
10146
|
-
automaticNameDelimiter:
|
|
10147
|
-
};
|
|
10148
|
-
var optimizationSplitChunksCacheGroup =
|
|
10149
|
-
test:
|
|
10150
|
-
|
|
10151
|
-
|
|
10564
|
+
maxAsyncRequests: import_zod2.z.number().optional(),
|
|
10565
|
+
maxInitialRequests: import_zod2.z.number().optional(),
|
|
10566
|
+
automaticNameDelimiter: import_zod2.z.string().optional()
|
|
10567
|
+
};
|
|
10568
|
+
var optimizationSplitChunksCacheGroup = import_zod2.z.strictObject({
|
|
10569
|
+
test: import_zod2.z.string().or(import_zod2.z.instanceof(RegExp)).or(
|
|
10570
|
+
import_zod2.z.function().args(
|
|
10571
|
+
import_zod2.z.instanceof(Module)
|
|
10152
10572
|
/** FIXME: lack of CacheGroupContext */
|
|
10153
10573
|
)
|
|
10154
10574
|
).optional(),
|
|
10155
|
-
priority:
|
|
10156
|
-
enforce:
|
|
10157
|
-
filename:
|
|
10158
|
-
reuseExistingChunk:
|
|
10159
|
-
type:
|
|
10160
|
-
idHint:
|
|
10575
|
+
priority: import_zod2.z.number().optional(),
|
|
10576
|
+
enforce: import_zod2.z.boolean().optional(),
|
|
10577
|
+
filename: import_zod2.z.string().optional(),
|
|
10578
|
+
reuseExistingChunk: import_zod2.z.boolean().optional(),
|
|
10579
|
+
type: import_zod2.z.string().or(import_zod2.z.instanceof(RegExp)).optional(),
|
|
10580
|
+
idHint: import_zod2.z.string().optional(),
|
|
10161
10581
|
...sharedOptimizationSplitChunksCacheGroup
|
|
10162
10582
|
});
|
|
10163
|
-
var optimizationSplitChunksOptions =
|
|
10164
|
-
cacheGroups:
|
|
10165
|
-
fallbackCacheGroup:
|
|
10583
|
+
var optimizationSplitChunksOptions = import_zod2.z.strictObject({
|
|
10584
|
+
cacheGroups: import_zod2.z.record(import_zod2.z.literal(false).or(optimizationSplitChunksCacheGroup)).optional(),
|
|
10585
|
+
fallbackCacheGroup: import_zod2.z.strictObject({
|
|
10166
10586
|
chunks: optimizationSplitChunksChunks.optional(),
|
|
10167
|
-
minSize:
|
|
10168
|
-
maxSize:
|
|
10169
|
-
maxAsyncSize:
|
|
10170
|
-
maxInitialSize:
|
|
10171
|
-
automaticNameDelimiter:
|
|
10587
|
+
minSize: import_zod2.z.number().optional(),
|
|
10588
|
+
maxSize: import_zod2.z.number().optional(),
|
|
10589
|
+
maxAsyncSize: import_zod2.z.number().optional(),
|
|
10590
|
+
maxInitialSize: import_zod2.z.number().optional(),
|
|
10591
|
+
automaticNameDelimiter: import_zod2.z.string().optional()
|
|
10172
10592
|
}).optional(),
|
|
10173
|
-
hidePathInfo:
|
|
10593
|
+
hidePathInfo: import_zod2.z.boolean().optional(),
|
|
10174
10594
|
...sharedOptimizationSplitChunksCacheGroup
|
|
10175
10595
|
});
|
|
10176
|
-
var optimization =
|
|
10177
|
-
moduleIds:
|
|
10178
|
-
chunkIds:
|
|
10179
|
-
minimize:
|
|
10180
|
-
minimizer:
|
|
10181
|
-
mergeDuplicateChunks:
|
|
10182
|
-
splitChunks:
|
|
10596
|
+
var optimization = import_zod2.z.strictObject({
|
|
10597
|
+
moduleIds: import_zod2.z.enum(["named", "natural", "deterministic"]).optional(),
|
|
10598
|
+
chunkIds: import_zod2.z.enum(["natural", "named", "deterministic"]).optional(),
|
|
10599
|
+
minimize: import_zod2.z.boolean().optional(),
|
|
10600
|
+
minimizer: import_zod2.z.literal("...").or(plugin).array().optional(),
|
|
10601
|
+
mergeDuplicateChunks: import_zod2.z.boolean().optional(),
|
|
10602
|
+
splitChunks: import_zod2.z.literal(false).or(optimizationSplitChunksOptions).optional(),
|
|
10183
10603
|
runtimeChunk: optimizationRuntimeChunk.optional(),
|
|
10184
|
-
removeAvailableModules:
|
|
10185
|
-
removeEmptyChunks:
|
|
10186
|
-
realContentHash:
|
|
10187
|
-
sideEffects:
|
|
10188
|
-
providedExports:
|
|
10189
|
-
concatenateModules:
|
|
10190
|
-
innerGraph:
|
|
10191
|
-
usedExports:
|
|
10192
|
-
mangleExports:
|
|
10193
|
-
nodeEnv:
|
|
10194
|
-
emitOnErrors:
|
|
10604
|
+
removeAvailableModules: import_zod2.z.boolean().optional(),
|
|
10605
|
+
removeEmptyChunks: import_zod2.z.boolean().optional(),
|
|
10606
|
+
realContentHash: import_zod2.z.boolean().optional(),
|
|
10607
|
+
sideEffects: import_zod2.z.enum(["flag"]).or(import_zod2.z.boolean()).optional(),
|
|
10608
|
+
providedExports: import_zod2.z.boolean().optional(),
|
|
10609
|
+
concatenateModules: import_zod2.z.boolean().optional(),
|
|
10610
|
+
innerGraph: import_zod2.z.boolean().optional(),
|
|
10611
|
+
usedExports: import_zod2.z.enum(["global"]).or(import_zod2.z.boolean()).optional(),
|
|
10612
|
+
mangleExports: import_zod2.z.enum(["size", "deterministic"]).or(import_zod2.z.boolean()).optional(),
|
|
10613
|
+
nodeEnv: import_zod2.z.union([import_zod2.z.string(), import_zod2.z.literal(false)]).optional(),
|
|
10614
|
+
emitOnErrors: import_zod2.z.boolean().optional()
|
|
10195
10615
|
});
|
|
10196
|
-
var rspackFutureOptions =
|
|
10197
|
-
bundlerInfo:
|
|
10198
|
-
version:
|
|
10199
|
-
bundler:
|
|
10200
|
-
force:
|
|
10616
|
+
var rspackFutureOptions = import_zod2.z.strictObject({
|
|
10617
|
+
bundlerInfo: import_zod2.z.strictObject({
|
|
10618
|
+
version: import_zod2.z.string().optional(),
|
|
10619
|
+
bundler: import_zod2.z.string().optional(),
|
|
10620
|
+
force: import_zod2.z.boolean().or(import_zod2.z.array(import_zod2.z.enum(["version", "uniqueId"]))).optional()
|
|
10201
10621
|
}).optional()
|
|
10202
10622
|
});
|
|
10203
|
-
var listenOptions =
|
|
10204
|
-
port:
|
|
10205
|
-
host:
|
|
10206
|
-
backlog:
|
|
10207
|
-
path:
|
|
10208
|
-
exclusive:
|
|
10209
|
-
readableAll:
|
|
10210
|
-
writableAll:
|
|
10211
|
-
ipv6Only:
|
|
10623
|
+
var listenOptions = import_zod2.z.object({
|
|
10624
|
+
port: import_zod2.z.number().optional(),
|
|
10625
|
+
host: import_zod2.z.string().optional(),
|
|
10626
|
+
backlog: import_zod2.z.number().optional(),
|
|
10627
|
+
path: import_zod2.z.string().optional(),
|
|
10628
|
+
exclusive: import_zod2.z.boolean().optional(),
|
|
10629
|
+
readableAll: import_zod2.z.boolean().optional(),
|
|
10630
|
+
writableAll: import_zod2.z.boolean().optional(),
|
|
10631
|
+
ipv6Only: import_zod2.z.boolean().optional()
|
|
10212
10632
|
});
|
|
10213
|
-
var lazyCompilationOptions =
|
|
10214
|
-
backend:
|
|
10215
|
-
client:
|
|
10216
|
-
listen:
|
|
10217
|
-
protocol:
|
|
10633
|
+
var lazyCompilationOptions = import_zod2.z.object({
|
|
10634
|
+
backend: import_zod2.z.object({
|
|
10635
|
+
client: import_zod2.z.string().optional(),
|
|
10636
|
+
listen: import_zod2.z.number().optional().or(listenOptions),
|
|
10637
|
+
protocol: import_zod2.z.enum(["http", "https"]).optional()
|
|
10218
10638
|
}).optional(),
|
|
10219
|
-
imports:
|
|
10220
|
-
entries:
|
|
10221
|
-
test:
|
|
10639
|
+
imports: import_zod2.z.boolean().optional(),
|
|
10640
|
+
entries: import_zod2.z.boolean().optional(),
|
|
10641
|
+
test: import_zod2.z.instanceof(RegExp).or(import_zod2.z.function().args(import_zod2.z.custom()).returns(import_zod2.z.boolean())).optional()
|
|
10222
10642
|
});
|
|
10223
|
-
var incremental =
|
|
10224
|
-
make:
|
|
10225
|
-
emitAssets:
|
|
10226
|
-
inferAsyncModules:
|
|
10227
|
-
providedExports:
|
|
10228
|
-
dependenciesDiagnostics:
|
|
10229
|
-
modulesHashes:
|
|
10230
|
-
modulesCodegen:
|
|
10231
|
-
modulesRuntimeRequirements:
|
|
10232
|
-
buildChunkGraph:
|
|
10643
|
+
var incremental = import_zod2.z.strictObject({
|
|
10644
|
+
make: import_zod2.z.boolean().optional(),
|
|
10645
|
+
emitAssets: import_zod2.z.boolean().optional(),
|
|
10646
|
+
inferAsyncModules: import_zod2.z.boolean().optional(),
|
|
10647
|
+
providedExports: import_zod2.z.boolean().optional(),
|
|
10648
|
+
dependenciesDiagnostics: import_zod2.z.boolean().optional(),
|
|
10649
|
+
modulesHashes: import_zod2.z.boolean().optional(),
|
|
10650
|
+
modulesCodegen: import_zod2.z.boolean().optional(),
|
|
10651
|
+
modulesRuntimeRequirements: import_zod2.z.boolean().optional(),
|
|
10652
|
+
buildChunkGraph: import_zod2.z.boolean().optional()
|
|
10233
10653
|
});
|
|
10234
|
-
var experiments =
|
|
10235
|
-
lazyCompilation:
|
|
10236
|
-
asyncWebAssembly:
|
|
10237
|
-
outputModule:
|
|
10238
|
-
topLevelAwait:
|
|
10239
|
-
css:
|
|
10240
|
-
layers:
|
|
10241
|
-
incremental:
|
|
10242
|
-
futureDefaults:
|
|
10654
|
+
var experiments = import_zod2.z.strictObject({
|
|
10655
|
+
lazyCompilation: import_zod2.z.boolean().optional().or(lazyCompilationOptions),
|
|
10656
|
+
asyncWebAssembly: import_zod2.z.boolean().optional(),
|
|
10657
|
+
outputModule: import_zod2.z.boolean().optional(),
|
|
10658
|
+
topLevelAwait: import_zod2.z.boolean().optional(),
|
|
10659
|
+
css: import_zod2.z.boolean().optional(),
|
|
10660
|
+
layers: import_zod2.z.boolean().optional(),
|
|
10661
|
+
incremental: import_zod2.z.boolean().or(incremental).optional(),
|
|
10662
|
+
futureDefaults: import_zod2.z.boolean().optional(),
|
|
10243
10663
|
rspackFuture: rspackFutureOptions.optional()
|
|
10244
10664
|
});
|
|
10245
|
-
var watch =
|
|
10246
|
-
var watchOptions =
|
|
10247
|
-
aggregateTimeout:
|
|
10248
|
-
followSymlinks:
|
|
10249
|
-
ignored:
|
|
10250
|
-
poll:
|
|
10251
|
-
stdin:
|
|
10665
|
+
var watch = import_zod2.z.boolean();
|
|
10666
|
+
var watchOptions = import_zod2.z.strictObject({
|
|
10667
|
+
aggregateTimeout: import_zod2.z.number().optional(),
|
|
10668
|
+
followSymlinks: import_zod2.z.boolean().optional(),
|
|
10669
|
+
ignored: import_zod2.z.string().array().or(import_zod2.z.instanceof(RegExp)).or(import_zod2.z.string()).optional(),
|
|
10670
|
+
poll: import_zod2.z.number().or(import_zod2.z.boolean()).optional(),
|
|
10671
|
+
stdin: import_zod2.z.boolean().optional()
|
|
10252
10672
|
});
|
|
10253
|
-
var devServer =
|
|
10254
|
-
var ignoreWarnings =
|
|
10255
|
-
|
|
10673
|
+
var devServer = import_zod2.z.custom();
|
|
10674
|
+
var ignoreWarnings = import_zod2.z.instanceof(RegExp).or(
|
|
10675
|
+
import_zod2.z.function().args(import_zod2.z.instanceof(Error), import_zod2.z.custom()).returns(import_zod2.z.boolean())
|
|
10256
10676
|
).array();
|
|
10257
|
-
var profile =
|
|
10258
|
-
var bail =
|
|
10259
|
-
var performance =
|
|
10260
|
-
assetFilter:
|
|
10261
|
-
hints:
|
|
10262
|
-
maxAssetSize:
|
|
10263
|
-
maxEntrypointSize:
|
|
10264
|
-
}).or(
|
|
10265
|
-
var rspackOptions =
|
|
10677
|
+
var profile = import_zod2.z.boolean();
|
|
10678
|
+
var bail = import_zod2.z.boolean();
|
|
10679
|
+
var performance = import_zod2.z.strictObject({
|
|
10680
|
+
assetFilter: import_zod2.z.function().args(import_zod2.z.string()).returns(import_zod2.z.boolean()).optional(),
|
|
10681
|
+
hints: import_zod2.z.enum(["error", "warning"]).or(import_zod2.z.literal(false)).optional(),
|
|
10682
|
+
maxAssetSize: import_zod2.z.number().optional(),
|
|
10683
|
+
maxEntrypointSize: import_zod2.z.number().optional()
|
|
10684
|
+
}).or(import_zod2.z.literal(false));
|
|
10685
|
+
var rspackOptions = import_zod2.z.strictObject({
|
|
10266
10686
|
name: name.optional(),
|
|
10267
10687
|
dependencies: dependencies.optional(),
|
|
10268
10688
|
entry: entry.optional(),
|
|
@@ -10523,16 +10943,44 @@ var FlagDependencyExportsPlugin = create2(
|
|
|
10523
10943
|
|
|
10524
10944
|
// src/builtin-plugin/FlagDependencyUsagePlugin.ts
|
|
10525
10945
|
var import_binding37 = require("@rspack/binding");
|
|
10526
|
-
var FlagDependencyUsagePlugin =
|
|
10527
|
-
|
|
10528
|
-
|
|
10529
|
-
|
|
10530
|
-
|
|
10531
|
-
|
|
10532
|
-
|
|
10533
|
-
|
|
10534
|
-
|
|
10535
|
-
|
|
10946
|
+
var FlagDependencyUsagePlugin = class extends RspackBuiltinPlugin {
|
|
10947
|
+
constructor(global) {
|
|
10948
|
+
super();
|
|
10949
|
+
this.global = global;
|
|
10950
|
+
this.name = import_binding37.BuiltinPluginName.FlagDependencyUsagePlugin;
|
|
10951
|
+
this.affectedHooks = "compilation";
|
|
10952
|
+
}
|
|
10953
|
+
raw(compiler) {
|
|
10954
|
+
const incremental2 = compiler.options.experiments.incremental;
|
|
10955
|
+
const logger = compiler.getInfrastructureLogger(
|
|
10956
|
+
"rspack.FlagDependencyUsagePlugin"
|
|
10957
|
+
);
|
|
10958
|
+
if (incremental2.modulesHashes) {
|
|
10959
|
+
incremental2.modulesHashes = false;
|
|
10960
|
+
logger.warn(
|
|
10961
|
+
"`optimization.usedExports` can't be used with `incremental.modulesHashes` as export usage is a global effect. `incremental.modulesHashes` has been overridden to false."
|
|
10962
|
+
);
|
|
10963
|
+
}
|
|
10964
|
+
if (incremental2.modulesCodegen) {
|
|
10965
|
+
incremental2.modulesCodegen = false;
|
|
10966
|
+
logger.warn(
|
|
10967
|
+
"`optimization.usedExports` can't be used with `incremental.modulesCodegen` as export usage is a global effect. `incremental.modulesCodegen` has been overridden to false."
|
|
10968
|
+
);
|
|
10969
|
+
}
|
|
10970
|
+
if (incremental2.modulesRuntimeRequirements) {
|
|
10971
|
+
incremental2.modulesRuntimeRequirements = false;
|
|
10972
|
+
logger.warn(
|
|
10973
|
+
"`optimization.usedExports` can't be used with `incremental.modulesRuntimeRequirements` as export usage is a global effect. `incremental.modulesRuntimeRequirements` has been overridden to false."
|
|
10974
|
+
);
|
|
10975
|
+
}
|
|
10976
|
+
return createBuiltinPlugin(this.name, this.global);
|
|
10977
|
+
}
|
|
10978
|
+
};
|
|
10979
|
+
|
|
10980
|
+
// src/builtin-plugin/HotModuleReplacementPlugin.ts
|
|
10981
|
+
var import_binding38 = require("@rspack/binding");
|
|
10982
|
+
var HotModuleReplacementPlugin = class extends RspackBuiltinPlugin {
|
|
10983
|
+
constructor() {
|
|
10536
10984
|
super(...arguments);
|
|
10537
10985
|
this.name = import_binding38.BuiltinPluginName.HotModuleReplacementPlugin;
|
|
10538
10986
|
}
|
|
@@ -10549,9 +10997,10 @@ var import_node_fs2 = __toESM(require("fs"));
|
|
|
10549
10997
|
var import_node_path8 = __toESM(require("path"));
|
|
10550
10998
|
var import_binding39 = require("@rspack/binding");
|
|
10551
10999
|
var liteTapable3 = __toESM(require("@rspack/lite-tapable"));
|
|
10552
|
-
var
|
|
11000
|
+
var import_zod3 = require("../compiled/zod/index.js");
|
|
10553
11001
|
|
|
10554
|
-
// ../../node_modules/.pnpm/zod-validation-error@3.
|
|
11002
|
+
// ../../node_modules/.pnpm/zod-validation-error@3.4.0_zod@3.23.8/node_modules/zod-validation-error/dist/index.mjs
|
|
11003
|
+
var zod2 = __toESM(require("../compiled/zod/index.js"), 1);
|
|
10555
11004
|
var zod = __toESM(require("../compiled/zod/index.js"), 1);
|
|
10556
11005
|
function isZodErrorLike(err) {
|
|
10557
11006
|
return err instanceof Error && err.name === "ZodError" && "issues" in err && Array.isArray(err.issues);
|
|
@@ -10577,22 +11026,8 @@ function getIssuesFromErrorOptions(options) {
|
|
|
10577
11026
|
}
|
|
10578
11027
|
return [];
|
|
10579
11028
|
}
|
|
10580
|
-
|
|
10581
|
-
|
|
10582
|
-
var PREFIX = "Validation error";
|
|
10583
|
-
var PREFIX_SEPARATOR = ": ";
|
|
10584
|
-
var UNION_SEPARATOR = ", or ";
|
|
10585
|
-
function prefixMessage(message, prefix, prefixSeparator) {
|
|
10586
|
-
if (prefix !== null) {
|
|
10587
|
-
if (message.length > 0) {
|
|
10588
|
-
return [prefix, message].join(prefixSeparator);
|
|
10589
|
-
}
|
|
10590
|
-
return prefix;
|
|
10591
|
-
}
|
|
10592
|
-
if (message.length > 0) {
|
|
10593
|
-
return message;
|
|
10594
|
-
}
|
|
10595
|
-
return PREFIX;
|
|
11029
|
+
function isNonEmptyArray(value) {
|
|
11030
|
+
return value.length !== 0;
|
|
10596
11031
|
}
|
|
10597
11032
|
var identifierRegex = /[$_\p{ID_Start}][$\u200c\u200d\p{ID_Continue}]*/u;
|
|
10598
11033
|
function joinPath(path10) {
|
|
@@ -10616,12 +11051,35 @@ function joinPath(path10) {
|
|
|
10616
11051
|
function escapeQuotes(str) {
|
|
10617
11052
|
return str.replace(/"/g, '\\"');
|
|
10618
11053
|
}
|
|
10619
|
-
|
|
10620
|
-
|
|
11054
|
+
var ISSUE_SEPARATOR = "; ";
|
|
11055
|
+
var MAX_ISSUES_IN_MESSAGE = 99;
|
|
11056
|
+
var PREFIX = "Validation error";
|
|
11057
|
+
var PREFIX_SEPARATOR = ": ";
|
|
11058
|
+
var UNION_SEPARATOR = ", or ";
|
|
11059
|
+
function createMessageBuilder(props = {}) {
|
|
11060
|
+
const {
|
|
11061
|
+
issueSeparator = ISSUE_SEPARATOR,
|
|
11062
|
+
unionSeparator = UNION_SEPARATOR,
|
|
11063
|
+
prefixSeparator = PREFIX_SEPARATOR,
|
|
11064
|
+
prefix = PREFIX,
|
|
11065
|
+
includePath = true,
|
|
11066
|
+
maxIssuesInMessage = MAX_ISSUES_IN_MESSAGE
|
|
11067
|
+
} = props;
|
|
11068
|
+
return (issues) => {
|
|
11069
|
+
const message = issues.slice(0, maxIssuesInMessage).map(
|
|
11070
|
+
(issue) => getMessageFromZodIssue({
|
|
11071
|
+
issue,
|
|
11072
|
+
issueSeparator,
|
|
11073
|
+
unionSeparator,
|
|
11074
|
+
includePath
|
|
11075
|
+
})
|
|
11076
|
+
).join(issueSeparator);
|
|
11077
|
+
return prefixMessage(message, prefix, prefixSeparator);
|
|
11078
|
+
};
|
|
10621
11079
|
}
|
|
10622
11080
|
function getMessageFromZodIssue(props) {
|
|
10623
11081
|
const { issue, issueSeparator, unionSeparator, includePath } = props;
|
|
10624
|
-
if (issue.code ===
|
|
11082
|
+
if (issue.code === zod.ZodIssueCode.invalid_union) {
|
|
10625
11083
|
return issue.unionErrors.reduce((acc, zodError) => {
|
|
10626
11084
|
const newIssues = zodError.issues.map(
|
|
10627
11085
|
(issue2) => getMessageFromZodIssue({
|
|
@@ -10637,7 +11095,7 @@ function getMessageFromZodIssue(props) {
|
|
|
10637
11095
|
return acc;
|
|
10638
11096
|
}, []).join(unionSeparator);
|
|
10639
11097
|
}
|
|
10640
|
-
if (issue.code ===
|
|
11098
|
+
if (issue.code === zod.ZodIssueCode.invalid_arguments) {
|
|
10641
11099
|
return [
|
|
10642
11100
|
issue.message,
|
|
10643
11101
|
...issue.argumentsError.issues.map(
|
|
@@ -10650,7 +11108,7 @@ function getMessageFromZodIssue(props) {
|
|
|
10650
11108
|
)
|
|
10651
11109
|
].join(issueSeparator);
|
|
10652
11110
|
}
|
|
10653
|
-
if (issue.code ===
|
|
11111
|
+
if (issue.code === zod.ZodIssueCode.invalid_return_type) {
|
|
10654
11112
|
return [
|
|
10655
11113
|
issue.message,
|
|
10656
11114
|
...issue.returnTypeError.issues.map(
|
|
@@ -10674,6 +11132,18 @@ function getMessageFromZodIssue(props) {
|
|
|
10674
11132
|
}
|
|
10675
11133
|
return issue.message;
|
|
10676
11134
|
}
|
|
11135
|
+
function prefixMessage(message, prefix, prefixSeparator) {
|
|
11136
|
+
if (prefix !== null) {
|
|
11137
|
+
if (message.length > 0) {
|
|
11138
|
+
return [prefix, message].join(prefixSeparator);
|
|
11139
|
+
}
|
|
11140
|
+
return prefix;
|
|
11141
|
+
}
|
|
11142
|
+
if (message.length > 0) {
|
|
11143
|
+
return message;
|
|
11144
|
+
}
|
|
11145
|
+
return PREFIX;
|
|
11146
|
+
}
|
|
10677
11147
|
function fromZodError(zodError, options = {}) {
|
|
10678
11148
|
if (!isZodErrorLike(zodError)) {
|
|
10679
11149
|
throw new TypeError(
|
|
@@ -10683,26 +11153,22 @@ function fromZodError(zodError, options = {}) {
|
|
|
10683
11153
|
return fromZodErrorWithoutRuntimeCheck(zodError, options);
|
|
10684
11154
|
}
|
|
10685
11155
|
function fromZodErrorWithoutRuntimeCheck(zodError, options = {}) {
|
|
10686
|
-
const {
|
|
10687
|
-
maxIssuesInMessage = MAX_ISSUES_IN_MESSAGE,
|
|
10688
|
-
issueSeparator = ISSUE_SEPARATOR,
|
|
10689
|
-
unionSeparator = UNION_SEPARATOR,
|
|
10690
|
-
prefixSeparator = PREFIX_SEPARATOR,
|
|
10691
|
-
prefix = PREFIX,
|
|
10692
|
-
includePath = true
|
|
10693
|
-
} = options;
|
|
10694
11156
|
const zodIssues = zodError.errors;
|
|
10695
|
-
|
|
10696
|
-
|
|
10697
|
-
|
|
10698
|
-
|
|
10699
|
-
|
|
10700
|
-
|
|
10701
|
-
|
|
10702
|
-
).join(issueSeparator);
|
|
10703
|
-
const message = prefixMessage(reason, prefix, prefixSeparator);
|
|
11157
|
+
let message;
|
|
11158
|
+
if (isNonEmptyArray(zodIssues)) {
|
|
11159
|
+
const messageBuilder = createMessageBuilderFromOptions2(options);
|
|
11160
|
+
message = messageBuilder(zodIssues);
|
|
11161
|
+
} else {
|
|
11162
|
+
message = zodError.message;
|
|
11163
|
+
}
|
|
10704
11164
|
return new ValidationError(message, { cause: zodError });
|
|
10705
11165
|
}
|
|
11166
|
+
function createMessageBuilderFromOptions2(options) {
|
|
11167
|
+
if ("messageBuilder" in options) {
|
|
11168
|
+
return options.messageBuilder;
|
|
11169
|
+
}
|
|
11170
|
+
return createMessageBuilder(options);
|
|
11171
|
+
}
|
|
10706
11172
|
var toValidationError = (options = {}) => (err) => {
|
|
10707
11173
|
if (isZodErrorLike(err)) {
|
|
10708
11174
|
return fromZodErrorWithoutRuntimeCheck(err, options);
|
|
@@ -10782,40 +11248,40 @@ function isValidate(opts, schema) {
|
|
|
10782
11248
|
}
|
|
10783
11249
|
|
|
10784
11250
|
// src/builtin-plugin/HtmlRspackPlugin.ts
|
|
10785
|
-
var templateRenderFunction =
|
|
10786
|
-
|
|
11251
|
+
var templateRenderFunction = import_zod3.z.function().args(import_zod3.z.record(import_zod3.z.string(), import_zod3.z.any())).returns(
|
|
11252
|
+
import_zod3.z.string().or(import_zod3.z.promise(import_zod3.z.string()))
|
|
10787
11253
|
);
|
|
10788
|
-
var templateParamFunction =
|
|
10789
|
-
|
|
11254
|
+
var templateParamFunction = import_zod3.z.function().args(import_zod3.z.record(import_zod3.z.string(), import_zod3.z.any())).returns(
|
|
11255
|
+
import_zod3.z.record(import_zod3.z.string(), import_zod3.z.any()).or(import_zod3.z.promise(import_zod3.z.record(import_zod3.z.string(), import_zod3.z.any())))
|
|
10790
11256
|
);
|
|
10791
|
-
var templateFilenameFunction =
|
|
10792
|
-
var htmlRspackPluginOptions =
|
|
10793
|
-
filename:
|
|
10794
|
-
template:
|
|
11257
|
+
var templateFilenameFunction = import_zod3.z.function().args(import_zod3.z.string()).returns(import_zod3.z.string());
|
|
11258
|
+
var htmlRspackPluginOptions = import_zod3.z.strictObject({
|
|
11259
|
+
filename: import_zod3.z.string().or(templateFilenameFunction).optional(),
|
|
11260
|
+
template: import_zod3.z.string().refine(
|
|
10795
11261
|
(val) => !val.includes("!"),
|
|
10796
11262
|
() => ({
|
|
10797
11263
|
message: "HtmlRspackPlugin does not support template path with loader yet"
|
|
10798
11264
|
})
|
|
10799
11265
|
).optional(),
|
|
10800
|
-
templateContent:
|
|
10801
|
-
templateParameters:
|
|
10802
|
-
inject:
|
|
10803
|
-
publicPath:
|
|
10804
|
-
base:
|
|
10805
|
-
|
|
10806
|
-
href:
|
|
10807
|
-
target:
|
|
11266
|
+
templateContent: import_zod3.z.string().or(templateRenderFunction).optional(),
|
|
11267
|
+
templateParameters: import_zod3.z.record(import_zod3.z.string()).or(import_zod3.z.boolean()).or(templateParamFunction).optional(),
|
|
11268
|
+
inject: import_zod3.z.enum(["head", "body"]).or(import_zod3.z.boolean()).optional(),
|
|
11269
|
+
publicPath: import_zod3.z.string().optional(),
|
|
11270
|
+
base: import_zod3.z.string().or(
|
|
11271
|
+
import_zod3.z.strictObject({
|
|
11272
|
+
href: import_zod3.z.string().optional(),
|
|
11273
|
+
target: import_zod3.z.enum(["_self", "_blank", "_parent", "_top"]).optional()
|
|
10808
11274
|
})
|
|
10809
11275
|
).optional(),
|
|
10810
|
-
scriptLoading:
|
|
10811
|
-
chunks:
|
|
10812
|
-
excludeChunks:
|
|
10813
|
-
sri:
|
|
10814
|
-
minify:
|
|
10815
|
-
title:
|
|
10816
|
-
favicon:
|
|
10817
|
-
meta:
|
|
10818
|
-
hash:
|
|
11276
|
+
scriptLoading: import_zod3.z.enum(["blocking", "defer", "module", "systemjs-module"]).optional(),
|
|
11277
|
+
chunks: import_zod3.z.string().array().optional(),
|
|
11278
|
+
excludeChunks: import_zod3.z.string().array().optional(),
|
|
11279
|
+
sri: import_zod3.z.enum(["sha256", "sha384", "sha512"]).optional(),
|
|
11280
|
+
minify: import_zod3.z.boolean().optional(),
|
|
11281
|
+
title: import_zod3.z.string().optional(),
|
|
11282
|
+
favicon: import_zod3.z.string().optional(),
|
|
11283
|
+
meta: import_zod3.z.record(import_zod3.z.string().or(import_zod3.z.record(import_zod3.z.string()))).optional(),
|
|
11284
|
+
hash: import_zod3.z.boolean().optional()
|
|
10819
11285
|
});
|
|
10820
11286
|
var HtmlRspackPluginImpl = create2(
|
|
10821
11287
|
import_binding39.BuiltinPluginName.HtmlRspackPlugin,
|
|
@@ -11068,14 +11534,14 @@ var HttpExternalsRspackPlugin = create2(
|
|
|
11068
11534
|
|
|
11069
11535
|
// src/builtin-plugin/IgnorePlugin.ts
|
|
11070
11536
|
var import_binding41 = require("@rspack/binding");
|
|
11071
|
-
var
|
|
11072
|
-
var IgnorePluginOptions =
|
|
11073
|
-
|
|
11074
|
-
contextRegExp:
|
|
11075
|
-
resourceRegExp:
|
|
11537
|
+
var import_zod4 = require("../compiled/zod/index.js");
|
|
11538
|
+
var IgnorePluginOptions = import_zod4.z.union([
|
|
11539
|
+
import_zod4.z.object({
|
|
11540
|
+
contextRegExp: import_zod4.z.instanceof(RegExp).optional(),
|
|
11541
|
+
resourceRegExp: import_zod4.z.instanceof(RegExp)
|
|
11076
11542
|
}),
|
|
11077
|
-
|
|
11078
|
-
checkResource:
|
|
11543
|
+
import_zod4.z.object({
|
|
11544
|
+
checkResource: import_zod4.z.function(import_zod4.z.tuple([import_zod4.z.string(), import_zod4.z.string()]), import_zod4.z.boolean())
|
|
11079
11545
|
})
|
|
11080
11546
|
]);
|
|
11081
11547
|
var IgnorePlugin = create2(
|
|
@@ -11330,11 +11796,39 @@ var LimitChunkCountPlugin = create2(
|
|
|
11330
11796
|
|
|
11331
11797
|
// src/builtin-plugin/MangleExportsPlugin.ts
|
|
11332
11798
|
var import_binding48 = require("@rspack/binding");
|
|
11333
|
-
var MangleExportsPlugin =
|
|
11334
|
-
|
|
11335
|
-
|
|
11336
|
-
|
|
11337
|
-
|
|
11799
|
+
var MangleExportsPlugin = class extends RspackBuiltinPlugin {
|
|
11800
|
+
constructor(deterministic) {
|
|
11801
|
+
super();
|
|
11802
|
+
this.deterministic = deterministic;
|
|
11803
|
+
this.name = import_binding48.BuiltinPluginName.MangleExportsPlugin;
|
|
11804
|
+
this.affectedHooks = "compilation";
|
|
11805
|
+
}
|
|
11806
|
+
raw(compiler) {
|
|
11807
|
+
const incremental2 = compiler.options.experiments.incremental;
|
|
11808
|
+
const logger = compiler.getInfrastructureLogger(
|
|
11809
|
+
"rspack.MangleExportsPlugin"
|
|
11810
|
+
);
|
|
11811
|
+
if (incremental2.modulesHashes) {
|
|
11812
|
+
incremental2.modulesHashes = false;
|
|
11813
|
+
logger.warn(
|
|
11814
|
+
"`optimization.mangleExports` can't be used with `incremental.modulesHashes` as export mangling is a global effect. `incremental.modulesHashes` has been overridden to false."
|
|
11815
|
+
);
|
|
11816
|
+
}
|
|
11817
|
+
if (incremental2.modulesCodegen) {
|
|
11818
|
+
incremental2.modulesCodegen = false;
|
|
11819
|
+
logger.warn(
|
|
11820
|
+
"`optimization.mangleExports` can't be used with `incremental.modulesCodegen` as export mangling is a global effect. `incremental.modulesCodegen` has been overridden to false."
|
|
11821
|
+
);
|
|
11822
|
+
}
|
|
11823
|
+
if (incremental2.modulesRuntimeRequirements) {
|
|
11824
|
+
incremental2.modulesRuntimeRequirements = false;
|
|
11825
|
+
logger.warn(
|
|
11826
|
+
"`optimization.mangleExports` can't be used with `incremental.modulesRuntimeRequirements` as export mangling is a global effect. `incremental.modulesRuntimeRequirements` has been overridden to false."
|
|
11827
|
+
);
|
|
11828
|
+
}
|
|
11829
|
+
return createBuiltinPlugin(this.name, this.deterministic);
|
|
11830
|
+
}
|
|
11831
|
+
};
|
|
11338
11832
|
|
|
11339
11833
|
// src/builtin-plugin/MergeDuplicateChunksPlugin.ts
|
|
11340
11834
|
var import_binding49 = require("@rspack/binding");
|
|
@@ -11354,12 +11848,38 @@ var ModuleChunkFormatPlugin = create2(
|
|
|
11354
11848
|
|
|
11355
11849
|
// src/builtin-plugin/ModuleConcatenationPlugin.ts
|
|
11356
11850
|
var import_binding51 = require("@rspack/binding");
|
|
11357
|
-
var ModuleConcatenationPlugin =
|
|
11358
|
-
|
|
11359
|
-
|
|
11360
|
-
|
|
11361
|
-
|
|
11362
|
-
|
|
11851
|
+
var ModuleConcatenationPlugin = class extends RspackBuiltinPlugin {
|
|
11852
|
+
constructor() {
|
|
11853
|
+
super(...arguments);
|
|
11854
|
+
this.name = import_binding51.BuiltinPluginName.ModuleConcatenationPlugin;
|
|
11855
|
+
this.affectedHooks = "compilation";
|
|
11856
|
+
}
|
|
11857
|
+
raw(compiler) {
|
|
11858
|
+
const incremental2 = compiler.options.experiments.incremental;
|
|
11859
|
+
const logger = compiler.getInfrastructureLogger(
|
|
11860
|
+
"rspack.ModuleConcatenationPlugin"
|
|
11861
|
+
);
|
|
11862
|
+
if (incremental2.modulesHashes) {
|
|
11863
|
+
incremental2.modulesHashes = false;
|
|
11864
|
+
logger.warn(
|
|
11865
|
+
"`optimization.concatenateModules` can't be used with `incremental.modulesHashes` as module concatenation is a global effect. `incremental.modulesHashes` has been overridden to false."
|
|
11866
|
+
);
|
|
11867
|
+
}
|
|
11868
|
+
if (incremental2.modulesCodegen) {
|
|
11869
|
+
incremental2.modulesCodegen = false;
|
|
11870
|
+
logger.warn(
|
|
11871
|
+
"`optimization.concatenateModules` can't be used with `incremental.modulesCodegen` as module concatenation is a global effect. `incremental.modulesCodegen` has been overridden to false."
|
|
11872
|
+
);
|
|
11873
|
+
}
|
|
11874
|
+
if (incremental2.modulesRuntimeRequirements) {
|
|
11875
|
+
incremental2.modulesRuntimeRequirements = false;
|
|
11876
|
+
logger.warn(
|
|
11877
|
+
"`optimization.concatenateModules` can't be used with `incremental.modulesRuntimeRequirements` as module concatenation is a global effect. `incremental.modulesRuntimeRequirements` has been overridden to false."
|
|
11878
|
+
);
|
|
11879
|
+
}
|
|
11880
|
+
return createBuiltinPlugin(this.name, void 0);
|
|
11881
|
+
}
|
|
11882
|
+
};
|
|
11363
11883
|
|
|
11364
11884
|
// src/builtin-plugin/NamedChunkIdsPlugin.ts
|
|
11365
11885
|
var import_binding52 = require("@rspack/binding");
|
|
@@ -11881,6 +12401,43 @@ var ContextReplacementPlugin = create2(
|
|
|
11881
12401
|
}
|
|
11882
12402
|
);
|
|
11883
12403
|
|
|
12404
|
+
// src/builtin-plugin/LibManifestPlugin.ts
|
|
12405
|
+
var import_binding76 = require("@rspack/binding");
|
|
12406
|
+
var LibManifestPlugin = create2(
|
|
12407
|
+
import_binding76.BuiltinPluginName.LibManifestPlugin,
|
|
12408
|
+
(options) => {
|
|
12409
|
+
const { context: context2, entryOnly, format: format3, name: name2, path: path10, type } = options;
|
|
12410
|
+
return {
|
|
12411
|
+
context: context2,
|
|
12412
|
+
entryOnly,
|
|
12413
|
+
format: format3,
|
|
12414
|
+
name: name2,
|
|
12415
|
+
path: path10,
|
|
12416
|
+
type
|
|
12417
|
+
};
|
|
12418
|
+
}
|
|
12419
|
+
);
|
|
12420
|
+
|
|
12421
|
+
// src/builtin-plugin/DllEntryPlugin.ts
|
|
12422
|
+
var import_binding77 = require("@rspack/binding");
|
|
12423
|
+
var DllEntryPlugin = create2(
|
|
12424
|
+
import_binding77.BuiltinPluginName.DllEntryPlugin,
|
|
12425
|
+
(context2, entries, options) => {
|
|
12426
|
+
return {
|
|
12427
|
+
context: context2,
|
|
12428
|
+
entries,
|
|
12429
|
+
name: options.name
|
|
12430
|
+
};
|
|
12431
|
+
}
|
|
12432
|
+
);
|
|
12433
|
+
|
|
12434
|
+
// src/builtin-plugin/DllReferenceAgencyPlugin.ts
|
|
12435
|
+
var import_binding78 = require("@rspack/binding");
|
|
12436
|
+
var DllReferenceAgencyPlugin = create2(
|
|
12437
|
+
import_binding78.BuiltinPluginName.DllReferenceAgencyPlugin,
|
|
12438
|
+
(options) => options
|
|
12439
|
+
);
|
|
12440
|
+
|
|
11884
12441
|
// src/ContextModuleFactory.ts
|
|
11885
12442
|
var liteTapable5 = __toESM(require("@rspack/lite-tapable"));
|
|
11886
12443
|
var ContextModuleFactory = class {
|
|
@@ -12524,6 +13081,7 @@ var checkVersion = () => {
|
|
|
12524
13081
|
};
|
|
12525
13082
|
|
|
12526
13083
|
// src/Compiler.ts
|
|
13084
|
+
var COMPILATION_WEAK_MAP = /* @__PURE__ */ new WeakMap();
|
|
12527
13085
|
var Compiler = class _Compiler {
|
|
12528
13086
|
#instance;
|
|
12529
13087
|
#initial;
|
|
@@ -12601,6 +13159,9 @@ var Compiler = class _Compiler {
|
|
|
12601
13159
|
this.watchMode = false;
|
|
12602
13160
|
new JsLoaderRspackPlugin(this).apply(this);
|
|
12603
13161
|
new ExecuteModulePlugin().apply(this);
|
|
13162
|
+
this.hooks.shutdown.tap("rspack:cleanup", () => {
|
|
13163
|
+
this.#instance = void 0;
|
|
13164
|
+
});
|
|
12604
13165
|
}
|
|
12605
13166
|
get recordsInputPath() {
|
|
12606
13167
|
return unsupported("Compiler.recordsInputPath");
|
|
@@ -12990,8 +13551,12 @@ var Compiler = class _Compiler {
|
|
|
12990
13551
|
});
|
|
12991
13552
|
}
|
|
12992
13553
|
#createCompilation(native) {
|
|
12993
|
-
|
|
12994
|
-
compilation
|
|
13554
|
+
let compilation = COMPILATION_WEAK_MAP.get(native);
|
|
13555
|
+
if (!compilation) {
|
|
13556
|
+
compilation = new Compilation(this, native);
|
|
13557
|
+
compilation.name = this.name;
|
|
13558
|
+
COMPILATION_WEAK_MAP.set(native, compilation);
|
|
13559
|
+
}
|
|
12995
13560
|
this.#compilation = compilation;
|
|
12996
13561
|
return compilation;
|
|
12997
13562
|
}
|
|
@@ -13031,467 +13596,797 @@ var Compiler = class _Compiler {
|
|
|
13031
13596
|
this.#ruleSet.builtinReferences.entries()
|
|
13032
13597
|
);
|
|
13033
13598
|
const instanceBinding = require("@rspack/binding");
|
|
13599
|
+
const that = new WeakRef(this);
|
|
13034
13600
|
this.#registers = {
|
|
13035
13601
|
registerCompilerThisCompilationTaps: this.#createHookRegisterTaps(
|
|
13036
13602
|
binding2.RegisterJsTapKind.CompilerThisCompilation,
|
|
13037
|
-
|
|
13038
|
-
(
|
|
13039
|
-
|
|
13040
|
-
|
|
13041
|
-
|
|
13042
|
-
|
|
13603
|
+
// biome-ignore lint/complexity/useArrowFunction: <explanation>
|
|
13604
|
+
function() {
|
|
13605
|
+
return that.deref().hooks.thisCompilation;
|
|
13606
|
+
},
|
|
13607
|
+
// biome-ignore lint/complexity/useArrowFunction: <explanation>
|
|
13608
|
+
function(queried) {
|
|
13609
|
+
return function(native) {
|
|
13610
|
+
that.deref().#createCompilation(native);
|
|
13611
|
+
return queried.call(
|
|
13612
|
+
that.deref().#compilation,
|
|
13613
|
+
that.deref().#compilationParams
|
|
13614
|
+
);
|
|
13615
|
+
};
|
|
13043
13616
|
}
|
|
13044
13617
|
),
|
|
13045
13618
|
registerCompilerCompilationTaps: this.#createHookRegisterTaps(
|
|
13046
13619
|
binding2.RegisterJsTapKind.CompilerCompilation,
|
|
13047
|
-
|
|
13048
|
-
(
|
|
13620
|
+
// biome-ignore lint/complexity/useArrowFunction: <explanation>
|
|
13621
|
+
function() {
|
|
13622
|
+
return that.deref().hooks.compilation;
|
|
13623
|
+
},
|
|
13624
|
+
// biome-ignore lint/complexity/useArrowFunction: <explanation>
|
|
13625
|
+
function(queried) {
|
|
13626
|
+
return function() {
|
|
13627
|
+
return queried.call(
|
|
13628
|
+
that.deref().#compilation,
|
|
13629
|
+
that.deref().#compilationParams
|
|
13630
|
+
);
|
|
13631
|
+
};
|
|
13632
|
+
}
|
|
13049
13633
|
),
|
|
13050
13634
|
registerCompilerMakeTaps: this.#createHookRegisterTaps(
|
|
13051
13635
|
binding2.RegisterJsTapKind.CompilerMake,
|
|
13052
|
-
|
|
13053
|
-
(
|
|
13636
|
+
// biome-ignore lint/complexity/useArrowFunction: <explanation>
|
|
13637
|
+
function() {
|
|
13638
|
+
return that.deref().hooks.make;
|
|
13639
|
+
},
|
|
13640
|
+
// biome-ignore lint/complexity/useArrowFunction: <explanation>
|
|
13641
|
+
function(queried) {
|
|
13642
|
+
return async function() {
|
|
13643
|
+
return await queried.promise(that.deref().#compilation);
|
|
13644
|
+
};
|
|
13645
|
+
}
|
|
13054
13646
|
),
|
|
13055
13647
|
registerCompilerFinishMakeTaps: this.#createHookRegisterTaps(
|
|
13056
13648
|
binding2.RegisterJsTapKind.CompilerFinishMake,
|
|
13057
|
-
|
|
13058
|
-
(
|
|
13649
|
+
// biome-ignore lint/complexity/useArrowFunction: <explanation>
|
|
13650
|
+
function() {
|
|
13651
|
+
return that.deref().hooks.finishMake;
|
|
13652
|
+
},
|
|
13653
|
+
// biome-ignore lint/complexity/useArrowFunction: <explanation>
|
|
13654
|
+
function(queried) {
|
|
13655
|
+
return async function() {
|
|
13656
|
+
return await queried.promise(that.deref().#compilation);
|
|
13657
|
+
};
|
|
13658
|
+
}
|
|
13059
13659
|
),
|
|
13060
13660
|
registerCompilerShouldEmitTaps: this.#createHookRegisterTaps(
|
|
13061
13661
|
binding2.RegisterJsTapKind.CompilerShouldEmit,
|
|
13062
|
-
|
|
13063
|
-
(
|
|
13662
|
+
// biome-ignore lint/complexity/useArrowFunction: <explanation>
|
|
13663
|
+
function() {
|
|
13664
|
+
return that.deref().hooks.shouldEmit;
|
|
13665
|
+
},
|
|
13666
|
+
// biome-ignore lint/complexity/useArrowFunction: <explanation>
|
|
13667
|
+
function(queried) {
|
|
13668
|
+
return function() {
|
|
13669
|
+
return queried.call(that.deref().#compilation);
|
|
13670
|
+
};
|
|
13671
|
+
}
|
|
13064
13672
|
),
|
|
13065
13673
|
registerCompilerEmitTaps: this.#createHookRegisterTaps(
|
|
13066
13674
|
binding2.RegisterJsTapKind.CompilerEmit,
|
|
13067
|
-
|
|
13068
|
-
(
|
|
13675
|
+
// biome-ignore lint/complexity/useArrowFunction: <explanation>
|
|
13676
|
+
function() {
|
|
13677
|
+
return that.deref().hooks.emit;
|
|
13678
|
+
},
|
|
13679
|
+
// biome-ignore lint/complexity/useArrowFunction: <explanation>
|
|
13680
|
+
function(queried) {
|
|
13681
|
+
return async function() {
|
|
13682
|
+
return await queried.promise(that.deref().#compilation);
|
|
13683
|
+
};
|
|
13684
|
+
}
|
|
13069
13685
|
),
|
|
13070
13686
|
registerCompilerAfterEmitTaps: this.#createHookRegisterTaps(
|
|
13071
13687
|
binding2.RegisterJsTapKind.CompilerAfterEmit,
|
|
13072
|
-
|
|
13073
|
-
(
|
|
13688
|
+
// biome-ignore lint/complexity/useArrowFunction: <explanation>
|
|
13689
|
+
function() {
|
|
13690
|
+
return that.deref().hooks.afterEmit;
|
|
13691
|
+
},
|
|
13692
|
+
// biome-ignore lint/complexity/useArrowFunction: <explanation>
|
|
13693
|
+
function(queried) {
|
|
13694
|
+
return async function() {
|
|
13695
|
+
return await queried.promise(that.deref().#compilation);
|
|
13696
|
+
};
|
|
13697
|
+
}
|
|
13074
13698
|
),
|
|
13075
13699
|
registerCompilerAssetEmittedTaps: this.#createHookRegisterTaps(
|
|
13076
13700
|
binding2.RegisterJsTapKind.CompilerAssetEmitted,
|
|
13077
|
-
|
|
13078
|
-
(
|
|
13079
|
-
|
|
13080
|
-
|
|
13081
|
-
|
|
13082
|
-
|
|
13083
|
-
return
|
|
13084
|
-
|
|
13701
|
+
// biome-ignore lint/complexity/useArrowFunction: <explanation>
|
|
13702
|
+
function() {
|
|
13703
|
+
return that.deref().hooks.assetEmitted;
|
|
13704
|
+
},
|
|
13705
|
+
// biome-ignore lint/complexity/useArrowFunction: <explanation>
|
|
13706
|
+
function(queried) {
|
|
13707
|
+
return async function({
|
|
13708
|
+
filename: filename2,
|
|
13085
13709
|
targetPath,
|
|
13086
|
-
outputPath
|
|
13087
|
-
|
|
13088
|
-
|
|
13089
|
-
|
|
13090
|
-
|
|
13091
|
-
|
|
13092
|
-
|
|
13093
|
-
|
|
13094
|
-
|
|
13095
|
-
|
|
13710
|
+
outputPath
|
|
13711
|
+
}) {
|
|
13712
|
+
return queried.promise(filename2, {
|
|
13713
|
+
compilation: that.deref().#compilation,
|
|
13714
|
+
targetPath,
|
|
13715
|
+
outputPath,
|
|
13716
|
+
get source() {
|
|
13717
|
+
var _a;
|
|
13718
|
+
return (_a = that.deref().#compilation.getAsset(filename2)) == null ? void 0 : _a.source;
|
|
13719
|
+
},
|
|
13720
|
+
get content() {
|
|
13721
|
+
var _a;
|
|
13722
|
+
return (_a = this.source) == null ? void 0 : _a.buffer();
|
|
13723
|
+
}
|
|
13724
|
+
});
|
|
13725
|
+
};
|
|
13096
13726
|
}
|
|
13097
13727
|
),
|
|
13098
13728
|
registerCompilationAdditionalTreeRuntimeRequirements: this.#createHookRegisterTaps(
|
|
13099
13729
|
binding2.RegisterJsTapKind.CompilationAdditionalTreeRuntimeRequirements,
|
|
13100
|
-
|
|
13101
|
-
(
|
|
13102
|
-
|
|
13103
|
-
|
|
13104
|
-
|
|
13105
|
-
|
|
13106
|
-
|
|
13107
|
-
|
|
13108
|
-
|
|
13109
|
-
)
|
|
13110
|
-
|
|
13111
|
-
|
|
13730
|
+
// biome-ignore lint/complexity/useArrowFunction: <explanation>
|
|
13731
|
+
function() {
|
|
13732
|
+
return that.deref().#compilation.hooks.additionalTreeRuntimeRequirements;
|
|
13733
|
+
},
|
|
13734
|
+
// biome-ignore lint/complexity/useArrowFunction: <explanation>
|
|
13735
|
+
function(queried) {
|
|
13736
|
+
return function({
|
|
13737
|
+
chunk,
|
|
13738
|
+
runtimeRequirements
|
|
13739
|
+
}) {
|
|
13740
|
+
const set = __from_binding_runtime_globals(runtimeRequirements);
|
|
13741
|
+
queried.call(
|
|
13742
|
+
Chunk.__from_binding(chunk, that.deref().#compilation),
|
|
13743
|
+
set
|
|
13744
|
+
);
|
|
13745
|
+
return {
|
|
13746
|
+
runtimeRequirements: __to_binding_runtime_globals(set)
|
|
13747
|
+
};
|
|
13112
13748
|
};
|
|
13113
13749
|
}
|
|
13114
13750
|
),
|
|
13115
13751
|
registerCompilationRuntimeRequirementInTree: this.#createHookMapRegisterTaps(
|
|
13116
13752
|
binding2.RegisterJsTapKind.CompilationRuntimeRequirementInTree,
|
|
13117
|
-
|
|
13118
|
-
(
|
|
13119
|
-
|
|
13120
|
-
|
|
13121
|
-
|
|
13122
|
-
|
|
13123
|
-
|
|
13124
|
-
|
|
13125
|
-
|
|
13126
|
-
}
|
|
13127
|
-
|
|
13128
|
-
|
|
13753
|
+
// biome-ignore lint/complexity/useArrowFunction: <explanation>
|
|
13754
|
+
function() {
|
|
13755
|
+
return that.deref().#compilation.hooks.runtimeRequirementInTree;
|
|
13756
|
+
},
|
|
13757
|
+
// biome-ignore lint/complexity/useArrowFunction: <explanation>
|
|
13758
|
+
function(queried) {
|
|
13759
|
+
return function({
|
|
13760
|
+
chunk: rawChunk,
|
|
13761
|
+
runtimeRequirements
|
|
13762
|
+
}) {
|
|
13763
|
+
const set = __from_binding_runtime_globals(runtimeRequirements);
|
|
13764
|
+
const chunk = Chunk.__from_binding(
|
|
13765
|
+
rawChunk,
|
|
13766
|
+
that.deref().#compilation
|
|
13767
|
+
);
|
|
13768
|
+
for (const r of set) {
|
|
13769
|
+
queried.for(r).call(chunk, set);
|
|
13770
|
+
}
|
|
13771
|
+
return {
|
|
13772
|
+
runtimeRequirements: __to_binding_runtime_globals(set)
|
|
13773
|
+
};
|
|
13129
13774
|
};
|
|
13130
13775
|
}
|
|
13131
13776
|
),
|
|
13132
13777
|
registerCompilationRuntimeModuleTaps: this.#createHookRegisterTaps(
|
|
13133
13778
|
binding2.RegisterJsTapKind.CompilationRuntimeModule,
|
|
13134
|
-
|
|
13135
|
-
(
|
|
13136
|
-
|
|
13137
|
-
|
|
13138
|
-
|
|
13139
|
-
|
|
13140
|
-
|
|
13141
|
-
|
|
13142
|
-
|
|
13143
|
-
|
|
13144
|
-
|
|
13145
|
-
|
|
13146
|
-
|
|
13779
|
+
// biome-ignore lint/complexity/useArrowFunction: <explanation>
|
|
13780
|
+
function() {
|
|
13781
|
+
return that.deref().#compilation.hooks.runtimeModule;
|
|
13782
|
+
},
|
|
13783
|
+
// biome-ignore lint/complexity/useArrowFunction: <explanation>
|
|
13784
|
+
function(queried) {
|
|
13785
|
+
return function({ module: module2, chunk }) {
|
|
13786
|
+
var _a, _b;
|
|
13787
|
+
const originSource = (_a = module2.source) == null ? void 0 : _a.source;
|
|
13788
|
+
queried.call(
|
|
13789
|
+
module2,
|
|
13790
|
+
Chunk.__from_binding(chunk, that.deref().#compilation)
|
|
13791
|
+
);
|
|
13792
|
+
const newSource = (_b = module2.source) == null ? void 0 : _b.source;
|
|
13793
|
+
if (newSource && newSource !== originSource) {
|
|
13794
|
+
return module2;
|
|
13795
|
+
}
|
|
13796
|
+
return;
|
|
13797
|
+
};
|
|
13147
13798
|
}
|
|
13148
13799
|
),
|
|
13149
13800
|
registerCompilationBuildModuleTaps: this.#createHookRegisterTaps(
|
|
13150
13801
|
binding2.RegisterJsTapKind.CompilationBuildModule,
|
|
13151
|
-
|
|
13152
|
-
(
|
|
13802
|
+
// biome-ignore lint/complexity/useArrowFunction: <explanation>
|
|
13803
|
+
function() {
|
|
13804
|
+
return that.deref().#compilation.hooks.buildModule;
|
|
13805
|
+
},
|
|
13806
|
+
// biome-ignore lint/complexity/useArrowFunction: <explanation>
|
|
13807
|
+
function(queried) {
|
|
13808
|
+
return function(m) {
|
|
13809
|
+
return queried.call(
|
|
13810
|
+
Module.__from_binding(m, that.deref().#compilation)
|
|
13811
|
+
);
|
|
13812
|
+
};
|
|
13813
|
+
}
|
|
13153
13814
|
),
|
|
13154
13815
|
registerCompilationStillValidModuleTaps: this.#createHookRegisterTaps(
|
|
13155
13816
|
binding2.RegisterJsTapKind.CompilationStillValidModule,
|
|
13156
|
-
|
|
13157
|
-
(
|
|
13817
|
+
// biome-ignore lint/complexity/useArrowFunction: <explanation>
|
|
13818
|
+
function() {
|
|
13819
|
+
return that.deref().#compilation.hooks.stillValidModule;
|
|
13820
|
+
},
|
|
13821
|
+
// biome-ignore lint/complexity/useArrowFunction: <explanation>
|
|
13822
|
+
function(queried) {
|
|
13823
|
+
return function(m) {
|
|
13824
|
+
return queried.call(
|
|
13825
|
+
Module.__from_binding(m, that.deref().#compilation)
|
|
13826
|
+
);
|
|
13827
|
+
};
|
|
13828
|
+
}
|
|
13158
13829
|
),
|
|
13159
13830
|
registerCompilationSucceedModuleTaps: this.#createHookRegisterTaps(
|
|
13160
13831
|
binding2.RegisterJsTapKind.CompilationSucceedModule,
|
|
13161
|
-
|
|
13162
|
-
(
|
|
13832
|
+
// biome-ignore lint/complexity/useArrowFunction: <explanation>
|
|
13833
|
+
function() {
|
|
13834
|
+
return that.deref().#compilation.hooks.succeedModule;
|
|
13835
|
+
},
|
|
13836
|
+
// biome-ignore lint/complexity/useArrowFunction: <explanation>
|
|
13837
|
+
function(queried) {
|
|
13838
|
+
return function(m) {
|
|
13839
|
+
return queried.call(
|
|
13840
|
+
Module.__from_binding(m, that.deref().#compilation)
|
|
13841
|
+
);
|
|
13842
|
+
};
|
|
13843
|
+
}
|
|
13163
13844
|
),
|
|
13164
13845
|
registerCompilationExecuteModuleTaps: this.#createHookRegisterTaps(
|
|
13165
13846
|
binding2.RegisterJsTapKind.CompilationExecuteModule,
|
|
13166
|
-
|
|
13167
|
-
(
|
|
13168
|
-
|
|
13169
|
-
|
|
13170
|
-
|
|
13171
|
-
|
|
13172
|
-
|
|
13173
|
-
|
|
13174
|
-
|
|
13175
|
-
|
|
13176
|
-
|
|
13177
|
-
|
|
13178
|
-
|
|
13179
|
-
|
|
13180
|
-
|
|
13181
|
-
|
|
13847
|
+
// biome-ignore lint/complexity/useArrowFunction: <explanation>
|
|
13848
|
+
function() {
|
|
13849
|
+
return that.deref().#compilation.hooks.executeModule;
|
|
13850
|
+
},
|
|
13851
|
+
// biome-ignore lint/complexity/useArrowFunction: <explanation>
|
|
13852
|
+
function(queried) {
|
|
13853
|
+
return function({
|
|
13854
|
+
entry: entry2,
|
|
13855
|
+
id,
|
|
13856
|
+
codegenResults,
|
|
13857
|
+
runtimeModules
|
|
13858
|
+
}) {
|
|
13859
|
+
const __webpack_require__ = (id2) => {
|
|
13860
|
+
const cached = moduleCache[id2];
|
|
13861
|
+
if (cached !== void 0) {
|
|
13862
|
+
if (cached.error) throw cached.error;
|
|
13863
|
+
return cached.exports;
|
|
13864
|
+
}
|
|
13865
|
+
const execOptions = {
|
|
13182
13866
|
id: id2,
|
|
13183
|
-
|
|
13184
|
-
|
|
13185
|
-
|
|
13186
|
-
|
|
13187
|
-
|
|
13867
|
+
module: {
|
|
13868
|
+
id: id2,
|
|
13869
|
+
exports: {},
|
|
13870
|
+
loaded: false,
|
|
13871
|
+
error: void 0
|
|
13872
|
+
},
|
|
13873
|
+
require: __webpack_require__
|
|
13874
|
+
};
|
|
13875
|
+
for (const handler of interceptModuleExecution) {
|
|
13876
|
+
handler(execOptions);
|
|
13877
|
+
}
|
|
13878
|
+
const result2 = codegenResults.map[id2]["build time"];
|
|
13879
|
+
const moduleObject = execOptions.module;
|
|
13880
|
+
if (id2) moduleCache[id2] = moduleObject;
|
|
13881
|
+
tryRunOrWebpackError(
|
|
13882
|
+
() => queried.call(
|
|
13883
|
+
{
|
|
13884
|
+
codeGenerationResult: new CodeGenerationResult(result2),
|
|
13885
|
+
moduleObject
|
|
13886
|
+
},
|
|
13887
|
+
{ __webpack_require__ }
|
|
13888
|
+
),
|
|
13889
|
+
"Compilation.hooks.executeModule"
|
|
13890
|
+
);
|
|
13891
|
+
moduleObject.loaded = true;
|
|
13892
|
+
return moduleObject.exports;
|
|
13188
13893
|
};
|
|
13189
|
-
|
|
13190
|
-
|
|
13894
|
+
const moduleCache = __webpack_require__[RuntimeGlobals.moduleCache.replace(
|
|
13895
|
+
`${RuntimeGlobals.require}.`,
|
|
13896
|
+
""
|
|
13897
|
+
)] = {};
|
|
13898
|
+
const interceptModuleExecution = __webpack_require__[RuntimeGlobals.interceptModuleExecution.replace(
|
|
13899
|
+
`${RuntimeGlobals.require}.`,
|
|
13900
|
+
""
|
|
13901
|
+
)] = [];
|
|
13902
|
+
for (const runtimeModule of runtimeModules) {
|
|
13903
|
+
__webpack_require__(runtimeModule);
|
|
13191
13904
|
}
|
|
13192
|
-
const
|
|
13193
|
-
|
|
13194
|
-
if (id2) moduleCache[id2] = moduleObject;
|
|
13195
|
-
tryRunOrWebpackError(
|
|
13196
|
-
() => queried.call(
|
|
13197
|
-
{
|
|
13198
|
-
codeGenerationResult: new CodeGenerationResult(result2),
|
|
13199
|
-
moduleObject
|
|
13200
|
-
},
|
|
13201
|
-
{ __webpack_require__ }
|
|
13202
|
-
),
|
|
13203
|
-
"Compilation.hooks.executeModule"
|
|
13204
|
-
);
|
|
13205
|
-
moduleObject.loaded = true;
|
|
13206
|
-
return moduleObject.exports;
|
|
13905
|
+
const executeResult = __webpack_require__(entry2);
|
|
13906
|
+
that.deref().#moduleExecutionResultsMap.set(id, executeResult);
|
|
13207
13907
|
};
|
|
13208
|
-
const moduleCache = __webpack_require__[RuntimeGlobals.moduleCache.replace(
|
|
13209
|
-
`${RuntimeGlobals.require}.`,
|
|
13210
|
-
""
|
|
13211
|
-
)] = {};
|
|
13212
|
-
const interceptModuleExecution = __webpack_require__[RuntimeGlobals.interceptModuleExecution.replace(
|
|
13213
|
-
`${RuntimeGlobals.require}.`,
|
|
13214
|
-
""
|
|
13215
|
-
)] = [];
|
|
13216
|
-
for (const runtimeModule of runtimeModules) {
|
|
13217
|
-
__webpack_require__(runtimeModule);
|
|
13218
|
-
}
|
|
13219
|
-
const executeResult = __webpack_require__(entry2);
|
|
13220
|
-
this.#moduleExecutionResultsMap.set(id, executeResult);
|
|
13221
13908
|
}
|
|
13222
13909
|
),
|
|
13223
13910
|
registerCompilationFinishModulesTaps: this.#createHookRegisterTaps(
|
|
13224
13911
|
binding2.RegisterJsTapKind.CompilationFinishModules,
|
|
13225
|
-
|
|
13226
|
-
(
|
|
13912
|
+
// biome-ignore lint/complexity/useArrowFunction: <explanation>
|
|
13913
|
+
function() {
|
|
13914
|
+
return that.deref().#compilation.hooks.finishModules;
|
|
13915
|
+
},
|
|
13916
|
+
// biome-ignore lint/complexity/useArrowFunction: <explanation>
|
|
13917
|
+
function(queried) {
|
|
13918
|
+
return async function() {
|
|
13919
|
+
return await queried.promise(that.deref().#compilation.modules);
|
|
13920
|
+
};
|
|
13921
|
+
}
|
|
13227
13922
|
),
|
|
13228
13923
|
registerCompilationOptimizeModulesTaps: this.#createHookRegisterTaps(
|
|
13229
13924
|
binding2.RegisterJsTapKind.CompilationOptimizeModules,
|
|
13230
|
-
|
|
13231
|
-
(
|
|
13925
|
+
// biome-ignore lint/complexity/useArrowFunction: <explanation>
|
|
13926
|
+
function() {
|
|
13927
|
+
return that.deref().#compilation.hooks.optimizeModules;
|
|
13928
|
+
},
|
|
13929
|
+
// biome-ignore lint/complexity/useArrowFunction: <explanation>
|
|
13930
|
+
function(queried) {
|
|
13931
|
+
return function() {
|
|
13932
|
+
return queried.call(that.deref().#compilation.modules.values());
|
|
13933
|
+
};
|
|
13934
|
+
}
|
|
13232
13935
|
),
|
|
13233
13936
|
registerCompilationAfterOptimizeModulesTaps: this.#createHookRegisterTaps(
|
|
13234
13937
|
binding2.RegisterJsTapKind.CompilationAfterOptimizeModules,
|
|
13235
|
-
|
|
13236
|
-
(
|
|
13237
|
-
|
|
13938
|
+
// biome-ignore lint/complexity/useArrowFunction: <explanation>
|
|
13939
|
+
function() {
|
|
13940
|
+
return that.deref().#compilation.hooks.afterOptimizeModules;
|
|
13941
|
+
},
|
|
13942
|
+
// biome-ignore lint/complexity/useArrowFunction: <explanation>
|
|
13943
|
+
function(queried) {
|
|
13944
|
+
return function() {
|
|
13945
|
+
queried.call(that.deref().#compilation.modules.values());
|
|
13946
|
+
};
|
|
13238
13947
|
}
|
|
13239
13948
|
),
|
|
13240
13949
|
registerCompilationOptimizeTreeTaps: this.#createHookRegisterTaps(
|
|
13241
13950
|
binding2.RegisterJsTapKind.CompilationOptimizeTree,
|
|
13242
|
-
|
|
13243
|
-
(
|
|
13244
|
-
|
|
13245
|
-
|
|
13246
|
-
|
|
13951
|
+
// biome-ignore lint/complexity/useArrowFunction: <explanation>
|
|
13952
|
+
function() {
|
|
13953
|
+
return that.deref().#compilation.hooks.optimizeTree;
|
|
13954
|
+
},
|
|
13955
|
+
// biome-ignore lint/complexity/useArrowFunction: <explanation>
|
|
13956
|
+
function(queried) {
|
|
13957
|
+
return async function() {
|
|
13958
|
+
return await queried.promise(
|
|
13959
|
+
that.deref().#compilation.chunks,
|
|
13960
|
+
that.deref().#compilation.modules
|
|
13961
|
+
);
|
|
13962
|
+
};
|
|
13963
|
+
}
|
|
13247
13964
|
),
|
|
13248
13965
|
registerCompilationOptimizeChunkModulesTaps: this.#createHookRegisterTaps(
|
|
13249
13966
|
binding2.RegisterJsTapKind.CompilationOptimizeChunkModules,
|
|
13250
|
-
|
|
13251
|
-
(
|
|
13252
|
-
|
|
13253
|
-
|
|
13254
|
-
|
|
13967
|
+
// biome-ignore lint/complexity/useArrowFunction: <explanation>
|
|
13968
|
+
function() {
|
|
13969
|
+
return that.deref().#compilation.hooks.optimizeChunkModules;
|
|
13970
|
+
},
|
|
13971
|
+
// biome-ignore lint/complexity/useArrowFunction: <explanation>
|
|
13972
|
+
function(queried) {
|
|
13973
|
+
return async function() {
|
|
13974
|
+
return await queried.promise(
|
|
13975
|
+
that.deref().#compilation.chunks,
|
|
13976
|
+
that.deref().#compilation.modules
|
|
13977
|
+
);
|
|
13978
|
+
};
|
|
13979
|
+
}
|
|
13255
13980
|
),
|
|
13256
13981
|
registerCompilationChunkHashTaps: this.#createHookRegisterTaps(
|
|
13257
13982
|
binding2.RegisterJsTapKind.CompilationChunkHash,
|
|
13258
|
-
|
|
13259
|
-
(
|
|
13260
|
-
|
|
13261
|
-
|
|
13262
|
-
|
|
13263
|
-
|
|
13264
|
-
|
|
13265
|
-
|
|
13266
|
-
|
|
13983
|
+
// biome-ignore lint/complexity/useArrowFunction: <explanation>
|
|
13984
|
+
function() {
|
|
13985
|
+
return that.deref().#compilation.hooks.chunkHash;
|
|
13986
|
+
},
|
|
13987
|
+
// biome-ignore lint/complexity/useArrowFunction: <explanation>
|
|
13988
|
+
function(queried) {
|
|
13989
|
+
return function(chunk) {
|
|
13990
|
+
if (!that.deref().options.output.hashFunction) {
|
|
13991
|
+
throw new Error("'output.hashFunction' cannot be undefined");
|
|
13992
|
+
}
|
|
13993
|
+
const hash = createHash(that.deref().options.output.hashFunction);
|
|
13994
|
+
queried.call(
|
|
13995
|
+
Chunk.__from_binding(chunk, that.deref().#compilation),
|
|
13996
|
+
hash
|
|
13997
|
+
);
|
|
13998
|
+
const digestResult = hash.digest(
|
|
13999
|
+
that.deref().options.output.hashDigest
|
|
14000
|
+
);
|
|
14001
|
+
return Buffer.from(digestResult);
|
|
14002
|
+
};
|
|
13267
14003
|
}
|
|
13268
14004
|
),
|
|
13269
14005
|
registerCompilationChunkAssetTaps: this.#createHookRegisterTaps(
|
|
13270
14006
|
binding2.RegisterJsTapKind.CompilationChunkAsset,
|
|
13271
|
-
|
|
13272
|
-
(
|
|
13273
|
-
|
|
13274
|
-
|
|
13275
|
-
|
|
14007
|
+
// biome-ignore lint/complexity/useArrowFunction: <explanation>
|
|
14008
|
+
function() {
|
|
14009
|
+
return that.deref().#compilation.hooks.chunkAsset;
|
|
14010
|
+
},
|
|
14011
|
+
// biome-ignore lint/complexity/useArrowFunction: <explanation>
|
|
14012
|
+
function(queried) {
|
|
14013
|
+
return function({ chunk, filename: filename2 }) {
|
|
14014
|
+
return queried.call(
|
|
14015
|
+
Chunk.__from_binding(chunk, that.deref().#compilation),
|
|
14016
|
+
filename2
|
|
14017
|
+
);
|
|
14018
|
+
};
|
|
14019
|
+
}
|
|
13276
14020
|
),
|
|
13277
14021
|
registerCompilationProcessAssetsTaps: this.#createHookRegisterTaps(
|
|
13278
14022
|
binding2.RegisterJsTapKind.CompilationProcessAssets,
|
|
13279
|
-
|
|
13280
|
-
(
|
|
14023
|
+
// biome-ignore lint/complexity/useArrowFunction: <explanation>
|
|
14024
|
+
function() {
|
|
14025
|
+
return that.deref().#compilation.hooks.processAssets;
|
|
14026
|
+
},
|
|
14027
|
+
// biome-ignore lint/complexity/useArrowFunction: <explanation>
|
|
14028
|
+
function(queried) {
|
|
14029
|
+
return async function() {
|
|
14030
|
+
return await queried.promise(that.deref().#compilation.assets);
|
|
14031
|
+
};
|
|
14032
|
+
}
|
|
13281
14033
|
),
|
|
13282
14034
|
registerCompilationAfterProcessAssetsTaps: this.#createHookRegisterTaps(
|
|
13283
14035
|
binding2.RegisterJsTapKind.CompilationAfterProcessAssets,
|
|
13284
|
-
|
|
13285
|
-
(
|
|
14036
|
+
// biome-ignore lint/complexity/useArrowFunction: <explanation>
|
|
14037
|
+
function() {
|
|
14038
|
+
return that.deref().#compilation.hooks.afterProcessAssets;
|
|
14039
|
+
},
|
|
14040
|
+
// biome-ignore lint/complexity/useArrowFunction: <explanation>
|
|
14041
|
+
function(queried) {
|
|
14042
|
+
return function() {
|
|
14043
|
+
return queried.call(that.deref().#compilation.assets);
|
|
14044
|
+
};
|
|
14045
|
+
}
|
|
13286
14046
|
),
|
|
13287
14047
|
registerCompilationSealTaps: this.#createHookRegisterTaps(
|
|
13288
14048
|
binding2.RegisterJsTapKind.CompilationSeal,
|
|
13289
|
-
|
|
13290
|
-
(
|
|
14049
|
+
// biome-ignore lint/complexity/useArrowFunction: <explanation>
|
|
14050
|
+
function() {
|
|
14051
|
+
return that.deref().#compilation.hooks.seal;
|
|
14052
|
+
},
|
|
14053
|
+
// biome-ignore lint/complexity/useArrowFunction: <explanation>
|
|
14054
|
+
function(queried) {
|
|
14055
|
+
return function() {
|
|
14056
|
+
return queried.call();
|
|
14057
|
+
};
|
|
14058
|
+
}
|
|
13291
14059
|
),
|
|
13292
14060
|
registerCompilationAfterSealTaps: this.#createHookRegisterTaps(
|
|
13293
14061
|
binding2.RegisterJsTapKind.CompilationAfterSeal,
|
|
13294
|
-
|
|
13295
|
-
(
|
|
14062
|
+
// biome-ignore lint/complexity/useArrowFunction: <explanation>
|
|
14063
|
+
function() {
|
|
14064
|
+
return that.deref().#compilation.hooks.afterSeal;
|
|
14065
|
+
},
|
|
14066
|
+
// biome-ignore lint/complexity/useArrowFunction: <explanation>
|
|
14067
|
+
function(queried) {
|
|
14068
|
+
return async function() {
|
|
14069
|
+
return await queried.promise();
|
|
14070
|
+
};
|
|
14071
|
+
}
|
|
13296
14072
|
),
|
|
13297
14073
|
registerNormalModuleFactoryBeforeResolveTaps: this.#createHookRegisterTaps(
|
|
13298
14074
|
binding2.RegisterJsTapKind.NormalModuleFactoryBeforeResolve,
|
|
13299
|
-
|
|
13300
|
-
(
|
|
13301
|
-
|
|
13302
|
-
|
|
13303
|
-
|
|
13304
|
-
|
|
13305
|
-
|
|
13306
|
-
|
|
13307
|
-
|
|
13308
|
-
|
|
13309
|
-
|
|
14075
|
+
// biome-ignore lint/complexity/useArrowFunction: <explanation>
|
|
14076
|
+
function() {
|
|
14077
|
+
return that.deref().#compilationParams.normalModuleFactory.hooks.beforeResolve;
|
|
14078
|
+
},
|
|
14079
|
+
// biome-ignore lint/complexity/useArrowFunction: <explanation>
|
|
14080
|
+
function(queried) {
|
|
14081
|
+
return async function(resolveData) {
|
|
14082
|
+
const normalizedResolveData = {
|
|
14083
|
+
contextInfo: {
|
|
14084
|
+
issuer: resolveData.issuer
|
|
14085
|
+
},
|
|
14086
|
+
request: resolveData.request,
|
|
14087
|
+
context: resolveData.context,
|
|
14088
|
+
fileDependencies: [],
|
|
14089
|
+
missingDependencies: [],
|
|
14090
|
+
contextDependencies: []
|
|
14091
|
+
};
|
|
14092
|
+
const ret = await queried.promise(normalizedResolveData);
|
|
14093
|
+
resolveData.request = normalizedResolveData.request;
|
|
14094
|
+
resolveData.context = normalizedResolveData.context;
|
|
14095
|
+
return [ret, resolveData];
|
|
13310
14096
|
};
|
|
13311
|
-
const ret = await queried.promise(normalizedResolveData);
|
|
13312
|
-
resolveData.request = normalizedResolveData.request;
|
|
13313
|
-
resolveData.context = normalizedResolveData.context;
|
|
13314
|
-
return [ret, resolveData];
|
|
13315
14097
|
}
|
|
13316
14098
|
),
|
|
13317
14099
|
registerNormalModuleFactoryFactorizeTaps: this.#createHookRegisterTaps(
|
|
13318
14100
|
binding2.RegisterJsTapKind.NormalModuleFactoryFactorize,
|
|
13319
|
-
|
|
13320
|
-
(
|
|
13321
|
-
|
|
13322
|
-
|
|
13323
|
-
|
|
13324
|
-
|
|
13325
|
-
|
|
13326
|
-
|
|
13327
|
-
|
|
13328
|
-
|
|
13329
|
-
|
|
14101
|
+
// biome-ignore lint/complexity/useArrowFunction: <explanation>
|
|
14102
|
+
function() {
|
|
14103
|
+
return that.deref().#compilationParams.normalModuleFactory.hooks.factorize;
|
|
14104
|
+
},
|
|
14105
|
+
// biome-ignore lint/complexity/useArrowFunction: <explanation>
|
|
14106
|
+
function(queried) {
|
|
14107
|
+
return async function(resolveData) {
|
|
14108
|
+
const normalizedResolveData = {
|
|
14109
|
+
contextInfo: {
|
|
14110
|
+
issuer: resolveData.issuer
|
|
14111
|
+
},
|
|
14112
|
+
request: resolveData.request,
|
|
14113
|
+
context: resolveData.context,
|
|
14114
|
+
fileDependencies: [],
|
|
14115
|
+
missingDependencies: [],
|
|
14116
|
+
contextDependencies: []
|
|
14117
|
+
};
|
|
14118
|
+
await queried.promise(normalizedResolveData);
|
|
14119
|
+
resolveData.request = normalizedResolveData.request;
|
|
14120
|
+
resolveData.context = normalizedResolveData.context;
|
|
14121
|
+
return resolveData;
|
|
13330
14122
|
};
|
|
13331
|
-
await queried.promise(normalizedResolveData);
|
|
13332
|
-
resolveData.request = normalizedResolveData.request;
|
|
13333
|
-
resolveData.context = normalizedResolveData.context;
|
|
13334
|
-
return resolveData;
|
|
13335
14123
|
}
|
|
13336
14124
|
),
|
|
13337
14125
|
registerNormalModuleFactoryResolveTaps: this.#createHookRegisterTaps(
|
|
13338
14126
|
binding2.RegisterJsTapKind.NormalModuleFactoryResolve,
|
|
13339
|
-
|
|
13340
|
-
(
|
|
13341
|
-
|
|
13342
|
-
|
|
13343
|
-
|
|
13344
|
-
|
|
13345
|
-
|
|
13346
|
-
|
|
13347
|
-
|
|
13348
|
-
|
|
13349
|
-
|
|
14127
|
+
// biome-ignore lint/complexity/useArrowFunction: <explanation>
|
|
14128
|
+
function() {
|
|
14129
|
+
return that.deref().#compilationParams.normalModuleFactory.hooks.resolve;
|
|
14130
|
+
},
|
|
14131
|
+
// biome-ignore lint/complexity/useArrowFunction: <explanation>
|
|
14132
|
+
function(queried) {
|
|
14133
|
+
return async function(resolveData) {
|
|
14134
|
+
const normalizedResolveData = {
|
|
14135
|
+
contextInfo: {
|
|
14136
|
+
issuer: resolveData.issuer
|
|
14137
|
+
},
|
|
14138
|
+
request: resolveData.request,
|
|
14139
|
+
context: resolveData.context,
|
|
14140
|
+
fileDependencies: [],
|
|
14141
|
+
missingDependencies: [],
|
|
14142
|
+
contextDependencies: []
|
|
14143
|
+
};
|
|
14144
|
+
await queried.promise(normalizedResolveData);
|
|
14145
|
+
resolveData.request = normalizedResolveData.request;
|
|
14146
|
+
resolveData.context = normalizedResolveData.context;
|
|
14147
|
+
return resolveData;
|
|
13350
14148
|
};
|
|
13351
|
-
await queried.promise(normalizedResolveData);
|
|
13352
|
-
resolveData.request = normalizedResolveData.request;
|
|
13353
|
-
resolveData.context = normalizedResolveData.context;
|
|
13354
|
-
return resolveData;
|
|
13355
14149
|
}
|
|
13356
14150
|
),
|
|
13357
14151
|
registerNormalModuleFactoryResolveForSchemeTaps: this.#createHookMapRegisterTaps(
|
|
13358
14152
|
binding2.RegisterJsTapKind.NormalModuleFactoryResolveForScheme,
|
|
13359
|
-
|
|
13360
|
-
(
|
|
13361
|
-
|
|
13362
|
-
|
|
14153
|
+
// biome-ignore lint/complexity/useArrowFunction: <explanation>
|
|
14154
|
+
function() {
|
|
14155
|
+
return that.deref().#compilationParams.normalModuleFactory.hooks.resolveForScheme;
|
|
14156
|
+
},
|
|
14157
|
+
// biome-ignore lint/complexity/useArrowFunction: <explanation>
|
|
14158
|
+
function(queried) {
|
|
14159
|
+
return async function(args) {
|
|
14160
|
+
const ret = await queried.for(args.scheme).promise(args.resourceData);
|
|
14161
|
+
return [ret, args.resourceData];
|
|
14162
|
+
};
|
|
13363
14163
|
}
|
|
13364
14164
|
),
|
|
13365
14165
|
registerNormalModuleFactoryAfterResolveTaps: this.#createHookRegisterTaps(
|
|
13366
14166
|
binding2.RegisterJsTapKind.NormalModuleFactoryAfterResolve,
|
|
13367
|
-
|
|
13368
|
-
(
|
|
13369
|
-
|
|
13370
|
-
|
|
13371
|
-
|
|
13372
|
-
|
|
13373
|
-
|
|
13374
|
-
|
|
13375
|
-
|
|
13376
|
-
|
|
13377
|
-
|
|
13378
|
-
|
|
14167
|
+
// biome-ignore lint/complexity/useArrowFunction: <explanation>
|
|
14168
|
+
function() {
|
|
14169
|
+
return that.deref().#compilationParams.normalModuleFactory.hooks.afterResolve;
|
|
14170
|
+
},
|
|
14171
|
+
// biome-ignore lint/complexity/useArrowFunction: <explanation>
|
|
14172
|
+
function(queried) {
|
|
14173
|
+
return async function(arg) {
|
|
14174
|
+
const data = {
|
|
14175
|
+
contextInfo: {
|
|
14176
|
+
issuer: arg.issuer
|
|
14177
|
+
},
|
|
14178
|
+
request: arg.request,
|
|
14179
|
+
context: arg.context,
|
|
14180
|
+
fileDependencies: arg.fileDependencies,
|
|
14181
|
+
missingDependencies: arg.missingDependencies,
|
|
14182
|
+
contextDependencies: arg.contextDependencies,
|
|
14183
|
+
createData: arg.createData
|
|
14184
|
+
};
|
|
14185
|
+
const ret = await queried.promise(data);
|
|
14186
|
+
return [ret, data.createData];
|
|
13379
14187
|
};
|
|
13380
|
-
const ret = await queried.promise(data);
|
|
13381
|
-
return [ret, data.createData];
|
|
13382
14188
|
}
|
|
13383
14189
|
),
|
|
13384
14190
|
registerNormalModuleFactoryCreateModuleTaps: this.#createHookRegisterTaps(
|
|
13385
14191
|
binding2.RegisterJsTapKind.NormalModuleFactoryCreateModule,
|
|
13386
|
-
|
|
13387
|
-
(
|
|
13388
|
-
|
|
13389
|
-
|
|
13390
|
-
|
|
14192
|
+
// biome-ignore lint/complexity/useArrowFunction: <explanation>
|
|
14193
|
+
function() {
|
|
14194
|
+
return that.deref().#compilationParams.normalModuleFactory.hooks.createModule;
|
|
14195
|
+
},
|
|
14196
|
+
// biome-ignore lint/complexity/useArrowFunction: <explanation>
|
|
14197
|
+
function(queried) {
|
|
14198
|
+
return async function(args) {
|
|
14199
|
+
const data = {
|
|
14200
|
+
...args,
|
|
14201
|
+
settings: {}
|
|
14202
|
+
};
|
|
14203
|
+
await queried.promise(data, {});
|
|
13391
14204
|
};
|
|
13392
|
-
await queried.promise(data, {});
|
|
13393
14205
|
}
|
|
13394
14206
|
),
|
|
13395
14207
|
registerContextModuleFactoryBeforeResolveTaps: this.#createHookRegisterTaps(
|
|
13396
14208
|
binding2.RegisterJsTapKind.ContextModuleFactoryBeforeResolve,
|
|
13397
|
-
|
|
13398
|
-
(
|
|
13399
|
-
|
|
13400
|
-
|
|
13401
|
-
|
|
13402
|
-
|
|
13403
|
-
return
|
|
14209
|
+
// biome-ignore lint/complexity/useArrowFunction: <explanation>
|
|
14210
|
+
function() {
|
|
14211
|
+
return that.deref().#compilationParams.contextModuleFactory.hooks.beforeResolve;
|
|
14212
|
+
},
|
|
14213
|
+
// biome-ignore lint/complexity/useArrowFunction: <explanation>
|
|
14214
|
+
function(queried) {
|
|
14215
|
+
return async function(bindingData) {
|
|
14216
|
+
const data = bindingData ? ContextModuleFactoryBeforeResolveData.__from_binding(
|
|
14217
|
+
bindingData
|
|
14218
|
+
) : false;
|
|
14219
|
+
const result2 = await queried.promise(data);
|
|
14220
|
+
return result2 ? ContextModuleFactoryBeforeResolveData.__to_binding(result2) : false;
|
|
14221
|
+
};
|
|
13404
14222
|
}
|
|
13405
14223
|
),
|
|
13406
14224
|
registerContextModuleFactoryAfterResolveTaps: this.#createHookRegisterTaps(
|
|
13407
14225
|
binding2.RegisterJsTapKind.ContextModuleFactoryAfterResolve,
|
|
13408
|
-
|
|
13409
|
-
(
|
|
13410
|
-
|
|
13411
|
-
|
|
13412
|
-
|
|
13413
|
-
|
|
13414
|
-
return
|
|
14226
|
+
// biome-ignore lint/complexity/useArrowFunction: <explanation>
|
|
14227
|
+
function() {
|
|
14228
|
+
return that.deref().#compilationParams.contextModuleFactory.hooks.afterResolve;
|
|
14229
|
+
},
|
|
14230
|
+
// biome-ignore lint/complexity/useArrowFunction: <explanation>
|
|
14231
|
+
function(queried) {
|
|
14232
|
+
return async function(bindingData) {
|
|
14233
|
+
const data = bindingData ? ContextModuleFactoryAfterResolveData.__from_binding(
|
|
14234
|
+
bindingData
|
|
14235
|
+
) : false;
|
|
14236
|
+
const result2 = await queried.promise(data);
|
|
14237
|
+
return result2 ? ContextModuleFactoryAfterResolveData.__to_binding(result2) : false;
|
|
14238
|
+
};
|
|
13415
14239
|
}
|
|
13416
14240
|
),
|
|
13417
14241
|
registerJavascriptModulesChunkHashTaps: this.#createHookRegisterTaps(
|
|
13418
14242
|
binding2.RegisterJsTapKind.JavascriptModulesChunkHash,
|
|
13419
|
-
|
|
13420
|
-
(
|
|
13421
|
-
|
|
13422
|
-
|
|
13423
|
-
|
|
13424
|
-
|
|
13425
|
-
|
|
13426
|
-
|
|
13427
|
-
return
|
|
14243
|
+
// biome-ignore lint/complexity/useArrowFunction: <explanation>
|
|
14244
|
+
function() {
|
|
14245
|
+
return JavascriptModulesPlugin.getCompilationHooks(
|
|
14246
|
+
that.deref().#compilation
|
|
14247
|
+
).chunkHash;
|
|
14248
|
+
},
|
|
14249
|
+
// biome-ignore lint/complexity/useArrowFunction: <explanation>
|
|
14250
|
+
function(queried) {
|
|
14251
|
+
return function(chunk) {
|
|
14252
|
+
if (!that.deref().options.output.hashFunction) {
|
|
14253
|
+
throw new Error("'output.hashFunction' cannot be undefined");
|
|
14254
|
+
}
|
|
14255
|
+
const hash = createHash(that.deref().options.output.hashFunction);
|
|
14256
|
+
queried.call(
|
|
14257
|
+
Chunk.__from_binding(chunk, that.deref().#compilation),
|
|
14258
|
+
hash
|
|
14259
|
+
);
|
|
14260
|
+
const digestResult = hash.digest(
|
|
14261
|
+
that.deref().options.output.hashDigest
|
|
14262
|
+
);
|
|
14263
|
+
return Buffer.from(digestResult);
|
|
14264
|
+
};
|
|
13428
14265
|
}
|
|
13429
14266
|
),
|
|
13430
14267
|
registerHtmlPluginBeforeAssetTagGenerationTaps: this.#createHookRegisterTaps(
|
|
13431
14268
|
binding2.RegisterJsTapKind.HtmlPluginBeforeAssetTagGeneration,
|
|
13432
|
-
|
|
13433
|
-
(
|
|
13434
|
-
return
|
|
13435
|
-
|
|
13436
|
-
|
|
13437
|
-
|
|
13438
|
-
|
|
13439
|
-
|
|
14269
|
+
// biome-ignore lint/complexity/useArrowFunction: <explanation>
|
|
14270
|
+
function() {
|
|
14271
|
+
return HtmlRspackPlugin.getCompilationHooks(
|
|
14272
|
+
that.deref().#compilation
|
|
14273
|
+
).beforeAssetTagGeneration;
|
|
14274
|
+
},
|
|
14275
|
+
// biome-ignore lint/complexity/useArrowFunction: <explanation>
|
|
14276
|
+
function(queried) {
|
|
14277
|
+
return async function(data) {
|
|
14278
|
+
return await queried.promise({
|
|
14279
|
+
...data,
|
|
14280
|
+
plugin: {
|
|
14281
|
+
options: HtmlRspackPlugin.getCompilationOptions(
|
|
14282
|
+
that.deref().#compilation
|
|
14283
|
+
) || {}
|
|
14284
|
+
}
|
|
14285
|
+
});
|
|
14286
|
+
};
|
|
13440
14287
|
}
|
|
13441
14288
|
),
|
|
13442
14289
|
registerHtmlPluginAlterAssetTagsTaps: this.#createHookRegisterTaps(
|
|
13443
14290
|
binding2.RegisterJsTapKind.HtmlPluginAlterAssetTags,
|
|
13444
|
-
|
|
13445
|
-
(
|
|
13446
|
-
return
|
|
14291
|
+
// biome-ignore lint/complexity/useArrowFunction: <explanation>
|
|
14292
|
+
function() {
|
|
14293
|
+
return HtmlRspackPlugin.getCompilationHooks(
|
|
14294
|
+
that.deref().#compilation
|
|
14295
|
+
).alterAssetTags;
|
|
14296
|
+
},
|
|
14297
|
+
// biome-ignore lint/complexity/useArrowFunction: <explanation>
|
|
14298
|
+
function(queried) {
|
|
14299
|
+
return async function(data) {
|
|
14300
|
+
return await queried.promise(data);
|
|
14301
|
+
};
|
|
13447
14302
|
}
|
|
13448
14303
|
),
|
|
13449
14304
|
registerHtmlPluginAlterAssetTagGroupsTaps: this.#createHookRegisterTaps(
|
|
13450
14305
|
binding2.RegisterJsTapKind.HtmlPluginAlterAssetTagGroups,
|
|
13451
|
-
|
|
13452
|
-
(
|
|
13453
|
-
return
|
|
13454
|
-
|
|
13455
|
-
|
|
13456
|
-
|
|
13457
|
-
|
|
13458
|
-
|
|
14306
|
+
// biome-ignore lint/complexity/useArrowFunction: <explanation>
|
|
14307
|
+
function() {
|
|
14308
|
+
return HtmlRspackPlugin.getCompilationHooks(
|
|
14309
|
+
that.deref().#compilation
|
|
14310
|
+
).alterAssetTagGroups;
|
|
14311
|
+
},
|
|
14312
|
+
// biome-ignore lint/complexity/useArrowFunction: <explanation>
|
|
14313
|
+
function(queried) {
|
|
14314
|
+
return async function(data) {
|
|
14315
|
+
return await queried.promise({
|
|
14316
|
+
...data,
|
|
14317
|
+
plugin: {
|
|
14318
|
+
options: HtmlRspackPlugin.getCompilationOptions(
|
|
14319
|
+
that.deref().#compilation
|
|
14320
|
+
) || {}
|
|
14321
|
+
}
|
|
14322
|
+
});
|
|
14323
|
+
};
|
|
13459
14324
|
}
|
|
13460
14325
|
),
|
|
13461
14326
|
registerHtmlPluginAfterTemplateExecutionTaps: this.#createHookRegisterTaps(
|
|
13462
14327
|
binding2.RegisterJsTapKind.HtmlPluginAfterTemplateExecution,
|
|
13463
|
-
|
|
13464
|
-
(
|
|
13465
|
-
return
|
|
13466
|
-
|
|
13467
|
-
|
|
13468
|
-
|
|
13469
|
-
|
|
13470
|
-
|
|
14328
|
+
// biome-ignore lint/complexity/useArrowFunction: <explanation>
|
|
14329
|
+
function() {
|
|
14330
|
+
return HtmlRspackPlugin.getCompilationHooks(
|
|
14331
|
+
that.deref().#compilation
|
|
14332
|
+
).afterTemplateExecution;
|
|
14333
|
+
},
|
|
14334
|
+
// biome-ignore lint/complexity/useArrowFunction: <explanation>
|
|
14335
|
+
function(queried) {
|
|
14336
|
+
return async function(data) {
|
|
14337
|
+
return await queried.promise({
|
|
14338
|
+
...data,
|
|
14339
|
+
plugin: {
|
|
14340
|
+
options: HtmlRspackPlugin.getCompilationOptions(
|
|
14341
|
+
that.deref().#compilation
|
|
14342
|
+
) || {}
|
|
14343
|
+
}
|
|
14344
|
+
});
|
|
14345
|
+
};
|
|
13471
14346
|
}
|
|
13472
14347
|
),
|
|
13473
14348
|
registerHtmlPluginBeforeEmitTaps: this.#createHookRegisterTaps(
|
|
13474
14349
|
binding2.RegisterJsTapKind.HtmlPluginBeforeEmit,
|
|
13475
|
-
|
|
13476
|
-
(
|
|
13477
|
-
return
|
|
13478
|
-
|
|
13479
|
-
|
|
13480
|
-
|
|
13481
|
-
|
|
13482
|
-
|
|
14350
|
+
// biome-ignore lint/complexity/useArrowFunction: <explanation>
|
|
14351
|
+
function() {
|
|
14352
|
+
return HtmlRspackPlugin.getCompilationHooks(
|
|
14353
|
+
that.deref().#compilation
|
|
14354
|
+
).beforeEmit;
|
|
14355
|
+
},
|
|
14356
|
+
// biome-ignore lint/complexity/useArrowFunction: <explanation>
|
|
14357
|
+
function(queried) {
|
|
14358
|
+
return async function(data) {
|
|
14359
|
+
return await queried.promise({
|
|
14360
|
+
...data,
|
|
14361
|
+
plugin: {
|
|
14362
|
+
options: HtmlRspackPlugin.getCompilationOptions(
|
|
14363
|
+
that.deref().#compilation
|
|
14364
|
+
) || {}
|
|
14365
|
+
}
|
|
14366
|
+
});
|
|
14367
|
+
};
|
|
13483
14368
|
}
|
|
13484
14369
|
),
|
|
13485
14370
|
registerHtmlPluginAfterEmitTaps: this.#createHookRegisterTaps(
|
|
13486
14371
|
binding2.RegisterJsTapKind.HtmlPluginAfterEmit,
|
|
13487
|
-
|
|
13488
|
-
(
|
|
13489
|
-
return
|
|
13490
|
-
|
|
13491
|
-
|
|
13492
|
-
|
|
13493
|
-
|
|
13494
|
-
|
|
14372
|
+
// biome-ignore lint/complexity/useArrowFunction: <explanation>
|
|
14373
|
+
function() {
|
|
14374
|
+
return HtmlRspackPlugin.getCompilationHooks(
|
|
14375
|
+
that.deref().#compilation
|
|
14376
|
+
).afterEmit;
|
|
14377
|
+
},
|
|
14378
|
+
// biome-ignore lint/complexity/useArrowFunction: <explanation>
|
|
14379
|
+
function(queried) {
|
|
14380
|
+
return async function(data) {
|
|
14381
|
+
return await queried.promise({
|
|
14382
|
+
...data,
|
|
14383
|
+
plugin: {
|
|
14384
|
+
options: HtmlRspackPlugin.getCompilationOptions(
|
|
14385
|
+
that.deref().#compilation
|
|
14386
|
+
) || {}
|
|
14387
|
+
}
|
|
14388
|
+
});
|
|
14389
|
+
};
|
|
13495
14390
|
}
|
|
13496
14391
|
)
|
|
13497
14392
|
};
|
|
@@ -13540,7 +14435,9 @@ var Compiler = class _Compiler {
|
|
|
13540
14435
|
}
|
|
13541
14436
|
}
|
|
13542
14437
|
#createHookRegisterTaps(registerKind, getHook, createTap) {
|
|
14438
|
+
const that = new WeakRef(this);
|
|
13543
14439
|
const getTaps = (stages) => {
|
|
14440
|
+
const compiler = that.deref();
|
|
13544
14441
|
const hook = getHook();
|
|
13545
14442
|
if (!hook.isUsed()) return [];
|
|
13546
14443
|
const breakpoints = [
|
|
@@ -13560,7 +14457,7 @@ var Compiler = class _Compiler {
|
|
|
13560
14457
|
stage: liteTapable7.safeStage(from + 1)
|
|
13561
14458
|
});
|
|
13562
14459
|
}
|
|
13563
|
-
|
|
14460
|
+
compiler.#decorateJsTaps(jsTaps);
|
|
13564
14461
|
return jsTaps;
|
|
13565
14462
|
};
|
|
13566
14463
|
getTaps.registerKind = registerKind;
|
|
@@ -13568,7 +14465,9 @@ var Compiler = class _Compiler {
|
|
|
13568
14465
|
return getTaps;
|
|
13569
14466
|
}
|
|
13570
14467
|
#createHookMapRegisterTaps(registerKind, getHookMap, createTap) {
|
|
14468
|
+
const that = new WeakRef(this);
|
|
13571
14469
|
const getTaps = (stages) => {
|
|
14470
|
+
const compiler = that.deref();
|
|
13572
14471
|
const map = getHookMap();
|
|
13573
14472
|
if (!map.isUsed()) return [];
|
|
13574
14473
|
const breakpoints = [
|
|
@@ -13588,7 +14487,7 @@ var Compiler = class _Compiler {
|
|
|
13588
14487
|
stage: liteTapable7.safeStage(from + 1)
|
|
13589
14488
|
});
|
|
13590
14489
|
}
|
|
13591
|
-
|
|
14490
|
+
compiler.#decorateJsTaps(jsTaps);
|
|
13592
14491
|
return jsTaps;
|
|
13593
14492
|
};
|
|
13594
14493
|
getTaps.registerKind = registerKind;
|
|
@@ -14775,6 +15674,7 @@ var MODULES_GROUPERS = (type) => ({
|
|
|
14775
15674
|
groupModulesByAttributes,
|
|
14776
15675
|
groupModulesByType,
|
|
14777
15676
|
groupModulesByPath,
|
|
15677
|
+
groupModulesByLayer,
|
|
14778
15678
|
groupModulesByExtension
|
|
14779
15679
|
} = options;
|
|
14780
15680
|
if (groupModulesByAttributes) {
|
|
@@ -14827,6 +15727,20 @@ var MODULES_GROUPERS = (type) => ({
|
|
|
14827
15727
|
}
|
|
14828
15728
|
});
|
|
14829
15729
|
}
|
|
15730
|
+
if (groupModulesByLayer) {
|
|
15731
|
+
groupConfigs.push({
|
|
15732
|
+
getKeys: (module2) => (
|
|
15733
|
+
/** @type {string[]} */
|
|
15734
|
+
[module2.layer]
|
|
15735
|
+
),
|
|
15736
|
+
createGroup: (key, children, _modules) => ({
|
|
15737
|
+
type: "modules by layer",
|
|
15738
|
+
layer: key,
|
|
15739
|
+
children,
|
|
15740
|
+
...moduleGroup(children)
|
|
15741
|
+
})
|
|
15742
|
+
});
|
|
15743
|
+
}
|
|
14830
15744
|
if (groupModulesByPath || groupModulesByExtension) {
|
|
14831
15745
|
groupConfigs.push({
|
|
14832
15746
|
getKeys: (module2) => {
|
|
@@ -17305,10 +18219,7 @@ var RspackOptionsApply = class {
|
|
|
17305
18219
|
typeof lazyOptions.test === "function" ? (jsModule) => lazyOptions.test.call(
|
|
17306
18220
|
lazyOptions,
|
|
17307
18221
|
new Module(jsModule)
|
|
17308
|
-
) : lazyOptions.test
|
|
17309
|
-
source: lazyOptions.test.source,
|
|
17310
|
-
flags: lazyOptions.test.flags
|
|
17311
|
-
} : void 0,
|
|
18222
|
+
) : lazyOptions.test,
|
|
17312
18223
|
lazyOptions.backend
|
|
17313
18224
|
).apply(compiler);
|
|
17314
18225
|
}
|
|
@@ -17405,6 +18316,203 @@ var RspackOptionsApply = class {
|
|
|
17405
18316
|
}
|
|
17406
18317
|
};
|
|
17407
18318
|
|
|
18319
|
+
// src/lib/DllPlugin.ts
|
|
18320
|
+
var import_zod5 = __toESM(require("../compiled/zod/index.js"));
|
|
18321
|
+
|
|
18322
|
+
// src/builtin-plugin/FlagAllModulesAsUsedPlugin.ts
|
|
18323
|
+
var import_binding79 = require("@rspack/binding");
|
|
18324
|
+
var FlagAllModulesAsUsedPlugin = create2(
|
|
18325
|
+
import_binding79.BuiltinPluginName.FlagAllModulesAsUsedPlugin,
|
|
18326
|
+
(explanation) => {
|
|
18327
|
+
return {
|
|
18328
|
+
explanation
|
|
18329
|
+
};
|
|
18330
|
+
}
|
|
18331
|
+
);
|
|
18332
|
+
|
|
18333
|
+
// src/lib/DllPlugin.ts
|
|
18334
|
+
var dllPluginOptions = import_zod5.default.object({
|
|
18335
|
+
context: import_zod5.default.string().optional(),
|
|
18336
|
+
entryOnly: import_zod5.default.boolean().optional(),
|
|
18337
|
+
format: import_zod5.default.boolean().optional(),
|
|
18338
|
+
name: import_zod5.default.string().optional(),
|
|
18339
|
+
path: import_zod5.default.string(),
|
|
18340
|
+
type: import_zod5.default.string().optional()
|
|
18341
|
+
});
|
|
18342
|
+
var DllPlugin = class _DllPlugin {
|
|
18343
|
+
constructor(options) {
|
|
18344
|
+
validate(options, dllPluginOptions);
|
|
18345
|
+
this.options = {
|
|
18346
|
+
...options,
|
|
18347
|
+
entryOnly: options.entryOnly !== false
|
|
18348
|
+
};
|
|
18349
|
+
}
|
|
18350
|
+
apply(compiler) {
|
|
18351
|
+
compiler.hooks.entryOption.tap(_DllPlugin.name, (context2, entry2) => {
|
|
18352
|
+
if (typeof entry2 === "function") {
|
|
18353
|
+
throw new Error(
|
|
18354
|
+
"DllPlugin doesn't support dynamic entry (function) yet"
|
|
18355
|
+
);
|
|
18356
|
+
}
|
|
18357
|
+
for (const name2 of Object.keys(entry2)) {
|
|
18358
|
+
const options = {
|
|
18359
|
+
name: name2
|
|
18360
|
+
};
|
|
18361
|
+
const entries = entry2[name2].import || [];
|
|
18362
|
+
new DllEntryPlugin(context2, entries, options).apply(compiler);
|
|
18363
|
+
}
|
|
18364
|
+
return true;
|
|
18365
|
+
});
|
|
18366
|
+
new LibManifestPlugin(this.options).apply(compiler);
|
|
18367
|
+
if (!this.options.entryOnly) {
|
|
18368
|
+
new FlagAllModulesAsUsedPlugin("DllPlugin").apply(compiler);
|
|
18369
|
+
}
|
|
18370
|
+
}
|
|
18371
|
+
};
|
|
18372
|
+
|
|
18373
|
+
// src/lib/DllReferencePlugin.ts
|
|
18374
|
+
var import_zod6 = __toESM(require("../compiled/zod/index.js"));
|
|
18375
|
+
var dllReferencePluginOptionsContentItem = import_zod6.default.object({
|
|
18376
|
+
buildMeta: import_zod6.default.custom().optional(),
|
|
18377
|
+
exports: import_zod6.default.array(import_zod6.default.string()).or(import_zod6.default.literal(true)).optional(),
|
|
18378
|
+
id: import_zod6.default.string().optional()
|
|
18379
|
+
});
|
|
18380
|
+
var dllReferencePluginOptionsContent = import_zod6.default.record(
|
|
18381
|
+
dllReferencePluginOptionsContentItem
|
|
18382
|
+
);
|
|
18383
|
+
var dllReferencePluginOptionsSourceType = import_zod6.default.enum([
|
|
18384
|
+
"var",
|
|
18385
|
+
"assign",
|
|
18386
|
+
"this",
|
|
18387
|
+
"window",
|
|
18388
|
+
"global",
|
|
18389
|
+
"commonjs",
|
|
18390
|
+
"commonjs2",
|
|
18391
|
+
"commonjs-module",
|
|
18392
|
+
"amd",
|
|
18393
|
+
"amd-require",
|
|
18394
|
+
"umd",
|
|
18395
|
+
"umd2",
|
|
18396
|
+
"jsonp",
|
|
18397
|
+
"system"
|
|
18398
|
+
]);
|
|
18399
|
+
var dllReferencePluginOptionsManifest = import_zod6.default.object({
|
|
18400
|
+
content: dllReferencePluginOptionsContent,
|
|
18401
|
+
name: import_zod6.default.string().optional(),
|
|
18402
|
+
type: dllReferencePluginOptionsSourceType.optional()
|
|
18403
|
+
});
|
|
18404
|
+
var dllReferencePluginOptions = import_zod6.default.union([
|
|
18405
|
+
import_zod6.default.object({
|
|
18406
|
+
context: import_zod6.default.string().optional(),
|
|
18407
|
+
extensions: import_zod6.default.array(import_zod6.default.string()).optional(),
|
|
18408
|
+
manifest: import_zod6.default.string().or(dllReferencePluginOptionsManifest),
|
|
18409
|
+
name: import_zod6.default.string().optional(),
|
|
18410
|
+
scope: import_zod6.default.string().optional(),
|
|
18411
|
+
sourceType: dllReferencePluginOptionsSourceType.optional(),
|
|
18412
|
+
type: import_zod6.default.enum(["require", "object"]).optional()
|
|
18413
|
+
}),
|
|
18414
|
+
import_zod6.default.object({
|
|
18415
|
+
content: dllReferencePluginOptionsContent,
|
|
18416
|
+
context: import_zod6.default.string().optional(),
|
|
18417
|
+
extensions: import_zod6.default.array(import_zod6.default.string()).optional(),
|
|
18418
|
+
name: import_zod6.default.string(),
|
|
18419
|
+
scope: import_zod6.default.string().optional(),
|
|
18420
|
+
sourceType: dllReferencePluginOptionsSourceType.optional(),
|
|
18421
|
+
type: import_zod6.default.enum(["require", "object"]).optional()
|
|
18422
|
+
})
|
|
18423
|
+
]);
|
|
18424
|
+
var DllReferencePlugin = class _DllReferencePlugin {
|
|
18425
|
+
constructor(options) {
|
|
18426
|
+
validate(options, dllReferencePluginOptions);
|
|
18427
|
+
this.options = options;
|
|
18428
|
+
this.errors = /* @__PURE__ */ new WeakMap();
|
|
18429
|
+
}
|
|
18430
|
+
apply(compiler) {
|
|
18431
|
+
compiler.hooks.beforeCompile.tapPromise(
|
|
18432
|
+
_DllReferencePlugin.name,
|
|
18433
|
+
async (params) => {
|
|
18434
|
+
const manifest = await new Promise((resolve2, reject) => {
|
|
18435
|
+
var _a;
|
|
18436
|
+
if ("manifest" in this.options) {
|
|
18437
|
+
const manifest2 = this.options.manifest;
|
|
18438
|
+
if (typeof manifest2 === "string") {
|
|
18439
|
+
const manifestParameter = manifest2;
|
|
18440
|
+
(_a = compiler.inputFileSystem) == null ? void 0 : _a.readFile(
|
|
18441
|
+
manifestParameter,
|
|
18442
|
+
"utf8",
|
|
18443
|
+
(err, result2) => {
|
|
18444
|
+
if (err) return reject(err);
|
|
18445
|
+
if (!result2)
|
|
18446
|
+
return reject(
|
|
18447
|
+
new DllManifestError(
|
|
18448
|
+
manifestParameter,
|
|
18449
|
+
`Can't read anything from ${manifestParameter}`
|
|
18450
|
+
)
|
|
18451
|
+
);
|
|
18452
|
+
try {
|
|
18453
|
+
const manifest3 = JSON.parse(result2);
|
|
18454
|
+
resolve2(manifest3);
|
|
18455
|
+
} catch (parseError) {
|
|
18456
|
+
const manifestPath = makePathsRelative(
|
|
18457
|
+
compiler.context,
|
|
18458
|
+
manifestParameter,
|
|
18459
|
+
compiler.root
|
|
18460
|
+
);
|
|
18461
|
+
this.errors.set(
|
|
18462
|
+
params,
|
|
18463
|
+
new DllManifestError(
|
|
18464
|
+
manifestPath,
|
|
18465
|
+
parseError.message
|
|
18466
|
+
)
|
|
18467
|
+
);
|
|
18468
|
+
}
|
|
18469
|
+
}
|
|
18470
|
+
);
|
|
18471
|
+
} else {
|
|
18472
|
+
resolve2(manifest2);
|
|
18473
|
+
}
|
|
18474
|
+
} else {
|
|
18475
|
+
resolve2(void 0);
|
|
18476
|
+
}
|
|
18477
|
+
});
|
|
18478
|
+
if (!this.errors.has(params)) {
|
|
18479
|
+
new DllReferenceAgencyPlugin({
|
|
18480
|
+
...this.options,
|
|
18481
|
+
type: this.options.type || "require",
|
|
18482
|
+
extensions: this.options.extensions || [
|
|
18483
|
+
"",
|
|
18484
|
+
".js",
|
|
18485
|
+
".json",
|
|
18486
|
+
".wasm"
|
|
18487
|
+
],
|
|
18488
|
+
manifest
|
|
18489
|
+
}).apply(compiler);
|
|
18490
|
+
}
|
|
18491
|
+
}
|
|
18492
|
+
);
|
|
18493
|
+
compiler.hooks.compilation.tap(
|
|
18494
|
+
_DllReferencePlugin.name,
|
|
18495
|
+
(compilation, params) => {
|
|
18496
|
+
if ("manifest" in this.options && typeof this.options.manifest === "string") {
|
|
18497
|
+
const error = this.errors.get(params);
|
|
18498
|
+
if (error) {
|
|
18499
|
+
compilation.errors.push(error);
|
|
18500
|
+
}
|
|
18501
|
+
compilation.fileDependencies.add(this.options.manifest);
|
|
18502
|
+
}
|
|
18503
|
+
}
|
|
18504
|
+
);
|
|
18505
|
+
}
|
|
18506
|
+
};
|
|
18507
|
+
var DllManifestError = class extends WebpackError_default {
|
|
18508
|
+
constructor(filename2, message) {
|
|
18509
|
+
super();
|
|
18510
|
+
this.name = "DllManifestError";
|
|
18511
|
+
this.message = `Dll manifest ${filename2}
|
|
18512
|
+
${message}`;
|
|
18513
|
+
}
|
|
18514
|
+
};
|
|
18515
|
+
|
|
17408
18516
|
// src/lib/EnvironmentPlugin.ts
|
|
17409
18517
|
var EnvironmentPlugin = class {
|
|
17410
18518
|
constructor(...keys) {
|
|
@@ -18103,9 +19211,9 @@ var NodeTemplatePlugin = class {
|
|
|
18103
19211
|
};
|
|
18104
19212
|
|
|
18105
19213
|
// src/container/ModuleFederationRuntimePlugin.ts
|
|
18106
|
-
var
|
|
19214
|
+
var import_binding80 = require("@rspack/binding");
|
|
18107
19215
|
var ModuleFederationRuntimePlugin = create2(
|
|
18108
|
-
|
|
19216
|
+
import_binding80.BuiltinPluginName.ModuleFederationRuntimePlugin,
|
|
18109
19217
|
() => {
|
|
18110
19218
|
}
|
|
18111
19219
|
);
|
|
@@ -18301,10 +19409,10 @@ function getDefaultEntryRuntime(paths, options, compiler) {
|
|
|
18301
19409
|
}
|
|
18302
19410
|
|
|
18303
19411
|
// src/sharing/ConsumeSharedPlugin.ts
|
|
18304
|
-
var
|
|
19412
|
+
var import_binding82 = require("@rspack/binding");
|
|
18305
19413
|
|
|
18306
19414
|
// src/sharing/ShareRuntimePlugin.ts
|
|
18307
|
-
var
|
|
19415
|
+
var import_binding81 = require("@rspack/binding");
|
|
18308
19416
|
var compilerSet = /* @__PURE__ */ new WeakSet();
|
|
18309
19417
|
function isSingleton(compiler) {
|
|
18310
19418
|
return compilerSet.has(compiler);
|
|
@@ -18316,7 +19424,7 @@ var ShareRuntimePlugin = class extends RspackBuiltinPlugin {
|
|
|
18316
19424
|
constructor(enhanced = false) {
|
|
18317
19425
|
super();
|
|
18318
19426
|
this.enhanced = enhanced;
|
|
18319
|
-
this.name =
|
|
19427
|
+
this.name = import_binding81.BuiltinPluginName.ShareRuntimePlugin;
|
|
18320
19428
|
}
|
|
18321
19429
|
raw(compiler) {
|
|
18322
19430
|
if (isSingleton(compiler)) return;
|
|
@@ -18335,7 +19443,7 @@ function isRequiredVersion(str) {
|
|
|
18335
19443
|
var ConsumeSharedPlugin = class extends RspackBuiltinPlugin {
|
|
18336
19444
|
constructor(options) {
|
|
18337
19445
|
super();
|
|
18338
|
-
this.name =
|
|
19446
|
+
this.name = import_binding82.BuiltinPluginName.ConsumeSharedPlugin;
|
|
18339
19447
|
this._options = {
|
|
18340
19448
|
consumes: parseOptions(
|
|
18341
19449
|
options.consumes,
|
|
@@ -18398,11 +19506,11 @@ var ConsumeSharedPlugin = class extends RspackBuiltinPlugin {
|
|
|
18398
19506
|
};
|
|
18399
19507
|
|
|
18400
19508
|
// src/sharing/ProvideSharedPlugin.ts
|
|
18401
|
-
var
|
|
19509
|
+
var import_binding83 = require("@rspack/binding");
|
|
18402
19510
|
var ProvideSharedPlugin = class extends RspackBuiltinPlugin {
|
|
18403
19511
|
constructor(options) {
|
|
18404
19512
|
super();
|
|
18405
|
-
this.name =
|
|
19513
|
+
this.name = import_binding83.BuiltinPluginName.ProvideSharedPlugin;
|
|
18406
19514
|
this._provides = parseOptions(
|
|
18407
19515
|
options.provides,
|
|
18408
19516
|
(item) => {
|
|
@@ -18507,11 +19615,11 @@ var SharePlugin = class {
|
|
|
18507
19615
|
};
|
|
18508
19616
|
|
|
18509
19617
|
// src/container/ContainerPlugin.ts
|
|
18510
|
-
var
|
|
19618
|
+
var import_binding84 = require("@rspack/binding");
|
|
18511
19619
|
var ContainerPlugin = class extends RspackBuiltinPlugin {
|
|
18512
19620
|
constructor(options) {
|
|
18513
19621
|
super();
|
|
18514
|
-
this.name =
|
|
19622
|
+
this.name = import_binding84.BuiltinPluginName.ContainerPlugin;
|
|
18515
19623
|
this._options = {
|
|
18516
19624
|
name: options.name,
|
|
18517
19625
|
shareScope: options.shareScope || "default",
|
|
@@ -18555,11 +19663,11 @@ var ContainerPlugin = class extends RspackBuiltinPlugin {
|
|
|
18555
19663
|
};
|
|
18556
19664
|
|
|
18557
19665
|
// src/container/ContainerReferencePlugin.ts
|
|
18558
|
-
var
|
|
19666
|
+
var import_binding85 = require("@rspack/binding");
|
|
18559
19667
|
var ContainerReferencePlugin = class extends RspackBuiltinPlugin {
|
|
18560
19668
|
constructor(options) {
|
|
18561
19669
|
super();
|
|
18562
|
-
this.name =
|
|
19670
|
+
this.name = import_binding85.BuiltinPluginName.ContainerReferencePlugin;
|
|
18563
19671
|
this._options = {
|
|
18564
19672
|
remoteType: options.remoteType,
|
|
18565
19673
|
remotes: parseOptions(
|
|
@@ -18644,7 +19752,7 @@ var ModuleFederationPluginV1 = class {
|
|
|
18644
19752
|
};
|
|
18645
19753
|
|
|
18646
19754
|
// src/exports.ts
|
|
18647
|
-
var
|
|
19755
|
+
var import_binding86 = require("@rspack/binding");
|
|
18648
19756
|
var rspackVersion = import_package.version;
|
|
18649
19757
|
var version = import_package.webpackVersion;
|
|
18650
19758
|
var WebpackError2 = Error;
|
|
@@ -18690,8 +19798,8 @@ var sharing = {
|
|
|
18690
19798
|
};
|
|
18691
19799
|
var experiments2 = {
|
|
18692
19800
|
globalTrace: {
|
|
18693
|
-
register:
|
|
18694
|
-
cleanup:
|
|
19801
|
+
register: import_binding86.registerGlobalTrace,
|
|
19802
|
+
cleanup: import_binding86.cleanupGlobalTrace
|
|
18695
19803
|
},
|
|
18696
19804
|
RemoveDuplicateModulesPlugin
|
|
18697
19805
|
};
|
|
@@ -18812,6 +19920,8 @@ module.exports = rspack;
|
|
|
18812
19920
|
CopyRspackPlugin,
|
|
18813
19921
|
CssExtractRspackPlugin,
|
|
18814
19922
|
DefinePlugin,
|
|
19923
|
+
DllPlugin,
|
|
19924
|
+
DllReferencePlugin,
|
|
18815
19925
|
DynamicEntryPlugin,
|
|
18816
19926
|
EntryOptionPlugin,
|
|
18817
19927
|
EntryPlugin,
|