@rspack/core 1.4.0-beta.0 → 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.
- package/dist/MultiCompiler.d.ts +4 -1
- package/dist/MultiWatching.d.ts +1 -0
- package/dist/builtin-loader/swc/types.d.ts +74 -55
- package/dist/builtin-plugin/lazy-compilation/middleware.d.ts +3 -3
- package/dist/config/devServer.d.ts +1 -1
- package/dist/config/normalization.d.ts +1 -0
- package/dist/config/types.d.ts +7 -0
- package/dist/config/zod.d.ts +57 -6
- package/dist/exports.d.ts +3 -1
- package/dist/index.js +599 -525
- package/dist/swc.d.ts +2 -0
- package/package.json +4 -4
package/dist/index.js
CHANGED
@@ -4344,7 +4344,8 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
|
|
4344
4344
|
requireAsExpression: parser.requireAsExpression,
|
4345
4345
|
requireDynamic: parser.requireDynamic,
|
4346
4346
|
requireResolve: parser.requireResolve,
|
4347
|
-
importDynamic: parser.importDynamic
|
4347
|
+
importDynamic: parser.importDynamic,
|
4348
|
+
inlineConst: parser.inlineConst
|
4348
4349
|
};
|
4349
4350
|
}
|
4350
4351
|
function getRawCssParserOptions(parser) {
|
@@ -4997,6 +4998,9 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
|
|
4997
4998
|
function isNonEmptyArray(value) {
|
4998
4999
|
return 0 !== value.length;
|
4999
5000
|
}
|
5001
|
+
function stringifySymbol(symbol) {
|
5002
|
+
return symbol.description ?? "";
|
5003
|
+
}
|
5000
5004
|
var identifierRegex = /[$_\p{ID_Start}][$\u200c\u200d\p{ID_Continue}]*/u, PREFIX = "Validation error";
|
5001
5005
|
function fromZodErrorWithoutRuntimeCheck(zodError, options = {}) {
|
5002
5006
|
var options1;
|
@@ -5035,21 +5039,26 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
|
|
5035
5039
|
}))
|
5036
5040
|
].join(issueSeparator);
|
5037
5041
|
if (includePath && isNonEmptyArray(issue.path)) {
|
5038
|
-
var path;
|
5039
5042
|
if (1 === issue.path.length) {
|
5040
5043
|
let identifier = issue.path[0];
|
5041
5044
|
if ("number" == typeof identifier) return `${issue.message} at index ${identifier}`;
|
5042
5045
|
}
|
5043
|
-
return `${issue.message} at "${
|
5044
|
-
if (
|
5045
|
-
|
5046
|
-
|
5047
|
-
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() || '""';
|
5048
5050
|
}
|
5049
|
-
|
5050
|
-
|
5051
|
-
|
5052
|
-
|
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)}"`;
|
5053
5062
|
}
|
5054
5063
|
return issue.message;
|
5055
5064
|
})({
|
@@ -5111,50 +5120,50 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
|
|
5111
5120
|
return !1;
|
5112
5121
|
}
|
5113
5122
|
}
|
5114
|
-
let compilationOptionsMap = new WeakMap(),
|
5115
|
-
|
5116
|
-
|
5117
|
-
|
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()
|
5118
5143
|
})).optional(),
|
5119
|
-
|
5120
|
-
|
5121
|
-
|
5122
|
-
|
5123
|
-
|
5124
|
-
|
5125
|
-
|
5126
|
-
|
5127
|
-
|
5128
|
-
|
5129
|
-
"
|
5130
|
-
|
5131
|
-
|
5132
|
-
"
|
5133
|
-
|
5134
|
-
|
5135
|
-
|
5136
|
-
|
5137
|
-
|
5138
|
-
|
5139
|
-
|
5140
|
-
|
5141
|
-
|
5142
|
-
excludeChunks: zod_index_js_namespaceObject.z.string().array().optional(),
|
5143
|
-
chunksSortMode: zod_index_js_namespaceObject.z.enum([
|
5144
|
-
"auto",
|
5145
|
-
"manual"
|
5146
|
-
]).optional(),
|
5147
|
-
sri: zod_index_js_namespaceObject.z.enum([
|
5148
|
-
"sha256",
|
5149
|
-
"sha384",
|
5150
|
-
"sha512"
|
5151
|
-
]).optional(),
|
5152
|
-
minify: zod_index_js_namespaceObject.z.boolean().optional(),
|
5153
|
-
title: zod_index_js_namespaceObject.z.string().optional(),
|
5154
|
-
favicon: zod_index_js_namespaceObject.z.string().optional(),
|
5155
|
-
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(),
|
5156
|
-
hash: zod_index_js_namespaceObject.z.boolean().optional()
|
5157
|
-
}), 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)=>{
|
5158
5167
|
if (!(compilation instanceof Compilation)) throw TypeError("The 'compilation' argument must be an instance of Compilation");
|
5159
5168
|
return compilationOptionsMap.get(compilation)?.[uid];
|
5160
5169
|
}, setPluginOptions = (compilation, uid, options)=>{
|
@@ -5165,7 +5174,7 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
|
|
5165
5174
|
delete optionsMap[uid], 0 === Object.keys(optionsMap).length ? compilationOptionsMap.delete(compilation) : compilationOptionsMap.set(compilation, optionsMap);
|
5166
5175
|
}, HTML_PLUGIN_UID = 0, HtmlRspackPluginImpl = base_create(binding_.BuiltinPluginName.HtmlRspackPlugin, function(c = {}) {
|
5167
5176
|
let templateParameters, templateFn, filenames;
|
5168
|
-
validate(c,
|
5177
|
+
validate(c, getPluginOptionsSchema());
|
5169
5178
|
let uid = HTML_PLUGIN_UID++, meta = {};
|
5170
5179
|
for(let key in c.meta){
|
5171
5180
|
let value = c.meta[key];
|
@@ -5360,15 +5369,15 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
|
|
5360
5369
|
return createBuiltinPlugin(this.name, raw);
|
5361
5370
|
}
|
5362
5371
|
}
|
5363
|
-
let
|
5364
|
-
|
5365
|
-
|
5366
|
-
|
5367
|
-
|
5368
|
-
|
5369
|
-
|
5370
|
-
|
5371
|
-
|
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();
|
5372
5381
|
class JavascriptModulesPlugin extends RspackBuiltinPlugin {
|
5373
5382
|
name = binding_.BuiltinPluginName.JavascriptModulesPlugin;
|
5374
5383
|
affectedHooks = "compilation";
|
@@ -5397,7 +5406,20 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
|
|
5397
5406
|
}, getFullServerUrl = ({ serverUrl, prefix })=>{
|
5398
5407
|
let lazyCompilationPrefix = prefix || LAZY_COMPILATION_PREFIX;
|
5399
5408
|
return serverUrl ? serverUrl + (serverUrl.endsWith("/") ? lazyCompilationPrefix.slice(1) : lazyCompilationPrefix) : lazyCompilationPrefix;
|
5400
|
-
}
|
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)=>{
|
5401
5423
|
let logger = compiler.getInfrastructureLogger("LazyCompilation");
|
5402
5424
|
return (req, res, next)=>{
|
5403
5425
|
if (!req.url?.startsWith(lazyCompilationPrefix)) return next?.();
|
@@ -5692,27 +5714,27 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
|
|
5692
5714
|
context,
|
5693
5715
|
entries,
|
5694
5716
|
name: options.name
|
5695
|
-
})), DllReferenceAgencyPlugin = base_create(binding_.BuiltinPluginName.DllReferenceAgencyPlugin, (options)=>options),
|
5696
|
-
|
5697
|
-
|
5698
|
-
|
5699
|
-
|
5700
|
-
|
5701
|
-
|
5702
|
-
|
5703
|
-
|
5704
|
-
|
5705
|
-
|
5706
|
-
|
5707
|
-
|
5708
|
-
|
5709
|
-
|
5710
|
-
|
5711
|
-
|
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 = {
|
5712
5734
|
moduleGraphFeatures: !0,
|
5713
5735
|
chunkGraphFeatures: !0
|
5714
5736
|
}) {
|
5715
|
-
return validate(c,
|
5737
|
+
return validate(c, getRsdoctorPluginSchema()), {
|
5716
5738
|
moduleGraphFeatures: c.moduleGraphFeatures ?? !0,
|
5717
5739
|
chunkGraphFeatures: c.chunkGraphFeatures ?? !0
|
5718
5740
|
};
|
@@ -5774,16 +5796,19 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
|
|
5774
5796
|
return await queried.promise(data);
|
5775
5797
|
};
|
5776
5798
|
})
|
5777
|
-
}), SubresourceIntegrityPlugin_PLUGIN_NAME = "SubresourceIntegrityPlugin", NATIVE_HTML_PLUGIN = "HtmlRspackPlugin",
|
5778
|
-
|
5779
|
-
|
5780
|
-
|
5781
|
-
|
5782
|
-
|
5783
|
-
|
5784
|
-
|
5785
|
-
|
5786
|
-
|
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
|
+
});
|
5787
5812
|
}), NativeSubresourceIntegrityPlugin = base_create(binding_.BuiltinPluginName.SubresourceIntegrityPlugin, function(options) {
|
5788
5813
|
let htmlPlugin = "Disabled";
|
5789
5814
|
return options.htmlPlugin === NATIVE_HTML_PLUGIN ? htmlPlugin = "Native" : "string" == typeof options.htmlPlugin && (htmlPlugin = "JavaScript"), {
|
@@ -5801,7 +5826,7 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
|
|
5801
5826
|
if ("object" != typeof options) throw Error("SubResourceIntegrity: argument must be an object");
|
5802
5827
|
try {
|
5803
5828
|
var options1;
|
5804
|
-
options1 = options, validate(options1,
|
5829
|
+
options1 = options, validate(options1, SubresourceIntegrityPlugin_getPluginOptionsSchema());
|
5805
5830
|
} catch (e) {
|
5806
5831
|
validateError = e;
|
5807
5832
|
}
|
@@ -6732,7 +6757,8 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
6732
6757
|
css: options.experiments.css,
|
6733
6758
|
targetProperties,
|
6734
6759
|
mode: options.mode,
|
6735
|
-
uniqueName: options.output.uniqueName
|
6760
|
+
uniqueName: options.output.uniqueName,
|
6761
|
+
inlineConst: options.experiments.inlineConst
|
6736
6762
|
}), applyOutputDefaults(options.output, {
|
6737
6763
|
context: options.context,
|
6738
6764
|
targetProperties,
|
@@ -6769,17 +6795,17 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
6769
6795
|
let tty = infrastructureLogging.stream.isTTY && "dumb" !== process.env.TERM;
|
6770
6796
|
D(infrastructureLogging, "level", "info"), D(infrastructureLogging, "debug", !1), D(infrastructureLogging, "colors", tty), D(infrastructureLogging, "appendOnly", !tty);
|
6771
6797
|
}, applyExperimentsDefaults = (experiments, { production, development })=>{
|
6772
|
-
F(experiments, "cache", ()=>development), D(experiments, "futureDefaults", !1), D(experiments, "lazyCompilation", !1), D(experiments, "asyncWebAssembly", experiments.futureDefaults), D(experiments, "css", !!experiments.futureDefaults || void 0), D(experiments, "layers", !1), D(experiments, "topLevelAwait", !0), D(experiments, "buildHttp", void 0), experiments.buildHttp && "object" == typeof experiments.buildHttp && D(experiments.buildHttp, "upgrade", !1), D(experiments, "incremental", {}), "object" == typeof experiments.incremental && (D(experiments.incremental, "silent", !0), D(experiments.incremental, "make", !0), D(experiments.incremental, "inferAsyncModules", !0), D(experiments.incremental, "providedExports", !0), D(experiments.incremental, "dependenciesDiagnostics", !0), D(experiments.incremental, "sideEffects", !0), D(experiments.incremental, "buildChunkGraph", !0), D(experiments.incremental, "moduleIds", !0), D(experiments.incremental, "chunkIds", !0), D(experiments.incremental, "modulesHashes", !0), D(experiments.incremental, "modulesCodegen", !0), D(experiments.incremental, "modulesRuntimeRequirements", !0), D(experiments.incremental, "chunksRuntimeRequirements", !0), D(experiments.incremental, "chunksHashes", !0), D(experiments.incremental, "chunksRender", !0), D(experiments.incremental, "emitAssets", !0)), D(experiments, "rspackFuture", {}), D(experiments, "parallelCodeSplitting", !0), D(experiments, "parallelLoader", !1), D(experiments, "useInputFileSystem", !1);
|
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);
|
6773
6799
|
}, applybundlerInfoDefaults = (rspackFuture, library)=>{
|
6774
|
-
"object" == typeof rspackFuture && (D(rspackFuture, "bundlerInfo", {}), "object" == typeof rspackFuture.bundlerInfo && (D(rspackFuture.bundlerInfo, "version", "1.4.0-beta.
|
6775
|
-
}, 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)=>{
|
6776
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", [
|
6777
6803
|
"..."
|
6778
|
-
]), D(parserOptions, "importMeta", !0);
|
6804
|
+
]), D(parserOptions, "importMeta", !0), D(parserOptions, "inlineConst", inlineConst);
|
6779
6805
|
}, applyJsonGeneratorOptionsDefaults = (generatorOptions)=>{
|
6780
6806
|
D(generatorOptions, "JSONParse", !0);
|
6781
|
-
}, applyModuleDefaults = (module, { asyncWebAssembly, css, targetProperties, mode, uniqueName })=>{
|
6782
|
-
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) {
|
6783
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");
|
6784
6810
|
let localIdentName = uniqueName && uniqueName.length > 0 ? "[uniqueName]-[id]-[local]" : "[id]-[local]";
|
6785
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);
|
@@ -7671,7 +7697,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
7671
7697
|
},
|
7672
7698
|
arm: "gnueabihf"
|
7673
7699
|
}
|
7674
|
-
}, BINDING_VERSION = __webpack_require__("@rspack/binding/package.json").version, CORE_VERSION = "1.4.0-beta.
|
7700
|
+
}, BINDING_VERSION = __webpack_require__("@rspack/binding/package.json").version, CORE_VERSION = "1.4.0-beta.1", getAddonPlatformArchAbi = ()=>{
|
7675
7701
|
let { platform, arch } = process, binding = "";
|
7676
7702
|
binding += platform;
|
7677
7703
|
let abi = NodePlatformArchToAbi[platform][arch];
|
@@ -8698,8 +8724,8 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
8698
8724
|
this.modifiedFiles = options.modifiedFiles, this.removedFiles = options.removedFiles;
|
8699
8725
|
let startTime = Date.now();
|
8700
8726
|
this.running = !0;
|
8701
|
-
let
|
8702
|
-
this.idle = !0, this.cache.beginIdle(), this.idle = !0, this.running = !1, err && this.hooks.failed.call(err), callback && callback(err, stats), this.hooks.afterDone.call(stats)
|
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);
|
8703
8729
|
}, onCompiled = (err, _compilation)=>{
|
8704
8730
|
if (err) return finalCallback(err);
|
8705
8731
|
if (_compilation.hooks.needAdditionalPass.call()) {
|
@@ -8976,7 +9002,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
8976
9002
|
obj.children = this.stats.map((stat, idx)=>{
|
8977
9003
|
let obj = stat.toJson(childOptions.children[idx]), compilationName = stat.compilation.name;
|
8978
9004
|
return obj.name = compilationName && makePathsRelative(childOptions.context, compilationName, stat.compilation.compiler.root), obj;
|
8979
|
-
}), childOptions.version && (obj.rspackVersion = "1.4.0-beta.
|
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(""));
|
8980
9006
|
let mapError = (j, obj)=>({
|
8981
9007
|
...obj,
|
8982
9008
|
compilerPath: obj.compilerPath ? `${j.name}.${obj.compilerPath}` : j.name
|
@@ -9028,7 +9054,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
9028
9054
|
}
|
9029
9055
|
size || callback(null);
|
9030
9056
|
}
|
9031
|
-
},
|
9057
|
+
}, MultiWatching = class {
|
9032
9058
|
watchings;
|
9033
9059
|
compiler;
|
9034
9060
|
constructor(watchings, compiler){
|
@@ -9038,6 +9064,10 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
9038
9064
|
if (callback) asyncLib.each(this.watchings, (watching, callback)=>watching.invalidate(callback), callback);
|
9039
9065
|
else for (let watching of this.watchings)watching.invalidate();
|
9040
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
|
+
}
|
9041
9071
|
close(callback) {
|
9042
9072
|
asyncLib.each(this.watchings, (watching, finishedCallback)=>{
|
9043
9073
|
watching.close(finishedCallback);
|
@@ -9097,6 +9127,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
9097
9127
|
hooks;
|
9098
9128
|
_options;
|
9099
9129
|
running;
|
9130
|
+
watching;
|
9100
9131
|
constructor(compilers, options){
|
9101
9132
|
let normalizedCompilers;
|
9102
9133
|
normalizedCompilers = Array.isArray(compilers) ? compilers : Object.entries(compilers).map(([name, compiler])=>(compiler.name = name, compiler)), this.hooks = {
|
@@ -9107,6 +9138,8 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
9107
9138
|
run: new lite_tapable_namespaceObject.MultiHook(normalizedCompilers.map((c)=>c.hooks.run)),
|
9108
9139
|
watchClose: new lite_tapable_namespaceObject.SyncHook([]),
|
9109
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)),
|
9110
9143
|
infrastructureLog: new lite_tapable_namespaceObject.MultiHook(normalizedCompilers.map((c)=>c.hooks.infrastructureLog))
|
9111
9144
|
}, this.compilers = normalizedCompilers, this._options = {
|
9112
9145
|
parallelism: options?.parallelism || Number.POSITIVE_INFINITY
|
@@ -9246,12 +9279,17 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
9246
9279
|
return processQueueWorker(), setupResults;
|
9247
9280
|
}
|
9248
9281
|
watch(watchOptions, handler) {
|
9249
|
-
|
9250
|
-
|
9251
|
-
|
9252
|
-
|
9253
|
-
|
9254
|
-
|
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;
|
9255
9293
|
}
|
9256
9294
|
run(callback, options) {
|
9257
9295
|
if (this.running) return callback(new ConcurrentCompilationError());
|
@@ -9867,7 +9905,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
9867
9905
|
object.hash = context.getStatsCompilation(compilation).hash;
|
9868
9906
|
},
|
9869
9907
|
version: (object)=>{
|
9870
|
-
object.version = "5.75.0", object.rspackVersion = "1.4.0-beta.
|
9908
|
+
object.version = "5.75.0", object.rspackVersion = "1.4.0-beta.1";
|
9871
9909
|
},
|
9872
9910
|
env: (object, _compilation, _context, { _env })=>{
|
9873
9911
|
object.env = _env;
|
@@ -11333,18 +11371,18 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
11333
11371
|
});
|
11334
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)=>({
|
11335
11373
|
explanation
|
11336
|
-
})),
|
11337
|
-
|
11338
|
-
|
11339
|
-
|
11340
|
-
|
11341
|
-
|
11342
|
-
|
11343
|
-
|
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
|
+
}));
|
11344
11382
|
class DllPlugin {
|
11345
11383
|
options;
|
11346
11384
|
constructor(options){
|
11347
|
-
validate(options,
|
11385
|
+
validate(options, getDllPluginOptionsSchema()), this.options = {
|
11348
11386
|
...options,
|
11349
11387
|
entryOnly: !1 !== options.entryOnly
|
11350
11388
|
};
|
@@ -11362,60 +11400,63 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
11362
11400
|
}), new LibManifestPlugin(this.options).apply(compiler), this.options.entryOnly || new FlagAllModulesAsUsedPlugin("DllPlugin").apply(compiler);
|
11363
11401
|
}
|
11364
11402
|
}
|
11365
|
-
let
|
11366
|
-
|
11367
|
-
|
11368
|
-
|
11369
|
-
|
11370
|
-
|
11371
|
-
|
11372
|
-
|
11373
|
-
|
11374
|
-
|
11375
|
-
|
11376
|
-
|
11377
|
-
|
11378
|
-
|
11379
|
-
|
11380
|
-
|
11381
|
-
|
11382
|
-
|
11383
|
-
|
11384
|
-
|
11385
|
-
|
11386
|
-
name: zod_index_js_namespaceObject.z.string().optional(),
|
11387
|
-
type: dllReferencePluginOptionsSourceType.optional()
|
11388
|
-
}), dllReferencePluginOptions = zod_index_js_namespaceObject.z.union([
|
11389
|
-
zod_index_js_namespaceObject.z.object({
|
11390
|
-
context: zod_index_js_namespaceObject.z.string().optional(),
|
11391
|
-
extensions: zod_index_js_namespaceObject.z.array(zod_index_js_namespaceObject.z.string()).optional(),
|
11392
|
-
manifest: zod_index_js_namespaceObject.z.string().or(dllReferencePluginOptionsManifest),
|
11393
|
-
name: zod_index_js_namespaceObject.z.string().optional(),
|
11394
|
-
scope: zod_index_js_namespaceObject.z.string().optional(),
|
11395
|
-
sourceType: dllReferencePluginOptionsSourceType.optional(),
|
11396
|
-
type: zod_index_js_namespaceObject.z.enum([
|
11397
|
-
"require",
|
11398
|
-
"object"
|
11399
|
-
]).optional()
|
11400
|
-
}),
|
11401
|
-
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({
|
11402
11424
|
content: dllReferencePluginOptionsContent,
|
11403
|
-
|
11404
|
-
|
11405
|
-
|
11406
|
-
|
11407
|
-
|
11408
|
-
|
11409
|
-
|
11410
|
-
|
11411
|
-
|
11412
|
-
|
11413
|
-
|
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
|
+
});
|
11414
11455
|
class DllReferencePlugin {
|
11415
11456
|
options;
|
11416
11457
|
errors;
|
11417
11458
|
constructor(options){
|
11418
|
-
validate(options,
|
11459
|
+
validate(options, getDllReferencePluginOptionsSchema()), this.options = options, this.errors = new WeakMap();
|
11419
11460
|
}
|
11420
11461
|
apply(compiler) {
|
11421
11462
|
compiler.hooks.beforeCompile.tapPromise(DllReferencePlugin.name, async (params)=>{
|
@@ -11800,339 +11841,348 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
11800
11841
|
});
|
11801
11842
|
}
|
11802
11843
|
}
|
11803
|
-
let
|
11804
|
-
|
11805
|
-
|
11806
|
-
|
11807
|
-
|
11808
|
-
|
11809
|
-
|
11810
|
-
|
11811
|
-
|
11812
|
-
|
11813
|
-
|
11814
|
-
|
11815
|
-
|
11816
|
-
|
11817
|
-
|
11818
|
-
|
11819
|
-
|
11820
|
-
|
11821
|
-
|
11822
|
-
|
11823
|
-
|
11824
|
-
|
11825
|
-
|
11826
|
-
|
11827
|
-
|
11828
|
-
|
11829
|
-
|
11830
|
-
|
11831
|
-
|
11832
|
-
|
11833
|
-
|
11834
|
-
|
11835
|
-
|
11836
|
-
|
11837
|
-
|
11838
|
-
|
11839
|
-
|
11840
|
-
|
11841
|
-
|
11842
|
-
|
11843
|
-
|
11844
|
-
|
11845
|
-
|
11846
|
-
|
11847
|
-
|
11848
|
-
|
11849
|
-
|
11850
|
-
|
11851
|
-
|
11852
|
-
|
11853
|
-
|
11854
|
-
|
11855
|
-
|
11856
|
-
|
11857
|
-
|
11858
|
-
|
11859
|
-
|
11860
|
-
|
11861
|
-
|
11862
|
-
|
11863
|
-
|
11864
|
-
|
11865
|
-
|
11866
|
-
|
11867
|
-
|
11868
|
-
|
11869
|
-
|
11870
|
-
|
11871
|
-
|
11872
|
-
|
11873
|
-
|
11874
|
-
|
11875
|
-
|
11876
|
-
|
11877
|
-
|
11878
|
-
|
11879
|
-
|
11880
|
-
|
11881
|
-
|
11882
|
-
|
11883
|
-
|
11884
|
-
|
11885
|
-
|
11886
|
-
zod_index_js_namespaceObject.z.
|
11887
|
-
|
11888
|
-
|
11889
|
-
|
11890
|
-
|
11891
|
-
|
11892
|
-
|
11893
|
-
|
11894
|
-
|
11895
|
-
|
11896
|
-
|
11897
|
-
|
11898
|
-
|
11899
|
-
|
11900
|
-
|
11901
|
-
|
11902
|
-
|
11903
|
-
|
11904
|
-
|
11905
|
-
|
11906
|
-
|
11907
|
-
|
11908
|
-
|
11909
|
-
|
11910
|
-
|
11911
|
-
|
11912
|
-
|
11913
|
-
|
11914
|
-
|
11915
|
-
|
11916
|
-
|
11917
|
-
|
11918
|
-
|
11919
|
-
|
11920
|
-
|
11921
|
-
|
11922
|
-
|
11923
|
-
|
11924
|
-
|
11925
|
-
|
11926
|
-
|
11927
|
-
|
11928
|
-
|
11929
|
-
|
11930
|
-
|
11931
|
-
|
11932
|
-
|
11933
|
-
|
11934
|
-
|
11935
|
-
|
11936
|
-
|
11937
|
-
|
11938
|
-
|
11939
|
-
|
11940
|
-
|
11941
|
-
|
11942
|
-
|
11943
|
-
|
11944
|
-
|
11945
|
-
|
11946
|
-
|
11947
|
-
|
11948
|
-
|
11949
|
-
|
11950
|
-
|
11951
|
-
|
11952
|
-
|
11953
|
-
|
11954
|
-
|
11955
|
-
|
11956
|
-
|
11957
|
-
|
11958
|
-
|
11959
|
-
|
11960
|
-
|
11961
|
-
|
11962
|
-
|
11963
|
-
|
11964
|
-
|
11965
|
-
|
11966
|
-
|
11967
|
-
|
11968
|
-
|
11969
|
-
|
11970
|
-
|
11971
|
-
|
11972
|
-
|
11973
|
-
|
11974
|
-
|
11975
|
-
|
11976
|
-
|
11977
|
-
|
11978
|
-
|
11979
|
-
|
11980
|
-
|
11981
|
-
|
11982
|
-
|
11983
|
-
|
11984
|
-
|
11985
|
-
|
11986
|
-
|
11987
|
-
|
11988
|
-
|
11989
|
-
|
11990
|
-
|
11991
|
-
|
11992
|
-
|
11993
|
-
|
11994
|
-
|
11995
|
-
|
11996
|
-
|
11997
|
-
|
11998
|
-
|
11999
|
-
|
12000
|
-
|
12001
|
-
|
12002
|
-
|
12003
|
-
|
12004
|
-
zod_index_js_namespaceObject.z.
|
12005
|
-
|
12006
|
-
|
12007
|
-
|
12008
|
-
|
12009
|
-
|
12010
|
-
|
12011
|
-
|
12012
|
-
|
12013
|
-
|
12014
|
-
|
12015
|
-
|
12016
|
-
|
12017
|
-
|
12018
|
-
|
12019
|
-
|
12020
|
-
|
12021
|
-
|
12022
|
-
|
12023
|
-
|
12024
|
-
|
12025
|
-
|
12026
|
-
|
12027
|
-
|
12028
|
-
|
12029
|
-
|
12030
|
-
|
12031
|
-
|
12032
|
-
|
12033
|
-
|
12034
|
-
|
12035
|
-
|
12036
|
-
|
12037
|
-
|
12038
|
-
|
12039
|
-
|
12040
|
-
|
12041
|
-
zod_index_js_namespaceObject.z.
|
12042
|
-
|
12043
|
-
|
12044
|
-
|
12045
|
-
|
12046
|
-
|
12047
|
-
|
12048
|
-
|
12049
|
-
|
12050
|
-
|
12051
|
-
|
12052
|
-
|
12053
|
-
|
12054
|
-
|
12055
|
-
|
12056
|
-
|
12057
|
-
|
12058
|
-
|
12059
|
-
|
12060
|
-
|
12061
|
-
|
12062
|
-
|
12063
|
-
zod_index_js_namespaceObject.z.
|
12064
|
-
|
12065
|
-
|
12066
|
-
|
12067
|
-
|
12068
|
-
|
12069
|
-
|
12070
|
-
|
12071
|
-
|
12072
|
-
|
12073
|
-
|
12074
|
-
|
12075
|
-
|
12076
|
-
|
12077
|
-
|
12078
|
-
|
12079
|
-
|
12080
|
-
|
12081
|
-
|
12082
|
-
|
12083
|
-
|
12084
|
-
|
12085
|
-
|
12086
|
-
|
12087
|
-
|
12088
|
-
|
12089
|
-
|
12090
|
-
|
12091
|
-
|
12092
|
-
|
12093
|
-
|
12094
|
-
|
12095
|
-
|
12096
|
-
|
12097
|
-
|
12098
|
-
|
12099
|
-
|
12100
|
-
|
12101
|
-
|
12102
|
-
|
12103
|
-
|
12104
|
-
|
12105
|
-
|
12106
|
-
|
12107
|
-
|
12108
|
-
|
12109
|
-
|
12110
|
-
|
12111
|
-
|
12112
|
-
|
12113
|
-
|
12114
|
-
|
12115
|
-
|
12116
|
-
|
12117
|
-
|
12118
|
-
|
12119
|
-
|
12120
|
-
|
12121
|
-
|
12122
|
-
|
12123
|
-
|
12124
|
-
|
12125
|
-
|
12126
|
-
|
12127
|
-
|
12128
|
-
|
12129
|
-
|
12130
|
-
|
12131
|
-
|
12132
|
-
|
12133
|
-
|
12134
|
-
|
12135
|
-
|
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
|
+
});
|
12136
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)=>({
|
12137
12187
|
message: `The provided value ${JSON.stringify(val)} must be an absolute path.`
|
12138
12188
|
})), zod_mode = zod_index_js_namespaceObject.z.enum([
|
@@ -12332,12 +12382,12 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
12332
12382
|
type: zod_index_js_namespaceObject.z.strictObject({
|
12333
12383
|
ident: zod_index_js_namespaceObject.z.string().optional(),
|
12334
12384
|
loader: zod_index_js_namespaceObject.z.literal("builtin:swc-loader"),
|
12335
|
-
options:
|
12385
|
+
options: getZodSwcLoaderOptionsSchema(),
|
12336
12386
|
parallel: zod_index_js_namespaceObject.z.boolean().optional()
|
12337
12387
|
}),
|
12338
12388
|
issue: (res, _, input)=>{
|
12339
12389
|
try {
|
12340
|
-
let message = validate(input.data.options,
|
12390
|
+
let message = validate(input.data.options, getZodSwcLoaderOptionsSchema(), {
|
12341
12391
|
output: !1,
|
12342
12392
|
strategy: "strict"
|
12343
12393
|
});
|
@@ -12400,14 +12450,14 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
12400
12450
|
test: (_, input)=>input?.data?.loader === "builtin:swc-loader" && "object" == typeof input?.data?.options,
|
12401
12451
|
type: baseRuleSetRule.extend({
|
12402
12452
|
loader: zod_index_js_namespaceObject.z.literal("builtin:swc-loader"),
|
12403
|
-
options:
|
12453
|
+
options: getZodSwcLoaderOptionsSchema()
|
12404
12454
|
}).extend({
|
12405
12455
|
oneOf: zod_index_js_namespaceObject.z.lazy(()=>ruleSetRule.or(falsy).array()).optional(),
|
12406
12456
|
rules: zod_index_js_namespaceObject.z.lazy(()=>ruleSetRule.or(falsy).array()).optional()
|
12407
12457
|
}),
|
12408
12458
|
issue: (res, _, input)=>{
|
12409
12459
|
try {
|
12410
|
-
let message = validate(input.data.options,
|
12460
|
+
let message = validate(input.data.options, getZodSwcLoaderOptionsSchema(), {
|
12411
12461
|
output: !1,
|
12412
12462
|
strategy: "strict"
|
12413
12463
|
});
|
@@ -12478,7 +12528,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
12478
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([
|
12479
12529
|
"strict",
|
12480
12530
|
"non-strict"
|
12481
|
-
]), 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({
|
12482
12532
|
dynamicImportMode: dynamicImportMode.optional(),
|
12483
12533
|
dynamicImportPreload: dynamicImportPreload.optional(),
|
12484
12534
|
dynamicImportPrefetch: dynamicImportPrefetch.optional(),
|
@@ -12497,7 +12547,8 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
12497
12547
|
requireAsExpression: requireAsExpression.optional(),
|
12498
12548
|
requireDynamic: requireDynamic.optional(),
|
12499
12549
|
requireResolve: requireResolve.optional(),
|
12500
|
-
importDynamic: importDynamic.optional()
|
12550
|
+
importDynamic: importDynamic.optional(),
|
12551
|
+
inlineConst: zod_inlineConst.optional()
|
12501
12552
|
}), parserOptionsByModuleTypeKnown = zod_index_js_namespaceObject.z.strictObject({
|
12502
12553
|
asset: assetParserOptions.optional(),
|
12503
12554
|
css: cssParserOptions.optional(),
|
@@ -12949,7 +13000,8 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
12949
13000
|
rspackFuture: rspackFutureOptions.optional(),
|
12950
13001
|
buildHttp: buildHttpOptions.optional(),
|
12951
13002
|
parallelLoader: zod_index_js_namespaceObject.z.boolean().optional(),
|
12952
|
-
useInputFileSystem: useInputFileSystem.optional()
|
13003
|
+
useInputFileSystem: useInputFileSystem.optional(),
|
13004
|
+
inlineConst: zod_index_js_namespaceObject.z.boolean().optional()
|
12953
13005
|
}), zod_watch = zod_index_js_namespaceObject.z.boolean(), zod_watchOptions = zod_index_js_namespaceObject.z.strictObject({
|
12954
13006
|
aggregateTimeout: zod_index_js_namespaceObject.z.number().optional(),
|
12955
13007
|
followSymlinks: zod_index_js_namespaceObject.z.boolean().optional(),
|
@@ -13391,7 +13443,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
13391
13443
|
let _options = JSON.stringify(options || {});
|
13392
13444
|
return binding_default().transform(source, _options);
|
13393
13445
|
}
|
13394
|
-
let exports_rspackVersion = "1.4.0-beta.
|
13446
|
+
let exports_rspackVersion = "1.4.0-beta.1", exports_version = "5.75.0", exports_WebpackError = Error, sources = __webpack_require__("webpack-sources"), exports_config = {
|
13395
13447
|
getNormalizedRspackOptions: getNormalizedRspackOptions,
|
13396
13448
|
applyRspackOptionsDefaults: applyRspackOptionsDefaults,
|
13397
13449
|
getNormalizedWebpackOptions: getNormalizedRspackOptions,
|
@@ -13481,23 +13533,45 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
13481
13533
|
RemoveDuplicateModulesPlugin: RemoveDuplicateModulesPlugin,
|
13482
13534
|
RsdoctorPlugin: RsdoctorPluginImpl,
|
13483
13535
|
SubresourceIntegrityPlugin: SubresourceIntegrityPlugin,
|
13484
|
-
lazyCompilationMiddleware: (compiler
|
13485
|
-
if (
|
13486
|
-
|
13487
|
-
|
13488
|
-
|
13489
|
-
|
13490
|
-
|
13491
|
-
|
13492
|
-
|
13493
|
-
|
13494
|
-
|
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);
|
13495
13556
|
};
|
13496
|
-
}
|
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);
|
13497
13563
|
},
|
13498
13564
|
swc: {
|
13499
13565
|
minify: minify,
|
13500
|
-
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
|
+
}
|
13501
13575
|
},
|
13502
13576
|
CssChunkingPlugin: CssChunkingPlugin
|
13503
13577
|
};
|