@rspack/core 1.3.15 → 1.4.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/compiled/@swc/types/index.d.ts +18 -2
- package/compiled/@swc/types/package.json +1 -1
- package/compiled/tinypool/README.md +4 -196
- package/compiled/tinypool/dist/common-Qw-RoVFD.js +28 -0
- package/compiled/tinypool/dist/entry/process.d.ts +1 -2
- package/compiled/tinypool/dist/entry/process.js +63 -83
- package/compiled/tinypool/dist/entry/utils.d.ts +3 -1
- package/compiled/tinypool/dist/entry/utils.js +3 -9
- package/compiled/tinypool/dist/entry/worker.d.ts +1 -2
- package/compiled/tinypool/dist/entry/worker.js +66 -94
- package/compiled/tinypool/dist/index.d.ts +132 -125
- package/compiled/tinypool/dist/index.js +771 -1035
- package/compiled/tinypool/dist/utils-B--2TaWv.js +38 -0
- package/compiled/tinypool/dist/utils-De75vAgL.js +10 -0
- package/compiled/tinypool/package.json +6 -22
- package/compiled/zod/dist/types/v4/classic/schemas.d.ts +19 -14
- package/compiled/zod/dist/types/v4/core/api.d.ts +5 -4
- package/compiled/zod/dist/types/v4/core/checks.d.ts +1 -1
- package/compiled/zod/dist/types/v4/core/core.d.ts +1 -1
- package/compiled/zod/dist/types/v4/core/registries.d.ts +3 -1
- package/compiled/zod/dist/types/v4/core/schemas.d.ts +33 -39
- package/compiled/zod/dist/types/v4/core/to-json-schema.d.ts +2 -2
- package/compiled/zod/dist/types/v4/core/util.d.ts +1 -1
- package/compiled/zod/dist/types/v4/locales/index.d.ts +1 -0
- package/compiled/zod/dist/types/v4/locales/ps.d.ts +4 -0
- package/compiled/zod/dist/types/v4/mini/schemas.d.ts +77 -125
- package/compiled/zod/index.js +33 -33
- package/compiled/zod/package.json +1 -1
- package/dist/BuildInfo.d.ts +17 -0
- package/dist/FileSystem.d.ts +26 -3
- package/dist/Module.d.ts +1 -13
- package/dist/builtin-loader/swc/types.d.ts +255 -255
- package/dist/config/devServer.d.ts +10 -10
- package/dist/config/normalization.d.ts +1 -0
- package/dist/config/types.d.ts +10 -1
- package/dist/config/utils.d.ts +1 -0
- package/dist/config/zod.d.ts +1638 -1068
- package/dist/cssExtractLoader.js +5 -5
- package/dist/exports.d.ts +2 -1
- package/dist/index.js +544 -470
- package/dist/loader-runner/index.d.ts +0 -9
- package/dist/trace/index.d.ts +16 -18
- package/dist/worker.js +2 -2
- package/module.d.ts +1 -1
- package/package.json +8 -8
- package/compiled/tinypool/dist/chunk-6LX4VMOV.js +0 -31
- package/compiled/tinypool/dist/chunk-ACQHDOFQ.js +0 -12
- package/compiled/tinypool/dist/chunk-E2J7JLFN.js +0 -53
- package/compiled/tinypool/dist/chunk-UBWFVGJX.js +0 -38
package/dist/index.js
CHANGED
@@ -286,77 +286,78 @@ var __webpack_exports__ = {};
|
|
286
286
|
for(var __webpack_i__ in (()=>{
|
287
287
|
let createMd4, createXxhash64, service_pool, bindingVersionCheck_result, loadLoader_url;
|
288
288
|
__webpack_require__.r(__webpack_exports__), __webpack_require__.d(__webpack_exports__, {
|
289
|
-
|
289
|
+
CopyRspackPlugin: ()=>CopyRspackPlugin,
|
290
290
|
RuntimePlugin: ()=>RuntimePlugin,
|
291
|
+
RspackOptionsApply: ()=>RspackOptionsApply,
|
292
|
+
SourceMapDevToolPlugin: ()=>SourceMapDevToolPlugin,
|
293
|
+
RstestPlugin: ()=>RstestPlugin,
|
294
|
+
AsyncDependenciesBlock: ()=>binding_.AsyncDependenciesBlock,
|
295
|
+
electron: ()=>electron,
|
296
|
+
ExternalModule: ()=>binding_.ExternalModule,
|
297
|
+
Stats: ()=>Stats,
|
298
|
+
version: ()=>exports_version,
|
291
299
|
LoaderOptionsPlugin: ()=>LoaderOptionsPlugin,
|
292
|
-
|
293
|
-
|
300
|
+
Template: ()=>Template,
|
301
|
+
Compilation: ()=>Compilation,
|
302
|
+
IgnorePlugin: ()=>IgnorePlugin,
|
294
303
|
ContextModule: ()=>binding_.ContextModule,
|
304
|
+
WebpackError: ()=>exports_WebpackError,
|
305
|
+
RuntimeGlobals: ()=>RuntimeGlobals,
|
306
|
+
DynamicEntryPlugin: ()=>DynamicEntryPlugin,
|
307
|
+
EntryPlugin: ()=>EntryPlugin,
|
308
|
+
EntryDependency: ()=>binding_.EntryDependency,
|
295
309
|
DllReferencePlugin: ()=>DllReferencePlugin,
|
296
|
-
|
297
|
-
|
310
|
+
HotModuleReplacementPlugin: ()=>HotModuleReplacementPlugin,
|
311
|
+
Dependency: ()=>binding_.Dependency,
|
312
|
+
LoaderTargetPlugin: ()=>LoaderTargetPlugin,
|
298
313
|
sharing: ()=>sharing,
|
299
|
-
config: ()=>exports_config,
|
300
314
|
container: ()=>container,
|
301
|
-
|
315
|
+
sources: ()=>sources,
|
316
|
+
EvalDevToolModulePlugin: ()=>EvalDevToolModulePlugin,
|
302
317
|
SwcJsMinimizerRspackPlugin: ()=>SwcJsMinimizerRspackPlugin,
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
318
|
+
MultiCompiler: ()=>MultiCompiler,
|
319
|
+
EntryOptionPlugin: ()=>EntryOptionPlugin,
|
320
|
+
javascript: ()=>javascript,
|
321
|
+
EvalSourceMapDevToolPlugin: ()=>EvalSourceMapDevToolPlugin,
|
322
|
+
ContextReplacementPlugin: ()=>ContextReplacementPlugin,
|
308
323
|
EnvironmentPlugin: ()=>EnvironmentPlugin,
|
309
|
-
DefinePlugin: ()=>DefinePlugin,
|
310
|
-
EntryOptionPlugin: ()=>lib_EntryOptionPlugin,
|
311
324
|
NoEmitOnErrorsPlugin: ()=>NoEmitOnErrorsPlugin,
|
325
|
+
ValidationError: ()=>validate_ValidationError,
|
326
|
+
LightningCssMinimizerRspackPlugin: ()=>LightningCssMinimizerRspackPlugin,
|
327
|
+
web: ()=>web,
|
328
|
+
CircularDependencyRspackPlugin: ()=>CircularDependencyRspackPlugin,
|
312
329
|
NormalModule: ()=>binding_.NormalModule,
|
313
|
-
|
314
|
-
|
315
|
-
javascript: ()=>javascript,
|
316
|
-
CopyRspackPlugin: ()=>CopyRspackPlugin,
|
317
|
-
Template: ()=>Template,
|
318
|
-
node: ()=>exports_node,
|
319
|
-
sources: ()=>sources,
|
330
|
+
config: ()=>exports_config,
|
331
|
+
ModuleFilenameHelpers: ()=>ModuleFilenameHelpers_namespaceObject,
|
320
332
|
webworker: ()=>webworker,
|
321
|
-
|
333
|
+
experiments: ()=>exports_experiments,
|
334
|
+
RuntimeModule: ()=>RuntimeModule,
|
335
|
+
node: ()=>exports_node,
|
336
|
+
HtmlRspackPlugin: ()=>HtmlRspackPlugin,
|
322
337
|
WarnCaseSensitiveModulesPlugin: ()=>WarnCaseSensitiveModulesPlugin,
|
323
|
-
ConcatenatedModule: ()=>binding_.ConcatenatedModule,
|
324
|
-
wasm: ()=>exports_wasm,
|
325
|
-
Dependency: ()=>binding_.Dependency,
|
326
|
-
IgnorePlugin: ()=>IgnorePlugin,
|
327
|
-
WebpackOptionsApply: ()=>RspackOptionsApply,
|
328
|
-
EntryDependency: ()=>binding_.EntryDependency,
|
329
|
-
MultiStats: ()=>MultiStats,
|
330
|
-
ExternalsPlugin: ()=>ExternalsPlugin,
|
331
|
-
Module: ()=>binding_.Module,
|
332
|
-
BannerPlugin: ()=>BannerPlugin,
|
333
|
-
RspackOptionsApply: ()=>RspackOptionsApply,
|
334
|
-
library: ()=>exports_library,
|
335
338
|
util: ()=>util,
|
336
|
-
|
337
|
-
|
338
|
-
Compilation: ()=>Compilation,
|
339
|
-
ContextReplacementPlugin: ()=>ContextReplacementPlugin,
|
340
|
-
EntryPlugin: ()=>EntryPlugin,
|
339
|
+
ConcatenatedModule: ()=>binding_.ConcatenatedModule,
|
340
|
+
optimize: ()=>optimize,
|
341
341
|
ProvidePlugin: ()=>ProvidePlugin,
|
342
|
-
EvalDevToolModulePlugin: ()=>EvalDevToolModulePlugin,
|
343
|
-
EvalSourceMapDevToolPlugin: ()=>EvalSourceMapDevToolPlugin,
|
344
|
-
ExternalModule: ()=>binding_.ExternalModule,
|
345
|
-
web: ()=>web,
|
346
|
-
experiments: ()=>exports_experiments,
|
347
|
-
HotModuleReplacementPlugin: ()=>HotModuleReplacementPlugin,
|
348
|
-
CssExtractRspackPlugin: ()=>CssExtractRspackPlugin,
|
349
|
-
electron: ()=>electron,
|
350
|
-
rspack: ()=>src_rspack,
|
351
|
-
Stats: ()=>Stats,
|
352
|
-
default: ()=>src_0,
|
353
|
-
ModuleFilenameHelpers: ()=>ModuleFilenameHelpers_namespaceObject,
|
354
342
|
rspackVersion: ()=>exports_rspackVersion,
|
355
|
-
NormalModuleReplacementPlugin: ()=>NormalModuleReplacementPlugin,
|
356
343
|
DllPlugin: ()=>DllPlugin,
|
357
|
-
|
344
|
+
library: ()=>exports_library,
|
345
|
+
CssExtractRspackPlugin: ()=>CssExtractRspackPlugin,
|
346
|
+
DefinePlugin: ()=>DefinePlugin,
|
347
|
+
BannerPlugin: ()=>BannerPlugin,
|
348
|
+
ProgressPlugin: ()=>ProgressPlugin,
|
349
|
+
StatsErrorCode: ()=>statsFactoryUtils_StatsErrorCode,
|
350
|
+
MultiStats: ()=>MultiStats,
|
351
|
+
Module: ()=>binding_.Module,
|
352
|
+
WebpackOptionsApply: ()=>RspackOptionsApply,
|
353
|
+
NormalModuleReplacementPlugin: ()=>NormalModuleReplacementPlugin,
|
354
|
+
default: ()=>src_0,
|
355
|
+
ExternalsPlugin: ()=>ExternalsPlugin,
|
356
|
+
rspack: ()=>src_rspack,
|
357
|
+
Compiler: ()=>Compiler,
|
358
|
+
wasm: ()=>exports_wasm
|
358
359
|
});
|
359
|
-
var RequestType, _computedKey, Compilation_computedKey, _computedKey1, _computedKey2, ArrayQueue_computedKey, browserslistTargetHandler_namespaceObject = {};
|
360
|
+
var RequestType, StatsErrorCode, _computedKey, Compilation_computedKey, _computedKey1, _computedKey2, ArrayQueue_computedKey, browserslistTargetHandler_namespaceObject = {};
|
360
361
|
__webpack_require__.r(browserslistTargetHandler_namespaceObject), __webpack_require__.d(browserslistTargetHandler_namespaceObject, {
|
361
362
|
resolve: ()=>browserslistTargetHandler_resolve
|
362
363
|
});
|
@@ -384,7 +385,7 @@ for(var __webpack_i__ in (()=>{
|
|
384
385
|
DllReferencePlugin: ()=>DllReferencePlugin,
|
385
386
|
DynamicEntryPlugin: ()=>DynamicEntryPlugin,
|
386
387
|
EntryDependency: ()=>binding_.EntryDependency,
|
387
|
-
EntryOptionPlugin: ()=>
|
388
|
+
EntryOptionPlugin: ()=>EntryOptionPlugin,
|
388
389
|
EntryPlugin: ()=>EntryPlugin,
|
389
390
|
EnvironmentPlugin: ()=>EnvironmentPlugin,
|
390
391
|
EvalDevToolModulePlugin: ()=>EvalDevToolModulePlugin,
|
@@ -413,6 +414,7 @@ for(var __webpack_i__ in (()=>{
|
|
413
414
|
RuntimePlugin: ()=>RuntimePlugin,
|
414
415
|
SourceMapDevToolPlugin: ()=>SourceMapDevToolPlugin,
|
415
416
|
Stats: ()=>Stats,
|
417
|
+
StatsErrorCode: ()=>statsFactoryUtils_StatsErrorCode,
|
416
418
|
SwcJsMinimizerRspackPlugin: ()=>SwcJsMinimizerRspackPlugin,
|
417
419
|
Template: ()=>Template,
|
418
420
|
ValidationError: ()=>validate_ValidationError,
|
@@ -905,7 +907,7 @@ for(var __webpack_i__ in (()=>{
|
|
905
907
|
let external_node_util_namespaceObject = require("node:util");
|
906
908
|
var external_node_util_default = __webpack_require__.n(external_node_util_namespaceObject);
|
907
909
|
_computedKey = external_node_util_namespaceObject.inspect.custom;
|
908
|
-
let
|
910
|
+
let lib_WebpackError = class extends Error {
|
909
911
|
loc;
|
910
912
|
file;
|
911
913
|
chunk;
|
@@ -1537,7 +1539,7 @@ for(var __webpack_i__ in (()=>{
|
|
1537
1539
|
if (!isNil(map)) return "string" == typeof map ? map ? toBuffer(map) : void 0 : toBuffer(JSON.stringify(map));
|
1538
1540
|
}
|
1539
1541
|
function concatErrorMsgAndStack(err) {
|
1540
|
-
return "string" == typeof err ? Error(err) : (!("hideStack" in err && err.hideStack) && "stack" in err ? err.message = err.stack || err.toString() : err.message = err.toString(), err.stack = err.stack || void 0,
|
1542
|
+
return "string" == typeof err ? Error(err) : (!("hideStack" in err && err.hideStack) && "stack" in err ? err.message = err.stack || err.toString() : err.message = err.toString(), err.stack = err.stack || void 0, err);
|
1541
1543
|
}
|
1542
1544
|
function stringifyLoaderObject(o) {
|
1543
1545
|
return o.path + o.query + o.fragment;
|
@@ -2052,13 +2054,13 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
|
|
2052
2054
|
let cbs = this.#cbs;
|
2053
2055
|
this.#cbs = [], this.#inner(args, (wholeErr, results)=>{
|
2054
2056
|
if (0 !== this.#args.length && queueMicrotask(this.#execute.bind(this)), wholeErr) {
|
2055
|
-
let webpackError = new
|
2057
|
+
let webpackError = new lib_WebpackError(wholeErr.message);
|
2056
2058
|
for (let cb of cbs)cb(webpackError);
|
2057
2059
|
return;
|
2058
2060
|
}
|
2059
2061
|
for(let i = 0; i < results.length; i++){
|
2060
2062
|
let [errMsg, module] = results[i];
|
2061
|
-
(0, cbs[i])(errMsg ? new
|
2063
|
+
(0, cbs[i])(errMsg ? new lib_WebpackError(errMsg) : null, module);
|
2062
2064
|
}
|
2063
2065
|
});
|
2064
2066
|
};
|
@@ -2165,22 +2167,22 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
|
|
2165
2167
|
super(), this.name = "ConcurrentCompilationError", this.message = "You ran rspack twice. Each instance only supports a single concurrent compilation at a time.";
|
2166
2168
|
}
|
2167
2169
|
}
|
2168
|
-
class HookWebpackError extends
|
2170
|
+
class HookWebpackError extends lib_WebpackError {
|
2169
2171
|
hook;
|
2170
2172
|
error;
|
2171
2173
|
constructor(error, hook){
|
2172
2174
|
super(error.message), this.name = "HookWebpackError", this.hook = hook, this.error = error, this.hideStack = !0, this.details = `caused by plugins in ${hook}\n${error.stack}`, this.stack += `\n-- inner error --\n${error.stack}`;
|
2173
2175
|
}
|
2174
2176
|
}
|
2175
|
-
let makeWebpackError = (error, hook)=>error instanceof
|
2176
|
-
if (err) return err instanceof
|
2177
|
+
let makeWebpackError = (error, hook)=>error instanceof lib_WebpackError ? error : new HookWebpackError(error, hook), makeWebpackErrorCallback = (callback, hook)=>(err, result)=>{
|
2178
|
+
if (err) return err instanceof lib_WebpackError ? void callback(err) : void callback(new HookWebpackError(err, hook));
|
2177
2179
|
callback(null, result);
|
2178
2180
|
}, tryRunOrWebpackError = (fn, hook)=>{
|
2179
2181
|
let r;
|
2180
2182
|
try {
|
2181
2183
|
r = fn();
|
2182
2184
|
} catch (err) {
|
2183
|
-
if (err instanceof
|
2185
|
+
if (err instanceof lib_WebpackError) throw err;
|
2184
2186
|
throw new HookWebpackError(err, hook);
|
2185
2187
|
}
|
2186
2188
|
return r;
|
@@ -2188,7 +2190,7 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
|
|
2188
2190
|
let leftTimes = times;
|
2189
2191
|
return (err)=>0 == --leftTimes ? callback() : err && leftTimes > 0 ? (leftTimes = 0, callback()) : void 0;
|
2190
2192
|
};
|
2191
|
-
class
|
2193
|
+
class Cache {
|
2192
2194
|
static STAGE_DISK = 10;
|
2193
2195
|
static STAGE_MEMORY = -10;
|
2194
2196
|
static STAGE_DEFAULT = 0;
|
@@ -2254,7 +2256,7 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
|
|
2254
2256
|
this.message = match?.[1] ? createMessage(match[1]) : createMessage();
|
2255
2257
|
}
|
2256
2258
|
}
|
2257
|
-
class AbstractMethodError extends
|
2259
|
+
class AbstractMethodError extends lib_WebpackError {
|
2258
2260
|
constructor(){
|
2259
2261
|
super(new Message().message), this.name = "AbstractMethodError";
|
2260
2262
|
}
|
@@ -2537,7 +2539,7 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
|
|
2537
2539
|
return await this.storePromise(result), result;
|
2538
2540
|
}
|
2539
2541
|
}
|
2540
|
-
class
|
2542
|
+
class CacheFacade_CacheFacade {
|
2541
2543
|
_name;
|
2542
2544
|
_cache;
|
2543
2545
|
_hashFunction;
|
@@ -2545,7 +2547,7 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
|
|
2545
2547
|
this._cache = cache, this._name = name, this._hashFunction = hashFunction;
|
2546
2548
|
}
|
2547
2549
|
getChildCache(name) {
|
2548
|
-
return new
|
2550
|
+
return new CacheFacade_CacheFacade(this._cache, `${this._name}|${name}`, this._hashFunction);
|
2549
2551
|
}
|
2550
2552
|
getItemCache(identifier, etag) {
|
2551
2553
|
return new ItemCacheFacade(this._cache, `${this._name}|${identifier}`, etag);
|
@@ -2652,6 +2654,7 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
|
|
2652
2654
|
readFile: ASYNC_NOOP,
|
2653
2655
|
stat: ASYNC_NOOP,
|
2654
2656
|
lstat: ASYNC_NOOP,
|
2657
|
+
realpath: ASYNC_NOOP,
|
2655
2658
|
open: ASYNC_NOOP,
|
2656
2659
|
rename: ASYNC_NOOP,
|
2657
2660
|
close: ASYNC_NOOP,
|
@@ -2661,6 +2664,69 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
|
|
2661
2664
|
readUntil: ASYNC_NOOP,
|
2662
2665
|
readToEnd: ASYNC_NOOP
|
2663
2666
|
};
|
2667
|
+
function __to_binding_stat(stat) {
|
2668
|
+
return {
|
2669
|
+
isFile: stat.isFile(),
|
2670
|
+
isDirectory: stat.isDirectory(),
|
2671
|
+
isSymlink: stat.isSymbolicLink(),
|
2672
|
+
atimeMs: stat.atimeMs ?? toMs(stat.atime),
|
2673
|
+
mtimeMs: stat.mtimeMs ?? toMs(stat.mtime),
|
2674
|
+
ctimeMs: stat.ctimeMs ?? toMs(stat.ctime),
|
2675
|
+
birthtimeMs: stat.birthtimeMs ?? toMs(stat.birthtime),
|
2676
|
+
size: stat.size
|
2677
|
+
};
|
2678
|
+
}
|
2679
|
+
function toMs(i) {
|
2680
|
+
return i.getTime ? i.getTime() : i;
|
2681
|
+
}
|
2682
|
+
class ThreadsafeInputNodeFS {
|
2683
|
+
writeFile;
|
2684
|
+
removeFile;
|
2685
|
+
mkdir;
|
2686
|
+
mkdirp;
|
2687
|
+
removeDirAll;
|
2688
|
+
readDir;
|
2689
|
+
readFile;
|
2690
|
+
stat;
|
2691
|
+
lstat;
|
2692
|
+
realpath;
|
2693
|
+
open;
|
2694
|
+
rename;
|
2695
|
+
close;
|
2696
|
+
write;
|
2697
|
+
writeAll;
|
2698
|
+
read;
|
2699
|
+
readUntil;
|
2700
|
+
readToEnd;
|
2701
|
+
constructor(fs){
|
2702
|
+
if (Object.assign(this, NOOP_FILESYSTEM), !fs) return;
|
2703
|
+
this.readDir = memoizeFn(()=>{
|
2704
|
+
let readDirFn = external_node_util_default().promisify(fs.readdir.bind(fs));
|
2705
|
+
return async (filePath)=>await readDirFn(filePath);
|
2706
|
+
}), this.readFile = memoizeFn(()=>external_node_util_default().promisify(fs.readFile.bind(fs))), this.stat = memoizeFn(()=>(name)=>new Promise((resolve, reject)=>{
|
2707
|
+
fs.stat(name, (err, stats)=>{
|
2708
|
+
if (err) return reject(err);
|
2709
|
+
resolve(stats && __to_binding_stat(stats));
|
2710
|
+
});
|
2711
|
+
})), this.lstat = memoizeFn(()=>(name)=>new Promise((resolve, reject)=>{
|
2712
|
+
(fs.lstat || fs.stat)(name, (err, stats)=>{
|
2713
|
+
if (err) return reject(err);
|
2714
|
+
resolve(stats && __to_binding_stat(stats));
|
2715
|
+
});
|
2716
|
+
})), this.realpath = memoizeFn(()=>(name)=>new Promise((resolve, reject)=>{
|
2717
|
+
fs.realpath ? fs.realpath(name, (err, path)=>{
|
2718
|
+
if (err) return reject(err);
|
2719
|
+
resolve(path);
|
2720
|
+
}) : reject(Error("fs.realpath is not a function"));
|
2721
|
+
}));
|
2722
|
+
}
|
2723
|
+
static __to_binding(fs) {
|
2724
|
+
return new this(fs);
|
2725
|
+
}
|
2726
|
+
static needsBinding(ifs) {
|
2727
|
+
return Array.isArray(ifs) && ifs.length > 0;
|
2728
|
+
}
|
2729
|
+
}
|
2664
2730
|
class ThreadsafeOutputNodeFS {
|
2665
2731
|
writeFile;
|
2666
2732
|
removeFile;
|
@@ -2671,6 +2737,7 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
|
|
2671
2737
|
readFile;
|
2672
2738
|
stat;
|
2673
2739
|
lstat;
|
2740
|
+
realpath;
|
2674
2741
|
open;
|
2675
2742
|
rename;
|
2676
2743
|
close;
|
@@ -2705,31 +2772,19 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
|
|
2705
2772
|
let statFn = external_node_util_default().promisify(fs.stat.bind(fs));
|
2706
2773
|
return async (filePath)=>{
|
2707
2774
|
let res = await statFn(filePath);
|
2708
|
-
return res &&
|
2775
|
+
return res && __to_binding_stat(res);
|
2709
2776
|
};
|
2710
2777
|
}), this.lstat = memoizeFn(()=>{
|
2711
2778
|
let statFn = external_node_util_default().promisify((fs.lstat || fs.stat).bind(fs));
|
2712
2779
|
return async (filePath)=>{
|
2713
2780
|
let res = await statFn(filePath);
|
2714
|
-
return res &&
|
2781
|
+
return res && __to_binding_stat(res);
|
2715
2782
|
};
|
2716
2783
|
});
|
2717
2784
|
}
|
2718
2785
|
static __to_binding(fs) {
|
2719
2786
|
return new this(fs);
|
2720
2787
|
}
|
2721
|
-
static __to_binding_stat(stat) {
|
2722
|
-
return {
|
2723
|
-
isFile: stat.isFile(),
|
2724
|
-
isDirectory: stat.isDirectory(),
|
2725
|
-
isSymlink: stat.isSymbolicLink(),
|
2726
|
-
atimeMs: stat.atimeMs,
|
2727
|
-
mtimeMs: stat.atimeMs,
|
2728
|
-
ctimeMs: stat.atimeMs,
|
2729
|
-
birthtimeMs: stat.birthtimeMs,
|
2730
|
-
size: stat.size
|
2731
|
-
};
|
2732
|
-
}
|
2733
2788
|
}
|
2734
2789
|
class ThreadsafeIntermediateNodeFS extends ThreadsafeOutputNodeFS {
|
2735
2790
|
constructor(fs){
|
@@ -2979,6 +3034,72 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
|
|
2979
3034
|
}
|
2980
3035
|
let external_node_querystring_namespaceObject = require("node:querystring");
|
2981
3036
|
var external_node_querystring_default = __webpack_require__.n(external_node_querystring_namespaceObject);
|
3037
|
+
let $assets = Symbol("assets");
|
3038
|
+
Object.defineProperty(binding_.KnownBuildInfo.prototype, external_node_util_default().inspect.custom, {
|
3039
|
+
enumerable: !0,
|
3040
|
+
configurable: !0,
|
3041
|
+
value () {
|
3042
|
+
return {
|
3043
|
+
...this,
|
3044
|
+
assets: this.assets,
|
3045
|
+
fileDependencies: this.fileDependencies,
|
3046
|
+
contextDependencies: this.contextDependencies,
|
3047
|
+
missingDependencies: this.missingDependencies,
|
3048
|
+
buildDependencies: this.buildDependencies
|
3049
|
+
};
|
3050
|
+
}
|
3051
|
+
}), Object.defineProperty(binding_.KnownBuildInfo.prototype, "assets", {
|
3052
|
+
enumerable: !0,
|
3053
|
+
configurable: !0,
|
3054
|
+
get () {
|
3055
|
+
if (this[binding_.BUILD_INFO_ASSETS_SYMBOL][$assets]) return this[binding_.BUILD_INFO_ASSETS_SYMBOL][$assets];
|
3056
|
+
let assets = new Proxy(Object.create(null), {
|
3057
|
+
ownKeys: ()=>this[binding_.BUILD_INFO_ASSETS_SYMBOL].keys(),
|
3058
|
+
getOwnPropertyDescriptor: ()=>({
|
3059
|
+
enumerable: !0,
|
3060
|
+
configurable: !0
|
3061
|
+
})
|
3062
|
+
});
|
3063
|
+
return Object.defineProperty(this[binding_.BUILD_INFO_ASSETS_SYMBOL], $assets, {
|
3064
|
+
enumerable: !1,
|
3065
|
+
configurable: !0,
|
3066
|
+
value: assets
|
3067
|
+
}), assets;
|
3068
|
+
}
|
3069
|
+
}), Object.defineProperty(binding_.KnownBuildInfo.prototype, "fileDependencies", {
|
3070
|
+
enumerable: !0,
|
3071
|
+
configurable: !0,
|
3072
|
+
get () {
|
3073
|
+
return new Set(this[binding_.BUILD_INFO_FILE_DEPENDENCIES_SYMBOL]);
|
3074
|
+
}
|
3075
|
+
}), Object.defineProperty(binding_.KnownBuildInfo.prototype, "contextDependencies", {
|
3076
|
+
enumerable: !0,
|
3077
|
+
configurable: !0,
|
3078
|
+
get () {
|
3079
|
+
return new Set(this[binding_.BUILD_INFO_CONTEXT_DEPENDENCIES_SYMBOL]);
|
3080
|
+
}
|
3081
|
+
}), Object.defineProperty(binding_.KnownBuildInfo.prototype, "missingDependencies", {
|
3082
|
+
enumerable: !0,
|
3083
|
+
configurable: !0,
|
3084
|
+
get () {
|
3085
|
+
return new Set(this[binding_.BUILD_INFO_MISSING_DEPENDENCIES_SYMBOL]);
|
3086
|
+
}
|
3087
|
+
}), Object.defineProperty(binding_.KnownBuildInfo.prototype, "buildDependencies", {
|
3088
|
+
enumerable: !0,
|
3089
|
+
configurable: !0,
|
3090
|
+
get () {
|
3091
|
+
return new Set(this[binding_.BUILD_INFO_BUILD_DEPENDENCIES_SYMBOL]);
|
3092
|
+
}
|
3093
|
+
});
|
3094
|
+
let knownBuildInfoFields = new Set([
|
3095
|
+
"assets",
|
3096
|
+
"fileDependencies",
|
3097
|
+
"contextDependencies",
|
3098
|
+
"missingDependencies",
|
3099
|
+
"buildDependencies"
|
3100
|
+
]), commitCustomFieldsToRust = (buildInfo)=>{
|
3101
|
+
Object.keys(buildInfo).some((key)=>!knownBuildInfoFields.has(key)) && buildInfo[binding_.COMMIT_CUSTOM_FIELDS_SYMBOL]();
|
3102
|
+
};
|
2982
3103
|
Object.defineProperty(binding_.NormalModule.prototype, "identifier", {
|
2983
3104
|
enumerable: !0,
|
2984
3105
|
configurable: !0,
|
@@ -3057,57 +3178,62 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
|
|
3057
3178
|
}, compilationHooksMap.set(compilation, hooks)), hooks;
|
3058
3179
|
}
|
3059
3180
|
});
|
3060
|
-
let external_node_fs_namespaceObject = require("node:fs");
|
3061
|
-
var external_node_fs_default = __webpack_require__.n(external_node_fs_namespaceObject);
|
3062
3181
|
class JavaScriptTracer {
|
3063
3182
|
static startTime;
|
3064
3183
|
static events;
|
3065
3184
|
static layer;
|
3066
3185
|
static output;
|
3067
3186
|
static session;
|
3068
|
-
static counter =
|
3187
|
+
static counter = 10000;
|
3069
3188
|
static async initJavaScriptTrace(layer, output) {
|
3070
3189
|
let { Session } = await Promise.resolve().then(__webpack_require__.bind(__webpack_require__, "node:inspector"));
|
3071
|
-
this.session = new Session(), this.layer = layer, this.output = output, this.events = [];
|
3072
|
-
|
3073
|
-
|
3190
|
+
this.session = new Session(), this.layer = layer, this.output = output, this.events = [], this.startTime = process.hrtime.bigint();
|
3191
|
+
}
|
3192
|
+
static uuid() {
|
3193
|
+
return this.counter++;
|
3074
3194
|
}
|
3075
3195
|
static initCpuProfiler() {
|
3076
|
-
|
3196
|
+
this.layer && (this.session.connect(), this.session.post("Profiler.enable"), this.session.post("Profiler.start"));
|
3077
3197
|
}
|
3078
3198
|
static async cleanupJavaScriptTrace() {
|
3079
|
-
if (!this.layer
|
3199
|
+
if (!this.layer) return;
|
3080
3200
|
let profileHandler = (err, param)=>{
|
3081
3201
|
let cpu_profile;
|
3082
|
-
err ? console.error("Error stopping profiler:", err) : cpu_profile = param.profile, cpu_profile
|
3083
|
-
|
3084
|
-
|
3085
|
-
|
3086
|
-
|
3087
|
-
|
3088
|
-
|
3089
|
-
|
3090
|
-
|
3091
|
-
|
3202
|
+
if (err ? console.error("Error stopping profiler:", err) : cpu_profile = param.profile, cpu_profile) {
|
3203
|
+
let uuid = this.uuid();
|
3204
|
+
this.pushEvent({
|
3205
|
+
name: "Profile",
|
3206
|
+
ph: "P",
|
3207
|
+
trackName: "JavaScript CPU Profiler",
|
3208
|
+
processName: "JavaScript CPU",
|
3209
|
+
uuid,
|
3210
|
+
...this.getCommonEv(),
|
3211
|
+
categories: [
|
3212
|
+
"disabled-by-default-v8.cpu_profiler"
|
3213
|
+
],
|
3214
|
+
args: {
|
3215
|
+
data: {
|
3216
|
+
startTime: 0
|
3217
|
+
}
|
3092
3218
|
}
|
3093
|
-
}
|
3094
|
-
|
3095
|
-
|
3096
|
-
|
3097
|
-
|
3098
|
-
|
3099
|
-
|
3100
|
-
|
3101
|
-
|
3102
|
-
|
3103
|
-
|
3104
|
-
|
3219
|
+
}), this.pushEvent({
|
3220
|
+
name: "ProfileChunk",
|
3221
|
+
ph: "P",
|
3222
|
+
trackName: "JavaScript CPU Profiler",
|
3223
|
+
processName: "JavaScript CPU",
|
3224
|
+
...this.getCommonEv(),
|
3225
|
+
categories: [
|
3226
|
+
"disabled-by-default-v8.cpu_profiler"
|
3227
|
+
],
|
3228
|
+
uuid,
|
3229
|
+
args: {
|
3230
|
+
data: {
|
3231
|
+
cpuProfile: cpu_profile,
|
3232
|
+
timeDeltas: cpu_profile.timeDeltas
|
3233
|
+
}
|
3105
3234
|
}
|
3106
|
-
}
|
3107
|
-
}
|
3108
|
-
let is_empty = 0 === external_node_fs_default().statSync(this.output).size, fd = external_node_fs_default().openSync(this.output, "a"), first = is_empty;
|
3109
|
-
for (let event of this.events)first || external_node_fs_default().writeFileSync(fd, ",\n"), external_node_fs_default().writeFileSync(fd, JSON.stringify(event)), first = !1;
|
3110
|
-
external_node_fs_default().writeFileSync(fd, "\n]"), external_node_fs_default().closeSync(fd);
|
3235
|
+
});
|
3236
|
+
}
|
3111
3237
|
};
|
3112
3238
|
return new Promise((resolve, reject)=>{
|
3113
3239
|
this.session.post("Profiler.stop", (err, params)=>{
|
@@ -3121,34 +3247,33 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
|
|
3121
3247
|
});
|
3122
3248
|
}
|
3123
3249
|
static getTs() {
|
3124
|
-
|
3125
|
-
return 1000000 * hrtime[0] + Math.round(hrtime[1] / 1000) - this.startTime;
|
3250
|
+
return process.hrtime.bigint() - this.startTime;
|
3126
3251
|
}
|
3127
3252
|
static getCommonEv() {
|
3128
3253
|
return {
|
3129
|
-
tid: 1,
|
3130
|
-
pid: 2,
|
3131
3254
|
ts: this.getTs(),
|
3132
3255
|
cat: "rspack"
|
3133
3256
|
};
|
3134
3257
|
}
|
3135
3258
|
static pushEvent(event) {
|
3136
|
-
|
3137
|
-
|
3138
|
-
|
3259
|
+
let stringifiedArgs = Object.keys(event.args || {}).reduce((acc, key)=>(acc[key] = JSON.stringify(event.args[key]), acc), {});
|
3260
|
+
this.events.push({
|
3261
|
+
...event,
|
3262
|
+
args: stringifiedArgs
|
3263
|
+
});
|
3139
3264
|
}
|
3140
3265
|
static startAsync(events) {
|
3141
|
-
|
3266
|
+
this.layer && this.pushEvent({
|
3142
3267
|
...this.getCommonEv(),
|
3143
|
-
|
3144
|
-
|
3268
|
+
...events,
|
3269
|
+
ph: "b"
|
3145
3270
|
});
|
3146
3271
|
}
|
3147
3272
|
static endAsync(events) {
|
3148
|
-
|
3273
|
+
this.layer && this.pushEvent({
|
3149
3274
|
...this.getCommonEv(),
|
3150
|
-
|
3151
|
-
|
3275
|
+
...events,
|
3276
|
+
ph: "e"
|
3152
3277
|
});
|
3153
3278
|
}
|
3154
3279
|
}
|
@@ -3304,7 +3429,7 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
|
|
3304
3429
|
if (isDone) return void (e instanceof Error ? console.error(e.stack) : console.error(e));
|
3305
3430
|
isDone = !0, reportedError = !0, callback(e, []);
|
3306
3431
|
}
|
3307
|
-
});
|
3432
|
+
}), LOADER_PROCESS_NAME = "Loader Analysis";
|
3308
3433
|
class LoaderObject {
|
3309
3434
|
request;
|
3310
3435
|
path;
|
@@ -3387,11 +3512,15 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
|
|
3387
3512
|
return loaderContext.loaders?.length && index < loaderContext.loaders.length && index >= 0 && loaderContext.loaders[index] ? loaderContext.loaders[index] : null;
|
3388
3513
|
}
|
3389
3514
|
async function runLoaders(compiler, context) {
|
3390
|
-
let loaderState = context.loaderState, pitch = loaderState === binding_.JsLoaderState.Pitching, { resource } = context;
|
3515
|
+
let loaderState = context.loaderState, pitch = loaderState === binding_.JsLoaderState.Pitching, { resource } = context, uuid = JavaScriptTracer.uuid();
|
3391
3516
|
JavaScriptTracer.startAsync({
|
3392
|
-
name:
|
3517
|
+
name: "run_js_loaders",
|
3518
|
+
processName: LOADER_PROCESS_NAME,
|
3519
|
+
uuid,
|
3520
|
+
ph: "b",
|
3393
3521
|
args: {
|
3394
|
-
|
3522
|
+
is_pitch: pitch,
|
3523
|
+
resource: resource
|
3395
3524
|
}
|
3396
3525
|
});
|
3397
3526
|
let splittedResource = resource && parsePathQueryFragment(resource), resourcePath = splittedResource ? splittedResource.path : void 0, resourceQuery = splittedResource ? splittedResource.query : void 0, resourceFragment = splittedResource ? splittedResource.fragment : void 0, contextDirectory = resourcePath ? function(path) {
|
@@ -3418,8 +3547,11 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
|
|
3418
3547
|
}, loaderContext.importModule = function(request, userOptions, callback) {
|
3419
3548
|
JavaScriptTracer.startAsync({
|
3420
3549
|
name: "importModule",
|
3550
|
+
processName: LOADER_PROCESS_NAME,
|
3551
|
+
uuid,
|
3421
3552
|
args: {
|
3422
|
-
|
3553
|
+
is_pitch: pitch,
|
3554
|
+
resource: resource
|
3423
3555
|
}
|
3424
3556
|
});
|
3425
3557
|
let options = userOptions || {};
|
@@ -3427,8 +3559,11 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
|
|
3427
3559
|
return function(err, res) {
|
3428
3560
|
if (err) JavaScriptTracer.endAsync({
|
3429
3561
|
name: "importModule",
|
3562
|
+
processName: LOADER_PROCESS_NAME,
|
3563
|
+
uuid,
|
3430
3564
|
args: {
|
3431
|
-
|
3565
|
+
is_pitch: pitch,
|
3566
|
+
resource: resource
|
3432
3567
|
}
|
3433
3568
|
}), onError(err);
|
3434
3569
|
else {
|
@@ -3438,8 +3573,11 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
|
|
3438
3573
|
for (let dep of res.fileDependencies)loaderContext.addDependency(dep);
|
3439
3574
|
!1 === res.cacheable && loaderContext.cacheable(!1), JavaScriptTracer.endAsync({
|
3440
3575
|
name: "importModule",
|
3576
|
+
processName: LOADER_PROCESS_NAME,
|
3577
|
+
uuid,
|
3441
3578
|
args: {
|
3442
|
-
|
3579
|
+
is_pitch: pitch,
|
3580
|
+
resource: resource
|
3443
3581
|
}
|
3444
3582
|
}), res.error ? onError(compiler.__internal__takeModuleExecutionResult(res.id) ?? Error(res.error)) : onDone(compiler.__internal__takeModuleExecutionResult(res.id));
|
3445
3583
|
}
|
@@ -3635,11 +3773,13 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
|
|
3635
3773
|
return res;
|
3636
3774
|
}(currentLoaderObject.request);
|
3637
3775
|
if (JavaScriptTracer.startAsync({
|
3638
|
-
name:
|
3639
|
-
|
3776
|
+
name: loaderName,
|
3777
|
+
trackName: loaderName,
|
3778
|
+
processName: LOADER_PROCESS_NAME,
|
3779
|
+
uuid,
|
3640
3780
|
args: {
|
3641
|
-
|
3642
|
-
|
3781
|
+
is_pitch: pitch,
|
3782
|
+
resource: resource
|
3643
3783
|
}
|
3644
3784
|
}), parallelism) result = await service_run({
|
3645
3785
|
loaderContext: getWorkerLoaderContext(),
|
@@ -3760,10 +3900,13 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
|
|
3760
3900
|
}(args1[0]) : raw && "string" == typeof args1[0] && (args1[0] = Buffer.from(args1[0], "utf-8")), raw && args1[0] instanceof Uint8Array && !Buffer.isBuffer(args1[0]) && (args1[0] = Buffer.from(args1[0].buffer))), result = await utils_runSyncOrAsync(fn, loaderContext, args) || [];
|
3761
3901
|
}
|
3762
3902
|
return JavaScriptTracer.endAsync({
|
3763
|
-
name:
|
3903
|
+
name: loaderName,
|
3904
|
+
trackName: loaderName,
|
3905
|
+
processName: LOADER_PROCESS_NAME,
|
3906
|
+
uuid,
|
3764
3907
|
args: {
|
3765
|
-
|
3766
|
-
|
3908
|
+
is_pitch: pitch,
|
3909
|
+
resource: resource
|
3767
3910
|
}
|
3768
3911
|
}), result;
|
3769
3912
|
};
|
@@ -3829,11 +3972,13 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
|
|
3829
3972
|
};
|
3830
3973
|
}
|
3831
3974
|
return JavaScriptTracer.endAsync({
|
3832
|
-
name:
|
3975
|
+
name: "run_js_loaders",
|
3976
|
+
uuid,
|
3833
3977
|
args: {
|
3834
|
-
|
3978
|
+
is_pitch: pitch,
|
3979
|
+
resource: resource
|
3835
3980
|
}
|
3836
|
-
}), context;
|
3981
|
+
}), compiler.options.experiments.cache && compiler.options?.cache && commitCustomFieldsToRust(context._module.buildInfo), context;
|
3837
3982
|
}
|
3838
3983
|
let loader_runner_PATH_QUERY_FRAGMENT_REGEXP = /^((?:\u200b.|[^?#\u200b])*)(\?(?:\u200b.|[^#\u200b])*)?(#.*)?$/;
|
3839
3984
|
function parsePathQueryFragment(str) {
|
@@ -4291,6 +4436,8 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
|
|
4291
4436
|
esModule: options.esModule
|
4292
4437
|
};
|
4293
4438
|
}
|
4439
|
+
let external_node_fs_namespaceObject = require("node:fs");
|
4440
|
+
var external_node_fs_default = __webpack_require__.n(external_node_fs_namespaceObject);
|
4294
4441
|
let JSON_MODULE_TYPE = "json", DELTA_A_TO_Z = 26, NUMBER_OF_IDENTIFIER_START_CHARS = 54, NUMBER_OF_IDENTIFIER_CONTINUATION_CHARS = 64, FUNCTION_CONTENT_REGEX = /^function\s?\(\)\s?\{\r?\n?|\r?\n?\}$/g, INDENT_MULTILINE_REGEX = /^\t/gm, LINE_SEPARATOR_REGEX = /\r?\n/g, IDENTIFIER_NAME_REPLACE_REGEX = /^([^a-zA-Z$_])/, IDENTIFIER_ALPHA_NUMERIC_NAME_REPLACE_REGEX = /[^a-zA-Z0-9$]+/g, COMMENT_END_REGEX = /\*\//g, PATH_NAME_NORMALIZE_REPLACE_REGEX = /[^a-zA-Z0-9_!§$()=\-^°]+/g, MATCH_PADDED_HYPHENS_REPLACE_REGEX = /^-|-$/g;
|
4295
4442
|
class Template {
|
4296
4443
|
static getFunctionContent(fn) {
|
@@ -4507,14 +4654,14 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
|
|
4507
4654
|
return createBuiltinPlugin(this.name, void 0);
|
4508
4655
|
}
|
4509
4656
|
}
|
4510
|
-
class
|
4657
|
+
class EntryOptionPlugin_EntryOptionPlugin {
|
4511
4658
|
apply(compiler) {
|
4512
|
-
compiler.hooks.entryOption.tap("EntryOptionPlugin", (context, entry)=>(
|
4659
|
+
compiler.hooks.entryOption.tap("EntryOptionPlugin", (context, entry)=>(EntryOptionPlugin_EntryOptionPlugin.applyEntryOption(compiler, context, entry), !0));
|
4513
4660
|
}
|
4514
4661
|
static applyEntryOption(compiler, context, entry) {
|
4515
4662
|
if ("function" == typeof entry) new DynamicEntryPlugin(context, entry).apply(compiler);
|
4516
4663
|
else for (let name of Object.keys(entry)){
|
4517
|
-
let desc = entry[name], options =
|
4664
|
+
let desc = entry[name], options = EntryOptionPlugin_EntryOptionPlugin.entryDescriptionToOptions(compiler, name, desc);
|
4518
4665
|
for (let entry of (external_node_assert_default()(void 0 !== desc.import, "desc.import should not be `undefined` once `EntryOptionPlugin.applyEntryOption` is called"), desc.import))new EntryPlugin(context, entry, options).apply(compiler);
|
4519
4666
|
}
|
4520
4667
|
}
|
@@ -4535,7 +4682,7 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
|
|
4535
4682
|
return options;
|
4536
4683
|
}
|
4537
4684
|
}
|
4538
|
-
let
|
4685
|
+
let EntryOptionPlugin = EntryOptionPlugin_EntryOptionPlugin, EntryPlugin = base_create(binding_.BuiltinPluginName.EntryPlugin, (context, entry, options = "")=>({
|
4539
4686
|
context,
|
4540
4687
|
entry,
|
4541
4688
|
options: getRawEntryOptions("string" == typeof options ? {
|
@@ -4570,7 +4717,7 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
|
|
4570
4717
|
let raw = {
|
4571
4718
|
context: this.context,
|
4572
4719
|
entry: async ()=>Object.entries(await this.entry()).map(([name, desc])=>{
|
4573
|
-
let options =
|
4720
|
+
let options = EntryOptionPlugin.entryDescriptionToOptions(compiler, name, desc);
|
4574
4721
|
return {
|
4575
4722
|
import: desc.import,
|
4576
4723
|
options: getRawEntryOptions(options)
|
@@ -4720,6 +4867,114 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
|
|
4720
4867
|
let hooks_compilationHooksMap = new WeakMap(), cleanPluginHooks = (compilation)=>{
|
4721
4868
|
hooks_compilationHooksMap.delete(compilation);
|
4722
4869
|
};
|
4870
|
+
class RspackZodUnion extends zod_index_js_namespaceObject.z.ZodUnion {
|
4871
|
+
_parse(input) {
|
4872
|
+
let dirty, { ctx } = this._processInputParams(input), options = this._def.options;
|
4873
|
+
if (ctx.common.async) return Promise.all(options.map(async (option)=>{
|
4874
|
+
let childCtx = {
|
4875
|
+
...ctx,
|
4876
|
+
common: {
|
4877
|
+
...ctx.common,
|
4878
|
+
issues: []
|
4879
|
+
},
|
4880
|
+
parent: ctx
|
4881
|
+
};
|
4882
|
+
return {
|
4883
|
+
result: await option._parseAsync({
|
4884
|
+
data: ctx.data,
|
4885
|
+
path: ctx.path,
|
4886
|
+
parent: childCtx
|
4887
|
+
}),
|
4888
|
+
ctx: childCtx
|
4889
|
+
};
|
4890
|
+
})).then(function(results) {
|
4891
|
+
for (let result of results)if ("valid" === result.result.status) return result.result;
|
4892
|
+
for (let result of results)if ("dirty" === result.result.status) return ctx.common.issues.push(...result.ctx.common.issues), result.result;
|
4893
|
+
let unionErrors = results.map((result)=>new zod_index_js_namespaceObject.ZodError(result.ctx.common.issues));
|
4894
|
+
return (0, zod_index_js_namespaceObject.addIssueToContext)(ctx, {
|
4895
|
+
code: zod_index_js_namespaceObject.ZodIssueCode.invalid_union,
|
4896
|
+
unionErrors
|
4897
|
+
}), zod_index_js_namespaceObject.INVALID;
|
4898
|
+
});
|
4899
|
+
let issues = [];
|
4900
|
+
for (let option of options){
|
4901
|
+
let childCtx = {
|
4902
|
+
...ctx,
|
4903
|
+
common: {
|
4904
|
+
...ctx.common,
|
4905
|
+
issues: []
|
4906
|
+
},
|
4907
|
+
parent: ctx
|
4908
|
+
}, result = option._parseSync({
|
4909
|
+
data: ctx.data,
|
4910
|
+
path: ctx.path,
|
4911
|
+
parent: childCtx
|
4912
|
+
});
|
4913
|
+
if ("valid" === result.status) return result;
|
4914
|
+
"dirty" !== result.status || dirty || (dirty = {
|
4915
|
+
result,
|
4916
|
+
ctx: childCtx
|
4917
|
+
}), childCtx.common.issues.length && issues.push(childCtx.common.issues);
|
4918
|
+
}
|
4919
|
+
if (dirty) return ctx.common.issues.push(...dirty.ctx.common.issues), dirty.result;
|
4920
|
+
let unionErrors = issues.map((issues)=>new zod_index_js_namespaceObject.ZodError(issues));
|
4921
|
+
return (0, zod_index_js_namespaceObject.addIssueToContext)(ctx, {
|
4922
|
+
code: zod_index_js_namespaceObject.ZodIssueCode.invalid_union,
|
4923
|
+
unionErrors
|
4924
|
+
}), zod_index_js_namespaceObject.INVALID;
|
4925
|
+
}
|
4926
|
+
static create = (types, params)=>new RspackZodUnion({
|
4927
|
+
options: types,
|
4928
|
+
typeName: zod_index_js_namespaceObject.ZodFirstPartyTypeKind.ZodUnion,
|
4929
|
+
...function(params) {
|
4930
|
+
if (!params) return {};
|
4931
|
+
let { errorMap, invalid_type_error, required_error, description } = params;
|
4932
|
+
if (errorMap && (invalid_type_error || required_error)) throw Error('Can\'t use "invalid_type_error" or "required_error" in conjunction with custom error map.');
|
4933
|
+
return errorMap ? {
|
4934
|
+
errorMap: errorMap,
|
4935
|
+
description
|
4936
|
+
} : {
|
4937
|
+
errorMap: (iss, ctx)=>{
|
4938
|
+
let { message } = params;
|
4939
|
+
return "invalid_enum_value" === iss.code ? {
|
4940
|
+
message: message ?? ctx.defaultError
|
4941
|
+
} : void 0 === ctx.data ? {
|
4942
|
+
message: message ?? required_error ?? ctx.defaultError
|
4943
|
+
} : "invalid_type" !== iss.code ? {
|
4944
|
+
message: ctx.defaultError
|
4945
|
+
} : {
|
4946
|
+
message: message ?? invalid_type_error ?? ctx.defaultError
|
4947
|
+
};
|
4948
|
+
},
|
4949
|
+
description
|
4950
|
+
};
|
4951
|
+
}(params)
|
4952
|
+
});
|
4953
|
+
}
|
4954
|
+
zod_index_js_namespaceObject.ZodUnion.create = RspackZodUnion.create;
|
4955
|
+
class ZodRspackCrossChecker extends zod_index_js_namespaceObject.ZodType {
|
4956
|
+
params;
|
4957
|
+
constructor(params){
|
4958
|
+
super(params), this.params = params;
|
4959
|
+
}
|
4960
|
+
_parse(input) {
|
4961
|
+
let ctx = this._getOrReturnCtx(input), root = this._getRootData(ctx);
|
4962
|
+
for (let pattern of this.params.patterns)if (pattern.test(root, input)) {
|
4963
|
+
let res = pattern.type._parse(input);
|
4964
|
+
for (let issue of "function" == typeof pattern.issue ? pattern.issue(res, root, input) : [])(0, zod_index_js_namespaceObject.addIssueToContext)(ctx, issue);
|
4965
|
+
return res;
|
4966
|
+
}
|
4967
|
+
return this.params.default._parse(input);
|
4968
|
+
}
|
4969
|
+
_getRootData(ctx) {
|
4970
|
+
let root = ctx;
|
4971
|
+
for(; root.parent;)root = root.parent;
|
4972
|
+
return root.data;
|
4973
|
+
}
|
4974
|
+
}
|
4975
|
+
let anyFunction = zod_index_js_namespaceObject.z.custom((data)=>"function" == typeof data, (input)=>({
|
4976
|
+
message: `Expected function, received ${(0, zod_index_js_namespaceObject.getParsedType)(input)}`
|
4977
|
+
}));
|
4723
4978
|
function isZodErrorLike(err) {
|
4724
4979
|
return err instanceof Error && "ZodError" === err.name && "issues" in err && Array.isArray(err.issues);
|
4725
4980
|
}
|
@@ -4856,13 +5111,13 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
|
|
4856
5111
|
return !1;
|
4857
5112
|
}
|
4858
5113
|
}
|
4859
|
-
let compilationOptionsMap = new WeakMap(),
|
4860
|
-
filename: zod_index_js_namespaceObject.z.string().or(
|
5114
|
+
let compilationOptionsMap = new WeakMap(), pluginOptionsSchema = zod_index_js_namespaceObject.z.object({
|
5115
|
+
filename: zod_index_js_namespaceObject.z.string().or(anyFunction).optional(),
|
4861
5116
|
template: zod_index_js_namespaceObject.z.string().refine((val)=>!val.includes("!"), ()=>({
|
4862
5117
|
message: "HtmlRspackPlugin does not support template path with loader yet"
|
4863
5118
|
})).optional(),
|
4864
|
-
templateContent: zod_index_js_namespaceObject.z.string().or(
|
4865
|
-
templateParameters: zod_index_js_namespaceObject.z.record(zod_index_js_namespaceObject.z.string(), zod_index_js_namespaceObject.z.string()).or(zod_index_js_namespaceObject.z.boolean()).or(
|
5119
|
+
templateContent: zod_index_js_namespaceObject.z.string().or(anyFunction).optional(),
|
5120
|
+
templateParameters: zod_index_js_namespaceObject.z.record(zod_index_js_namespaceObject.z.string(), zod_index_js_namespaceObject.z.string()).or(zod_index_js_namespaceObject.z.boolean()).or(anyFunction).optional(),
|
4866
5121
|
inject: zod_index_js_namespaceObject.z.enum([
|
4867
5122
|
"head",
|
4868
5123
|
"body"
|
@@ -5111,10 +5366,7 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
|
|
5111
5366
|
resourceRegExp: zod_index_js_namespaceObject.z.instanceof(RegExp)
|
5112
5367
|
}),
|
5113
5368
|
zod_index_js_namespaceObject.z.object({
|
5114
|
-
checkResource:
|
5115
|
-
zod_index_js_namespaceObject.z.string(),
|
5116
|
-
zod_index_js_namespaceObject.z.string()
|
5117
|
-
]), zod_index_js_namespaceObject.z.boolean())
|
5369
|
+
checkResource: anyFunction
|
5118
5370
|
})
|
5119
5371
|
]), IgnorePlugin = base_create(binding_.BuiltinPluginName.IgnorePlugin, (options)=>(validate(options, IgnorePluginOptions), options)), InferAsyncModulesPlugin = base_create(binding_.BuiltinPluginName.InferAsyncModulesPlugin, ()=>{}, "compilation"), JavascriptModulesPlugin_compilationHooksMap = new WeakMap();
|
5120
5372
|
class JavascriptModulesPlugin extends RspackBuiltinPlugin {
|
@@ -6517,9 +6769,9 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
6517
6769
|
let tty = infrastructureLogging.stream.isTTY && "dumb" !== process.env.TERM;
|
6518
6770
|
D(infrastructureLogging, "level", "info"), D(infrastructureLogging, "debug", !1), D(infrastructureLogging, "colors", tty), D(infrastructureLogging, "appendOnly", !tty);
|
6519
6771
|
}, applyExperimentsDefaults = (experiments, { production, development })=>{
|
6520
|
-
F(experiments, "cache", ()=>development), D(experiments, "futureDefaults", !1), D(experiments, "lazyCompilation", !1), D(experiments, "asyncWebAssembly", experiments.futureDefaults), D(experiments, "css", !!experiments.futureDefaults || void 0), D(experiments, "layers", !1), D(experiments, "topLevelAwait", !0), D(experiments, "buildHttp", void 0), experiments.buildHttp && "object" == typeof experiments.buildHttp && D(experiments.buildHttp, "upgrade", !1), D(experiments, "incremental", {}), "object" == typeof experiments.incremental && (D(experiments.incremental, "silent", !0), D(experiments.incremental, "make", !0), D(experiments.incremental, "inferAsyncModules", !
|
6772
|
+
F(experiments, "cache", ()=>development), D(experiments, "futureDefaults", !1), D(experiments, "lazyCompilation", !1), D(experiments, "asyncWebAssembly", experiments.futureDefaults), D(experiments, "css", !!experiments.futureDefaults || void 0), D(experiments, "layers", !1), D(experiments, "topLevelAwait", !0), D(experiments, "buildHttp", void 0), experiments.buildHttp && "object" == typeof experiments.buildHttp && D(experiments.buildHttp, "upgrade", !1), D(experiments, "incremental", {}), "object" == typeof experiments.incremental && (D(experiments.incremental, "silent", !0), D(experiments.incremental, "make", !0), D(experiments.incremental, "inferAsyncModules", !0), D(experiments.incremental, "providedExports", !0), D(experiments.incremental, "dependenciesDiagnostics", !0), D(experiments.incremental, "sideEffects", !0), D(experiments.incremental, "buildChunkGraph", !0), D(experiments.incremental, "moduleIds", !0), D(experiments.incremental, "chunkIds", !0), D(experiments.incremental, "modulesHashes", !0), D(experiments.incremental, "modulesCodegen", !0), D(experiments.incremental, "modulesRuntimeRequirements", !0), D(experiments.incremental, "chunksRuntimeRequirements", !0), D(experiments.incremental, "chunksHashes", !0), D(experiments.incremental, "chunksRender", !0), D(experiments.incremental, "emitAssets", !0)), D(experiments, "rspackFuture", {}), D(experiments, "parallelCodeSplitting", !0), D(experiments, "parallelLoader", !1), D(experiments, "useInputFileSystem", !1);
|
6521
6773
|
}, applybundlerInfoDefaults = (rspackFuture, library)=>{
|
6522
|
-
"object" == typeof rspackFuture && (D(rspackFuture, "bundlerInfo", {}), "object" == typeof rspackFuture.bundlerInfo && (D(rspackFuture.bundlerInfo, "version", "1.
|
6774
|
+
"object" == typeof rspackFuture && (D(rspackFuture, "bundlerInfo", {}), "object" == typeof rspackFuture.bundlerInfo && (D(rspackFuture.bundlerInfo, "version", "1.4.0-beta.0"), D(rspackFuture.bundlerInfo, "bundler", "rspack"), D(rspackFuture.bundlerInfo, "force", !library)));
|
6523
6775
|
}, applySnapshotDefaults = (_snapshot, _env)=>{}, applyJavascriptParserOptionsDefaults = (parserOptions)=>{
|
6524
6776
|
D(parserOptions, "dynamicImportMode", "lazy"), D(parserOptions, "dynamicImportPrefetch", !1), D(parserOptions, "dynamicImportPreload", !1), D(parserOptions, "url", !0), D(parserOptions, "exprContextCritical", !0), D(parserOptions, "wrappedContextCritical", !1), D(parserOptions, "wrappedContextRegExp", /.*/), D(parserOptions, "strictExportPresence", !1), D(parserOptions, "requireAsExpression", !0), D(parserOptions, "requireDynamic", !0), D(parserOptions, "requireResolve", !0), D(parserOptions, "importDynamic", !0), D(parserOptions, "worker", [
|
6525
6777
|
"..."
|
@@ -7121,7 +7373,8 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
7121
7373
|
incremental: optionalNestedConfig(experiments.incremental, (options)=>getNormalizedIncrementalOptions(options)),
|
7122
7374
|
parallelCodeSplitting: experiments.parallelCodeSplitting,
|
7123
7375
|
buildHttp: experiments.buildHttp,
|
7124
|
-
parallelLoader: experiments.parallelLoader
|
7376
|
+
parallelLoader: experiments.parallelLoader,
|
7377
|
+
useInputFileSystem: experiments.useInputFileSystem
|
7125
7378
|
})),
|
7126
7379
|
watch: config.watch,
|
7127
7380
|
watchOptions: cloneObject(config.watchOptions),
|
@@ -7183,32 +7436,26 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
7183
7436
|
name: runtimeChunk.name
|
7184
7437
|
};
|
7185
7438
|
}
|
7186
|
-
}, getNormalizedIncrementalOptions = (incremental)
|
7187
|
-
if (!1 === incremental || "none" === incremental) return !1;
|
7188
|
-
if ("safe" === incremental) return {
|
7189
|
-
make: !0,
|
7190
|
-
emitAssets: !0
|
7191
|
-
};
|
7192
|
-
let advanceSilent = {
|
7439
|
+
}, getNormalizedIncrementalOptions = (incremental)=>!1 !== incremental && "none" !== incremental && ("safe" === incremental ? {
|
7193
7440
|
silent: !0,
|
7194
7441
|
make: !0,
|
7195
|
-
inferAsyncModules: !
|
7196
|
-
providedExports: !
|
7197
|
-
dependenciesDiagnostics: !
|
7198
|
-
sideEffects: !
|
7199
|
-
buildChunkGraph: !
|
7200
|
-
moduleIds: !
|
7201
|
-
chunkIds: !
|
7202
|
-
modulesHashes: !
|
7203
|
-
modulesCodegen: !
|
7204
|
-
modulesRuntimeRequirements: !
|
7205
|
-
chunksRuntimeRequirements: !
|
7206
|
-
chunksHashes: !
|
7207
|
-
chunksRender: !
|
7442
|
+
inferAsyncModules: !1,
|
7443
|
+
providedExports: !1,
|
7444
|
+
dependenciesDiagnostics: !1,
|
7445
|
+
sideEffects: !1,
|
7446
|
+
buildChunkGraph: !1,
|
7447
|
+
moduleIds: !1,
|
7448
|
+
chunkIds: !1,
|
7449
|
+
modulesHashes: !1,
|
7450
|
+
modulesCodegen: !1,
|
7451
|
+
modulesRuntimeRequirements: !1,
|
7452
|
+
chunksRuntimeRequirements: !1,
|
7453
|
+
chunksHashes: !1,
|
7454
|
+
chunksRender: !1,
|
7208
7455
|
emitAssets: !0
|
7209
|
-
}
|
7210
|
-
|
7211
|
-
|
7456
|
+
} : !0 === incremental || "advance-silent" === incremental ? {} : "advance" === incremental ? {
|
7457
|
+
silent: !1
|
7458
|
+
} : incremental), nestedConfig = (value, fn)=>fn(void 0 === value ? {} : value), optionalNestedConfig = (value, fn)=>void 0 === value ? void 0 : fn(value), nestedArray = (value, fn)=>fn(Array.isArray(value) ? value : []), optionalNestedArray = (value, fn)=>Array.isArray(value) ? fn(value) : void 0, cloneObject = (value)=>({
|
7212
7459
|
...value
|
7213
7460
|
}), keyedNestedConfig = (value, fn, customKeys)=>{
|
7214
7461
|
let result = void 0 === value ? {} : Object.keys(value).reduce((obj, key)=>(obj[key] = (customKeys && key in customKeys ? customKeys[key] : fn)(value[key]), obj), {});
|
@@ -7424,7 +7671,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
7424
7671
|
},
|
7425
7672
|
arm: "gnueabihf"
|
7426
7673
|
}
|
7427
|
-
}, BINDING_VERSION = __webpack_require__("@rspack/binding/package.json").version, CORE_VERSION = "1.
|
7674
|
+
}, BINDING_VERSION = __webpack_require__("@rspack/binding/package.json").version, CORE_VERSION = "1.4.0-beta.0", getAddonPlatformArchAbi = ()=>{
|
7428
7675
|
let { platform, arch } = process, binding = "";
|
7429
7676
|
binding += platform;
|
7430
7677
|
let abi = NodePlatformArchToAbi[platform][arch];
|
@@ -7984,50 +8231,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
7984
8231
|
});
|
7985
8232
|
}
|
7986
8233
|
}
|
7987
|
-
|
7988
|
-
Object.defineProperty(binding_.KnownBuildInfo.prototype, "assets", {
|
7989
|
-
enumerable: !0,
|
7990
|
-
configurable: !0,
|
7991
|
-
get () {
|
7992
|
-
if (this._assets[$assets]) return this._assets[$assets];
|
7993
|
-
let assets = new Proxy(Object.create(null), {
|
7994
|
-
ownKeys: ()=>this._assets.keys(),
|
7995
|
-
getOwnPropertyDescriptor: ()=>({
|
7996
|
-
enumerable: !0,
|
7997
|
-
configurable: !0
|
7998
|
-
})
|
7999
|
-
});
|
8000
|
-
return Object.defineProperty(this._assets, $assets, {
|
8001
|
-
enumerable: !1,
|
8002
|
-
configurable: !0,
|
8003
|
-
value: assets
|
8004
|
-
}), assets;
|
8005
|
-
}
|
8006
|
-
}), Object.defineProperty(binding_.KnownBuildInfo.prototype, "fileDependencies", {
|
8007
|
-
enumerable: !0,
|
8008
|
-
configurable: !0,
|
8009
|
-
get () {
|
8010
|
-
return new Set(this._fileDependencies);
|
8011
|
-
}
|
8012
|
-
}), Object.defineProperty(binding_.KnownBuildInfo.prototype, "contextDependencies", {
|
8013
|
-
enumerable: !0,
|
8014
|
-
configurable: !0,
|
8015
|
-
get () {
|
8016
|
-
return new Set(this._contextDependencies);
|
8017
|
-
}
|
8018
|
-
}), Object.defineProperty(binding_.KnownBuildInfo.prototype, "missingDependencies", {
|
8019
|
-
enumerable: !0,
|
8020
|
-
configurable: !0,
|
8021
|
-
get () {
|
8022
|
-
return new Set(this._missingDependencies);
|
8023
|
-
}
|
8024
|
-
}), Object.defineProperty(binding_.KnownBuildInfo.prototype, "buildDependencies", {
|
8025
|
-
enumerable: !0,
|
8026
|
-
configurable: !0,
|
8027
|
-
get () {
|
8028
|
-
return new Set(this._buildDependencies);
|
8029
|
-
}
|
8030
|
-
}), Object.defineProperty(binding_.Module.prototype, "identifier", {
|
8234
|
+
Object.defineProperty(binding_.Module.prototype, "identifier", {
|
8031
8235
|
enumerable: !0,
|
8032
8236
|
configurable: !0,
|
8033
8237
|
value () {
|
@@ -8182,7 +8386,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
8182
8386
|
await queried.promise(data, {});
|
8183
8387
|
};
|
8184
8388
|
})
|
8185
|
-
}), traceHookPlugin_PLUGIN_NAME = "TraceHookPlugin", makeInterceptorFor = (compilerName, tracer)=>(hookName)=>({
|
8389
|
+
}), traceHookPlugin_PLUGIN_NAME = "TraceHookPlugin", PLUGIN_PROCESS_NAME = "Plugin Analysis", makeInterceptorFor = (compilerName, tracer)=>(hookName)=>({
|
8186
8390
|
register: (tapInfo)=>{
|
8187
8391
|
let { name, type, fn: internalFn } = tapInfo, newFn = name === traceHookPlugin_PLUGIN_NAME ? internalFn : makeNewTraceTapFn(compilerName, hookName, tracer, {
|
8188
8392
|
name,
|
@@ -8200,25 +8404,26 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
8200
8404
|
hook && !hook._fakeHook && hook.intercept(makeInterceptorFor(logLabel, tracer)(hookName));
|
8201
8405
|
}
|
8202
8406
|
}, makeNewTraceTapFn = (compilerName, hookName, tracer, { name: pluginName, type, fn })=>{
|
8203
|
-
let name = `${pluginName}:${hookName}`;
|
8204
8407
|
switch(type){
|
8205
8408
|
case "promise":
|
8206
8409
|
return (...args)=>{
|
8207
|
-
let
|
8410
|
+
let uuid = tracer.uuid();
|
8208
8411
|
return tracer.startAsync({
|
8209
|
-
name,
|
8210
|
-
|
8412
|
+
name: hookName,
|
8413
|
+
trackName: pluginName,
|
8414
|
+
processName: PLUGIN_PROCESS_NAME,
|
8415
|
+
uuid,
|
8211
8416
|
args: {
|
8212
|
-
id2,
|
8213
8417
|
compilerName,
|
8214
8418
|
hookName,
|
8215
8419
|
pluginName
|
8216
8420
|
}
|
8217
8421
|
}), fn(...args).then((r)=>(tracer.endAsync({
|
8218
|
-
name,
|
8219
|
-
|
8422
|
+
name: hookName,
|
8423
|
+
trackName: pluginName,
|
8424
|
+
processName: PLUGIN_PROCESS_NAME,
|
8425
|
+
uuid,
|
8220
8426
|
args: {
|
8221
|
-
id2,
|
8222
8427
|
compilerName,
|
8223
8428
|
hookName,
|
8224
8429
|
pluginName
|
@@ -8227,12 +8432,13 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
8227
8432
|
};
|
8228
8433
|
case "async":
|
8229
8434
|
return (...args)=>{
|
8230
|
-
let
|
8435
|
+
let uuid = tracer.uuid();
|
8231
8436
|
tracer.startAsync({
|
8232
|
-
name,
|
8233
|
-
|
8437
|
+
name: hookName,
|
8438
|
+
trackName: pluginName,
|
8439
|
+
processName: PLUGIN_PROCESS_NAME,
|
8440
|
+
uuid,
|
8234
8441
|
args: {
|
8235
|
-
id2,
|
8236
8442
|
compilerName,
|
8237
8443
|
hookName,
|
8238
8444
|
pluginName
|
@@ -8241,10 +8447,11 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
8241
8447
|
let callback = args.pop();
|
8242
8448
|
fn(...args, (...r)=>{
|
8243
8449
|
tracer.endAsync({
|
8244
|
-
name,
|
8245
|
-
|
8450
|
+
name: hookName,
|
8451
|
+
trackName: pluginName,
|
8452
|
+
processName: PLUGIN_PROCESS_NAME,
|
8453
|
+
uuid,
|
8246
8454
|
args: {
|
8247
|
-
id2,
|
8248
8455
|
compilerName,
|
8249
8456
|
hookName,
|
8250
8457
|
pluginName
|
@@ -8254,13 +8461,14 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
8254
8461
|
};
|
8255
8462
|
case "sync":
|
8256
8463
|
return (...args)=>{
|
8257
|
-
let r,
|
8258
|
-
if (
|
8464
|
+
let r, uuid = tracer.uuid();
|
8465
|
+
if (pluginName === traceHookPlugin_PLUGIN_NAME) return fn(...args);
|
8259
8466
|
tracer.startAsync({
|
8260
|
-
name,
|
8261
|
-
|
8467
|
+
name: hookName,
|
8468
|
+
trackName: pluginName,
|
8469
|
+
processName: PLUGIN_PROCESS_NAME,
|
8470
|
+
uuid,
|
8262
8471
|
args: {
|
8263
|
-
id2,
|
8264
8472
|
compilerName,
|
8265
8473
|
hookName,
|
8266
8474
|
pluginName
|
@@ -8270,20 +8478,22 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
8270
8478
|
r = fn(...args);
|
8271
8479
|
} catch (err) {
|
8272
8480
|
throw tracer.endAsync({
|
8273
|
-
name,
|
8274
|
-
|
8481
|
+
name: hookName,
|
8482
|
+
trackName: pluginName,
|
8483
|
+
processName: PLUGIN_PROCESS_NAME,
|
8484
|
+
uuid,
|
8275
8485
|
args: {
|
8276
|
-
id2: compilerName,
|
8277
8486
|
hookName,
|
8278
8487
|
pluginName
|
8279
8488
|
}
|
8280
8489
|
}), err;
|
8281
8490
|
}
|
8282
8491
|
return tracer.endAsync({
|
8283
|
-
name,
|
8284
|
-
|
8492
|
+
name: hookName,
|
8493
|
+
trackName: pluginName,
|
8494
|
+
processName: PLUGIN_PROCESS_NAME,
|
8495
|
+
uuid,
|
8285
8496
|
args: {
|
8286
|
-
id2,
|
8287
8497
|
compilerName,
|
8288
8498
|
hookName,
|
8289
8499
|
pluginName
|
@@ -8432,7 +8642,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
8432
8642
|
"entry"
|
8433
8643
|
]),
|
8434
8644
|
additionalPass: new lite_tapable_namespaceObject.AsyncSeriesHook([])
|
8435
|
-
}, this.webpack = src_rspack, this.rspack = src_rspack, this.root = this, this.outputPath = "", this.inputFileSystem = null, this.intermediateFileSystem = null, this.outputFileSystem = null, this.watchFileSystem = null, this.records = {}, this.options = options, this.context = context, this.cache = new
|
8645
|
+
}, this.webpack = src_rspack, this.rspack = src_rspack, this.root = this, this.outputPath = "", this.inputFileSystem = null, this.intermediateFileSystem = null, this.outputFileSystem = null, this.watchFileSystem = null, this.records = {}, this.options = options, this.context = context, this.cache = new Cache(), this.compilerPath = "", this.running = !1, this.idle = !1, this.watchMode = !1, this.resolverFactory = new ResolverFactory(options.resolve.pnp ?? getPnpDefault()), new JsLoaderRspackPlugin(this).apply(this), new ExecuteModulePlugin().apply(this), new TraceHookPlugin().apply(this);
|
8436
8646
|
}
|
8437
8647
|
get recordsInputPath() {
|
8438
8648
|
return unsupported("Compiler.recordsInputPath");
|
@@ -8456,7 +8666,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
8456
8666
|
return this.#ruleSet;
|
8457
8667
|
}
|
8458
8668
|
getCache(name) {
|
8459
|
-
return new
|
8669
|
+
return new CacheFacade_CacheFacade(this.cache, `${this.compilerPath}${name}`, this.options.output.hashFunction);
|
8460
8670
|
}
|
8461
8671
|
getInfrastructureLogger(name) {
|
8462
8672
|
if (!name) throw TypeError("Compiler.getInfrastructureLogger(name) called without a name");
|
@@ -8489,7 +8699,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
8489
8699
|
let startTime = Date.now();
|
8490
8700
|
this.running = !0;
|
8491
8701
|
let instanceBinding = __webpack_require__("@rspack/binding"), isRuntimeShutdown = !1, finalCallback = (err, stats)=>{
|
8492
|
-
this.idle = !0, this.cache.beginIdle(), this.idle = !0, this.running = !1, err && this.hooks.failed.call(err), callback && callback(err, stats), this.hooks.afterDone.call(stats), instanceBinding.shutdownAsyncRuntime()
|
8702
|
+
this.idle = !0, this.cache.beginIdle(), this.idle = !0, this.running = !1, err && this.hooks.failed.call(err), callback && callback(err, stats), this.hooks.afterDone.call(stats), instanceBinding.shutdownAsyncRuntime();
|
8493
8703
|
}, onCompiled = (err, _compilation)=>{
|
8494
8704
|
if (err) return finalCallback(err);
|
8495
8705
|
if (_compilation.hooks.needAdditionalPass.call()) {
|
@@ -8623,10 +8833,12 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
8623
8833
|
let error = checkVersion();
|
8624
8834
|
if (error) return callback(error);
|
8625
8835
|
if (this.#instance) return callback(null, this.#instance);
|
8626
|
-
let rawOptions = getRawOptions(
|
8836
|
+
let options = this.options, rawOptions = getRawOptions(options, this);
|
8627
8837
|
rawOptions.__references = Object.fromEntries(this.#ruleSet.builtinReferences.entries());
|
8628
8838
|
let instanceBinding = __webpack_require__("@rspack/binding");
|
8629
|
-
this.#registers = this.#createHooksRegisters()
|
8839
|
+
this.#registers = this.#createHooksRegisters();
|
8840
|
+
let inputFileSystem = this.inputFileSystem && ThreadsafeInputNodeFS.needsBinding(options.experiments.useInputFileSystem) ? ThreadsafeInputNodeFS.__to_binding(this.inputFileSystem) : void 0;
|
8841
|
+
this.#instance = new instanceBinding.JsCompiler(this.compilerPath, rawOptions, this.#builtinPlugins, this.#registers, ThreadsafeOutputNodeFS.__to_binding(this.outputFileSystem), this.intermediateFileSystem ? ThreadsafeIntermediateNodeFS.__to_binding(this.intermediateFileSystem) : void 0, inputFileSystem, ResolverFactory.__to_binding(this.resolverFactory)), callback(null, this.#instance);
|
8630
8842
|
}
|
8631
8843
|
#createHooksRegisters() {
|
8632
8844
|
let ref = new WeakRef(this), getCompiler = ()=>ref.deref(), createTap = this.#createHookRegisterTaps.bind(this), createMapTap = this.#createHookMapRegisterTaps.bind(this);
|
@@ -8764,7 +8976,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
8764
8976
|
obj.children = this.stats.map((stat, idx)=>{
|
8765
8977
|
let obj = stat.toJson(childOptions.children[idx]), compilationName = stat.compilation.name;
|
8766
8978
|
return obj.name = compilationName && makePathsRelative(childOptions.context, compilationName, stat.compilation.compiler.root), obj;
|
8767
|
-
}), childOptions.version && (obj.rspackVersion = "1.
|
8979
|
+
}), childOptions.version && (obj.rspackVersion = "1.4.0-beta.0", obj.version = "5.75.0"), childOptions.hash && (obj.hash = obj.children.map((j)=>j.hash).join(""));
|
8768
8980
|
let mapError = (j, obj)=>({
|
8769
8981
|
...obj,
|
8770
8982
|
compilerPath: obj.compilerPath ? `${j.name}.${obj.compilerPath}` : j.name
|
@@ -8841,7 +9053,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
8841
9053
|
}
|
8842
9054
|
};
|
8843
9055
|
ArrayQueue_computedKey = Symbol.iterator;
|
8844
|
-
let
|
9056
|
+
let ArrayQueue = class {
|
8845
9057
|
_list;
|
8846
9058
|
_listReversed;
|
8847
9059
|
constructor(items){
|
@@ -8994,7 +9206,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
8994
9206
|
node.parents.push(parent), parent.children.push(node);
|
8995
9207
|
}
|
8996
9208
|
}
|
8997
|
-
let queue = new
|
9209
|
+
let queue = new ArrayQueue();
|
8998
9210
|
for (let node of nodes)0 === node.parents.length && (node.state = "queued", queue.enqueue(node));
|
8999
9211
|
let errored = !1, running = 0, parallelism = this._options.parallelism, nodeDone = (node, err, stats)=>{
|
9000
9212
|
if (!errored) {
|
@@ -9058,7 +9270,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
9058
9270
|
}
|
9059
9271
|
let graceful_fs_index_js_namespaceObject = require("../compiled/graceful-fs/index.js");
|
9060
9272
|
var graceful_fs_index_js_default = __webpack_require__.n(graceful_fs_index_js_namespaceObject);
|
9061
|
-
let
|
9273
|
+
let lib_IgnoreWarningsPlugin = class {
|
9062
9274
|
_ignorePattern;
|
9063
9275
|
name = "IgnoreWarningsPlugin";
|
9064
9276
|
constructor(ignorePattern){
|
@@ -9076,7 +9288,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
9076
9288
|
let cache = new Map();
|
9077
9289
|
compiler.cache.hooks.store.tap({
|
9078
9290
|
name: MemoryCachePlugin.PLUGIN_NAME,
|
9079
|
-
stage:
|
9291
|
+
stage: Cache.STAGE_MEMORY
|
9080
9292
|
}, (identifier, etag, data)=>{
|
9081
9293
|
let dataEtag = "function" == typeof etag?.toString ? etag.toString() : etag;
|
9082
9294
|
cache.set(identifier, {
|
@@ -9085,7 +9297,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
9085
9297
|
});
|
9086
9298
|
}), compiler.cache.hooks.get.tap({
|
9087
9299
|
name: MemoryCachePlugin.PLUGIN_NAME,
|
9088
|
-
stage:
|
9300
|
+
stage: Cache.STAGE_MEMORY
|
9089
9301
|
}, (identifier, etag, gotHandlers)=>{
|
9090
9302
|
let cacheEntry = cache.get(identifier), dataEtag = "function" == typeof etag?.toString ? etag.toString() : etag;
|
9091
9303
|
return null === cacheEntry ? null : void 0 !== cacheEntry ? cacheEntry.etag === dataEtag ? cacheEntry.data : null : void gotHandlers.push((result, callback)=>(void 0 === result ? cache.set(identifier, null) : cache.set(identifier, {
|
@@ -9094,12 +9306,13 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
9094
9306
|
}), callback(null)));
|
9095
9307
|
}), compiler.cache.hooks.shutdown.tap({
|
9096
9308
|
name: MemoryCachePlugin.PLUGIN_NAME,
|
9097
|
-
stage:
|
9309
|
+
stage: Cache.STAGE_MEMORY
|
9098
9310
|
}, ()=>{
|
9099
9311
|
cache.clear();
|
9100
9312
|
});
|
9101
9313
|
}
|
9102
9314
|
}
|
9315
|
+
var statsFactoryUtils_StatsErrorCode = ((StatsErrorCode = {}).ChunkMinificationError = "ChunkMinificationError", StatsErrorCode.ChunkMinificationWarning = "ChunkMinificationWarning", StatsErrorCode.ModuleParseError = "ModuleParseError", StatsErrorCode.ModuleParseWarning = "ModuleParseWarning", StatsErrorCode.ModuleBuildError = "ModuleBuildError", StatsErrorCode);
|
9103
9316
|
let iterateConfig = (config, options, fn)=>{
|
9104
9317
|
for (let hookFor of Object.keys(config)){
|
9105
9318
|
let subConfig = config[hookFor];
|
@@ -9654,7 +9867,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
9654
9867
|
object.hash = context.getStatsCompilation(compilation).hash;
|
9655
9868
|
},
|
9656
9869
|
version: (object)=>{
|
9657
|
-
object.version = "5.75.0", object.rspackVersion = "1.
|
9870
|
+
object.version = "5.75.0", object.rspackVersion = "1.4.0-beta.0";
|
9658
9871
|
},
|
9659
9872
|
env: (object, _compilation, _context, { _env })=>{
|
9660
9873
|
object.env = _env;
|
@@ -10993,7 +11206,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
10993
11206
|
moduleFilenameTemplate: options.output.devtoolModuleFilenameTemplate,
|
10994
11207
|
namespace: options.output.devtoolNamespace
|
10995
11208
|
}).apply(compiler);
|
10996
|
-
if (new JavascriptModulesPlugin().apply(compiler), new JsonModulesPlugin().apply(compiler), new AssetModulesPlugin().apply(compiler), options.experiments.asyncWebAssembly && new AsyncWebAssemblyModulesPlugin().apply(compiler), options.experiments.css && new CssModulesPlugin().apply(compiler), new
|
11209
|
+
if (new JavascriptModulesPlugin().apply(compiler), new JsonModulesPlugin().apply(compiler), new AssetModulesPlugin().apply(compiler), options.experiments.asyncWebAssembly && new AsyncWebAssemblyModulesPlugin().apply(compiler), options.experiments.css && new CssModulesPlugin().apply(compiler), new EntryOptionPlugin().apply(compiler), assertNotNill(options.context), compiler.hooks.entryOption.call(options.context, options.entry), new RuntimePlugin().apply(compiler), options.experiments.rspackFuture.bundlerInfo && new BundlerInfoRspackPlugin(options.experiments.rspackFuture.bundlerInfo).apply(compiler), new InferAsyncModulesPlugin().apply(compiler), new APIPlugin().apply(compiler), new DataUriPlugin().apply(compiler), new FileUriPlugin().apply(compiler), options.experiments.buildHttp && new HttpUriPlugin(options.experiments.buildHttp).apply(compiler), new EnsureChunkConditionsPlugin().apply(compiler), options.optimization.mergeDuplicateChunks && new MergeDuplicateChunksPlugin().apply(compiler), options.optimization.sideEffects && new SideEffectsFlagPlugin().apply(compiler), options.optimization.providedExports && new FlagDependencyExportsPlugin().apply(compiler), options.optimization.usedExports && new FlagDependencyUsagePlugin("global" === options.optimization.usedExports).apply(compiler), options.optimization.concatenateModules && new ModuleConcatenationPlugin().apply(compiler), options.optimization.mangleExports && new MangleExportsPlugin("size" !== options.optimization.mangleExports).apply(compiler), options.output.enabledLibraryTypes && options.output.enabledLibraryTypes.length > 0) for (let type of options.output.enabledLibraryTypes)new EnableLibraryPlugin(type).apply(compiler);
|
10997
11210
|
options.optimization.splitChunks && new SplitChunksPlugin(options.optimization.splitChunks).apply(compiler), options.optimization.removeEmptyChunks && new RemoveEmptyChunksPlugin().apply(compiler), options.optimization.realContentHash && new RealContentHashPlugin().apply(compiler);
|
10998
11211
|
let moduleIds = options.optimization.moduleIds;
|
10999
11212
|
if (moduleIds) switch(moduleIds){
|
@@ -11038,7 +11251,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
11038
11251
|
}).apply(compiler);
|
11039
11252
|
let { minimize, minimizer } = options.optimization;
|
11040
11253
|
if (minimize && minimizer) for (let item of minimizer)"function" == typeof item ? item.call(compiler, compiler) : "..." !== item && item && item.apply(compiler);
|
11041
|
-
if (options.performance && new SizeLimitsPlugin(options.performance).apply(compiler), options.cache && new MemoryCachePlugin().apply(compiler), new WorkerPlugin(options.output.workerChunkLoading, options.output.workerWasmLoading, options.output.module, options.output.workerPublicPath).apply(compiler), new DefaultStatsFactoryPlugin().apply(compiler), new DefaultStatsPresetPlugin().apply(compiler), new DefaultStatsPrinterPlugin().apply(compiler), options.ignoreWarnings && options.ignoreWarnings.length > 0 && new
|
11254
|
+
if (options.performance && new SizeLimitsPlugin(options.performance).apply(compiler), options.cache && new MemoryCachePlugin().apply(compiler), new WorkerPlugin(options.output.workerChunkLoading, options.output.workerWasmLoading, options.output.module, options.output.workerPublicPath).apply(compiler), new DefaultStatsFactoryPlugin().apply(compiler), new DefaultStatsPresetPlugin().apply(compiler), new DefaultStatsPrinterPlugin().apply(compiler), options.ignoreWarnings && options.ignoreWarnings.length > 0 && new lib_IgnoreWarningsPlugin(options.ignoreWarnings).apply(compiler), compiler.hooks.afterPlugins.call(compiler), !compiler.inputFileSystem) throw Error("No input filesystem provided");
|
11042
11255
|
compiler.hooks.afterResolvers.call(compiler);
|
11043
11256
|
}
|
11044
11257
|
}
|
@@ -11241,7 +11454,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
11241
11454
|
});
|
11242
11455
|
}
|
11243
11456
|
}
|
11244
|
-
class DllManifestError extends
|
11457
|
+
class DllManifestError extends lib_WebpackError {
|
11245
11458
|
constructor(filename, message){
|
11246
11459
|
super(), this.name = "DllManifestError", this.message = `Dll manifest ${filename}\n${message}`;
|
11247
11460
|
}
|
@@ -11257,7 +11470,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
11257
11470
|
for (let key of this.keys){
|
11258
11471
|
let value = void 0 !== process.env[key] ? process.env[key] : this.defaultValues[key];
|
11259
11472
|
void 0 === value && compiler.hooks.thisCompilation.tap("EnvironmentPlugin", (compilation)=>{
|
11260
|
-
let error = new
|
11473
|
+
let error = new lib_WebpackError(`EnvironmentPlugin - ${key} environment variable is undefined.\n\nYou can pass an object with default values to suppress this warning.\nSee https://rspack.rs/plugins/webpack/environment-plugin for example.`);
|
11261
11474
|
error.name = "EnvVariableNotDefinedError", compilation.errors.push(error);
|
11262
11475
|
}), definitions[`process.env.${key}`] = void 0 === value ? "undefined" : JSON.stringify(value);
|
11263
11476
|
}
|
@@ -11920,113 +12133,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
11920
12133
|
rspackExperiments: zod_index_js_namespaceObject.z.strictObject({
|
11921
12134
|
import: ZodSwcPluginImportConfig.optional()
|
11922
12135
|
}).optional()
|
11923
|
-
})
|
11924
|
-
class RspackZodUnion extends zod_index_js_namespaceObject.z.ZodUnion {
|
11925
|
-
_parse(input) {
|
11926
|
-
let dirty, { ctx } = this._processInputParams(input), options = this._def.options;
|
11927
|
-
if (ctx.common.async) return Promise.all(options.map(async (option)=>{
|
11928
|
-
let childCtx = {
|
11929
|
-
...ctx,
|
11930
|
-
common: {
|
11931
|
-
...ctx.common,
|
11932
|
-
issues: []
|
11933
|
-
},
|
11934
|
-
parent: ctx
|
11935
|
-
};
|
11936
|
-
return {
|
11937
|
-
result: await option._parseAsync({
|
11938
|
-
data: ctx.data,
|
11939
|
-
path: ctx.path,
|
11940
|
-
parent: childCtx
|
11941
|
-
}),
|
11942
|
-
ctx: childCtx
|
11943
|
-
};
|
11944
|
-
})).then(function(results) {
|
11945
|
-
for (let result of results)if ("valid" === result.result.status) return result.result;
|
11946
|
-
for (let result of results)if ("dirty" === result.result.status) return ctx.common.issues.push(...result.ctx.common.issues), result.result;
|
11947
|
-
let unionErrors = results.map((result)=>new zod_index_js_namespaceObject.ZodError(result.ctx.common.issues));
|
11948
|
-
return (0, zod_index_js_namespaceObject.addIssueToContext)(ctx, {
|
11949
|
-
code: zod_index_js_namespaceObject.ZodIssueCode.invalid_union,
|
11950
|
-
unionErrors
|
11951
|
-
}), zod_index_js_namespaceObject.INVALID;
|
11952
|
-
});
|
11953
|
-
let issues = [];
|
11954
|
-
for (let option of options){
|
11955
|
-
let childCtx = {
|
11956
|
-
...ctx,
|
11957
|
-
common: {
|
11958
|
-
...ctx.common,
|
11959
|
-
issues: []
|
11960
|
-
},
|
11961
|
-
parent: ctx
|
11962
|
-
}, result = option._parseSync({
|
11963
|
-
data: ctx.data,
|
11964
|
-
path: ctx.path,
|
11965
|
-
parent: childCtx
|
11966
|
-
});
|
11967
|
-
if ("valid" === result.status) return result;
|
11968
|
-
"dirty" !== result.status || dirty || (dirty = {
|
11969
|
-
result,
|
11970
|
-
ctx: childCtx
|
11971
|
-
}), childCtx.common.issues.length && issues.push(childCtx.common.issues);
|
11972
|
-
}
|
11973
|
-
if (dirty) return ctx.common.issues.push(...dirty.ctx.common.issues), dirty.result;
|
11974
|
-
let unionErrors = issues.map((issues)=>new zod_index_js_namespaceObject.ZodError(issues));
|
11975
|
-
return (0, zod_index_js_namespaceObject.addIssueToContext)(ctx, {
|
11976
|
-
code: zod_index_js_namespaceObject.ZodIssueCode.invalid_union,
|
11977
|
-
unionErrors
|
11978
|
-
}), zod_index_js_namespaceObject.INVALID;
|
11979
|
-
}
|
11980
|
-
static create = (types, params)=>new RspackZodUnion({
|
11981
|
-
options: types,
|
11982
|
-
typeName: zod_index_js_namespaceObject.ZodFirstPartyTypeKind.ZodUnion,
|
11983
|
-
...function(params) {
|
11984
|
-
if (!params) return {};
|
11985
|
-
let { errorMap, invalid_type_error, required_error, description } = params;
|
11986
|
-
if (errorMap && (invalid_type_error || required_error)) throw Error('Can\'t use "invalid_type_error" or "required_error" in conjunction with custom error map.');
|
11987
|
-
return errorMap ? {
|
11988
|
-
errorMap: errorMap,
|
11989
|
-
description
|
11990
|
-
} : {
|
11991
|
-
errorMap: (iss, ctx)=>{
|
11992
|
-
let { message } = params;
|
11993
|
-
return "invalid_enum_value" === iss.code ? {
|
11994
|
-
message: message ?? ctx.defaultError
|
11995
|
-
} : void 0 === ctx.data ? {
|
11996
|
-
message: message ?? required_error ?? ctx.defaultError
|
11997
|
-
} : "invalid_type" !== iss.code ? {
|
11998
|
-
message: ctx.defaultError
|
11999
|
-
} : {
|
12000
|
-
message: message ?? invalid_type_error ?? ctx.defaultError
|
12001
|
-
};
|
12002
|
-
},
|
12003
|
-
description
|
12004
|
-
};
|
12005
|
-
}(params)
|
12006
|
-
});
|
12007
|
-
}
|
12008
|
-
zod_index_js_namespaceObject.ZodUnion.create = RspackZodUnion.create;
|
12009
|
-
class ZodRspackCrossChecker extends zod_index_js_namespaceObject.ZodType {
|
12010
|
-
params;
|
12011
|
-
constructor(params){
|
12012
|
-
super(params), this.params = params;
|
12013
|
-
}
|
12014
|
-
_parse(input) {
|
12015
|
-
let ctx = this._getOrReturnCtx(input), root = this._getRootData(ctx);
|
12016
|
-
for (let pattern of this.params.patterns)if (pattern.test(root, input)) {
|
12017
|
-
let res = pattern.type._parse(input);
|
12018
|
-
for (let issue of "function" == typeof pattern.issue ? pattern.issue(res, root, input) : [])(0, zod_index_js_namespaceObject.addIssueToContext)(ctx, issue);
|
12019
|
-
return res;
|
12020
|
-
}
|
12021
|
-
return this.params.default._parse(input);
|
12022
|
-
}
|
12023
|
-
_getRootData(ctx) {
|
12024
|
-
let root = ctx;
|
12025
|
-
for(; root.parent;)root = root.parent;
|
12026
|
-
return root.data;
|
12027
|
-
}
|
12028
|
-
}
|
12029
|
-
let filenameTemplate = zod_index_js_namespaceObject.z.string(), zod_filename = filenameTemplate.or(zod_index_js_namespaceObject.z.function().args(zod_index_js_namespaceObject.z.custom(), zod_index_js_namespaceObject.z.custom().optional()).returns(zod_index_js_namespaceObject.z.string())), zod_name = zod_index_js_namespaceObject.z.string(), zod_dependencies = zod_index_js_namespaceObject.z.array(zod_name), zod_context = zod_index_js_namespaceObject.z.string().refine((val)=>external_node_path_default().isAbsolute(val), (val)=>({
|
12136
|
+
}), filenameTemplate = zod_index_js_namespaceObject.z.string(), zod_filename = filenameTemplate.or(anyFunction), zod_name = zod_index_js_namespaceObject.z.string(), zod_dependencies = zod_index_js_namespaceObject.z.array(zod_name), zod_context = zod_index_js_namespaceObject.z.string().refine((val)=>external_node_path_default().isAbsolute(val), (val)=>({
|
12030
12137
|
message: `The provided value ${JSON.stringify(val)} must be an absolute path.`
|
12031
12138
|
})), zod_mode = zod_index_js_namespaceObject.z.enum([
|
12032
12139
|
"development",
|
@@ -12098,13 +12205,13 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
12098
12205
|
library: libraryOptions.optional(),
|
12099
12206
|
dependOn: entryDependOn.optional(),
|
12100
12207
|
layer: zod_layer.optional()
|
12101
|
-
}), entryStatic = zod_index_js_namespaceObject.z.record(zod_index_js_namespaceObject.z.string(), entryItem.or(entryDescription)).or(entryItem),
|
12208
|
+
}), entryStatic = zod_index_js_namespaceObject.z.record(zod_index_js_namespaceObject.z.string(), entryItem.or(entryDescription)).or(entryItem), zod_entry = entryStatic.or(anyFunction), zod_path = zod_index_js_namespaceObject.z.string(), pathinfo = zod_index_js_namespaceObject.z.boolean().or(zod_index_js_namespaceObject.z.literal("verbose")), webassemblyModuleFilename = zod_index_js_namespaceObject.z.string(), zod_crossOriginLoading = zod_index_js_namespaceObject.z.literal(!1).or(zod_index_js_namespaceObject.z.enum([
|
12102
12209
|
"anonymous",
|
12103
12210
|
"use-credentials"
|
12104
12211
|
])), hotUpdateGlobal = zod_index_js_namespaceObject.z.string(), zod_uniqueName = zod_index_js_namespaceObject.z.string(), chunkLoadingGlobal = zod_index_js_namespaceObject.z.string(), zod_enabledLibraryTypes = zod_index_js_namespaceObject.z.array(libraryType), clean = zod_index_js_namespaceObject.z.union([
|
12105
12212
|
zod_index_js_namespaceObject.z.boolean(),
|
12106
12213
|
zod_index_js_namespaceObject.z.strictObject({
|
12107
|
-
keep: zod_index_js_namespaceObject.z.instanceof(RegExp).or(zod_index_js_namespaceObject.z.string()).or(
|
12214
|
+
keep: zod_index_js_namespaceObject.z.instanceof(RegExp).or(zod_index_js_namespaceObject.z.string()).or(anyFunction).optional()
|
12108
12215
|
})
|
12109
12216
|
]), zod_outputModule = zod_index_js_namespaceObject.z.boolean(), strictModuleExceptionHandling = zod_index_js_namespaceObject.z.boolean(), strictModuleErrorHandling = zod_index_js_namespaceObject.z.boolean(), globalObject = zod_index_js_namespaceObject.z.string(), zod_enabledWasmLoadingTypes = zod_index_js_namespaceObject.z.array(wasmLoadingType), importFunctionName = zod_index_js_namespaceObject.z.string(), importMetaName = zod_index_js_namespaceObject.z.string(), iife = zod_index_js_namespaceObject.z.boolean(), zod_enabledChunkLoadingTypes = zod_index_js_namespaceObject.z.array(chunkLoadingType), chunkFormat = zod_index_js_namespaceObject.z.literal(!1).or(zod_index_js_namespaceObject.z.string()), zod_workerPublicPath = zod_index_js_namespaceObject.z.string(), zod_trustedTypes = zod_index_js_namespaceObject.z.strictObject({
|
12110
12217
|
policyName: zod_index_js_namespaceObject.z.string().optional(),
|
@@ -12117,9 +12224,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
12117
12224
|
"xxhash64"
|
12118
12225
|
]), hashSalt = zod_index_js_namespaceObject.z.string(), sourceMapFilename = zod_index_js_namespaceObject.z.string(), devtoolNamespace = zod_index_js_namespaceObject.z.string(), devtoolModuleFilenameTemplate = zod_index_js_namespaceObject.z.union([
|
12119
12226
|
zod_index_js_namespaceObject.z.string(),
|
12120
|
-
|
12121
|
-
zod_index_js_namespaceObject.z.any()
|
12122
|
-
]), zod_index_js_namespaceObject.z.any())
|
12227
|
+
anyFunction
|
12123
12228
|
]), zod_environment = zod_index_js_namespaceObject.z.strictObject({
|
12124
12229
|
arrowFunction: zod_index_js_namespaceObject.z.boolean().optional(),
|
12125
12230
|
asyncFunction: zod_index_js_namespaceObject.z.boolean().optional(),
|
@@ -12216,7 +12321,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
12216
12321
|
pnp: zod_index_js_namespaceObject.z.boolean().optional()
|
12217
12322
|
}).extend({
|
12218
12323
|
byDependency: zod_index_js_namespaceObject.z.lazy(()=>zod_index_js_namespaceObject.z.record(zod_index_js_namespaceObject.z.string(), zod_resolveOptions)).optional()
|
12219
|
-
}), ruleSetCondition = zod_index_js_namespaceObject.z.instanceof(RegExp).or(zod_index_js_namespaceObject.z.string()).or(
|
12324
|
+
}), ruleSetCondition = zod_index_js_namespaceObject.z.instanceof(RegExp).or(zod_index_js_namespaceObject.z.string()).or(anyFunction).or(zod_index_js_namespaceObject.z.lazy(()=>ruleSetConditions)).or(zod_index_js_namespaceObject.z.lazy(()=>ruleSetLogicalConditions)), ruleSetConditions = zod_index_js_namespaceObject.z.lazy(()=>zod_index_js_namespaceObject.z.array(ruleSetCondition)), ruleSetLogicalConditions = zod_index_js_namespaceObject.z.strictObject({
|
12220
12325
|
and: ruleSetConditions.optional(),
|
12221
12326
|
or: ruleSetConditions.optional(),
|
12222
12327
|
not: ruleSetCondition.optional()
|
@@ -12262,7 +12367,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
12262
12367
|
options: ruleSetLoaderOptions.optional(),
|
12263
12368
|
parallel: zod_index_js_namespaceObject.z.boolean().optional()
|
12264
12369
|
})
|
12265
|
-
}), ruleSetUseItem = ruleSetLoader.or(ruleSetLoaderWithOptions), ruleSetUse = ruleSetUseItem.or(ruleSetUseItem.array()).or(
|
12370
|
+
}), ruleSetUseItem = ruleSetLoader.or(ruleSetLoaderWithOptions), ruleSetUse = ruleSetUseItem.or(ruleSetUseItem.array()).or(anyFunction), baseRuleSetRule = zod_index_js_namespaceObject.z.strictObject({
|
12266
12371
|
test: ruleSetCondition.optional(),
|
12267
12372
|
exclude: ruleSetCondition.optional(),
|
12268
12373
|
include: ruleSetCondition.optional(),
|
@@ -12405,10 +12510,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
12405
12510
|
}), assetGeneratorDataUrlOptions = zod_index_js_namespaceObject.z.strictObject({
|
12406
12511
|
encoding: zod_index_js_namespaceObject.z.literal(!1).or(zod_index_js_namespaceObject.z.literal("base64")).optional(),
|
12407
12512
|
mimetype: zod_index_js_namespaceObject.z.string().optional()
|
12408
|
-
}),
|
12409
|
-
filename: zod_index_js_namespaceObject.z.string(),
|
12410
|
-
module: zod_index_js_namespaceObject.z.custom()
|
12411
|
-
})).returns(zod_index_js_namespaceObject.z.string()), assetGeneratorDataUrl = assetGeneratorDataUrlOptions.or(assetGeneratorDataUrlFunction), assetInlineGeneratorOptions = zod_index_js_namespaceObject.z.strictObject({
|
12513
|
+
}), assetGeneratorDataUrl = assetGeneratorDataUrlOptions.or(anyFunction), assetInlineGeneratorOptions = zod_index_js_namespaceObject.z.strictObject({
|
12412
12514
|
dataUrl: assetGeneratorDataUrl.optional()
|
12413
12515
|
}), assetResourceGeneratorOptions = zod_index_js_namespaceObject.z.strictObject({
|
12414
12516
|
emit: zod_index_js_namespaceObject.z.boolean().optional(),
|
@@ -12444,7 +12546,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
12444
12546
|
"css/auto": cssAutoGeneratorOptions.optional(),
|
12445
12547
|
"css/module": cssModuleGeneratorOptions.optional(),
|
12446
12548
|
json: jsonGeneratorOptions.optional()
|
12447
|
-
}), noParseOptionSingle = zod_index_js_namespaceObject.z.string().or(zod_index_js_namespaceObject.z.instanceof(RegExp)).or(
|
12549
|
+
}), noParseOptionSingle = zod_index_js_namespaceObject.z.string().or(zod_index_js_namespaceObject.z.instanceof(RegExp)).or(anyFunction), noParseOption = noParseOptionSingle.or(zod_index_js_namespaceObject.z.array(noParseOptionSingle)), moduleOptions = zod_index_js_namespaceObject.z.strictObject({
|
12448
12550
|
defaultRules: ruleSetRules.optional(),
|
12449
12551
|
rules: ruleSetRules.optional(),
|
12450
12552
|
parser: parserOptionsByModuleTypeKnown.optional(),
|
@@ -12516,39 +12618,12 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
12516
12618
|
"script",
|
12517
12619
|
"node-commonjs",
|
12518
12620
|
"commonjs-import"
|
12519
|
-
]),
|
12520
|
-
|
12521
|
-
|
12522
|
-
|
12523
|
-
|
12524
|
-
|
12525
|
-
},
|
12526
|
-
type: zod_index_js_namespaceObject.z.strictObject({
|
12527
|
-
root: zod_index_js_namespaceObject.z.string().or(zod_index_js_namespaceObject.z.string().array()),
|
12528
|
-
commonjs: zod_index_js_namespaceObject.z.string().or(zod_index_js_namespaceObject.z.string().array()),
|
12529
|
-
commonjs2: zod_index_js_namespaceObject.z.string().or(zod_index_js_namespaceObject.z.string().array()),
|
12530
|
-
amd: zod_index_js_namespaceObject.z.string().or(zod_index_js_namespaceObject.z.string().array())
|
12531
|
-
}),
|
12532
|
-
issue: (res)=>"aborted" === res.status ? [
|
12533
|
-
{
|
12534
|
-
fatal: !0,
|
12535
|
-
code: zod_index_js_namespaceObject.ZodIssueCode.custom,
|
12536
|
-
message: 'External object must have "root", "commonjs", "commonjs2", "amd" properties when "libraryType" or "externalsType" is "umd"'
|
12537
|
-
}
|
12538
|
-
] : []
|
12539
|
-
}
|
12540
|
-
],
|
12541
|
-
default: zod_index_js_namespaceObject.z.record(zod_index_js_namespaceObject.z.string(), zod_index_js_namespaceObject.z.string().or(zod_index_js_namespaceObject.z.string().array()))
|
12542
|
-
}), externalItemValue = zod_index_js_namespaceObject.z.string().or(zod_index_js_namespaceObject.z.boolean()).or(zod_index_js_namespaceObject.z.string().array().min(1)).or(externalObjectValue), externalItemObjectUnknown = zod_index_js_namespaceObject.z.record(zod_index_js_namespaceObject.z.string(), externalItemValue), externalItemFunctionData = zod_index_js_namespaceObject.z.strictObject({
|
12543
|
-
context: zod_index_js_namespaceObject.z.string().optional(),
|
12544
|
-
dependencyType: zod_index_js_namespaceObject.z.string().optional(),
|
12545
|
-
request: zod_index_js_namespaceObject.z.string().optional(),
|
12546
|
-
contextInfo: zod_index_js_namespaceObject.z.strictObject({
|
12547
|
-
issuer: zod_index_js_namespaceObject.z.string(),
|
12548
|
-
issuerLayer: zod_index_js_namespaceObject.z.string().or(zod_index_js_namespaceObject.z.null()).optional()
|
12549
|
-
}).optional(),
|
12550
|
-
getResolve: zod_index_js_namespaceObject.z.function().returns(zod_index_js_namespaceObject.z.function().args(zod_index_js_namespaceObject.z.string(), zod_index_js_namespaceObject.z.string()).returns(zod_index_js_namespaceObject.z.promise(zod_index_js_namespaceObject.z.string())).or(zod_index_js_namespaceObject.z.function().args(zod_index_js_namespaceObject.z.string(), zod_index_js_namespaceObject.z.string(), zod_index_js_namespaceObject.z.custom()).returns(zod_index_js_namespaceObject.z.void()))).optional()
|
12551
|
-
}), externalItem = zod_index_js_namespaceObject.z.string().or(zod_index_js_namespaceObject.z.instanceof(RegExp)).or(externalItemObjectUnknown).or(zod_index_js_namespaceObject.z.function().args(externalItemFunctionData, zod_index_js_namespaceObject.z.function().args(zod_index_js_namespaceObject.z.instanceof(Error).optional(), externalItemValue.optional(), externalsType.optional()).returns(zod_index_js_namespaceObject.z.void()))).or(zod_index_js_namespaceObject.z.function().args(externalItemFunctionData).returns(zod_index_js_namespaceObject.z.promise(externalItemValue))).or(zod_index_js_namespaceObject.z.function().args(externalItemFunctionData).returns(externalItemValue)), zod_externals = externalItem.array().or(externalItem), zod_externalsPresets = zod_index_js_namespaceObject.z.strictObject({
|
12621
|
+
]), externalItemObjectValue = zod_index_js_namespaceObject.z.record(zod_index_js_namespaceObject.z.string(), zod_index_js_namespaceObject.z.string().or(zod_index_js_namespaceObject.z.string().array())), externalItemUmdValue = zod_index_js_namespaceObject.z.strictObject({
|
12622
|
+
root: zod_index_js_namespaceObject.z.string().or(zod_index_js_namespaceObject.z.string().array()),
|
12623
|
+
commonjs: zod_index_js_namespaceObject.z.string().or(zod_index_js_namespaceObject.z.string().array()),
|
12624
|
+
commonjs2: zod_index_js_namespaceObject.z.string().or(zod_index_js_namespaceObject.z.string().array()),
|
12625
|
+
amd: zod_index_js_namespaceObject.z.string().or(zod_index_js_namespaceObject.z.string().array())
|
12626
|
+
}), zod_externalItemValue = zod_index_js_namespaceObject.z.string().or(zod_index_js_namespaceObject.z.boolean()).or(zod_index_js_namespaceObject.z.string().array().min(1)).or(externalItemObjectValue), externalItemObjectUnknown = zod_index_js_namespaceObject.z.record(zod_index_js_namespaceObject.z.string(), zod_externalItemValue), zod_externalItem = zod_index_js_namespaceObject.z.string().or(zod_index_js_namespaceObject.z.instanceof(RegExp)).or(externalItemObjectUnknown).or(anyFunction), zod_externals = zod_externalItem.array().or(zod_externalItem), zod_externalsPresets = zod_index_js_namespaceObject.z.strictObject({
|
12552
12627
|
node: zod_index_js_namespaceObject.z.boolean().optional(),
|
12553
12628
|
web: zod_index_js_namespaceObject.z.boolean().optional(),
|
12554
12629
|
webAsync: zod_index_js_namespaceObject.z.boolean().optional(),
|
@@ -12557,7 +12632,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
12557
12632
|
electronPreload: zod_index_js_namespaceObject.z.boolean().optional(),
|
12558
12633
|
electronRenderer: zod_index_js_namespaceObject.z.boolean().optional(),
|
12559
12634
|
nwjs: zod_index_js_namespaceObject.z.boolean().optional()
|
12560
|
-
}), filterItemTypes = zod_index_js_namespaceObject.z.instanceof(RegExp).or(zod_index_js_namespaceObject.z.string()).or(
|
12635
|
+
}), filterItemTypes = zod_index_js_namespaceObject.z.instanceof(RegExp).or(zod_index_js_namespaceObject.z.string()).or(anyFunction), filterTypes = filterItemTypes.array().or(filterItemTypes), zod_infrastructureLogging = zod_index_js_namespaceObject.z.strictObject({
|
12561
12636
|
appendOnly: zod_index_js_namespaceObject.z.boolean().optional(),
|
12562
12637
|
colors: zod_index_js_namespaceObject.z.boolean().optional(),
|
12563
12638
|
console: zod_index_js_namespaceObject.z.custom().optional(),
|
@@ -12678,22 +12753,8 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
12678
12753
|
groupAssetsByChunk: zod_index_js_namespaceObject.z.boolean().optional(),
|
12679
12754
|
assetsSpace: zod_index_js_namespaceObject.z.number().optional(),
|
12680
12755
|
orphanModules: zod_index_js_namespaceObject.z.boolean().optional(),
|
12681
|
-
excludeModules: zod_index_js_namespaceObject.z.array(zod_index_js_namespaceObject.z.string().or(zod_index_js_namespaceObject.z.instanceof(RegExp)).or(zod_index_js_namespaceObject.z.
|
12682
|
-
|
12683
|
-
zod_index_js_namespaceObject.z.any(),
|
12684
|
-
zod_index_js_namespaceObject.z.any()
|
12685
|
-
]), zod_index_js_namespaceObject.z.boolean()))).or(zod_index_js_namespaceObject.z.string()).or(zod_index_js_namespaceObject.z.instanceof(RegExp)).or(zod_index_js_namespaceObject.z.function(zod_index_js_namespaceObject.z.tuple([
|
12686
|
-
zod_index_js_namespaceObject.z.string(),
|
12687
|
-
zod_index_js_namespaceObject.z.any(),
|
12688
|
-
zod_index_js_namespaceObject.z.any()
|
12689
|
-
]), zod_index_js_namespaceObject.z.boolean())).or(zod_index_js_namespaceObject.z.boolean()).optional(),
|
12690
|
-
excludeAssets: zod_index_js_namespaceObject.z.array(zod_index_js_namespaceObject.z.string().or(zod_index_js_namespaceObject.z.instanceof(RegExp)).or(zod_index_js_namespaceObject.z.function(zod_index_js_namespaceObject.z.tuple([
|
12691
|
-
zod_index_js_namespaceObject.z.string(),
|
12692
|
-
zod_index_js_namespaceObject.z.any()
|
12693
|
-
]), zod_index_js_namespaceObject.z.boolean()))).or(zod_index_js_namespaceObject.z.string()).or(zod_index_js_namespaceObject.z.instanceof(RegExp)).or(zod_index_js_namespaceObject.z.function(zod_index_js_namespaceObject.z.tuple([
|
12694
|
-
zod_index_js_namespaceObject.z.string(),
|
12695
|
-
zod_index_js_namespaceObject.z.any()
|
12696
|
-
]), zod_index_js_namespaceObject.z.boolean())).optional(),
|
12756
|
+
excludeModules: zod_index_js_namespaceObject.z.array(zod_index_js_namespaceObject.z.string().or(zod_index_js_namespaceObject.z.instanceof(RegExp)).or(anyFunction)).or(zod_index_js_namespaceObject.z.string()).or(zod_index_js_namespaceObject.z.instanceof(RegExp)).or(anyFunction).or(zod_index_js_namespaceObject.z.boolean()).optional(),
|
12757
|
+
excludeAssets: zod_index_js_namespaceObject.z.array(zod_index_js_namespaceObject.z.string().or(zod_index_js_namespaceObject.z.instanceof(RegExp)).or(anyFunction)).or(zod_index_js_namespaceObject.z.string()).or(zod_index_js_namespaceObject.z.instanceof(RegExp)).or(anyFunction).optional(),
|
12697
12758
|
modulesSort: zod_index_js_namespaceObject.z.string().optional(),
|
12698
12759
|
chunkModulesSort: zod_index_js_namespaceObject.z.string().optional(),
|
12699
12760
|
nestedModulesSort: zod_index_js_namespaceObject.z.string().optional(),
|
@@ -12725,16 +12786,12 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
12725
12786
|
"single",
|
12726
12787
|
"multiple"
|
12727
12788
|
]).or(zod_index_js_namespaceObject.z.boolean()).or(zod_index_js_namespaceObject.z.strictObject({
|
12728
|
-
name: zod_index_js_namespaceObject.z.string().or(
|
12729
|
-
|
12730
|
-
})).returns(zod_index_js_namespaceObject.z.string())).optional()
|
12731
|
-
})), optimizationSplitChunksNameFunction = zod_index_js_namespaceObject.z.function().args(zod_index_js_namespaceObject.z.instanceof(binding_.Module), zod_index_js_namespaceObject.z.array(zod_index_js_namespaceObject.z.instanceof(Chunk)), zod_index_js_namespaceObject.z.string()).returns(zod_index_js_namespaceObject.z.string().optional()), optimizationSplitChunksName = zod_index_js_namespaceObject.z.string().or(zod_index_js_namespaceObject.z.literal(!1)).or(optimizationSplitChunksNameFunction), optimizationSplitChunksChunks = zod_index_js_namespaceObject.z.enum([
|
12789
|
+
name: zod_index_js_namespaceObject.z.string().or(anyFunction).optional()
|
12790
|
+
})), optimizationSplitChunksName = zod_index_js_namespaceObject.z.string().or(zod_index_js_namespaceObject.z.literal(!1)).or(anyFunction), optimizationSplitChunksChunks = zod_index_js_namespaceObject.z.enum([
|
12732
12791
|
"initial",
|
12733
12792
|
"async",
|
12734
12793
|
"all"
|
12735
|
-
]).or(zod_index_js_namespaceObject.z.instanceof(RegExp)).or(zod_index_js_namespaceObject.z.
|
12736
|
-
message: "Input not instance of Chunk"
|
12737
|
-
})).returns(zod_index_js_namespaceObject.z.boolean())), optimizationSplitChunksSizes = zod_index_js_namespaceObject.z.number().or(zod_index_js_namespaceObject.z.record(zod_index_js_namespaceObject.z.string(), zod_index_js_namespaceObject.z.number())), optimizationSplitChunksDefaultSizeTypes = zod_index_js_namespaceObject.z.array(zod_index_js_namespaceObject.z.string()), sharedOptimizationSplitChunksCacheGroup = {
|
12794
|
+
]).or(zod_index_js_namespaceObject.z.instanceof(RegExp)).or(anyFunction), optimizationSplitChunksSizes = zod_index_js_namespaceObject.z.number().or(zod_index_js_namespaceObject.z.record(zod_index_js_namespaceObject.z.string(), zod_index_js_namespaceObject.z.number())), optimizationSplitChunksDefaultSizeTypes = zod_index_js_namespaceObject.z.array(zod_index_js_namespaceObject.z.string()), sharedOptimizationSplitChunksCacheGroup = {
|
12738
12795
|
chunks: optimizationSplitChunksChunks.optional(),
|
12739
12796
|
defaultSizeTypes: optimizationSplitChunksDefaultSizeTypes.optional(),
|
12740
12797
|
minChunks: zod_index_js_namespaceObject.z.number().min(1).optional(),
|
@@ -12750,18 +12807,13 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
12750
12807
|
maxInitialRequests: zod_index_js_namespaceObject.z.number().optional(),
|
12751
12808
|
automaticNameDelimiter: zod_index_js_namespaceObject.z.string().optional()
|
12752
12809
|
}, optimizationSplitChunksCacheGroup = zod_index_js_namespaceObject.z.strictObject({
|
12753
|
-
test: zod_index_js_namespaceObject.z.string().or(zod_index_js_namespaceObject.z.instanceof(RegExp)).or(
|
12754
|
-
moduleGraph: zod_index_js_namespaceObject.z.instanceof(ModuleGraph),
|
12755
|
-
chunkGraph: zod_index_js_namespaceObject.z.instanceof(ChunkGraph)
|
12756
|
-
})).returns(zod_index_js_namespaceObject.z.boolean())).optional(),
|
12810
|
+
test: zod_index_js_namespaceObject.z.string().or(zod_index_js_namespaceObject.z.instanceof(RegExp)).or(anyFunction).optional(),
|
12757
12811
|
priority: zod_index_js_namespaceObject.z.number().optional(),
|
12758
12812
|
enforce: zod_index_js_namespaceObject.z.boolean().optional(),
|
12759
12813
|
reuseExistingChunk: zod_index_js_namespaceObject.z.boolean().optional(),
|
12760
12814
|
type: zod_index_js_namespaceObject.z.string().or(zod_index_js_namespaceObject.z.instanceof(RegExp)).optional(),
|
12761
12815
|
idHint: zod_index_js_namespaceObject.z.string().optional(),
|
12762
|
-
layer: zod_index_js_namespaceObject.z.string().or(zod_index_js_namespaceObject.z.instanceof(RegExp)).or(
|
12763
|
-
zod_index_js_namespaceObject.z.string().optional()
|
12764
|
-
]), zod_index_js_namespaceObject.z.boolean())).optional(),
|
12816
|
+
layer: zod_index_js_namespaceObject.z.string().or(zod_index_js_namespaceObject.z.instanceof(RegExp)).or(anyFunction).optional(),
|
12765
12817
|
...sharedOptimizationSplitChunksCacheGroup
|
12766
12818
|
}), optimizationSplitChunksOptions = zod_index_js_namespaceObject.z.strictObject({
|
12767
12819
|
cacheGroups: zod_index_js_namespaceObject.z.record(zod_index_js_namespaceObject.z.literal(!1).or(optimizationSplitChunksCacheGroup)).optional(),
|
@@ -12848,7 +12900,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
12848
12900
|
})), lazyCompilationOptions = zod_index_js_namespaceObject.z.object({
|
12849
12901
|
imports: zod_index_js_namespaceObject.z.boolean().optional(),
|
12850
12902
|
entries: zod_index_js_namespaceObject.z.boolean().optional(),
|
12851
|
-
test: zod_index_js_namespaceObject.z.instanceof(RegExp).or(
|
12903
|
+
test: zod_index_js_namespaceObject.z.instanceof(RegExp).or(anyFunction).optional(),
|
12852
12904
|
client: zod_index_js_namespaceObject.z.string().optional(),
|
12853
12905
|
serverUrl: zod_index_js_namespaceObject.z.string().optional(),
|
12854
12906
|
prefix: zod_index_js_namespaceObject.z.string().optional()
|
@@ -12879,12 +12931,11 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
12879
12931
|
zod_index_js_namespaceObject.z.literal(!1)
|
12880
12932
|
]).optional(),
|
12881
12933
|
upgrade: zod_index_js_namespaceObject.z.boolean().optional(),
|
12882
|
-
httpClient:
|
12883
|
-
|
12884
|
-
|
12885
|
-
|
12886
|
-
|
12887
|
-
}), zod_experiments = zod_index_js_namespaceObject.z.strictObject({
|
12934
|
+
httpClient: anyFunction.optional()
|
12935
|
+
}), useInputFileSystem = zod_index_js_namespaceObject.z.union([
|
12936
|
+
zod_index_js_namespaceObject.z.literal(!1),
|
12937
|
+
zod_index_js_namespaceObject.z.array(zod_index_js_namespaceObject.z.instanceof(RegExp))
|
12938
|
+
]), zod_experiments = zod_index_js_namespaceObject.z.strictObject({
|
12888
12939
|
cache: zod_index_js_namespaceObject.z.boolean().optional().or(experimentCacheOptions),
|
12889
12940
|
lazyCompilation: zod_index_js_namespaceObject.z.boolean().optional().or(lazyCompilationOptions),
|
12890
12941
|
asyncWebAssembly: zod_index_js_namespaceObject.z.boolean().optional(),
|
@@ -12897,15 +12948,16 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
12897
12948
|
futureDefaults: zod_index_js_namespaceObject.z.boolean().optional(),
|
12898
12949
|
rspackFuture: rspackFutureOptions.optional(),
|
12899
12950
|
buildHttp: buildHttpOptions.optional(),
|
12900
|
-
parallelLoader: zod_index_js_namespaceObject.z.boolean().optional()
|
12951
|
+
parallelLoader: zod_index_js_namespaceObject.z.boolean().optional(),
|
12952
|
+
useInputFileSystem: useInputFileSystem.optional()
|
12901
12953
|
}), zod_watch = zod_index_js_namespaceObject.z.boolean(), zod_watchOptions = zod_index_js_namespaceObject.z.strictObject({
|
12902
12954
|
aggregateTimeout: zod_index_js_namespaceObject.z.number().optional(),
|
12903
12955
|
followSymlinks: zod_index_js_namespaceObject.z.boolean().optional(),
|
12904
12956
|
ignored: zod_index_js_namespaceObject.z.string().array().or(zod_index_js_namespaceObject.z.instanceof(RegExp)).or(zod_index_js_namespaceObject.z.string()).optional(),
|
12905
12957
|
poll: zod_index_js_namespaceObject.z.number().or(zod_index_js_namespaceObject.z.boolean()).optional(),
|
12906
12958
|
stdin: zod_index_js_namespaceObject.z.boolean().optional()
|
12907
|
-
}), devServer = zod_index_js_namespaceObject.z.custom(), ignoreWarnings = zod_index_js_namespaceObject.z.instanceof(RegExp).or(
|
12908
|
-
assetFilter:
|
12959
|
+
}), devServer = zod_index_js_namespaceObject.z.custom(), ignoreWarnings = zod_index_js_namespaceObject.z.instanceof(RegExp).or(anyFunction).array(), zod_profile = zod_index_js_namespaceObject.z.boolean(), amd = zod_index_js_namespaceObject.z.literal(!1).or(zod_index_js_namespaceObject.z.record(zod_index_js_namespaceObject.z.string(), zod_index_js_namespaceObject.z.any())), bail = zod_index_js_namespaceObject.z.boolean(), zod_performance = zod_index_js_namespaceObject.z.strictObject({
|
12960
|
+
assetFilter: anyFunction.optional(),
|
12909
12961
|
hints: zod_index_js_namespaceObject.z.enum([
|
12910
12962
|
"error",
|
12911
12963
|
"warning"
|
@@ -12948,6 +13000,27 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
12948
13000
|
amd: amd.optional(),
|
12949
13001
|
bail: bail.optional(),
|
12950
13002
|
performance: zod_performance.optional()
|
13003
|
+
}).superRefine((config, ctx)=>{
|
13004
|
+
let isLibraryUmd = !1, library = config?.output?.library;
|
13005
|
+
function checkExternalItem(externalItem, path) {
|
13006
|
+
if ("object" == typeof externalItem && null !== externalItem) for (let [key, value] of Object.entries(externalItem)){
|
13007
|
+
var externalItemValue, path1;
|
13008
|
+
externalItemValue = value, path1 = [
|
13009
|
+
...path,
|
13010
|
+
key
|
13011
|
+
], "object" == typeof externalItemValue && null !== externalItemValue && (externalItemUmdValue.safeParse(externalItemValue).success || ctx.addIssue({
|
13012
|
+
code: zod_index_js_namespaceObject.ZodIssueCode.custom,
|
13013
|
+
message: 'External object must have "root", "commonjs", "commonjs2", "amd" properties when "libraryType" or "externalsType" is "umd"',
|
13014
|
+
path: path1
|
13015
|
+
}));
|
13016
|
+
}
|
13017
|
+
}
|
13018
|
+
("object" == typeof library && "type" in library ? "umd" === library.type : config?.output?.libraryTarget === "umd") && (config?.externalsType === void 0 || config?.externalsType === "umd") && (Array.isArray(config?.externals) ? config.externals.forEach((external, index)=>checkExternalItem(external, [
|
13019
|
+
"externals",
|
13020
|
+
index
|
13021
|
+
])) : checkExternalItem(config?.externals, [
|
13022
|
+
"externals"
|
13023
|
+
]));
|
12951
13024
|
}), ModuleFederationRuntimePlugin = base_create(binding_.BuiltinPluginName.ModuleFederationRuntimePlugin, ()=>{}), options_process = (options, normalizeSimple, normalizeOptions, fn)=>{
|
12952
13025
|
let object = (obj)=>{
|
12953
13026
|
for (let [key, value] of Object.entries(obj))"string" == typeof value || Array.isArray(value) ? fn(key, normalizeSimple(value, key)) : fn(key, normalizeOptions(value, key));
|
@@ -13318,7 +13391,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
13318
13391
|
let _options = JSON.stringify(options || {});
|
13319
13392
|
return binding_default().transform(source, _options);
|
13320
13393
|
}
|
13321
|
-
let exports_rspackVersion = "1.
|
13394
|
+
let exports_rspackVersion = "1.4.0-beta.0", exports_version = "5.75.0", exports_WebpackError = Error, sources = __webpack_require__("webpack-sources"), exports_config = {
|
13322
13395
|
getNormalizedRspackOptions: getNormalizedRspackOptions,
|
13323
13396
|
applyRspackOptionsDefaults: applyRspackOptionsDefaults,
|
13324
13397
|
getNormalizedWebpackOptions: getNormalizedRspackOptions,
|
@@ -13402,7 +13475,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
13402
13475
|
await JavaScriptTracer.initJavaScriptTrace(layer, output), (0, binding_.registerGlobalTrace)(filter, layer, output), JavaScriptTracer.initCpuProfiler();
|
13403
13476
|
},
|
13404
13477
|
async cleanup () {
|
13405
|
-
(0, binding_.
|
13478
|
+
await JavaScriptTracer.cleanupJavaScriptTrace(), await (0, binding_.syncTraceEvent)(JavaScriptTracer.events), (0, binding_.cleanupGlobalTrace)();
|
13406
13479
|
}
|
13407
13480
|
},
|
13408
13481
|
RemoveDuplicateModulesPlugin: RemoveDuplicateModulesPlugin,
|
@@ -13484,7 +13557,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
13484
13557
|
}, exports_namespaceObject);
|
13485
13558
|
src_fn.rspack = src_fn, src_fn.webpack = src_fn;
|
13486
13559
|
let src_rspack = src_fn, src_0 = src_rspack;
|
13487
|
-
})(), exports.AsyncDependenciesBlock = __webpack_exports__.AsyncDependenciesBlock, exports.BannerPlugin = __webpack_exports__.BannerPlugin, exports.CircularDependencyRspackPlugin = __webpack_exports__.CircularDependencyRspackPlugin, exports.Compilation = __webpack_exports__.Compilation, exports.Compiler = __webpack_exports__.Compiler, exports.ConcatenatedModule = __webpack_exports__.ConcatenatedModule, exports.ContextModule = __webpack_exports__.ContextModule, exports.ContextReplacementPlugin = __webpack_exports__.ContextReplacementPlugin, exports.CopyRspackPlugin = __webpack_exports__.CopyRspackPlugin, exports.CssExtractRspackPlugin = __webpack_exports__.CssExtractRspackPlugin, exports.DefinePlugin = __webpack_exports__.DefinePlugin, exports.Dependency = __webpack_exports__.Dependency, exports.DllPlugin = __webpack_exports__.DllPlugin, exports.DllReferencePlugin = __webpack_exports__.DllReferencePlugin, exports.DynamicEntryPlugin = __webpack_exports__.DynamicEntryPlugin, exports.EntryDependency = __webpack_exports__.EntryDependency, exports.EntryOptionPlugin = __webpack_exports__.EntryOptionPlugin, exports.EntryPlugin = __webpack_exports__.EntryPlugin, exports.EnvironmentPlugin = __webpack_exports__.EnvironmentPlugin, exports.EvalDevToolModulePlugin = __webpack_exports__.EvalDevToolModulePlugin, exports.EvalSourceMapDevToolPlugin = __webpack_exports__.EvalSourceMapDevToolPlugin, exports.ExternalModule = __webpack_exports__.ExternalModule, exports.ExternalsPlugin = __webpack_exports__.ExternalsPlugin, exports.HotModuleReplacementPlugin = __webpack_exports__.HotModuleReplacementPlugin, exports.HtmlRspackPlugin = __webpack_exports__.HtmlRspackPlugin, exports.IgnorePlugin = __webpack_exports__.IgnorePlugin, exports.LightningCssMinimizerRspackPlugin = __webpack_exports__.LightningCssMinimizerRspackPlugin, exports.LoaderOptionsPlugin = __webpack_exports__.LoaderOptionsPlugin, exports.LoaderTargetPlugin = __webpack_exports__.LoaderTargetPlugin, exports.Module = __webpack_exports__.Module, exports.ModuleFilenameHelpers = __webpack_exports__.ModuleFilenameHelpers, exports.MultiCompiler = __webpack_exports__.MultiCompiler, exports.MultiStats = __webpack_exports__.MultiStats, exports.NoEmitOnErrorsPlugin = __webpack_exports__.NoEmitOnErrorsPlugin, exports.NormalModule = __webpack_exports__.NormalModule, exports.NormalModuleReplacementPlugin = __webpack_exports__.NormalModuleReplacementPlugin, exports.ProgressPlugin = __webpack_exports__.ProgressPlugin, exports.ProvidePlugin = __webpack_exports__.ProvidePlugin, exports.RspackOptionsApply = __webpack_exports__.RspackOptionsApply, exports.RstestPlugin = __webpack_exports__.RstestPlugin, exports.RuntimeGlobals = __webpack_exports__.RuntimeGlobals, exports.RuntimeModule = __webpack_exports__.RuntimeModule, exports.RuntimePlugin = __webpack_exports__.RuntimePlugin, exports.SourceMapDevToolPlugin = __webpack_exports__.SourceMapDevToolPlugin, exports.Stats = __webpack_exports__.Stats, exports.SwcJsMinimizerRspackPlugin = __webpack_exports__.SwcJsMinimizerRspackPlugin, exports.Template = __webpack_exports__.Template, exports.ValidationError = __webpack_exports__.ValidationError, exports.WarnCaseSensitiveModulesPlugin = __webpack_exports__.WarnCaseSensitiveModulesPlugin, exports.WebpackError = __webpack_exports__.WebpackError, exports.WebpackOptionsApply = __webpack_exports__.WebpackOptionsApply, exports.config = __webpack_exports__.config, exports.container = __webpack_exports__.container, exports.default = __webpack_exports__.default, exports.electron = __webpack_exports__.electron, exports.experiments = __webpack_exports__.experiments, exports.javascript = __webpack_exports__.javascript, exports.library = __webpack_exports__.library, exports.node = __webpack_exports__.node, exports.optimize = __webpack_exports__.optimize, exports.rspack = __webpack_exports__.rspack, exports.rspackVersion = __webpack_exports__.rspackVersion, exports.sharing = __webpack_exports__.sharing, exports.sources = __webpack_exports__.sources, exports.util = __webpack_exports__.util, exports.version = __webpack_exports__.version, exports.wasm = __webpack_exports__.wasm, exports.web = __webpack_exports__.web, exports.webworker = __webpack_exports__.webworker, __webpack_exports__)-1 === [
|
13560
|
+
})(), exports.AsyncDependenciesBlock = __webpack_exports__.AsyncDependenciesBlock, exports.BannerPlugin = __webpack_exports__.BannerPlugin, exports.CircularDependencyRspackPlugin = __webpack_exports__.CircularDependencyRspackPlugin, exports.Compilation = __webpack_exports__.Compilation, exports.Compiler = __webpack_exports__.Compiler, exports.ConcatenatedModule = __webpack_exports__.ConcatenatedModule, exports.ContextModule = __webpack_exports__.ContextModule, exports.ContextReplacementPlugin = __webpack_exports__.ContextReplacementPlugin, exports.CopyRspackPlugin = __webpack_exports__.CopyRspackPlugin, exports.CssExtractRspackPlugin = __webpack_exports__.CssExtractRspackPlugin, exports.DefinePlugin = __webpack_exports__.DefinePlugin, exports.Dependency = __webpack_exports__.Dependency, exports.DllPlugin = __webpack_exports__.DllPlugin, exports.DllReferencePlugin = __webpack_exports__.DllReferencePlugin, exports.DynamicEntryPlugin = __webpack_exports__.DynamicEntryPlugin, exports.EntryDependency = __webpack_exports__.EntryDependency, exports.EntryOptionPlugin = __webpack_exports__.EntryOptionPlugin, exports.EntryPlugin = __webpack_exports__.EntryPlugin, exports.EnvironmentPlugin = __webpack_exports__.EnvironmentPlugin, exports.EvalDevToolModulePlugin = __webpack_exports__.EvalDevToolModulePlugin, exports.EvalSourceMapDevToolPlugin = __webpack_exports__.EvalSourceMapDevToolPlugin, exports.ExternalModule = __webpack_exports__.ExternalModule, exports.ExternalsPlugin = __webpack_exports__.ExternalsPlugin, exports.HotModuleReplacementPlugin = __webpack_exports__.HotModuleReplacementPlugin, exports.HtmlRspackPlugin = __webpack_exports__.HtmlRspackPlugin, exports.IgnorePlugin = __webpack_exports__.IgnorePlugin, exports.LightningCssMinimizerRspackPlugin = __webpack_exports__.LightningCssMinimizerRspackPlugin, exports.LoaderOptionsPlugin = __webpack_exports__.LoaderOptionsPlugin, exports.LoaderTargetPlugin = __webpack_exports__.LoaderTargetPlugin, exports.Module = __webpack_exports__.Module, exports.ModuleFilenameHelpers = __webpack_exports__.ModuleFilenameHelpers, exports.MultiCompiler = __webpack_exports__.MultiCompiler, exports.MultiStats = __webpack_exports__.MultiStats, exports.NoEmitOnErrorsPlugin = __webpack_exports__.NoEmitOnErrorsPlugin, exports.NormalModule = __webpack_exports__.NormalModule, exports.NormalModuleReplacementPlugin = __webpack_exports__.NormalModuleReplacementPlugin, exports.ProgressPlugin = __webpack_exports__.ProgressPlugin, exports.ProvidePlugin = __webpack_exports__.ProvidePlugin, exports.RspackOptionsApply = __webpack_exports__.RspackOptionsApply, exports.RstestPlugin = __webpack_exports__.RstestPlugin, exports.RuntimeGlobals = __webpack_exports__.RuntimeGlobals, exports.RuntimeModule = __webpack_exports__.RuntimeModule, exports.RuntimePlugin = __webpack_exports__.RuntimePlugin, exports.SourceMapDevToolPlugin = __webpack_exports__.SourceMapDevToolPlugin, exports.Stats = __webpack_exports__.Stats, exports.StatsErrorCode = __webpack_exports__.StatsErrorCode, exports.SwcJsMinimizerRspackPlugin = __webpack_exports__.SwcJsMinimizerRspackPlugin, exports.Template = __webpack_exports__.Template, exports.ValidationError = __webpack_exports__.ValidationError, exports.WarnCaseSensitiveModulesPlugin = __webpack_exports__.WarnCaseSensitiveModulesPlugin, exports.WebpackError = __webpack_exports__.WebpackError, exports.WebpackOptionsApply = __webpack_exports__.WebpackOptionsApply, exports.config = __webpack_exports__.config, exports.container = __webpack_exports__.container, exports.default = __webpack_exports__.default, exports.electron = __webpack_exports__.electron, exports.experiments = __webpack_exports__.experiments, exports.javascript = __webpack_exports__.javascript, exports.library = __webpack_exports__.library, exports.node = __webpack_exports__.node, exports.optimize = __webpack_exports__.optimize, exports.rspack = __webpack_exports__.rspack, exports.rspackVersion = __webpack_exports__.rspackVersion, exports.sharing = __webpack_exports__.sharing, exports.sources = __webpack_exports__.sources, exports.util = __webpack_exports__.util, exports.version = __webpack_exports__.version, exports.wasm = __webpack_exports__.wasm, exports.web = __webpack_exports__.web, exports.webworker = __webpack_exports__.webworker, __webpack_exports__)-1 === [
|
13488
13561
|
"AsyncDependenciesBlock",
|
13489
13562
|
"BannerPlugin",
|
13490
13563
|
"CircularDependencyRspackPlugin",
|
@@ -13530,6 +13603,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
13530
13603
|
"RuntimePlugin",
|
13531
13604
|
"SourceMapDevToolPlugin",
|
13532
13605
|
"Stats",
|
13606
|
+
"StatsErrorCode",
|
13533
13607
|
"SwcJsMinimizerRspackPlugin",
|
13534
13608
|
"Template",
|
13535
13609
|
"ValidationError",
|