@rspack/core 1.3.15 → 1.4.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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/zod/dist/types/v4/classic/schemas.d.ts +19 -14
  17. package/compiled/zod/dist/types/v4/core/api.d.ts +5 -4
  18. package/compiled/zod/dist/types/v4/core/checks.d.ts +1 -1
  19. package/compiled/zod/dist/types/v4/core/core.d.ts +1 -1
  20. package/compiled/zod/dist/types/v4/core/registries.d.ts +3 -1
  21. package/compiled/zod/dist/types/v4/core/schemas.d.ts +33 -39
  22. package/compiled/zod/dist/types/v4/core/to-json-schema.d.ts +2 -2
  23. package/compiled/zod/dist/types/v4/core/util.d.ts +1 -1
  24. package/compiled/zod/dist/types/v4/locales/index.d.ts +1 -0
  25. package/compiled/zod/dist/types/v4/locales/ps.d.ts +4 -0
  26. package/compiled/zod/dist/types/v4/mini/schemas.d.ts +77 -125
  27. package/compiled/zod/index.js +33 -33
  28. package/compiled/zod/package.json +1 -1
  29. package/dist/BuildInfo.d.ts +17 -0
  30. package/dist/FileSystem.d.ts +26 -3
  31. package/dist/Module.d.ts +1 -13
  32. package/dist/MultiCompiler.d.ts +4 -1
  33. package/dist/MultiWatching.d.ts +1 -0
  34. package/dist/builtin-loader/swc/types.d.ts +315 -296
  35. package/dist/builtin-plugin/lazy-compilation/middleware.d.ts +3 -3
  36. package/dist/config/devServer.d.ts +10 -10
  37. package/dist/config/normalization.d.ts +2 -0
  38. package/dist/config/types.d.ts +17 -1
  39. package/dist/config/utils.d.ts +1 -0
  40. package/dist/config/zod.d.ts +1707 -1086
  41. package/dist/cssExtractLoader.js +5 -5
  42. package/dist/exports.d.ts +5 -2
  43. package/dist/index.js +1130 -982
  44. package/dist/loader-runner/index.d.ts +0 -9
  45. package/dist/swc.d.ts +2 -0
  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 +10 -10
  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) {
@@ -4199,7 +4344,8 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
4199
4344
  requireAsExpression: parser.requireAsExpression,
4200
4345
  requireDynamic: parser.requireDynamic,
4201
4346
  requireResolve: parser.requireResolve,
4202
- importDynamic: parser.importDynamic
4347
+ importDynamic: parser.importDynamic,
4348
+ inlineConst: parser.inlineConst
4203
4349
  };
4204
4350
  }
4205
4351
  function getRawCssParserOptions(parser) {
@@ -4291,6 +4437,8 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
4291
4437
  esModule: options.esModule
4292
4438
  };
4293
4439
  }
4440
+ let external_node_fs_namespaceObject = require("node:fs");
4441
+ var external_node_fs_default = __webpack_require__.n(external_node_fs_namespaceObject);
4294
4442
  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
4443
  class Template {
4296
4444
  static getFunctionContent(fn) {
@@ -4507,14 +4655,14 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
4507
4655
  return createBuiltinPlugin(this.name, void 0);
4508
4656
  }
4509
4657
  }
4510
- class EntryOptionPlugin {
4658
+ class EntryOptionPlugin_EntryOptionPlugin {
4511
4659
  apply(compiler) {
4512
- compiler.hooks.entryOption.tap("EntryOptionPlugin", (context, entry)=>(EntryOptionPlugin.applyEntryOption(compiler, context, entry), !0));
4660
+ compiler.hooks.entryOption.tap("EntryOptionPlugin", (context, entry)=>(EntryOptionPlugin_EntryOptionPlugin.applyEntryOption(compiler, context, entry), !0));
4513
4661
  }
4514
4662
  static applyEntryOption(compiler, context, entry) {
4515
4663
  if ("function" == typeof entry) new DynamicEntryPlugin(context, entry).apply(compiler);
4516
4664
  else for (let name of Object.keys(entry)){
4517
- let desc = entry[name], options = EntryOptionPlugin.entryDescriptionToOptions(compiler, name, desc);
4665
+ let desc = entry[name], options = EntryOptionPlugin_EntryOptionPlugin.entryDescriptionToOptions(compiler, name, desc);
4518
4666
  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
4667
  }
4520
4668
  }
@@ -4535,7 +4683,7 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
4535
4683
  return options;
4536
4684
  }
4537
4685
  }
4538
- let lib_EntryOptionPlugin = EntryOptionPlugin, EntryPlugin = base_create(binding_.BuiltinPluginName.EntryPlugin, (context, entry, options = "")=>({
4686
+ let EntryOptionPlugin = EntryOptionPlugin_EntryOptionPlugin, EntryPlugin = base_create(binding_.BuiltinPluginName.EntryPlugin, (context, entry, options = "")=>({
4539
4687
  context,
4540
4688
  entry,
4541
4689
  options: getRawEntryOptions("string" == typeof options ? {
@@ -4570,7 +4718,7 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
4570
4718
  let raw = {
4571
4719
  context: this.context,
4572
4720
  entry: async ()=>Object.entries(await this.entry()).map(([name, desc])=>{
4573
- let options = lib_EntryOptionPlugin.entryDescriptionToOptions(compiler, name, desc);
4721
+ let options = EntryOptionPlugin.entryDescriptionToOptions(compiler, name, desc);
4574
4722
  return {
4575
4723
  import: desc.import,
4576
4724
  options: getRawEntryOptions(options)
@@ -4720,6 +4868,114 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
4720
4868
  let hooks_compilationHooksMap = new WeakMap(), cleanPluginHooks = (compilation)=>{
4721
4869
  hooks_compilationHooksMap.delete(compilation);
4722
4870
  };
4871
+ class RspackZodUnion extends zod_index_js_namespaceObject.z.ZodUnion {
4872
+ _parse(input) {
4873
+ let dirty, { ctx } = this._processInputParams(input), options = this._def.options;
4874
+ if (ctx.common.async) return Promise.all(options.map(async (option)=>{
4875
+ let childCtx = {
4876
+ ...ctx,
4877
+ common: {
4878
+ ...ctx.common,
4879
+ issues: []
4880
+ },
4881
+ parent: ctx
4882
+ };
4883
+ return {
4884
+ result: await option._parseAsync({
4885
+ data: ctx.data,
4886
+ path: ctx.path,
4887
+ parent: childCtx
4888
+ }),
4889
+ ctx: childCtx
4890
+ };
4891
+ })).then(function(results) {
4892
+ for (let result of results)if ("valid" === result.result.status) return result.result;
4893
+ for (let result of results)if ("dirty" === result.result.status) return ctx.common.issues.push(...result.ctx.common.issues), result.result;
4894
+ let unionErrors = results.map((result)=>new zod_index_js_namespaceObject.ZodError(result.ctx.common.issues));
4895
+ return (0, zod_index_js_namespaceObject.addIssueToContext)(ctx, {
4896
+ code: zod_index_js_namespaceObject.ZodIssueCode.invalid_union,
4897
+ unionErrors
4898
+ }), zod_index_js_namespaceObject.INVALID;
4899
+ });
4900
+ let issues = [];
4901
+ for (let option of options){
4902
+ let childCtx = {
4903
+ ...ctx,
4904
+ common: {
4905
+ ...ctx.common,
4906
+ issues: []
4907
+ },
4908
+ parent: ctx
4909
+ }, result = option._parseSync({
4910
+ data: ctx.data,
4911
+ path: ctx.path,
4912
+ parent: childCtx
4913
+ });
4914
+ if ("valid" === result.status) return result;
4915
+ "dirty" !== result.status || dirty || (dirty = {
4916
+ result,
4917
+ ctx: childCtx
4918
+ }), childCtx.common.issues.length && issues.push(childCtx.common.issues);
4919
+ }
4920
+ if (dirty) return ctx.common.issues.push(...dirty.ctx.common.issues), dirty.result;
4921
+ let unionErrors = issues.map((issues)=>new zod_index_js_namespaceObject.ZodError(issues));
4922
+ return (0, zod_index_js_namespaceObject.addIssueToContext)(ctx, {
4923
+ code: zod_index_js_namespaceObject.ZodIssueCode.invalid_union,
4924
+ unionErrors
4925
+ }), zod_index_js_namespaceObject.INVALID;
4926
+ }
4927
+ static create = (types, params)=>new RspackZodUnion({
4928
+ options: types,
4929
+ typeName: zod_index_js_namespaceObject.ZodFirstPartyTypeKind.ZodUnion,
4930
+ ...function(params) {
4931
+ if (!params) return {};
4932
+ let { errorMap, invalid_type_error, required_error, description } = params;
4933
+ if (errorMap && (invalid_type_error || required_error)) throw Error('Can\'t use "invalid_type_error" or "required_error" in conjunction with custom error map.');
4934
+ return errorMap ? {
4935
+ errorMap: errorMap,
4936
+ description
4937
+ } : {
4938
+ errorMap: (iss, ctx)=>{
4939
+ let { message } = params;
4940
+ return "invalid_enum_value" === iss.code ? {
4941
+ message: message ?? ctx.defaultError
4942
+ } : void 0 === ctx.data ? {
4943
+ message: message ?? required_error ?? ctx.defaultError
4944
+ } : "invalid_type" !== iss.code ? {
4945
+ message: ctx.defaultError
4946
+ } : {
4947
+ message: message ?? invalid_type_error ?? ctx.defaultError
4948
+ };
4949
+ },
4950
+ description
4951
+ };
4952
+ }(params)
4953
+ });
4954
+ }
4955
+ zod_index_js_namespaceObject.ZodUnion.create = RspackZodUnion.create;
4956
+ class ZodRspackCrossChecker extends zod_index_js_namespaceObject.ZodType {
4957
+ params;
4958
+ constructor(params){
4959
+ super(params), this.params = params;
4960
+ }
4961
+ _parse(input) {
4962
+ let ctx = this._getOrReturnCtx(input), root = this._getRootData(ctx);
4963
+ for (let pattern of this.params.patterns)if (pattern.test(root, input)) {
4964
+ let res = pattern.type._parse(input);
4965
+ for (let issue of "function" == typeof pattern.issue ? pattern.issue(res, root, input) : [])(0, zod_index_js_namespaceObject.addIssueToContext)(ctx, issue);
4966
+ return res;
4967
+ }
4968
+ return this.params.default._parse(input);
4969
+ }
4970
+ _getRootData(ctx) {
4971
+ let root = ctx;
4972
+ for(; root.parent;)root = root.parent;
4973
+ return root.data;
4974
+ }
4975
+ }
4976
+ let anyFunction = zod_index_js_namespaceObject.z.custom((data)=>"function" == typeof data, (input)=>({
4977
+ message: `Expected function, received ${(0, zod_index_js_namespaceObject.getParsedType)(input)}`
4978
+ }));
4723
4979
  function isZodErrorLike(err) {
4724
4980
  return err instanceof Error && "ZodError" === err.name && "issues" in err && Array.isArray(err.issues);
4725
4981
  }
@@ -4742,6 +4998,9 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
4742
4998
  function isNonEmptyArray(value) {
4743
4999
  return 0 !== value.length;
4744
5000
  }
5001
+ function stringifySymbol(symbol) {
5002
+ return symbol.description ?? "";
5003
+ }
4745
5004
  var identifierRegex = /[$_\p{ID_Start}][$\u200c\u200d\p{ID_Continue}]*/u, PREFIX = "Validation error";
4746
5005
  function fromZodErrorWithoutRuntimeCheck(zodError, options = {}) {
4747
5006
  var options1;
@@ -4780,21 +5039,26 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
4780
5039
  }))
4781
5040
  ].join(issueSeparator);
4782
5041
  if (includePath && isNonEmptyArray(issue.path)) {
4783
- var path;
4784
5042
  if (1 === issue.path.length) {
4785
5043
  let identifier = issue.path[0];
4786
5044
  if ("number" == typeof identifier) return `${issue.message} at index ${identifier}`;
4787
5045
  }
4788
- return `${issue.message} at "${1 === (path = issue.path).length ? path[0].toString() : path.reduce((acc, item)=>{
4789
- if ("number" == typeof item) return acc + "[" + item.toString() + "]";
4790
- if (item.includes('"')) {
4791
- var str;
4792
- return acc + '["' + (str = item).replace(/"/g, '\\"') + '"]';
5046
+ return `${issue.message} at "${function(path) {
5047
+ if (1 === path.length) {
5048
+ let propertyKey = path[0];
5049
+ return "symbol" == typeof propertyKey && (propertyKey = stringifySymbol(propertyKey)), propertyKey.toString() || '""';
4793
5050
  }
4794
- if (!identifierRegex.test(item)) return acc + '["' + item + '"]';
4795
- let separator = 0 === acc.length ? "" : ".";
4796
- return acc + separator + item;
4797
- }, "")}"`;
5051
+ return path.reduce((acc, propertyKey)=>{
5052
+ if ("number" == typeof propertyKey) return acc + "[" + propertyKey.toString() + "]";
5053
+ if ("symbol" == typeof propertyKey && (propertyKey = stringifySymbol(propertyKey)), propertyKey.includes('"')) {
5054
+ var str;
5055
+ return acc + '["' + (str = propertyKey).replace(/"/g, '\\"') + '"]';
5056
+ }
5057
+ if (!identifierRegex.test(propertyKey)) return acc + '["' + propertyKey + '"]';
5058
+ let separator = 0 === acc.length ? "" : ".";
5059
+ return acc + separator + propertyKey;
5060
+ }, "");
5061
+ }(issue.path)}"`;
4798
5062
  }
4799
5063
  return issue.message;
4800
5064
  })({
@@ -4856,50 +5120,50 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
4856
5120
  return !1;
4857
5121
  }
4858
5122
  }
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(),
4861
- template: zod_index_js_namespaceObject.z.string().refine((val)=>!val.includes("!"), ()=>({
4862
- message: "HtmlRspackPlugin does not support template path with loader yet"
5123
+ let compilationOptionsMap = new WeakMap(), getPluginOptionsSchema = memoize(()=>zod_index_js_namespaceObject.z.object({
5124
+ filename: zod_index_js_namespaceObject.z.string().or(anyFunction).optional(),
5125
+ template: zod_index_js_namespaceObject.z.string().refine((val)=>!val.includes("!"), ()=>({
5126
+ message: "HtmlRspackPlugin does not support template path with loader yet"
5127
+ })).optional(),
5128
+ templateContent: zod_index_js_namespaceObject.z.string().or(anyFunction).optional(),
5129
+ 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(),
5130
+ inject: zod_index_js_namespaceObject.z.enum([
5131
+ "head",
5132
+ "body"
5133
+ ]).or(zod_index_js_namespaceObject.z.boolean()).optional(),
5134
+ publicPath: zod_index_js_namespaceObject.z.string().optional(),
5135
+ base: zod_index_js_namespaceObject.z.string().or(zod_index_js_namespaceObject.z.strictObject({
5136
+ href: zod_index_js_namespaceObject.z.string().optional(),
5137
+ target: zod_index_js_namespaceObject.z.enum([
5138
+ "_self",
5139
+ "_blank",
5140
+ "_parent",
5141
+ "_top"
5142
+ ]).optional()
4863
5143
  })).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(),
4866
- inject: zod_index_js_namespaceObject.z.enum([
4867
- "head",
4868
- "body"
4869
- ]).or(zod_index_js_namespaceObject.z.boolean()).optional(),
4870
- publicPath: zod_index_js_namespaceObject.z.string().optional(),
4871
- base: zod_index_js_namespaceObject.z.string().or(zod_index_js_namespaceObject.z.strictObject({
4872
- href: zod_index_js_namespaceObject.z.string().optional(),
4873
- target: zod_index_js_namespaceObject.z.enum([
4874
- "_self",
4875
- "_blank",
4876
- "_parent",
4877
- "_top"
4878
- ]).optional()
4879
- })).optional(),
4880
- scriptLoading: zod_index_js_namespaceObject.z.enum([
4881
- "blocking",
4882
- "defer",
4883
- "module",
4884
- "systemjs-module"
4885
- ]).optional(),
4886
- chunks: zod_index_js_namespaceObject.z.string().array().optional(),
4887
- excludeChunks: zod_index_js_namespaceObject.z.string().array().optional(),
4888
- chunksSortMode: zod_index_js_namespaceObject.z.enum([
4889
- "auto",
4890
- "manual"
4891
- ]).optional(),
4892
- sri: zod_index_js_namespaceObject.z.enum([
4893
- "sha256",
4894
- "sha384",
4895
- "sha512"
4896
- ]).optional(),
4897
- minify: zod_index_js_namespaceObject.z.boolean().optional(),
4898
- title: zod_index_js_namespaceObject.z.string().optional(),
4899
- favicon: zod_index_js_namespaceObject.z.string().optional(),
4900
- meta: zod_index_js_namespaceObject.z.record(zod_index_js_namespaceObject.z.string(), zod_index_js_namespaceObject.z.string().or(zod_index_js_namespaceObject.z.record(zod_index_js_namespaceObject.z.string(), zod_index_js_namespaceObject.z.string()))).optional(),
4901
- hash: zod_index_js_namespaceObject.z.boolean().optional()
4902
- }), getPluginOptions = (compilation, uid)=>{
5144
+ scriptLoading: zod_index_js_namespaceObject.z.enum([
5145
+ "blocking",
5146
+ "defer",
5147
+ "module",
5148
+ "systemjs-module"
5149
+ ]).optional(),
5150
+ chunks: zod_index_js_namespaceObject.z.string().array().optional(),
5151
+ excludeChunks: zod_index_js_namespaceObject.z.string().array().optional(),
5152
+ chunksSortMode: zod_index_js_namespaceObject.z.enum([
5153
+ "auto",
5154
+ "manual"
5155
+ ]).optional(),
5156
+ sri: zod_index_js_namespaceObject.z.enum([
5157
+ "sha256",
5158
+ "sha384",
5159
+ "sha512"
5160
+ ]).optional(),
5161
+ minify: zod_index_js_namespaceObject.z.boolean().optional(),
5162
+ title: zod_index_js_namespaceObject.z.string().optional(),
5163
+ favicon: zod_index_js_namespaceObject.z.string().optional(),
5164
+ meta: zod_index_js_namespaceObject.z.record(zod_index_js_namespaceObject.z.string(), zod_index_js_namespaceObject.z.string().or(zod_index_js_namespaceObject.z.record(zod_index_js_namespaceObject.z.string(), zod_index_js_namespaceObject.z.string()))).optional(),
5165
+ hash: zod_index_js_namespaceObject.z.boolean().optional()
5166
+ })), getPluginOptions = (compilation, uid)=>{
4903
5167
  if (!(compilation instanceof Compilation)) throw TypeError("The 'compilation' argument must be an instance of Compilation");
4904
5168
  return compilationOptionsMap.get(compilation)?.[uid];
4905
5169
  }, setPluginOptions = (compilation, uid, options)=>{
@@ -4910,7 +5174,7 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
4910
5174
  delete optionsMap[uid], 0 === Object.keys(optionsMap).length ? compilationOptionsMap.delete(compilation) : compilationOptionsMap.set(compilation, optionsMap);
4911
5175
  }, HTML_PLUGIN_UID = 0, HtmlRspackPluginImpl = base_create(binding_.BuiltinPluginName.HtmlRspackPlugin, function(c = {}) {
4912
5176
  let templateParameters, templateFn, filenames;
4913
- validate(c, pluginOptionsSchema);
5177
+ validate(c, getPluginOptionsSchema());
4914
5178
  let uid = HTML_PLUGIN_UID++, meta = {};
4915
5179
  for(let key in c.meta){
4916
5180
  let value = c.meta[key];
@@ -5105,18 +5369,15 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
5105
5369
  return createBuiltinPlugin(this.name, raw);
5106
5370
  }
5107
5371
  }
5108
- let IgnorePluginOptions = zod_index_js_namespaceObject.z.union([
5109
- zod_index_js_namespaceObject.z.object({
5110
- contextRegExp: zod_index_js_namespaceObject.z.instanceof(RegExp).optional(),
5111
- resourceRegExp: zod_index_js_namespaceObject.z.instanceof(RegExp)
5112
- }),
5113
- 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())
5118
- })
5119
- ]), IgnorePlugin = base_create(binding_.BuiltinPluginName.IgnorePlugin, (options)=>(validate(options, IgnorePluginOptions), options)), InferAsyncModulesPlugin = base_create(binding_.BuiltinPluginName.InferAsyncModulesPlugin, ()=>{}, "compilation"), JavascriptModulesPlugin_compilationHooksMap = new WeakMap();
5372
+ let getIgnorePluginOptionsSchema = memoize(()=>zod_index_js_namespaceObject.z.union([
5373
+ zod_index_js_namespaceObject.z.object({
5374
+ contextRegExp: zod_index_js_namespaceObject.z.instanceof(RegExp).optional(),
5375
+ resourceRegExp: zod_index_js_namespaceObject.z.instanceof(RegExp)
5376
+ }),
5377
+ zod_index_js_namespaceObject.z.object({
5378
+ checkResource: anyFunction
5379
+ })
5380
+ ])), IgnorePlugin = base_create(binding_.BuiltinPluginName.IgnorePlugin, (options)=>(validate(options, getIgnorePluginOptionsSchema()), options)), InferAsyncModulesPlugin = base_create(binding_.BuiltinPluginName.InferAsyncModulesPlugin, ()=>{}, "compilation"), JavascriptModulesPlugin_compilationHooksMap = new WeakMap();
5120
5381
  class JavascriptModulesPlugin extends RspackBuiltinPlugin {
5121
5382
  name = binding_.BuiltinPluginName.JavascriptModulesPlugin;
5122
5383
  affectedHooks = "compilation";
@@ -5145,7 +5406,20 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
5145
5406
  }, getFullServerUrl = ({ serverUrl, prefix })=>{
5146
5407
  let lazyCompilationPrefix = prefix || LAZY_COMPILATION_PREFIX;
5147
5408
  return serverUrl ? serverUrl + (serverUrl.endsWith("/") ? lazyCompilationPrefix.slice(1) : lazyCompilationPrefix) : lazyCompilationPrefix;
5148
- }, lazyCompilationMiddlewareInternal = (compiler, activeModules, filesByKey, lazyCompilationPrefix)=>{
5409
+ };
5410
+ function applyPlugin(compiler, options, activeModules, filesByKey) {
5411
+ new BuiltinLazyCompilationPlugin(({ module, path })=>{
5412
+ let key = encodeURIComponent(module.replace(/\\/g, "/").replace(/@/g, "_")).replace(/%(2F|3A|24|26|2B|2C|3B|3D)/g, decodeURIComponent);
5413
+ filesByKey.set(key, path);
5414
+ let active = !0 === activeModules.get(key);
5415
+ return {
5416
+ client: `${options.client || getDefaultClient(compiler)}?${encodeURIComponent(getFullServerUrl(options))}`,
5417
+ data: key,
5418
+ active
5419
+ };
5420
+ }, options.cacheable ?? !0, options.entries ?? !0, options.imports ?? !0, options.test).apply(compiler);
5421
+ }
5422
+ let lazyCompilationMiddlewareInternal = (compiler, activeModules, filesByKey, lazyCompilationPrefix)=>{
5149
5423
  let logger = compiler.getInfrastructureLogger("LazyCompilation");
5150
5424
  return (req, res, next)=>{
5151
5425
  if (!req.url?.startsWith(lazyCompilationPrefix)) return next?.();
@@ -5440,27 +5714,27 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
5440
5714
  context,
5441
5715
  entries,
5442
5716
  name: options.name
5443
- })), DllReferenceAgencyPlugin = base_create(binding_.BuiltinPluginName.DllReferenceAgencyPlugin, (options)=>options), rsdoctorPluginSchema = zod_index_js_namespaceObject.z.strictObject({
5444
- moduleGraphFeatures: zod_index_js_namespaceObject.z.union([
5445
- zod_index_js_namespaceObject.z.boolean(),
5446
- zod_index_js_namespaceObject.z.array(zod_index_js_namespaceObject.z.enum([
5447
- "graph",
5448
- "ids",
5449
- "sources"
5450
- ]))
5451
- ]).optional(),
5452
- chunkGraphFeatures: zod_index_js_namespaceObject.z.union([
5453
- zod_index_js_namespaceObject.z.boolean(),
5454
- zod_index_js_namespaceObject.z.array(zod_index_js_namespaceObject.z.enum([
5455
- "graph",
5456
- "assets"
5457
- ]))
5458
- ]).optional()
5459
- }), RsdoctorPluginImpl = base_create(binding_.BuiltinPluginName.RsdoctorPlugin, function(c = {
5717
+ })), DllReferenceAgencyPlugin = base_create(binding_.BuiltinPluginName.DllReferenceAgencyPlugin, (options)=>options), getRsdoctorPluginSchema = memoize(()=>zod_index_js_namespaceObject.z.strictObject({
5718
+ moduleGraphFeatures: zod_index_js_namespaceObject.z.union([
5719
+ zod_index_js_namespaceObject.z.boolean(),
5720
+ zod_index_js_namespaceObject.z.array(zod_index_js_namespaceObject.z.enum([
5721
+ "graph",
5722
+ "ids",
5723
+ "sources"
5724
+ ]))
5725
+ ]).optional(),
5726
+ chunkGraphFeatures: zod_index_js_namespaceObject.z.union([
5727
+ zod_index_js_namespaceObject.z.boolean(),
5728
+ zod_index_js_namespaceObject.z.array(zod_index_js_namespaceObject.z.enum([
5729
+ "graph",
5730
+ "assets"
5731
+ ]))
5732
+ ]).optional()
5733
+ })), RsdoctorPluginImpl = base_create(binding_.BuiltinPluginName.RsdoctorPlugin, function(c = {
5460
5734
  moduleGraphFeatures: !0,
5461
5735
  chunkGraphFeatures: !0
5462
5736
  }) {
5463
- return validate(c, rsdoctorPluginSchema), {
5737
+ return validate(c, getRsdoctorPluginSchema()), {
5464
5738
  moduleGraphFeatures: c.moduleGraphFeatures ?? !0,
5465
5739
  chunkGraphFeatures: c.chunkGraphFeatures ?? !0
5466
5740
  };
@@ -5522,16 +5796,19 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
5522
5796
  return await queried.promise(data);
5523
5797
  };
5524
5798
  })
5525
- }), SubresourceIntegrityPlugin_PLUGIN_NAME = "SubresourceIntegrityPlugin", NATIVE_HTML_PLUGIN = "HtmlRspackPlugin", hashFunctionSchema = zod_index_js_namespaceObject.z.enum([
5526
- "sha256",
5527
- "sha384",
5528
- "sha512"
5529
- ]), SubresourceIntegrityPlugin_pluginOptionsSchema = zod_index_js_namespaceObject.z.object({
5530
- hashFuncNames: zod_index_js_namespaceObject.z.tuple([
5531
- hashFunctionSchema
5532
- ]).rest(hashFunctionSchema).optional(),
5533
- htmlPlugin: zod_index_js_namespaceObject.z.string().or(zod_index_js_namespaceObject.z.literal(!1)).optional(),
5534
- enabled: zod_index_js_namespaceObject.z.literal("auto").or(zod_index_js_namespaceObject.z.boolean()).optional()
5799
+ }), SubresourceIntegrityPlugin_PLUGIN_NAME = "SubresourceIntegrityPlugin", NATIVE_HTML_PLUGIN = "HtmlRspackPlugin", SubresourceIntegrityPlugin_getPluginOptionsSchema = memoize(()=>{
5800
+ let hashFunctionSchema = zod_index_js_namespaceObject.z.enum([
5801
+ "sha256",
5802
+ "sha384",
5803
+ "sha512"
5804
+ ]);
5805
+ return zod_index_js_namespaceObject.z.object({
5806
+ hashFuncNames: zod_index_js_namespaceObject.z.tuple([
5807
+ hashFunctionSchema
5808
+ ]).rest(hashFunctionSchema).optional(),
5809
+ htmlPlugin: zod_index_js_namespaceObject.z.string().or(zod_index_js_namespaceObject.z.literal(!1)).optional(),
5810
+ enabled: zod_index_js_namespaceObject.z.literal("auto").or(zod_index_js_namespaceObject.z.boolean()).optional()
5811
+ });
5535
5812
  }), NativeSubresourceIntegrityPlugin = base_create(binding_.BuiltinPluginName.SubresourceIntegrityPlugin, function(options) {
5536
5813
  let htmlPlugin = "Disabled";
5537
5814
  return options.htmlPlugin === NATIVE_HTML_PLUGIN ? htmlPlugin = "Native" : "string" == typeof options.htmlPlugin && (htmlPlugin = "JavaScript"), {
@@ -5549,7 +5826,7 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
5549
5826
  if ("object" != typeof options) throw Error("SubResourceIntegrity: argument must be an object");
5550
5827
  try {
5551
5828
  var options1;
5552
- options1 = options, validate(options1, SubresourceIntegrityPlugin_pluginOptionsSchema);
5829
+ options1 = options, validate(options1, SubresourceIntegrityPlugin_getPluginOptionsSchema());
5553
5830
  } catch (e) {
5554
5831
  validateError = e;
5555
5832
  }
@@ -6480,7 +6757,8 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
6480
6757
  css: options.experiments.css,
6481
6758
  targetProperties,
6482
6759
  mode: options.mode,
6483
- uniqueName: options.output.uniqueName
6760
+ uniqueName: options.output.uniqueName,
6761
+ inlineConst: options.experiments.inlineConst
6484
6762
  }), applyOutputDefaults(options.output, {
6485
6763
  context: options.context,
6486
6764
  targetProperties,
@@ -6517,17 +6795,17 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
6517
6795
  let tty = infrastructureLogging.stream.isTTY && "dumb" !== process.env.TERM;
6518
6796
  D(infrastructureLogging, "level", "info"), D(infrastructureLogging, "debug", !1), D(infrastructureLogging, "colors", tty), D(infrastructureLogging, "appendOnly", !tty);
6519
6797
  }, 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);
6798
+ 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), D(experiments, "inlineConst", !1);
6521
6799
  }, applybundlerInfoDefaults = (rspackFuture, library)=>{
6522
- "object" == typeof rspackFuture && (D(rspackFuture, "bundlerInfo", {}), "object" == typeof rspackFuture.bundlerInfo && (D(rspackFuture.bundlerInfo, "version", "1.3.15"), D(rspackFuture.bundlerInfo, "bundler", "rspack"), D(rspackFuture.bundlerInfo, "force", !library)));
6523
- }, applySnapshotDefaults = (_snapshot, _env)=>{}, applyJavascriptParserOptionsDefaults = (parserOptions)=>{
6800
+ "object" == typeof rspackFuture && (D(rspackFuture, "bundlerInfo", {}), "object" == typeof rspackFuture.bundlerInfo && (D(rspackFuture.bundlerInfo, "version", "1.4.0-beta.1"), D(rspackFuture.bundlerInfo, "bundler", "rspack"), D(rspackFuture.bundlerInfo, "force", !library)));
6801
+ }, applySnapshotDefaults = (_snapshot, _env)=>{}, applyJavascriptParserOptionsDefaults = (parserOptions, inlineConst)=>{
6524
6802
  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
6803
  "..."
6526
- ]), D(parserOptions, "importMeta", !0);
6804
+ ]), D(parserOptions, "importMeta", !0), D(parserOptions, "inlineConst", inlineConst);
6527
6805
  }, applyJsonGeneratorOptionsDefaults = (generatorOptions)=>{
6528
6806
  D(generatorOptions, "JSONParse", !0);
6529
- }, applyModuleDefaults = (module, { asyncWebAssembly, css, targetProperties, mode, uniqueName })=>{
6530
- if (assertNotNill(module.parser), assertNotNill(module.generator), F(module.parser, "asset", ()=>({})), assertNotNill(module.parser.asset), F(module.parser.asset, "dataUrlCondition", ()=>({})), "object" == typeof module.parser.asset.dataUrlCondition && D(module.parser.asset.dataUrlCondition, "maxSize", 8096), F(module.parser, "javascript", ()=>({})), assertNotNill(module.parser.javascript), applyJavascriptParserOptionsDefaults(module.parser.javascript), F(module.parser, JSON_MODULE_TYPE, ()=>({})), assertNotNill(module.parser[JSON_MODULE_TYPE]), D(module.parser[JSON_MODULE_TYPE], "exportsDepth", "development" === mode ? 1 : Number.MAX_SAFE_INTEGER), F(module.generator, "json", ()=>({})), assertNotNill(module.generator.json), applyJsonGeneratorOptionsDefaults(module.generator.json), css) {
6807
+ }, applyModuleDefaults = (module, { asyncWebAssembly, css, targetProperties, mode, uniqueName, inlineConst })=>{
6808
+ if (assertNotNill(module.parser), assertNotNill(module.generator), F(module.parser, "asset", ()=>({})), assertNotNill(module.parser.asset), F(module.parser.asset, "dataUrlCondition", ()=>({})), "object" == typeof module.parser.asset.dataUrlCondition && D(module.parser.asset.dataUrlCondition, "maxSize", 8096), F(module.parser, "javascript", ()=>({})), assertNotNill(module.parser.javascript), applyJavascriptParserOptionsDefaults(module.parser.javascript, inlineConst), F(module.parser, JSON_MODULE_TYPE, ()=>({})), assertNotNill(module.parser[JSON_MODULE_TYPE]), D(module.parser[JSON_MODULE_TYPE], "exportsDepth", "development" === mode ? 1 : Number.MAX_SAFE_INTEGER), F(module.generator, "json", ()=>({})), assertNotNill(module.generator.json), applyJsonGeneratorOptionsDefaults(module.generator.json), css) {
6531
6809
  F(module.parser, "css", ()=>({})), assertNotNill(module.parser.css), D(module.parser.css, "namedExports", !0), D(module.parser.css, "url", !0), F(module.parser, "css/auto", ()=>({})), assertNotNill(module.parser["css/auto"]), D(module.parser["css/auto"], "namedExports", !0), D(module.parser["css/auto"], "url", !0), F(module.parser, "css/module", ()=>({})), assertNotNill(module.parser["css/module"]), D(module.parser["css/module"], "namedExports", !0), D(module.parser["css/module"], "url", !0), F(module.generator, "css", ()=>({})), assertNotNill(module.generator.css), D(module.generator.css, "exportsOnly", !targetProperties || !targetProperties.document), D(module.generator.css, "esModule", !0), F(module.generator, "css/auto", ()=>({})), assertNotNill(module.generator["css/auto"]), D(module.generator["css/auto"], "exportsOnly", !targetProperties || !targetProperties.document), D(module.generator["css/auto"], "exportsConvention", "as-is");
6532
6810
  let localIdentName = uniqueName && uniqueName.length > 0 ? "[uniqueName]-[id]-[local]" : "[id]-[local]";
6533
6811
  D(module.generator["css/auto"], "localIdentName", localIdentName), D(module.generator["css/auto"], "esModule", !0), F(module.generator, "css/module", ()=>({})), assertNotNill(module.generator["css/module"]), D(module.generator["css/module"], "exportsOnly", !targetProperties || !targetProperties.document), D(module.generator["css/module"], "exportsConvention", "as-is"), D(module.generator["css/module"], "localIdentName", localIdentName), D(module.generator["css/module"], "esModule", !0);
@@ -7121,7 +7399,8 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
7121
7399
  incremental: optionalNestedConfig(experiments.incremental, (options)=>getNormalizedIncrementalOptions(options)),
7122
7400
  parallelCodeSplitting: experiments.parallelCodeSplitting,
7123
7401
  buildHttp: experiments.buildHttp,
7124
- parallelLoader: experiments.parallelLoader
7402
+ parallelLoader: experiments.parallelLoader,
7403
+ useInputFileSystem: experiments.useInputFileSystem
7125
7404
  })),
