@rspack/core 1.3.14 → 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.
Files changed (53) hide show
  1. package/compiled/@swc/types/index.d.ts +18 -2
  2. package/compiled/@swc/types/package.json +1 -1
  3. package/compiled/tinypool/README.md +4 -196
  4. package/compiled/tinypool/dist/common-Qw-RoVFD.js +28 -0
  5. package/compiled/tinypool/dist/entry/process.d.ts +1 -2
  6. package/compiled/tinypool/dist/entry/process.js +63 -83
  7. package/compiled/tinypool/dist/entry/utils.d.ts +3 -1
  8. package/compiled/tinypool/dist/entry/utils.js +3 -9
  9. package/compiled/tinypool/dist/entry/worker.d.ts +1 -2
  10. package/compiled/tinypool/dist/entry/worker.js +66 -94
  11. package/compiled/tinypool/dist/index.d.ts +132 -125
  12. package/compiled/tinypool/dist/index.js +771 -1035
  13. package/compiled/tinypool/dist/utils-B--2TaWv.js +38 -0
  14. package/compiled/tinypool/dist/utils-De75vAgL.js +10 -0
  15. package/compiled/tinypool/package.json +6 -22
  16. package/compiled/webpack-sources/index.js +112 -132
  17. package/compiled/webpack-sources/package.json +1 -1
  18. package/compiled/webpack-sources/types.d.ts +8 -6
  19. package/compiled/zod/dist/types/v4/classic/schemas.d.ts +19 -14
  20. package/compiled/zod/dist/types/v4/core/api.d.ts +5 -4
  21. package/compiled/zod/dist/types/v4/core/checks.d.ts +1 -1
  22. package/compiled/zod/dist/types/v4/core/core.d.ts +1 -1
  23. package/compiled/zod/dist/types/v4/core/registries.d.ts +3 -1
  24. package/compiled/zod/dist/types/v4/core/schemas.d.ts +33 -39
  25. package/compiled/zod/dist/types/v4/core/to-json-schema.d.ts +2 -2
  26. package/compiled/zod/dist/types/v4/core/util.d.ts +1 -1
  27. package/compiled/zod/dist/types/v4/locales/index.d.ts +1 -0
  28. package/compiled/zod/dist/types/v4/locales/ps.d.ts +4 -0
  29. package/compiled/zod/dist/types/v4/mini/schemas.d.ts +77 -125
  30. package/compiled/zod/index.js +33 -33
  31. package/compiled/zod/package.json +1 -1
  32. package/dist/BuildInfo.d.ts +17 -0
  33. package/dist/FileSystem.d.ts +26 -3
  34. package/dist/Module.d.ts +1 -13
  35. package/dist/Resolver.d.ts +2 -1
  36. package/dist/builtin-loader/swc/types.d.ts +255 -255
  37. package/dist/config/devServer.d.ts +10 -10
  38. package/dist/config/normalization.d.ts +1 -0
  39. package/dist/config/types.d.ts +10 -1
  40. package/dist/config/utils.d.ts +1 -0
  41. package/dist/config/zod.d.ts +1638 -1068
  42. package/dist/cssExtractLoader.js +5 -5
  43. package/dist/exports.d.ts +2 -1
  44. package/dist/index.js +550 -473
  45. package/dist/loader-runner/index.d.ts +0 -9
  46. package/dist/trace/index.d.ts +16 -18
  47. package/dist/worker.js +2 -2
  48. package/module.d.ts +1 -1
  49. package/package.json +9 -9
  50. package/compiled/tinypool/dist/chunk-6LX4VMOV.js +0 -31
  51. package/compiled/tinypool/dist/chunk-ACQHDOFQ.js +0 -12
  52. package/compiled/tinypool/dist/chunk-E2J7JLFN.js +0 -53
  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
- RstestPlugin: ()=>RstestPlugin,
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
- Compiler: ()=>Compiler,
293
- MultiCompiler: ()=>MultiCompiler,
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
- version: ()=>exports_version,
297
- CircularDependencyRspackPlugin: ()=>CircularDependencyRspackPlugin,
310
+ HotModuleReplacementPlugin: ()=>HotModuleReplacementPlugin,
311
+ Dependency: ()=>binding_.Dependency,
312
+ LoaderTargetPlugin: ()=>LoaderTargetPlugin,
298
313
  sharing: ()=>sharing,
299
- config: ()=>exports_config,
300
314
  container: ()=>container,
301
- LightningCssMinimizerRspackPlugin: ()=>LightningCssMinimizerRspackPlugin,
315
+ sources: ()=>sources,
316
+ EvalDevToolModulePlugin: ()=>EvalDevToolModulePlugin,
302
317
  SwcJsMinimizerRspackPlugin: ()=>SwcJsMinimizerRspackPlugin,