7126
7405
  watch: config.watch,
7127
7406
  watchOptions: cloneObject(config.watchOptions),
@@ -7183,32 +7462,26 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
7183
7462
  name: runtimeChunk.name
7184
7463
  };
7185
7464
  }
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 = {
7465
+ }, getNormalizedIncrementalOptions = (incremental)=>!1 !== incremental && "none" !== incremental && ("safe" === incremental ? {
7193
7466
  silent: !0,
7194
7467
  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,
7468
+ inferAsyncModules: !1,
7469
+ providedExports: !1,
7470
+ dependenciesDiagnostics: !1,
7471
+ sideEffects: !1,
7472
+ buildChunkGraph: !1,
7473
+ moduleIds: !1,
7474
+ chunkIds: !1,
7475
+ modulesHashes: !1,
7476
+ modulesCodegen: !1,
7477
+ modulesRuntimeRequirements: !1,
7478
+ chunksRuntimeRequirements: !1,
7479
+ chunksHashes: !1,
7480
+ chunksRender: !1,
7208
7481
  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)=>({
7482
+ } : !0 === incremental || "advance-silent" === incremental ? {} : "advance" === incremental ? {
7483
+ silent: !1
7484
+ } : 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
7485
  ...value
7213
7486
  }), keyedNestedConfig = (value, fn, customKeys)=>{
7214
7487
  let result = void 0 === value ? {} : Object.keys(value).reduce((obj, key)=>(obj[key] = (customKeys && key in customKeys ? customKeys[key] : fn)(value[key]), obj), {});
@@ -7424,7 +7697,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
7424
7697
  },
7425
7698
  arm: "gnueabihf"
7426
7699
  }
7427
- }, BINDING_VERSION = __webpack_require__("@rspack/binding/package.json").version, CORE_VERSION = "1.3.15", getAddonPlatformArchAbi = ()=>{
7700
+ }, BINDING_VERSION = __webpack_require__("@rspack/binding/package.json").version, CORE_VERSION = "1.4.0-beta.1", getAddonPlatformArchAbi = ()=>{
7428
7701
  let { platform, arch } = process, binding = "";
7429
7702
  binding += platform;
7430
7703
  let abi = NodePlatformArchToAbi[platform][arch];
@@ -7984,50 +8257,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
7984
8257
  });
7985
8258
  }
7986
8259
  }
7987
- let $assets = Symbol("assets");
7988
- Object.defineProperty(binding_.KnownBuildInfo.prototype, "assets", {
7989
- enumerable: !0,
7990
- configurable: !0,
7991
- get () {
7992
- if (this._assets[$assets]) return this._assets[$assets];
7993
- let assets = new Proxy(Object.create(null), {
7994
- ownKeys: ()=>this._assets.keys(),
7995
- getOwnPropertyDescriptor: ()=>({
7996
- enumerable: !0,
7997
- configurable: !0
7998
- })
7999
- });
8000
- return Object.defineProperty(this._assets, $assets, {
8001
- enumerable: !1,
8002
- configurable: !0,
8003
- value: assets
8004
- }), assets;
8005
- }
8006
- }), Object.defineProperty(binding_.KnownBuildInfo.prototype, "fileDependencies", {
8007
- enumerable: !0,
8008
- configurable: !0,
8009
- get () {
8010
- return new Set(this._fileDependencies);
8011
- }
8012
- }), Object.defineProperty(binding_.KnownBuildInfo.prototype, "contextDependencies", {
8013
- enumerable: !0,
8014
- configurable: !0,
8015
- get () {
8016
- return new Set(this._contextDependencies);
8017
- }
8018
- }), Object.defineProperty(binding_.KnownBuildInfo.prototype, "missingDependencies", {
8019
- enumerable: !0,
8020
- configurable: !0,
8021
- get () {
8022
- return new Set(this._missingDependencies);
8023
- }
8024
- }), Object.defineProperty(binding_.KnownBuildInfo.prototype, "buildDependencies", {
8025
- enumerable: !0,
8026
- configurable: !0,
8027
- get () {
8028
- return new Set(this._buildDependencies);
8029
- }
8030
- }), Object.defineProperty(binding_.Module.prototype, "identifier", {
8260
+ Object.defineProperty(binding_.Module.prototype, "identifier", {
8031
8261
  enumerable: !0,
8032
8262
  configurable: !0,
8033
8263
  value () {
@@ -8182,7 +8412,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
8182
8412
  await queried.promise(data, {});
8183
8413
  };
8184
8414
  })
8185
- }), traceHookPlugin_PLUGIN_NAME = "TraceHookPlugin", makeInterceptorFor = (compilerName, tracer)=>(hookName)=>({
8415
+ }), traceHookPlugin_PLUGIN_NAME = "TraceHookPlugin", PLUGIN_PROCESS_NAME = "Plugin Analysis", makeInterceptorFor = (compilerName, tracer)=>(hookName)=>({
8186
8416
  register: (tapInfo)=>{
8187
8417
  let { name, type, fn: internalFn } = tapInfo, newFn = name === traceHookPlugin_PLUGIN_NAME ? internalFn : makeNewTraceTapFn(compilerName, hookName, tracer, {
8188
8418
  name,
@@ -8200,25 +8430,26 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
8200
8430
  hook && !hook._fakeHook && hook.intercept(makeInterceptorFor(logLabel, tracer)(hookName));
8201
8431
  }
8202
8432
  }, makeNewTraceTapFn = (compilerName, hookName, tracer, { name: pluginName, type, fn })=>{
8203
- let name = `${pluginName}:${hookName}`;
8204
8433
  switch(type){
8205
8434
  case "promise":
8206
8435
  return (...args)=>{
8207
- let id2 = tracer.counter++;
8436
+ let uuid = tracer.uuid();
8208
8437
  return tracer.startAsync({
8209
- name,
8210
- id: pluginName,
8438
+ name: hookName,
8439
+ trackName: pluginName,
8440
+ processName: PLUGIN_PROCESS_NAME,
8441
+ uuid,
8211
8442
  args: {
8212
- id2,
8213
8443
  compilerName,
8214
8444
  hookName,
8215
8445
  pluginName
8216
8446
  }
8217
8447
  }), fn(...args).then((r)=>(tracer.endAsync({
8218
- name,
8219
- id: pluginName,
8448
+ name: hookName,
8449
+ trackName: pluginName,
8450
+ processName: PLUGIN_PROCESS_NAME,
8451
+ uuid,
8220
8452
  args: {
8221
- id2,
8222
8453
  compilerName,
8223
8454
  hookName,
8224
8455
  pluginName
@@ -8227,12 +8458,13 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
8227
8458
  };
8228
8459
  case "async":
8229
8460
  return (...args)=>{
8230
- let id2 = tracer.counter++;
8461
+ let uuid = tracer.uuid();
8231
8462
  tracer.startAsync({
8232
- name,
8233
- id: pluginName,
8463
+ name: hookName,
8464
+ trackName: pluginName,
8465
+ processName: PLUGIN_PROCESS_NAME,
8466
+ uuid,
8234
8467
  args: {
8235
- id2,
8236
8468
  compilerName,
8237
8469
  hookName,
8238
8470
  pluginName
@@ -8241,10 +8473,11 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
8241
8473
  let callback = args.pop();
8242
8474
  fn(...args, (...r)=>{
8243
8475
  tracer.endAsync({
8244
- name,
8245
- id: pluginName,
8476
+ name: hookName,
8477
+ trackName: pluginName,
8478
+ processName: PLUGIN_PROCESS_NAME,
8479
+ uuid,
8246
8480
  args: {
8247
- id2,
8248
8481
  compilerName,
8249
8482
  hookName,
8250
8483
  pluginName
@@ -8254,13 +8487,14 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
8254
8487
  };
8255
8488
  case "sync":
8256
8489
  return (...args)=>{
8257
- let r, id2 = tracer.counter++;
8258
- if (name === traceHookPlugin_PLUGIN_NAME) return fn(...args);
8490
+ let r, uuid = tracer.uuid();
8491
+ if (pluginName === traceHookPlugin_PLUGIN_NAME) return fn(...args);
8259
8492
  tracer.startAsync({
8260
- name,
8261
- id: pluginName,
8493
+ name: hookName,
8494
+ trackName: pluginName,
8495
+ processName: PLUGIN_PROCESS_NAME,
8496
+ uuid,
8262
8497
  args: {
8263
- id2,
8264
8498
  compilerName,
8265
8499
  hookName,
8266
8500
  pluginName
@@ -8270,20 +8504,22 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
8270
8504
  r = fn(...args);
8271
8505
  } catch (err) {
8272
8506
  throw tracer.endAsync({
8273
- name,
8274
- id: pluginName,
8507
+ name: hookName,
8508
+ trackName: pluginName,
8509
+ processName: PLUGIN_PROCESS_NAME,
8510
+ uuid,
8275
8511
  args: {
8276
- id2: compilerName,
8277
8512
  hookName,
8278
8513
  pluginName
8279
8514
  }
8280
8515
  }), err;
8281
8516
  }
8282
8517
  return tracer.endAsync({
8283
- name,
8284
- id: pluginName,
8518
+ name: hookName,
8519
+ trackName: pluginName,
8520
+ processName: PLUGIN_PROCESS_NAME,
8521
+ uuid,
8285
8522
  args: {
8286
- id2,
8287
8523
  compilerName,
8288
8524
  hookName,
8289
8525
  pluginName
@@ -8432,7 +8668,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
8432
8668
  "entry"
8433
8669
  ]),
8434
8670
  additionalPass: new lite_tapable_namespaceObject.AsyncSeriesHook([])
8435
- }, this.webpack = src_rspack, this.rspack = src_rspack, this.root = this, this.outputPath = "", this.inputFileSystem = null, this.intermediateFileSystem = null, this.outputFileSystem = null, this.watchFileSystem = null, this.records = {}, this.options = options, this.context = context, this.cache = new 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);
8671
+ }, this.webpack = src_rspack, this.rspack = src_rspack, this.root = this, this.outputPath = "", this.inputFileSystem = null, this.intermediateFileSystem = null, this.outputFileSystem = null, this.watchFileSystem = null, this.records = {}, this.options = options, this.context = context, this.cache = new Cache(), this.compilerPath = "", this.running = !1, this.idle = !1, this.watchMode = !1, this.resolverFactory = new ResolverFactory(options.resolve.pnp ?? getPnpDefault()), new JsLoaderRspackPlugin(this).apply(this), new ExecuteModulePlugin().apply(this), new TraceHookPlugin().apply(this);
8436
8672
  }
8437
8673
  get recordsInputPath() {
8438
8674
  return unsupported("Compiler.recordsInputPath");
@@ -8456,7 +8692,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
8456
8692
  return this.#ruleSet;
8457
8693
  }
8458
8694
  getCache(name) {
8459
- return new CacheFacade(this.cache, `${this.compilerPath}${name}`, this.options.output.hashFunction);
8695
+ return new CacheFacade_CacheFacade(this.cache, `${this.compilerPath}${name}`, this.options.output.hashFunction);
8460
8696
  }
8461
8697
  getInfrastructureLogger(name) {
8462
8698
  if (!name) throw TypeError("Compiler.getInfrastructureLogger(name) called without a name");
@@ -8488,8 +8724,8 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
8488
8724
  this.modifiedFiles = options.modifiedFiles, this.removedFiles = options.removedFiles;
8489
8725
  let startTime = Date.now();
8490
8726
  this.running = !0;
8491
- let instanceBinding = __webpack_require__("@rspack/binding"), isRuntimeShutdown = !1, finalCallback = (err, stats)=>{
8492
- this.idle = !0, this.cache.beginIdle(), this.idle = !0, this.running = !1, err && this.hooks.failed.call(err), callback && callback(err, stats), this.hooks.afterDone.call(stats), instanceBinding.shutdownAsyncRuntime(), instanceBinding.cleanupGlobalTrace();
8727
+ let finalCallback = (err, stats)=>{
8728
+ 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);
8493
8729
  }, onCompiled = (err, _compilation)=>{
8494
8730
  if (err) return finalCallback(err);
8495
8731
  if (_compilation.hooks.needAdditionalPass.call()) {
@@ -8623,10 +8859,12 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
8623
8859
  let error = checkVersion();
8624
8860
  if (error) return callback(error);
8625
8861
  if (this.#instance) return callback(null, this.#instance);
8626
- let rawOptions = getRawOptions(this.options, this);
8862
+ let options = this.options, rawOptions = getRawOptions(options, this);
8627
8863
  rawOptions.__references = Object.fromEntries(this.#ruleSet.builtinReferences.entries());
8628
8864
  let instanceBinding = __webpack_require__("@rspack/binding");
8629
- 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);
8865
+ this.#registers = this.#createHooksRegisters();
8866
+ let inputFileSystem = this.inputFileSystem && ThreadsafeInputNodeFS.needsBinding(options.experiments.useInputFileSystem) ? ThreadsafeInputNodeFS.__to_binding(this.inputFileSystem) : void 0;
8867
+ this.#instance = new instanceBinding.JsCompiler(this.compilerPath, rawOptions, this.#builtinPlugins, this.#registers, ThreadsafeOutputNodeFS.__to_binding(this.outputFileSystem), this.intermediateFileSystem ? ThreadsafeIntermediateNodeFS.__to_binding(this.intermediateFileSystem) : void 0, inputFileSystem, ResolverFactory.__to_binding(this.resolverFactory)), callback(null, this.#instance);
8630
8868
  }
8631
8869
  #createHooksRegisters() {
8632
8870
  let ref = new WeakRef(this), getCompiler = ()=>ref.deref(), createTap = this.#createHookRegisterTaps.bind(this), createMapTap = this.#createHookMapRegisterTaps.bind(this);
@@ -8764,7 +9002,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
8764
9002
  obj.children = this.stats.map((stat, idx)=>{
8765
9003
  let obj = stat.toJson(childOptions.children[idx]), compilationName = stat.compilation.name;
8766
9004
  return obj.name = compilationName && makePathsRelative(childOptions.context, compilationName, stat.compilation.compiler.root), obj;
8767
- }), childOptions.version && (obj.rspackVersion = "1.3.15", obj.version = "5.75.0"), childOptions.hash && (obj.hash = obj.children.map((j)=>j.hash).join(""));
9005
+ }), childOptions.version && (obj.rspackVersion = "1.4.0-beta.1", obj.version = "5.75.0"), childOptions.hash && (obj.hash = obj.children.map((j)=>j.hash).join(""));
8768
9006
  let mapError = (j, obj)=>({
8769
9007
  ...obj,
8770
9008
  compilerPath: obj.compilerPath ? `${j.name}.${obj.compilerPath}` : j.name
@@ -8816,7 +9054,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
8816
9054
  }
8817
9055
  size || callback(null);
8818
9056
  }
8819
- }, src_MultiWatching = class {
9057
+ }, MultiWatching = class {
8820
9058
  watchings;
8821
9059
  compiler;
8822
9060
  constructor(watchings, compiler){
@@ -8826,6 +9064,10 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
8826
9064
  if (callback) asyncLib.each(this.watchings, (watching, callback)=>watching.invalidate(callback), callback);
8827
9065
  else for (let watching of this.watchings)watching.invalidate();
8828
9066
  }
9067
+ invalidateWithChangesAndRemovals(changedFiles, removedFiles, callback) {
9068
+ if (callback) asyncLib.each(this.watchings, (watching, callback)=>watching.invalidateWithChangesAndRemovals(changedFiles, removedFiles, callback), callback);
9069
+ else for (let watching of this.watchings)watching.invalidateWithChangesAndRemovals(changedFiles, removedFiles);
9070
+ }
8829
9071
  close(callback) {
8830
9072
  asyncLib.each(this.watchings, (watching, finishedCallback)=>{
8831
9073
  watching.close(finishedCallback);
@@ -8841,7 +9083,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
8841
9083
  }
8842
9084
  };
8843
9085
  ArrayQueue_computedKey = Symbol.iterator;
8844
- let util_ArrayQueue = class {
9086
+ let ArrayQueue = class {
8845
9087
  _list;
8846
9088
  _listReversed;
8847
9089
  constructor(items){
@@ -8885,6 +9127,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
8885
9127
  hooks;
8886
9128
  _options;
8887
9129
  running;
9130
+ watching;
8888
9131
  constructor(compilers, options){
8889
9132
  let normalizedCompilers;
8890
9133
  normalizedCompilers = Array.isArray(compilers) ? compilers : Object.entries(compilers).map(([name, compiler])=>(compiler.name = name, compiler)), this.hooks = {
@@ -8895,6 +9138,8 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
8895
9138
  run: new lite_tapable_namespaceObject.MultiHook(normalizedCompilers.map((c)=>c.hooks.run)),
8896
9139
  watchClose: new lite_tapable_namespaceObject.SyncHook([]),
8897
9140
  watchRun: new lite_tapable_namespaceObject.MultiHook(normalizedCompilers.map((c)=>c.hooks.watchRun)),
9141
+ beforeCompile: new lite_tapable_namespaceObject.MultiHook(normalizedCompilers.map((c)=>c.hooks.beforeCompile)),
9142
+ shutdown: new lite_tapable_namespaceObject.MultiHook(normalizedCompilers.map((c)=>c.hooks.shutdown)),
8898
9143
  infrastructureLog: new lite_tapable_namespaceObject.MultiHook(normalizedCompilers.map((c)=>c.hooks.infrastructureLog))
8899
9144
  }, this.compilers = normalizedCompilers, this._options = {
8900
9145
  parallelism: options?.parallelism || Number.POSITIVE_INFINITY
@@ -8994,7 +9239,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
8994
9239
  node.parents.push(parent), parent.children.push(node);
8995
9240
  }
8996
9241
  }
8997
- let queue = new util_ArrayQueue();
9242
+ let queue = new ArrayQueue();
8998
9243
  for (let node of nodes)0 === node.parents.length && (node.state = "queued", queue.enqueue(node));
8999
9244
  let errored = !1, running = 0, parallelism = this._options.parallelism, nodeDone = (node, err, stats)=>{
9000
9245
  if (!errored) {
@@ -9034,12 +9279,17 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
9034
9279
  return processQueueWorker(), setupResults;
9035
9280
  }
9036
9281
  watch(watchOptions, handler) {
9037
- return this.running ? handler(new ConcurrentCompilationError()) : (this.running = !0, this.validateDependencies(handler)) ? new src_MultiWatching(this.#runGraph((compiler, idx, done, isBlocked, setChanged, setInvalid)=>{
9038
- let watching = compiler.watch(Array.isArray(watchOptions) ? watchOptions[idx] : watchOptions, done);
9039
- return watching && (watching.onInvalid = setInvalid, watching.onChange = setChanged, watching.isBlocked = isBlocked), watching;
9040
- }, (compiler, watching, _done)=>{
9041
- compiler.watching === watching && (watching.running || watching.invalidate());
9042
- }, handler), this) : new src_MultiWatching([], this);
9282
+ if (this.running) return handler(new ConcurrentCompilationError());
9283
+ if (this.running = !0, this.validateDependencies(handler)) {
9284
+ let watchings = this.#runGraph((compiler, idx, done, isBlocked, setChanged, setInvalid)=>{
9285
+ let watching = compiler.watch(Array.isArray(watchOptions) ? watchOptions[idx] : watchOptions, done);
9286
+ return watching && (watching.onInvalid = setInvalid, watching.onChange = setChanged, watching.isBlocked = isBlocked), watching;
9287
+ }, (compiler, watching, _done)=>{
9288
+ compiler.watching === watching && (watching.running || watching.invalidate());
9289
+ }, handler);
9290
+ return this.watching = new MultiWatching(watchings, this), this.watching;
9291
+ }
9292
+ return this.watching = new MultiWatching([], this), this.watching;
9043
9293
  }
9044
9294
  run(callback, options) {
9045
9295
  if (this.running) return callback(new ConcurrentCompilationError());
@@ -9058,7 +9308,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
9058
9308
  }
9059
9309
  let graceful_fs_index_js_namespaceObject = require("../compiled/graceful-fs/index.js");
9060
9310
  var graceful_fs_index_js_default = __webpack_require__.n(graceful_fs_index_js_namespaceObject);
9061
- let IgnoreWarningsPlugin = class {
9311
+ let lib_IgnoreWarningsPlugin = class {
9062
9312
  _ignorePattern;
9063
9313
  name = "IgnoreWarningsPlugin";
9064
9314
  constructor(ignorePattern){
@@ -9076,7 +9326,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
9076
9326
  let cache = new Map();
9077
9327
  compiler.cache.hooks.store.tap({
9078
9328
  name: MemoryCachePlugin.PLUGIN_NAME,
9079
- stage: Cache_Cache.STAGE_MEMORY
9329
+ stage: Cache.STAGE_MEMORY
9080
9330
  }, (identifier, etag, data)=>{
9081
9331
  let dataEtag = "function" == typeof etag?.toString ? etag.toString() : etag;
9082
9332
  cache.set(identifier, {
@@ -9085,7 +9335,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
9085
9335
  });
9086
9336
  }), compiler.cache.hooks.get.tap({
9087
9337
  name: MemoryCachePlugin.PLUGIN_NAME,
9088
- stage: Cache_Cache.STAGE_MEMORY
9338
+ stage: Cache.STAGE_MEMORY
9089
9339
  }, (identifier, etag, gotHandlers)=>{
9090
9340
  let cacheEntry = cache.get(identifier), dataEtag = "function" == typeof etag?.toString ? etag.toString() : etag;
9091
9341
  return null === cacheEntry ? null : void 0 !== cacheEntry ? cacheEntry.etag === dataEtag ? cacheEntry.data : null : void gotHandlers.push((result, callback)=>(void 0 === result ? cache.set(identifier, null) : cache.set(identifier, {
@@ -9094,12 +9344,13 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
9094
9344
  }), callback(null)));
9095
9345
  }), compiler.cache.hooks.shutdown.tap({
9096
9346
  name: MemoryCachePlugin.PLUGIN_NAME,
9097
- stage: Cache_Cache.STAGE_MEMORY
9347
+ stage: Cache.STAGE_MEMORY
9098
9348
  }, ()=>{
9099
9349
  cache.clear();
9100
9350
  });
9101
9351
  }
9102
9352
  }
9353
+ var statsFactoryUtils_StatsErrorCode = ((StatsErrorCode = {}).ChunkMinificationError = "ChunkMinificationError", StatsErrorCode.ChunkMinificationWarning = "ChunkMinificationWarning", StatsErrorCode.ModuleParseError = "ModuleParseError", StatsErrorCode.ModuleParseWarning = "ModuleParseWarning", StatsErrorCode.ModuleBuildError = "ModuleBuildError", StatsErrorCode);
9103
9354
  let iterateConfig = (config, options, fn)=>{
9104
9355
  for (let hookFor of Object.keys(config)){
9105
9356
  let subConfig = config[hookFor];
@@ -9654,7 +9905,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
9654
9905
  object.hash = context.getStatsCompilation(compilation).hash;
9655
9906
  },
9656
9907
  version: (object)=>{
9657
- object.version = "5.75.0", object.rspackVersion = "1.3.15";
9908
+ object.version = "5.75.0", object.rspackVersion = "1.4.0-beta.1";
9658
9909
  },
9659
9910
  env: (object, _compilation, _context, { _env })=>{
9660
9911
  object.env = _env;
@@ -10993,7 +11244,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
10993
11244
  moduleFilenameTemplate: options.output.devtoolModuleFilenameTemplate,
10994
11245
  namespace: options.output.devtoolNamespace
10995
11246
  }).apply(compiler);
10996
- if (new JavascriptModulesPlugin().apply(compiler), new JsonModulesPlugin().apply(compiler), new AssetModulesPlugin().apply(compiler), options.experiments.asyncWebAssembly && new AsyncWebAssemblyModulesPlugin().apply(compiler), options.experiments.css && new CssModulesPlugin().apply(compiler), new 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);
11247
+ if (new JavascriptModulesPlugin().apply(compiler), new JsonModulesPlugin().apply(compiler), new AssetModulesPlugin().apply(compiler), options.experiments.asyncWebAssembly && new AsyncWebAssemblyModulesPlugin().apply(compiler), options.experiments.css && new CssModulesPlugin().apply(compiler), new EntryOptionPlugin().apply(compiler), assertNotNill(options.context), compiler.hooks.entryOption.call(options.context, options.entry), new RuntimePlugin().apply(compiler), options.experiments.rspackFuture.bundlerInfo && new BundlerInfoRspackPlugin(options.experiments.rspackFuture.bundlerInfo).apply(compiler), new InferAsyncModulesPlugin().apply(compiler), new APIPlugin().apply(compiler), new DataUriPlugin().apply(compiler), new FileUriPlugin().apply(compiler), options.experiments.buildHttp && new HttpUriPlugin(options.experiments.buildHttp).apply(compiler), new EnsureChunkConditionsPlugin().apply(compiler), options.optimization.mergeDuplicateChunks && new MergeDuplicateChunksPlugin().apply(compiler), options.optimization.sideEffects && new SideEffectsFlagPlugin().apply(compiler), options.optimization.providedExports && new FlagDependencyExportsPlugin().apply(compiler), options.optimization.usedExports && new FlagDependencyUsagePlugin("global" === options.optimization.usedExports).apply(compiler), options.optimization.concatenateModules && new ModuleConcatenationPlugin().apply(compiler), options.optimization.mangleExports && new MangleExportsPlugin("size" !== options.optimization.mangleExports).apply(compiler), options.output.enabledLibraryTypes && options.output.enabledLibraryTypes.length > 0) for (let type of options.output.enabledLibraryTypes)new EnableLibraryPlugin(type).apply(compiler);
10997
11248
  options.optimization.splitChunks && new SplitChunksPlugin(options.optimization.splitChunks).apply(compiler), options.optimization.removeEmptyChunks && new RemoveEmptyChunksPlugin().apply(compiler), options.optimization.realContentHash && new RealContentHashPlugin().apply(compiler);
10998
11249
  let moduleIds = options.optimization.moduleIds;
10999
11250
  if (moduleIds) switch(moduleIds){
@@ -11038,7 +11289,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
11038
11289
  }).apply(compiler);
11039
11290
  let { minimize, minimizer } = options.optimization;
11040
11291
  if (minimize && minimizer) for (let item of minimizer)"function" == typeof item ? item.call(compiler, compiler) : "..." !== item && item && item.apply(compiler);
11041
- if (options.performance && new SizeLimitsPlugin(options.performance).apply(compiler), options.cache && new MemoryCachePlugin().apply(compiler), new WorkerPlugin(options.output.workerChunkLoading, options.output.workerWasmLoading, options.output.module, options.output.workerPublicPath).apply(compiler), new DefaultStatsFactoryPlugin().apply(compiler), new DefaultStatsPresetPlugin().apply(compiler), new DefaultStatsPrinterPlugin().apply(compiler), options.ignoreWarnings && options.ignoreWarnings.length > 0 && new IgnoreWarningsPlugin(options.ignoreWarnings).apply(compiler), compiler.hooks.afterPlugins.call(compiler), !compiler.inputFileSystem) throw Error("No input filesystem provided");
11292
+ if (options.performance && new SizeLimitsPlugin(options.performance).apply(compiler), options.cache && new MemoryCachePlugin().apply(compiler), new WorkerPlugin(options.output.workerChunkLoading, options.output.workerWasmLoading, options.output.module, options.output.workerPublicPath).apply(compiler), new DefaultStatsFactoryPlugin().apply(compiler), new DefaultStatsPresetPlugin().apply(compiler), new DefaultStatsPrinterPlugin().apply(compiler), options.ignoreWarnings && options.ignoreWarnings.length > 0 && new lib_IgnoreWarningsPlugin(options.ignoreWarnings).apply(compiler), compiler.hooks.afterPlugins.call(compiler), !compiler.inputFileSystem) throw Error("No input filesystem provided");
11042
11293
  compiler.hooks.afterResolvers.call(compiler);
11043
11294
  }
11044
11295
  }
@@ -11120,18 +11371,18 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
11120
11371
  });
11121
11372
  let asRegExp = (test)=>"string" == typeof test ? RegExp(`^${test.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&")}`) : test, matchPart = (str, test)=>!test || (Array.isArray(test) ? test.map(asRegExp).some((regExp)=>regExp.test(str)) : asRegExp(test).test(str)), matchObject = (obj, str)=>!(obj.test && !matchPart(str, obj.test) || obj.include && !matchPart(str, obj.include) || obj.exclude && matchPart(str, obj.exclude)), FlagAllModulesAsUsedPlugin = base_create(binding_.BuiltinPluginName.FlagAllModulesAsUsedPlugin, (explanation)=>({
11122
11373
  explanation
11123
- })), dllPluginOptions = zod_index_js_namespaceObject.z.object({
11124
- context: zod_index_js_namespaceObject.z.string().optional(),
11125
- entryOnly: zod_index_js_namespaceObject.z.boolean().optional(),
11126
- format: zod_index_js_namespaceObject.z.boolean().optional(),
11127
- name: zod_index_js_namespaceObject.z.string().optional(),
11128
- path: zod_index_js_namespaceObject.z.string(),
11129
- type: zod_index_js_namespaceObject.z.string().optional()
11130
- });
11374
+ })), getDllPluginOptionsSchema = memoize(()=>zod_index_js_namespaceObject.z.object({
11375
+ context: zod_index_js_namespaceObject.z.string().optional(),
11376
+ entryOnly: zod_index_js_namespaceObject.z.boolean().optional(),
11377
+ format: zod_index_js_namespaceObject.z.boolean().optional(),
11378
+ name: zod_index_js_namespaceObject.z.string().optional(),
11379
+ path: zod_index_js_namespaceObject.z.string(),
11380
+ type: zod_index_js_namespaceObject.z.string().optional()
11381
+ }));
11131
11382
  class DllPlugin {
11132
11383
  options;
11133
11384
  constructor(options){
11134
- validate(options, dllPluginOptions), this.options = {
11385
+ validate(options, getDllPluginOptionsSchema()), this.options = {
11135
11386
  ...options,
11136
11387
  entryOnly: !1 !== options.entryOnly
11137
11388
  };
@@ -11149,60 +11400,63 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
11149
11400
  }), new LibManifestPlugin(this.options).apply(compiler), this.options.entryOnly || new FlagAllModulesAsUsedPlugin("DllPlugin").apply(compiler);
11150
11401
  }
11151
11402
  }
11152
- let dllReferencePluginOptionsContentItem = zod_index_js_namespaceObject.z.object({
11153
- buildMeta: zod_index_js_namespaceObject.z.custom().optional(),
11154
- exports: zod_index_js_namespaceObject.z.array(zod_index_js_namespaceObject.z.string()).or(zod_index_js_namespaceObject.z.literal(!0)).optional(),
11155
- id: zod_index_js_namespaceObject.z.string().or(zod_index_js_namespaceObject.z.number()).optional()
11156
- }), dllReferencePluginOptionsContent = zod_index_js_namespaceObject.z.record(zod_index_js_namespaceObject.z.string(), dllReferencePluginOptionsContentItem), dllReferencePluginOptionsSourceType = zod_index_js_namespaceObject.z.enum([
11157
- "var",
11158
- "assign",
11159
- "this",
11160
- "window",
11161
- "global",
11162
- "commonjs",
11163
- "commonjs2",
11164
- "commonjs-module",
11165
- "amd",
11166
- "amd-require",
11167
- "umd",
11168
- "umd2",
11169
- "jsonp",
11170
- "system"
11171
- ]), dllReferencePluginOptionsManifest = zod_index_js_namespaceObject.z.object({
11172
- content: dllReferencePluginOptionsContent,
11173
- name: zod_index_js_namespaceObject.z.string().optional(),
11174
- type: dllReferencePluginOptionsSourceType.optional()
11175
- }), dllReferencePluginOptions = zod_index_js_namespaceObject.z.union([
11176
- zod_index_js_namespaceObject.z.object({
11177
- context: zod_index_js_namespaceObject.z.string().optional(),
11178
- extensions: zod_index_js_namespaceObject.z.array(zod_index_js_namespaceObject.z.string()).optional(),
11179
- manifest: zod_index_js_namespaceObject.z.string().or(dllReferencePluginOptionsManifest),
11180
- name: zod_index_js_namespaceObject.z.string().optional(),
11181
- scope: zod_index_js_namespaceObject.z.string().optional(),
11182
- sourceType: dllReferencePluginOptionsSourceType.optional(),
11183
- type: zod_index_js_namespaceObject.z.enum([
11184
- "require",
11185
- "object"
11186
- ]).optional()
11187
- }),
11188
- zod_index_js_namespaceObject.z.object({
11403
+ let getDllReferencePluginOptionsSchema = memoize(()=>{
11404
+ let dllReferencePluginOptionsContentItem = zod_index_js_namespaceObject.z.object({
11405
+ buildMeta: zod_index_js_namespaceObject.z.custom().optional(),
11406
+ exports: zod_index_js_namespaceObject.z.array(zod_index_js_namespaceObject.z.string()).or(zod_index_js_namespaceObject.z.literal(!0)).optional(),
11407
+ id: zod_index_js_namespaceObject.z.string().or(zod_index_js_namespaceObject.z.number()).optional()
11408
+ }), dllReferencePluginOptionsContent = zod_index_js_namespaceObject.z.record(zod_index_js_namespaceObject.z.string(), dllReferencePluginOptionsContentItem), dllReferencePluginOptionsSourceType = zod_index_js_namespaceObject.z.enum([
11409
+ "var",
11410
+ "assign",
11411
+ "this",
11412
+ "window",
11413
+ "global",
11414
+ "commonjs",
11415
+ "commonjs2",
11416
+ "commonjs-module",
11417
+ "amd",
11418
+ "amd-require",
11419
+ "umd",
11420
+ "umd2",
11421
+ "jsonp",
11422
+ "system"
11423
+ ]), dllReferencePluginOptionsManifest = zod_index_js_namespaceObject.z.object({
11189
11424
  content: dllReferencePluginOptionsContent,
11190
- context: zod_index_js_namespaceObject.z.string().optional(),
11191
- extensions: zod_index_js_namespaceObject.z.array(zod_index_js_namespaceObject.z.string()).optional(),
11192
- name: zod_index_js_namespaceObject.z.string(),
11193
- scope: zod_index_js_namespaceObject.z.string().optional(),
11194
- sourceType: dllReferencePluginOptionsSourceType.optional(),
11195
- type: zod_index_js_namespaceObject.z.enum([
11196
- "require",
11197
- "object"
11198
- ]).optional()
11199
- })
11200
- ]);
11425
+ name: zod_index_js_namespaceObject.z.string().optional(),
11426
+ type: dllReferencePluginOptionsSourceType.optional()
11427
+ });
11428
+ return zod_index_js_namespaceObject.z.union([
11429
+ zod_index_js_namespaceObject.z.object({
11430
+ context: zod_index_js_namespaceObject.z.string().optional(),
11431
+ extensions: zod_index_js_namespaceObject.z.array(zod_index_js_namespaceObject.z.string()).optional(),
11432
+ manifest: zod_index_js_namespaceObject.z.string().or(dllReferencePluginOptionsManifest),
11433
+ name: zod_index_js_namespaceObject.z.string().optional(),
11434
+ scope: zod_index_js_namespaceObject.z.string().optional(),
11435
+ sourceType: dllReferencePluginOptionsSourceType.optional(),
11436
+ type: zod_index_js_namespaceObject.z.enum([
11437
+ "require",
11438
+ "object"
11439
+ ]).optional()
11440
+ }),
11441
+ zod_index_js_namespaceObject.z.object({
11442
+ content: dllReferencePluginOptionsContent,
11443
+ context: zod_index_js_namespaceObject.z.string().optional(),
11444
+ extensions: zod_index_js_namespaceObject.z.array(zod_index_js_namespaceObject.z.string()).optional(),
11445
+ name: zod_index_js_namespaceObject.z.string(),
11446
+ scope: zod_index_js_namespaceObject.z.string().optional(),
11447
+ sourceType: dllReferencePluginOptionsSourceType.optional(),
11448
+ type: zod_index_js_namespaceObject.z.enum([
11449
+ "require",
11450
+ "object"
11451
+ ]).optional()
11452
+ })
11453
+ ]);
11454
+ });
11201
11455
  class DllReferencePlugin {
11202
11456
  options;
11203
11457
  errors;
11204
11458
  constructor(options){
11205
- validate(options, dllReferencePluginOptions), this.options = options, this.errors = new WeakMap();
11459
+ validate(options, getDllReferencePluginOptionsSchema()), this.options = options, this.errors = new WeakMap();
11206
11460
  }
11207
11461
  apply(compiler) {
11208
11462
  compiler.hooks.beforeCompile.tapPromise(DllReferencePlugin.name, async (params)=>{
@@ -11241,7 +11495,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
11241
11495
  });
11242
11496
  }
11243
11497
  }
11244
- class DllManifestError extends WebpackError {
11498
+ class DllManifestError extends lib_WebpackError {
11245
11499
  constructor(filename, message){
11246
11500
  super(), this.name = "DllManifestError", this.message = `Dll manifest ${filename}\n${message}`;
11247
11501
  }
@@ -11257,7 +11511,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
11257
11511
  for (let key of this.keys){
11258
11512
  let value = void 0 !== process.env[key] ? process.env[key] : this.defaultValues[key];
11259
11513
  void 0 === value && compiler.hooks.thisCompilation.tap("EnvironmentPlugin", (compilation)=>{
11260
- 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.`);
11514
+ let error = new lib_WebpackError(`EnvironmentPlugin - ${key} environment variable is undefined.\n\nYou can pass an object with default values to suppress this warning.\nSee https://rspack.rs/plugins/webpack/environment-plugin for example.`);
11261
11515
  error.name = "EnvVariableNotDefinedError", compilation.errors.push(error);
11262
11516
  }), definitions[`process.env.${key}`] = void 0 === value ? "undefined" : JSON.stringify(value);
11263
11517
  }
@@ -11587,446 +11841,349 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
11587
11841
  });
11588
11842
  }
11589
11843
  }
11590
- let ZodSwcEnvConfig = zod_index_js_namespaceObject.z.strictObject({
11591
- mode: zod_index_js_namespaceObject.z.enum([
11592
- "usage",
11593
- "entry"
11594
- ]).optional(),
11595
- debug: zod_index_js_namespaceObject.z.boolean().optional(),
11596
- dynamicImport: zod_index_js_namespaceObject.z.boolean().optional(),
11597
- loose: zod_index_js_namespaceObject.z.boolean().optional(),
11598
- bugfixes: zod_index_js_namespaceObject.z.boolean().optional(),
11599
- skip: zod_index_js_namespaceObject.z.string().array().optional(),
11600
- include: zod_index_js_namespaceObject.z.string().array().optional(),
11601
- exclude: zod_index_js_namespaceObject.z.string().array().optional(),
11602
- coreJs: zod_index_js_namespaceObject.z.string().optional(),
11603
- targets: zod_index_js_namespaceObject.z.any().optional(),
11604
- path: zod_index_js_namespaceObject.z.string().optional(),
11605
- shippedProposals: zod_index_js_namespaceObject.z.boolean().optional(),
11606
- forceAllTransforms: zod_index_js_namespaceObject.z.boolean().optional()
11607
- }), ZodSwcAssumptions = zod_index_js_namespaceObject.z.strictObject({
11608
- arrayLikeIsIterable: zod_index_js_namespaceObject.z.boolean().optional(),
11609
- constantReexports: zod_index_js_namespaceObject.z.boolean().optional(),
11610
- constantSuper: zod_index_js_namespaceObject.z.boolean().optional(),
11611
- enumerableModuleMeta: zod_index_js_namespaceObject.z.boolean().optional(),
11612
- ignoreFunctionLength: zod_index_js_namespaceObject.z.boolean().optional(),
11613
- ignoreFunctionName: zod_index_js_namespaceObject.z.boolean().optional(),
11614
- ignoreToPrimitiveHint: zod_index_js_namespaceObject.z.boolean().optional(),
11615
- iterableIsArray: zod_index_js_namespaceObject.z.boolean().optional(),
11616
- mutableTemplateObject: zod_index_js_namespaceObject.z.boolean().optional(),
11617
- noClassCalls: zod_index_js_namespaceObject.z.boolean().optional(),
11618
- noDocumentAll: zod_index_js_namespaceObject.z.boolean().optional(),
11619
- noIncompleteNsImportDetection: zod_index_js_namespaceObject.z.boolean().optional(),
11620
- noNewArrows: zod_index_js_namespaceObject.z.boolean().optional(),
11621
- objectRestNoSymbols: zod_index_js_namespaceObject.z.boolean().optional(),
11622
- privateFieldsAsProperties: zod_index_js_namespaceObject.z.boolean().optional(),
11623
- pureGetters: zod_index_js_namespaceObject.z.boolean().optional(),
11624
- setClassMethods: zod_index_js_namespaceObject.z.boolean().optional(),
11625
- setComputedProperties: zod_index_js_namespaceObject.z.boolean().optional(),
11626
- setPublicClassFields: zod_index_js_namespaceObject.z.boolean().optional(),
11627
- setSpreadProperties: zod_index_js_namespaceObject.z.boolean().optional(),
11628
- skipForOfIteratorClosing: zod_index_js_namespaceObject.z.boolean().optional(),
11629
- superIsCallableConstructor: zod_index_js_namespaceObject.z.boolean().optional(),
11630
- tsEnumIsReadonly: zod_index_js_namespaceObject.z.boolean().optional()
11631
- }), ZodSwcParserConfig = zod_index_js_namespaceObject.z.strictObject({
11632
- syntax: zod_index_js_namespaceObject.z.enum([
11633
- "typescript",
11634
- "ecmascript"
11635
- ]),
11636
- tsx: zod_index_js_namespaceObject.z.boolean().optional(),
11637
- decorators: zod_index_js_namespaceObject.z.boolean().optional(),
11638
- dynamicImport: zod_index_js_namespaceObject.z.boolean().optional(),
11639
- jsx: zod_index_js_namespaceObject.z.boolean().optional(),
11640
- numericSeparator: zod_index_js_namespaceObject.z.boolean().optional(),
11641
- classPrivateProperty: zod_index_js_namespaceObject.z.boolean().optional(),
11642
- privateMethod: zod_index_js_namespaceObject.z.boolean().optional(),
11643
- classProperty: zod_index_js_namespaceObject.z.boolean().optional(),
11644
- functionBind: zod_index_js_namespaceObject.z.boolean().optional(),
11645
- decoratorsBeforeExport: zod_index_js_namespaceObject.z.boolean().optional(),
11646
- exportDefaultFrom: zod_index_js_namespaceObject.z.boolean().optional(),
11647
- exportNamespaceFrom: zod_index_js_namespaceObject.z.boolean().optional(),
11648
- nullishCoalescing: zod_index_js_namespaceObject.z.boolean().optional(),
11649
- optionalChaining: zod_index_js_namespaceObject.z.boolean().optional(),
11650
- importMeta: zod_index_js_namespaceObject.z.boolean().optional(),
11651
- topLevelAwait: zod_index_js_namespaceObject.z.boolean().optional(),
11652
- importAssertions: zod_index_js_namespaceObject.z.boolean().optional(),
11653
- importAttributes: zod_index_js_namespaceObject.z.boolean().optional(),
11654
- allowSuperOutsideMethod: zod_index_js_namespaceObject.z.boolean().optional(),
11655
- allowReturnOutsideFunction: zod_index_js_namespaceObject.z.boolean().optional(),
11656
- autoAccessors: zod_index_js_namespaceObject.z.boolean().optional(),
11657
- explicitResourceManagement: zod_index_js_namespaceObject.z.boolean().optional()
11658
- }), ZodSwcJscTarget = zod_index_js_namespaceObject.z.enum([
11659
- "es3",
11660
- "es5",
11661
- "es2015",
11662
- "es2016",
11663
- "es2017",
11664
- "es2018",
11665
- "es2019",
11666
- "es2020",
11667
- "es2021",
11668
- "es2022",
11669
- "es2023",
11670
- "es2024",
11671
- "esnext"
11672
- ]), ZodSwcTerserEcmaVersion = zod_index_js_namespaceObject.z.union([
11673
- zod_index_js_namespaceObject.z.literal(5),
11674
- zod_index_js_namespaceObject.z.literal(2015),
11675
- zod_index_js_namespaceObject.z.literal(2016),
11676
- zod_index_js_namespaceObject.z.string(),
11677
- zod_index_js_namespaceObject.z.number()
11678
- ]), ZodSwcJsFormatOptions = zod_index_js_namespaceObject.z.strictObject({
11679
- asciiOnly: zod_index_js_namespaceObject.z.boolean().optional(),
11680
- beautify: zod_index_js_namespaceObject.z.boolean().optional(),
11681
- braces: zod_index_js_namespaceObject.z.boolean().optional(),
11682
- comments: zod_index_js_namespaceObject.z.literal("some").or(zod_index_js_namespaceObject.z.literal("all")).or(zod_index_js_namespaceObject.z.literal(!1)).optional(),
11683
- ecma: ZodSwcTerserEcmaVersion.optional(),
11684
- indentLevel: zod_index_js_namespaceObject.z.number().optional(),
11685
- indentStart: zod_index_js_namespaceObject.z.number().optional(),
11686
- inlineScript: zod_index_js_namespaceObject.z.boolean().optional(),
11687
- keepNumbers: zod_index_js_namespaceObject.z.number().optional(),
11688
- keepQuotedProps: zod_index_js_namespaceObject.z.boolean().optional(),
11689
- maxLineLen: zod_index_js_namespaceObject.z.number().optional(),
11690
- preamble: zod_index_js_namespaceObject.z.string().optional(),
11691
- quoteKeys: zod_index_js_namespaceObject.z.boolean().optional(),
11692
- quoteStyle: zod_index_js_namespaceObject.z.boolean().optional(),
11693
- preserveAnnotations: zod_index_js_namespaceObject.z.boolean().optional(),
11694
- safari10: zod_index_js_namespaceObject.z.boolean().optional(),
11695
- semicolons: zod_index_js_namespaceObject.z.boolean().optional(),
11696
- shebang: zod_index_js_namespaceObject.z.boolean().optional(),
11697
- webkit: zod_index_js_namespaceObject.z.boolean().optional(),
11698
- wrapIife: zod_index_js_namespaceObject.z.boolean().optional(),
11699
- wrapFuncArgs: zod_index_js_namespaceObject.z.boolean().optional()
11700
- }), ZodSwcTerserCompressOptions = zod_index_js_namespaceObject.z.strictObject({
11701
- arguments: zod_index_js_namespaceObject.z.boolean().optional(),
11702
- arrows: zod_index_js_namespaceObject.z.boolean().optional(),
11703
- booleans: zod_index_js_namespaceObject.z.boolean().optional(),
11704
- booleans_as_integers: zod_index_js_namespaceObject.z.boolean().optional(),
11705
- collapse_vars: zod_index_js_namespaceObject.z.boolean().optional(),
11706
- comparisons: zod_index_js_namespaceObject.z.boolean().optional(),
11707
- computed_props: zod_index_js_namespaceObject.z.boolean().optional(),
11708
- conditionals: zod_index_js_namespaceObject.z.boolean().optional(),
11709
- dead_code: zod_index_js_namespaceObject.z.boolean().optional(),
11710
- defaults: zod_index_js_namespaceObject.z.boolean().optional(),
11711
- directives: zod_index_js_namespaceObject.z.boolean().optional(),
11712
- drop_console: zod_index_js_namespaceObject.z.boolean().optional(),
11713
- drop_debugger: zod_index_js_namespaceObject.z.boolean().optional(),
11714
- ecma: ZodSwcTerserEcmaVersion.optional(),
11715
- evaluate: zod_index_js_namespaceObject.z.boolean().optional(),
11716
- expression: zod_index_js_namespaceObject.z.boolean().optional(),
11717
- global_defs: zod_index_js_namespaceObject.z.any().optional(),
11718
- hoist_funs: zod_index_js_namespaceObject.z.boolean().optional(),
11719
- hoist_props: zod_index_js_namespaceObject.z.boolean().optional(),
11720
- hoist_vars: zod_index_js_namespaceObject.z.boolean().optional(),
11721
- ie8: zod_index_js_namespaceObject.z.boolean().optional(),
11722
- if_return: zod_index_js_namespaceObject.z.boolean().optional(),
11723
- inline: zod_index_js_namespaceObject.z.literal(0).or(zod_index_js_namespaceObject.z.literal(1)).or(zod_index_js_namespaceObject.z.literal(2)).or(zod_index_js_namespaceObject.z.literal(3)).optional(),
11724
- join_vars: zod_index_js_namespaceObject.z.boolean().optional(),
11725
- keep_classnames: zod_index_js_namespaceObject.z.boolean().optional(),
11726
- keep_fargs: zod_index_js_namespaceObject.z.boolean().optional(),
11727
- keep_fnames: zod_index_js_namespaceObject.z.boolean().optional(),
11728
- keep_infinity: zod_index_js_namespaceObject.z.boolean().optional(),
11729
- loops: zod_index_js_namespaceObject.z.boolean().optional(),
11730
- negate_iife: zod_index_js_namespaceObject.z.boolean().optional(),
11731
- passes: zod_index_js_namespaceObject.z.number().optional(),
11732
- properties: zod_index_js_namespaceObject.z.boolean().optional(),
11733
- pure_getters: zod_index_js_namespaceObject.z.any().optional(),
11734
- pure_funcs: zod_index_js_namespaceObject.z.string().array().optional(),
11735
- reduce_funcs: zod_index_js_namespaceObject.z.boolean().optional(),
11736
- reduce_vars: zod_index_js_namespaceObject.z.boolean().optional(),
11737
- sequences: zod_index_js_namespaceObject.z.any().optional(),
11738
- side_effects: zod_index_js_namespaceObject.z.boolean().optional(),
11739
- switches: zod_index_js_namespaceObject.z.boolean().optional(),
11740
- top_retain: zod_index_js_namespaceObject.z.any().optional(),
11741
- toplevel: zod_index_js_namespaceObject.z.any().optional(),
11742
- typeofs: zod_index_js_namespaceObject.z.boolean().optional(),
11743
- unsafe: zod_index_js_namespaceObject.z.boolean().optional(),
11744
- unsafe_passes: zod_index_js_namespaceObject.z.boolean().optional(),
11745
- unsafe_arrows: zod_index_js_namespaceObject.z.boolean().optional(),
11746
- unsafe_comps: zod_index_js_namespaceObject.z.boolean().optional(),
11747
- unsafe_function: zod_index_js_namespaceObject.z.boolean().optional(),
11748
- unsafe_math: zod_index_js_namespaceObject.z.boolean().optional(),
11749
- unsafe_symbols: zod_index_js_namespaceObject.z.boolean().optional(),
11750
- unsafe_methods: zod_index_js_namespaceObject.z.boolean().optional(),
11751
- unsafe_proto: zod_index_js_namespaceObject.z.boolean().optional(),
11752
- unsafe_regexp: zod_index_js_namespaceObject.z.boolean().optional(),
11753
- unsafe_undefined: zod_index_js_namespaceObject.z.boolean().optional(),
11754
- unused: zod_index_js_namespaceObject.z.boolean().optional(),
11755
- const_to_let: zod_index_js_namespaceObject.z.boolean().optional(),
11756
- module: zod_index_js_namespaceObject.z.boolean().optional()
11757
- }), ZodSwcTerserMangleOptions = zod_index_js_namespaceObject.z.strictObject({
11758
- props: zod_index_js_namespaceObject.z.record(zod_index_js_namespaceObject.z.string(), zod_index_js_namespaceObject.z.any()).optional(),
11759
- topLevel: zod_index_js_namespaceObject.z.boolean().optional(),
11760
- toplevel: zod_index_js_namespaceObject.z.boolean().optional(),
11761
- keepClassNames: zod_index_js_namespaceObject.z.boolean().optional(),
11762
- keep_classnames: zod_index_js_namespaceObject.z.boolean().optional(),
11763
- keepFnNames: zod_index_js_namespaceObject.z.boolean().optional(),
11764
- keep_fnames: zod_index_js_namespaceObject.z.boolean().optional(),
11765
- keepPrivateProps: zod_index_js_namespaceObject.z.boolean().optional(),
11766
- keep_private_props: zod_index_js_namespaceObject.z.boolean().optional(),
11767
- ie8: zod_index_js_namespaceObject.z.boolean().optional(),
11768
- safari10: zod_index_js_namespaceObject.z.boolean().optional(),
11769
- reserved: zod_index_js_namespaceObject.z.string().array().optional()
11770
- }), ZodSwcReactConfig = zod_index_js_namespaceObject.z.strictObject({
11771
- pragma: zod_index_js_namespaceObject.z.string().optional(),
11772
- pragmaFrag: zod_index_js_namespaceObject.z.string().optional(),
11773
- throwIfNamespace: zod_index_js_namespaceObject.z.boolean().optional(),
11774
- development: zod_index_js_namespaceObject.z.boolean().optional(),
11775
- useBuiltins: zod_index_js_namespaceObject.z.boolean().optional(),
11776
- refresh: zod_index_js_namespaceObject.z.boolean().or(zod_index_js_namespaceObject.z.strictObject({
11777
- refreshReg: zod_index_js_namespaceObject.z.string().optional(),
11778
- refreshSig: zod_index_js_namespaceObject.z.string().optional(),
11779
- emitFullSignatures: zod_index_js_namespaceObject.z.boolean().optional()
11780
- })).optional(),
11781
- runtime: zod_index_js_namespaceObject.z.enum([
11782
- "automatic",
11783
- "classic"
11784
- ]).optional(),
11785
- importSource: zod_index_js_namespaceObject.z.string().optional()
11786
- }), ZodSwcConstModulesConfig = zod_index_js_namespaceObject.z.strictObject({
11787
- globals: zod_index_js_namespaceObject.z.record(zod_index_js_namespaceObject.z.string(), zod_index_js_namespaceObject.z.record(zod_index_js_namespaceObject.z.string(), zod_index_js_namespaceObject.z.string())).optional()
11788
- }), ZodSwcGlobalPassOption = zod_index_js_namespaceObject.z.strictObject({
11789
- vars: zod_index_js_namespaceObject.z.record(zod_index_js_namespaceObject.z.string(), zod_index_js_namespaceObject.z.string()).optional(),
11790
- envs: zod_index_js_namespaceObject.z.union([
11791
- zod_index_js_namespaceObject.z.string().array(),
11792
- zod_index_js_namespaceObject.z.record(zod_index_js_namespaceObject.z.string(), zod_index_js_namespaceObject.z.string())
11793
- ]).optional(),
11794
- typeofs: zod_index_js_namespaceObject.z.record(zod_index_js_namespaceObject.z.string(), zod_index_js_namespaceObject.z.string()).optional()
11795
- }), ZodSwcOptimizerConfig = zod_index_js_namespaceObject.z.strictObject({
11796
- simplify: zod_index_js_namespaceObject.z.boolean().optional(),
11797
- globals: ZodSwcGlobalPassOption.optional(),
11798
- jsonify: zod_index_js_namespaceObject.z.strictObject({
11799
- minCost: zod_index_js_namespaceObject.z.number()
11800
- }).optional()
11801
- }), ZodSwcTransformConfig = zod_index_js_namespaceObject.z.strictObject({
11802
- react: ZodSwcReactConfig.optional(),
11803
- constModules: ZodSwcConstModulesConfig.optional(),
11804
- optimizer: ZodSwcOptimizerConfig.optional(),
11805
- legacyDecorator: zod_index_js_namespaceObject.z.boolean().optional(),
11806
- decoratorMetadata: zod_index_js_namespaceObject.z.boolean().optional(),
11807
- decoratorVersion: zod_index_js_namespaceObject.z.enum([
11808
- "2021-12",
11809
- "2022-03"
11810
- ]).optional(),
11811
- treatConstEnumAsEnum: zod_index_js_namespaceObject.z.boolean().optional(),
11812
- useDefineForClassFields: zod_index_js_namespaceObject.z.boolean().optional(),
11813
- verbatimModuleSyntax: zod_index_js_namespaceObject.z.boolean().optional()
11814
- }), ZodSwcJsMinifyOptions = zod_index_js_namespaceObject.z.strictObject({
11815
- compress: zod_index_js_namespaceObject.z.union([
11816
- ZodSwcTerserCompressOptions,
11817
- zod_index_js_namespaceObject.z.boolean()
11818
- ]).optional(),
11819
- format: ZodSwcJsFormatOptions.optional(),
11820
- mangle: zod_index_js_namespaceObject.z.union([
11821
- ZodSwcTerserMangleOptions,
11822
- zod_index_js_namespaceObject.z.boolean()
11823
- ]).optional(),
11824
- ecma: ZodSwcTerserEcmaVersion.optional(),
11825
- keep_classnames: zod_index_js_namespaceObject.z.boolean().optional(),
11826
- keep_fnames: zod_index_js_namespaceObject.z.boolean().optional(),
11827
- module: zod_index_js_namespaceObject.z.union([
11828
- zod_index_js_namespaceObject.z.boolean(),
11829
- zod_index_js_namespaceObject.z.literal("unknown")
11830
- ]).optional(),
11831
- safari10: zod_index_js_namespaceObject.z.boolean().optional(),
11832
- toplevel: zod_index_js_namespaceObject.z.boolean().optional(),
11833
- sourceMap: zod_index_js_namespaceObject.z.boolean().optional(),
11834
- outputPath: zod_index_js_namespaceObject.z.string().optional(),
11835
- inlineSourcesContent: zod_index_js_namespaceObject.z.boolean().optional()
11836
- }), ZodSwcJscConfig = zod_index_js_namespaceObject.z.strictObject({
11837
- assumptions: ZodSwcAssumptions.optional(),
11838
- loose: zod_index_js_namespaceObject.z.boolean().optional(),
11839
- parser: ZodSwcParserConfig.optional(),
11840
- transform: ZodSwcTransformConfig.optional(),
11841
- externalHelpers: zod_index_js_namespaceObject.z.boolean().optional(),
11842
- target: ZodSwcJscTarget.optional(),
11843
- keepClassNames: zod_index_js_namespaceObject.z.boolean().optional(),
11844
- experimental: zod_index_js_namespaceObject.z.strictObject({
11845
- optimizeHygiene: zod_index_js_namespaceObject.z.boolean().optional(),
11846
- keepImportAttributes: zod_index_js_namespaceObject.z.boolean().optional(),
11847
- emitAssertForImportAttributes: zod_index_js_namespaceObject.z.boolean().optional(),
11848
- cacheRoot: zod_index_js_namespaceObject.z.string().optional(),
11849
- plugins: zod_index_js_namespaceObject.z.array(zod_index_js_namespaceObject.z.tuple([
11850
- zod_index_js_namespaceObject.z.string(),
11851
- zod_index_js_namespaceObject.z.record(zod_index_js_namespaceObject.z.string(), zod_index_js_namespaceObject.z.any())
11852
- ])).optional(),
11853
- runPluginFirst: zod_index_js_namespaceObject.z.boolean().optional(),
11854
- disableBuiltinTransformsForInternalTesting: zod_index_js_namespaceObject.z.boolean().optional(),
11855
- emitIsolatedDts: zod_index_js_namespaceObject.z.boolean().optional(),
11856
- disableAllLints: zod_index_js_namespaceObject.z.boolean().optional(),
11857
- keepImportAssertions: zod_index_js_namespaceObject.z.boolean().optional()
11858
- }).optional(),
11859
- baseUrl: zod_index_js_namespaceObject.z.string().optional(),
11860
- paths: zod_index_js_namespaceObject.z.record(zod_index_js_namespaceObject.z.string(), zod_index_js_namespaceObject.z.string().array()).optional(),
11861
- minify: ZodSwcJsMinifyOptions.optional(),
11862
- preserveAllComments: zod_index_js_namespaceObject.z.boolean().optional()
11863
- }), ZodSwcBaseModuleConfig = zod_index_js_namespaceObject.z.strictObject({
11864
- strict: zod_index_js_namespaceObject.z.boolean().optional(),
11865
- strictMode: zod_index_js_namespaceObject.z.boolean().optional(),
11866
- lazy: zod_index_js_namespaceObject.z.union([
11867
- zod_index_js_namespaceObject.z.boolean(),
11868
- zod_index_js_namespaceObject.z.string().array()
11869
- ]).optional(),
11870
- noInterop: zod_index_js_namespaceObject.z.boolean().optional(),
11871
- importInterop: zod_index_js_namespaceObject.z.enum([
11872
- "swc",
11873
- "babel",
11874
- "node",
11875
- "none"
11876
- ]).optional(),
11877
- outFileExtension: zod_index_js_namespaceObject.z.enum([
11878
- "js",
11879
- "mjs",
11880
- "cjs"
11881
- ]).optional(),
11882
- exportInteropAnnotation: zod_index_js_namespaceObject.z.boolean().optional(),
11883
- ignoreDynamic: zod_index_js_namespaceObject.z.boolean().optional(),
11884
- allowTopLevelThis: zod_index_js_namespaceObject.z.boolean().optional(),
11885
- preserveImportMeta: zod_index_js_namespaceObject.z.boolean().optional()
11886
- }), ZodSwcEs6Config = ZodSwcBaseModuleConfig.extend({
11887
- type: zod_index_js_namespaceObject.z.literal("es6")
11888
- }), ZodSwcNodeNextConfig = ZodSwcBaseModuleConfig.extend({
11889
- type: zod_index_js_namespaceObject.z.literal("nodenext")
11890
- }), ZodSwcCommonJsConfig = ZodSwcBaseModuleConfig.extend({
11891
- type: zod_index_js_namespaceObject.z.literal("commonjs")
11892
- }), ZodSwcUmdConfig = ZodSwcBaseModuleConfig.extend({
11893
- type: zod_index_js_namespaceObject.z.literal("umd"),
11894
- globals: zod_index_js_namespaceObject.z.record(zod_index_js_namespaceObject.z.string(), zod_index_js_namespaceObject.z.string()).optional()
11895
- }), ZodSwcAmdConfig = ZodSwcBaseModuleConfig.extend({
11896
- type: zod_index_js_namespaceObject.z.literal("amd"),
11897
- moduleId: zod_index_js_namespaceObject.z.string().optional()
11898
- }), ZodSwcSystemjsConfig = zod_index_js_namespaceObject.z.strictObject({
11899
- type: zod_index_js_namespaceObject.z.literal("systemjs"),
11900
- allowTopLevelThis: zod_index_js_namespaceObject.z.boolean().optional()
11901
- }), ZodSwcModuleConfig = zod_index_js_namespaceObject.z.union([
11902
- ZodSwcEs6Config,
11903
- ZodSwcCommonJsConfig,
11904
- ZodSwcUmdConfig,
11905
- ZodSwcAmdConfig,
11906
- ZodSwcNodeNextConfig,
11907
- ZodSwcSystemjsConfig
11908
- ]), ZodSwcLoaderOptions = zod_index_js_namespaceObject.z.strictObject({
11909
- $schema: zod_index_js_namespaceObject.z.string().optional(),
11910
- test: zod_index_js_namespaceObject.z.string().or(zod_index_js_namespaceObject.z.string().array()).optional(),
11911
- exclude: zod_index_js_namespaceObject.z.string().or(zod_index_js_namespaceObject.z.string().array()).optional(),
11912
- env: ZodSwcEnvConfig.optional(),
11913
- jsc: ZodSwcJscConfig.optional(),
11914
- module: ZodSwcModuleConfig.optional(),
11915
- minify: zod_index_js_namespaceObject.z.boolean().optional(),
11916
- sourceMaps: zod_index_js_namespaceObject.z.boolean().or(zod_index_js_namespaceObject.z.literal("inline")).optional(),
11917
- inlineSourcesContent: zod_index_js_namespaceObject.z.boolean().optional()
11918
- }).extend({
11919
- isModule: zod_index_js_namespaceObject.z.boolean().or(zod_index_js_namespaceObject.z.literal("unknown")).optional(),
11920
- rspackExperiments: zod_index_js_namespaceObject.z.strictObject({
11921
- import: ZodSwcPluginImportConfig.optional()
11922
- }).optional()
11923
- });
11924
- class RspackZodUnion extends zod_index_js_namespaceObject.z.ZodUnion {
11925
- _parse(input) {
11926
- let dirty, { ctx } = this._processInputParams(input), options = this._def.options;
11927
- if (ctx.common.async) return Promise.all(options.map(async (option)=>{
11928
- let childCtx = {
11929
- ...ctx,
11930
- common: {
11931
- ...ctx.common,
11932
- issues: []
11933
- },
11934
- parent: ctx
11935
- };
11936
- return {
11937
- result: await option._parseAsync({
11938
- data: ctx.data,
11939
- path: ctx.path,
11940
- parent: childCtx
11941
- }),
11942
- ctx: childCtx
11943
- };
11944
- })).then(function(results) {
11945
- for (let result of results)if ("valid" === result.result.status) return result.result;
11946
- for (let result of results)if ("dirty" === result.result.status) return ctx.common.issues.push(...result.ctx.common.issues), result.result;
11947
- let unionErrors = results.map((result)=>new zod_index_js_namespaceObject.ZodError(result.ctx.common.issues));
11948
- return (0, zod_index_js_namespaceObject.addIssueToContext)(ctx, {
11949
- code: zod_index_js_namespaceObject.ZodIssueCode.invalid_union,
11950
- unionErrors
11951
- }), zod_index_js_namespaceObject.INVALID;
11952
- });
11953
- let issues = [];
11954
- for (let option of options){
11955
- let childCtx = {
11956
- ...ctx,
11957
- common: {
11958
- ...ctx.common,
11959
- issues: []
11960
- },
11961
- parent: ctx
11962
- }, result = option._parseSync({
11963
- data: ctx.data,
11964
- path: ctx.path,
11965
- parent: childCtx
11966
- });
11967
- if ("valid" === result.status) return result;
11968
- "dirty" !== result.status || dirty || (dirty = {
11969
- result,
11970
- ctx: childCtx
11971
- }), childCtx.common.issues.length && issues.push(childCtx.common.issues);
11972
- }
11973
- if (dirty) return ctx.common.issues.push(...dirty.ctx.common.issues), dirty.result;
11974
- let unionErrors = issues.map((issues)=>new zod_index_js_namespaceObject.ZodError(issues));
11975
- return (0, zod_index_js_namespaceObject.addIssueToContext)(ctx, {
11976
- code: zod_index_js_namespaceObject.ZodIssueCode.invalid_union,
11977
- unionErrors
11978
- }), zod_index_js_namespaceObject.INVALID;
11979
- }
11980
- static create = (types, params)=>new RspackZodUnion({
11981
- options: types,
11982
- typeName: zod_index_js_namespaceObject.ZodFirstPartyTypeKind.ZodUnion,
11983
- ...function(params) {
11984
- if (!params) return {};
11985
- let { errorMap, invalid_type_error, required_error, description } = params;
11986
- if (errorMap && (invalid_type_error || required_error)) throw Error('Can\'t use "invalid_type_error" or "required_error" in conjunction with custom error map.');
11987
- return errorMap ? {
11988
- errorMap: errorMap,
11989
- description
11990
- } : {
11991
- errorMap: (iss, ctx)=>{
11992
- let { message } = params;
11993
- return "invalid_enum_value" === iss.code ? {
11994
- message: message ?? ctx.defaultError
11995
- } : void 0 === ctx.data ? {
11996
- message: message ?? required_error ?? ctx.defaultError
11997
- } : "invalid_type" !== iss.code ? {
11998
- message: ctx.defaultError
11999
- } : {
12000
- message: message ?? invalid_type_error ?? ctx.defaultError
12001
- };
12002
- },
12003
- description
12004
- };
12005
- }(params)
12006
- });
12007
- }
12008
- zod_index_js_namespaceObject.ZodUnion.create = RspackZodUnion.create;
12009
- class ZodRspackCrossChecker extends zod_index_js_namespaceObject.ZodType {
12010
- params;
12011
- constructor(params){
12012
- super(params), this.params = params;
12013
- }
12014
- _parse(input) {
12015
- let ctx = this._getOrReturnCtx(input), root = this._getRootData(ctx);
12016
- for (let pattern of this.params.patterns)if (pattern.test(root, input)) {
12017
- let res = pattern.type._parse(input);
12018
- for (let issue of "function" == typeof pattern.issue ? pattern.issue(res, root, input) : [])(0, zod_index_js_namespaceObject.addIssueToContext)(ctx, issue);
12019
- return res;
12020
- }
12021
- return this.params.default._parse(input);
12022
- }
12023
- _getRootData(ctx) {
12024
- let root = ctx;
12025
- for(; root.parent;)root = root.parent;
12026
- return root.data;
12027
- }
12028
- }
12029
- let filenameTemplate = zod_index_js_namespaceObject.z.string(), zod_filename = filenameTemplate.or(zod_index_js_namespaceObject.z.function().args(zod_index_js_namespaceObject.z.custom(), zod_index_js_namespaceObject.z.custom().optional()).returns(zod_index_js_namespaceObject.z.string())), zod_name = zod_index_js_namespaceObject.z.string(), zod_dependencies = zod_index_js_namespaceObject.z.array(zod_name), zod_context = zod_index_js_namespaceObject.z.string().refine((val)=>external_node_path_default().isAbsolute(val), (val)=>({
11844
+ let getZodSwcLoaderOptionsSchema = memoize(()=>{
11845
+ let ZodSwcEnvConfig = zod_index_js_namespaceObject.z.strictObject({
11846
+ mode: zod_index_js_namespaceObject.z.enum([
11847
+ "usage",
11848
+ "entry"
11849
+ ]).optional(),
11850
+ debug: zod_index_js_namespaceObject.z.boolean().optional(),
11851
+ dynamicImport: zod_index_js_namespaceObject.z.boolean().optional(),
11852
+ loose: zod_index_js_namespaceObject.z.boolean().optional(),
11853
+ bugfixes: zod_index_js_namespaceObject.z.boolean().optional(),
11854
+ skip: zod_index_js_namespaceObject.z.string().array().optional(),
11855
+ include: zod_index_js_namespaceObject.z.string().array().optional(),
11856
+ exclude: zod_index_js_namespaceObject.z.string().array().optional(),
11857
+ coreJs: zod_index_js_namespaceObject.z.string().optional(),
11858
+ targets: zod_index_js_namespaceObject.z.any().optional(),
11859
+ path: zod_index_js_namespaceObject.z.string().optional(),
11860
+ shippedProposals: zod_index_js_namespaceObject.z.boolean().optional(),
11861
+ forceAllTransforms: zod_index_js_namespaceObject.z.boolean().optional()
11862
+ }), ZodSwcAssumptions = zod_index_js_namespaceObject.z.strictObject({
11863
+ arrayLikeIsIterable: zod_index_js_namespaceObject.z.boolean().optional(),
11864
+ constantReexports: zod_index_js_namespaceObject.z.boolean().optional(),
11865
+ constantSuper: zod_index_js_namespaceObject.z.boolean().optional(),
11866
+ enumerableModuleMeta: zod_index_js_namespaceObject.z.boolean().optional(),
11867
+ ignoreFunctionLength: zod_index_js_namespaceObject.z.boolean().optional(),
11868
+ ignoreFunctionName: zod_index_js_namespaceObject.z.boolean().optional(),
11869
+ ignoreToPrimitiveHint: zod_index_js_namespaceObject.z.boolean().optional(),
11870
+ iterableIsArray: zod_index_js_namespaceObject.z.boolean().optional(),
11871
+ mutableTemplateObject: zod_index_js_namespaceObject.z.boolean().optional(),
11872
+ noClassCalls: zod_index_js_namespaceObject.z.boolean().optional(),
11873
+ noDocumentAll: zod_index_js_namespaceObject.z.boolean().optional(),
11874
+ noIncompleteNsImportDetection: zod_index_js_namespaceObject.z.boolean().optional(),
11875
+ noNewArrows: zod_index_js_namespaceObject.z.boolean().optional(),
11876
+ objectRestNoSymbols: zod_index_js_namespaceObject.z.boolean().optional(),
11877
+ privateFieldsAsProperties: zod_index_js_namespaceObject.z.boolean().optional(),
11878
+ pureGetters: zod_index_js_namespaceObject.z.boolean().optional(),
11879
+ setClassMethods: zod_index_js_namespaceObject.z.boolean().optional(),
11880
+ setComputedProperties: zod_index_js_namespaceObject.z.boolean().optional(),
11881
+ setPublicClassFields: zod_index_js_namespaceObject.z.boolean().optional(),
11882
+ setSpreadProperties: zod_index_js_namespaceObject.z.boolean().optional(),
11883
+ skipForOfIteratorClosing: zod_index_js_namespaceObject.z.boolean().optional(),
11884
+ superIsCallableConstructor: zod_index_js_namespaceObject.z.boolean().optional(),
11885
+ tsEnumIsReadonly: zod_index_js_namespaceObject.z.boolean().optional()
11886
+ }), ZodSwcParserConfig = zod_index_js_namespaceObject.z.strictObject({
11887
+ syntax: zod_index_js_namespaceObject.z.enum([
11888
+ "typescript",
11889
+ "ecmascript"
11890
+ ]),
11891
+ tsx: zod_index_js_namespaceObject.z.boolean().optional(),
11892
+ decorators: zod_index_js_namespaceObject.z.boolean().optional(),
11893
+ dynamicImport: zod_index_js_namespaceObject.z.boolean().optional(),
11894
+ jsx: zod_index_js_namespaceObject.z.boolean().optional(),
11895
+ numericSeparator: zod_index_js_namespaceObject.z.boolean().optional(),
11896
+ classPrivateProperty: zod_index_js_namespaceObject.z.boolean().optional(),
11897
+ privateMethod: zod_index_js_namespaceObject.z.boolean().optional(),
11898
+ classProperty: zod_index_js_namespaceObject.z.boolean().optional(),
11899
+ functionBind: zod_index_js_namespaceObject.z.boolean().optional(),
11900
+ decoratorsBeforeExport: zod_index_js_namespaceObject.z.boolean().optional(),
11901
+ exportDefaultFrom: zod_index_js_namespaceObject.z.boolean().optional(),
11902
+ exportNamespaceFrom: zod_index_js_namespaceObject.z.boolean().optional(),
11903
+ nullishCoalescing: zod_index_js_namespaceObject.z.boolean().optional(),
11904
+ optionalChaining: zod_index_js_namespaceObject.z.boolean().optional(),
11905
+ importMeta: zod_index_js_namespaceObject.z.boolean().optional(),
11906
+ topLevelAwait: zod_index_js_namespaceObject.z.boolean().optional(),
11907
+ importAssertions: zod_index_js_namespaceObject.z.boolean().optional(),
11908
+ importAttributes: zod_index_js_namespaceObject.z.boolean().optional(),
11909
+ allowSuperOutsideMethod: zod_index_js_namespaceObject.z.boolean().optional(),
11910
+ allowReturnOutsideFunction: zod_index_js_namespaceObject.z.boolean().optional(),
11911
+ autoAccessors: zod_index_js_namespaceObject.z.boolean().optional(),
11912
+ explicitResourceManagement: zod_index_js_namespaceObject.z.boolean().optional()
11913
+ }), ZodSwcJscTarget = zod_index_js_namespaceObject.z.enum([
11914
+ "es3",
11915
+ "es5",
11916
+ "es2015",
11917
+ "es2016",
11918
+ "es2017",
11919
+ "es2018",
11920
+ "es2019",
11921
+ "es2020",
11922
+ "es2021",
11923
+ "es2022",
11924
+ "es2023",
11925
+ "es2024",
11926
+ "esnext"
11927
+ ]), ZodSwcTerserEcmaVersion = zod_index_js_namespaceObject.z.union([
11928
+ zod_index_js_namespaceObject.z.literal(5),
11929
+ zod_index_js_namespaceObject.z.literal(2015),
11930
+ zod_index_js_namespaceObject.z.literal(2016),
11931
+ zod_index_js_namespaceObject.z.string(),
11932
+ zod_index_js_namespaceObject.z.number()
11933
+ ]), ZodSwcJsFormatOptions = zod_index_js_namespaceObject.z.strictObject({
11934
+ asciiOnly: zod_index_js_namespaceObject.z.boolean().optional(),
11935
+ beautify: zod_index_js_namespaceObject.z.boolean().optional(),
11936
+ braces: zod_index_js_namespaceObject.z.boolean().optional(),
11937
+ comments: zod_index_js_namespaceObject.z.literal("some").or(zod_index_js_namespaceObject.z.literal("all")).or(zod_index_js_namespaceObject.z.literal(!1)).optional(),
11938
+ ecma: ZodSwcTerserEcmaVersion.optional(),
11939
+ indentLevel: zod_index_js_namespaceObject.z.number().optional(),
11940
+ indentStart: zod_index_js_namespaceObject.z.number().optional(),
11941
+ inlineScript: zod_index_js_namespaceObject.z.boolean().optional(),
11942
+ keepNumbers: zod_index_js_namespaceObject.z.number().optional(),
11943
+ keepQuotedProps: zod_index_js_namespaceObject.z.boolean().optional(),
11944
+ maxLineLen: zod_index_js_namespaceObject.z.number().optional(),
11945
+ preamble: zod_index_js_namespaceObject.z.string().optional(),
11946
+ quoteKeys: zod_index_js_namespaceObject.z.boolean().optional(),
11947
+ quoteStyle: zod_index_js_namespaceObject.z.boolean().optional(),
11948
+ preserveAnnotations: zod_index_js_namespaceObject.z.boolean().optional(),
11949
+ safari10: zod_index_js_namespaceObject.z.boolean().optional(),
11950
+ semicolons: zod_index_js_namespaceObject.z.boolean().optional(),
11951
+ shebang: zod_index_js_namespaceObject.z.boolean().optional(),
11952
+ webkit: zod_index_js_namespaceObject.z.boolean().optional(),
11953
+ wrapIife: zod_index_js_namespaceObject.z.boolean().optional(),
11954
+ wrapFuncArgs: zod_index_js_namespaceObject.z.boolean().optional()
11955
+ }), ZodSwcTerserCompressOptions = zod_index_js_namespaceObject.z.strictObject({
11956
+ arguments: zod_index_js_namespaceObject.z.boolean().optional(),
11957
+ arrows: zod_index_js_namespaceObject.z.boolean().optional(),
11958
+ booleans: zod_index_js_namespaceObject.z.boolean().optional(),
11959
+ booleans_as_integers: zod_index_js_namespaceObject.z.boolean().optional(),
11960
+ collapse_vars: zod_index_js_namespaceObject.z.boolean().optional(),
11961
+ comparisons: zod_index_js_namespaceObject.z.boolean().optional(),
11962
+ computed_props: zod_index_js_namespaceObject.z.boolean().optional(),
11963
+ conditionals: zod_index_js_namespaceObject.z.boolean().optional(),
11964
+ dead_code: zod_index_js_namespaceObject.z.boolean().optional(),
11965
+ defaults: zod_index_js_namespaceObject.z.boolean().optional(),
11966
+ directives: zod_index_js_namespaceObject.z.boolean().optional(),
11967
+ drop_console: zod_index_js_namespaceObject.z.boolean().optional(),
11968
+ drop_debugger: zod_index_js_namespaceObject.z.boolean().optional(),
11969
+ ecma: ZodSwcTerserEcmaVersion.optional(),
11970
+ evaluate: zod_index_js_namespaceObject.z.boolean().optional(),
11971
+ expression: zod_index_js_namespaceObject.z.boolean().optional(),
11972
+ global_defs: zod_index_js_namespaceObject.z.any().optional(),
11973
+ hoist_funs: zod_index_js_namespaceObject.z.boolean().optional(),
11974
+ hoist_props: zod_index_js_namespaceObject.z.boolean().optional(),
11975
+ hoist_vars: zod_index_js_namespaceObject.z.boolean().optional(),
11976
+ ie8: zod_index_js_namespaceObject.z.boolean().optional(),
11977
+ if_return: zod_index_js_namespaceObject.z.boolean().optional(),
11978
+ inline: zod_index_js_namespaceObject.z.literal(0).or(zod_index_js_namespaceObject.z.literal(1)).or(zod_index_js_namespaceObject.z.literal(2)).or(zod_index_js_namespaceObject.z.literal(3)).optional(),
11979
+ join_vars: zod_index_js_namespaceObject.z.boolean().optional(),
11980
+ keep_classnames: zod_index_js_namespaceObject.z.boolean().optional(),
11981
+ keep_fargs: zod_index_js_namespaceObject.z.boolean().optional(),
11982
+ keep_fnames: zod_index_js_namespaceObject.z.boolean().optional(),
11983
+ keep_infinity: zod_index_js_namespaceObject.z.boolean().optional(),
11984
+ loops: zod_index_js_namespaceObject.z.boolean().optional(),
11985
+ negate_iife: zod_index_js_namespaceObject.z.boolean().optional(),
11986
+ passes: zod_index_js_namespaceObject.z.number().optional(),
11987
+ properties: zod_index_js_namespaceObject.z.boolean().optional(),
11988
+ pure_getters: zod_index_js_namespaceObject.z.any().optional(),
11989
+ pure_funcs: zod_index_js_namespaceObject.z.string().array().optional(),
11990
+ reduce_funcs: zod_index_js_namespaceObject.z.boolean().optional(),
11991
+ reduce_vars: zod_index_js_namespaceObject.z.boolean().optional(),
11992
+ sequences: zod_index_js_namespaceObject.z.any().optional(),
11993
+ side_effects: zod_index_js_namespaceObject.z.boolean().optional(),
11994
+ switches: zod_index_js_namespaceObject.z.boolean().optional(),
11995
+ top_retain: zod_index_js_namespaceObject.z.any().optional(),
11996
+ toplevel: zod_index_js_namespaceObject.z.any().optional(),
11997
+ typeofs: zod_index_js_namespaceObject.z.boolean().optional(),
11998
+ unsafe: zod_index_js_namespaceObject.z.boolean().optional(),
11999
+ unsafe_passes: zod_index_js_namespaceObject.z.boolean().optional(),
12000
+ unsafe_arrows: zod_index_js_namespaceObject.z.boolean().optional(),
12001
+ unsafe_comps: zod_index_js_namespaceObject.z.boolean().optional(),
12002
+ unsafe_function: zod_index_js_namespaceObject.z.boolean().optional(),
12003
+ unsafe_math: zod_index_js_namespaceObject.z.boolean().optional(),
12004
+ unsafe_symbols: zod_index_js_namespaceObject.z.boolean().optional(),
12005
+ unsafe_methods: zod_index_js_namespaceObject.z.boolean().optional(),
12006
+ unsafe_proto: zod_index_js_namespaceObject.z.boolean().optional(),
12007
+ unsafe_regexp: zod_index_js_namespaceObject.z.boolean().optional(),
12008
+ unsafe_undefined: zod_index_js_namespaceObject.z.boolean().optional(),
12009
+ unused: zod_index_js_namespaceObject.z.boolean().optional(),
12010
+ const_to_let: zod_index_js_namespaceObject.z.boolean().optional(),
12011
+ module: zod_index_js_namespaceObject.z.boolean().optional()
12012
+ }), ZodSwcTerserMangleOptions = zod_index_js_namespaceObject.z.strictObject({
12013
+ props: zod_index_js_namespaceObject.z.record(zod_index_js_namespaceObject.z.string(), zod_index_js_namespaceObject.z.any()).optional(),
12014
+ topLevel: zod_index_js_namespaceObject.z.boolean().optional(),
12015
+ toplevel: zod_index_js_namespaceObject.z.boolean().optional(),
12016
+ keepClassNames: zod_index_js_namespaceObject.z.boolean().optional(),
12017
+ keep_classnames: zod_index_js_namespaceObject.z.boolean().optional(),
12018
+ keepFnNames: zod_index_js_namespaceObject.z.boolean().optional(),
12019
+ keep_fnames: zod_index_js_namespaceObject.z.boolean().optional(),
12020
+ keepPrivateProps: zod_index_js_namespaceObject.z.boolean().optional(),
12021
+ keep_private_props: zod_index_js_namespaceObject.z.boolean().optional(),
12022
+ ie8: zod_index_js_namespaceObject.z.boolean().optional(),
12023
+ safari10: zod_index_js_namespaceObject.z.boolean().optional(),
12024
+ reserved: zod_index_js_namespaceObject.z.string().array().optional()
12025
+ }), ZodSwcReactConfig = zod_index_js_namespaceObject.z.strictObject({
12026
+ pragma: zod_index_js_namespaceObject.z.string().optional(),
12027
+ pragmaFrag: zod_index_js_namespaceObject.z.string().optional(),
12028
+ throwIfNamespace: zod_index_js_namespaceObject.z.boolean().optional(),
12029
+ development: zod_index_js_namespaceObject.z.boolean().optional(),
12030
+ useBuiltins: zod_index_js_namespaceObject.z.boolean().optional(),
12031
+ refresh: zod_index_js_namespaceObject.z.boolean().or(zod_index_js_namespaceObject.z.strictObject({
12032
+ refreshReg: zod_index_js_namespaceObject.z.string().optional(),
12033
+ refreshSig: zod_index_js_namespaceObject.z.string().optional(),
12034
+ emitFullSignatures: zod_index_js_namespaceObject.z.boolean().optional()
12035
+ })).optional(),
12036
+ runtime: zod_index_js_namespaceObject.z.enum([
12037
+ "automatic",
12038
+ "classic"
12039
+ ]).optional(),
12040
+ importSource: zod_index_js_namespaceObject.z.string().optional()
12041
+ }), ZodSwcConstModulesConfig = zod_index_js_namespaceObject.z.strictObject({
12042
+ globals: zod_index_js_namespaceObject.z.record(zod_index_js_namespaceObject.z.string(), zod_index_js_namespaceObject.z.record(zod_index_js_namespaceObject.z.string(), zod_index_js_namespaceObject.z.string())).optional()
12043
+ }), ZodSwcGlobalPassOption = zod_index_js_namespaceObject.z.strictObject({
12044
+ vars: zod_index_js_namespaceObject.z.record(zod_index_js_namespaceObject.z.string(), zod_index_js_namespaceObject.z.string()).optional(),
12045
+ envs: zod_index_js_namespaceObject.z.union([
12046
+ zod_index_js_namespaceObject.z.string().array(),
12047
+ zod_index_js_namespaceObject.z.record(zod_index_js_namespaceObject.z.string(), zod_index_js_namespaceObject.z.string())
12048
+ ]).optional(),
12049
+ typeofs: zod_index_js_namespaceObject.z.record(zod_index_js_namespaceObject.z.string(), zod_index_js_namespaceObject.z.string()).optional()
12050
+ }), ZodSwcOptimizerConfig = zod_index_js_namespaceObject.z.strictObject({
12051
+ simplify: zod_index_js_namespaceObject.z.boolean().optional(),
12052
+ globals: ZodSwcGlobalPassOption.optional(),
12053
+ jsonify: zod_index_js_namespaceObject.z.strictObject({
12054
+ minCost: zod_index_js_namespaceObject.z.number()
12055
+ }).optional()
12056
+ }), ZodSwcTransformConfig = zod_index_js_namespaceObject.z.strictObject({
12057
+ react: ZodSwcReactConfig.optional(),
12058
+ constModules: ZodSwcConstModulesConfig.optional(),
12059
+ optimizer: ZodSwcOptimizerConfig.optional(),
12060
+ legacyDecorator: zod_index_js_namespaceObject.z.boolean().optional(),
12061
+ decoratorMetadata: zod_index_js_namespaceObject.z.boolean().optional(),
12062
+ decoratorVersion: zod_index_js_namespaceObject.z.enum([
12063
+ "2021-12",
12064
+ "2022-03"
12065
+ ]).optional(),
12066
+ treatConstEnumAsEnum: zod_index_js_namespaceObject.z.boolean().optional(),
12067
+ useDefineForClassFields: zod_index_js_namespaceObject.z.boolean().optional(),
12068
+ verbatimModuleSyntax: zod_index_js_namespaceObject.z.boolean().optional()
12069
+ }), ZodSwcJsMinifyOptions = zod_index_js_namespaceObject.z.strictObject({
12070
+ compress: zod_index_js_namespaceObject.z.union([
12071
+ ZodSwcTerserCompressOptions,
12072
+ zod_index_js_namespaceObject.z.boolean()
12073
+ ]).optional(),
12074
+ format: ZodSwcJsFormatOptions.optional(),
12075
+ mangle: zod_index_js_namespaceObject.z.union([
12076
+ ZodSwcTerserMangleOptions,
12077
+ zod_index_js_namespaceObject.z.boolean()
12078
+ ]).optional(),
12079
+ ecma: ZodSwcTerserEcmaVersion.optional(),
12080
+ keep_classnames: zod_index_js_namespaceObject.z.boolean().optional(),
12081
+ keep_fnames: zod_index_js_namespaceObject.z.boolean().optional(),
12082
+ module: zod_index_js_namespaceObject.z.union([
12083
+ zod_index_js_namespaceObject.z.boolean(),
12084
+ zod_index_js_namespaceObject.z.literal("unknown")
12085
+ ]).optional(),
12086
+ safari10: zod_index_js_namespaceObject.z.boolean().optional(),
12087
+ toplevel: zod_index_js_namespaceObject.z.boolean().optional(),
12088
+ sourceMap: zod_index_js_namespaceObject.z.boolean().optional(),
12089
+ outputPath: zod_index_js_namespaceObject.z.string().optional(),
12090
+ inlineSourcesContent: zod_index_js_namespaceObject.z.boolean().optional()
12091
+ }), ZodSwcJscConfig = zod_index_js_namespaceObject.z.strictObject({
12092
+ assumptions: ZodSwcAssumptions.optional(),
12093
+ loose: zod_index_js_namespaceObject.z.boolean().optional(),
12094
+ parser: ZodSwcParserConfig.optional(),
12095
+ transform: ZodSwcTransformConfig.optional(),
12096
+ externalHelpers: zod_index_js_namespaceObject.z.boolean().optional(),
12097
+ target: ZodSwcJscTarget.optional(),
12098
+ keepClassNames: zod_index_js_namespaceObject.z.boolean().optional(),
12099
+ experimental: zod_index_js_namespaceObject.z.strictObject({
12100
+ optimizeHygiene: zod_index_js_namespaceObject.z.boolean().optional(),
12101
+ keepImportAttributes: zod_index_js_namespaceObject.z.boolean().optional(),
12102
+ emitAssertForImportAttributes: zod_index_js_namespaceObject.z.boolean().optional(),
12103
+ cacheRoot: zod_index_js_namespaceObject.z.string().optional(),
12104
+ plugins: zod_index_js_namespaceObject.z.array(zod_index_js_namespaceObject.z.tuple([
12105
+ zod_index_js_namespaceObject.z.string(),
12106
+ zod_index_js_namespaceObject.z.record(zod_index_js_namespaceObject.z.string(), zod_index_js_namespaceObject.z.any())
12107
+ ])).optional(),
12108
+ runPluginFirst: zod_index_js_namespaceObject.z.boolean().optional(),
12109
+ disableBuiltinTransformsForInternalTesting: zod_index_js_namespaceObject.z.boolean().optional(),
12110
+ emitIsolatedDts: zod_index_js_namespaceObject.z.boolean().optional(),
12111
+ disableAllLints: zod_index_js_namespaceObject.z.boolean().optional(),
12112
+ keepImportAssertions: zod_index_js_namespaceObject.z.boolean().optional()
12113
+ }).optional(),
12114
+ baseUrl: zod_index_js_namespaceObject.z.string().optional(),
12115
+ paths: zod_index_js_namespaceObject.z.record(zod_index_js_namespaceObject.z.string(), zod_index_js_namespaceObject.z.string().array()).optional(),
12116
+ minify: ZodSwcJsMinifyOptions.optional(),
12117
+ preserveAllComments: zod_index_js_namespaceObject.z.boolean().optional(),
12118
+ output: zod_index_js_namespaceObject.z.strictObject({
12119
+ charset: zod_index_js_namespaceObject.z.enum([
12120
+ "utf8",
12121
+ "ascii"
12122
+ ]).optional()
12123
+ }).optional()
12124
+ }), ZodSwcBaseModuleConfig = zod_index_js_namespaceObject.z.strictObject({
12125
+ strict: zod_index_js_namespaceObject.z.boolean().optional(),
12126
+ strictMode: zod_index_js_namespaceObject.z.boolean().optional(),
12127
+ lazy: zod_index_js_namespaceObject.z.union([
12128
+ zod_index_js_namespaceObject.z.boolean(),
12129
+ zod_index_js_namespaceObject.z.string().array()
12130
+ ]).optional(),
12131
+ noInterop: zod_index_js_namespaceObject.z.boolean().optional(),
12132
+ importInterop: zod_index_js_namespaceObject.z.enum([
12133
+ "swc",
12134
+ "babel",
12135
+ "node",
12136
+ "none"
12137
+ ]).optional(),
12138
+ outFileExtension: zod_index_js_namespaceObject.z.enum([
12139
+ "js",
12140
+ "mjs",
12141
+ "cjs"
12142
+ ]).optional(),
12143
+ exportInteropAnnotation: zod_index_js_namespaceObject.z.boolean().optional(),
12144
+ ignoreDynamic: zod_index_js_namespaceObject.z.boolean().optional(),
12145
+ allowTopLevelThis: zod_index_js_namespaceObject.z.boolean().optional(),
12146
+ preserveImportMeta: zod_index_js_namespaceObject.z.boolean().optional()
12147
+ }), ZodSwcEs6Config = ZodSwcBaseModuleConfig.extend({
12148
+ type: zod_index_js_namespaceObject.z.literal("es6")
12149
+ }), ZodSwcNodeNextConfig = ZodSwcBaseModuleConfig.extend({
12150
+ type: zod_index_js_namespaceObject.z.literal("nodenext")
12151
+ }), ZodSwcCommonJsConfig = ZodSwcBaseModuleConfig.extend({
12152
+ type: zod_index_js_namespaceObject.z.literal("commonjs")
12153
+ }), ZodSwcUmdConfig = ZodSwcBaseModuleConfig.extend({
12154
+ type: zod_index_js_namespaceObject.z.literal("umd"),
12155
+ globals: zod_index_js_namespaceObject.z.record(zod_index_js_namespaceObject.z.string(), zod_index_js_namespaceObject.z.string()).optional()
12156
+ }), ZodSwcAmdConfig = ZodSwcBaseModuleConfig.extend({
12157
+ type: zod_index_js_namespaceObject.z.literal("amd"),
12158
+ moduleId: zod_index_js_namespaceObject.z.string().optional()
12159
+ }), ZodSwcSystemjsConfig = zod_index_js_namespaceObject.z.strictObject({
12160
+ type: zod_index_js_namespaceObject.z.literal("systemjs"),
12161
+ allowTopLevelThis: zod_index_js_namespaceObject.z.boolean().optional()
12162
+ }), ZodSwcModuleConfig = zod_index_js_namespaceObject.z.union([
12163
+ ZodSwcEs6Config,
12164
+ ZodSwcCommonJsConfig,
12165
+ ZodSwcUmdConfig,
12166
+ ZodSwcAmdConfig,
12167
+ ZodSwcNodeNextConfig,
12168
+ ZodSwcSystemjsConfig
12169
+ ]);
12170
+ return zod_index_js_namespaceObject.z.strictObject({
12171
+ $schema: zod_index_js_namespaceObject.z.string().optional(),
12172
+ test: zod_index_js_namespaceObject.z.string().or(zod_index_js_namespaceObject.z.string().array()).optional(),
12173
+ exclude: zod_index_js_namespaceObject.z.string().or(zod_index_js_namespaceObject.z.string().array()).optional(),
12174
+ env: ZodSwcEnvConfig.optional(),
12175
+ jsc: ZodSwcJscConfig.optional(),
12176
+ module: ZodSwcModuleConfig.optional(),
12177
+ minify: zod_index_js_namespaceObject.z.boolean().optional(),
12178
+ sourceMaps: zod_index_js_namespaceObject.z.boolean().or(zod_index_js_namespaceObject.z.literal("inline")).optional(),
12179
+ inlineSourcesContent: zod_index_js_namespaceObject.z.boolean().optional()
12180
+ }).extend({
12181
+ isModule: zod_index_js_namespaceObject.z.boolean().or(zod_index_js_namespaceObject.z.literal("unknown")).optional(),
12182
+ rspackExperiments: zod_index_js_namespaceObject.z.strictObject({
12183
+ import: ZodSwcPluginImportConfig.optional()
12184
+ }).optional()
12185
+ });
12186
+ }), filenameTemplate = zod_index_js_namespaceObject.z.string(), zod_filename = filenameTemplate.or(anyFunction), zod_name = zod_index_js_namespaceObject.z.string(), zod_dependencies = zod_index_js_namespaceObject.z.array(zod_name), zod_context = zod_index_js_namespaceObject.z.string().refine((val)=>external_node_path_default().isAbsolute(val), (val)=>({
12030
12187
  message: `The provided value ${JSON.stringify(val)} must be an absolute path.`
12031
12188
  })), zod_mode = zod_index_js_namespaceObject.z.enum([
12032
12189
  "development",
@@ -12098,13 +12255,13 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
12098
12255
  library: libraryOptions.optional(),
12099
12256
  dependOn: entryDependOn.optional(),
12100
12257
  layer: zod_layer.optional()
12101
- }), 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([
12258
+ }), entryStatic = zod_index_js_namespaceObject.z.record(zod_index_js_namespaceObject.z.string(), entryItem.or(entryDescription)).or(entryItem), zod_entry = entryStatic.or(anyFunction), zod_path = zod_index_js_namespaceObject.z.string(), pathinfo = zod_index_js_namespaceObject.z.boolean().or(zod_index_js_namespaceObject.z.literal("verbose")), webassemblyModuleFilename = zod_index_js_namespaceObject.z.string(), zod_crossOriginLoading = zod_index_js_namespaceObject.z.literal(!1).or(zod_index_js_namespaceObject.z.enum([
12102
12259
  "anonymous",
12103
12260
  "use-credentials"
12104
12261
  ])), hotUpdateGlobal = zod_index_js_namespaceObject.z.string(), zod_uniqueName = zod_index_js_namespaceObject.z.string(), chunkLoadingGlobal = zod_index_js_namespaceObject.z.string(), zod_enabledLibraryTypes = zod_index_js_namespaceObject.z.array(libraryType), clean = zod_index_js_namespaceObject.z.union([
12105
12262
  zod_index_js_namespaceObject.z.boolean(),
12106
12263
  zod_index_js_namespaceObject.z.strictObject({
12107
- 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()
12264
+ keep: zod_index_js_namespaceObject.z.instanceof(RegExp).or(zod_index_js_namespaceObject.z.string()).or(anyFunction).optional()
12108
12265
  })
12109
12266
  ]), zod_outputModule = zod_index_js_namespaceObject.z.boolean(), strictModuleExceptionHandling = zod_index_js_namespaceObject.z.boolean(), strictModuleErrorHandling = zod_index_js_namespaceObject.z.boolean(), globalObject = zod_index_js_namespaceObject.z.string(), zod_enabledWasmLoadingTypes = zod_index_js_namespaceObject.z.array(wasmLoadingType), importFunctionName = zod_index_js_namespaceObject.z.string(), importMetaName = zod_index_js_namespaceObject.z.string(), iife = zod_index_js_namespaceObject.z.boolean(), zod_enabledChunkLoadingTypes = zod_index_js_namespaceObject.z.array(chunkLoadingType), chunkFormat = zod_index_js_namespaceObject.z.literal(!1).or(zod_index_js_namespaceObject.z.string()), zod_workerPublicPath = zod_index_js_namespaceObject.z.string(), zod_trustedTypes = zod_index_js_namespaceObject.z.strictObject({
12110
12267
  policyName: zod_index_js_namespaceObject.z.string().optional(),
@@ -12117,9 +12274,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
12117
12274
  "xxhash64"
12118
12275
  ]), hashSalt = zod_index_js_namespaceObject.z.string(), sourceMapFilename = zod_index_js_namespaceObject.z.string(), devtoolNamespace = zod_index_js_namespaceObject.z.string(), devtoolModuleFilenameTemplate = zod_index_js_namespaceObject.z.union([
12119
12276
  zod_index_js_namespaceObject.z.string(),
12120
- zod_index_js_namespaceObject.z.function(zod_index_js_namespaceObject.z.tuple([
12121
- zod_index_js_namespaceObject.z.any()
12122
- ]), zod_index_js_namespaceObject.z.any())
12277
+ anyFunction
12123
12278
  ]), zod_environment = zod_index_js_namespaceObject.z.strictObject({
12124
12279
  arrowFunction: zod_index_js_namespaceObject.z.boolean().optional(),
12125
12280
  asyncFunction: zod_index_js_namespaceObject.z.boolean().optional(),
@@ -12216,7 +12371,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
12216
12371
  pnp: zod_index_js_namespaceObject.z.boolean().optional()
12217
12372
  }).extend({
12218
12373
  byDependency: zod_index_js_namespaceObject.z.lazy(()=>zod_index_js_namespaceObject.z.record(zod_index_js_namespaceObject.z.string(), zod_resolveOptions)).optional()
12219
- }), ruleSetCondition = zod_index_js_namespaceObject.z.instanceof(RegExp).or(zod_index_js_namespaceObject.z.string()).or(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({
12374
+ }), ruleSetCondition = zod_index_js_namespaceObject.z.instanceof(RegExp).or(zod_index_js_namespaceObject.z.string()).or(anyFunction).or(zod_index_js_namespaceObject.z.lazy(()=>ruleSetConditions)).or(zod_index_js_namespaceObject.z.lazy(()=>ruleSetLogicalConditions)), ruleSetConditions = zod_index_js_namespaceObject.z.lazy(()=>zod_index_js_namespaceObject.z.array(ruleSetCondition)), ruleSetLogicalConditions = zod_index_js_namespaceObject.z.strictObject({
12220
12375
  and: ruleSetConditions.optional(),
12221
12376
  or: ruleSetConditions.optional(),
12222
12377
  not: ruleSetCondition.optional()
@@ -12227,12 +12382,12 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
12227
12382
  type: zod_index_js_namespaceObject.z.strictObject({
12228
12383
  ident: zod_index_js_namespaceObject.z.string().optional(),
12229
12384
  loader: zod_index_js_namespaceObject.z.literal("builtin:swc-loader"),
12230
- options: ZodSwcLoaderOptions,
12385
+ options: getZodSwcLoaderOptionsSchema(),
12231
12386
  parallel: zod_index_js_namespaceObject.z.boolean().optional()
12232
12387
  }),
12233
12388
  issue: (res, _, input)=>{
12234
12389
  try {
12235
- let message = validate(input.data.options, ZodSwcLoaderOptions, {
12390
+ let message = validate(input.data.options, getZodSwcLoaderOptionsSchema(), {
12236
12391
  output: !1,
12237
12392
  strategy: "strict"
12238
12393
  });
@@ -12262,7 +12417,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
12262
12417
  options: ruleSetLoaderOptions.optional(),
12263
12418
  parallel: zod_index_js_namespaceObject.z.boolean().optional()
12264
12419
  })
12265
- }), 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({
12420
+ }), ruleSetUseItem = ruleSetLoader.or(ruleSetLoaderWithOptions), ruleSetUse = ruleSetUseItem.or(ruleSetUseItem.array()).or(anyFunction), baseRuleSetRule = zod_index_js_namespaceObject.z.strictObject({
12266
12421
  test: ruleSetCondition.optional(),
12267
12422
  exclude: ruleSetCondition.optional(),
12268
12423
  include: ruleSetCondition.optional(),
@@ -12295,14 +12450,14 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
12295
12450
  test: (_, input)=>input?.data?.loader === "builtin:swc-loader" && "object" == typeof input?.data?.options,
12296
12451
  type: baseRuleSetRule.extend({
12297
12452
  loader: zod_index_js_namespaceObject.z.literal("builtin:swc-loader"),
12298
- options: ZodSwcLoaderOptions
12453
+ options: getZodSwcLoaderOptionsSchema()
12299
12454
  }).extend({
12300
12455
  oneOf: zod_index_js_namespaceObject.z.lazy(()=>ruleSetRule.or(falsy).array()).optional(),
12301
12456
  rules: zod_index_js_namespaceObject.z.lazy(()=>ruleSetRule.or(falsy).array()).optional()
12302
12457
  }),
12303
12458
  issue: (res, _, input)=>{
12304
12459
  try {
12305
- let message = validate(input.data.options, ZodSwcLoaderOptions, {
12460
+ let message = validate(input.data.options, getZodSwcLoaderOptionsSchema(), {
12306
12461
  output: !1,
12307
12462
  strategy: "strict"
12308
12463
  });
@@ -12373,7 +12528,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
12373
12528
  ]).or(zod_index_js_namespaceObject.z.literal(!1)), strictExportPresence = zod_index_js_namespaceObject.z.boolean(), worker = zod_index_js_namespaceObject.z.array(zod_index_js_namespaceObject.z.string()).or(zod_index_js_namespaceObject.z.boolean()), overrideStrict = zod_index_js_namespaceObject.z.enum([
12374
12529
  "strict",
12375
12530
  "non-strict"
12376
- ]), requireAsExpression = zod_index_js_namespaceObject.z.boolean(), requireDynamic = zod_index_js_namespaceObject.z.boolean(), requireResolve = zod_index_js_namespaceObject.z.boolean(), importDynamic = zod_index_js_namespaceObject.z.boolean(), javascriptParserOptions = zod_index_js_namespaceObject.z.strictObject({
12531
+ ]), requireAsExpression = zod_index_js_namespaceObject.z.boolean(), requireDynamic = zod_index_js_namespaceObject.z.boolean(), requireResolve = zod_index_js_namespaceObject.z.boolean(), importDynamic = zod_index_js_namespaceObject.z.boolean(), zod_inlineConst = zod_index_js_namespaceObject.z.boolean(), javascriptParserOptions = zod_index_js_namespaceObject.z.strictObject({
12377
12532
  dynamicImportMode: dynamicImportMode.optional(),
12378
12533
  dynamicImportPreload: dynamicImportPreload.optional(),
12379
12534
  dynamicImportPrefetch: dynamicImportPrefetch.optional(),
@@ -12392,7 +12547,8 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
12392
12547
  requireAsExpression: requireAsExpression.optional(),
12393
12548
  requireDynamic: requireDynamic.optional(),
12394
12549
  requireResolve: requireResolve.optional(),
12395
- importDynamic: importDynamic.optional()
12550
+ importDynamic: importDynamic.optional(),
12551
+ inlineConst: zod_inlineConst.optional()
12396
12552
  }), parserOptionsByModuleTypeKnown = zod_index_js_namespaceObject.z.strictObject({
12397
12553
  asset: assetParserOptions.optional(),
12398
12554
  css: cssParserOptions.optional(),
@@ -12405,10 +12561,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
12405
12561
  }), assetGeneratorDataUrlOptions = zod_index_js_namespaceObject.z.strictObject({
12406
12562
  encoding: zod_index_js_namespaceObject.z.literal(!1).or(zod_index_js_namespaceObject.z.literal("base64")).optional(),
12407
12563
  mimetype: zod_index_js_namespaceObject.z.string().optional()
12408
- }), assetGeneratorDataUrlFunction = zod_index_js_namespaceObject.z.function().args(zod_index_js_namespaceObject.z.instanceof(Buffer), zod_index_js_namespaceObject.z.strictObject({
12409
- filename: zod_index_js_namespaceObject.z.string(),
12410
- module: zod_index_js_namespaceObject.z.custom()
12411
- })).returns(zod_index_js_namespaceObject.z.string()), assetGeneratorDataUrl = assetGeneratorDataUrlOptions.or(assetGeneratorDataUrlFunction), assetInlineGeneratorOptions = zod_index_js_namespaceObject.z.strictObject({
12564
+ }), assetGeneratorDataUrl = assetGeneratorDataUrlOptions.or(anyFunction), assetInlineGeneratorOptions = zod_index_js_namespaceObject.z.strictObject({
12412
12565
  dataUrl: assetGeneratorDataUrl.optional()
12413
12566
  }), assetResourceGeneratorOptions = zod_index_js_namespaceObject.z.strictObject({
12414
12567
  emit: zod_index_js_namespaceObject.z.boolean().optional(),
@@ -12444,7 +12597,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
12444
12597
  "css/auto": cssAutoGeneratorOptions.optional(),
12445
12598
  "css/module": cssModuleGeneratorOptions.optional(),
12446
12599
  json: jsonGeneratorOptions.optional()
12447
- }), 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({
12600
+ }), noParseOptionSingle = zod_index_js_namespaceObject.z.string().or(zod_index_js_namespaceObject.z.instanceof(RegExp)).or(anyFunction), noParseOption = noParseOptionSingle.or(zod_index_js_namespaceObject.z.array(noParseOptionSingle)), moduleOptions = zod_index_js_namespaceObject.z.strictObject({
12448
12601
  defaultRules: ruleSetRules.optional(),
12449
12602
  rules: ruleSetRules.optional(),
12450
12603
  parser: parserOptionsByModuleTypeKnown.optional(),
@@ -12516,39 +12669,12 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
12516
12669
  "script",
12517
12670
  "node-commonjs",
12518
12671
  "commonjs-import"
12519
- ]), externalObjectValue = new ZodRspackCrossChecker({
12520
- patterns: [
12521
- {
12522
- test: (config)=>{
12523
- let isLibraryUmd = !1, library = config?.output?.library;
12524
- return !!("object" == typeof library && "type" in library ? "umd" === library.type : config?.output?.libraryTarget === "umd") && (config?.externalsType === void 0 || config?.externalsType === "umd");
12525
- },
12526
- type: zod_index_js_namespaceObject.z.strictObject({
12527
- root: zod_index_js_namespaceObject.z.string().or(zod_index_js_namespaceObject.z.string().array()),
12528
- commonjs: zod_index_js_namespaceObject.z.string().or(zod_index_js_namespaceObject.z.string().array()),
12529
- commonjs2: zod_index_js_namespaceObject.z.string().or(zod_index_js_namespaceObject.z.string().array()),
12530
- amd: zod_index_js_namespaceObject.z.string().or(zod_index_js_namespaceObject.z.string().array())
12531
- }),
12532
- issue: (res)=>"aborted" === res.status ? [
12533
- {
12534
- fatal: !0,
12535
- code: zod_index_js_namespaceObject.ZodIssueCode.custom,
12536
- message: 'External object must have "root", "commonjs", "commonjs2", "amd" properties when "libraryType" or "externalsType" is "umd"'
12537
- }
12538
- ] : []
12539
- }
12540
- ],
12541
- default: zod_index_js_namespaceObject.z.record(zod_index_js_namespaceObject.z.string(), zod_index_js_namespaceObject.z.string().or(zod_index_js_namespaceObject.z.string().array()))
12542
- }), externalItemValue = zod_index_js_namespaceObject.z.string().or(zod_index_js_namespaceObject.z.boolean()).or(zod_index_js_namespaceObject.z.string().array().min(1)).or(externalObjectValue), externalItemObjectUnknown = zod_index_js_namespaceObject.z.record(zod_index_js_namespaceObject.z.string(), externalItemValue), externalItemFunctionData = zod_index_js_namespaceObject.z.strictObject({
12543
- context: zod_index_js_namespaceObject.z.string().optional(),
12544
- dependencyType: zod_index_js_namespaceObject.z.string().optional(),
12545
- request: zod_index_js_namespaceObject.z.string().optional(),
12546
- contextInfo: zod_index_js_namespaceObject.z.strictObject({
12547
- issuer: zod_index_js_namespaceObject.z.string(),
12548
- issuerLayer: zod_index_js_namespaceObject.z.string().or(zod_index_js_namespaceObject.z.null()).optional()
12549
- }).optional(),
12550
- getResolve: zod_index_js_namespaceObject.z.function().returns(zod_index_js_namespaceObject.z.function().args(zod_index_js_namespaceObject.z.string(), zod_index_js_namespaceObject.z.string()).returns(zod_index_js_namespaceObject.z.promise(zod_index_js_namespaceObject.z.string())).or(zod_index_js_namespaceObject.z.function().args(zod_index_js_namespaceObject.z.string(), zod_index_js_namespaceObject.z.string(), zod_index_js_namespaceObject.z.custom()).returns(zod_index_js_namespaceObject.z.void()))).optional()
12551
- }), externalItem = zod_index_js_namespaceObject.z.string().or(zod_index_js_namespaceObject.z.instanceof(RegExp)).or(externalItemObjectUnknown).or(zod_index_js_namespaceObject.z.function().args(externalItemFunctionData, zod_index_js_namespaceObject.z.function().args(zod_index_js_namespaceObject.z.instanceof(Error).optional(), externalItemValue.optional(), externalsType.optional()).returns(zod_index_js_namespaceObject.z.void()))).or(zod_index_js_namespaceObject.z.function().args(externalItemFunctionData).returns(zod_index_js_namespaceObject.z.promise(externalItemValue))).or(zod_index_js_namespaceObject.z.function().args(externalItemFunctionData).returns(externalItemValue)), zod_externals = externalItem.array().or(externalItem), zod_externalsPresets = zod_index_js_namespaceObject.z.strictObject({
12672
+ ]), 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({
12673
+ root: zod_index_js_namespaceObject.z.string().or(zod_index_js_namespaceObject.z.string().array()),
12674
+ commonjs: zod_index_js_namespaceObject.z.string().or(zod_index_js_namespaceObject.z.string().array()),
12675
+ commonjs2: zod_index_js_namespaceObject.z.string().or(zod_index_js_namespaceObject.z.string().array()),
12676
+ amd: zod_index_js_namespaceObject.z.string().or(zod_index_js_namespaceObject.z.string().array())
12677
+ }), zod_externalItemValue = zod_index_js_namespaceObject.z.string().or(zod_index_js_namespaceObject.z.boolean()).or(zod_index_js_namespaceObject.z.string().array().min(1)).or(externalItemObjectValue), externalItemObjectUnknown = zod_index_js_namespaceObject.z.record(zod_index_js_namespaceObject.z.string(), zod_externalItemValue), zod_externalItem = zod_index_js_namespaceObject.z.string().or(zod_index_js_namespaceObject.z.instanceof(RegExp)).or(externalItemObjectUnknown).or(anyFunction), zod_externals = zod_externalItem.array().or(zod_externalItem), zod_externalsPresets = zod_index_js_namespaceObject.z.strictObject({
12552
12678
  node: zod_index_js_namespaceObject.z.boolean().optional(),
12553
12679
  web: zod_index_js_namespaceObject.z.boolean().optional(),
12554
12680
  webAsync: zod_index_js_namespaceObject.z.boolean().optional(),
@@ -12557,7 +12683,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
12557
12683
  electronPreload: zod_index_js_namespaceObject.z.boolean().optional(),
12558
12684
  electronRenderer: zod_index_js_namespaceObject.z.boolean().optional(),
12559
12685
  nwjs: zod_index_js_namespaceObject.z.boolean().optional()
12560
- }), filterItemTypes = zod_index_js_namespaceObject.z.instanceof(RegExp).or(zod_index_js_namespaceObject.z.string()).or(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({
12686
+ }), filterItemTypes = zod_index_js_namespaceObject.z.instanceof(RegExp).or(zod_index_js_namespaceObject.z.string()).or(anyFunction), filterTypes = filterItemTypes.array().or(filterItemTypes), zod_infrastructureLogging = zod_index_js_namespaceObject.z.strictObject({
12561
12687
  appendOnly: zod_index_js_namespaceObject.z.boolean().optional(),
12562
12688
  colors: zod_index_js_namespaceObject.z.boolean().optional(),
12563
12689
  console: zod_index_js_namespaceObject.z.custom().optional(),
@@ -12678,22 +12804,8 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
12678
12804
  groupAssetsByChunk: zod_index_js_namespaceObject.z.boolean().optional(),
12679
12805
  assetsSpace: zod_index_js_namespaceObject.z.number().optional(),
12680
12806
  orphanModules: zod_index_js_namespaceObject.z.boolean().optional(),
12681
- excludeModules: zod_index_js_namespaceObject.z.array(zod_index_js_namespaceObject.z.string().or(zod_index_js_namespaceObject.z.instanceof(RegExp)).or(zod_index_js_namespaceObject.z.function(zod_index_js_namespaceObject.z.tuple([
12682
- zod_index_js_namespaceObject.z.string(),
12683
- zod_index_js_namespaceObject.z.any(),
12684
- zod_index_js_namespaceObject.z.any()
12685
- ]), zod_index_js_namespaceObject.z.boolean()))).or(zod_index_js_namespaceObject.z.string()).or(zod_index_js_namespaceObject.z.instanceof(RegExp)).or(zod_index_js_namespaceObject.z.function(zod_index_js_namespaceObject.z.tuple([
12686
- zod_index_js_namespaceObject.z.string(),
12687
- zod_index_js_namespaceObject.z.any(),
12688
- zod_index_js_namespaceObject.z.any()
12689
- ]), zod_index_js_namespaceObject.z.boolean())).or(zod_index_js_namespaceObject.z.boolean()).optional(),
12690
- excludeAssets: zod_index_js_namespaceObject.z.array(zod_index_js_namespaceObject.z.string().or(zod_index_js_namespaceObject.z.instanceof(RegExp)).or(zod_index_js_namespaceObject.z.function(zod_index_js_namespaceObject.z.tuple([
12691
- zod_index_js_namespaceObject.z.string(),
12692
- zod_index_js_namespaceObject.z.any()
12693
- ]), zod_index_js_namespaceObject.z.boolean()))).or(zod_index_js_namespaceObject.z.string()).or(zod_index_js_namespaceObject.z.instanceof(RegExp)).or(zod_index_js_namespaceObject.z.function(zod_index_js_namespaceObject.z.tuple([
12694
- zod_index_js_namespaceObject.z.string(),
12695
- zod_index_js_namespaceObject.z.any()
12696
- ]), zod_index_js_namespaceObject.z.boolean())).optional(),
12807
+ 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(),
12808
+ excludeAssets: zod_index_js_namespaceObject.z.array(zod_index_js_namespaceObject.z.string().or(zod_index_js_namespaceObject.z.instanceof(RegExp)).or(anyFunction)).or(zod_index_js_namespaceObject.z.string()).or(zod_index_js_namespaceObject.z.instanceof(RegExp)).or(anyFunction).optional(),
12697
12809
  modulesSort: zod_index_js_namespaceObject.z.string().optional(),
12698
12810
  chunkModulesSort: zod_index_js_namespaceObject.z.string().optional(),
12699
12811
  nestedModulesSort: zod_index_js_namespaceObject.z.string().optional(),
@@ -12725,16 +12837,12 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
12725
12837
  "single",
12726
12838
  "multiple"
12727
12839
  ]).or(zod_index_js_namespaceObject.z.boolean()).or(zod_index_js_namespaceObject.z.strictObject({
12728
- name: zod_index_js_namespaceObject.z.string().or(zod_index_js_namespaceObject.z.function().args(zod_index_js_namespaceObject.z.strictObject({
12729
- name: zod_index_js_namespaceObject.z.string()
12730
- })).returns(zod_index_js_namespaceObject.z.string())).optional()
12731
- })), optimizationSplitChunksNameFunction = zod_index_js_namespaceObject.z.function().args(zod_index_js_namespaceObject.z.instanceof(binding_.Module), zod_index_js_namespaceObject.z.array(zod_index_js_namespaceObject.z.instanceof(Chunk)), zod_index_js_namespaceObject.z.string()).returns(zod_index_js_namespaceObject.z.string().optional()), optimizationSplitChunksName = zod_index_js_namespaceObject.z.string().or(zod_index_js_namespaceObject.z.literal(!1)).or(optimizationSplitChunksNameFunction), optimizationSplitChunksChunks = zod_index_js_namespaceObject.z.enum([
12840
+ name: zod_index_js_namespaceObject.z.string().or(anyFunction).optional()
12841
+ })), optimizationSplitChunksName = zod_index_js_namespaceObject.z.string().or(zod_index_js_namespaceObject.z.literal(!1)).or(anyFunction), optimizationSplitChunksChunks = zod_index_js_namespaceObject.z.enum([
12732
12842
  "initial",
12733
12843
  "async",
12734
12844
  "all"
12735
- ]).or(zod_index_js_namespaceObject.z.instanceof(RegExp)).or(zod_index_js_namespaceObject.z.function().args(zod_index_js_namespaceObject.z.instanceof(Chunk, {
12736
- message: "Input not instance of Chunk"
12737
- })).returns(zod_index_js_namespaceObject.z.boolean())), optimizationSplitChunksSizes = zod_index_js_namespaceObject.z.number().or(zod_index_js_namespaceObject.z.record(zod_index_js_namespaceObject.z.string(), zod_index_js_namespaceObject.z.number())), optimizationSplitChunksDefaultSizeTypes = zod_index_js_namespaceObject.z.array(zod_index_js_namespaceObject.z.string()), sharedOptimizationSplitChunksCacheGroup = {
12845
+ ]).or(zod_index_js_namespaceObject.z.instanceof(RegExp)).or(anyFunction), optimizationSplitChunksSizes = zod_index_js_namespaceObject.z.number().or(zod_index_js_namespaceObject.z.record(zod_index_js_namespaceObject.z.string(), zod_index_js_namespaceObject.z.number())), optimizationSplitChunksDefaultSizeTypes = zod_index_js_namespaceObject.z.array(zod_index_js_namespaceObject.z.string()), sharedOptimizationSplitChunksCacheGroup = {
12738
12846
  chunks: optimizationSplitChunksChunks.optional(),
12739
12847
  defaultSizeTypes: optimizationSplitChunksDefaultSizeTypes.optional(),
12740
12848
  minChunks: zod_index_js_namespaceObject.z.number().min(1).optional(),
@@ -12750,18 +12858,13 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
12750
12858
  maxInitialRequests: zod_index_js_namespaceObject.z.number().optional(),
12751
12859
  automaticNameDelimiter: zod_index_js_namespaceObject.z.string().optional()
12752
12860
  }, optimizationSplitChunksCacheGroup = zod_index_js_namespaceObject.z.strictObject({
12753
- 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({
12754
- moduleGraph: zod_index_js_namespaceObject.z.instanceof(ModuleGraph),
12755
- chunkGraph: zod_index_js_namespaceObject.z.instanceof(ChunkGraph)
12756
- })).returns(zod_index_js_namespaceObject.z.boolean())).optional(),
12861
+ test: zod_index_js_namespaceObject.z.string().or(zod_index_js_namespaceObject.z.instanceof(RegExp)).or(anyFunction).optional(),
12757
12862
  priority: zod_index_js_namespaceObject.z.number().optional(),
12758
12863
  enforce: zod_index_js_namespaceObject.z.boolean().optional(),
12759
12864
  reuseExistingChunk: zod_index_js_namespaceObject.z.boolean().optional(),
12760
12865
  type: zod_index_js_namespaceObject.z.string().or(zod_index_js_namespaceObject.z.instanceof(RegExp)).optional(),
12761
12866
  idHint: zod_index_js_namespaceObject.z.string().optional(),
12762
- layer: zod_index_js_namespaceObject.z.string().or(zod_index_js_namespaceObject.z.instanceof(RegExp)).or(zod_index_js_namespaceObject.z.function(zod_index_js_namespaceObject.z.tuple([
12763
- zod_index_js_namespaceObject.z.string().optional()
12764
- ]), zod_index_js_namespaceObject.z.boolean())).optional(),
12867
+ layer: zod_index_js_namespaceObject.z.string().or(zod_index_js_namespaceObject.z.instanceof(RegExp)).or(anyFunction).optional(),
12765
12868
  ...sharedOptimizationSplitChunksCacheGroup
12766
12869
  }), optimizationSplitChunksOptions = zod_index_js_namespaceObject.z.strictObject({
12767
12870
  cacheGroups: zod_index_js_namespaceObject.z.record(zod_index_js_namespaceObject.z.literal(!1).or(optimizationSplitChunksCacheGroup)).optional(),
@@ -12848,7 +12951,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
12848
12951
  })), lazyCompilationOptions = zod_index_js_namespaceObject.z.object({
12849
12952
  imports: zod_index_js_namespaceObject.z.boolean().optional(),
12850
12953
  entries: zod_index_js_namespaceObject.z.boolean().optional(),
12851
- 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(),
12954
+ test: zod_index_js_namespaceObject.z.instanceof(RegExp).or(anyFunction).optional(),
12852
12955
  client: zod_index_js_namespaceObject.z.string().optional(),
12853
12956
  serverUrl: zod_index_js_namespaceObject.z.string().optional(),
12854
12957
  prefix: zod_index_js_namespaceObject.z.string().optional()
@@ -12879,12 +12982,11 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
12879
12982
  zod_index_js_namespaceObject.z.literal(!1)
12880
12983
  ]).optional(),
12881
12984
  upgrade: zod_index_js_namespaceObject.z.boolean().optional(),
12882
- 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({
12883
- status: zod_index_js_namespaceObject.z.number(),
12884
- headers: zod_index_js_namespaceObject.z.record(zod_index_js_namespaceObject.z.string(), zod_index_js_namespaceObject.z.string()),
12885
- body: zod_index_js_namespaceObject.z.instanceof(Buffer)
12886
- }))).optional()
12887
- }), zod_experiments = zod_index_js_namespaceObject.z.strictObject({
12985
+ httpClient: anyFunction.optional()
12986
+ }), useInputFileSystem = zod_index_js_namespaceObject.z.union([
12987
+ zod_index_js_namespaceObject.z.literal(!1),
12988
+ zod_index_js_namespaceObject.z.array(zod_index_js_namespaceObject.z.instanceof(RegExp))
12989
+ ]), zod_experiments = zod_index_js_namespaceObject.z.strictObject({
12888
12990
  cache: zod_index_js_namespaceObject.z.boolean().optional().or(experimentCacheOptions),
12889
12991
  lazyCompilation: zod_index_js_namespaceObject.z.boolean().optional().or(lazyCompilationOptions),
12890
12992
  asyncWebAssembly: zod_index_js_namespaceObject.z.boolean().optional(),
@@ -12897,15 +12999,17 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
12897
12999
  futureDefaults: zod_index_js_namespaceObject.z.boolean().optional(),
12898
13000
  rspackFuture: rspackFutureOptions.optional(),
12899
13001
  buildHttp: buildHttpOptions.optional(),
12900
- parallelLoader: zod_index_js_namespaceObject.z.boolean().optional()
13002
+ parallelLoader: zod_index_js_namespaceObject.z.boolean().optional(),
13003
+ useInputFileSystem: useInputFileSystem.optional(),
13004
+ inlineConst: zod_index_js_namespaceObject.z.boolean().optional()
12901
13005
  }), zod_watch = zod_index_js_namespaceObject.z.boolean(), zod_watchOptions = zod_index_js_namespaceObject.z.strictObject({
12902
13006
  aggregateTimeout: zod_index_js_namespaceObject.z.number().optional(),
12903
13007
  followSymlinks: zod_index_js_namespaceObject.z.boolean().optional(),
12904
13008
  ignored: zod_index_js_namespaceObject.z.string().array().or(zod_index_js_namespaceObject.z.instanceof(RegExp)).or(zod_index_js_namespaceObject.z.string()).optional(),
12905
13009
  poll: zod_index_js_namespaceObject.z.number().or(zod_index_js_namespaceObject.z.boolean()).optional(),
12906
13010
  stdin: zod_index_js_namespaceObject.z.boolean().optional()
12907
- }), devServer = zod_index_js_namespaceObject.z.custom(), ignoreWarnings = zod_index_js_namespaceObject.z.instanceof(RegExp).or(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({
12908
- assetFilter: zod_index_js_namespaceObject.z.function().args(zod_index_js_namespaceObject.z.string()).returns(zod_index_js_namespaceObject.z.boolean()).optional(),
13011
+ }), 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({
13012
+ assetFilter: anyFunction.optional(),
12909
13013
  hints: zod_index_js_namespaceObject.z.enum([
12910
13014
  "error",
12911
13015
  "warning"
@@ -12948,6 +13052,27 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
12948
13052
  amd: amd.optional(),
12949
13053
  bail: bail.optional(),
12950
13054
  performance: zod_performance.optional()
13055
+ }).superRefine((config, ctx)=>{
13056
+ let isLibraryUmd = !1, library = config?.output?.library;
13057
+ function checkExternalItem(externalItem, path) {
13058
+ if ("object" == typeof externalItem && null !== externalItem) for (let [key, value] of Object.entries(externalItem)){
13059
+ var externalItemValue, path1;
13060
+ externalItemValue = value, path1 = [
13061
+ ...path,
13062
+ key
13063
+ ], "object" == typeof externalItemValue && null !== externalItemValue && (externalItemUmdValue.safeParse(externalItemValue).success || ctx.addIssue({
13064
+ code: zod_index_js_namespaceObject.ZodIssueCode.custom,
13065
+ message: 'External object must have "root", "commonjs", "commonjs2", "amd" properties when "libraryType" or "externalsType" is "umd"',
13066
+ path: path1
13067
+ }));
13068
+ }
13069
+ }
13070
+ ("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, [
13071
+ "externals",
13072
+ index
13073
+ ])) : checkExternalItem(config?.externals, [
13074
+ "externals"
13075
+ ]));
12951
13076
  }), ModuleFederationRuntimePlugin = base_create(binding_.BuiltinPluginName.ModuleFederationRuntimePlugin, ()=>{}), options_process = (options, normalizeSimple, normalizeOptions, fn)=>{
12952
13077
  let object = (obj)=>{
12953
13078
  for (let [key, value] of Object.entries(obj))"string" == typeof value || Array.isArray(value) ? fn(key, normalizeSimple(value, key)) : fn(key, normalizeOptions(value, key));
@@ -13318,7 +13443,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
13318
13443
  let _options = JSON.stringify(options || {});
13319
13444
  return binding_default().transform(source, _options);
13320
13445
  }
13321
- let exports_rspackVersion = "1.3.15", exports_version = "5.75.0", exports_WebpackError = Error, sources = __webpack_require__("webpack-sources"), exports_config = {
13446
+ let exports_rspackVersion = "1.4.0-beta.1", exports_version = "5.75.0", exports_WebpackError = Error, sources = __webpack_require__("webpack-sources"), exports_config = {
13322
13447
  getNormalizedRspackOptions: getNormalizedRspackOptions,
13323
13448
  applyRspackOptionsDefaults: applyRspackOptionsDefaults,
13324
13449
  getNormalizedWebpackOptions: getNormalizedRspackOptions,
@@ -13402,29 +13527,51 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
13402
13527
  await JavaScriptTracer.initJavaScriptTrace(layer, output), (0, binding_.registerGlobalTrace)(filter, layer, output), JavaScriptTracer.initCpuProfiler();
13403
13528
  },
13404
13529
  async cleanup () {
13405
- (0, binding_.cleanupGlobalTrace)(), await JavaScriptTracer.cleanupJavaScriptTrace();
13530
+ await JavaScriptTracer.cleanupJavaScriptTrace(), await (0, binding_.syncTraceEvent)(JavaScriptTracer.events), (0, binding_.cleanupGlobalTrace)();
13406
13531
  }
13407
13532
  },
13408
13533
  RemoveDuplicateModulesPlugin: RemoveDuplicateModulesPlugin,
13409
13534
  RsdoctorPlugin: RsdoctorPluginImpl,
13410
13535
  SubresourceIntegrityPlugin: SubresourceIntegrityPlugin,
13411
- lazyCompilationMiddleware: (compiler, userOptions = {})=>{
13412
- if (!1 === userOptions) return noop;
13413
- let options = !0 === userOptions ? {} : userOptions, activeModules = new Map(), filesByKey = new Map(), lazyCompilationPrefix = options.prefix || LAZY_COMPILATION_PREFIX;
13414
- return new BuiltinLazyCompilationPlugin(({ module, path })=>{
13415
- let key = encodeURIComponent(module.replace(/\\/g, "/").replace(/@/g, "_")).replace(/%(2F|3A|24|26|2B|2C|3B|3D)/g, decodeURIComponent);
13416
- filesByKey.set(key, path);
13417
- let active = !0 === activeModules.get(key);
13418
- return {
13419
- client: `${options.client || getDefaultClient(compiler)}?${encodeURIComponent(getFullServerUrl(options))}`,
13420
- data: key,
13421
- active
13536
+ lazyCompilationMiddleware: (compiler)=>{
13537
+ if (compiler instanceof MultiCompiler) {
13538
+ let middlewareByCompiler = new Map(), i = 0;
13539
+ for (let c of compiler.compilers){
13540
+ if (!c.options.experiments.lazyCompilation) continue;
13541
+ let options = {
13542
+ ...c.options.experiments.lazyCompilation
13543
+ }, prefix = options.prefix || LAZY_COMPILATION_PREFIX;
13544
+ options.prefix = `${prefix}__${i++}`;
13545
+ let activeModules = new Map(), filesByKey = new Map();
13546
+ middlewareByCompiler.set(options.prefix, lazyCompilationMiddlewareInternal(compiler, activeModules, filesByKey, options.prefix)), applyPlugin(c, options, activeModules, filesByKey);
13547
+ }
13548
+ let keys = [
13549
+ ...middlewareByCompiler.keys()
13550
+ ];
13551
+ return (req, res, next)=>{
13552
+ let key = keys.find((key)=>req.url?.startsWith(key));
13553
+ if (!key) return next?.();
13554
+ let middleware = middlewareByCompiler.get(key);
13555
+ return middleware?.(req, res, next);
13422
13556
  };
13423
- }, options.cacheable ?? !0, options.entries ?? !0, options.imports ?? !0, "function" == typeof options.test ? (module)=>(0, options.test)(module) : options.test).apply(compiler), lazyCompilationMiddlewareInternal(compiler, activeModules, filesByKey, lazyCompilationPrefix);
13557
+ }
13558
+ if (!compiler.options.experiments.lazyCompilation) return noop;
13559
+ let activeModules = new Map(), filesByKey = new Map(), options = {
13560
+ ...compiler.options.experiments.lazyCompilation
13561
+ };
13562
+ return applyPlugin(compiler, options, activeModules, filesByKey), lazyCompilationMiddlewareInternal(compiler, activeModules, filesByKey, options.prefix || LAZY_COMPILATION_PREFIX);
13424
13563
  },
13425
13564
  swc: {
13426
13565
  minify: minify,
13427
- transform: transform
13566
+ transform: transform,
13567
+ minifySync: function(source, options) {
13568
+ let _options = JSON.stringify(options || {});
13569
+ return binding_default().minifySync(source, _options);
13570
+ },
13571
+ transformSync: function(source, options) {
13572
+ let _options = JSON.stringify(options || {});
13573
+ return binding_default().transformSync(source, _options);
13574
+ }
13428
13575
  },
13429
13576
  CssChunkingPlugin: CssChunkingPlugin
13430
13577
  };
@@ -13484,7 +13631,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
13484
13631
  }, exports_namespaceObject);
13485
13632
  src_fn.rspack = src_fn, src_fn.webpack = src_fn;
13486
13633
  let src_rspack = src_fn, src_0 = src_rspack;
13487
- })(), exports.AsyncDependenciesBlock = __webpack_exports__.AsyncDependenciesBlock, exports.BannerPlugin = __webpack_exports__.BannerPlugin, exports.CircularDependencyRspackPlugin = __webpack_exports__.CircularDependencyRspackPlugin, exports.Compilation = __webpack_exports__.Compilation, exports.Compiler = __webpack_exports__.Compiler, exports.ConcatenatedModule = __webpack_exports__.ConcatenatedModule, exports.ContextModule = __webpack_exports__.ContextModule, exports.ContextReplacementPlugin = __webpack_exports__.ContextReplacementPlugin, exports.CopyRspackPlugin = __webpack_exports__.CopyRspackPlugin, exports.CssExtractRspackPlugin = __webpack_exports__.CssExtractRspackPlugin, exports.DefinePlugin = __webpack_exports__.DefinePlugin, exports.Dependency = __webpack_exports__.Dependency, exports.DllPlugin = __webpack_exports__.DllPlugin, exports.DllReferencePlugin = __webpack_exports__.DllReferencePlugin, exports.DynamicEntryPlugin = __webpack_exports__.DynamicEntryPlugin, exports.EntryDependency = __webpack_exports__.EntryDependency, exports.EntryOptionPlugin = __webpack_exports__.EntryOptionPlugin, exports.EntryPlugin = __webpack_exports__.EntryPlugin, exports.EnvironmentPlugin = __webpack_exports__.EnvironmentPlugin, exports.EvalDevToolModulePlugin = __webpack_exports__.EvalDevToolModulePlugin, exports.EvalSourceMapDevToolPlugin = __webpack_exports__.EvalSourceMapDevToolPlugin, exports.ExternalModule = __webpack_exports__.ExternalModule, exports.ExternalsPlugin = __webpack_exports__.ExternalsPlugin, exports.HotModuleReplacementPlugin = __webpack_exports__.HotModuleReplacementPlugin, exports.HtmlRspackPlugin = __webpack_exports__.HtmlRspackPlugin, exports.IgnorePlugin = __webpack_exports__.IgnorePlugin, exports.LightningCssMinimizerRspackPlugin = __webpack_exports__.LightningCssMinimizerRspackPlugin, exports.LoaderOptionsPlugin = __webpack_exports__.LoaderOptionsPlugin, exports.LoaderTargetPlugin = __webpack_exports__.LoaderTargetPlugin, exports.Module = __webpack_exports__.Module, exports.ModuleFilenameHelpers = __webpack_exports__.ModuleFilenameHelpers, exports.MultiCompiler = __webpack_exports__.MultiCompiler, exports.MultiStats = __webpack_exports__.MultiStats, exports.NoEmitOnErrorsPlugin = __webpack_exports__.NoEmitOnErrorsPlugin, exports.NormalModule = __webpack_exports__.NormalModule, exports.NormalModuleReplacementPlugin = __webpack_exports__.NormalModuleReplacementPlugin, exports.ProgressPlugin = __webpack_exports__.ProgressPlugin, exports.ProvidePlugin = __webpack_exports__.ProvidePlugin, exports.RspackOptionsApply = __webpack_exports__.RspackOptionsApply, exports.RstestPlugin = __webpack_exports__.RstestPlugin, exports.RuntimeGlobals = __webpack_exports__.RuntimeGlobals, exports.RuntimeModule = __webpack_exports__.RuntimeModule, exports.RuntimePlugin = __webpack_exports__.RuntimePlugin, exports.SourceMapDevToolPlugin = __webpack_exports__.SourceMapDevToolPlugin, exports.Stats = __webpack_exports__.Stats, exports.SwcJsMinimizerRspackPlugin = __webpack_exports__.SwcJsMinimizerRspackPlugin, exports.Template = __webpack_exports__.Template, exports.ValidationError = __webpack_exports__.ValidationError, exports.WarnCaseSensitiveModulesPlugin = __webpack_exports__.WarnCaseSensitiveModulesPlugin, exports.WebpackError = __webpack_exports__.WebpackError, exports.WebpackOptionsApply = __webpack_exports__.WebpackOptionsApply, exports.config = __webpack_exports__.config, exports.container = __webpack_exports__.container, exports.default = __webpack_exports__.default, exports.electron = __webpack_exports__.electron, exports.experiments = __webpack_exports__.experiments, exports.javascript = __webpack_exports__.javascript, exports.library = __webpack_exports__.library, exports.node = __webpack_exports__.node, exports.optimize = __webpack_exports__.optimize, exports.rspack = __webpack_exports__.rspack, exports.rspackVersion = __webpack_exports__.rspackVersion, exports.sharing = __webpack_exports__.sharing, exports.sources = __webpack_exports__.sources, exports.util = __webpack_exports__.util, exports.version = __webpack_exports__.version, exports.wasm = __webpack_exports__.wasm, exports.web = __webpack_exports__.web, exports.webworker = __webpack_exports__.webworker, __webpack_exports__)-1 === [
13634
+ })(), exports.AsyncDependenciesBlock = __webpack_exports__.AsyncDependenciesBlock, exports.BannerPlugin = __webpack_exports__.BannerPlugin, exports.CircularDependencyRspackPlugin = __webpack_exports__.CircularDependencyRspackPlugin, exports.Compilation = __webpack_exports__.Compilation, exports.Compiler = __webpack_exports__.Compiler, exports.ConcatenatedModule = __webpack_exports__.ConcatenatedModule, exports.ContextModule = __webpack_exports__.ContextModule, exports.ContextReplacementPlugin = __webpack_exports__.ContextReplacementPlugin, exports.CopyRspackPlugin = __webpack_exports__.CopyRspackPlugin, exports.CssExtractRspackPlugin = __webpack_exports__.CssExtractRspackPlugin, exports.DefinePlugin = __webpack_exports__.DefinePlugin, exports.Dependency = __webpack_exports__.Dependency, exports.DllPlugin = __webpack_exports__.DllPlugin, exports.DllReferencePlugin = __webpack_exports__.DllReferencePlugin, exports.DynamicEntryPlugin = __webpack_exports__.DynamicEntryPlugin, exports.EntryDependency = __webpack_exports__.EntryDependency, exports.EntryOptionPlugin = __webpack_exports__.EntryOptionPlugin, exports.EntryPlugin = __webpack_exports__.EntryPlugin, exports.EnvironmentPlugin = __webpack_exports__.EnvironmentPlugin, exports.EvalDevToolModulePlugin = __webpack_exports__.EvalDevToolModulePlugin, exports.EvalSourceMapDevToolPlugin = __webpack_exports__.EvalSourceMapDevToolPlugin, exports.ExternalModule = __webpack_exports__.ExternalModule, exports.ExternalsPlugin = __webpack_exports__.ExternalsPlugin, exports.HotModuleReplacementPlugin = __webpack_exports__.HotModuleReplacementPlugin, exports.HtmlRspackPlugin = __webpack_exports__.HtmlRspackPlugin, exports.IgnorePlugin = __webpack_exports__.IgnorePlugin, exports.LightningCssMinimizerRspackPlugin = __webpack_exports__.LightningCssMinimizerRspackPlugin, exports.LoaderOptionsPlugin = __webpack_exports__.LoaderOptionsPlugin, exports.LoaderTargetPlugin = __webpack_exports__.LoaderTargetPlugin, exports.Module = __webpack_exports__.Module, exports.ModuleFilenameHelpers = __webpack_exports__.ModuleFilenameHelpers, exports.MultiCompiler = __webpack_exports__.MultiCompiler, exports.MultiStats = __webpack_exports__.MultiStats, exports.NoEmitOnErrorsPlugin = __webpack_exports__.NoEmitOnErrorsPlugin, exports.NormalModule = __webpack_exports__.NormalModule, exports.NormalModuleReplacementPlugin = __webpack_exports__.NormalModuleReplacementPlugin, exports.ProgressPlugin = __webpack_exports__.ProgressPlugin, exports.ProvidePlugin = __webpack_exports__.ProvidePlugin, exports.RspackOptionsApply = __webpack_exports__.RspackOptionsApply, exports.RstestPlugin = __webpack_exports__.RstestPlugin, exports.RuntimeGlobals = __webpack_exports__.RuntimeGlobals, exports.RuntimeModule = __webpack_exports__.RuntimeModule, exports.RuntimePlugin = __webpack_exports__.RuntimePlugin, exports.SourceMapDevToolPlugin = __webpack_exports__.SourceMapDevToolPlugin, exports.Stats = __webpack_exports__.Stats, exports.StatsErrorCode = __webpack_exports__.StatsErrorCode, exports.SwcJsMinimizerRspackPlugin = __webpack_exports__.SwcJsMinimizerRspackPlugin, exports.Template = __webpack_exports__.Template, exports.ValidationError = __webpack_exports__.ValidationError, exports.WarnCaseSensitiveModulesPlugin = __webpack_exports__.WarnCaseSensitiveModulesPlugin, exports.WebpackError = __webpack_exports__.WebpackError, exports.WebpackOptionsApply = __webpack_exports__.WebpackOptionsApply, exports.config = __webpack_exports__.config, exports.container = __webpack_exports__.container, exports.default = __webpack_exports__.default, exports.electron = __webpack_exports__.electron, exports.experiments = __webpack_exports__.experiments, exports.javascript = __webpack_exports__.javascript, exports.library = __webpack_exports__.library, exports.node = __webpack_exports__.node, exports.optimize = __webpack_exports__.optimize, exports.rspack = __webpack_exports__.rspack, exports.rspackVersion = __webpack_exports__.rspackVersion, exports.sharing = __webpack_exports__.sharing, exports.sources = __webpack_exports__.sources, exports.util = __webpack_exports__.util, exports.version = __webpack_exports__.version, exports.wasm = __webpack_exports__.wasm, exports.web = __webpack_exports__.web, exports.webworker = __webpack_exports__.webworker, __webpack_exports__)-1 === [
13488
13635
  "AsyncDependenciesBlock",
13489
13636
  "BannerPlugin",
13490
13637
  "CircularDependencyRspackPlugin",
@@ -13530,6 +13677,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
13530
13677
  "RuntimePlugin",
13531
13678
  "SourceMapDevToolPlugin",
13532
13679
  "Stats",
13680
+ "StatsErrorCode",
13533
13681
  "SwcJsMinimizerRspackPlugin",
13534
13682
  "Template",
13535
13683
  "ValidationError",