303
- optimize: ()=>optimize,
304
- RuntimeModule: ()=>RuntimeModule,
305
- HtmlRspackPlugin: ()=>HtmlRspackPlugin,
306
- ValidationError: ()=>validate_ValidationError,
307
- DynamicEntryPlugin: ()=>DynamicEntryPlugin,
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
- ProgressPlugin: ()=>ProgressPlugin,
314
- SourceMapDevToolPlugin: ()=>SourceMapDevToolPlugin,
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
- LoaderTargetPlugin: ()=>LoaderTargetPlugin,
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
- AsyncDependenciesBlock: ()=>binding_.AsyncDependenciesBlock,
337
- WebpackError: ()=>exports_WebpackError,
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
- RuntimeGlobals: ()=>RuntimeGlobals
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: ()=>lib_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 WebpackError = class extends Error {
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, "loc" in err && (err.loc = JSON.stringify(err.loc)), err);
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 WebpackError(wholeErr.message);
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 WebpackError(errMsg) : null, module);
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 WebpackError {
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 WebpackError ? error : new HookWebpackError(error, hook), makeWebpackErrorCallback = (callback, hook)=>(err, result)=>{
2176
- if (err) return err instanceof WebpackError ? void callback(err) : void callback(new HookWebpackError(err, hook));
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 WebpackError) throw err;
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 Cache_Cache {
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 WebpackError {
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 CacheFacade {
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 CacheFacade(this._cache, `${this._name}|${name}`, this._hashFunction);
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 && ThreadsafeOutputNodeFS.__to_binding_stat(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 && ThreadsafeOutputNodeFS.__to_binding_stat(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 = 100;
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
- let hrtime = process.hrtime();
3073
- this.startTime = 1000000 * hrtime[0] + Math.round(hrtime[1] / 1000);
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
- "chrome" === this.layer && (this.session.connect(), this.session.post("Profiler.enable"), this.session.post("Profiler.start"));
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.includes("chrome")) return;
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 && (this.pushEvent({
3083
- name: "Profile",
3084
- ph: "P",
3085
- id: 1,
3086
- ...this.getCommonEv(),
3087
- cat: "disabled-by-default-v8.cpu_profiler",
3088
- pid: 3,
3089
- args: {
3090
- data: {
3091
- startTime: 0
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
- }), this.pushEvent({
3095
- name: "ProfileChunk",
3096
- ph: "P",
3097
- id: 1,
3098
- ...this.getCommonEv(),
3099
- cat: "disabled-by-default-v8.cpu_profiler",
3100
- pid: 3,
3101
- args: {
3102
- data: {
3103
- cpuProfile: cpu_profile,
3104
- timeDeltas: cpu_profile.timeDeltas
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
- let hrtime = process.hrtime();
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
- !event.id2 && event.args?.id2 && (event.id2 = {
3137
- local: event.args.id2
3138
- }), this.events.push(event);
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
- "chrome" === this.layer && this.pushEvent({
3266
+ this.layer && this.pushEvent({
3142
3267
  ...this.getCommonEv(),
3143
- ph: "b",
3144
- ...events
3268
+ ...events,
3269
+ ph: "b"
3145
3270
  });
3146
3271
  }
3147
3272
  static endAsync(events) {
3148
- "chrome" === this.layer && this.pushEvent({
3273
+ this.layer && this.pushEvent({
3149
3274
  ...this.getCommonEv(),
3150
- ph: "e",
3151
- ...events
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: `run_js_loaders${pitch ? ":pitch" : ":normal"}`,
3517
+ name: "run_js_loaders",
3518
+ processName: LOADER_PROCESS_NAME,
3519
+ uuid,
3520
+ ph: "b",
3393
3521
  args: {
3394
- id2: resource
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
- id2: resource
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
- id2: resource
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
- id2: resource
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: `js_loader:${pitch ? "pitch:" : ""}${loaderName}`,
3639
- cat: "rspack",
3776
+ name: loaderName,
3777
+ trackName: loaderName,
3778
+ processName: LOADER_PROCESS_NAME,
3779
+ uuid,
3640
3780
  args: {
3641
- id2: resource,
3642
- "loader.request": currentLoaderObject?.request
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: `js_loader:${pitch ? "pitch:" : ""}${loaderName}`,
3903
+ name: loaderName,
3904
+ trackName: loaderName,
3905
+ processName: LOADER_PROCESS_NAME,
3906
+ uuid,
3764
3907
  args: {
3765
- id2: resource,
3766
- "loader.request": currentLoaderObject?.request
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: `run_js_loaders${pitch ? ":pitch" : ":normal"}`,
3975
+ name: "run_js_loaders",
3976
+ uuid,
3833
3977
  args: {
3834
- id2: resource
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 EntryOptionPlugin {
4657
+ class EntryOptionPlugin_EntryOptionPlugin {
4511
4658
  apply(compiler) {
4512
- compiler.hooks.entryOption.tap("EntryOptionPlugin", (context, entry)=>(EntryOptionPlugin.applyEntryOption(compiler, context, entry), !0));
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 = EntryOptionPlugin.entryDescriptionToOptions(compiler, name, desc);
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 lib_EntryOptionPlugin = EntryOptionPlugin, EntryPlugin = base_create(binding_.BuiltinPluginName.EntryPlugin, (context, entry, options = "")=>({
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 = lib_EntryOptionPlugin.entryDescriptionToOptions(compiler, name, desc);
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(), templateRenderFunction = zod_index_js_namespaceObject.z.function().args(zod_index_js_namespaceObject.z.record(zod_index_js_namespaceObject.z.string(), zod_index_js_namespaceObject.z.any())).returns(zod_index_js_namespaceObject.z.string().or(zod_index_js_namespaceObject.z.promise(zod_index_js_namespaceObject.z.string()))), templateParamFunction = zod_index_js_namespaceObject.z.function().args(zod_index_js_namespaceObject.z.record(zod_index_js_namespaceObject.z.string(), zod_index_js_namespaceObject.z.any())).returns(zod_index_js_namespaceObject.z.record(zod_index_js_namespaceObject.z.string(), zod_index_js_namespaceObject.z.any()).or(zod_index_js_namespaceObject.z.promise(zod_index_js_namespaceObject.z.record(zod_index_js_namespaceObject.z.string(), zod_index_js_namespaceObject.z.any())))), templateFilenameFunction = zod_index_js_namespaceObject.z.function().args(zod_index_js_namespaceObject.z.string()).returns(zod_index_js_namespaceObject.z.string()), pluginOptionsSchema = zod_index_js_namespaceObject.z.object({
4860
- filename: zod_index_js_namespaceObject.z.string().or(templateFilenameFunction).optional(),
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(templateRenderFunction).optional(),
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(templateParamFunction).optional(),
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: zod_index_js_namespaceObject.z.function(zod_index_js_namespaceObject.z.tuple([
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", !1), D(experiments.incremental, "providedExports", !1), D(experiments.incremental, "dependenciesDiagnostics", !1), D(experiments.incremental, "sideEffects", !1), D(experiments.incremental, "buildChunkGraph", !1), D(experiments.incremental, "moduleIds", !1), D(experiments.incremental, "chunkIds", !1), D(experiments.incremental, "modulesHashes", !1), D(experiments.incremental, "modulesCodegen", !1), D(experiments.incremental, "modulesRuntimeRequirements", !1), D(experiments.incremental, "chunksRuntimeRequirements", !1), D(experiments.incremental, "chunksHashes", !1), D(experiments.incremental, "chunksRender", !1), D(experiments.incremental, "emitAssets", !0)), D(experiments, "rspackFuture", {}), D(experiments, "parallelCodeSplitting", !0), D(experiments, "parallelLoader", !1);
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.3.14"), D(rspackFuture.bundlerInfo, "bundler", "rspack"), D(rspackFuture.bundlerInfo, "force", !library)));
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: !0,
7196
- providedExports: !0,
7197
- dependenciesDiagnostics: !0,
7198
- sideEffects: !0,
7199
- buildChunkGraph: !0,
7200
- moduleIds: !0,
7201
- chunkIds: !0,
7202
- modulesHashes: !0,
7203
- modulesCodegen: !0,
7204
- modulesRuntimeRequirements: !0,
7205
- chunksRuntimeRequirements: !0,
7206
- chunksHashes: !0,
7207
- chunksRender: !0,
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
- return !0 === incremental || "advance-silent" === incremental ? advanceSilent : "advance" === incremental ? (advanceSilent.silent = !1, advanceSilent) : incremental;
7211
- }, 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)=>({
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), {});
@@ -7217,6 +7464,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
7217
7464
  };
7218
7465
  class Resolver {
7219
7466
  binding;
7467
+ #childCache = new WeakMap();
7220
7468
  constructor(binding){
7221
7469
  this.binding = binding;
7222
7470
  }
@@ -7227,13 +7475,15 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
7227
7475
  resolve(context, path, request, resolveContext, callback) {
7228
7476
  this.binding.resolve(path, request, (error, data)=>callback(error, data?.resource, data));
7229
7477
  }
7230
- withOptions({ dependencyCategory, resolveToContext, ...resolve }) {
7231
- let rawResolve = getRawResolve(resolve);
7232
- return new Resolver(this.binding.withOptions({
7478
+ withOptions(options) {
7479
+ let cacheEntry = this.#childCache.get(options);
7480
+ if (void 0 !== cacheEntry) return cacheEntry;
7481
+ let { dependencyCategory, resolveToContext, ...resolve } = options, rawResolve = getRawResolve(resolve), resolver = new Resolver(this.binding.withOptions({
7233
7482
  dependencyCategory,
7234
7483
  resolveToContext,
7235
7484
  ...rawResolve
7236
7485
  }));
7486
+ return this.#childCache.set(options, resolver), resolver;
7237
7487
  }
7238
7488
  }
7239
7489
  class ResolverFactory {
@@ -7421,7 +7671,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
7421
7671
  },
7422
7672
  arm: "gnueabihf"
7423
7673
  }
7424
- }, BINDING_VERSION = __webpack_require__("@rspack/binding/package.json").version, CORE_VERSION = "1.3.14", getAddonPlatformArchAbi = ()=>{
7674
+ }, BINDING_VERSION = __webpack_require__("@rspack/binding/package.json").version, CORE_VERSION = "1.4.0-beta.0", getAddonPlatformArchAbi = ()=>{
7425
7675
  let { platform, arch } = process, binding = "";
7426
7676
  binding += platform;
7427
7677
  let abi = NodePlatformArchToAbi[platform][arch];
@@ -7981,50 +8231,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
7981
8231
  });
7982
8232
  }
7983
8233
  }
7984
- let $assets = Symbol("assets");
7985
- Object.defineProperty(binding_.KnownBuildInfo.prototype, "assets", {
7986
- enumerable: !0,
7987
- configurable: !0,
7988
- get () {
7989
- if (this._assets[$assets]) return this._assets[$assets];
7990
- let assets = new Proxy(Object.create(null), {
7991
- ownKeys: ()=>this._assets.keys(),
7992
- getOwnPropertyDescriptor: ()=>({
7993
- enumerable: !0,
7994
- configurable: !0
7995
- })
7996
- });
7997
- return Object.defineProperty(this._assets, $assets, {
7998
- enumerable: !1,
7999
- configurable: !0,
8000
- value: assets
8001
- }), assets;
8002
- }
8003
- }), Object.defineProperty(binding_.KnownBuildInfo.prototype, "fileDependencies", {
8004
- enumerable: !0,
8005
- configurable: !0,
8006
- get () {
8007
- return new Set(this._fileDependencies);
8008
- }
8009
- }), Object.defineProperty(binding_.KnownBuildInfo.prototype, "contextDependencies", {
8010
- enumerable: !0,
8011
- configurable: !0,
8012
- get () {
8013
- return new Set(this._contextDependencies);
8014
- }
8015
- }), Object.defineProperty(binding_.KnownBuildInfo.prototype, "missingDependencies", {
8016
- enumerable: !0,
8017
- configurable: !0,
8018
- get () {
8019
- return new Set(this._missingDependencies);
8020
- }
8021
- }), Object.defineProperty(binding_.KnownBuildInfo.prototype, "buildDependencies", {
8022
- enumerable: !0,
8023
- configurable: !0,
8024
- get () {
8025
- return new Set(this._buildDependencies);
8026
- }
8027
- }), Object.defineProperty(binding_.Module.prototype, "identifier", {
8234
+ Object.defineProperty(binding_.Module.prototype, "identifier", {
8028
8235
  enumerable: !0,
8029
8236
  configurable: !0,
8030
8237
  value () {
@@ -8179,7 +8386,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
8179
8386
  await queried.promise(data, {});
8180
8387
  };
8181
8388
  })
8182
- }), traceHookPlugin_PLUGIN_NAME = "TraceHookPlugin", makeInterceptorFor = (compilerName, tracer)=>(hookName)=>({
8389
+ }), traceHookPlugin_PLUGIN_NAME = "TraceHookPlugin", PLUGIN_PROCESS_NAME = "Plugin Analysis", makeInterceptorFor = (compilerName, tracer)=>(hookName)=>({
8183
8390
  register: (tapInfo)=>{
8184
8391
  let { name, type, fn: internalFn } = tapInfo, newFn = name === traceHookPlugin_PLUGIN_NAME ? internalFn : makeNewTraceTapFn(compilerName, hookName, tracer, {
8185
8392
  name,
@@ -8197,25 +8404,26 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
8197
8404
  hook && !hook._fakeHook && hook.intercept(makeInterceptorFor(logLabel, tracer)(hookName));
8198
8405
  }
8199
8406
  }, makeNewTraceTapFn = (compilerName, hookName, tracer, { name: pluginName, type, fn })=>{
8200
- let name = `${pluginName}:${hookName}`;
8201
8407
  switch(type){
8202
8408
  case "promise":
8203
8409
  return (...args)=>{
8204
- let id2 = tracer.counter++;
8410
+ let uuid = tracer.uuid();
8205
8411
  return tracer.startAsync({
8206
- name,
8207
- id: pluginName,
8412
+ name: hookName,
8413
+ trackName: pluginName,
8414
+ processName: PLUGIN_PROCESS_NAME,
8415
+ uuid,
8208
8416
  args: {
8209
- id2,
8210
8417
  compilerName,
8211
8418
  hookName,
8212
8419
  pluginName
8213
8420
  }
8214
8421
  }), fn(...args).then((r)=>(tracer.endAsync({
8215
- name,
8216
- id: pluginName,
8422
+ name: hookName,
8423
+ trackName: pluginName,
8424
+ processName: PLUGIN_PROCESS_NAME,
8425
+ uuid,
8217
8426
  args: {
8218
- id2,
8219
8427
  compilerName,
8220
8428
  hookName,
8221
8429
  pluginName
@@ -8224,12 +8432,13 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
8224
8432
  };
8225
8433
  case "async":
8226
8434
  return (...args)=>{
8227
- let id2 = tracer.counter++;
8435
+ let uuid = tracer.uuid();
8228
8436
  tracer.startAsync({
8229
- name,
8230
- id: pluginName,
8437
+ name: hookName,
8438
+ trackName: pluginName,
8439
+ processName: PLUGIN_PROCESS_NAME,
8440
+ uuid,
8231
8441
  args: {
8232
- id2,
8233
8442
  compilerName,
8234
8443
  hookName,
8235
8444
  pluginName
@@ -8238,10 +8447,11 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
8238
8447
  let callback = args.pop();
8239
8448
  fn(...args, (...r)=>{
8240
8449
  tracer.endAsync({
8241
- name,
8242
- id: pluginName,
8450
+ name: hookName,
8451
+ trackName: pluginName,
8452
+ processName: PLUGIN_PROCESS_NAME,
8453
+ uuid,
8243
8454
  args: {
8244
- id2,
8245
8455
  compilerName,
8246
8456
  hookName,
8247
8457
  pluginName
@@ -8251,13 +8461,14 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
8251
8461
  };
8252
8462
  case "sync":
8253
8463
  return (...args)=>{
8254
- let r, id2 = tracer.counter++;
8255
- if (name === traceHookPlugin_PLUGIN_NAME) return fn(...args);
8464
+ let r, uuid = tracer.uuid();
8465
+ if (pluginName === traceHookPlugin_PLUGIN_NAME) return fn(...args);
8256
8466
  tracer.startAsync({
8257
- name,
8258
- id: pluginName,
8467
+ name: hookName,
8468
+ trackName: pluginName,
8469
+ processName: PLUGIN_PROCESS_NAME,
8470
+ uuid,
8259
8471
  args: {
8260
- id2,
8261
8472
  compilerName,
8262
8473
  hookName,
8263
8474
  pluginName
@@ -8267,20 +8478,22 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
8267
8478
  r = fn(...args);
8268
8479
  } catch (err) {
8269
8480
  throw tracer.endAsync({
8270
- name,
8271
- id: pluginName,
8481
+ name: hookName,
8482
+ trackName: pluginName,
8483
+ processName: PLUGIN_PROCESS_NAME,
8484
+ uuid,
8272
8485
  args: {
8273
- id2: compilerName,
8274
8486
  hookName,
8275
8487
  pluginName
8276
8488
  }
8277
8489
  }), err;
8278
8490
  }
8279
8491
  return tracer.endAsync({
8280
- name,
8281
- id: pluginName,
8492
+ name: hookName,
8493
+ trackName: pluginName,
8494
+ processName: PLUGIN_PROCESS_NAME,
8495
+ uuid,
8282
8496
  args: {
8283
- id2,
8284
8497
  compilerName,
8285
8498
  hookName,
8286
8499
  pluginName
@@ -8429,7 +8642,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
8429
8642
  "entry"
8430
8643
  ]),
8431
8644
  additionalPass: new lite_tapable_namespaceObject.AsyncSeriesHook([])
8432
- }, 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_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);
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);
8433
8646
  }
8434
8647
  get recordsInputPath() {
8435
8648
  return unsupported("Compiler.recordsInputPath");
@@ -8453,7 +8666,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
8453
8666
  return this.#ruleSet;
8454
8667
  }
8455
8668
  getCache(name) {
8456
- return new CacheFacade(this.cache, `${this.compilerPath}${name}`, this.options.output.hashFunction);
8669
+ return new CacheFacade_CacheFacade(this.cache, `${this.compilerPath}${name}`, this.options.output.hashFunction);
8457
8670
  }
8458
8671
  getInfrastructureLogger(name) {
8459
8672
  if (!name) throw TypeError("Compiler.getInfrastructureLogger(name) called without a name");
@@ -8486,7 +8699,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
8486
8699
  let startTime = Date.now();
8487
8700
  this.running = !0;
8488
8701
  let instanceBinding = __webpack_require__("@rspack/binding"), isRuntimeShutdown = !1, finalCallback = (err, stats)=>{
8489
- 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(), instanceBinding.cleanupGlobalTrace();
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();
8490
8703
  }, onCompiled = (err, _compilation)=>{
8491
8704
  if (err) return finalCallback(err);
8492
8705
  if (_compilation.hooks.needAdditionalPass.call()) {
@@ -8620,10 +8833,12 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
8620
8833
  let error = checkVersion();
8621
8834
  if (error) return callback(error);
8622
8835
  if (this.#instance) return callback(null, this.#instance);
8623
- let rawOptions = getRawOptions(this.options, this);
8836
+ let options = this.options, rawOptions = getRawOptions(options, this);
8624
8837
  rawOptions.__references = Object.fromEntries(this.#ruleSet.builtinReferences.entries());
8625
8838
  let instanceBinding = __webpack_require__("@rspack/binding");
8626
- this.#registers = this.#createHooksRegisters(), 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, ResolverFactory.__to_binding(this.resolverFactory)), callback(null, this.#instance);
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);
8627
8842
  }
8628
8843
  #createHooksRegisters() {
8629
8844
  let ref = new WeakRef(this), getCompiler = ()=>ref.deref(), createTap = this.#createHookRegisterTaps.bind(this), createMapTap = this.#createHookMapRegisterTaps.bind(this);
@@ -8761,7 +8976,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
8761
8976
  obj.children = this.stats.map((stat, idx)=>{
8762
8977
  let obj = stat.toJson(childOptions.children[idx]), compilationName = stat.compilation.name;
8763
8978
  return obj.name = compilationName && makePathsRelative(childOptions.context, compilationName, stat.compilation.compiler.root), obj;
8764
- }), childOptions.version && (obj.rspackVersion = "1.3.14", obj.version = "5.75.0"), childOptions.hash && (obj.hash = obj.children.map((j)=>j.hash).join(""));
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(""));
8765
8980
  let mapError = (j, obj)=>({
8766
8981
  ...obj,
8767
8982
  compilerPath: obj.compilerPath ? `${j.name}.${obj.compilerPath}` : j.name
@@ -8838,7 +9053,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
8838
9053
  }
8839
9054
  };
8840
9055
  ArrayQueue_computedKey = Symbol.iterator;
8841
- let util_ArrayQueue = class {
9056
+ let ArrayQueue = class {
8842
9057
  _list;
8843
9058
  _listReversed;
8844
9059
  constructor(items){
@@ -8991,7 +9206,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
8991
9206
  node.parents.push(parent), parent.children.push(node);
8992
9207
  }
8993
9208
  }
8994
- let queue = new util_ArrayQueue();
9209
+ let queue = new ArrayQueue();
8995
9210
  for (let node of nodes)0 === node.parents.length && (node.state = "queued", queue.enqueue(node));
8996
9211
  let errored = !1, running = 0, parallelism = this._options.parallelism, nodeDone = (node, err, stats)=>{
8997
9212
  if (!errored) {
@@ -9055,7 +9270,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
9055
9270
  }
9056
9271
  let graceful_fs_index_js_namespaceObject = require("../compiled/graceful-fs/index.js");
9057
9272
  var graceful_fs_index_js_default = __webpack_require__.n(graceful_fs_index_js_namespaceObject);
9058
- let IgnoreWarningsPlugin = class {
9273
+ let lib_IgnoreWarningsPlugin = class {
9059
9274
  _ignorePattern;
9060
9275
  name = "IgnoreWarningsPlugin";
9061
9276
  constructor(ignorePattern){
@@ -9073,7 +9288,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
9073
9288
  let cache = new Map();
9074
9289
  compiler.cache.hooks.store.tap({
9075
9290
  name: MemoryCachePlugin.PLUGIN_NAME,
9076
- stage: Cache_Cache.STAGE_MEMORY
9291
+ stage: Cache.STAGE_MEMORY
9077
9292
  }, (identifier, etag, data)=>{
9078
9293
  let dataEtag = "function" == typeof etag?.toString ? etag.toString() : etag;
9079
9294
  cache.set(identifier, {
@@ -9082,7 +9297,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
9082
9297
  });
9083
9298
  }), compiler.cache.hooks.get.tap({
9084
9299
  name: MemoryCachePlugin.PLUGIN_NAME,
9085
- stage: Cache_Cache.STAGE_MEMORY
9300
+ stage: Cache.STAGE_MEMORY
9086
9301
  }, (identifier, etag, gotHandlers)=>{
9087
9302
  let cacheEntry = cache.get(identifier), dataEtag = "function" == typeof etag?.toString ? etag.toString() : etag;
9088
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, {
@@ -9091,12 +9306,13 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
9091
9306
  }), callback(null)));
9092
9307
  }), compiler.cache.hooks.shutdown.tap({
9093
9308
  name: MemoryCachePlugin.PLUGIN_NAME,
9094
- stage: Cache_Cache.STAGE_MEMORY
9309
+ stage: Cache.STAGE_MEMORY
9095
9310
  }, ()=>{
9096
9311
  cache.clear();
9097
9312
  });
9098
9313
  }
9099
9314
  }
9315
+ var statsFactoryUtils_StatsErrorCode = ((StatsErrorCode = {}).ChunkMinificationError = "ChunkMinificationError", StatsErrorCode.ChunkMinificationWarning = "ChunkMinificationWarning", StatsErrorCode.ModuleParseError = "ModuleParseError", StatsErrorCode.ModuleParseWarning = "ModuleParseWarning", StatsErrorCode.ModuleBuildError = "ModuleBuildError", StatsErrorCode);
9100
9316
  let iterateConfig = (config, options, fn)=>{
9101
9317
  for (let hookFor of Object.keys(config)){
9102
9318
  let subConfig = config[hookFor];
@@ -9651,7 +9867,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
9651
9867
  object.hash = context.getStatsCompilation(compilation).hash;
9652
9868
  },
9653
9869
  version: (object)=>{
9654
- object.version = "5.75.0", object.rspackVersion = "1.3.14";
9870
+ object.version = "5.75.0", object.rspackVersion = "1.4.0-beta.0";
9655
9871
  },
9656
9872
  env: (object, _compilation, _context, { _env })=>{
9657
9873
  object.env = _env;
@@ -10990,7 +11206,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
10990
11206
  moduleFilenameTemplate: options.output.devtoolModuleFilenameTemplate,
10991
11207
  namespace: options.output.devtoolNamespace
10992
11208
  }).apply(compiler);
10993
- 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 lib_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);
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);
10994
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);
10995
11211
  let moduleIds = options.optimization.moduleIds;
10996
11212
  if (moduleIds) switch(moduleIds){
@@ -11035,7 +11251,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
11035
11251
  }).apply(compiler);
11036
11252
  let { minimize, minimizer } = options.optimization;
11037
11253
  if (minimize && minimizer) for (let item of minimizer)"function" == typeof item ? item.call(compiler, compiler) : "..." !== item && item && item.apply(compiler);
11038
- 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 IgnoreWarningsPlugin(options.ignoreWarnings).apply(compiler), compiler.hooks.afterPlugins.call(compiler), !compiler.inputFileSystem) throw Error("No input filesystem provided");
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");
11039
11255
  compiler.hooks.afterResolvers.call(compiler);
11040
11256
  }
11041
11257
  }
@@ -11238,7 +11454,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
11238
11454
  });
11239
11455
  }
11240
11456
  }
11241
- class DllManifestError extends WebpackError {
11457
+ class DllManifestError extends lib_WebpackError {
11242
11458
  constructor(filename, message){
11243
11459
  super(), this.name = "DllManifestError", this.message = `Dll manifest ${filename}\n${message}`;
11244
11460
  }
@@ -11254,7 +11470,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
11254
11470
  for (let key of this.keys){
11255
11471
  let value = void 0 !== process.env[key] ? process.env[key] : this.defaultValues[key];
11256
11472
  void 0 === value && compiler.hooks.thisCompilation.tap("EnvironmentPlugin", (compilation)=>{
11257
- let error = new 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.`);
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.`);
11258
11474
  error.name = "EnvVariableNotDefinedError", compilation.errors.push(error);
11259
11475
  }), definitions[`process.env.${key}`] = void 0 === value ? "undefined" : JSON.stringify(value);
11260
11476
  }
@@ -11917,113 +12133,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
11917
12133
  rspackExperiments: zod_index_js_namespaceObject.z.strictObject({
11918
12134
  import: ZodSwcPluginImportConfig.optional()
11919
12135
  }).optional()
11920
- });
11921
- class RspackZodUnion extends zod_index_js_namespaceObject.z.ZodUnion {
11922
- _parse(input) {
11923
- let dirty, { ctx } = this._processInputParams(input), options = this._def.options;
11924
- if (ctx.common.async) return Promise.all(options.map(async (option)=>{
11925
- let childCtx = {
11926
- ...ctx,
11927
- common: {
11928
- ...ctx.common,
11929
- issues: []
11930
- },
11931
- parent: ctx
11932
- };
11933
- return {
11934
- result: await option._parseAsync({
11935
- data: ctx.data,
11936
- path: ctx.path,
11937
- parent: childCtx
11938
- }),
11939
- ctx: childCtx
11940
- };
11941
- })).then(function(results) {
11942
- for (let result of results)if ("valid" === result.result.status) return result.result;
11943
- for (let result of results)if ("dirty" === result.result.status) return ctx.common.issues.push(...result.ctx.common.issues), result.result;
11944
- let unionErrors = results.map((result)=>new zod_index_js_namespaceObject.ZodError(result.ctx.common.issues));
11945
- return (0, zod_index_js_namespaceObject.addIssueToContext)(ctx, {
11946
- code: zod_index_js_namespaceObject.ZodIssueCode.invalid_union,
11947
- unionErrors
11948
- }), zod_index_js_namespaceObject.INVALID;
11949
- });
11950
- let issues = [];
11951
- for (let option of options){
11952
- let childCtx = {
11953
- ...ctx,
11954
- common: {
11955
- ...ctx.common,
11956
- issues: []
11957
- },
11958
- parent: ctx
11959
- }, result = option._parseSync({
11960
- data: ctx.data,
11961
- path: ctx.path,
11962
- parent: childCtx
11963
- });
11964
- if ("valid" === result.status) return result;
11965
- "dirty" !== result.status || dirty || (dirty = {
11966
- result,
11967
- ctx: childCtx
11968
- }), childCtx.common.issues.length && issues.push(childCtx.common.issues);
11969
- }
11970
- if (dirty) return ctx.common.issues.push(...dirty.ctx.common.issues), dirty.result;
11971
- let unionErrors = issues.map((issues)=>new zod_index_js_namespaceObject.ZodError(issues));
11972
- return (0, zod_index_js_namespaceObject.addIssueToContext)(ctx, {
11973
- code: zod_index_js_namespaceObject.ZodIssueCode.invalid_union,
11974
- unionErrors
11975
- }), zod_index_js_namespaceObject.INVALID;
11976
- }
11977
- static create = (types, params)=>new RspackZodUnion({
11978
- options: types,
11979
- typeName: zod_index_js_namespaceObject.ZodFirstPartyTypeKind.ZodUnion,
11980
- ...function(params) {
11981
- if (!params) return {};
11982
- let { errorMap, invalid_type_error, required_error, description } = params;
11983
- if (errorMap && (invalid_type_error || required_error)) throw Error('Can\'t use "invalid_type_error" or "required_error" in conjunction with custom error map.');
11984
- return errorMap ? {
11985
- errorMap: errorMap,
11986
- description
11987
- } : {
11988
- errorMap: (iss, ctx)=>{
11989
- let { message } = params;
11990
- return "invalid_enum_value" === iss.code ? {
11991
- message: message ?? ctx.defaultError
11992
- } : void 0 === ctx.data ? {
11993
- message: message ?? required_error ?? ctx.defaultError
11994
- } : "invalid_type" !== iss.code ? {
11995
- message: ctx.defaultError
11996
- } : {
11997
- message: message ?? invalid_type_error ?? ctx.defaultError
11998
- };
11999
- },
12000
- description
12001
- };
12002
- }(params)
12003
- });
12004
- }
12005
- zod_index_js_namespaceObject.ZodUnion.create = RspackZodUnion.create;
12006
- class ZodRspackCrossChecker extends zod_index_js_namespaceObject.ZodType {
12007
- params;
12008
- constructor(params){
12009
- super(params), this.params = params;
12010
- }
12011
- _parse(input) {
12012
- let ctx = this._getOrReturnCtx(input), root = this._getRootData(ctx);
12013
- for (let pattern of this.params.patterns)if (pattern.test(root, input)) {
12014
- let res = pattern.type._parse(input);
12015
- for (let issue of "function" == typeof pattern.issue ? pattern.issue(res, root, input) : [])(0, zod_index_js_namespaceObject.addIssueToContext)(ctx, issue);
12016
- return res;
12017
- }
12018
- return this.params.default._parse(input);
12019
- }
12020
- _getRootData(ctx) {
12021
- let root = ctx;
12022
- for(; root.parent;)root = root.parent;
12023
- return root.data;
12024
- }
12025
- }
12026
- 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)=>({
12027
12137
  message: `The provided value ${JSON.stringify(val)} must be an absolute path.`
12028
12138
  })), zod_mode = zod_index_js_namespaceObject.z.enum([
12029
12139
  "development",
@@ -12095,13 +12205,13 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
12095
12205
  library: libraryOptions.optional(),
12096
12206
  dependOn: entryDependOn.optional(),
12097
12207
  layer: zod_layer.optional()
12098
- }), entryStatic = zod_index_js_namespaceObject.z.record(zod_index_js_namespaceObject.z.string(), entryItem.or(entryDescription)).or(entryItem), entryDynamic = zod_index_js_namespaceObject.z.function().returns(entryStatic.or(zod_index_js_namespaceObject.z.promise(entryStatic))), zod_entry = entryStatic.or(entryDynamic), 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([
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([
12099
12209
  "anonymous",
12100
12210
  "use-credentials"
12101
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([
12102
12212
  zod_index_js_namespaceObject.z.boolean(),
12103
12213
  zod_index_js_namespaceObject.z.strictObject({
12104
- keep: zod_index_js_namespaceObject.z.instanceof(RegExp).or(zod_index_js_namespaceObject.z.string()).or(zod_index_js_namespaceObject.z.function().args(zod_index_js_namespaceObject.z.string()).returns(zod_index_js_namespaceObject.z.boolean())).optional()
12214
+ keep: zod_index_js_namespaceObject.z.instanceof(RegExp).or(zod_index_js_namespaceObject.z.string()).or(anyFunction).optional()
12105
12215
  })
12106
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({
12107
12217
  policyName: zod_index_js_namespaceObject.z.string().optional(),
@@ -12114,9 +12224,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
12114
12224
  "xxhash64"
12115
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([
12116
12226
  zod_index_js_namespaceObject.z.string(),
12117
- zod_index_js_namespaceObject.z.function(zod_index_js_namespaceObject.z.tuple([
12118
- zod_index_js_namespaceObject.z.any()
12119
- ]), zod_index_js_namespaceObject.z.any())
12227
+ anyFunction
12120
12228
  ]), zod_environment = zod_index_js_namespaceObject.z.strictObject({
12121
12229
  arrowFunction: zod_index_js_namespaceObject.z.boolean().optional(),
12122
12230
  asyncFunction: zod_index_js_namespaceObject.z.boolean().optional(),
@@ -12213,7 +12321,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
12213
12321
  pnp: zod_index_js_namespaceObject.z.boolean().optional()
12214
12322
  }).extend({
12215
12323
  byDependency: zod_index_js_namespaceObject.z.lazy(()=>zod_index_js_namespaceObject.z.record(zod_index_js_namespaceObject.z.string(), zod_resolveOptions)).optional()
12216
- }), ruleSetCondition = zod_index_js_namespaceObject.z.instanceof(RegExp).or(zod_index_js_namespaceObject.z.string()).or(zod_index_js_namespaceObject.z.function().args(zod_index_js_namespaceObject.z.string()).returns(zod_index_js_namespaceObject.z.boolean())).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({
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({
12217
12325
  and: ruleSetConditions.optional(),
12218
12326
  or: ruleSetConditions.optional(),
12219
12327
  not: ruleSetCondition.optional()
@@ -12259,7 +12367,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
12259
12367
  options: ruleSetLoaderOptions.optional(),
12260
12368
  parallel: zod_index_js_namespaceObject.z.boolean().optional()
12261
12369
  })
12262
- }), ruleSetUseItem = ruleSetLoader.or(ruleSetLoaderWithOptions), ruleSetUse = ruleSetUseItem.or(ruleSetUseItem.array()).or(zod_index_js_namespaceObject.z.function().args(zod_index_js_namespaceObject.z.custom()).returns(ruleSetUseItem.array())), baseRuleSetRule = zod_index_js_namespaceObject.z.strictObject({
12370
+ }), ruleSetUseItem = ruleSetLoader.or(ruleSetLoaderWithOptions), ruleSetUse = ruleSetUseItem.or(ruleSetUseItem.array()).or(anyFunction), baseRuleSetRule = zod_index_js_namespaceObject.z.strictObject({
12263
12371
  test: ruleSetCondition.optional(),
12264
12372
  exclude: ruleSetCondition.optional(),
12265
12373
  include: ruleSetCondition.optional(),
@@ -12402,10 +12510,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
12402
12510
  }), assetGeneratorDataUrlOptions = zod_index_js_namespaceObject.z.strictObject({
12403
12511
  encoding: zod_index_js_namespaceObject.z.literal(!1).or(zod_index_js_namespaceObject.z.literal("base64")).optional(),
12404
12512
  mimetype: zod_index_js_namespaceObject.z.string().optional()
12405
- }), assetGeneratorDataUrlFunction = zod_index_js_namespaceObject.z.function().args(zod_index_js_namespaceObject.z.instanceof(Buffer), zod_index_js_namespaceObject.z.strictObject({
12406
- filename: zod_index_js_namespaceObject.z.string(),
12407
- module: zod_index_js_namespaceObject.z.custom()
12408
- })).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({
12409
12514
  dataUrl: assetGeneratorDataUrl.optional()
12410
12515
  }), assetResourceGeneratorOptions = zod_index_js_namespaceObject.z.strictObject({
12411
12516
  emit: zod_index_js_namespaceObject.z.boolean().optional(),
@@ -12441,7 +12546,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
12441
12546
  "css/auto": cssAutoGeneratorOptions.optional(),
12442
12547
  "css/module": cssModuleGeneratorOptions.optional(),
12443
12548
  json: jsonGeneratorOptions.optional()
12444
- }), noParseOptionSingle = zod_index_js_namespaceObject.z.string().or(zod_index_js_namespaceObject.z.instanceof(RegExp)).or(zod_index_js_namespaceObject.z.function().args(zod_index_js_namespaceObject.z.string()).returns(zod_index_js_namespaceObject.z.boolean())), noParseOption = noParseOptionSingle.or(zod_index_js_namespaceObject.z.array(noParseOptionSingle)), moduleOptions = zod_index_js_namespaceObject.z.strictObject({
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({
12445
12550
  defaultRules: ruleSetRules.optional(),
12446
12551
  rules: ruleSetRules.optional(),
12447
12552
  parser: parserOptionsByModuleTypeKnown.optional(),
@@ -12513,39 +12618,12 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
12513
12618
  "script",
12514
12619
  "node-commonjs",
12515
12620
  "commonjs-import"
12516
- ]), externalObjectValue = new ZodRspackCrossChecker({
12517
- patterns: [
12518
- {
12519
- test: (config)=>{
12520
- let isLibraryUmd = !1, library = config?.output?.library;
12521
- return !!("object" == typeof library && "type" in library ? "umd" === library.type : config?.output?.libraryTarget === "umd") && (config?.externalsType === void 0 || config?.externalsType === "umd");
12522
- },
12523
- type: zod_index_js_namespaceObject.z.strictObject({
12524
- root: zod_index_js_namespaceObject.z.string().or(zod_index_js_namespaceObject.z.string().array()),
12525
- commonjs: zod_index_js_namespaceObject.z.string().or(zod_index_js_namespaceObject.z.string().array()),
12526
- commonjs2: zod_index_js_namespaceObject.z.string().or(zod_index_js_namespaceObject.z.string().array()),
12527
- amd: zod_index_js_namespaceObject.z.string().or(zod_index_js_namespaceObject.z.string().array())
12528
- }),
12529
- issue: (res)=>"aborted" === res.status ? [
12530
- {
12531
- fatal: !0,
12532
- code: zod_index_js_namespaceObject.ZodIssueCode.custom,
12533
- message: 'External object must have "root", "commonjs", "commonjs2", "amd" properties when "libraryType" or "externalsType" is "umd"'
12534
- }
12535
- ] : []
12536
- }
12537
- ],
12538
- 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()))
12539
- }), 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({
12540
- context: zod_index_js_namespaceObject.z.string().optional(),
12541
- dependencyType: zod_index_js_namespaceObject.z.string().optional(),
12542
- request: zod_index_js_namespaceObject.z.string().optional(),
12543
- contextInfo: zod_index_js_namespaceObject.z.strictObject({
12544
- issuer: zod_index_js_namespaceObject.z.string(),
12545
- issuerLayer: zod_index_js_namespaceObject.z.string().or(zod_index_js_namespaceObject.z.null()).optional()
12546
- }).optional(),
12547
- 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()
12548
- }), 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({
12549
12627
  node: zod_index_js_namespaceObject.z.boolean().optional(),
12550
12628
  web: zod_index_js_namespaceObject.z.boolean().optional(),
12551
12629
  webAsync: zod_index_js_namespaceObject.z.boolean().optional(),
@@ -12554,7 +12632,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
12554
12632
  electronPreload: zod_index_js_namespaceObject.z.boolean().optional(),
12555
12633
  electronRenderer: zod_index_js_namespaceObject.z.boolean().optional(),
12556
12634
  nwjs: zod_index_js_namespaceObject.z.boolean().optional()
12557
- }), filterItemTypes = zod_index_js_namespaceObject.z.instanceof(RegExp).or(zod_index_js_namespaceObject.z.string()).or(zod_index_js_namespaceObject.z.function().args(zod_index_js_namespaceObject.z.string()).returns(zod_index_js_namespaceObject.z.boolean())), filterTypes = filterItemTypes.array().or(filterItemTypes), zod_infrastructureLogging = zod_index_js_namespaceObject.z.strictObject({
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({
12558
12636
  appendOnly: zod_index_js_namespaceObject.z.boolean().optional(),
12559
12637
  colors: zod_index_js_namespaceObject.z.boolean().optional(),
12560
12638
  console: zod_index_js_namespaceObject.z.custom().optional(),
@@ -12675,22 +12753,8 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
12675
12753
  groupAssetsByChunk: zod_index_js_namespaceObject.z.boolean().optional(),
12676
12754
  assetsSpace: zod_index_js_namespaceObject.z.number().optional(),
12677
12755
  orphanModules: zod_index_js_namespaceObject.z.boolean().optional(),
12678
- 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.function(zod_index_js_namespaceObject.z.tuple([
12679
- zod_index_js_namespaceObject.z.string(),
12680
- zod_index_js_namespaceObject.z.any(),
12681
- zod_index_js_namespaceObject.z.any()
12682
- ]), 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([
12683
- zod_index_js_namespaceObject.z.string(),
12684
- zod_index_js_namespaceObject.z.any(),
12685
- zod_index_js_namespaceObject.z.any()
12686
- ]), zod_index_js_namespaceObject.z.boolean())).or(zod_index_js_namespaceObject.z.boolean()).optional(),
12687
- 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([
12688
- zod_index_js_namespaceObject.z.string(),
12689
- zod_index_js_namespaceObject.z.any()
12690
- ]), 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([
12691
- zod_index_js_namespaceObject.z.string(),
12692
- zod_index_js_namespaceObject.z.any()
12693
- ]), 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(),
12694
12758
  modulesSort: zod_index_js_namespaceObject.z.string().optional(),
12695
12759
  chunkModulesSort: zod_index_js_namespaceObject.z.string().optional(),
12696
12760
  nestedModulesSort: zod_index_js_namespaceObject.z.string().optional(),
@@ -12722,16 +12786,12 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
12722
12786
  "single",
12723
12787
  "multiple"
12724
12788
  ]).or(zod_index_js_namespaceObject.z.boolean()).or(zod_index_js_namespaceObject.z.strictObject({
12725
- name: zod_index_js_namespaceObject.z.string().or(zod_index_js_namespaceObject.z.function().args(zod_index_js_namespaceObject.z.strictObject({
12726
- name: zod_index_js_namespaceObject.z.string()
12727
- })).returns(zod_index_js_namespaceObject.z.string())).optional()
12728
- })), 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([
12729
12791
  "initial",
12730
12792
  "async",
12731
12793
  "all"
12732
- ]).or(zod_index_js_namespaceObject.z.instanceof(RegExp)).or(zod_index_js_namespaceObject.z.function().args(zod_index_js_namespaceObject.z.instanceof(Chunk, {
12733
- message: "Input not instance of Chunk"
12734
- })).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 = {
12735
12795
  chunks: optimizationSplitChunksChunks.optional(),
12736
12796
  defaultSizeTypes: optimizationSplitChunksDefaultSizeTypes.optional(),
12737
12797
  minChunks: zod_index_js_namespaceObject.z.number().min(1).optional(),
@@ -12747,18 +12807,13 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
12747
12807
  maxInitialRequests: zod_index_js_namespaceObject.z.number().optional(),
12748
12808
  automaticNameDelimiter: zod_index_js_namespaceObject.z.string().optional()
12749
12809
  }, optimizationSplitChunksCacheGroup = zod_index_js_namespaceObject.z.strictObject({
12750
- test: zod_index_js_namespaceObject.z.string().or(zod_index_js_namespaceObject.z.instanceof(RegExp)).or(zod_index_js_namespaceObject.z.function().args(zod_index_js_namespaceObject.z.instanceof(binding_.Module), zod_index_js_namespaceObject.z.object({
12751
- moduleGraph: zod_index_js_namespaceObject.z.instanceof(ModuleGraph),
12752
- chunkGraph: zod_index_js_namespaceObject.z.instanceof(ChunkGraph)
12753
- })).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(),
12754
12811
  priority: zod_index_js_namespaceObject.z.number().optional(),
12755
12812
  enforce: zod_index_js_namespaceObject.z.boolean().optional(),
12756
12813
  reuseExistingChunk: zod_index_js_namespaceObject.z.boolean().optional(),
12757
12814
  type: zod_index_js_namespaceObject.z.string().or(zod_index_js_namespaceObject.z.instanceof(RegExp)).optional(),
12758
12815
  idHint: zod_index_js_namespaceObject.z.string().optional(),
12759
- layer: 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([
12760
- zod_index_js_namespaceObject.z.string().optional()
12761
- ]), 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(),
12762
12817
  ...sharedOptimizationSplitChunksCacheGroup
12763
12818
  }), optimizationSplitChunksOptions = zod_index_js_namespaceObject.z.strictObject({
12764
12819
  cacheGroups: zod_index_js_namespaceObject.z.record(zod_index_js_namespaceObject.z.literal(!1).or(optimizationSplitChunksCacheGroup)).optional(),
@@ -12845,7 +12900,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
12845
12900
  })), lazyCompilationOptions = zod_index_js_namespaceObject.z.object({
12846
12901
  imports: zod_index_js_namespaceObject.z.boolean().optional(),
12847
12902
  entries: zod_index_js_namespaceObject.z.boolean().optional(),
12848
- test: zod_index_js_namespaceObject.z.instanceof(RegExp).or(zod_index_js_namespaceObject.z.function().args(zod_index_js_namespaceObject.z.custom()).returns(zod_index_js_namespaceObject.z.boolean())).optional(),
12903
+ test: zod_index_js_namespaceObject.z.instanceof(RegExp).or(anyFunction).optional(),
12849
12904
  client: zod_index_js_namespaceObject.z.string().optional(),
12850
12905
  serverUrl: zod_index_js_namespaceObject.z.string().optional(),
12851
12906
  prefix: zod_index_js_namespaceObject.z.string().optional()
@@ -12876,12 +12931,11 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
12876
12931
  zod_index_js_namespaceObject.z.literal(!1)
12877
12932
  ]).optional(),
12878
12933
  upgrade: zod_index_js_namespaceObject.z.boolean().optional(),
12879
- httpClient: zod_index_js_namespaceObject.z.function().args(zod_index_js_namespaceObject.z.string(), zod_index_js_namespaceObject.z.record(zod_index_js_namespaceObject.z.string(), zod_index_js_namespaceObject.z.string())).returns(zod_index_js_namespaceObject.z.promise(zod_index_js_namespaceObject.z.object({
12880
- status: zod_index_js_namespaceObject.z.number(),
12881
- headers: zod_index_js_namespaceObject.z.record(zod_index_js_namespaceObject.z.string(), zod_index_js_namespaceObject.z.string()),
12882
- body: zod_index_js_namespaceObject.z.instanceof(Buffer)
12883
- }))).optional()
12884
- }), 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({
12885
12939
  cache: zod_index_js_namespaceObject.z.boolean().optional().or(experimentCacheOptions),
12886
12940
  lazyCompilation: zod_index_js_namespaceObject.z.boolean().optional().or(lazyCompilationOptions),
12887
12941
  asyncWebAssembly: zod_index_js_namespaceObject.z.boolean().optional(),
@@ -12894,15 +12948,16 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
12894
12948
  futureDefaults: zod_index_js_namespaceObject.z.boolean().optional(),
12895
12949
  rspackFuture: rspackFutureOptions.optional(),
12896
12950
  buildHttp: buildHttpOptions.optional(),
12897
- parallelLoader: zod_index_js_namespaceObject.z.boolean().optional()
12951
+ parallelLoader: zod_index_js_namespaceObject.z.boolean().optional(),
12952
+ useInputFileSystem: useInputFileSystem.optional()
12898
12953
  }), zod_watch = zod_index_js_namespaceObject.z.boolean(), zod_watchOptions = zod_index_js_namespaceObject.z.strictObject({
12899
12954
  aggregateTimeout: zod_index_js_namespaceObject.z.number().optional(),
12900
12955
  followSymlinks: zod_index_js_namespaceObject.z.boolean().optional(),
12901
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(),
12902
12957
  poll: zod_index_js_namespaceObject.z.number().or(zod_index_js_namespaceObject.z.boolean()).optional(),
12903
12958
  stdin: zod_index_js_namespaceObject.z.boolean().optional()
12904
- }), devServer = zod_index_js_namespaceObject.z.custom(), ignoreWarnings = zod_index_js_namespaceObject.z.instanceof(RegExp).or(zod_index_js_namespaceObject.z.function().args(zod_index_js_namespaceObject.z.instanceof(Error), zod_index_js_namespaceObject.z.custom()).returns(zod_index_js_namespaceObject.z.boolean())).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({
12905
- assetFilter: zod_index_js_namespaceObject.z.function().args(zod_index_js_namespaceObject.z.string()).returns(zod_index_js_namespaceObject.z.boolean()).optional(),
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(),
12906
12961
  hints: zod_index_js_namespaceObject.z.enum([
12907
12962
  "error",
12908
12963
  "warning"
@@ -12945,6 +13000,27 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
12945
13000
  amd: amd.optional(),
12946
13001
  bail: bail.optional(),
12947
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
+ ]));
12948
13024
  }), ModuleFederationRuntimePlugin = base_create(binding_.BuiltinPluginName.ModuleFederationRuntimePlugin, ()=>{}), options_process = (options, normalizeSimple, normalizeOptions, fn)=>{
12949
13025
  let object = (obj)=>{
12950
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));
@@ -13315,7 +13391,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
13315
13391
  let _options = JSON.stringify(options || {});
13316
13392
  return binding_default().transform(source, _options);
13317
13393
  }
13318
- let exports_rspackVersion = "1.3.14", exports_version = "5.75.0", exports_WebpackError = Error, sources = __webpack_require__("webpack-sources"), exports_config = {
13394
+ let exports_rspackVersion = "1.4.0-beta.0", exports_version = "5.75.0", exports_WebpackError = Error, sources = __webpack_require__("webpack-sources"), exports_config = {
13319
13395
  getNormalizedRspackOptions: getNormalizedRspackOptions,
13320
13396
  applyRspackOptionsDefaults: applyRspackOptionsDefaults,
13321
13397
  getNormalizedWebpackOptions: getNormalizedRspackOptions,
@@ -13399,7 +13475,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
13399
13475
  await JavaScriptTracer.initJavaScriptTrace(layer, output), (0, binding_.registerGlobalTrace)(filter, layer, output), JavaScriptTracer.initCpuProfiler();
13400
13476
  },
13401
13477
  async cleanup () {
13402
- (0, binding_.cleanupGlobalTrace)(), await JavaScriptTracer.cleanupJavaScriptTrace();
13478
+ await JavaScriptTracer.cleanupJavaScriptTrace(), await (0, binding_.syncTraceEvent)(JavaScriptTracer.events), (0, binding_.cleanupGlobalTrace)();
13403
13479
  }
13404
13480
  },
13405
13481
  RemoveDuplicateModulesPlugin: RemoveDuplicateModulesPlugin,
@@ -13481,7 +13557,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
13481
13557
  }, exports_namespaceObject);
13482
13558
  src_fn.rspack = src_fn, src_fn.webpack = src_fn;
13483
13559
  let src_rspack = src_fn, src_0 = src_rspack;
13484
- })(), 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 === [
13485
13561
  "AsyncDependenciesBlock",
13486
13562
  "BannerPlugin",
13487
13563
  "CircularDependencyRspackPlugin",
@@ -13527,6 +13603,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
13527
13603
  "RuntimePlugin",
13528
13604
  "SourceMapDevToolPlugin",
13529
13605
  "Stats",
13606
+ "StatsErrorCode",
13530
13607
  "SwcJsMinimizerRspackPlugin",
13531
13608
  "Template",
13532
13609
  "ValidationError",